commit 83d5224b6c314c50ad870810e5cc61b0e620e649
parent 19532df107c82bbdecb94d35af975ec68c616d4a
Author: lash <dev@holbrook.no>
Date: Mon, 13 Feb 2023 07:48:14 +0000
Add sender address to list call
Diffstat:
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/python/eth_contract_registry/runnable/list.py b/python/eth_contract_registry/runnable/list.py
@@ -35,7 +35,6 @@ from chainlib.eth.cli.log import process_log
from chainlib.eth.settings import process_settings
from chainlib.settings import ChainSettings
-
# local imports
from eth_contract_registry.registry import ContractRegistry
@@ -76,17 +75,17 @@ def out_element(e, w=sys.stdout):
w.write(e[0] + '\t' + e[1] + '\n')
-def element(ifc, conn, registry_address, identifier, w=sys.stdout):
- o = ifc.address_of(registry_address, identifier, sender_address=ZERO_ADDRESS)
+def element(ifc, conn, registry_address, identifier, w=sys.stdout, sender_address=ZERO_ADDRESS):
+ o = ifc.address_of(registry_address, identifier, sender_address=sender_address)
r = conn.do(o)
address = ifc.parse_address_of(r)
out_element((identifier, address), w)
-def ls(ifc, conn, registry_address, w=sys.stdout):
+def ls(ifc, conn, registry_address, w=sys.stdout, sender_address=ZERO_ADDRESS):
i = 0
while True:
- o = ifc.identifier(registry_address, i)
+ o = ifc.identifier(registry_address, i, sender_address=sender_address)
try:
r = conn.do(o)
identifier = ifc.parse_identifier(r)
@@ -114,6 +113,7 @@ def main():
settings.get('EXEC'),
config.get('_IDENTIFIER'),
w=sys.stdout,
+ sender_address=settings.get('SENDER_ADDRESS'),
)
else:
ls(
@@ -121,6 +121,7 @@ def main():
settings.get('CONN'),
settings.get('EXEC'),
w=sys.stdout,
+ sender_address=settings.get('SENDER_ADDRESS'),
)
diff --git a/python/requirements.txt b/python/requirements.txt
@@ -1,2 +1,2 @@
confini~=0.6.0
-chainlib-eth~=0.4.7
+chainlib-eth~=0.4.15