dsl

package
v1.14.1 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2025 License: MIT Imports: 57 Imported by: 1

Documentation

Overview

Package dsl provides DSL (domain specific language) to interact with a devstack system.

Each component in the devstack has a DSL wrapper. The wrapper itself does not have any state, and may be recreated or shallow-copied.

Each DSL wrapper provides an Escape method, in case the DSL is not sufficient for a given use-case. The Escape method is a temporary compromise to allow more incremental development of and migration to the DSL. It should be avoided whenever possible and will be removed in the future.

Index

Constants

View Source
const DefaultTimeout = 30 * time.Second
View Source
const (
	SaltEnvVar = "DEVSTACK_KEYS_SALT"
)

Variables

This section is empty.

Functions

func CalculateFjordL1Cost added in v1.13.6

func CalculateFjordL1Cost(ctx context.Context, client apis.EthClient, rollupCostData types.RollupCostData, blockHash common.Hash) (*big.Int, error)

CalculateFjordL1Cost calculates L1 cost using Fjord formula with block-specific L1 state

func CheckAll

func CheckAll(t devtest.T, checks ...CheckFunc)

func CheckForChainFork added in v1.13.6

func CheckForChainFork(ctx context.Context, networks []*L2Network, logger log.Logger) (func(bool) error, error)

CheckForChainFork checks that the L2 chain has not forked now, and returns a function that check again (to be called at the end of the test). An error is returned from this function (and the returned function) if a chain fork has been detected.

func CreateUnsignedTransactionFromSigned added in v1.13.6

func CreateUnsignedTransactionFromSigned(signedTx *types.Transaction) (*types.Transaction, error)

CreateUnsignedTransactionFromSigned creates an unsigned transaction from a signed one

func FindSignedTransactionFromReceipt added in v1.13.6

func FindSignedTransactionFromReceipt(ctx context.Context, client apis.EthClient, receipt *types.Receipt) (*types.Transaction, error)

FindSignedTransactionFromReceipt finds the signed transaction from a receipt and block

func IsForkActivated added in v1.13.6

func IsForkActivated(c *params.ChainConfig, forkName rollup.ForkName, timestamp uint64) (bool, error)

IsForkActivated checks if a specific fork is activated at the given timestamp based on the chain configuration.

func ReadGasPriceOracleL1FeeAt added in v1.13.6

func ReadGasPriceOracleL1FeeAt(ctx context.Context, client apis.EthClient, gpo *bindings.GasPriceOracle, txUnsigned []byte, blockHash common.Hash) (*big.Int, error)

ReadGasPriceOracleL1FeeAt reads the L1 fee from GasPriceOracle for an unsigned transaction evaluated against a specific L2 block hash.

func ReadGasPriceOracleL1FeeUpperBoundAt added in v1.13.6

func ReadGasPriceOracleL1FeeUpperBoundAt(ctx context.Context, client apis.EthClient, gpo *bindings.GasPriceOracle, txLen int, blockHash common.Hash) (*big.Int, error)

ReadGasPriceOracleL1FeeUpperBoundAt reads the L1 fee upper bound for a tx length pinned to a block hash.

func RequiresL2Fork added in v1.13.6

func RequiresL2Fork(ctx context.Context, system L2NetworkProvider, networkIdx int, forkName rollup.ForkName) error

RequiresL2Fork ensures a specific L2 network has a specific fork activated.

func RequiresL2WithoutFork added in v1.13.6

func RequiresL2WithoutFork(ctx context.Context, system L2NetworkProvider, networkIdx int, forkName rollup.ForkName) error

RequiresL2WithoutFork ensures a specific L2 network does not have a specific fork activated.

func ValidateL1FeeMatches added in v1.13.6

func ValidateL1FeeMatches(t devtest.T, calculatedFee, receiptFee *big.Int)

ValidateL1FeeMatches checks that the calculated L1 fee matches the actual receipt L1 fee

func WithAllLocalUnsafeHeadsAdvancedBy

func WithAllLocalUnsafeHeadsAdvancedBy(blocks uint64) func(cfg *VerifySyncStatusConfig)

WithAllLocalUnsafeHeadsAdvancedBy verifies that the local unsafe head of every chain advances by at least the specified number of blocks compared to the value when VerifySyncStatus is called.

func WithMinRequiredL2Block added in v1.13.5

func WithMinRequiredL2Block(blockNum uint64) func(opts *safeHeadDbMatchOpts)

Types

type CheckFunc

type CheckFunc func() error

func LaggedFn added in v1.13.4

func LaggedFn(baseNode, refNode SyncStatusProvider, log log.Logger, ctx context.Context, lvl types.SafetyLevel, chainID eth.ChainID, attempts int, allowMatch bool) CheckFunc

LaggedFn returns a lambda that checks the baseNode head with given safety level is lagged with the refNode chain sync status provider Composable with other lambdas to wait in parallel

func MatchedFn added in v1.13.4

func MatchedFn(baseNode, refNode SyncStatusProvider, log log.Logger, ctx context.Context, lvl types.SafetyLevel, chainID eth.ChainID, attempts int) CheckFunc

MatchedFn returns a lambda that checks the baseNode head with given safety level is matched with the refNode chain sync status provider Composable with other lambdas to wait in parallel

type Cluster

type Cluster struct {
	// contains filtered or unexported fields
}

Cluster wraps a stack.Cluster interface for DSL operations

func NewCluster

func NewCluster(inner stack.Cluster) *Cluster

NewCluster creates a new Cluster DSL wrapper

func (*Cluster) Escape

func (c *Cluster) Escape() stack.Cluster

Escape returns the underlying stack.Cluster

func (*Cluster) String

func (c *Cluster) String() string

type Conductor added in v1.13.4

type Conductor struct {
	// contains filtered or unexported fields
}

func NewConductor added in v1.13.4

func NewConductor(inner stack.Conductor) *Conductor

func (*Conductor) Escape added in v1.13.4

func (c *Conductor) Escape() stack.Conductor

func (*Conductor) FetchClusterMembership added in v1.13.4

func (c *Conductor) FetchClusterMembership() *consensus.ClusterMembership

func (*Conductor) FetchLeader added in v1.13.4

func (c *Conductor) FetchLeader() *consensus.ServerInfo

func (*Conductor) FetchPaused added in v1.13.4

func (c *Conductor) FetchPaused() bool

func (*Conductor) FetchSequencerHealthy added in v1.13.4

func (c *Conductor) FetchSequencerHealthy() bool

func (*Conductor) IsLeader added in v1.13.4

func (c *Conductor) IsLeader() bool

func (*Conductor) String added in v1.13.4

func (c *Conductor) String() string

func (*Conductor) TransferLeadershipTo added in v1.13.4

func (c *Conductor) TransferLeadershipTo(targetLeaderInfo consensus.ServerInfo)

type ConductorSet added in v1.13.4

