Documentation ¶
Index ¶
Constants ¶
const ( // LatestBlockNumber mapping from "latest" to 0 for tm query LatestBlockNumber = BlockNumber(0) // EarliestBlockNumber mapping from "earliest" to 1 for tm query (earliest query not supported) EarliestBlockNumber = BlockNumber(1) // PendingBlockNumber mapping from "pending" to -1 for tm query PendingBlockNumber = BlockNumber(-1) )
const ( // ProtocolVersion is the latest supported version of the eth protocol. ProtocolVersion = eth65 GasPrice = 5000000 // consider a filter inactive if it has not been polled for within deadline Deadline = 5 * time.Minute )
Constants to match up protocol versions and messages
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct { Nonce *hexutil.Uint64 `json:"nonce"` Code *hexutil.Bytes `json:"code"` Balance **hexutil.Big `json:"balance"` State *map[common.Hash]common.Hash `json:"state"` StateDiff *map[common.Hash]common.Hash `json:"stateDiff"` }
Account indicates the overriding fields of account during the execution of a message call. NOTE: state and stateDiff can't be specified at the same time. If state is set, message execution will only use the data in the given state. Otherwise if statDiff is set, all diff will be applied first and then execute the call message.
type BlockNumber ¶
type BlockNumber int64
BlockNumber represents decoding hex string to block values
func NewBlockNumber ¶
func NewBlockNumber(n *big.Int) BlockNumber
NewBlockNumber creates a new BlockNumber instance.
func (BlockNumber) Int64 ¶
func (bn BlockNumber) Int64() int64
Int64 converts block number to primitive type
func (*BlockNumber) UnmarshalJSON ¶
func (bn *BlockNumber) UnmarshalJSON(data []byte) error
UnmarshalJSON parses the given JSON fragment into a BlockNumber. It supports: - "latest", "earliest" or "pending" as string arguments - the block number Returned errors: - an invalid block number error when the given argument isn't a known strings - an out of range error when the given block number is either too little or too large
type RPCTransaction ¶
type RPCTransaction struct { BlockHash *common.Hash `json:"blockHash"` BlockNumber *hexutil.Big `json:"blockNumber"` From common.Address `json:"from"` Gas hexutil.Uint64 `json:"gas"` GasPrice *hexutil.Big `json:"gasPrice"` Hash common.Hash `json:"hash"` Input hexutil.Bytes `json:"input"` Nonce hexutil.Uint64 `json:"nonce"` To *common.Address `json:"to"` TransactionIndex *hexutil.Uint64 `json:"transactionIndex"` Value *hexutil.Big `json:"value"` Type hexutil.Uint64 `json:"type"` Accesses *types.AccessList `json:"accessList,omitempty"` ChainID *hexutil.Big `json:"chainId,omitempty"` V *hexutil.Big `json:"v"` R *hexutil.Big `json:"r"` S *hexutil.Big `json:"s"` }
RPCTransaction represents a transaction that will serialize to the RPC representation of a transaction