Import chainlib, parse chainspec

This commit is contained in:
nolash
2021-02-19 13:50:13 +01:00
parent 67b21c369f
commit c282dfe9ed
6 changed files with 18 additions and 13 deletions

View File

@@ -16,6 +16,7 @@ import web3
from crypto_dev_signer.eth.signer import ReferenceSigner as EIP155Signer
from crypto_dev_signer.keystore import DictKeystore
from crypto_dev_signer.eth.helper import EthTxExecutor
from chainlib.chain import ChainSpec
logging.basicConfig(level=logging.WARNING)
logg = logging.getLogger()
@@ -60,8 +61,8 @@ if args.y != None:
logg.debug('now have key for signer address {}'.format(signer_address))
signer = EIP155Signer(keystore)
chain_pair = args.i.split(':')
chain_id = int(chain_pair[1])
chain_spec = ChainSpec.from_chain_str(args.i)
chain_id = chain_spec.network_id()
helper = EthTxExecutor(
w3,

View File

@@ -16,6 +16,7 @@ import web3
from crypto_dev_signer.eth.signer import ReferenceSigner as EIP155Signer
from crypto_dev_signer.keystore import DictKeystore
from crypto_dev_signer.eth.helper import EthTxExecutor
from chainlib.chain import ChainSpec
logging.basicConfig(level=logging.WARNING)
logg = logging.getLogger()
@@ -57,8 +58,8 @@ if args.y != None:
logg.debug('now have key for signer address {}'.format(signer_address))
signer = EIP155Signer(keystore)
chain_pair = args.i.split(':')
chain_id = int(chain_pair[1])
chain_spec = ChainSpec.from_chain_str(args.i)
chain_id = chain_spec.network_id()
helper = EthTxExecutor(
w3,