type ConductorSet []*Conductor

func NewConductorSet added in v1.13.4

func NewConductorSet(inner []stack.Conductor) ConductorSet

type Deposit added in v1.13.5

type Deposit struct {
	// contains filtered or unexported fields
}

func (Deposit) GasCost added in v1.13.5

func (d Deposit) GasCost() eth.ETH

type ELNode

type ELNode interface {
	ChainID() eth.ChainID
	// contains filtered or unexported methods
}

type EOA

type EOA struct {
	// contains filtered or unexported fields
}

EOA is an Externally-Owned-Account: an account on a specific chain that is operated by a single private key.

func NewEOA

func NewEOA(key *Key, el ELNode) *EOA

func (*EOA) Address

func (u *EOA) Address() common.Address

func (*EOA) ApproveToken added in v1.13.6

func (u *EOA) ApproveToken(tokenAddr common.Address, spender common.Address, amount eth.ETH)

ApproveToken approves a spender to spend tokens on behalf of this EOA

func (*EOA) AsEL added in v1.13.4

func (u *EOA) AsEL(el ELNode) *EOA

func (*EOA) ChainID

func (u *EOA) ChainID() eth.ChainID

func (*EOA) DeployEventLogger

func (u *EOA) DeployEventLogger() common.Address

func (*EOA) DeployWETH added in v1.13.6

func (u *EOA) DeployWETH() common.Address

func (*EOA) GetBalance added in v1.13.4

func (u *EOA) GetBalance() eth.ETH

Try to avoid using this method where possible, use the VerifyBalance* methods instead.

func (*EOA) GetTokenBalance added in v1.13.6

func (u *EOA) GetTokenBalance(tokenAddr common.Address) eth.ETH

GetTokenBalance returns the token balance for this EOA

func (*EOA) Key

func (u *EOA) Key() *Key

Key returns the cross-chain user identity/key, i.e. the user but detached it from the EL node.

func (*EOA) PendingNonce added in v1.13.4

func (u *EOA) PendingNonce() uint64

PendingNonce looks up the user nonce in the pending state.

func (*EOA) Plan

func (u *EOA) Plan() txplan.Option

Plan creates the default tx-planning options, to perform a transaction with this Key, against the connected EL node and its chain.

func (*EOA) PlanAuth added in v1.13.6

func (u *EOA) PlanAuth(code common.Address) txplan.Option

func (*EOA) PlanTransfer

func (u *EOA) PlanTransfer(to common.Address, amount eth.ETH) txplan.Option

PlanTransfer creates the tx-plan options to perform a transfer of the given amount of ETH to the given account.

func (*EOA) SendPackedExecMessages added in v1.13.4

SendPackedExecMessages batches every message and validates them via a single multicall

func (*EOA) SendPackedRandomInitMessages added in v1.13.4

func (u *EOA) SendPackedRandomInitMessages(rng *rand.Rand, eventLoggerAddress common.Address) (*txintent.IntentTx[*txintent.MultiTrigger, *txintent.InteropOutput], *types.Receipt, error)

SendPackedRandomInitMessages batches random messages and initiates them via a single multicall

func (*EOA) String

func (u *EOA) String() string

func (*EOA) Transact

func (u *EOA) Transact(opts ...txplan.Option) *txplan.PlannedTx

Transact plans and executes a tx. The success-state, as defined by the tx-plan options, is required. The resulting evaluated tx is returned.

func (*EOA) Transfer

func (u *EOA) Transfer(to common.Address, amount eth.ETH) *txplan.PlannedTx

Transfer transfers the given amount of ETH to the given account, immediately.

func (*EOA) VerifyBalanceAtLeast added in v1.13.4

func (u *EOA) VerifyBalanceAtLeast(v eth.ETH)

VerifyBalanceAtLeast verifies balance >= v

func (*EOA) VerifyBalanceExact

func (u *EOA) VerifyBalanceExact(v eth.ETH)

VerifyBalanceExact verifies balance == v

func (*EOA) VerifyBalanceLessThan

func (u *EOA) VerifyBalanceLessThan(v eth.ETH)

VerifyBalanceLessThan verifies balance < v

func (*EOA) VerifyTokenBalance added in v1.13.6

func (u *EOA) VerifyTokenBalance(tokenAddr common.Address, expectedBalance eth.ETH)

VerifyTokenBalance verifies the token balance matches expected amount

func (*EOA) WaitForBalance added in v1.13.4

func (u *EOA) WaitForBalance(v eth.ETH)

func (*EOA) WaitForTokenBalance added in v1.13.6

func (u *EOA) WaitForTokenBalance(tokenAddr common.Address, expectedBalance eth.ETH)

WaitForTokenBalance waits for a specific token balance to be reached

type EcotoneFees added in v1.13.6

type EcotoneFees struct {
	// contains filtered or unexported fields
}

func NewEcotoneFees added in v1.13.6

func NewEcotoneFees(t devtest.T, l2Network *L2Network) *EcotoneFees

func (*EcotoneFees) LogResults added in v1.13.6

func (ef *EcotoneFees) LogResults(result EcotoneFeesValidationResult)

func (*EcotoneFees) ValidateTransaction added in v1.13.6

func (ef *EcotoneFees) ValidateTransaction(from *EOA, to *EOA, amount *big.Int) EcotoneFeesValidationResult

type EcotoneFeesValidationResult added in v1.13.6

type EcotoneFeesValidationResult struct {
	TransactionReceipt *types.Receipt
	L1Fee              *big.Int
	L2Fee              *big.Int
	BaseFee            *big.Int
	PriorityFee        *big.Int
	TotalFee           *big.Int
	VaultBalances      VaultBalances
	WalletBalanceDiff  *big.Int
	TransferAmount     *big.Int
}

type Faucet

type Faucet struct {
	// contains filtered or unexported fields
}

Faucet wraps a stack.Faucet interface for DSL operations. A Faucet is chain-specific. Note: Faucet wraps a stack component, to share faucet operations in kurtosis by hosting it as service, and prevent race-conditions with the account that sends out the faucet funds.

func NewFaucet

func NewFaucet(inner stack.Faucet) *Faucet

NewFaucet creates a new Faucet DSL wrapper

func (*Faucet) Escape

func (f *Faucet) Escape() stack.Faucet

Escape returns the underlying stack.Faucet

func (*Faucet) Fund

func (f *Faucet) Fund(addr common.Address, amount eth.ETH)

Fund funds the given address with the given amount of ETH

func (*Faucet) String

func (f *Faucet) String() string

type FjordFees added in v1.13.6

type FjordFees struct {
	// contains filtered or unexported fields
}

func NewFjordFees added in v1.13.6

func NewFjordFees(t devtest.T, l2Network *L2Network) *FjordFees

func (*FjordFees) ValidateTransaction added in v1.13.6

