interopgen

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: MIT Imports: 19 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateL1 added in v1.9.4

func CreateL1(logger log.Logger, fa *foundry.ArtifactsFS, srcFS *foundry.SourceMapFS, cfg *L1Config) *script.Host

func CreateL2 added in v1.9.4

func CreateL2(logger log.Logger, fa *foundry.ArtifactsFS, srcFS *foundry.SourceMapFS, l2Cfg *L2Config, genesisTimestamp uint64) *script.Host

func Ether

func Ether(v uint64) *big.Int

Ether converts a uint64 Ether amount into a *big.Int amount in wei units, for allocating test balances.

func GenesisL2 added in v1.9.4

func GenesisL2(l2Host *script.Host, cfg *L2Config, deployment *L2Deployment) error

Types

type Implementations

type Implementations struct {
	Opcm                             common.Address `json:"OPCM"`
	DelayedWETHImpl                  common.Address `json:"DelayedWETHImpl"`
	OptimismPortalImpl               common.Address `json:"OptimismPortalImpl"`
	PreimageOracleSingleton          common.Address `json:"PreimageOracleSingleton"`
	MipsSingleton                    common.Address `json:"MipsSingleton"`
	SystemConfigImpl                 common.Address `json:"SystemConfigImpl"`
	L1CrossDomainMessengerImpl       common.Address `json:"L1CrossDomainMessengerImpl"`
	L1ERC721BridgeImpl               common.Address `json:"L1ERC721BridgeImpl"`
	L1StandardBridgeImpl             common.Address `json:"L1StandardBridgeImpl"`
	OptimismMintableERC20FactoryImpl common.Address `json:"OptimismMintableERC20FactoryImpl"`
	DisputeGameFactoryImpl           common.Address `json:"DisputeGameFactoryImpl"`
}

type InteropDevRecipe

type InteropDevRecipe struct {
	L1ChainID        uint64
	L2ChainIDs       []uint64
	GenesisTimestamp uint64
}

func (*InteropDevRecipe) Build

func (r *InteropDevRecipe) Build(addrs devkeys.Addresses) (*WorldConfig, error)

type L1Config

type L1Config struct {
	ChainID *big.Int
	genesis.DevL1DeployConfig
	Prefund map[common.Address]*big.Int
}

func (*L1Config) Check

func (c *L1Config) Check(log log.Logger) error

type L1Deployment

type L1Deployment struct {
}

func PrepareInitialL1 added in v1.9.4

func PrepareInitialL1(l1Host *script.Host, cfg *L1Config) (*L1Deployment, error)

prepareInitialL1 deploys basics such as preinstalls to L1 (incl. EIP-4788)

type L1Output

type L1Output struct {
	Genesis *core.Genesis
}

func CompleteL1 added in v1.9.4

func CompleteL1(l1Host *script.Host, cfg *L1Config) (*L1Output, error)

type L2Config

type L2Config struct {
	Deployer          common.Address // account used to deploy contracts to L2
	Proposer          common.Address
	Challenger        common.Address
	SystemConfigOwner common.Address
	genesis.L2InitializationConfig
	Prefund                 map[common.Address]*big.Int
	SaltMixer               string
	GasLimit                uint64
	DisputeGameType         uint32
	DisputeAbsolutePrestate common.Hash
	DisputeMaxGameDepth     uint64
	DisputeSplitDepth       uint64
	DisputeClockExtension   uint64
	DisputeMaxClockDuration uint64
}

func InteropL2DevConfig

func InteropL2DevConfig(l1ChainID, l2ChainID uint64, addrs devkeys.Addresses) (*L2Config, error)

func (*L2Config) Check

func (c *L2Config) Check(log log.Logger) error

type L2Deployment

type L2Deployment struct {
	L2OpchainDeployment
}

func DeployL2ToL1 added in v1.9.4

func DeployL2ToL1(l1Host *script.Host, superCfg *SuperchainConfig, superDeployment *SuperchainDeployment, cfg *L2Config) (*L2Deployment, error)

type L2OpchainDeployment

