2022-02-22 15:47:06 +01:00
|
|
|
# standard imports
|
|
|
|
import sys
|
|
|
|
|
|
|
|
# external imports
|
|
|
|
import chainlib.eth.cli
|
|
|
|
from hexathon import add_0x
|
|
|
|
|
|
|
|
cmds = {
|
|
|
|
'gas': chainlib.eth.cli.argflag_std_write | chainlib.eth.cli.Flag.WALLET,
|
2022-02-24 11:36:15 +01:00
|
|
|
'info': chainlib.eth.cli.argflag_reset(chainlib.cli.argflag_std_base_read, chainlib.eth.cli.Flag.CHAIN_SPEC),
|
|
|
|
'get': chainlib.eth.cli.argflag_reset(chainlib.cli.argflag_std_base_read, chainlib.eth.cli.Flag.CHAIN_SPEC),
|
2022-02-24 12:40:35 +01:00
|
|
|
'decode': chainlib.cli.argflag_std_base | chainlib.eth.cli.Flag.CHAIN_SPEC,
|
2022-02-22 15:47:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
b = cmds[sys.argv[1]]
|
|
|
|
print(add_0x(hex(b)))
|