func (ff *FjordFees) ValidateTransaction(from *EOA, to *EOA, amount *big.Int) FjordFeesValidationResult

ValidateTransaction validates the transaction and returns the validation result

type FjordFeesValidationResult added in v1.13.6

type FjordFeesValidationResult struct {
	TransactionReceipt  *types.Receipt
	L1Fee               *big.Int
	L2Fee               *big.Int
	BaseFee             *big.Int
	PriorityFee         *big.Int
	TotalFee            *big.Int
	VaultBalances       VaultBalances
	WalletBalanceDiff   *big.Int
	TransferAmount      *big.Int
	FastLzSize          uint64
	EstimatedBrotliSize *big.Int
	OperatorFee         *big.Int
	CoinbaseDiff        *big.Int
}

type FlashblocksBuilderNode added in v1.13.4

type FlashblocksBuilderNode struct {
	// contains filtered or unexported fields
}

func NewFlashblocksBuilderNode added in v1.13.4

func NewFlashblocksBuilderNode(inner stack.FlashblocksBuilderNode) *FlashblocksBuilderNode

func (*FlashblocksBuilderNode) Conductor added in v1.13.5

func (c *FlashblocksBuilderNode) Conductor() *Conductor

func (*FlashblocksBuilderNode) Escape added in v1.13.4

func (*FlashblocksBuilderNode) ListenFor added in v1.13.5

func (c *FlashblocksBuilderNode) ListenFor(logger log.Logger, duration time.Duration, output chan<- []byte, done chan<- struct{}) error

func (*FlashblocksBuilderNode) String added in v1.13.4

func (c *FlashblocksBuilderNode) String() string

type FlashblocksBuilderSet added in v1.13.4

type FlashblocksBuilderSet []*FlashblocksBuilderNode

func NewFlashblocksBuilderSet added in v1.13.4

func NewFlashblocksBuilderSet(inner []stack.FlashblocksBuilderNode) FlashblocksBuilderSet

func (FlashblocksBuilderSet) Leader added in v1.13.5

type FlashblocksWebsocketProxy added in v1.13.5

type FlashblocksWebsocketProxy struct {
	// contains filtered or unexported fields
}

func NewFlashblocksWebsocketProxy added in v1.13.5

func NewFlashblocksWebsocketProxy(inner stack.FlashblocksWebsocketProxy) *FlashblocksWebsocketProxy

func (*FlashblocksWebsocketProxy) Escape added in v1.13.5

func (*FlashblocksWebsocketProxy) ListenFor added in v1.13.5

func (c *FlashblocksWebsocketProxy) ListenFor(logger log.Logger, duration time.Duration, output chan<- []byte, done chan<- struct{}) error

func (*FlashblocksWebsocketProxy) String added in v1.13.5

func (c *FlashblocksWebsocketProxy) String() string

type FlashblocksWebsocketProxySet added in v1.13.5

type FlashblocksWebsocketProxySet []*FlashblocksWebsocketProxy

func NewFlashblocksWebsocketProxySet added in v1.13.5

func NewFlashblocksWebsocketProxySet(inner []stack.FlashblocksWebsocketProxy) FlashblocksWebsocketProxySet

type ForkchoiceUpdateResult added in v1.14.1

type ForkchoiceUpdateResult struct {
	T       devtest.T
	Refresh func()
	Result  *eth.ForkchoiceUpdatedResult
	Err     error
}

func (*ForkchoiceUpdateResult) IsForkchoiceUpdatedStatus added in v1.14.1

func (r *ForkchoiceUpdateResult) IsForkchoiceUpdatedStatus(status eth.ExecutePayloadStatus) *ForkchoiceUpdateResult

func (*ForkchoiceUpdateResult) IsSyncing added in v1.14.1

func (*ForkchoiceUpdateResult) IsValid added in v1.14.1

func (*ForkchoiceUpdateResult) WaitUntilValid added in v1.14.1

func (r *ForkchoiceUpdateResult) WaitUntilValid(attempts int) *ForkchoiceUpdateResult

type Funder

type Funder struct {
	// contains filtered or unexported fields
}

func NewFunder

func NewFunder(w *HDWallet, f *Faucet, el ELNode) *Funder

func (*Funder) Fund added in v1.13.4

func (f *Funder) Fund(wallet *EOA, amount eth.ETH) eth.ETH

func (*Funder) FundAtLeast added in v1.13.4

func (f *Funder) FundAtLeast(wallet *EOA, amount eth.ETH) eth.ETH

func (*Funder) FundNoWait added in v1.13.5

func (f *Funder) FundNoWait(wallet *EOA, amount eth.ETH)

func (*Funder) NewFundedEOA

func (f *Funder) NewFundedEOA(amount eth.ETH) *EOA

func (*Funder) NewFundedEOAs added in v1.13.4

func (f *Funder) NewFundedEOAs(count int, amount eth.ETH) []*EOA

type HDWallet

type HDWallet struct {
	// contains filtered or unexported fields
}

HDWallet is a collection of deterministic accounts, generated from an underlying devkeys keyring, using the standard cross-chain user identities.

func NewHDWallet

func NewHDWallet(t devtest.T, mnemonic string, startIndex uint64) *HDWallet

func NewRandomHDWallet added in v1.13.6

func NewRandomHDWallet(t devtest.T, startIndex uint64) *HDWallet

func (*HDWallet) NewEOA

func (w *HDWallet) NewEOA(el ELNode) *EOA

NewEOA creates a new Key and wraps it with an EL node into a new EOA

func (*HDWallet) NewKey

func (w *HDWallet) NewKey() *Key

NewKey creates a new chain-agnostic account identity

func (*HDWallet) String

func (w *HDWallet) String() string

type HeaderProvider added in v1.13.6

type HeaderProvider interface {
	InfoByNumber(ctx context.Context, number uint64) (eth.BlockInfo, error)
	InfoByLabel(ctx context.Context, label eth.BlockLabel) (eth.BlockInfo, error)
	InfoByHash(ctx context.Context, hash common.Hash) (eth.BlockInfo, error)
}

HeaderProvider interface for multi-client operations

type Key

type Key struct {
	// contains filtered or unexported fields
}

Key is an ethereum private key. This is a key with an address identity. The Key may be used on different chains: it is chain-agnostic.

func NewKey

func NewKey(t devtest.T, priv *ecdsa.PrivateKey) *Key

func (*Key) Address

func (a *Key) Address() common.Address

func (*Key) Plan

func (a *Key) Plan() txplan.Option

Plan returns the tx-plan option to use this Key for signing of a transaction.

func (*Key) Priv added in v1.13.4

func (a *Key) Priv() *ecdsa.PrivateKey

func (*Key) String

func (a *Key) String() string

func (*Key) User

func (a *Key) User(el ELNode) *EOA

EOA combines this Key with an EL node into a single-chain EOA.

type L1CLNode

type L1CLNode struct {
	// contains filtered or unexported fields
}

