chainlib-eth

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

eth-gas.1 (11012B)


      1 .TH eth-gas 1
      2 .SH NAME
      3 eth-gas - Create EVM gas token transaction
      4 .SH SYNOPSIS
      5 .P
      6 \fBeth-gas\fP -a RECIPIENT -y KEYFILE [ -p \fIrpc_provider ] [ -s ] [ -u ] AMOUNT
      7 .P
      8 \fBeth-gas\fP -a RECIPIENT -y KEYFILE [ --fee-price PRICE ] [ --fee-limit LIMIT ] [ --nonce NONCE ] [ -s ] [ -u ] AMOUNT
      9 .SH DESCRIPTION
     10 \fBeth-gas\fP generates serialized gas token transactions in various output formats.
     11 
     12 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.
     13 
     14 Providing all arguments enables fully offline creation of the transaction.
     15 
     16 See \fBEXAMPLES\fP for more details on inputs and outputs.
     17 
     18 
     19 .SS OPTIONS
     20 
     21 .TP
     22 \fB-0\fP
     23 Omit newline to output
     24 
     25 .TP
     26 \fB-a\fP, \fB--recipient-address\fP
     27 Beneficiary of the gas token transaction.
     28 
     29 
     30 .TP
     31 \fB-c \fI\fIconfig_dir\fP\fP, \fB--config \fI\fIconfig_dir\fP\fP
     32 Load configuration files from given directory. All files with an .ini extension will be loaded, of which all must contain valid ini file data.
     33 
     34 .TP
     35 \fB--dumpconfig \fI\fIformat\fP\fP
     36 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.
     37 
     38 .TP
     39 \fB--env-prefix\fP
     40 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.
     41 
     42 .TP
     43 \fB--fee-limit\fP
     44 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.
     45 
     46 .TP
     47 \fB--fee-price\fP
     48 Set fee unit price to offer for the transaction. If used with \fB-s\fP this may incur actual network token cost.
     49 
     50 .TP
     51 \fB--height\fP
     52 Block height at which to query state for. Does not apply to transactions.
     53 
     54 .TP
     55 \fB-i \fI\fIchain_spec\fP\fP, \fB--chain-spec \fI\fIchain_spec\fP\fP
     56 Chain specification string, in the format <engine>:<fork>:<chain_id>:<common_name>. Example: "evm:london:1:ethereum". Overrides the \fIRPC_CREDENTIALS\fP configuration setting.
     57 
     58 .TP
     59 \fB-n \fI\fInamespace\fP\fP, \fB--namespace \fI\fInamespace\fP\fP
     60 Load given configuration namespace. Configuration will be loaded from the immediate configuration subdirectory with the same name.
     61 
     62 .TP
     63 \fB--no-logs\fP
     64 Turn of logging completely. Negates \fB-v\fP and \fB-vv\fP
     65 
     66 .TP
     67 \fB--nonce\fP
     68 Explicitly set nonce to use for transaction.
     69 
     70 .TP
     71 \fB-p\fP, \fB--rpc-provider\fP
     72 Fully-qualified URL of RPC provider. Overrides the \fIRPC_PROVIDER\fP configuration setting.
     73 
     74 .TP
     75 \fB--passphrase-file \fI\fIpath\fP\fP
     76 Path to file containing password to unlock key file
     77 
     78 .TP
     79 \fB--raw\fP
     80 Produce output most optimized for machines.
     81 
     82 .TP
     83 \fB--rpc-auth\fP
     84 RPC endpoint authentication method, e.g. how to handle a HTTP WWW-Authenticate header. Overrides the \fIRPC_AUTH\fP configuration setting.
     85 
     86 .TP
     87 \fB--rpc-credentials\fP
     88 RPC endpoint authentication data. Format depends on the authentication method defined in \fB--rpc-auth\fP. Overrides the \fIRPC_CREDENTIALS\fP configuration setting.
     89 
     90 .TP
     91 \fB--rpc-dialect\fP
     92 RPC backend dialect. If specified it \fImay\fP help with encoding and decoding issues. Overrides the \fIRPC_DIALECT\fP configuration setting.
     93 
     94 .TP
     95 \fB-s\fP
     96 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.
     97 
     98 .TP
     99 \fB--seq\fP
    100 Use numeric sequencial jsonrpc query ids. Useful for buggy server implementations who expects such.
    101 
    102 .TP
    103 \fB--total\fP
    104 Deduct calculated fee from value.
    105 
    106 .TP
    107 \fB-u\fP, \fB--unsafe\fP
    108 Allow addresses that do not pass checksum.
    109 
    110 .TP
    111 \fB-v\fP
    112 Verbose. Show logs for important state changes.
    113 
    114 .TP
    115 \fB-vv\fP
    116 Very verbose. Show logs with debugging information.
    117 
    118 .TP
    119 \fB-w\fP
    120 Wait for the last transaction to be confirmed on the network. Will generate an error if the EVM execution fails.
    121 
    122 .TP
    123 \fB-ww\fP
    124 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.
    125 
    126 .TP
    127 \fB-y \fI\fIpath\fP\fP, \fB--key-path \fI\fIpath\fP\fP
    128 Path to signing key. Overrides the \fIWALLET_KEY_FILE\fP configuration setting.
    129 
    130 .SH CONFIGURATION
    131 
    132 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.
    133 
    134 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.
    135 
    136 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:
    137 
    138 .EX
    139 [foo]
    140 bar_baz = xyzzy
    141 .EE
    142 
    143 In the \fBENVIRONMENT\fP section below, the relevant configuration settings for this tool is listed along with a short description of its meaning.
    144 
    145 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.
    146 
    147 .SH EXAMPLES
    148 
    149 .P
    150 In the follwing we willconsaider transactions signed by the private key for address Eb3907eCad74a0013c259D5874AE7f22DcBcC95C:
    151 
    152 .SS Offline transaction
    153 
    154 .EX
    155 $ eth-gas -y <\fIkey_file_path\fP> -a 00000000000000000000000000000000DeaDBeef --fee-price 100000000000 --fee-limit 21000 --nonce 42 1024
    156 from: Eb3907eCad74a0013c259D5874AE7f22DcBcC95C
    157 to: 00000000000000000000000000000000DeaDBeef
    158 nonce: 42
    159 gasPrice: 100000000000 (100 gwei)
    160 gas: 21000
    161 value: 1024 (0.000000000000001024 eth)
    162 data: 0x
    163 v: 37
    164 recovery_byte: 0
    165 r: 0x0c97432d4db724e66a56f7ced04174cf6129e2555709f206dd6d3a156b4af23a
    166 s: 0x287862548314a59c7ca6139eee8b51400eb40a67b08b8dc13d67302abecccae0
    167 chainId: 1
    168 hash: 0x003030af05460633e85b16fff7a17607818dc67e58f89396e5491ad6f5438971
    169 hash_unsigned: 0xa59cf9e5438b186de381892b7879ce66476d5469478c7148880da5d553ade651
    170 src: 0xf8662a85174876e8008252089400000000000000000000000000000000deadbeef8204008025a00c97432d4db724e66a56f7ced04174cf6129e2555709f206dd6d3a156b4af23aa0287862548314a59c7ca6139eee8b51400eb40a67b08b8dc13d67302abecccae0
    171 .EE
    172 
    173 .SS Offline transaction with arbitrary data
    174 
    175 .EX
    176 $ eth-gas -y <\fIkey_file_path\fP> -a 00000000000000000000000000000000DeaDBeef --fee-price 100000000000 --fee-limit 21000 --nonce 42 --data 0x2a 1024 
    177 from: Eb3907eCad74a0013c259D5874AE7f22DcBcC95C
    178 to: 00000000000000000000000000000000DeaDBeef
    179 nonce: 42
    180 gasPrice: 100000000000 (100 gwei)
    181 gas: 21000
    182 value: 1024 (0.000000000000001024 eth)
    183 data: 0x2a
    184 v: 37
    185 recovery_byte: 0
    186 r: 0x800b6982d3f178201d7e7e7693b9c90b3fbcd54d04b6fff5284c81101fad54dd
    187 s: 0x3b86d710d31ac74b58f0040b0f51fdb6bdbabea62a68cf99c05e765e7e81de87
    188 chainId: 1
    189 hash: 0xede30052befd80760c5ab543babdccc3d97fe90523e5710d77220155a82faa47
    190 hash_unsigned: 0xad82d8cf1a412541c8a94ef71c50e9172c3a37853af036adee2f55c577da9770
    191 src: 0xf8662a85174876e8008252089400000000000000000000000000000000deadbeef8204002a25a0800b6982d3f178201d7e7e7693b9c90b3fbcd54d04b6fff5284c81101fad54dda03b86d710d31ac74b58f0040b0f51fdb6bdbabea62a68cf99c05e765e7e81de87
    192 .EE
    193 
    194 .SS Offline transaction with wire-format output
    195 
    196 .EX
    197 $ eth-gas -y <\fIkey_file_path\fP> -a 00000000000000000000000000000000DeaDBeef --fee-price 100000000000 --fee-limit 21000 --nonce 42 --raw 1024
    198 0xf8662a85174876e8008252089400000000000000000000000000000000deadbeef8204008025a00c97432d4db724e66a56f7ced04174cf6129e2555709f206dd6d3a156b4af23aa0287862548314a59c7ca6139eee8b51400eb40a67b08b8dc13d67302abecccae0
    199 .EE
    200 
    201 .SS Sign transaction for a different network
    202 
    203 .EX
    204 $ 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 
    205 from: Eb3907eCad74a0013c259D5874AE7f22DcBcC95C
    206 to: 00000000000000000000000000000000DeaDBeef
    207 nonce: 42
    208 gasPrice: 100000000000 (100 gwei)
    209 gas: 21000
    210 value: 1024 (0.000000000000001024 eth)
    211 data: 0x2a
    212 v: 41
    213 recovery_byte: 0
    214 r: 0xe522c25784111a512cbf46f883e3bdacffc2cdbd465fa1042892c28fc10ee054
    215 s: 0x5f84eb51a0c9871cfcedaba4e6274b300014899b3a2fec9292de6fe5919bcd07
    216 chainId: 3
    217 hash: 0x771200a20072294a6a843b89b98d5f868c9aa94da75dacf6a9f5834dfd241199
    218 hash_unsigned: 0xa5f9e8a5cda6985d81f4129955b7529f48ecb54728badac16ec550384e3a2bcc
    219 src: 0xf8662a85174876e8008252089400000000000000000000000000000000deadbeef8204002a29a0e522c25784111a512cbf46f883e3bdacffc2cdbd465fa1042892c28fc10ee054a05f84eb51a0c9871cfcedaba4e6274b300014899b3a2fec9292de6fe5919bcd07
    220 .EE
    221 
    222 .P
    223 The wire-format can in turn be decoded using the \fBeth-decode\fP tool)
    224 .SH ENVIRONMENT
    225 
    226 
    227 .TP
    228 \fICHAIN_SPEC\fP
    229 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.
    230 
    231 .TP
    232 \fIRPC_AUTH\fP
    233 Authentication method to use for the \fIRPC_PROVIDER\fP. Currently only \fIbasic\fP is supported.
    234 
    235 .TP
    236 \fIRPC_CREDENTIALS\fP
    237 Authentication credentials to use for \fIRPC_AUTH\fP. For \fIbasic\fP authentication the value must be given as \fI<user>:<pass>\fP.
    238 
    239 .TP
    240 \fIRPC_DIALECT\fP
    241 Enables translations of EVM node specific formatting and response codes.
    242 
    243 .TP
    244 \fIRPC_PROVIDER\fP
    245 Fully-qualified URL to the RPC endpoint of the blockchain node.
    246 
    247 .TP
    248 \fIWALLET_KEY_FILE\fP
    249 The wallet key file containing private key to use for transaction signing. Overridden by \fB-y\fP.
    250 
    251 .TP
    252 \fIWALLET_PASSPHRASE\fP
    253 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.
    254 
    255 .SH LICENSE
    256 
    257 This documentation and its source is licensed under the Creative Commons Attribution-Sharealike 4.0 International license.
    258 
    259 The source code of the tool this documentation describes is licensed under the GNU General Public License 3.0.
    260 
    261 .SH COPYRIGHT
    262 
    263 Louis Holbrook <dev@holbrook.no> (https://holbrook.no)
    264 PGP: 59A844A484AC11253D3A3E9DCDCBD24DD1D0E001
    265 
    266 
    267 
    268 .SH SOURCE CODE
    269 
    270 https://git.defalsify.org
    271 
    272 
    273 .SH SEE ALSO
    274 
    275 .BP
    276 confini-dump(1), eth-keyfile(1)
    277