Add remaining man pages
This commit is contained in:
parent
2f906037a9
commit
b59eebe181
5
Makefile
5
Makefile
@ -7,5 +7,10 @@ man:
|
|||||||
chainlib-man.py -b `PYTHONPATH=. python chainlib/eth/runnable/flags.py info` -v -n eth-info -d $(BUILD_DIR)/ man
|
chainlib-man.py -b `PYTHONPATH=. python chainlib/eth/runnable/flags.py info` -v -n eth-info -d $(BUILD_DIR)/ man
|
||||||
chainlib-man.py -b `PYTHONPATH=. python chainlib/eth/runnable/flags.py get` -v -n eth-get -d $(BUILD_DIR)/ man
|
chainlib-man.py -b `PYTHONPATH=. python chainlib/eth/runnable/flags.py get` -v -n eth-get -d $(BUILD_DIR)/ man
|
||||||
chainlib-man.py -b `PYTHONPATH=. python chainlib/eth/runnable/flags.py decode` -v -n eth-decode -d $(BUILD_DIR)/ man
|
chainlib-man.py -b `PYTHONPATH=. python chainlib/eth/runnable/flags.py decode` -v -n eth-decode -d $(BUILD_DIR)/ man
|
||||||
|
chainlib-man.py -b `PYTHONPATH=. python chainlib/eth/runnable/flags.py encode` -v -n eth-encode -d $(BUILD_DIR)/ man
|
||||||
|
chainlib-man.py -b `PYTHONPATH=. python chainlib/eth/runnable/flags.py count` -v -n eth-count -d $(BUILD_DIR)/ man
|
||||||
|
chainlib-man.py -b `PYTHONPATH=. python chainlib/eth/runnable/flags.py raw` -v -n eth-raw -d $(BUILD_DIR)/ man
|
||||||
|
chainlib-man.py -b `PYTHONPATH=. python chainlib/eth/runnable/flags.py wait` -v -n eth-wait -d $(BUILD_DIR)/ man
|
||||||
|
chainlib-man.py -b `PYTHONPATH=. python chainlib/eth/runnable/flags.py balance` -v -n eth-balance -d $(BUILD_DIR)/ man
|
||||||
|
|
||||||
.PHONY: man
|
.PHONY: man
|
||||||
|
@ -25,7 +25,7 @@ logg = logging.getLogger()
|
|||||||
script_dir = os.path.dirname(os.path.realpath(__file__))
|
script_dir = os.path.dirname(os.path.realpath(__file__))
|
||||||
config_dir = os.path.join(script_dir, '..', 'data', 'config')
|
config_dir = os.path.join(script_dir, '..', 'data', 'config')
|
||||||
|
|
||||||
arg_flags = chainlib.eth.cli.argflag_std_read
|
arg_flags = chainlib.eth.cli.argflag_std_base_read | chainlib.eth.cli.Flag.WALLET
|
||||||
argparser = chainlib.eth.cli.ArgumentParser(arg_flags)
|
argparser = chainlib.eth.cli.ArgumentParser(arg_flags)
|
||||||
argparser.add_positional('address', type=str, help='Ethereum address of recipient')
|
argparser.add_positional('address', type=str, help='Ethereum address of recipient')
|
||||||
args = argparser.parse_args()
|
args = argparser.parse_args()
|
||||||
|
@ -10,6 +10,12 @@ cmds = {
|
|||||||
'info': chainlib.eth.cli.argflag_reset(chainlib.cli.argflag_std_base_read, chainlib.eth.cli.Flag.CHAIN_SPEC),
|
'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),
|
'get': chainlib.eth.cli.argflag_reset(chainlib.cli.argflag_std_base_read, chainlib.eth.cli.Flag.CHAIN_SPEC),
|
||||||
'decode': chainlib.cli.argflag_std_base | chainlib.eth.cli.Flag.CHAIN_SPEC,
|
'decode': chainlib.cli.argflag_std_base | chainlib.eth.cli.Flag.CHAIN_SPEC,
|
||||||
|
'encode': chainlib.eth.cli.argflag_std_write | chainlib.eth.cli.Flag.EXEC | chainlib.eth.cli.Flag.FEE | chainlib.eth.cli.Flag.FMT_HUMAN | chainlib.eth.cli.Flag.FMT_WIRE | chainlib.eth.cli.Flag.FMT_RPC,
|
||||||
|
'count': chainlib.eth.cli.argflag_std_base_read | chainlib.eth.cli.Flag.WALLET,
|
||||||
|
'raw': chainlib.eth.cli.argflag_std_write | chainlib.eth.cli.Flag.EXEC,
|
||||||
|
'balance': chainlib.eth.cli.argflag_std_base | chainlib.eth.cli.Flag.WALLET,
|
||||||
|
'wait': chainlib.eth.cli.argflag_reset(chainlib.eth.cli.argflag_std_base_read | chainlib.eth.cli.Flag.NO_TARGET | chainlib.eth.cli.Flag.RPC_AUTH, chainlib.eth.cli.Flag.CHAIN_SPEC | chainlib.eth.cli.Flag.RAW),
|
||||||
|
'checksum': 0,
|
||||||
}
|
}
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
@ -51,6 +51,7 @@ 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
|
||||||
argparser = chainlib.eth.cli.ArgumentParser(arg_flags)
|
argparser = chainlib.eth.cli.ArgumentParser(arg_flags)
|
||||||
argparser.add_argument('--deploy', action='store_true', help='Deploy data as contract')
|
argparser.add_argument('--deploy', action='store_true', help='Deploy data as contract')
|
||||||
|
argparser.add_argument('--mode', choices=['tx', 'call'], type=str, help='Mode of operation')
|
||||||
argparser.add_positional('data', type=str, help='Transaction data')
|
argparser.add_positional('data', type=str, help='Transaction data')
|
||||||
args = argparser.parse_args()
|
args = argparser.parse_args()
|
||||||
config = chainlib.eth.cli.Config.from_args(args, arg_flags, default_config_dir=config_dir)
|
config = chainlib.eth.cli.Config.from_args(args, arg_flags, default_config_dir=config_dir)
|
||||||
|
16
man/eth-balance.head.groff
Normal file
16
man/eth-balance.head.groff
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
.TH eth-balance 1
|
||||||
|
|
||||||
|
.SH NAME
|
||||||
|
eth-balance \- Get network gas token balance for an address
|
||||||
|
|
||||||
|
.SH SYNOPSIS
|
||||||
|
\fBeth-balance\fP [ -p \fIrpc_provider\fP ] \fIaddress\fP
|
||||||
|
|
||||||
|
.SH DESCRIPTION
|
||||||
|
.P
|
||||||
|
Query the network for the gas token balance of an account.
|
||||||
|
.P
|
||||||
|
The balance will be returned as an integer value denominated in the gas unit.
|
||||||
|
|
||||||
|
|
||||||
|
.SS OPTION
|
1
man/eth-balance.overrides
Normal file
1
man/eth-balance.overrides
Normal file
@ -0,0 +1 @@
|
|||||||
|
a Address to get balance for. -a, --address
|
7
man/eth-checksum.custom.groff
Normal file
7
man/eth-checksum.custom.groff
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
.SH ABOUT THE CHECKSUM
|
||||||
|
.P
|
||||||
|
Checksum protection may be used as protection against address typos.
|
||||||
|
.P
|
||||||
|
It uses the value of the address itself as input to an algorithm, which results in altering the case of the letters in the hexadecimal address.
|
||||||
|
.P
|
||||||
|
A checksum address consisting of only numbers will always pass checksum.
|
11
man/eth-checksum.head.groff
Normal file
11
man/eth-checksum.head.groff
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
.TH eth-checksum 1
|
||||||
|
|
||||||
|
.SH NAME
|
||||||
|
eth-checksum \- Calculate checksum address
|
||||||
|
|
||||||
|
.SH SYNOPSIS
|
||||||
|
\fBeth-checksum\fP \fIaddress\fP
|
||||||
|
|
||||||
|
.SH DESCRIPTION
|
||||||
|
.P
|
||||||
|
Converts \fIaddress\fP into a checksum-protected address.
|
15
man/eth-count.head.groff
Normal file
15
man/eth-count.head.groff
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
.TH eth-count 1
|
||||||
|
|
||||||
|
.SH NAME
|
||||||
|
eth-count \- Get transaction count for an address
|
||||||
|
|
||||||
|
.SH SYNOPSIS
|
||||||
|
\fBeth-count\fP [ -p \fIrpc_provider\fP ] \fIaddress\fP
|
||||||
|
|
||||||
|
|
||||||
|
.SH DESCRIPTION
|
||||||
|
.P
|
||||||
|
Query the network for the number of transactions known for an account. The result can be used as the \fInonce\fP value for a consecutive transaction.
|
||||||
|
|
||||||
|
|
||||||
|
.SS OPTIONS
|
1
man/eth-count.overrides
Normal file
1
man/eth-count.overrides
Normal file
@ -0,0 +1 @@
|
|||||||
|
a Address to count transactions for. -a, --address
|
@ -4,7 +4,7 @@ In the follwing we willconsaider transactions signed by the private key for addr
|
|||||||
.SS Offline transaction
|
.SS Offline transaction
|
||||||
|
|
||||||
.EX
|
.EX
|
||||||
$ PYTHONPATH=. python chainlib/eth/runnable/gas.py -y <\fIkey_file_path\fP> -a 00000000000000000000000000000000DeaDBeef --fee-price 100000000000 --fee-limit 21000 --nonce 42 1024
|
$ eth-gas -y <\fIkey_file_path\fP> -a 00000000000000000000000000000000DeaDBeef --fee-price 100000000000 --fee-limit 21000 --nonce 42 1024
|
||||||
from: Eb3907eCad74a0013c259D5874AE7f22DcBcC95C
|
from: Eb3907eCad74a0013c259D5874AE7f22DcBcC95C
|
||||||
to: 00000000000000000000000000000000DeaDBeef
|
to: 00000000000000000000000000000000DeaDBeef
|
||||||
nonce: 42
|
nonce: 42
|
||||||
@ -25,7 +25,7 @@ src: 0xf8662a85174876e8008252089400000000000000000000000000000000deadbeef8204008
|
|||||||
.SS Offline transaction with arbitrary data
|
.SS Offline transaction with arbitrary data
|
||||||
|
|
||||||
.EX
|
.EX
|
||||||
$ PYTHONPATH=. python chainlib/eth/runnable/gas.py -y <\fIkey_file_path\fP> -a 00000000000000000000000000000000DeaDBeef --fee-price 100000000000 --fee-limit 21000 --nonce 42 --data 0x2a 1024
|
$ eth-gas -y <\fIkey_file_path\fP> -a 00000000000000000000000000000000DeaDBeef --fee-price 100000000000 --fee-limit 21000 --nonce 42 --data 0x2a 1024
|
||||||
from: Eb3907eCad74a0013c259D5874AE7f22DcBcC95C
|
from: Eb3907eCad74a0013c259D5874AE7f22DcBcC95C
|
||||||
to: 00000000000000000000000000000000DeaDBeef
|
to: 00000000000000000000000000000000DeaDBeef
|
||||||
nonce: 42
|
nonce: 42
|
||||||
@ -46,14 +46,14 @@ src: 0xf8662a85174876e8008252089400000000000000000000000000000000deadbeef8204002
|
|||||||
.SS Offline transaction with wire-format output
|
.SS Offline transaction with wire-format output
|
||||||
|
|
||||||
.EX
|
.EX
|
||||||
$ PYTHONPATH=. python chainlib/eth/runnable/gas.py -y <\fIkey_file_path\fP> -a 00000000000000000000000000000000DeaDBeef --fee-price 100000000000 --fee-limit 21000 --nonce 42 --raw 1024
|
$ eth-gas -y <\fIkey_file_path\fP> -a 00000000000000000000000000000000DeaDBeef --fee-price 100000000000 --fee-limit 21000 --nonce 42 --raw 1024
|
||||||
0xf8662a85174876e8008252089400000000000000000000000000000000deadbeef8204008025a00c97432d4db724e66a56f7ced04174cf6129e2555709f206dd6d3a156b4af23aa0287862548314a59c7ca6139eee8b51400eb40a67b08b8dc13d67302abecccae0
|
0xf8662a85174876e8008252089400000000000000000000000000000000deadbeef8204008025a00c97432d4db724e66a56f7ced04174cf6129e2555709f206dd6d3a156b4af23aa0287862548314a59c7ca6139eee8b51400eb40a67b08b8dc13d67302abecccae0
|
||||||
.EE
|
.EE
|
||||||
|
|
||||||
.SS Sign transaction for a different network
|
.SS Sign transaction for a different network
|
||||||
|
|
||||||
.EX
|
.EX
|
||||||
$ PYTHONPATH=. python chainlib/eth/runnable/gas.py -i evm:london:3:rinkeby -y /home/lash/src/contrib/grassrootseconomics/cic-dev/UTC--2021-01-08T17-18-44.521011372Z--eb3907ecad74a0013c259d5874ae7f22dcbcc95c -a 00000000000000000000000000000000DeaDBeef --fee-price 100000000000 --fee-limit 21000 --nonce 42 --data 0x2a 1024
|
$ eth-gas -i evm:london:3:rinkeby -y /home/lash/src/contrib/grassrootseconomics/cic-dev/UTC--2021-01-08T17-18-44.521011372Z--eb3907ecad74a0013c259d5874ae7f22dcbcc95c -a 00000000000000000000000000000000DeaDBeef --fee-price 100000000000 --fee-limit 21000 --nonce 42 --data 0x2a 1024
|
||||||
from: Eb3907eCad74a0013c259D5874AE7f22DcBcC95C
|
from: Eb3907eCad74a0013c259D5874AE7f22DcBcC95C
|
||||||
to: 00000000000000000000000000000000DeaDBeef
|
to: 00000000000000000000000000000000DeaDBeef
|
||||||
nonce: 42
|
nonce: 42
|
||||||
|
@ -4,14 +4,16 @@
|
|||||||
eth-get \- Retrieve transaction and transaction state from network
|
eth-get \- Retrieve transaction and transaction state from network
|
||||||
|
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
|
.PP
|
||||||
\fBeth-get\fP [ -p \fIrpc_provider\fP] \fItx_hash\fP
|
\fBeth-get\fP [ -p \fIrpc_provider\fP] \fItx_hash\fP
|
||||||
|
.PP
|
||||||
|
\fBeth-get\fP [ -p \fIrpc_provider\fP] \fIaddress\fP
|
||||||
|
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
.P
|
.P
|
||||||
Retrieve a transaction by its transaction hash.
|
Retrieve a transaction by its transaction hash, or contract code by its address.
|
||||||
.P
|
.P
|
||||||
\fBeth-get\fP retrieves the state of the transaction (the "receipt") and applies it to the output.
|
In the context of transaction, \fBeth-get\fP retrieves the state of the transaction (the "receipt") and applies it to the output. It also re-serializes the transaction wire format for reference.
|
||||||
.P
|
|
||||||
It also re-serializes the transaction wire format for reference.
|
|
||||||
|
|
||||||
.SS OPTIONS
|
.SS OPTIONS
|
||||||
|
8
man/eth-raw.examples.groff
Normal file
8
man/eth-raw.examples.groff
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
.SH EXAMPLES
|
||||||
|
|
||||||
|
Outputs of \fBeth-gas\fP and \fBeth-encode\fP map directly to inputs for \fBeth-raw\fP.
|
||||||
|
|
||||||
|
.SS Encapsulate a gas transaction
|
||||||
|
|
||||||
|
.EX
|
||||||
|
$ eth-gas -y <\fIkey_file_path\fP> -a 00000000000000000000000000000000DeaDBeef --fee-price 100000000000 --fee-limit 21000 --nonce 42 --raw 1024 | eth-raw
|
26
man/eth-raw.head.groff
Normal file
26
man/eth-raw.head.groff
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
.TH eth-raw 1
|
||||||
|
|
||||||
|
.SH NAME
|
||||||
|
eth-raw \- Create and send a jsonrpc transaction from signed rlp transaction
|
||||||
|
|
||||||
|
.SH SYNOPSIS
|
||||||
|
.P
|
||||||
|
\fBeth-raw\fP [ --deploy ] \fItransaction_data\fP
|
||||||
|
.P
|
||||||
|
\fBeth-raw\fP [ -p \fIrpc_provider\fP ] [ --deploy ] -s \fItransaction_data\fP
|
||||||
|
|
||||||
|
|
||||||
|
.SH DESCRIPTION
|
||||||
|
.P
|
||||||
|
Creates a jsonrpc object from serialized data.
|
||||||
|
.P
|
||||||
|
If \fB-y\fP is defined, and \fB--mode\fP is not set, or set to "tx", a \fIeth_sendRawTransaction\fP object will be created.
|
||||||
|
.P
|
||||||
|
Otherwise, an \fIeth_call\fP object will be created. The recipient of the call will be the contract specified with \fB-e\fP. If \fB-y\fP has been set, the sender of the query will be the address corresponding to the key file.
|
||||||
|
.P
|
||||||
|
If the \fB-s\fP option is added, the jsonrpc object will be sent to the rpc provider. \fBNote\fP If the jsonrpc object is a transaction, this may incur real costs.
|
||||||
|
.P
|
||||||
|
See the \fBEXAMPLES\fP section for details on how to use \fBeth-raw\fP with the outputs from \fBeth-gas\fP and \fBeth-encode\fP
|
||||||
|
|
||||||
|
|
||||||
|
.SS OPTIONS
|
4
man/eth-raw.seealso.groff
Normal file
4
man/eth-raw.seealso.groff
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
.SH SEE ALSO
|
||||||
|
|
||||||
|
.BP
|
||||||
|
confini-dump(1), eth-keyfile(1), eth-encode(1), eth-gas(1)
|
17
man/eth-wait.head.groff
Normal file
17
man/eth-wait.head.groff
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
.TH eth-wait 1
|
||||||
|
|
||||||
|
.SH NAE
|
||||||
|
eth-wait \- Wait for a transaction to be confirmed on network
|
||||||
|
|
||||||
|
.SH SYNOPSIS
|
||||||
|
\fBeth-wait\fP [ -p \fIrpc_provider\fP ] \fItransaction_hash\fP ...
|
||||||
|
|
||||||
|
.SH DESCRIPTION
|
||||||
|
.P
|
||||||
|
Blocks until network confirmation for the transactions are returned from \fIrpc_provider\fP.
|
||||||
|
.P
|
||||||
|
By default, if execution of the transaction failed on the network, the command will cause an error. This behavior can be adjusted using the \fB--ignore\fP or \fB--ignore-all\fP option.
|
||||||
|
.P
|
||||||
|
A transaction hash unknown to the \fIrpc_provider\fP will also cause an error.
|
||||||
|
|
||||||
|
.SS OPTIONS
|
2
man/eth-wait.overrides
Normal file
2
man/eth-wait.overrides
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
ignore Ignore error from the specified transaction. May be defined more than once. --ignore tx_hash
|
||||||
|
ignoreall Ignore errors from all transactions. --ignore-all
|
Loading…
Reference in New Issue
Block a user