L1CLNode wraps a stack.L1CLNode interface for DSL operations

func NewL1CLNode

func NewL1CLNode(inner stack.L1CLNode) *L1CLNode

NewL1CLNode creates a new L1CLNode DSL wrapper

func (*L1CLNode) Escape

func (cl *L1CLNode) Escape() stack.L1CLNode

Escape returns the underlying stack.L1CLNode

func (*L1CLNode) String

func (cl *L1CLNode) String() string

type L1ELNode

type L1ELNode struct {
	// contains filtered or unexported fields
}

L1ELNode wraps a stack.L1ELNode interface for DSL operations

func NewL1ELNode

func NewL1ELNode(inner stack.L1ELNode) *L1ELNode

NewL1ELNode creates a new L1ELNode DSL wrapper

func (*L1ELNode) BlockRefByLabel added in v1.13.4

func (el *L1ELNode) BlockRefByLabel(label eth.BlockLabel) eth.L1BlockRef

func (*L1ELNode) BlockRefByNumber added in v1.13.4

func (el *L1ELNode) BlockRefByNumber(number uint64) eth.L1BlockRef

func (L1ELNode) ChainID

func (el L1ELNode) ChainID() eth.ChainID

func (*L1ELNode) Escape

func (el *L1ELNode) Escape() stack.L1ELNode

Escape returns the underlying stack.L1ELNode

func (*L1ELNode) EstimateBlockTime added in v1.13.4

func (el *L1ELNode) EstimateBlockTime() time.Duration

EstimateBlockTime estimates the L1 block based on the last 1000 blocks (or since genesis, if insufficient blocks).

func (*L1ELNode) EthClient added in v1.13.4

func (el *L1ELNode) EthClient() apis.EthClient

func (L1ELNode) IsCanonical added in v1.13.4

func (el L1ELNode) IsCanonical(ref eth.BlockID) bool

func (*L1ELNode) ReorgTriggered added in v1.13.4

func (el *L1ELNode) ReorgTriggered(target eth.L1BlockRef, attempts int)

func (*L1ELNode) ReorgTriggeredFn added in v1.13.4

func (el *L1ELNode) ReorgTriggeredFn(target eth.L1BlockRef, attempts int) CheckFunc

ReorgTriggeredFn returns a lambda that checks that a L1 reorg occurred on the expected block Composable with other lambdas to wait in parallel

func (*L1ELNode) String

func (el *L1ELNode) String() string

func (*L1ELNode) TransactionTimeout added in v1.13.4

func (el *L1ELNode) TransactionTimeout() time.Duration

func (L1ELNode) WaitForBlock

func (el L1ELNode) WaitForBlock() eth.BlockRef

func (L1ELNode) WaitForBlockNumber added in v1.13.4

func (el L1ELNode) WaitForBlockNumber(targetBlock uint64) eth.BlockRef

func (L1ELNode) WaitForFinalization added in v1.13.6

func (el L1ELNode) WaitForFinalization() eth.BlockRef

WaitForFinalization waits for the current block height to be finalized. Note that it does not ensure that the finalized block is the same as the current unsafe block (i.e., it is not reorg-aware).

func (L1ELNode) WaitForOnline added in v1.13.4

func (el L1ELNode) WaitForOnline()

func (L1ELNode) WaitForTime added in v1.14.1

func (el L1ELNode) WaitForTime(timestamp uint64) eth.BlockRef

WaitForTime waits until the chain has reached or surpassed the given timestamp.

type L1Network

type L1Network struct {
	// contains filtered or unexported fields
}

L1Network wraps a stack.L1Network interface for DSL operations

func NewL1Network

func NewL1Network(inner stack.L1Network) *L1Network

NewL1Network creates a new L1Network DSL wrapper

func (*L1Network) ChainID

func (n *L1Network) ChainID() eth.ChainID

func (*L1Network) Escape

func (n *L1Network) Escape() stack.L1Network

Escape returns the underlying stack.L1Network

func (*L1Network) PrintChain added in v1.13.4

func (n *L1Network) PrintChain()

PrintChain is used for testing/debugging, it prints the blockchain hashes and parent hashes to logs, which is useful when developing reorg tests

func (*L1Network) String

func (n *L1Network) String() string

func (*L1Network) WaitForBlock

func (n *L1Network) WaitForBlock() eth.BlockRef

func (*L1Network) WaitForFinalization added in v1.13.6

func (n *L1Network) WaitForFinalization() eth.BlockRef

func (*L1Network) WaitForOnline added in v1.13.4

func (n *L1Network) WaitForOnline()

type L2Batcher

type L2Batcher struct {
	// contains filtered or unexported fields
}

L2Batcher wraps a stack.L2Batcher interface for DSL operations

func NewL2Batcher

func NewL2Batcher(inner stack.L2Batcher) *L2Batcher

NewL2Batcher creates a new L2Batcher DSL wrapper

func (*L2Batcher) ActivityAPI

func (b *L2Batcher) ActivityAPI() apis.BatcherActivity

func (*L2Batcher) Escape

func (b *L2Batcher) Escape() stack.L2Batcher

Escape returns the underlying stack.L2Batcher

func (*L2Batcher) Start added in v1.13.4

func (b *L2Batcher) Start()

func (*L2Batcher) Stop added in v1.13.4

func (b *L2Batcher) Stop()

func (*L2Batcher) String

func (b *L2Batcher) String() string

type L2CLNode

type L2CLNode struct {
	// contains filtered or unexported fields
}

L2CLNode wraps a stack.L2CLNode interface for DSL operations

func NewL2CLNode

func NewL2CLNode(inner stack.L2CLNode, control stack.ControlPlane) *L2CLNode

NewL2CLNode creates a new L2CLNode DSL wrapper

func (*L2CLNode) Advanced

func (cl *L2CLNode) Advanced(lvl types.SafetyLevel, delta uint64, attempts int)

func (*L2CLNode) AdvancedFn added in v1.13.4

func (cl *L2CLNode) AdvancedFn(lvl types.SafetyLevel, delta uint64, attempts int) CheckFunc

AdvancedFn returns a lambda that checks the L2CL chain head with given safety level advanced more than delta block number Composable with other lambdas to wait in parallel

func (*L2CLNode) AwaitMinL1Processed added in v1.13.5

func (cl *L2CLNode) AwaitMinL1Processed(minL1 uint64)

func (*L2CLNode) ChainID

func (cl *L2CLNode) ChainID() eth.ChainID

func (*L2CLNode) ChainSyncStatus added in v1.13.4

func (cl *L2CLNode) ChainSyncStatus(chainID eth.ChainID, lvl types.SafetyLevel) eth.BlockID

ChainSyncStatus satisfies that the L2CLNode can provide sync status per chain

func (*L2CLNode) ConnectPeer added in v1.13.4

func (cl *L2CLNode) ConnectPeer(peer *L2CLNode)

