eth: use local transactions module exclusively
This commit is contained in:
parent
5587f9f25c
commit
1e75442bb9
2 changed files with 3 additions and 6 deletions
|
|
@ -109,8 +109,7 @@ class Token(MMGenObject): # ERC20
|
|||
|
||||
def txsign(self,tx_in,key,from_addr,chain_id=None):
|
||||
|
||||
try: from ethereum.transactions import Transaction
|
||||
except: from .pyethereum.transactions import Transaction
|
||||
from .pyethereum.transactions import Transaction
|
||||
|
||||
if chain_id is None:
|
||||
chain_id_method = ('parity_chainId','eth_chainId')['eth_chainId' in g.rpch.caps]
|
||||
|
|
|
|||
|
|
@ -91,8 +91,7 @@ class EthereumMMGenTX(MMGenTX):
|
|||
def check_txfile_hex_data(self):
|
||||
if self.check_sigs():
|
||||
|
||||
try: from ethereum.transactions import Transaction
|
||||
except: from .pyethereum.transactions import Transaction
|
||||
from .pyethereum.transactions import Transaction
|
||||
|
||||
from . import rlp
|
||||
etx = rlp.decode(bytes.fromhex(self.hex),Transaction)
|
||||
|
|
@ -287,8 +286,7 @@ class EthereumMMGenTX(MMGenTX):
|
|||
'nonce': d['nonce'],
|
||||
'data': bytes.fromhex(d['data'])}
|
||||
|
||||
try: from ethereum.transactions import Transaction
|
||||
except: from .pyethereum.transactions import Transaction
|
||||
from .pyethereum.transactions import Transaction
|
||||
|
||||
etx = Transaction(**d_in).sign(wif,d['chainId'])
|
||||
assert etx.sender.hex() == d['from'],(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue