Documentation ¶
Index ¶
- Variables
- func BalanceAction(c *cli.Context) error
- func BalanceAt(rpcUrl, account, number string) error
- func BlockAction(c *cli.Context) error
- func BlockByHash(rpcUrl, hash string) error
- func BlockByNumber(rpcUrl, number string) error
- func CallAction(c *cli.Context) error
- func CallContract(rpcUrl, from, to, gas, gasPrice, value, data, number string) error
- func ChainId(rpcUrl string) error
- func ChainIdAction(c *cli.Context) error
- func CodeAction(c *cli.Context) error
- func CodeAt(rpcUrl, account, number string) error
- func EstimateGas(rpcUrl, from, to, gas, gasPrice, value, data string) error
- func EstimateGasAction(c *cli.Context) error
- func HeaderAction(c *cli.Context) error
- func HeaderByHash(rpcUrl, hash string) error
- func HeaderByNumber(rpcUrl, number string) error
- func NonceAction(c *cli.Context) error
- func NonceAt(rpcUrl, account, number string) error
- func ParseFlagNoPending(c *cli.Context) bool
- func ParseFlagRpcAddr(c *cli.Context) string
- func PendingBalanceAt(rpcUrl, account string) error
- func PendingCallContract(rpcUrl, from, to, gas, gasPrice, value, data string) error
- func PendingCodeAt(rpcUrl, account string) error
- func PendingNonceAt(rpcUrl, account string) error
- func PendingStorageAt(rpcUrl, account, key string) error
- func ReceiptAction(c *cli.Context) error
- func SendAction(c *cli.Context) error
- func SendTransaction(rpcUrl, rawTxStr string) error
- func StorageAction(c *cli.Context) error
- func StorageAt(rpcUrl, account, key, number string) error
- func SubNewHeaderAction(c *cli.Context) error
- func SubscribeNewHead(rpcUrl string) error
- func SuggestGasPrice(rpcUrl string) error
- func SuggestGasPriceAction(c *cli.Context) error
- func TransactionAction(c *cli.Context) error
- func TransactionByHash(rpcUrl, hash string) error
- func TransactionCount(rpcUrl, hash string) error
- func TransactionInBlock(rpcUrl, hash string, index uint) error
- func TransactionReceipt(rpcUrl, hash string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( FlagRpcAddr = cli.StringFlag{ Name: "rpc", Usage: "geth server rpc address: format: http://..., https://..., ws://...", Value: "http://127.0.0.1:8545", } FlagNoPending = cli.BoolTFlag{ Name: "no-pending", Usage: "get no pending state", } )
View Source
var BalanceCmd = cli.Command{ Name: "balance", Usage: "get balance of an address", UsageText: "balance <address> [number]", Action: BalanceAction, Flags: []cli.Flag{FlagNoPending}, }
View Source
var BlockCmd = cli.Command{ Name: "block", Usage: "get block by number or hash", UsageText: "block [number|hash]", Action: BlockAction, Flags: []cli.Flag{}, }
View Source
var CallCmd = cli.Command{ Name: "call", Usage: "call contract", UsageText: "call <from> <to> <gas> <gasPrice> <value> <data> [number]", Action: CallAction, Flags: []cli.Flag{FlagNoPending}, }
View Source
var ChainCmd = cli.Command{ Name: "chain", Usage: "communicate with chain", Flags: []cli.Flag{FlagRpcAddr}, Subcommands: []cli.Command{ HeaderCmd, BlockCmd, TransactionCmd, ReceiptCmd, BalanceCmd, NonceCmd, CodeCmd, StorageCmd, SendCmd, CallCmd, GasCmd, PriceCmd, ChainIdCmd, }, }
View Source
var ChainIdCmd = cli.Command{ Name: "id", Usage: "get chain id", UsageText: "id", Action: ChainIdAction, Flags: []cli.Flag{}, }
View Source
var CodeCmd = cli.Command{ Name: "code", Usage: "get code of a contract", UsageText: "code <address> [number]", Action: CodeAction, Flags: []cli.Flag{FlagNoPending}, }
View Source
var (
ErrInsufficientArguments = fmt.Errorf("insufficient arguments")
)
View Source
var GasCmd = cli.Command{ Name: "gas", Usage: "estimate gas", UsageText: "gas <from> <to> <gas> <gasPrice> <value> <data>", Action: EstimateGasAction, Flags: []cli.Flag{}, }
View Source
var HeaderCmd = cli.Command{ Name: "header", Usage: "get header by number or hash", UsageText: "header [number|hash]", Action: HeaderAction, Flags: []cli.Flag{}, }
View Source
var NonceCmd = cli.Command{ Name: "nonce", Usage: "get nonce of an address", UsageText: "nonce <address> [number]", Action: NonceAction, Flags: []cli.Flag{FlagNoPending}, }
View Source
var ParseBigInt = utils.ParseBigInt
View Source
var ParseUint64 = utils.ParseUint64
View Source
var PriceCmd = cli.Command{ Name: "price", Usage: "get suggested gas price", UsageText: "price", Action: SuggestGasPriceAction, Flags: []cli.Flag{}, }
View Source
var ReceiptCmd = cli.Command{ Name: "receipt", Usage: "get receipt by hash", Action: ReceiptAction, Flags: []cli.Flag{}, }
View Source
var SendCmd = cli.Command{ Name: "send", Usage: "send a transaction", UsageText: "send <tx>", Action: SendAction, Flags: []cli.Flag{}, }
View Source
var StorageCmd = cli.Command{ Name: "storage", Usage: "get storage value of a contract by key", UsageText: "storage <address> <hash> [number]", Action: StorageAction, Flags: []cli.Flag{FlagNoPending}, }
View Source
var TransactionCmd = cli.Command{ Name: "transaction", Usage: "get transaction by hash", Action: TransactionAction, Flags: []cli.Flag{}, }
Functions ¶
func BalanceAction ¶
func BlockAction ¶
func BlockByHash ¶
func BlockByNumber ¶
func CallAction ¶
func CallContract ¶
func ChainIdAction ¶
func CodeAction ¶
func EstimateGas ¶
func EstimateGasAction ¶
func HeaderAction ¶
func HeaderByHash ¶
func HeaderByNumber ¶
func NonceAction ¶
func ParseFlagNoPending ¶
func ParseFlagRpcAddr ¶
func PendingBalanceAt ¶
func PendingCallContract ¶
func PendingCodeAt ¶
func PendingNonceAt ¶
func PendingStorageAt ¶
func ReceiptAction ¶
func SendAction ¶
func SendTransaction ¶
func StorageAction ¶
func SubNewHeaderAction ¶
func SubscribeNewHead ¶
func SuggestGasPrice ¶
func SuggestGasPriceAction ¶
func TransactionAction ¶
func TransactionByHash ¶
func TransactionCount ¶
func TransactionInBlock ¶
func TransactionReceipt ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.