func (*L2CLNode) DisconnectPeer

func (cl *L2CLNode) DisconnectPeer(peer *L2CLNode)

func (*L2CLNode) Escape

func (cl *L2CLNode) Escape() stack.L2CLNode

Escape returns the underlying stack.L2CLNode

func (*L2CLNode) HeadBlockRef

func (cl *L2CLNode) HeadBlockRef(lvl types.SafetyLevel) eth.L2BlockRef

HeadBlockRef fetches L2CL sync status and returns block ref with given safety level

func (*L2CLNode) ID added in v1.13.5

func (cl *L2CLNode) ID() stack.L2CLNodeID

func (*L2CLNode) IsP2PConnected added in v1.13.7

func (cl *L2CLNode) IsP2PConnected(peer *L2CLNode)

func (*L2CLNode) Lagged added in v1.13.4

func (cl *L2CLNode) Lagged(refNode SyncStatusProvider, lvl types.SafetyLevel, attempts int, allowMatch bool)

func (*L2CLNode) LaggedFn added in v1.13.4

func (cl *L2CLNode) LaggedFn(refNode SyncStatusProvider, lvl types.SafetyLevel, attempts int, allowMatch bool) CheckFunc

LaggedFn returns a lambda that checks the L2CL chain head with given safety level is lagged with the reference chain sync status provider Composable with other lambdas to wait in parallel

func (*L2CLNode) Matched added in v1.13.4

func (cl *L2CLNode) Matched(refNode SyncStatusProvider, lvl types.SafetyLevel, attempts int)

func (*L2CLNode) MatchedFn added in v1.13.4

func (cl *L2CLNode) MatchedFn(refNode SyncStatusProvider, lvl types.SafetyLevel, attempts int) CheckFunc

MatchedFn returns a lambda that checks the L2CLNode head with given safety level is matched with the refNode chain sync status provider Composable with other lambdas to wait in parallel

func (*L2CLNode) NotAdvanced added in v1.13.4

func (cl *L2CLNode) NotAdvanced(lvl types.SafetyLevel, attempts int)

func (*L2CLNode) NotAdvancedFn added in v1.13.4

func (cl *L2CLNode) NotAdvancedFn(lvl types.SafetyLevel, attempts int) CheckFunc

func (*L2CLNode) PeerInfo

func (cl *L2CLNode) PeerInfo() *apis.PeerInfo

func (*L2CLNode) Peers

func (cl *L2CLNode) Peers() *apis.PeerDump

func (*L2CLNode) Reached

func (cl *L2CLNode) Reached(lvl types.SafetyLevel, target uint64, attempts int)

func (*L2CLNode) ReachedFn added in v1.13.4

func (cl *L2CLNode) ReachedFn(lvl types.SafetyLevel, target uint64, attempts int) CheckFunc

ReachedFn returns a lambda that checks the L2CL chain head with given safety level reaches the target block number Composable with other lambdas to wait in parallel

func (*L2CLNode) ReachedRef added in v1.13.4

func (cl *L2CLNode) ReachedRef(lvl types.SafetyLevel, target eth.BlockID, attempts int)

func (*L2CLNode) ReachedRefFn added in v1.13.4

func (cl *L2CLNode) ReachedRefFn(lvl types.SafetyLevel, target eth.BlockID, attempts int) CheckFunc

ReachedRefFn is same as Reached, but has an additional check to ensure that the block referenced is not reorged Composable with other lambdas to wait in parallel

func (*L2CLNode) Rewinded added in v1.13.4

func (cl *L2CLNode) Rewinded(lvl types.SafetyLevel, delta uint64, attempts int)

func (*L2CLNode) RewindedFn added in v1.13.4

func (cl *L2CLNode) RewindedFn(lvl types.SafetyLevel, delta uint64, attempts int) CheckFunc

RewindedFn returns a lambda that checks the L2CL chain head with given safety level rewinded more than the delta block number Composable with other lambdas to wait in parallel

func (*L2CLNode) SafeL2BlockRef

func (cl *L2CLNode) SafeL2BlockRef() eth.L2BlockRef

func (*L2CLNode) SignalTarget added in v1.14.1

func (cl *L2CLNode) SignalTarget(el *L2ELNode, targetNum uint64)

func (*L2CLNode) Start

func (cl *L2CLNode) Start()

func (*L2CLNode) StartSequencer added in v1.13.4

func (cl *L2CLNode) StartSequencer()

func (*L2CLNode) Stop

func (cl *L2CLNode) Stop()

func (*L2CLNode) StopSequencer added in v1.13.4

func (cl *L2CLNode) StopSequencer() common.Hash

func (*L2CLNode) String

func (cl *L2CLNode) String() string

func (*L2CLNode) SyncStatus

func (cl *L2CLNode) SyncStatus() *eth.SyncStatus

func (*L2CLNode) VerifySafeHeadDatabaseMatches added in v1.13.5

func (cl *L2CLNode) VerifySafeHeadDatabaseMatches(sourceOfTruth *L2CLNode, args ...func(opts *safeHeadDbMatchOpts))

func (*L2CLNode) WaitForNonZeroUnsafeTime added in v1.13.7

func (cl *L2CLNode) WaitForNonZeroUnsafeTime(ctx context.Context) *eth.SyncStatus

type L2Challenger

type L2Challenger struct {
	// contains filtered or unexported fields
}

L2Challenger wraps a stack.L2Challenger interface for DSL operations

func NewL2Challenger

func NewL2Challenger(inner stack.L2Challenger) *L2Challenger

NewL2Challenger creates a new L2Challenger DSL wrapper

func (*L2Challenger) Escape

func (c *L2Challenger) Escape() stack.L2Challenger

Escape returns the underlying stack.L2Challenger

func (*L2Challenger) String

func (c *L2Challenger) String() string

type L2ELNode

type L2ELNode struct {
	// contains filtered or unexported fields
}

L2ELNode wraps a stack.L2ELNode interface for DSL operations

func NewL2ELNode

func NewL2ELNode(inner stack.L2ELNode, control stack.ControlPlane) *L2ELNode

NewL2ELNode creates a new L2ELNode DSL wrapper

func (*L2ELNode) Advanced added in v1.13.4

func (el *L2ELNode) Advanced(label eth.BlockLabel, block uint64)

func (*L2ELNode) AdvancedFn added in v1.13.4

func (el *L2ELNode) AdvancedFn(label eth.BlockLabel, block uint64) CheckFunc

func (*L2ELNode) BlockRefByHash added in v1.14.1

func (el *L2ELNode) BlockRefByHash(hash common.Hash) eth.L2BlockRef

func (*L2ELNode) BlockRefByLabel

func (el *L2ELNode) BlockRefByLabel(label eth.BlockLabel) eth.L2BlockRef

func (*L2ELNode) BlockRefByNumber

