chainlib-eth

Ethereum implementation of the chainlib interface
Log | Files | Refs | README | LICENSE

commit bfbb1dea26c3c68d042436b0852c96ae90e123a3
parent 6474a2399aab94b8eed25483f309e89ddc4ec551
Author: nolash <dev@holbrook.no>
Date:   Mon,  6 Dec 2021 19:00:55 +0100

Add raw args option

Diffstat:
Mchainlib/eth/runnable/encode.py | 2+-
Mchainlib/eth/tx.py | 2++
Mrequirements.txt | 2+-
Msetup.cfg | 2+-
4 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/chainlib/eth/runnable/encode.py b/chainlib/eth/runnable/encode.py @@ -55,7 +55,7 @@ config_dir = os.path.join(script_dir, '..', 'data', 'config') arg_flags = chainlib.eth.cli.argflag_std_write | chainlib.eth.cli.Flag.EXEC argparser = chainlib.eth.cli.ArgumentParser(arg_flags) -argparser.add_argument('--notx', type=str, help='Network send is not a transaction') +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') argparser.add_argument('contract_args', type=str, nargs='*', help='arguments to encode') args = argparser.parse_args() diff --git a/chainlib/eth/tx.py b/chainlib/eth/tx.py @@ -420,6 +420,8 @@ class TxFactory: return self.build(tx, id_generator=id_generator) elif tx_format == TxFormat.RLP_SIGNED: return self.build_raw(tx) + elif tx_format == TxFormat.RAW_ARGS: + return strip_0x(tx['data']) raise NotImplementedError('tx formatting {} not implemented'.format(tx_format)) diff --git a/requirements.txt b/requirements.txt @@ -3,5 +3,5 @@ pysha3==1.0.2 hexathon~=0.1.0 websocket-client==0.57.0 potaahto~=0.1.0 -chainlib~=0.0.12 +chainlib~=0.0.13 confini~=0.5.1 diff --git a/setup.cfg b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = chainlib-eth -version = 0.0.13a1 +version = 0.0.13 description = Ethereum implementation of the chainlib interface author = Louis Holbrook author_email = dev@holbrook.no