withdrawals

package
v0.0.1-rc2 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProveAndFinalizeWithdrawal

func ProveAndFinalizeWithdrawal(ctx context.Context, l2ProofCl ProofClient, l2Client EthClient, opts *bind.TransactOpts, outputOracle OutputOracle, portal Portal, withdrawalTxHash common.Hash, l2OutputBlock *big.Int) (*types.Transaction, error)

func WaitForOutputBlock

func WaitForOutputBlock(ctx context.Context, outputOracle *bindings.OutputOracle, blockNumber *big.Int, pollInterval time.Duration) (*big.Int, error)

func WaitForReceipt

func WaitForReceipt(ctx context.Context, client EthClient, txHash common.Hash, pollInterval time.Duration) (*types.Receipt, error)

Types

type EthClient

type EthClient interface {
	TransactionReceipt(context.Context, common.Hash) (*types.Receipt, error)
	BlockByNumber(context.Context, *big.Int) (*types.Block, error)
}

type OutputOracle

type OutputOracle interface {
	LatestBlockNumber(opts *bind.CallOpts) (*big.Int, error)
	GetL2OutputIndexAfter(opts *bind.CallOpts, _l2BlockNumber *big.Int) (*big.Int, error)
}

type Portal

type Portal interface {
	ProveAndFinalizeWithdrawalTransaction(opts *bind.TransactOpts, _tx bindings.TypesWithdrawalTransaction, _l2OutputIndex *big.Int, _outputRootProof bindings.TypesOutputRootProof, _withdrawalProof [][]byte) (*types.Transaction, error)
}

type ProofClient

type ProofClient interface {
	GetProof(context.Context, common.Address, []string, *big.Int) (*gethclient.AccountResult, error)
}

Jump to

Keyboard shortcuts

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