func (el *L2ELNode) BlockRefByNumber(num uint64) eth.L2BlockRef

func (L2ELNode) ChainID

func (el L2ELNode) ChainID() eth.ChainID

func (*L2ELNode) DisconnectPeerWith added in v1.14.1

func (el *L2ELNode) DisconnectPeerWith(peer *L2ELNode)

func (*L2ELNode) Escape

func (el *L2ELNode) Escape() stack.L2ELNode

Escape returns the underlying stack.L2ELNode

func (*L2ELNode) ForkchoiceUpdate added in v1.14.1

func (el *L2ELNode) ForkchoiceUpdate(refNode *L2ELNode, unsafe, safe, finalized uint64, attr *eth.PayloadAttributes) *ForkchoiceUpdateResult

ForkchoiceUpdate fetches FCU target hashes from the reference EL node, and FCU update with attributes

func (*L2ELNode) ID added in v1.13.5

func (el *L2ELNode) ID() stack.L2ELNodeID

func (L2ELNode) IsCanonical added in v1.13.4

func (el L2ELNode) IsCanonical(ref eth.BlockID) bool

func (*L2ELNode) NewPayload added in v1.14.1

func (el *L2ELNode) NewPayload(refNode *L2ELNode, number uint64) *NewPayloadResult

NewPayload fetches payload for target number from the reference EL Node, and inserts the payload

func (*L2ELNode) NotAdvanced added in v1.13.4

func (el *L2ELNode) NotAdvanced(label eth.BlockLabel)

func (*L2ELNode) NotAdvancedFn added in v1.13.4

func (el *L2ELNode) NotAdvancedFn(label eth.BlockLabel) CheckFunc

func (*L2ELNode) PayloadByNumber added in v1.14.1

func (el *L2ELNode) PayloadByNumber(number uint64) *eth.ExecutionPayloadEnvelope

func (*L2ELNode) PeerWith added in v1.13.5

func (el *L2ELNode) PeerWith(peer *L2ELNode)

func (*L2ELNode) Reached added in v1.14.1

func (el *L2ELNode) Reached(label eth.BlockLabel, block uint64, attempts int)

func (*L2ELNode) ReachedFn added in v1.14.1

func (el *L2ELNode) ReachedFn(label eth.BlockLabel, target uint64, attempts int) CheckFunc

func (*L2ELNode) ReorgTriggered added in v1.13.4

func (el *L2ELNode) ReorgTriggered(target eth.L2BlockRef, attempts int)

func (*L2ELNode) ReorgTriggeredFn added in v1.13.4

func (el *L2ELNode) ReorgTriggeredFn(target eth.L2BlockRef, attempts int) CheckFunc

ReorgTriggeredFn returns a lambda that checks that a L2 reorg occurred on the expected block Composable with other lambdas to wait in parallel

func (*L2ELNode) Start added in v1.13.5

func (el *L2ELNode) Start()

func (*L2ELNode) Stop added in v1.13.5

func (el *L2ELNode) Stop()

func (*L2ELNode) String

func (el *L2ELNode) String() string

func (*L2ELNode) TransactionTimeout added in v1.13.4

func (el *L2ELNode) TransactionTimeout() time.Duration

func (*L2ELNode) VerifyWithdrawalHashChangedIn added in v1.13.6

func (el *L2ELNode) VerifyWithdrawalHashChangedIn(blockHash common.Hash)

VerifyWithdrawalHashChangedIn verifies that the withdrawal hash changed between the parent and current block This is used to verify that the withdrawal hash changed in the block where the withdrawal was initiated

func (L2ELNode) WaitForBlock

func (el L2ELNode) WaitForBlock() eth.BlockRef

func (L2ELNode) WaitForBlockNumber added in v1.13.4

func (el L2ELNode) WaitForBlockNumber(targetBlock uint64) eth.BlockRef

func (L2ELNode) WaitForFinalization added in v1.13.6

func (el L2ELNode) WaitForFinalization() eth.BlockRef

WaitForFinalization waits for the current block height to be finalized. Note that it does not ensure that the finalized block is the same as the current unsafe block (i.e., it is not reorg-aware).

func (L2ELNode) WaitForOnline added in v1.13.4

func (el L2ELNode) WaitForOnline()

func (L2ELNode) WaitForTime added in v1.14.1

func (el L2ELNode) WaitForTime(timestamp uint64) eth.BlockRef

WaitForTime waits until the chain has reached or surpassed the given timestamp.

type L2Network

type L2Network struct {
	// contains filtered or unexported fields
}

L2Network wraps a stack.L2Network interface for DSL operations

func NewL2Network

func NewL2Network(inner stack.L2Network, control stack.ControlPlane) *L2Network

NewL2Network creates a new L2Network DSL wrapper

func (*L2Network) AwaitActivation

func (n *L2Network) AwaitActivation(t devtest.T, forkName rollup.ForkName) eth.BlockID

AwaitActivation awaits the fork activation time, and returns the activation block

func (*L2Network) CatchUpTo

func (n *L2Network) CatchUpTo(o *L2Network)

func (*L2Network) ChainID

func (n *L2Network) ChainID() eth.ChainID

func (*L2Network) DepositContractAddr added in v1.13.5

func (n *L2Network) DepositContractAddr() common.Address

func (*L2Network) DisputeGameFactoryProxyAddr added in v1.13.4

func (n *L2Network) DisputeGameFactoryProxyAddr() common.Address

func (*L2Network) Escape

func (n *L2Network) Escape() stack.L2Network

Escape returns the underlying stack.L2Network

func (*L2Network) IsActivated added in v1.13.4

func (n *L2Network) IsActivated(timestamp uint64) bool

IsActivated checks if a given fork has been activated

func (*L2Network) L2ELNodes added in v1.13.5

func (n *L2Network) L2ELNodes() []*L2ELNode

func (*L2Network) LatestBlockBeforeTimestamp

func (n *L2Network) LatestBlockBeforeTimestamp(t devtest.T, timestamp uint64) eth.BlockRef

LatestBlockBeforeTimestamp finds the latest block before fork activation

func (*L2Network) PrintChain

func (n *L2Network) PrintChain()

PrintChain is used for testing/debugging, it prints the blockchain hashes and parent hashes to logs, which is useful when developing reorg tests

func (*L2Network) PublicRPC added in v1.13.4

func (n *L2Network) PublicRPC() *L2ELNode

func (*L2Network) String

func (n *L2Network) String() string

func (*L2Network) WaitForBlock

func (n *L2Network) WaitForBlock() eth.BlockRef

type L2NetworkProvider added in v1.13.6

type L2NetworkProvider interface {
	L2Networks() []*L2Network
}

L2NetworkProvider is an interface that provides access to L2 networks

type L2Proposer

type L2Proposer struct {
	// contains filtered or unexported fields
}

L2Proposer wraps a stack.L2Proposer interface for DSL operations

