Beispiel #1
0
 def as_signed_transaction(self,
                           private_key: PrivateKey) -> FrontierTransaction:
     v, r, s = create_transaction_signature(self, private_key)
     return FrontierTransaction(
         nonce=self.nonce,
         gas_price=self.gas_price,
         gas=self.gas,
         to=self.to,
         value=self.value,
         data=self.data,
         v=v,
         r=r,
         s=s,
     )
Beispiel #2
0
 def as_signed_transaction(self,
                           private_key: PrivateKey,
                           chain_id: int=None) -> SpuriousDragonTransaction:
     v, r, s = create_transaction_signature(self, private_key, chain_id=chain_id)
     return SpuriousDragonTransaction(
         nonce=self.nonce,
         gas_price=self.gas_price,
         gas=self.gas,
         to=self.to,
         value=self.value,
         data=self.data,
         v=v,
         r=r,
         s=s,
     )