mirror of
git://holbrook.no/eth-accounts-index
synced 2024-11-21 16:46:46 +01:00
Add index accessor
This commit is contained in:
parent
52f2e02cfc
commit
607b1a3371
@ -72,6 +72,10 @@ class AccountRegistry:
|
||||
return r != 0
|
||||
|
||||
|
||||
def get_index(self, i):
|
||||
return self.contract.functions.accounts(i).call()
|
||||
|
||||
|
||||
def last(self, n):
|
||||
c = self.count()
|
||||
lo = c - n - 1
|
||||
|
@ -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()
|
||||
@ -59,8 +60,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,
|
||||
|
@ -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()
|
||||
@ -59,8 +60,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,
|
||||
|
@ -1,2 +1,3 @@
|
||||
confini==0.3.4
|
||||
confini~=0.3.6rc1
|
||||
web3==5.12.2
|
||||
chainlib~=0.0.1a16
|
||||
|
@ -1,6 +1,6 @@
|
||||
[metadata]
|
||||
name = eth-accounts-index
|
||||
version = 0.0.10a7
|
||||
version = 0.0.10a10
|
||||
description = Accounts index evm contract tooling with permissioned writes
|
||||
author = Louis Holbrook
|
||||
author_email = dev@holbrook.no
|
||||
@ -30,6 +30,7 @@ install_requires =
|
||||
confini~=0.3.6a1
|
||||
web3==5.12.2
|
||||
crypto-dev-signer~=0.4.13rc2
|
||||
chainlib~=0.0.1a16
|
||||
tests_require =
|
||||
pytest==6.0.1
|
||||
eth-tester==0.5.0b2
|
||||
|
Loading…
Reference in New Issue
Block a user