func NewL2Proposer

func NewL2Proposer(inner stack.L2Proposer) *L2Proposer

NewL2Proposer creates a new L2Proposer DSL wrapper

func (*L2Proposer) Escape

func (p *L2Proposer) Escape() stack.L2Proposer

Escape returns the underlying stack.L2Proposer

func (*L2Proposer) String

func (p *L2Proposer) String() string

type MultiClient added in v1.13.6

type MultiClient struct {
	// contains filtered or unexported fields
}

MultiClient is a simple client that checks hash consistency between underlying clients

func MultiClientForL1Network added in v1.13.6

func MultiClientForL1Network(network *L1Network) (*MultiClient, error)

MultiClientForL1Network creates a MultiClient from an L1Network

func MultiClientForL2Network added in v1.13.6

func MultiClientForL2Network(network *L2Network) (*MultiClient, error)

MultiClientForL2Network creates a MultiClient from an L2Network

func NewMultiClient added in v1.13.6

func NewMultiClient(clients []HeaderProvider) *MultiClient

NewMultiClient creates a new MultiClient with the specified underlying clients

func (*MultiClient) InfoByHash added in v1.13.6

func (mc *MultiClient) InfoByHash(ctx context.Context, hash common.Hash) (eth.BlockInfo, error)

InfoByHash returns block info from the first client while verifying hash consistency

func (*MultiClient) InfoByLabel added in v1.13.6

func (mc *MultiClient) InfoByLabel(ctx context.Context, label eth.BlockLabel) (eth.BlockInfo, error)

InfoByLabel returns block info from the first client while verifying hash consistency

func (*MultiClient) InfoByNumber added in v1.13.6

func (mc *MultiClient) InfoByNumber(ctx context.Context, number uint64) (eth.BlockInfo, error)

InfoByNumber returns block info from the first client while verifying hash consistency

type NewPayloadResult added in v1.14.1

type NewPayloadResult struct {
	T      devtest.T
	Status *eth.PayloadStatusV1
	Err    error
}

func (*NewPayloadResult) IsPayloadStatus added in v1.14.1

func (r *NewPayloadResult) IsPayloadStatus(status eth.ExecutePayloadStatus) *NewPayloadResult

func (*NewPayloadResult) IsSyncing added in v1.14.1

func (r *NewPayloadResult) IsSyncing() *NewPayloadResult

func (*NewPayloadResult) IsValid added in v1.14.1

func (r *NewPayloadResult) IsValid() *NewPayloadResult

type OperatorFee added in v1.13.6

type OperatorFee struct {
	// contains filtered or unexported fields
}

func NewOperatorFee added in v1.13.6

func NewOperatorFee(t devtest.T, l2Network *L2Network, l1EL *L1ELNode) *OperatorFee

func (*OperatorFee) CheckCompatibility added in v1.13.6

func (of *OperatorFee) CheckCompatibility() bool

func (*OperatorFee) GetSystemOwner added in v1.13.6

func (of *OperatorFee) GetSystemOwner() *EOA

func (*OperatorFee) RestoreOriginalConfig added in v1.13.6

func (of *OperatorFee) RestoreOriginalConfig()

func (*OperatorFee) SetOperatorFee added in v1.13.6

func (of *OperatorFee) SetOperatorFee(scalar uint32, constant uint64)

func (*OperatorFee) ValidateTransactionFees added in v1.13.6

func (of *OperatorFee) ValidateTransactionFees(from *EOA, to *EOA, amount *big.Int, expectedScalar uint32, expectedConstant uint64) OperatorFeeValidationResult

func (*OperatorFee) VerifyL2Config added in v1.13.6

func (of *OperatorFee) VerifyL2Config(expectedScalar uint32, expectedConstant uint64)

func (*OperatorFee) WaitForL2Sync added in v1.13.6

func (of *OperatorFee) WaitForL2Sync(expectedScalar uint32, expectedConstant uint64)

func (*OperatorFee) WaitForL2SyncWithCurrentL1State added in v1.13.6

func (of *OperatorFee) WaitForL2SyncWithCurrentL1State()

type OperatorFeeValidationResult added in v1.13.6

type OperatorFeeValidationResult struct {
	TransactionReceipt   *types.Receipt
	ExpectedOperatorFee  *big.Int
	ActualTotalFee       *big.Int
	VaultBalanceIncrease *big.Int
}

type ProvenWithdrawalParameters added in v1.13.5

type ProvenWithdrawalParameters struct {
	Nonce              *big.Int
	Sender             common.Address
	Target             common.Address
	Value              *big.Int
	GasLimit           *big.Int
	DisputeGameAddress common.Address
	DisputeGameIndex   *big.Int
	Data               []byte
	SuperRootProof     *bindings.SuperRootProof // Only set for games using super roots
	OutputRootIndex    *big.Int                 // Only set for games using super roots
	OutputRootProof    bindings.OutputRootProof
	WithdrawalProof    [][]byte // List of trie nodes to prove L2 storage
}

ProvenWithdrawalParameters is the set of parameters to pass to the ProveWithdrawalTransaction and FinalizeWithdrawalTransaction functions

type StandardBridge added in v1.13.5

type StandardBridge struct {
	// contains filtered or unexported fields
}

func NewStandardBridge added in v1.13.5

func NewStandardBridge(t devtest.T, l2Network *L2Network, supervisor *Supervisor, l1EL *L1ELNode) *StandardBridge

func (*StandardBridge) CreateL2Token added in v1.13.6

func (b *StandardBridge) CreateL2Token(l1TokenAddr common.Address, name string, symbol string, from *EOA) common.Address

CreateL2Token creates an L2 token using OptimismMintableERC20Factory and returns the token address

func (*StandardBridge) Deposit added in v1.13.5

func (b *StandardBridge) Deposit(amount eth.ETH, from *EOA) Deposit

func (*StandardBridge) DisputeGameFinalityDelay added in v1.13.5

func (b *StandardBridge) DisputeGameFinalityDelay() time.Duration

func (*StandardBridge) ERC20Deposit added in v1.13.6

func (b *StandardBridge) ERC20Deposit(l1TokenAddr common.Address, l2TokenAddr common.Address, amount eth.ETH, from *EOA) *Deposit

ERC20Deposit performs an ERC20 deposit from L1 to L2

func (*StandardBridge) GameResolutionDelay added in v1.13.5

func (b *StandardBridge) GameResolutionDelay() time.Duration

func (*StandardBridge) InitiateWithdrawal added in v1.13.5

func (b *StandardBridge) InitiateWithdrawal(amount eth.ETH, from *EOA) *Withdrawal

func (*StandardBridge) PortalVersion added in v1.13.7

func (b *StandardBridge) PortalVersion() string

func (*StandardBridge) RespectedGameType added in v1.13.5

func (b *StandardBridge) RespectedGameType() uint32

