intentbuilder

package
v1.21.0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: MIT Imports: 17 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func KeyToAddrProvider

func KeyToAddrProvider(t require.TestingT, dk devkeys.Keys) func(k devkeys.Key) common.Address

func RoleToAddrProvider

func RoleToAddrProvider(t require.TestingT, dk devkeys.Keys, chainID eth.ChainID) func(k devkeys.Role) common.Address

func WithDevkeyL1Roles

func WithDevkeyL1Roles(t require.TestingT, dk devkeys.Keys, configurator L2Configurator, l1ChainID eth.ChainID)

func WithDevkeyL2Roles

func WithDevkeyL2Roles(t require.TestingT, dk devkeys.Keys, configurator L2Configurator)

func WithDevkeySuperRoles

func WithDevkeySuperRoles(t require.TestingT, dk devkeys.Keys, l1ID eth.ChainID, configurator SuperchainConfigurator)

func WithDevkeyVaults

func WithDevkeyVaults(t require.TestingT, dk devkeys.Keys, configurator L2Configurator)

func WithOverrideGuardianToL1PAO

func WithOverrideGuardianToL1PAO(t require.TestingT, dk devkeys.Keys, l1ID eth.ChainID, configurator SuperchainConfigurator)

Types

type Builder

type Builder interface {
	WithL1ContractsLocator(loc *artifacts.Locator) Builder
	WithL2ContractsLocator(loc *artifacts.Locator) Builder

	WithSuperchain() (Builder, SuperchainConfigurator)
	WithL1(l1ChainID eth.ChainID) (Builder, L1Configurator)
	WithL2(l2ChainID eth.ChainID) (Builder, L2Configurator)
	L1() L1Configurator
	L2s() (out []L2Configurator)
	Build() (*state.Intent, error)

	WithGlobalOverride(key string, value any) Builder
	GlobalOverride(key string) any
	WithUseInterop(enabled bool) Builder
}

func New

func New() Builder

type ContractsConfigurator

type ContractsConfigurator interface {
	WithL1ContractsLocator(url string)
	WithL2ContractsLocator(url string)
}

type L1Configurator

type L1Configurator interface {
	WithChainID(chainID eth.ChainID) L1Configurator
	WithTimestamp(v uint64) L1Configurator
	WithGasLimit(v uint64) L1Configurator
	WithExcessBlobGas(v uint64) L1Configurator
	WithL1ForkAtGenesis(forks.Fork) L1Configurator
	WithL1ForkAtOffset(forks.Fork, *uint64) L1Configurator
	WithL1BlobSchedule(schedule *params.BlobScheduleConfig) L1Configurator
	WithPrefundedAccount(addr common.Address, amount uint256.Int) L1Configurator
	// WithBlockTime sets the L1 block time in seconds. It is not part of the intent: it is
	// read back with BlockTime by whatever runs the L1 chain.
	WithBlockTime(seconds uint64) L1Configurator
	BlockTime() uint64
}

type L2Configurator

type L2Configurator interface {
	L1Config() L1Configurator
	ChainID() eth.ChainID
	WithBlockTime(uint64)
	WithL1StartBlockHash(hash common.Hash)
	WithAdditionalDisputeGames(games []state.AdditionalDisputeGame)
	WithFinalizationPeriodSeconds(value uint64)
	WithAltDA(cfg genesis.AltDADeployConfig)
	WithCustomGasToken(name string, symbol string, initialLiquidity *big.Int, liquidityControllerOwner common.Address)
	ContractsConfigurator
	L2VaultsConfigurator
	L2RolesConfigurator
	L2FeesConfigurator
	L2HardforkConfigurator
	WithPrefundedAccount(addr common.Address, amount uint256.Int) L2Configurator
	WithDAFootprintGasScalar(scalar uint16)
	WithGasLimit(v uint64)
}

type L2FeesConfigurator

type L2FeesConfigurator interface {
	WithEIP1559DenominatorCanyon(uint64)
	WithEIP1559Denominator(uint64)
	WithEIP1559Elasticity(uint64)
	WithOperatorFeeScalar(uint64)
	WithOperatorFeeConstant(uint64)
}

type L2HardforkConfigurator

type L2HardforkConfigurator interface {
	WithForkAtGenesis(fork opforks.Name)
	// WithForkAtOffset activates fork at offset and deactivates every later fork; a nil
	// offset deactivates fork too. Calls are order-sensitive.
	WithForkAtOffset(fork opforks.Name, offset *uint64)
	WithKeepKarstUpgradeGas()
}

type L2RolesConfigurator

type L2RolesConfigurator interface {
	WithL1ProxyAdminOwner(address common.Address)
	WithL2ProxyAdminOwner(address common.Address)
	WithSystemConfigOwner(address common.Address)
	WithUnsafeBlockSigner(address common.Address)
	WithBatcher(address common.Address)
	WithProposer(address common.Address)
	WithChallenger(address common.Address)
}

type L2VaultsConfigurator

type L2VaultsConfigurator interface {
	WithBaseFeeVaultRecipient(address common.Address)
	WithSequencerFeeVaultRecipient(address common.Address)
	WithL1FeeVaultRecipient(address common.Address)
	WithOperatorFeeVaultRecipient(address common.Address)
}

type SuperchainConfigurator

type SuperchainConfigurator interface {
	ID() SuperchainID
	L1ChainID() eth.ChainID
	WithSuperchainConfigProxy(address common.Address) SuperchainConfigurator
	WithProxyAdminOwner(address common.Address) SuperchainConfigurator
	WithGuardian(address common.Address) SuperchainConfigurator
	WithChallenger(address common.Address) SuperchainConfigurator
}

type SuperchainID

type SuperchainID string

Jump to

Keyboard shortcuts

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