示例#1
0
 def as_signed_transaction(self, private_key, chain_id=None):
     v, r, s = create_transaction_signature(self, private_key, chain_id=chain_id)
     return ConstantinopleTransaction(
         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,
     )
示例#2
0
 def as_signed_transaction(self, private_key):
     v, r, s = create_transaction_signature(self, private_key)
     return HomesteadTransaction(
         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,
     )
示例#3
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,
     )
示例#4
0
 def as_signed_transaction(self,
                           private_key: PrivateKey,
                           chain_id: int = None) -> ByzantiumTransaction:
     v, r, s = create_transaction_signature(self,
                                            private_key,
                                            chain_id=chain_id)
     return ByzantiumTransaction(
         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,
     )