Documentation ¶
Index ¶
- Constants
- func CalcGasFees(gasUsed uint64, gasTipCap *big.Int, gasFeeCap *big.Int, baseFee *big.Int) *big.Int
- func FinalizeWithdrawal(t *testing.T, cfg e2esys.SystemConfig, l1Client *ethclient.Client, ...) (*types.Receipt, *types.Receipt, *types.Receipt)
- func ProveAndFinalizeWithdrawal(t *testing.T, cfg e2esys.SystemConfig, clients ClientProvider, ...) (*types.Receipt, *types.Receipt, *types.Receipt, *types.Receipt)
- func ProveWithdrawal(t *testing.T, cfg e2esys.SystemConfig, clients ClientProvider, ...) (withdrawals.ProvenWithdrawalParameters, *types.Receipt)
- func ProveWithdrawalParameters(ctx context.Context, proofCl withdrawals.ProofClient, ...) (withdrawals.ProvenWithdrawalParameters, error)
- func SendDepositTx(t *testing.T, cfg e2esys.SystemConfig, l1Client *ethclient.Client, ...) *types.Receipt
- func SendL2Tx(t *testing.T, cfg e2esys.SystemConfig, l2Client *ethclient.Client, ...) *types.Receipt
- func SendL2TxWithID(t *testing.T, chainID *big.Int, l2Client *ethclient.Client, ...) *types.Receipt
- func SendWithdrawal(t *testing.T, cfg e2esys.SystemConfig, l2Client *ethclient.Client, ...) (*types.Transaction, *types.Receipt)
- type ClientProvider
- type DepositTxOpts
- type DepositTxOptsFn
- type TxOpts
- type TxOptsFn
- type WithdrawalTxOpts
- type WithdrawalTxOptsFn
Constants ¶
const SolErrClaimAlreadyResolved = "0xf1a94581"
Variables ¶
This section is empty.
Functions ¶
func CalcGasFees ¶
CalcGasFees determines the actual cost of the transaction given a specific base fee This does not include the L1 data fee charged from L2 transactions.
func FinalizeWithdrawal ¶
func FinalizeWithdrawal(t *testing.T, cfg e2esys.SystemConfig, l1Client *ethclient.Client, privKey *ecdsa.PrivateKey, withdrawalProofReceipt *types.Receipt, params withdrawals.ProvenWithdrawalParameters) (*types.Receipt, *types.Receipt, *types.Receipt)
func ProveWithdrawal ¶
func ProveWithdrawal(t *testing.T, cfg e2esys.SystemConfig, clients ClientProvider, l2NodeName string, ethPrivKey *ecdsa.PrivateKey, l2WithdrawalReceipt *types.Receipt) (withdrawals.ProvenWithdrawalParameters, *types.Receipt)
func ProveWithdrawalParameters ¶
func ProveWithdrawalParameters(ctx context.Context, proofCl withdrawals.ProofClient, l2ReceiptCl withdrawals.ReceiptClient, l2BlockCl withdrawals.BlockClient, txHash common.Hash, header *types.Header, l2OutputOracleContract *bindings.L2OutputOracleCaller, disputeGameFactoryContract *bindings.DisputeGameFactoryCaller, optimismPortal2Contract *bindingspreview.OptimismPortal2Caller, allocType config.AllocType) (withdrawals.ProvenWithdrawalParameters, error)
func SendDepositTx ¶
func SendDepositTx(t *testing.T, cfg e2esys.SystemConfig, l1Client *ethclient.Client, l2Client *ethclient.Client, l1Opts *bind.TransactOpts, applyL2Opts DepositTxOptsFn) *types.Receipt
SendDepositTx creates and sends a deposit transaction. The L1 transaction, including sender, is configured by the l1Opts param. The L2 transaction options can be configured by modifying the DepositTxOps value supplied to applyL2Opts Will verify that the transaction is included with the expected status on L1 and L2 Returns the receipt of the L2 transaction
func SendL2TxWithID ¶
func SendL2TxWithID(t *testing.T, chainID *big.Int, l2Client *ethclient.Client, privKey *ecdsa.PrivateKey, applyTxOpts TxOptsFn) *types.Receipt
SendL2Tx creates and sends a transaction. The supplied privKey is used to specify the account to send from and the transaction is sent to the supplied l2Client Transaction options and expected status can be configured in the applyTxOpts function by modifying the supplied TxOpts Will verify that the transaction is included with the expected status on l2Client and any clients added to TxOpts.VerifyClients
func SendWithdrawal ¶
func SendWithdrawal(t *testing.T, cfg e2esys.SystemConfig, l2Client *ethclient.Client, privKey *ecdsa.PrivateKey, applyOpts WithdrawalTxOptsFn) (*types.Transaction, *types.Receipt)
Types ¶
type ClientProvider ¶
type DepositTxOpts ¶
type DepositTxOptsFn ¶
type DepositTxOptsFn func(l2Opts *DepositTxOpts)
type TxOpts ¶
type TxOpts struct { ToAddr *common.Address Nonce uint64 Value *big.Int Gas uint64 GasTipCap *big.Int GasFeeCap *big.Int Data []byte ExpectedStatus uint64 VerifyClients []*ethclient.Client }
func (*TxOpts) VerifyOnClients ¶
VerifyOnClients adds additional l2 clients that should sync the block the tx is included in Checks that the receipt received from these clients is equal to the receipt received from the sequencer
type WithdrawalTxOpts ¶
type WithdrawalTxOpts struct { ToAddr *common.Address Nonce uint64 Value *big.Int Gas uint64 Data []byte ExpectedStatus uint64 VerifyClients []*ethclient.Client }
func (*WithdrawalTxOpts) VerifyOnClients ¶
func (o *WithdrawalTxOpts) VerifyOnClients(clients ...*ethclient.Client)
VerifyOnClients adds additional l2 clients that should sync the block the tx is included in Checks that the receipt received from these clients is equal to the receipt received from the sequencer
type WithdrawalTxOptsFn ¶
type WithdrawalTxOptsFn func(opts *WithdrawalTxOpts)