func (*StandardBridge) UsesSuperRoots added in v1.13.5

func (b *StandardBridge) UsesSuperRoots() bool

func (*StandardBridge) WithdrawalDelay added in v1.13.5

func (b *StandardBridge) WithdrawalDelay() time.Duration

type Superchain

type Superchain struct {
	// contains filtered or unexported fields
}

Superchain wraps a stack.Superchain interface for DSL operations

func NewSuperchain

func NewSuperchain(inner stack.Superchain) *Superchain

NewSuperchain creates a new Superchain DSL wrapper

func (*Superchain) Escape

func (s *Superchain) Escape() stack.Superchain

Escape returns the underlying stack.Superchain

func (*Superchain) String

func (s *Superchain) String() string

type Supervisor

type Supervisor struct {
	// contains filtered or unexported fields
}

func NewSupervisor

func NewSupervisor(inner stack.Supervisor, control stack.ControlPlane) *Supervisor

func (*Supervisor) AddManagedL2CL added in v1.13.4

func (s *Supervisor) AddManagedL2CL(cl *L2CLNode)

func (*Supervisor) AdvancedSafeHead

func (s *Supervisor) AdvancedSafeHead(chainID eth.ChainID, delta uint64, attempts int)

func (*Supervisor) AwaitMinCrossSafeTimestamp added in v1.13.5

func (s *Supervisor) AwaitMinCrossSafeTimestamp(timestamp uint64)

func (*Supervisor) AwaitMinL1 added in v1.13.4

func (s *Supervisor) AwaitMinL1(minL1 uint64)

func (*Supervisor) ChainSyncStatus added in v1.13.4

func (s *Supervisor) ChainSyncStatus(chainID eth.ChainID, lvl types.SafetyLevel) eth.BlockID

ChainSyncStatus satisfies that the supervisor can provide sync status per chain

func (*Supervisor) Escape

func (s *Supervisor) Escape() stack.Supervisor

func (*Supervisor) FetchSuperRootAtTimestamp added in v1.13.4

func (s *Supervisor) FetchSuperRootAtTimestamp(timestamp uint64) eth.SuperRootResponse

func (*Supervisor) FetchSyncStatus

func (s *Supervisor) FetchSyncStatus() eth.SupervisorSyncStatus

func (*Supervisor) L2HeadBlockID

func (s *Supervisor) L2HeadBlockID(chainID eth.ChainID, lvl types.SafetyLevel) eth.BlockID

L2HeadBlockID fetches supervisor sync status and returns block id with given safety level

func (*Supervisor) SafeBlockID

func (s *Supervisor) SafeBlockID(chainID eth.ChainID) eth.BlockID

func (*Supervisor) Start added in v1.13.4

func (s *Supervisor) Start()

func (*Supervisor) Stop added in v1.13.4

func (s *Supervisor) Stop()

func (*Supervisor) String

func (s *Supervisor) String() string

func (*Supervisor) VerifySyncStatus

func (s *Supervisor) VerifySyncStatus(opts ...func(config *VerifySyncStatusConfig))

VerifySyncStatus performs assertions based on the supervisor's SyncStatus endpoint.

func (*Supervisor) WaitForL2HeadToAdvance added in v1.13.4

func (s *Supervisor) WaitForL2HeadToAdvance(chainID eth.ChainID, delta uint64, lvl types.SafetyLevel, attempts int)

WaitForL2HeadToAdvance checks the supervisor view of L2CL chain head with given safety level advanced more than delta block number

func (*Supervisor) WaitForL2HeadToAdvanceTo added in v1.13.4

func (s *Supervisor) WaitForL2HeadToAdvanceTo(chainID eth.ChainID, lvl types.SafetyLevel, blockID eth.BlockID)

func (*Supervisor) WaitForUnsafeHeadToAdvance added in v1.13.4

func (s *Supervisor) WaitForUnsafeHeadToAdvance(chainID eth.ChainID, delta uint64)

type SyncStatusProvider added in v1.13.4

type SyncStatusProvider interface {
	ChainSyncStatus(chainID eth.ChainID, lvl types.SafetyLevel) eth.BlockID
	String() string
}

type SyncTester added in v1.13.6

type SyncTester struct {
	// contains filtered or unexported fields
}

SyncTester wraps a stack.SyncTester interface for DSL operations

func NewSyncTester added in v1.13.6

func NewSyncTester(inner stack.SyncTester) *SyncTester

NewSyncTester creates a new Sync Tester DSL wrapper

func (*SyncTester) ChainID added in v1.13.6

func (s *SyncTester) ChainID(sessionID string) eth.ChainID

func (*SyncTester) DeleteSession added in v1.13.6

func (s *SyncTester) DeleteSession(sessionID string)

func (*SyncTester) Escape added in v1.13.6

func (s *SyncTester) Escape() stack.SyncTester

Escape returns the underlying stack.SyncTester

func (*SyncTester) GetSession added in v1.13.6

func (s *SyncTester) GetSession(sessionID string) *eth.SyncTesterSession

func (*SyncTester) ListSessions added in v1.13.6

func (s *SyncTester) ListSessions() []string

type TestSequencer added in v1.13.4

type TestSequencer struct {
	// contains filtered or unexported fields
}

func NewTestSequencer added in v1.13.4

func NewTestSequencer(inner stack.TestSequencer) *TestSequencer

func (*TestSequencer) Escape added in v1.13.4

func (s *TestSequencer) Escape() stack.TestSequencer

func (*TestSequencer) String added in v1.13.4

func (s *TestSequencer) String() string

type VaultBalances added in v1.13.6

type VaultBalances struct {
	BaseFeeVault   *big.Int
	L1FeeVault     *big.Int
	SequencerVault *big.Int
	OperatorVault  *big.Int
}

type VerifySyncStatusConfig

type VerifySyncStatusConfig struct {
	AllUnsafeHeadsAdvance uint64
}

type Withdrawal added in v1.13.5

type Withdrawal struct {
	// contains filtered or unexported fields
}

func (*Withdrawal) Finalize added in v1.13.5

func (w *Withdrawal) Finalize(user *EOA)

func (*Withdrawal) FinalizeGasCost added in v1.13.5

func (w *Withdrawal) FinalizeGasCost() eth.ETH

func (*Withdrawal) InitiateBlockHash added in v1.13.6

func (w *Withdrawal) InitiateBlockHash() common.Hash

func (*Withdrawal) InitiateGasCost added in v1.13.5

func (w *Withdrawal) InitiateGasCost() eth.ETH

func (*Withdrawal) Prove added in v1.13.5

func (w *Withdrawal) Prove(user *EOA)

func (*Withdrawal) ProveGasCost added in v1.13.5

func (w *Withdrawal) ProveGasCost() eth.ETH

func (*Withdrawal) WaitForDisputeGameResolved added in v1.13.5

func (w *Withdrawal) WaitForDisputeGameResolved()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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