chainlib-eth

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

commit 206d3d88e5c79beec91e1fea247a4abf0aa3c1c7
parent d20297a6c7ca5b9ad0b3925bc25c40683bec462f
Author: lash <dev@holbrook.no>
Date:   Mon,  8 May 2023 07:25:50 +0100

Add man pages to installer

Diffstat:
MMANIFEST.in | 2+-
MMakefile | 2+-
Aman/build/eth-balance.1 | 98+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Aman/build/eth-count.1 | 135+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Aman/build/eth-decode.1 | 102+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Aman/build/eth-encode.1 | 253+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Aman/build/eth-gas.1 | 277+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Aman/build/eth-get.1 | 131+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Aman/build/eth-info.1 | 135+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Aman/build/eth-raw.1 | 210+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Aman/build/eth-wait.1 | 143+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Msetup.cfg | 2+-
Msetup.py | 15+++++++++++++++
13 files changed, 1502 insertions(+), 3 deletions(-)

diff --git a/MANIFEST.in b/MANIFEST.in @@ -1 +1 @@ -include *requirements.txt LICENSE WAIVER WAIVER.asc CHANGELOG chainlib/eth/data/config/* +include *requirements.txt LICENSE WAIVER WAIVER.asc CHANGELOG chainlib/eth/data/config/ man/build/** diff --git a/Makefile b/Makefile @@ -1,5 +1,5 @@ PREFIX ?= /usr/local -BUILD_DIR = build/$(PREFIX)/share/man +BUILD_DIR = man/build/ man: mkdir -vp $(BUILD_DIR) diff --git a/man/build/eth-balance.1 b/man/build/eth-balance.1 @@ -0,0 +1,98 @@ +.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 + +.TP +\fB-0\fP +Omit newline to output + +.TP +\fB-a\fP, \fB --address\fP +Address to get balance for. + +.TP +\fB-c \fI\fIconfig_dir\fP\fP, \fB--config \fI\fIconfig_dir\fP\fP +Load configuration files from given directory. All files with an .ini extension will be loaded, of which all must contain valid ini file data. + +.TP +\fB--dumpconfig \fI\fIformat\fP\fP +Output configuration settings rendered from environment and inputs. Valid arguments are \fIini\fP for ini file output, and \fIenv\fP for environment variable output. See \fBCONFIGURATION\fP. + +.TP +\fB--env-prefix\fP +Environment prefix for variables to overwrite configuration. Example: If \fB--env-prefix\fP is set to \fBFOO\fP then configuration variable \fBBAR_BAZ\fP would be set by environment variable \fBFOO_BAZ_BAR\fP. Also see \fBENVIRONMENT\fP. + +.TP +\fB-n \fI\fInamespace\fP\fP, \fB--namespace \fI\fInamespace\fP\fP +Load given configuration namespace. Configuration will be loaded from the immediate configuration subdirectory with the same name. + +.TP +\fB--no-logs\fP +Turn of logging completely. Negates \fB-v\fP and \fB-vv\fP + +.TP +\fB--raw\fP +Produce output most optimized for machines. + +.TP +\fB-v\fP +Verbose. Show logs for important state changes. + +.TP +\fB-vv\fP +Very verbose. Show logs with debugging information. + +.SH CONFIGURATION + +All configuration settings may be overriden both by environment variables, or by overriding settings with the contents of ini-files in the directory defined by the \fB-c\fP option. + +The active configuration, with values assigned from environment and arguments, can be output using the \fB--dumpconfig\fP \fIformat\fP option. Note that entries having keys prefixed with underscore (e.g. _SEQ) are not actual configuration settings, and thus cannot be overridden with environment variables. + +To refer to a configuration setting by environment variables, the \fIsection\fP and \fIkey\fP are concatenated together with an underscore, and transformed to upper-case. For example, the configuration variable \fIFOO_BAZ_BAR\fP refers to an ini-file entry as follows: + +.EX +[foo] +bar_baz = xyzzy +.EE + +In the \fBENVIRONMENT\fP section below, the relevant configuration settings for this tool is listed along with a short description of its meaning. + +Some configuration settings may also be overriden by command line options. Also note that the use of the \fB-n\fP and \fB--env-prefix\fP options affect how environment and configuration is read. The effects of options on how configuration settings are affective is described in the respective \fBOPTIONS\fP section. + + +.SH LICENSE + +This documentation and its source is licensed under the Creative Commons Attribution-Sharealike 4.0 International license. + +The source code of the tool this documentation describes is licensed under the GNU General Public License 3.0. + +.SH COPYRIGHT + +Louis Holbrook <dev@holbrook.no> (https://holbrook.no) +PGP: 59A844A484AC11253D3A3E9DCDCBD24DD1D0E001 + + + +.SH SOURCE CODE + +https://git.defalsify.org + + +.SH SEE ALSO + +.BP +confini-dump(1), eth-keyfile(1) + diff --git a/man/build/eth-count.1 b/man/build/eth-count.1 @@ -0,0 +1,135 @@ +.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 + +.TP +\fB-0\fP +Omit newline to output + +.TP +\fB-a\fP, \fB --address\fP +Address to count transactions for. + +.TP +\fB-c \fI\fIconfig_dir\fP\fP, \fB--config \fI\fIconfig_dir\fP\fP +Load configuration files from given directory. All files with an .ini extension will be loaded, of which all must contain valid ini file data. + +.TP +\fB--dumpconfig \fI\fIformat\fP\fP +Output configuration settings rendered from environment and inputs. Valid arguments are \fIini\fP for ini file output, and \fIenv\fP for environment variable output. See \fBCONFIGURATION\fP. + +.TP +\fB--env-prefix\fP +Environment prefix for variables to overwrite configuration. Example: If \fB--env-prefix\fP is set to \fBFOO\fP then configuration variable \fBBAR_BAZ\fP would be set by environment variable \fBFOO_BAZ_BAR\fP. Also see \fBENVIRONMENT\fP. + +.TP +\fB--height\fP +Block height at which to query state for. Does not apply to transactions. + +.TP +\fB-i \fI\fIchain_spec\fP\fP, \fB--chain-spec \fI\fIchain_spec\fP\fP +Chain specification string, in the format <engine>:<fork>:<chain_id>:<common_name>. Example: "evm:london:1:ethereum". Overrides the \fIRPC_CREDENTIALS\fP configuration setting. + +.TP +\fB-n \fI\fInamespace\fP\fP, \fB--namespace \fI\fInamespace\fP\fP +Load given configuration namespace. Configuration will be loaded from the immediate configuration subdirectory with the same name. + +.TP +\fB--no-logs\fP +Turn of logging completely. Negates \fB-v\fP and \fB-vv\fP + +.TP +\fB-p\fP, \fB--rpc-provider\fP +Fully-qualified URL of RPC provider. Overrides the \fIRPC_PROVIDER\fP configuration setting. + +.TP +\fB--raw\fP +Produce output most optimized for machines. + +.TP +\fB--rpc-dialect\fP +RPC backend dialect. If specified it \fImay\fP help with encoding and decoding issues. Overrides the \fIRPC_DIALECT\fP configuration setting. + +.TP +\fB--seq\fP +Use numeric sequencial jsonrpc query ids. Useful for buggy server implementations who expects such. + +.TP +\fB-u\fP, \fB--unsafe\fP +Allow addresses that do not pass checksum. + +.TP +\fB-v\fP +Verbose. Show logs for important state changes. + +.TP +\fB-vv\fP +Very verbose. Show logs with debugging information. + +.SH CONFIGURATION + +All configuration settings may be overriden both by environment variables, or by overriding settings with the contents of ini-files in the directory defined by the \fB-c\fP option. + +The active configuration, with values assigned from environment and arguments, can be output using the \fB--dumpconfig\fP \fIformat\fP option. Note that entries having keys prefixed with underscore (e.g. _SEQ) are not actual configuration settings, and thus cannot be overridden with environment variables. + +To refer to a configuration setting by environment variables, the \fIsection\fP and \fIkey\fP are concatenated together with an underscore, and transformed to upper-case. For example, the configuration variable \fIFOO_BAZ_BAR\fP refers to an ini-file entry as follows: + +.EX +[foo] +bar_baz = xyzzy +.EE + +In the \fBENVIRONMENT\fP section below, the relevant configuration settings for this tool is listed along with a short description of its meaning. + +Some configuration settings may also be overriden by command line options. Also note that the use of the \fB-n\fP and \fB--env-prefix\fP options affect how environment and configuration is read. The effects of options on how configuration settings are affective is described in the respective \fBOPTIONS\fP section. + +.SH ENVIRONMENT + + +.TP +\fICHAIN_SPEC\fP +String specifying the type of chain connected to, in the format \fI<engine>:<fork>:<network_id>:<common_name>\fP. For EVM nodes the \fIengine\fP value will always be \fIevm\fP. + +.TP +\fIRPC_DIALECT\fP +Enables translations of EVM node specific formatting and response codes. + +.TP +\fIRPC_PROVIDER\fP +Fully-qualified URL to the RPC endpoint of the blockchain node. + +.SH LICENSE + +This documentation and its source is licensed under the Creative Commons Attribution-Sharealike 4.0 International license. + +The source code of the tool this documentation describes is licensed under the GNU General Public License 3.0. + +.SH COPYRIGHT + +Louis Holbrook <dev@holbrook.no> (https://holbrook.no) +PGP: 59A844A484AC11253D3A3E9DCDCBD24DD1D0E001 + + + +.SH SOURCE CODE + +https://git.defalsify.org + + +.SH SEE ALSO + +.BP +confini-dump(1), eth-keyfile(1) + diff --git a/man/build/eth-decode.1 b/man/build/eth-decode.1 @@ -0,0 +1,102 @@ +.TH eth-decode 1 + +.SH NAME +eth-decode \- Decode a transaction in wire-format to human readable form + +.SH SYNOPSIS +\fBeth-decode\fI [ -i \fIchain_spec\fP ] encoded_tx + +.SH DESCRIPTION +.P +This tool deserializes a wire-format transaction and outputs its fields in human-readable form. It does not require a node to operate, and does not apply transaction state. +.P +The transaction wire-format is an ordered concatenation of transaction values, which in turn is serialized using the Recurive Length Prefix (RLP) format. \fBeth-decode\fP accepts the RLP-encoded transaction as a hex string. +.P + +.TP +\fB-0\fP +Omit newline to output + +.TP +\fB-c \fI\fIconfig_dir\fP\fP, \fB--config \fI\fIconfig_dir\fP\fP +Load configuration files from given directory. All files with an .ini extension will be loaded, of which all must contain valid ini file data. + +.TP +\fB--dumpconfig \fI\fIformat\fP\fP +Output configuration settings rendered from environment and inputs. Valid arguments are \fIini\fP for ini file output, and \fIenv\fP for environment variable output. See \fBCONFIGURATION\fP. + +.TP +\fB--env-prefix\fP +Environment prefix for variables to overwrite configuration. Example: If \fB--env-prefix\fP is set to \fBFOO\fP then configuration variable \fBBAR_BAZ\fP would be set by environment variable \fBFOO_BAZ_BAR\fP. Also see \fBENVIRONMENT\fP. + +.TP +\fB-i \fI\fIchain_spec\fP\fP, \fB--chain-spec \fI\fIchain_spec\fP\fP +Chain specification string, in the format <engine>:<fork>:<chain_id>:<common_name>. Example: "evm:london:1:ethereum". Overrides the \fIRPC_CREDENTIALS\fP configuration setting. + +.TP +\fB-n \fI\fInamespace\fP\fP, \fB--namespace \fI\fInamespace\fP\fP +Load given configuration namespace. Configuration will be loaded from the immediate configuration subdirectory with the same name. + +.TP +\fB--no-logs\fP +Turn of logging completely. Negates \fB-v\fP and \fB-vv\fP + +.TP +\fB--raw\fP +Produce output most optimized for machines. + +.TP +\fB-v\fP +Verbose. Show logs for important state changes. + +.TP +\fB-vv\fP +Very verbose. Show logs with debugging information. + +.SH CONFIGURATION + +All configuration settings may be overriden both by environment variables, or by overriding settings with the contents of ini-files in the directory defined by the \fB-c\fP option. + +The active configuration, with values assigned from environment and arguments, can be output using the \fB--dumpconfig\fP \fIformat\fP option. Note that entries having keys prefixed with underscore (e.g. _SEQ) are not actual configuration settings, and thus cannot be overridden with environment variables. + +To refer to a configuration setting by environment variables, the \fIsection\fP and \fIkey\fP are concatenated together with an underscore, and transformed to upper-case. For example, the configuration variable \fIFOO_BAZ_BAR\fP refers to an ini-file entry as follows: + +.EX +[foo] +bar_baz = xyzzy +.EE + +In the \fBENVIRONMENT\fP section below, the relevant configuration settings for this tool is listed along with a short description of its meaning. + +Some configuration settings may also be overriden by command line options. Also note that the use of the \fB-n\fP and \fB--env-prefix\fP options affect how environment and configuration is read. The effects of options on how configuration settings are affective is described in the respective \fBOPTIONS\fP section. + +.SH ENVIRONMENT + + +.TP +\fICHAIN_SPEC\fP +String specifying the type of chain connected to, in the format \fI<engine>:<fork>:<network_id>:<common_name>\fP. For EVM nodes the \fIengine\fP value will always be \fIevm\fP. + +.SH LICENSE + +This documentation and its source is licensed under the Creative Commons Attribution-Sharealike 4.0 International license. + +The source code of the tool this documentation describes is licensed under the GNU General Public License 3.0. + +.SH COPYRIGHT + +Louis Holbrook <dev@holbrook.no> (https://holbrook.no) +PGP: 59A844A484AC11253D3A3E9DCDCBD24DD1D0E001 + + + +.SH SOURCE CODE + +https://git.defalsify.org + + +.SH SEE ALSO + +.BP +confini-dump(1), eth-keyfile(1) + diff --git a/man/build/eth-encode.1 b/man/build/eth-encode.1 @@ -0,0 +1,253 @@ +.TH eth-encode 1 + +.SH NAME +eth-encode \- Encode arbitrary contract calls and transactions + +.SH SYNOPSIS +\fBeth-encode\fP [ --mode \fImode\fP ] [ -f \fIformat\fP ] [ -p \fIrpc_provider\fP ] [ -i \fIchain_Spec\fP] [ -s ] [ -w ] [ -e \fIsmart_contract_address\fP ] --signature \fIcontract_method_name\fP [ \fIvalue_specifiers\fP ... ] + +.SH DESCRIPTION + +Generate wire-format or rpc query any EVM smart contract call or transaction by specifying method and arguments. + +The resulting call or transaction can either be stored offline for later use, or directly sent to the network using the \fB-s\fP option. + +A description of value formatting is given in the \fBSPECIFYING VALUES\fP section below. Usage is demonstrated in the \fBEXAMPLES\fP section. + +.SS OPTIONS + +.TP +\fB-0\fP +Omit newline to output + +.TP +\fB-c \fI\fIconfig_dir\fP\fP, \fB--config \fI\fIconfig_dir\fP\fP +Load configuration files from given directory. All files with an .ini extension will be loaded, of which all must contain valid ini file data. + +.TP +\fB--dumpconfig \fI\fIformat\fP\fP +Output configuration settings rendered from environment and inputs. Valid arguments are \fIini\fP for ini file output, and \fIenv\fP for environment variable output. See \fBCONFIGURATION\fP. + +.TP +\fB-e\fP, \fB--executable-address\fP +Address of an executable code point on the network. + +.TP +\fB--env-prefix\fP +Environment prefix for variables to overwrite configuration. Example: If \fB--env-prefix\fP is set to \fBFOO\fP then configuration variable \fBBAR_BAZ\fP would be set by environment variable \fBFOO_BAZ_BAR\fP. Also see \fBENVIRONMENT\fP. + +.TP +\fB--fee-limit\fP +Set the limit of execution units for the transaction. If used with \fB-s\fP this may incur actual network token cost. If \fB--fee-price\fP is not explicitly set, the price \fImay\fP be retrieved from the network, and multiplied with this value to define the cost. + +.TP +\fB--fee-price\fP +Set fee unit price to offer for the transaction. If used with \fB-s\fP this may incur actual network token cost. + +.TP +\fB--height\fP +Block height at which to query state for. Does not apply to transactions. + +.TP +\fB-i \fI\fIchain_spec\fP\fP, \fB--chain-spec \fI\fIchain_spec\fP\fP +Chain specification string, in the format <engine>:<fork>:<chain_id>:<common_name>. Example: "evm:london:1:ethereum". Overrides the \fIRPC_CREDENTIALS\fP configuration setting. + +.TP +\fB--mode \fI\fImode +\fP\fP +Mode of operation encoding is for. Must be one of "tx," "call," or "arg." See \fBMODES\fP below. + +.TP +\fB-n \fI\fInamespace\fP\fP, \fB--namespace \fI\fInamespace\fP\fP +Load given configuration namespace. Configuration will be loaded from the immediate configuration subdirectory with the same name. + +.TP +\fB--no-logs\fP +Turn of logging completely. Negates \fB-v\fP and \fB-vv\fP + +.TP +\fB--nonce\fP +Explicitly set nonce to use for transaction. + +.TP +\fB-p\fP, \fB--rpc-provider\fP +Fully-qualified URL of RPC provider. Overrides the \fIRPC_PROVIDER\fP configuration setting. + +.TP +\fB--passphrase-file \fI\fIpath\fP\fP +Path to file containing password to unlock key file + +.TP +\fB--raw\fP +Produce output most optimized for machines. + +.TP +\fB--rpc-auth\fP +RPC endpoint authentication method, e.g. how to handle a HTTP WWW-Authenticate header. Overrides the \fIRPC_AUTH\fP configuration setting. + +.TP +\fB--rpc-credentials\fP +RPC endpoint authentication data. Format depends on the authentication method defined in \fB--rpc-auth\fP. Overrides the \fIRPC_CREDENTIALS\fP configuration setting. + +.TP +\fB--rpc-dialect\fP +RPC backend dialect. If specified it \fImay\fP help with encoding and decoding issues. Overrides the \fIRPC_DIALECT\fP configuration setting. + +.TP +\fB-s\fP +Send to network. If set, network state may change. This means tokens may be spent and so on. Use with care. Only applies to transactions. + +.TP +\fB--seq\fP +Use numeric sequencial jsonrpc query ids. Useful for buggy server implementations who expects such. + +.TP +\fB-u\fP, \fB--unsafe\fP +Allow addresses that do not pass checksum. + +.TP +\fB-v\fP +Verbose. Show logs for important state changes. + +.TP +\fB-vv\fP +Very verbose. Show logs with debugging information. + +.TP +\fB-w\fP +Wait for the last transaction to be confirmed on the network. Will generate an error if the EVM execution fails. + +.TP +\fB-ww\fP +Wait for \fIall\fP transactions sequentially to be confirmed on the network. Will generate an error if EVM execution fails for any of the transactions. + +.TP +\fB-y \fI\fIpath\fP\fP, \fB--key-path \fI\fIpath\fP\fP +Path to signing key. Overrides the \fIWALLET_KEY_FILE\fP configuration setting. + +.SH CONFIGURATION + +All configuration settings may be overriden both by environment variables, or by overriding settings with the contents of ini-files in the directory defined by the \fB-c\fP option. + +The active configuration, with values assigned from environment and arguments, can be output using the \fB--dumpconfig\fP \fIformat\fP option. Note that entries having keys prefixed with underscore (e.g. _SEQ) are not actual configuration settings, and thus cannot be overridden with environment variables. + +To refer to a configuration setting by environment variables, the \fIsection\fP and \fIkey\fP are concatenated together with an underscore, and transformed to upper-case. For example, the configuration variable \fIFOO_BAZ_BAR\fP refers to an ini-file entry as follows: + +.EX +[foo] +bar_baz = xyzzy +.EE + +In the \fBENVIRONMENT\fP section below, the relevant configuration settings for this tool is listed along with a short description of its meaning. + +Some configuration settings may also be overriden by command line options. Also note that the use of the \fB-n\fP and \fB--env-prefix\fP options affect how environment and configuration is read. The effects of options on how configuration settings are affective is described in the respective \fBOPTIONS\fP section. + +.SH MODES + +The modes parameter specifies what kind of operaion the encoding should be generated for. There are three valid modes: + +.SS tx +Generates a transaction that changes state. Used with \fB--format\fP \fIrpc\fP it will generate an \fIeth_sendRawTransaction\fP jsonrpc object. Used with \fB--format\fP \fIbin\fP it outputs signed RLP only in hexdecimal. + +.SS call +Generates a query that reads state. Used with \fB--format\fP \fIrpc\fP it will generate a \fIeth_call\fP jsonrpc object with applicable fields filled out from environment, arguments and/or rpc retrieval. \fB--format\fP \fIbin\fP is not valid for this mode. + +.SS arg +Encodes the argument part only, optionally with a method signature. \fB--format\fP \fIrpc\fP is not valid for this mode. + +.SH SPECIFYING VALUES +Dynamic value types are not yet supported. + +.SS Specifying an unsigned integer: +.IP u:1024 + +.SS Specifying an address: +.IP a:19062190B1925b5b6689D7073fDfC8c2976EF8Cb + +.SS Specifying bytes values: + +.IP b:deadbeef +.IP b4:deadbeef +.IP b32:deadbeef + +.SS Specifying a string value: + +.IP s:foobar +.SH EXAMPLES + +.SS Build a signed ERC20 transfer in wire format, setting nonce and fee details manually. +.EX +$ eth-encode -f bin -y <\fIkey_file_path\fP> -e <\fItoken_address\fP> --fee-price 1000000000 --fee-limit 100000 --nonce 42 --signature transfer a:00000000000000000000000000000000DeaDBeef u:1024 +.EE + +.SS Build Smart contract call with method signature, retrieving fee and nonce settings from rpc + +\fBeth-encode\fP --mode call -f rpc -e <\fItoken_address\fP> --signature balanceOf -p <\fIrpc_endpoint\fP> a:deadbeef + +.SS Build smart contract ERC20 transfer argument with signature +.EX +\fBeth-encode\fP --mode arg --signature transfer a:00000000000000000000000000000000DeaDBeef u:1024 +.TP Outupt +a9059cbb00000000000000000000000000000000000000000000000000000000deadbeef0000000000000000000000000000000000000000000000000000000000000400 +.EE + +.SS Build smart contract ERC20 transfer argument types without signature +.EX +\fBeth-encode\fP --mode arg a:00000000000000000000000000000000DeaDBeef u:1024 +.TP Output +00000000000000000000000000000000000000000000000000000000deadbeef0000000000000000000000000000000000000000000000000000000000000400 +.EE +.SH ENVIRONMENT + + +.TP +\fICHAIN_SPEC\fP +String specifying the type of chain connected to, in the format \fI<engine>:<fork>:<network_id>:<common_name>\fP. For EVM nodes the \fIengine\fP value will always be \fIevm\fP. + +.TP +\fIRPC_AUTH\fP +Authentication method to use for the \fIRPC_PROVIDER\fP. Currently only \fIbasic\fP is supported. + +.TP +\fIRPC_CREDENTIALS\fP +Authentication credentials to use for \fIRPC_AUTH\fP. For \fIbasic\fP authentication the value must be given as \fI<user>:<pass>\fP. + +.TP +\fIRPC_DIALECT\fP +Enables translations of EVM node specific formatting and response codes. + +.TP +\fIRPC_PROVIDER\fP +Fully-qualified URL to the RPC endpoint of the blockchain node. + +.TP +\fIWALLET_KEY_FILE\fP +The wallet key file containing private key to use for transaction signing. Overridden by \fB-y\fP. + +.TP +\fIWALLET_PASSPHRASE\fP +Passphrase to unlock wallet. \fBWARNING:\fP it is \fBunsafe\fP to pass the passphrase as an environment variable. If the key unlocks something of value, the passphrase should rather be in a configuration file, preferably as an encrypted entry. Alternatively, a passphrase can be read from file using the \fB--passphrase-file\fP option. Files containing passphrases should only be accessible by the owner. + +.SH LICENSE + +This documentation and its source is licensed under the Creative Commons Attribution-Sharealike 4.0 International license. + +The source code of the tool this documentation describes is licensed under the GNU General Public License 3.0. + +.SH COPYRIGHT + +Louis Holbrook <dev@holbrook.no> (https://holbrook.no) +PGP: 59A844A484AC11253D3A3E9DCDCBD24DD1D0E001 + + + +.SH SOURCE CODE + +https://git.defalsify.org + + +.SH SEE ALSO + +.BP +confini-dump(1), eth-keyfile(1) + diff --git a/man/build/eth-gas.1 b/man/build/eth-gas.1 @@ -0,0 +1,277 @@ +.TH eth-gas 1 +.SH NAME +eth-gas - Create EVM gas token transaction +.SH SYNOPSIS +.P +\fBeth-gas\fP -a RECIPIENT -y KEYFILE [ -p \fIrpc_provider ] [ -s ] [ -u ] AMOUNT +.P +\fBeth-gas\fP -a RECIPIENT -y KEYFILE [ --fee-price PRICE ] [ --fee-limit LIMIT ] [ --nonce NONCE ] [ -s ] [ -u ] AMOUNT +.SH DESCRIPTION +\fBeth-gas\fP generates serialized gas token transactions in various output formats. + +If an \fIrpc_provider\fP is available, the valuess \fIfee_price\fP and \fInonce\fP will be automatically retrieved if they are not explicitly specified. If missing values cannot be retrieved, an error will occur. + +Providing all arguments enables fully offline creation of the transaction. + +See \fBEXAMPLES\fP for more details on inputs and outputs. + + +.SS OPTIONS + +.TP +\fB-0\fP +Omit newline to output + +.TP +\fB-a\fP, \fB--recipient-address\fP +Beneficiary of the gas token transaction. + + +.TP +\fB-c \fI\fIconfig_dir\fP\fP, \fB--config \fI\fIconfig_dir\fP\fP +Load configuration files from given directory. All files with an .ini extension will be loaded, of which all must contain valid ini file data. + +.TP +\fB--dumpconfig \fI\fIformat\fP\fP +Output configuration settings rendered from environment and inputs. Valid arguments are \fIini\fP for ini file output, and \fIenv\fP for environment variable output. See \fBCONFIGURATION\fP. + +.TP +\fB--env-prefix\fP +Environment prefix for variables to overwrite configuration. Example: If \fB--env-prefix\fP is set to \fBFOO\fP then configuration variable \fBBAR_BAZ\fP would be set by environment variable \fBFOO_BAZ_BAR\fP. Also see \fBENVIRONMENT\fP. + +.TP +\fB--fee-limit\fP +Set the limit of execution units for the transaction. If used with \fB-s\fP this may incur actual network token cost. If \fB--fee-price\fP is not explicitly set, the price \fImay\fP be retrieved from the network, and multiplied with this value to define the cost. + +.TP +\fB--fee-price\fP +Set fee unit price to offer for the transaction. If used with \fB-s\fP this may incur actual network token cost. + +.TP +\fB--height\fP +Block height at which to query state for. Does not apply to transactions. + +.TP +\fB-i \fI\fIchain_spec\fP\fP, \fB--chain-spec \fI\fIchain_spec\fP\fP +Chain specification string, in the format <engine>:<fork>:<chain_id>:<common_name>. Example: "evm:london:1:ethereum". Overrides the \fIRPC_CREDENTIALS\fP configuration setting. + +.TP +\fB-n \fI\fInamespace\fP\fP, \fB--namespace \fI\fInamespace\fP\fP +Load given configuration namespace. Configuration will be loaded from the immediate configuration subdirectory with the same name. + +.TP +\fB--no-logs\fP +Turn of logging completely. Negates \fB-v\fP and \fB-vv\fP + +.TP +\fB--nonce\fP +Explicitly set nonce to use for transaction. + +.TP +\fB-p\fP, \fB--rpc-provider\fP +Fully-qualified URL of RPC provider. Overrides the \fIRPC_PROVIDER\fP configuration setting. + +.TP +\fB--passphrase-file \fI\fIpath\fP\fP +Path to file containing password to unlock key file + +.TP +\fB--raw\fP +Produce output most optimized for machines. + +.TP +\fB--rpc-auth\fP +RPC endpoint authentication method, e.g. how to handle a HTTP WWW-Authenticate header. Overrides the \fIRPC_AUTH\fP configuration setting. + +.TP +\fB--rpc-credentials\fP +RPC endpoint authentication data. Format depends on the authentication method defined in \fB--rpc-auth\fP. Overrides the \fIRPC_CREDENTIALS\fP configuration setting. + +.TP +\fB--rpc-dialect\fP +RPC backend dialect. If specified it \fImay\fP help with encoding and decoding issues. Overrides the \fIRPC_DIALECT\fP configuration setting. + +.TP +\fB-s\fP +Send to network. If set, network state may change. This means tokens may be spent and so on. Use with care. Only applies to transactions. + +.TP +\fB--seq\fP +Use numeric sequencial jsonrpc query ids. Useful for buggy server implementations who expects such. + +.TP +\fB--total\fP +Deduct calculated fee from value. + +.TP +\fB-u\fP, \fB--unsafe\fP +Allow addresses that do not pass checksum. + +.TP +\fB-v\fP +Verbose. Show logs for important state changes. + +.TP +\fB-vv\fP +Very verbose. Show logs with debugging information. + +.TP +\fB-w\fP +Wait for the last transaction to be confirmed on the network. Will generate an error if the EVM execution fails. + +.TP +\fB-ww\fP +Wait for \fIall\fP transactions sequentially to be confirmed on the network. Will generate an error if EVM execution fails for any of the transactions. + +.TP +\fB-y \fI\fIpath\fP\fP, \fB--key-path \fI\fIpath\fP\fP +Path to signing key. Overrides the \fIWALLET_KEY_FILE\fP configuration setting. + +.SH CONFIGURATION + +All configuration settings may be overriden both by environment variables, or by overriding settings with the contents of ini-files in the directory defined by the \fB-c\fP option. + +The active configuration, with values assigned from environment and arguments, can be output using the \fB--dumpconfig\fP \fIformat\fP option. Note that entries having keys prefixed with underscore (e.g. _SEQ) are not actual configuration settings, and thus cannot be overridden with environment variables. + +To refer to a configuration setting by environment variables, the \fIsection\fP and \fIkey\fP are concatenated together with an underscore, and transformed to upper-case. For example, the configuration variable \fIFOO_BAZ_BAR\fP refers to an ini-file entry as follows: + +.EX +[foo] +bar_baz = xyzzy +.EE + +In the \fBENVIRONMENT\fP section below, the relevant configuration settings for this tool is listed along with a short description of its meaning. + +Some configuration settings may also be overriden by command line options. Also note that the use of the \fB-n\fP and \fB--env-prefix\fP options affect how environment and configuration is read. The effects of options on how configuration settings are affective is described in the respective \fBOPTIONS\fP section. + +.SH EXAMPLES + +.P +In the follwing we willconsaider transactions signed by the private key for address Eb3907eCad74a0013c259D5874AE7f22DcBcC95C: + +.SS Offline transaction + +.EX +$ eth-gas -y <\fIkey_file_path\fP> -a 00000000000000000000000000000000DeaDBeef --fee-price 100000000000 --fee-limit 21000 --nonce 42 1024 +from: Eb3907eCad74a0013c259D5874AE7f22DcBcC95C +to: 00000000000000000000000000000000DeaDBeef +nonce: 42 +gasPrice: 100000000000 (100 gwei) +gas: 21000 +value: 1024 (0.000000000000001024 eth) +data: 0x +v: 37 +recovery_byte: 0 +r: 0x0c97432d4db724e66a56f7ced04174cf6129e2555709f206dd6d3a156b4af23a +s: 0x287862548314a59c7ca6139eee8b51400eb40a67b08b8dc13d67302abecccae0 +chainId: 1 +hash: 0x003030af05460633e85b16fff7a17607818dc67e58f89396e5491ad6f5438971 +hash_unsigned: 0xa59cf9e5438b186de381892b7879ce66476d5469478c7148880da5d553ade651 +src: 0xf8662a85174876e8008252089400000000000000000000000000000000deadbeef8204008025a00c97432d4db724e66a56f7ced04174cf6129e2555709f206dd6d3a156b4af23aa0287862548314a59c7ca6139eee8b51400eb40a67b08b8dc13d67302abecccae0 +.EE + +.SS Offline transaction with arbitrary data + +.EX +$ eth-gas -y <\fIkey_file_path\fP> -a 00000000000000000000000000000000DeaDBeef --fee-price 100000000000 --fee-limit 21000 --nonce 42 --data 0x2a 1024 +from: Eb3907eCad74a0013c259D5874AE7f22DcBcC95C +to: 00000000000000000000000000000000DeaDBeef +nonce: 42 +gasPrice: 100000000000 (100 gwei) +gas: 21000 +value: 1024 (0.000000000000001024 eth) +data: 0x2a +v: 37 +recovery_byte: 0 +r: 0x800b6982d3f178201d7e7e7693b9c90b3fbcd54d04b6fff5284c81101fad54dd +s: 0x3b86d710d31ac74b58f0040b0f51fdb6bdbabea62a68cf99c05e765e7e81de87 +chainId: 1 +hash: 0xede30052befd80760c5ab543babdccc3d97fe90523e5710d77220155a82faa47 +hash_unsigned: 0xad82d8cf1a412541c8a94ef71c50e9172c3a37853af036adee2f55c577da9770 +src: 0xf8662a85174876e8008252089400000000000000000000000000000000deadbeef8204002a25a0800b6982d3f178201d7e7e7693b9c90b3fbcd54d04b6fff5284c81101fad54dda03b86d710d31ac74b58f0040b0f51fdb6bdbabea62a68cf99c05e765e7e81de87 +.EE + +.SS Offline transaction with wire-format output + +.EX +$ eth-gas -y <\fIkey_file_path\fP> -a 00000000000000000000000000000000DeaDBeef --fee-price 100000000000 --fee-limit 21000 --nonce 42 --raw 1024 +0xf8662a85174876e8008252089400000000000000000000000000000000deadbeef8204008025a00c97432d4db724e66a56f7ced04174cf6129e2555709f206dd6d3a156b4af23aa0287862548314a59c7ca6139eee8b51400eb40a67b08b8dc13d67302abecccae0 +.EE + +.SS Sign transaction for a different network + +.EX +$ 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 +to: 00000000000000000000000000000000DeaDBeef +nonce: 42 +gasPrice: 100000000000 (100 gwei) +gas: 21000 +value: 1024 (0.000000000000001024 eth) +data: 0x2a +v: 41 +recovery_byte: 0 +r: 0xe522c25784111a512cbf46f883e3bdacffc2cdbd465fa1042892c28fc10ee054 +s: 0x5f84eb51a0c9871cfcedaba4e6274b300014899b3a2fec9292de6fe5919bcd07 +chainId: 3 +hash: 0x771200a20072294a6a843b89b98d5f868c9aa94da75dacf6a9f5834dfd241199 +hash_unsigned: 0xa5f9e8a5cda6985d81f4129955b7529f48ecb54728badac16ec550384e3a2bcc +src: 0xf8662a85174876e8008252089400000000000000000000000000000000deadbeef8204002a29a0e522c25784111a512cbf46f883e3bdacffc2cdbd465fa1042892c28fc10ee054a05f84eb51a0c9871cfcedaba4e6274b300014899b3a2fec9292de6fe5919bcd07 +.EE + +.P +The wire-format can in turn be decoded using the \fBeth-decode\fP tool) +.SH ENVIRONMENT + + +.TP +\fICHAIN_SPEC\fP +String specifying the type of chain connected to, in the format \fI<engine>:<fork>:<network_id>:<common_name>\fP. For EVM nodes the \fIengine\fP value will always be \fIevm\fP. + +.TP +\fIRPC_AUTH\fP +Authentication method to use for the \fIRPC_PROVIDER\fP. Currently only \fIbasic\fP is supported. + +.TP +\fIRPC_CREDENTIALS\fP +Authentication credentials to use for \fIRPC_AUTH\fP. For \fIbasic\fP authentication the value must be given as \fI<user>:<pass>\fP. + +.TP +\fIRPC_DIALECT\fP +Enables translations of EVM node specific formatting and response codes. + +.TP +\fIRPC_PROVIDER\fP +Fully-qualified URL to the RPC endpoint of the blockchain node. + +.TP +\fIWALLET_KEY_FILE\fP +The wallet key file containing private key to use for transaction signing. Overridden by \fB-y\fP. + +.TP +\fIWALLET_PASSPHRASE\fP +Passphrase to unlock wallet. \fBWARNING:\fP it is \fBunsafe\fP to pass the passphrase as an environment variable. If the key unlocks something of value, the passphrase should rather be in a configuration file, preferably as an encrypted entry. Alternatively, a passphrase can be read from file using the \fB--passphrase-file\fP option. Files containing passphrases should only be accessible by the owner. + +.SH LICENSE + +This documentation and its source is licensed under the Creative Commons Attribution-Sharealike 4.0 International license. + +The source code of the tool this documentation describes is licensed under the GNU General Public License 3.0. + +.SH COPYRIGHT + +Louis Holbrook <dev@holbrook.no> (https://holbrook.no) +PGP: 59A844A484AC11253D3A3E9DCDCBD24DD1D0E001 + + + +.SH SOURCE CODE + +https://git.defalsify.org + + +.SH SEE ALSO + +.BP +confini-dump(1), eth-keyfile(1) + diff --git a/man/build/eth-get.1 b/man/build/eth-get.1 @@ -0,0 +1,131 @@ +.TH eth-get 1 + +.SH NAME +eth-get \- Retrieve transaction and transaction state from network + +.SH SYNOPSIS +.PP +\fBeth-get\fP [ -p \fIrpc_provider\fP] \fItx_hash\fP +.PP +\fBeth-get\fP [ -p \fIrpc_provider\fP] \fIaddress\fP + +.SH DESCRIPTION +.P +Retrieve a transaction by its transaction hash, or contract code by its address. +.P +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. + + +.SS OPTIONS + +.TP +\fB-0\fP +Omit newline to output + +.TP +\fB-c \fI\fIconfig_dir\fP\fP, \fB--config \fI\fIconfig_dir\fP\fP +Load configuration files from given directory. All files with an .ini extension will be loaded, of which all must contain valid ini file data. + +.TP +\fB--dumpconfig \fI\fIformat\fP\fP +Output configuration settings rendered from environment and inputs. Valid arguments are \fIini\fP for ini file output, and \fIenv\fP for environment variable output. See \fBCONFIGURATION\fP. + +.TP +\fB--env-prefix\fP +Environment prefix for variables to overwrite configuration. Example: If \fB--env-prefix\fP is set to \fBFOO\fP then configuration variable \fBBAR_BAZ\fP would be set by environment variable \fBFOO_BAZ_BAR\fP. Also see \fBENVIRONMENT\fP. + +.TP +\fB--height\fP +Block height at which to query state for. Does not apply to transactions. + +.TP +\fB-n \fI\fInamespace\fP\fP, \fB--namespace \fI\fInamespace\fP\fP +Load given configuration namespace. Configuration will be loaded from the immediate configuration subdirectory with the same name. + +.TP +\fB--no-logs\fP +Turn of logging completely. Negates \fB-v\fP and \fB-vv\fP + +.TP +\fB-o\fP, \fB--output-key\fP +Include output by key name + +.TP +\fB-p\fP, \fB--rpc-provider\fP +Fully-qualified URL of RPC provider. Overrides the \fIRPC_PROVIDER\fP configuration setting. + +.TP +\fB--raw\fP +Produce output most optimized for machines. + +.TP +\fB--rpc-dialect\fP +RPC backend dialect. If specified it \fImay\fP help with encoding and decoding issues. Overrides the \fIRPC_DIALECT\fP configuration setting. + +.TP +\fB--seq\fP +Use numeric sequencial jsonrpc query ids. Useful for buggy server implementations who expects such. + +.TP +\fB-u\fP, \fB--unsafe\fP +Allow addresses that do not pass checksum. + +.TP +\fB-v\fP +Verbose. Show logs for important state changes. + +.TP +\fB-vv\fP +Very verbose. Show logs with debugging information. + +.SH CONFIGURATION + +All configuration settings may be overriden both by environment variables, or by overriding settings with the contents of ini-files in the directory defined by the \fB-c\fP option. + +The active configuration, with values assigned from environment and arguments, can be output using the \fB--dumpconfig\fP \fIformat\fP option. Note that entries having keys prefixed with underscore (e.g. _SEQ) are not actual configuration settings, and thus cannot be overridden with environment variables. + +To refer to a configuration setting by environment variables, the \fIsection\fP and \fIkey\fP are concatenated together with an underscore, and transformed to upper-case. For example, the configuration variable \fIFOO_BAZ_BAR\fP refers to an ini-file entry as follows: + +.EX +[foo] +bar_baz = xyzzy +.EE + +In the \fBENVIRONMENT\fP section below, the relevant configuration settings for this tool is listed along with a short description of its meaning. + +Some configuration settings may also be overriden by command line options. Also note that the use of the \fB-n\fP and \fB--env-prefix\fP options affect how environment and configuration is read. The effects of options on how configuration settings are affective is described in the respective \fBOPTIONS\fP section. + +.SH ENVIRONMENT + + +.TP +\fIRPC_DIALECT\fP +Enables translations of EVM node specific formatting and response codes. + +.TP +\fIRPC_PROVIDER\fP +Fully-qualified URL to the RPC endpoint of the blockchain node. + +.SH LICENSE + +This documentation and its source is licensed under the Creative Commons Attribution-Sharealike 4.0 International license. + +The source code of the tool this documentation describes is licensed under the GNU General Public License 3.0. + +.SH COPYRIGHT + +Louis Holbrook <dev@holbrook.no> (https://holbrook.no) +PGP: 59A844A484AC11253D3A3E9DCDCBD24DD1D0E001 + + + +.SH SOURCE CODE + +https://git.defalsify.org + + +.SH SEE ALSO + +.BP +confini-dump(1), eth-keyfile(1) + diff --git a/man/build/eth-info.1 b/man/build/eth-info.1 @@ -0,0 +1,135 @@ +.TH eth-info 1 + +.SH NAME +eth-info - Return key metrics from the current state of the EVM network. + +.SH SYNOPSIS +\fBeth-info\fP [ -p \fIrpc_provider\fP ] [ \fIkey\fP ] + +.SH DESCRIPTION +\fBeth-info\fP reports statistics from the current state of the EVM network: + +.EX +$ eth-info +Block: 1024478 +Gas price: 1000000000 +.EE + +An individual data item may be specified using the \fIkey\fP positional argument: + +.EX +$ eth-info block +Block: 1024478 +$ eth-info --raw gas_price +1000000000 +.EE + +.SS OPTIONS + +.TP +\fB-0\fP +Omit newline to output + +.TP +\fB-c \fI\fIconfig_dir\fP\fP, \fB--config \fI\fIconfig_dir\fP\fP +Load configuration files from given directory. All files with an .ini extension will be loaded, of which all must contain valid ini file data. + +.TP +\fB--dumpconfig \fI\fIformat\fP\fP +Output configuration settings rendered from environment and inputs. Valid arguments are \fIini\fP for ini file output, and \fIenv\fP for environment variable output. See \fBCONFIGURATION\fP. + +.TP +\fB--env-prefix\fP +Environment prefix for variables to overwrite configuration. Example: If \fB--env-prefix\fP is set to \fBFOO\fP then configuration variable \fBBAR_BAZ\fP would be set by environment variable \fBFOO_BAZ_BAR\fP. Also see \fBENVIRONMENT\fP. + +.TP +\fB--height\fP +Block height at which to query state for. Does not apply to transactions. + +.TP +\fB-n \fI\fInamespace\fP\fP, \fB--namespace \fI\fInamespace\fP\fP +Load given configuration namespace. Configuration will be loaded from the immediate configuration subdirectory with the same name. + +.TP +\fB--no-logs\fP +Turn of logging completely. Negates \fB-v\fP and \fB-vv\fP + +.TP +\fB-p\fP, \fB--rpc-provider\fP +Fully-qualified URL of RPC provider. Overrides the \fIRPC_PROVIDER\fP configuration setting. + +.TP +\fB--raw\fP +Produce output most optimized for machines. + +.TP +\fB--rpc-dialect\fP +RPC backend dialect. If specified it \fImay\fP help with encoding and decoding issues. Overrides the \fIRPC_DIALECT\fP configuration setting. + +.TP +\fB--seq\fP +Use numeric sequencial jsonrpc query ids. Useful for buggy server implementations who expects such. + +.TP +\fB-u\fP, \fB--unsafe\fP +Allow addresses that do not pass checksum. + +.TP +\fB-v\fP +Verbose. Show logs for important state changes. + +.TP +\fB-vv\fP +Very verbose. Show logs with debugging information. + +.SH CONFIGURATION + +All configuration settings may be overriden both by environment variables, or by overriding settings with the contents of ini-files in the directory defined by the \fB-c\fP option. + +The active configuration, with values assigned from environment and arguments, can be output using the \fB--dumpconfig\fP \fIformat\fP option. Note that entries having keys prefixed with underscore (e.g. _SEQ) are not actual configuration settings, and thus cannot be overridden with environment variables. + +To refer to a configuration setting by environment variables, the \fIsection\fP and \fIkey\fP are concatenated together with an underscore, and transformed to upper-case. For example, the configuration variable \fIFOO_BAZ_BAR\fP refers to an ini-file entry as follows: + +.EX +[foo] +bar_baz = xyzzy +.EE + +In the \fBENVIRONMENT\fP section below, the relevant configuration settings for this tool is listed along with a short description of its meaning. + +Some configuration settings may also be overriden by command line options. Also note that the use of the \fB-n\fP and \fB--env-prefix\fP options affect how environment and configuration is read. The effects of options on how configuration settings are affective is described in the respective \fBOPTIONS\fP section. + +.SH ENVIRONMENT + + +.TP +\fIRPC_DIALECT\fP +Enables translations of EVM node specific formatting and response codes. + +.TP +\fIRPC_PROVIDER\fP +Fully-qualified URL to the RPC endpoint of the blockchain node. + +.SH LICENSE + +This documentation and its source is licensed under the Creative Commons Attribution-Sharealike 4.0 International license. + +The source code of the tool this documentation describes is licensed under the GNU General Public License 3.0. + +.SH COPYRIGHT + +Louis Holbrook <dev@holbrook.no> (https://holbrook.no) +PGP: 59A844A484AC11253D3A3E9DCDCBD24DD1D0E001 + + + +.SH SOURCE CODE + +https://git.defalsify.org + + +.SH SEE ALSO + +.BP +confini-dump(1), eth-keyfile(1) + diff --git a/man/build/eth-raw.1 b/man/build/eth-raw.1 @@ -0,0 +1,210 @@ +.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 + +.TP +\fB-0\fP +Omit newline to output + +.TP +\fB-c \fI\fIconfig_dir\fP\fP, \fB--config \fI\fIconfig_dir\fP\fP +Load configuration files from given directory. All files with an .ini extension will be loaded, of which all must contain valid ini file data. + +.TP +\fB--dumpconfig \fI\fIformat\fP\fP +Output configuration settings rendered from environment and inputs. Valid arguments are \fIini\fP for ini file output, and \fIenv\fP for environment variable output. See \fBCONFIGURATION\fP. + +.TP +\fB-e\fP, \fB--executable-address\fP +Address of an executable code point on the network. + +.TP +\fB--env-prefix\fP +Environment prefix for variables to overwrite configuration. Example: If \fB--env-prefix\fP is set to \fBFOO\fP then configuration variable \fBBAR_BAZ\fP would be set by environment variable \fBFOO_BAZ_BAR\fP. Also see \fBENVIRONMENT\fP. + +.TP +\fB--fee-limit\fP +Set the limit of execution units for the transaction. If used with \fB-s\fP this may incur actual network token cost. If \fB--fee-price\fP is not explicitly set, the price \fImay\fP be retrieved from the network, and multiplied with this value to define the cost. + +.TP +\fB--fee-price\fP +Set fee unit price to offer for the transaction. If used with \fB-s\fP this may incur actual network token cost. + +.TP +\fB--height\fP +Block height at which to query state for. Does not apply to transactions. + +.TP +\fB-i \fI\fIchain_spec\fP\fP, \fB--chain-spec \fI\fIchain_spec\fP\fP +Chain specification string, in the format <engine>:<fork>:<chain_id>:<common_name>. Example: "evm:london:1:ethereum". Overrides the \fIRPC_CREDENTIALS\fP configuration setting. + +.TP +\fB-n \fI\fInamespace\fP\fP, \fB--namespace \fI\fInamespace\fP\fP +Load given configuration namespace. Configuration will be loaded from the immediate configuration subdirectory with the same name. + +.TP +\fB--no-logs\fP +Turn of logging completely. Negates \fB-v\fP and \fB-vv\fP + +.TP +\fB--nonce\fP +Explicitly set nonce to use for transaction. + +.TP +\fB-p\fP, \fB--rpc-provider\fP +Fully-qualified URL of RPC provider. Overrides the \fIRPC_PROVIDER\fP configuration setting. + +.TP +\fB--passphrase-file \fI\fIpath\fP\fP +Path to file containing password to unlock key file + +.TP +\fB--raw\fP +Produce output most optimized for machines. + +.TP +\fB--rpc-auth\fP +RPC endpoint authentication method, e.g. how to handle a HTTP WWW-Authenticate header. Overrides the \fIRPC_AUTH\fP configuration setting. + +.TP +\fB--rpc-credentials\fP +RPC endpoint authentication data. Format depends on the authentication method defined in \fB--rpc-auth\fP. Overrides the \fIRPC_CREDENTIALS\fP configuration setting. + +.TP +\fB--rpc-dialect\fP +RPC backend dialect. If specified it \fImay\fP help with encoding and decoding issues. Overrides the \fIRPC_DIALECT\fP configuration setting. + +.TP +\fB-s\fP +Send to network. If set, network state may change. This means tokens may be spent and so on. Use with care. Only applies to transactions. + +.TP +\fB--seq\fP +Use numeric sequencial jsonrpc query ids. Useful for buggy server implementations who expects such. + +.TP +\fB-u\fP, \fB--unsafe\fP +Allow addresses that do not pass checksum. + +.TP +\fB-v\fP +Verbose. Show logs for important state changes. + +.TP +\fB-vv\fP +Very verbose. Show logs with debugging information. + +.TP +\fB-w\fP +Wait for the last transaction to be confirmed on the network. Will generate an error if the EVM execution fails. + +.TP +\fB-ww\fP +Wait for \fIall\fP transactions sequentially to be confirmed on the network. Will generate an error if EVM execution fails for any of the transactions. + +.TP +\fB-y \fI\fIpath\fP\fP, \fB--key-path \fI\fIpath\fP\fP +Path to signing key. Overrides the \fIWALLET_KEY_FILE\fP configuration setting. + +.SH CONFIGURATION + +All configuration settings may be overriden both by environment variables, or by overriding settings with the contents of ini-files in the directory defined by the \fB-c\fP option. + +The active configuration, with values assigned from environment and arguments, can be output using the \fB--dumpconfig\fP \fIformat\fP option. Note that entries having keys prefixed with underscore (e.g. _SEQ) are not actual configuration settings, and thus cannot be overridden with environment variables. + +To refer to a configuration setting by environment variables, the \fIsection\fP and \fIkey\fP are concatenated together with an underscore, and transformed to upper-case. For example, the configuration variable \fIFOO_BAZ_BAR\fP refers to an ini-file entry as follows: + +.EX +[foo] +bar_baz = xyzzy +.EE + +In the \fBENVIRONMENT\fP section below, the relevant configuration settings for this tool is listed along with a short description of its meaning. + +Some configuration settings may also be overriden by command line options. Also note that the use of the \fB-n\fP and \fB--env-prefix\fP options affect how environment and configuration is read. The effects of options on how configuration settings are affective is described in the respective \fBOPTIONS\fP section. + +.SH EXAMPLES + +.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 +.SH ENVIRONMENT + + +.TP +\fICHAIN_SPEC\fP +String specifying the type of chain connected to, in the format \fI<engine>:<fork>:<network_id>:<common_name>\fP. For EVM nodes the \fIengine\fP value will always be \fIevm\fP. + +.TP +\fIRPC_AUTH\fP +Authentication method to use for the \fIRPC_PROVIDER\fP. Currently only \fIbasic\fP is supported. + +.TP +\fIRPC_CREDENTIALS\fP +Authentication credentials to use for \fIRPC_AUTH\fP. For \fIbasic\fP authentication the value must be given as \fI<user>:<pass>\fP. + +.TP +\fIRPC_DIALECT\fP +Enables translations of EVM node specific formatting and response codes. + +.TP +\fIRPC_PROVIDER\fP +Fully-qualified URL to the RPC endpoint of the blockchain node. + +.TP +\fIWALLET_KEY_FILE\fP +The wallet key file containing private key to use for transaction signing. Overridden by \fB-y\fP. + +.TP +\fIWALLET_PASSPHRASE\fP +Passphrase to unlock wallet. \fBWARNING:\fP it is \fBunsafe\fP to pass the passphrase as an environment variable. If the key unlocks something of value, the passphrase should rather be in a configuration file, preferably as an encrypted entry. Alternatively, a passphrase can be read from file using the \fB--passphrase-file\fP option. Files containing passphrases should only be accessible by the owner. + +.SH LICENSE + +This documentation and its source is licensed under the Creative Commons Attribution-Sharealike 4.0 International license. + +The source code of the tool this documentation describes is licensed under the GNU General Public License 3.0. + +.SH COPYRIGHT + +Louis Holbrook <dev@holbrook.no> (https://holbrook.no) +PGP: 59A844A484AC11253D3A3E9DCDCBD24DD1D0E001 + + + +.SH SOURCE CODE + +https://git.defalsify.org + +.SH SEE ALSO + +.BP +confini-dump(1), eth-keyfile(1), eth-encode(1), eth-gas(1) diff --git a/man/build/eth-wait.1 b/man/build/eth-wait.1 @@ -0,0 +1,143 @@ +.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 + +.TP +\fB-c \fI\fIconfig_dir\fP\fP, \fB--config \fI\fIconfig_dir\fP\fP +Load configuration files from given directory. All files with an .ini extension will be loaded, of which all must contain valid ini file data. + +.TP +\fB--dumpconfig \fI\fIformat\fP\fP +Output configuration settings rendered from environment and inputs. Valid arguments are \fIini\fP for ini file output, and \fIenv\fP for environment variable output. See \fBCONFIGURATION\fP. + +.TP +\fB--env-prefix\fP +Environment prefix for variables to overwrite configuration. Example: If \fB--env-prefix\fP is set to \fBFOO\fP then configuration variable \fBBAR_BAZ\fP would be set by environment variable \fBFOO_BAZ_BAR\fP. Also see \fBENVIRONMENT\fP. + +.TP +\fB--height\fP +Block height at which to query state for. Does not apply to transactions. + +.TP +\fB--ignore \fI\fItx_hash +\fP\fP +Ignore error from the specified transaction. May be defined more than once. + +.TP +\fB--ignore-all \fI\fI +\fP\fP +Ignore errors from all transactions. + +.TP +\fB-n \fI\fInamespace\fP\fP, \fB--namespace \fI\fInamespace\fP\fP +Load given configuration namespace. Configuration will be loaded from the immediate configuration subdirectory with the same name. + +.TP +\fB--no-logs\fP +Turn of logging completely. Negates \fB-v\fP and \fB-vv\fP + +.TP +\fB-p\fP, \fB--rpc-provider\fP +Fully-qualified URL of RPC provider. Overrides the \fIRPC_PROVIDER\fP configuration setting. + +.TP +\fB--rpc-auth\fP +RPC endpoint authentication method, e.g. how to handle a HTTP WWW-Authenticate header. Overrides the \fIRPC_AUTH\fP configuration setting. + +.TP +\fB--rpc-credentials\fP +RPC endpoint authentication data. Format depends on the authentication method defined in \fB--rpc-auth\fP. Overrides the \fIRPC_CREDENTIALS\fP configuration setting. + +.TP +\fB--rpc-dialect\fP +RPC backend dialect. If specified it \fImay\fP help with encoding and decoding issues. Overrides the \fIRPC_DIALECT\fP configuration setting. + +.TP +\fB--seq\fP +Use numeric sequencial jsonrpc query ids. Useful for buggy server implementations who expects such. + +.TP +\fB-u\fP, \fB--unsafe\fP +Allow addresses that do not pass checksum. + +.TP +\fB-v\fP +Verbose. Show logs for important state changes. + +.TP +\fB-vv\fP +Very verbose. Show logs with debugging information. + +.SH CONFIGURATION + +All configuration settings may be overriden both by environment variables, or by overriding settings with the contents of ini-files in the directory defined by the \fB-c\fP option. + +The active configuration, with values assigned from environment and arguments, can be output using the \fB--dumpconfig\fP \fIformat\fP option. Note that entries having keys prefixed with underscore (e.g. _SEQ) are not actual configuration settings, and thus cannot be overridden with environment variables. + +To refer to a configuration setting by environment variables, the \fIsection\fP and \fIkey\fP are concatenated together with an underscore, and transformed to upper-case. For example, the configuration variable \fIFOO_BAZ_BAR\fP refers to an ini-file entry as follows: + +.EX +[foo] +bar_baz = xyzzy +.EE + +In the \fBENVIRONMENT\fP section below, the relevant configuration settings for this tool is listed along with a short description of its meaning. + +Some configuration settings may also be overriden by command line options. Also note that the use of the \fB-n\fP and \fB--env-prefix\fP options affect how environment and configuration is read. The effects of options on how configuration settings are affective is described in the respective \fBOPTIONS\fP section. + +.SH ENVIRONMENT + + +.TP +\fIRPC_AUTH\fP +Authentication method to use for the \fIRPC_PROVIDER\fP. Currently only \fIbasic\fP is supported. + +.TP +\fIRPC_CREDENTIALS\fP +Authentication credentials to use for \fIRPC_AUTH\fP. For \fIbasic\fP authentication the value must be given as \fI<user>:<pass>\fP. + +.TP +\fIRPC_DIALECT\fP +Enables translations of EVM node specific formatting and response codes. + +.TP +\fIRPC_PROVIDER\fP +Fully-qualified URL to the RPC endpoint of the blockchain node. + +.SH LICENSE + +This documentation and its source is licensed under the Creative Commons Attribution-Sharealike 4.0 International license. + +The source code of the tool this documentation describes is licensed under the GNU General Public License 3.0. + +.SH COPYRIGHT + +Louis Holbrook <dev@holbrook.no> (https://holbrook.no) +PGP: 59A844A484AC11253D3A3E9DCDCBD24DD1D0E001 + + + +.SH SOURCE CODE + +https://git.defalsify.org + + +.SH SEE ALSO + +.BP +confini-dump(1), eth-keyfile(1) + diff --git a/setup.cfg b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = chainlib-eth -version = 0.4.20 +version = 0.4.21 description = Ethereum implementation of the chainlib interface author = Louis Holbrook author_email = dev@holbrook.no diff --git a/setup.py b/setup.py @@ -20,8 +20,23 @@ while True: test_requirements.append(l.rstrip()) f.close() +man_dir = 'man/build' +mans = [ + 'eth-balance', + 'eth-count', + 'eth-decode', + 'eth-encode', + 'eth-gas', + 'eth-get', + 'eth-info', + 'eth-raw', + 'eth-wait', + ] +for i in range(len(mans)): + mans[i] = os.path.join(man_dir, mans[i] + '.1') setup( install_requires=requirements, tests_require=test_requirements, + data_files=[("man/man1", mans)], )