receipts

package
v0.62.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 4, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const MaxFilterBlockRange = 10_000

Variables

This section is empty.

Functions

This section is empty.

Types

type Receipt

type Receipt struct {
	Status   Status
	Error    error
	Logs     []*types.Log
	Receipts *Receipts
}

type Receipts

type Receipts struct {
	Digest   common.Hash
	Receipts []Receipt
}

func FetchReceipts added in v0.62.2

func FetchReceipts(ctx context.Context, opHash common.Hash, provider *ethrpc.Provider, fromBlock, toBlock *big.Int) (Receipts, *types.Receipt, error)

FetchReceipts looks up the transaction that emitted Call* events for the given digest and returns all decoded Sequence receipts along with the native receipt.

The `opHash` is also known as the "MetaTxnID"

NOTE: toBlock can also be nil, in which case the latest block is used.

Finally, please note that this method will not find meta-transactions if there is a native transaction which fails. In that case, the Call* events are not emitted and thus cannot be found. In such cases, you will need to look up the native transaction receipt directly. However, this is not to be confused with where a "Call" inside of the native transaction fails, but the native transaction itself succeeds which is more common and works fine.

func TransactionReceipts

func TransactionReceipts(ctx context.Context, transaction common.Hash, provider *ethrpc.Provider, chainID ...*big.Int) (Receipts, error)

func TransactionReceiptsForReceipt

func TransactionReceiptsForReceipt(ctx context.Context, receipt *types.Receipt, provider *ethrpc.Provider, chainID ...*big.Int) (Receipts, error)

func (*Receipts) Find

func (r *Receipts) Find(digest common.Hash) *Receipts

func (*Receipts) IsSuccess added in v0.62.2

func (r *Receipts) IsSuccess() bool

type Status

type Status int
const (
	StatusNotExecuted Status = iota
	StatusSucceeded
	StatusFailed
	StatusAborted
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL