Add more detail on examples
This commit is contained in:
parent
1362c9aac6
commit
2f906037a9
@ -1,3 +1,16 @@
|
||||
.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.
|
||||
|
||||
|
@ -1,5 +1,22 @@
|
||||
.SS Build a signed ERC20 transfer
|
||||
|
||||
.SS Build a signed ERC20 transfer in wire format, setting nonce and fee details manually.
|
||||
.EX
|
||||
$ eth-encode -y <\fIkey_file_path\fP> -e <\fItoken_address\fP> --signature transfer a:00000000000000000000000000000000DeaDBeef u:1024
|
||||
$ 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
|
||||
|
@ -4,13 +4,13 @@
|
||||
eth-encode \- Encode arbitrary contract calls and transactions
|
||||
|
||||
.SH SYNOPSIS
|
||||
\fBeth-encode\fP [ -p \fIrpc_provider\fP ] [ -i \fIchain_Spec\fP] [ -s ] [ -w ] [ -e \fIsmart_contract_address\fP ] --signature \fIcontract_method_name\fP [ \fIvalue_specifiers\fP ... ]
|
||||
\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 future use, or directly sent to the network using the \fB-s\fP flag.
|
||||
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.
|
||||
|
||||
|
@ -1 +1 @@
|
||||
mode Operation mode. --mode mode
|
||||
mode Mode of operation encoding is for. Must be one of "tx," "call," or "arg." See \fBMODES\fP below. --mode mode
|
||||
|
Loading…
Reference in New Issue
Block a user