wait

package
v1.1.4-rc.1 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2023 License: MIT Imports: 12 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AndGet

func AndGet[T interface{}](ctx context.Context, pollRate time.Duration, get func() (T, error), predicate func(T) bool) (T, error)

func For

func For(ctx context.Context, rate time.Duration, cb func() (bool, error)) error

func ForBlock

func ForBlock(ctx context.Context, client *ethclient.Client, n uint64) error

func ForFinalizationPeriod

func ForFinalizationPeriod(ctx context.Context, client *ethclient.Client, l1ProvingBlockNum *big.Int, l2OutputOracleAddr common.Address) error

ForFinalizationPeriod waits until the L1 chain has progressed far enough that l1ProvingBlockNum has completed the finalization period. This functions polls and can block for a very long time if used on mainnet.

func ForNextBlock

func ForNextBlock(ctx context.Context, client *ethclient.Client) error

func ForOutputRootPublished

func ForOutputRootPublished(ctx context.Context, client *ethclient.Client, l2OutputOracleAddr common.Address, l2BlockNumber *big.Int) (uint64, error)

ForOutputRootPublished waits until there is an output published for an L2 block number larger than the supplied l2BlockNumber This function polls and can block for a very long time if used on mainnet. This returns the block number to use for proof generation.

func ForReceipt

func ForReceipt(ctx context.Context, client *ethclient.Client, hash common.Hash, status uint64) (*types.Receipt, error)

func ForReceiptFail

func ForReceiptFail(ctx context.Context, client *ethclient.Client, hash common.Hash) (*types.Receipt, error)

func ForReceiptOK

func ForReceiptOK(ctx context.Context, client *ethclient.Client, hash common.Hash) (*types.Receipt, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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