MCPcopy
hub / github.com/bnb-chain/bsc / BlockReceipts

Method BlockReceipts

ethclient/ethclient.go:114–121  ·  view source on GitHub ↗

BlockReceipts returns the receipts of a given block number or hash.

(ctx context.Context, blockNrOrHash rpc.BlockNumberOrHash)

Source from the content-addressed store, hash-verified

112
113// BlockReceipts returns the receipts of a given block number or hash.
114func (ec *Client) BlockReceipts(ctx context.Context, blockNrOrHash rpc.BlockNumberOrHash) ([]*types.Receipt, error) {
115 var r []*types.Receipt
116 err := ec.c.CallContext(ctx, &r, "eth_getBlockReceipts", blockNrOrHash.String())
117 if err == nil && r == nil {
118 return nil, ethereum.NotFound
119 }
120 return r, err
121}
122
123type rpcBlock struct {
124 Hash common.Hash `json:"hash"`

Callers

nothing calls this directly

Calls 2

CallContextMethod · 0.80
StringMethod · 0.65

Tested by

no test coverage detected