Add raw args option
This commit is contained in:
parent
6474a2399a
commit
bfbb1dea26
@ -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()
|
||||
|
@ -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))
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user