type L2OpchainDeployment struct {
	OpChainProxyAdmin                 common.Address `json:"OpChainProxyAdmin"`
	AddressManager                    common.Address `json:"AddressManager"`
	L1ERC721BridgeProxy               common.Address `json:"L1ERC721BridgeProxy"`
	SystemConfigProxy                 common.Address `json:"SystemConfigProxy"`
	OptimismMintableERC20FactoryProxy common.Address `json:"OptimismMintableERC20FactoryProxy"`
	L1StandardBridgeProxy             common.Address `json:"L1StandardBridgeProxy"`
	L1CrossDomainMessengerProxy       common.Address `json:"L1CrossDomainMessengerProxy"`
	// Fault proof contracts below.
	OptimismPortalProxy                common.Address `json:"OptimismPortalProxy"`
	DisputeGameFactoryProxy            common.Address `json:"DisputeGameFactoryProxy"`
	AnchorStateRegistryProxy           common.Address `json:"AnchorStateRegistryProxy"`
	AnchorStateRegistryImpl            common.Address `json:"AnchorStateRegistryImpl"`
	FaultDisputeGame                   common.Address `json:"FaultDisputeGame"`
	PermissionedDisputeGame            common.Address `json:"PermissionedDisputeGame"`
	DelayedWETHPermissionedGameProxy   common.Address `json:"DelayedWETHPermissionedGameProxy"`
	DelayedWETHPermissionlessGameProxy common.Address `json:"DelayedWETHPermissionlessGameProxy"`
}

type L2Output

type L2Output struct {
	Genesis   *core.Genesis
	RollupCfg *rollup.Config
}

func CompleteL2 added in v1.9.4

func CompleteL2(l2Host *script.Host, cfg *L2Config, l1Block *types.Block, deployment *L2Deployment) (*L2Output, error)

type OPCMImplementationsConfig

type OPCMImplementationsConfig struct {
	L1ContractsRelease string

	FaultProof SuperFaultProofConfig

	UseInterop bool // to deploy Interop implementation contracts, instead of the regular ones.

	StandardVersionsToml string // serialized string of superchain-registry 'standard-versions-mainnet.toml' file
}

type SuperFaultProofConfig

type SuperFaultProofConfig struct {
	WithdrawalDelaySeconds          *big.Int
	MinProposalSizeBytes            *big.Int
	ChallengePeriodSeconds          *big.Int
	ProofMaturityDelaySeconds       *big.Int
	DisputeGameFinalityDelaySeconds *big.Int
	MipsVersion                     *big.Int
}

type SuperchainConfig

type SuperchainConfig struct {
	Deployer common.Address

	ProxyAdminOwner       common.Address
	ProtocolVersionsOwner common.Address

	Paused bool

	Implementations OPCMImplementationsConfig

	genesis.SuperchainL1DeployConfig
}

func (*SuperchainConfig) Check

func (c *SuperchainConfig) Check(log log.Logger) error

type SuperchainDeployment

type SuperchainDeployment struct {
	Implementations

	ProxyAdmin common.Address `json:"ProxyAdmin"`

	ProtocolVersions      common.Address `json:"ProtocolVersions"`
	ProtocolVersionsProxy common.Address `json:"ProtocolVersionsProxy"`

	SuperchainConfig      common.Address `json:"SuperchainConfig"`
	SuperchainConfigProxy common.Address `json:"SuperchainConfigProxy"`
}

func DeploySuperchainToL1 added in v1.9.4

func DeploySuperchainToL1(l1Host *script.Host, superCfg *SuperchainConfig) (*SuperchainDeployment, error)

type WorldConfig

type WorldConfig struct {
	L1         *L1Config
	Superchain *SuperchainConfig
	L2s        map[string]*L2Config
}

func (*WorldConfig) Check

func (c *WorldConfig) Check(log log.Logger) error

type WorldDeployment

type WorldDeployment struct {
	L1         *L1Deployment            `json:"L1"`
	Superchain *SuperchainDeployment    `json:"Superchain"`
	L2s        map[string]*L2Deployment `json:"L2s"`
}

type WorldOutput

type WorldOutput struct {
	L1  *L1Output
	L2s map[string]*L2Output
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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