commit 1fbd94d382853493acee570f9e717ac8a372a3ee
parent 1a73c0d1ed81c8aeb0aede0444b6e07487a55a31
Author: nolash <dev@holbrook.no>
Date: Fri, 7 Jan 2022 12:53:27 +0000
Remove padding in hex values in encode cli command
Diffstat:
3 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/chainlib/eth/runnable/encode.py b/chainlib/eth/runnable/encode.py
@@ -53,7 +53,7 @@ logg = logging.getLogger()
script_dir = os.path.dirname(os.path.realpath(__file__))
config_dir = os.path.join(script_dir, '..', 'data', 'config')
-arg_flags = chainlib.eth.cli.argflag_std_write | chainlib.eth.cli.Flag.EXEC
+arg_flags = chainlib.eth.cli.argflag_std_write | chainlib.eth.cli.Flag.EXEC | chainlib.eth.cli.Flag.FEE
argparser = chainlib.eth.cli.ArgumentParser(arg_flags)
argparser.add_argument('--notx', action='store_true', help='Network send is not a transaction')
argparser.add_argument('--signature', type=str, help='Method signature to encode')
@@ -119,12 +119,14 @@ def main():
j = JSONRPCRequest(id_generator=rpc.id_generator)
o = j.template()
o['method'] = 'eth_call'
+ gas_limit = add_0x(int.to_bytes(config.get('_FEE_LIMIT'), 8, byteorder='big').hex(), compact_value=True)
+ gas_price = add_0x(int.to_bytes(config.get('_FEE_PRICE'), 8, byteorder='big').hex(), compact_value=True)
o['params'].append({
'to': exec_address,
'from': signer_address,
- 'value': '0x00',
- 'gas': add_0x(int.to_bytes(8000000, 8, byteorder='big').hex()), # TODO: better get of network gas limit
- 'gasPrice': '0x01',
+ 'value': '0x0',
+ 'gas': gas_limit, # TODO: better get of network gas limit
+ 'gasPrice': gas_price,
'data': add_0x(code),
})
height = to_blockheight_param(config.get('_HEIGHT'))
diff --git a/requirements.txt b/requirements.txt
@@ -1,6 +1,6 @@
funga-eth~=0.5.1
pysha3==1.0.2
-hexathon~=0.1.0
+hexathon~=0.1.1
websocket-client==0.57.0
potaahto~=0.1.0
chainlib~=0.0.16
diff --git a/setup.cfg b/setup.cfg
@@ -1,6 +1,6 @@
[metadata]
name = chainlib-eth
-version = 0.0.17
+version = 0.0.18
description = Ethereum implementation of the chainlib interface
author = Louis Holbrook
author_email = dev@holbrook.no