Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RPCMarshalBlock ¶
RPCMarshalBlock converts the given block to the RPC output which depends on fullTx. If inclTx is true transactions are returned. When fullTx is true the returned block contains full transaction details, otherwise it will only contain transaction hashes.
func RPCMarshalHeader ¶
RPCMarshalHeader converts the given header to the RPC output .
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
API is the collection of tracing APIs exposed over the private debugging endpoint.
func (*API) GetBlockByNumber ¶
func (api *API) GetBlockByNumber(ctx context.Context, number rpc.BlockNumber, fullTx bool) (map[string]interface{}, error)
GetBlockByNumber is the wrapper of the chain access function offered by the backend. It will return an error if the block is not found.
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"` GasFeeCap *hexutil.Big `json:"maxFeePerGas,omitempty"` GasTipCap *hexutil.Big `json:"maxPriorityFeePerGas,omitempty"` 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
func NewRPCPendingTransaction ¶
func NewRPCPendingTransaction(tx *types.Transaction, current *types.Header, config *params.ChainConfig) *RPCTransaction
NewRPCPendingTransaction returns a pending transaction that will serialize to the RPC representation