Rehabilitate commands

This commit is contained in:
nolash 2021-04-30 22:04:34 +02:00
parent a5e6a90478
commit 7c3d939040
Signed by: lash
GPG Key ID: 21D2E7BB88C2A746
4 changed files with 9 additions and 9 deletions

View File

@ -11,7 +11,7 @@ from chainlib.eth.contract import (
)
# local imports
from .index import AccountsIndex
from .interface import AccountsIndex
moddir = os.path.dirname(__file__)
datadir = os.path.join(moddir, 'data')
@ -42,7 +42,7 @@ class AccountRegistry(AccountsIndex):
@staticmethod
def gas(code=None):
return 700000
return 1200000
def constructor(self, sender_address):

View File

@ -28,7 +28,7 @@ from chainlib.eth.connection import EthHTTPConnection
from chainlib.eth.tx import receipt
# local imports
from eth_accounts_index import AccountsIndex
from eth_accounts_index.registry import AccountRegistry
logging.basicConfig(level=logging.WARNING)
logg = logging.getLogger()
@ -88,9 +88,9 @@ else:
gas_oracle = None
if args.gas_price !=None:
gas_oracle = OverrideGasOracle(price=args.gas_price, conn=rpc, code_callback=AccountsIndex.gas)
gas_oracle = OverrideGasOracle(price=args.gas_price, conn=rpc, code_callback=AccountRegistry.gas)
else:
gas_oracle = RPCGasOracle(rpc, code_callback=AccountsIndex.gas)
gas_oracle = RPCGasOracle(rpc, code_callback=AccountRegistry.gas)
dummy = args.d
contract_address = args.a
@ -100,7 +100,7 @@ account = args.address
def main():
if __name__ == '__main__':
c = AccountsIndex(chain_spec, signer=signer, gas_oracle=gas_oracle, nonce_oracle=nonce_oracle)
c = AccountRegistry(chain_spec, signer=signer, gas_oracle=gas_oracle, nonce_oracle=nonce_oracle)
(tx_hash_hex, o) = c.add(contract_address, signer_address, account)
if dummy:
print(tx_hash_hex)

View File

@ -55,8 +55,8 @@ if args.vv:
elif args.v:
logg.setLevel(logging.INFO)
block_last = args.w
block_all = args.ww
block_all = args.ww
block_last = args.w or block_all
passphrase_env = 'ETH_PASSPHRASE'
if args.env_prefix != None:

View File

@ -77,7 +77,7 @@ def element(ifc, address, fmt=default_format, w=sys.stdout):
def ls(ifc, fmt=default_format, w=sys.stdout):
i = 1
while True:
o = ifc.account(account_registry_address, i)
o = ifc.entry(account_registry_address, i)
try:
r = rpc.do(o)
account = ifc.parse_account(r)