Documentation ¶
Index ¶
- Constants
- Variables
- func AssembleProof(cli *Client, header Header, log *types.Log, fId msg.ChainId, ...) ([]byte, error)
- func GetReceiptsByTxsHash(cli *Client, receipts []*types.Receipt)
- func GetTxsHashByBlockNumber(conn *Client, number *big.Int) ([]common.Hash, error)
- type Client
- func (c *Client) BlockByNumber(ctx context.Context, number *big.Int) (*RpcHeader, error)
- func (c *Client) CallContext(ctx context.Context, result interface{}, method string, args ...interface{}) error
- func (c *Client) TransactionReceiptRpcOutput(ctx context.Context, txHash common.Hash) (map[string]interface{}, error)
- type DeriveShaOriginal
- type GovernanceVote
- type Header
- type ReceiptProof
- type ReceiptProofOriginal
- type ReceiptRLP
- type ReceiptRlps
- type RpcHeader
- type Transactions
- type TxLog
- type TxReceipt
Constants ¶
View Source
const (
PrefixOfHex = "0x"
)
Variables ¶
View Source
var ErrNoResult = errors.New("no result in JSON-RPC response")
Functions ¶
func AssembleProof ¶
func GetReceiptsByTxsHash ¶ added in v1.2.0
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) BlockByNumber ¶
func (*Client) CallContext ¶
type DeriveShaOriginal ¶
type DeriveShaOriginal uint8
const ( DeriveShaOrigin DeriveShaOriginal = iota DeriveShaSimple DeriveShaConcat )
type GovernanceVote ¶ added in v1.2.0
type Header ¶
type Header struct { ParentHash []byte `json:"parentHash"` Reward common.Address `json:"reward"` StateRoot []byte `json:"stateRoot"` TransactionsRoot []byte `json:"transactionsRoot"` ReceiptsRoot []byte `json:"receiptsRoot"` LogsBloom []byte `json:"logsBloom"` BlockScore *big.Int `json:"blockScore"` Number *big.Int `json:"number"` GasUsed *big.Int `json:"gasUsed"` Timestamp *big.Int `json:"timestamp"` TimestampFoS *big.Int `json:"timestampFoS"` ExtraData []byte `json:"extraData"` GovernanceData []byte `json:"governanceData"` VoteData []byte `json:"voteData"` BaseFee *big.Int `json:"baseFee"` }
type ReceiptProof ¶
type ReceiptProof struct { Proof []byte DeriveSha DeriveShaOriginal }
type ReceiptProofOriginal ¶
type ReceiptRLP ¶
type ReceiptRlps ¶
type ReceiptRlps []*ReceiptRLP
ReceiptRlps implements DerivableList for receipts.
func (ReceiptRlps) EncodeIndex ¶
func (rs ReceiptRlps) EncodeIndex(i int, w *bytes.Buffer)
EncodeIndex encodes the i'th receipt to w.
func (ReceiptRlps) Len ¶
func (rs ReceiptRlps) Len() int
Len returns the number of receipts in this list.
type RpcHeader ¶
type RpcHeader struct { BaseFeePerGas string `json:"baseFeePerGas"` BlockScore string `json:"blockscore"` ExtraData string `json:"extraData"` GasUsed string `json:"gasUsed"` GovernanceData string `json:"governanceData"` Hash common.Hash `json:"hash"` LogsBloom string `json:"logsBloom"` Number string `json:"number"` ParentHash common.Hash `json:"parentHash"` ReceiptsRoot common.Hash `json:"receiptsRoot"` Reward common.Address `json:"reward"` Size string `json:"size"` StateRoot common.Hash `json:"stateRoot"` Timestamp string `json:"timestamp"` TimestampFoS string `json:"timestampFoS"` TotalBlockScore string `json:"totalBlockScore"` TransactionsRoot common.Hash `json:"transactionsRoot"` Transactions []Transactions `json:"transactions"` VoteData string `json:"voteData"` }
type Transactions ¶
type Transactions struct { AccessList []interface{} `json:"accessList,omitempty"` BlockHash string `json:"blockHash"` BlockNumber string `json:"blockNumber"` ChainID string `json:"chainId,omitempty"` From string `json:"from"` Gas string `json:"gas"` GasPrice string `json:"gasPrice"` Hash string `json:"hash"` Input string `json:"input"` MaxFeePerGas string `json:"maxFeePerGas,omitempty"` MaxPriorityFeePerGas string `json:"maxPriorityFeePerGas,omitempty"` Nonce string `json:"nonce"` R string `json:"r"` S string `json:"s"` To string `json:"to"` TransactionIndex string `json:"transactionIndex"` Type string `json:"type"` V string `json:"v"` Value string `json:"value"` }
Click to show internal directories.
Click to hide internal directories.