Documentation
¶
Index ¶
- Variables
- func EncodeStartingAnchorRoot(root StartingAnchorRoot) ([]byte, error)
- func InsertPreinstalls(host *script.Host) error
- func NewDeployImplementationsForgeCaller(client *forge.Client) forge.ScriptCaller[DeployImplementationsInput, DeployImplementationsOutput]
- func NewDeployOPChainForgeCaller(client *forge.Client) forge.ScriptCaller[DeployOPChainInput, DeployOPChainOutput]
- func NewDeploySuperchainForgeCaller(client *forge.Client) forge.ScriptCaller[DeploySuperchainInput, DeploySuperchainOutput]
- func NewReadImplementationAddressesForgeCaller(client *forge.Client) ...
- func RunScriptSingle[I any, O any](host *script.Host, input I, scriptFile string, contractName string) (O, error)
- func RunScriptVoid[I any](host *script.Host, input I, scriptFile string, contractName string) error
- func SetDisputeGameImpl(h *script.Host, input SetDisputeGameImplInput) error
- type AddGameTypeInput
- type AddGameTypeOutput
- type AddGameTypeScript
- type Contract
- func (c *Contract) GenericAddressGetter(ctx context.Context, functionName string) (common.Address, error)
- func (c *Contract) GetAddressByNameViaAddressManager(ctx context.Context, name string) (common.Address, error)
- func (c *Contract) ProtocolVersions(ctx context.Context) (common.Address, error)
- func (c *Contract) SuperchainConfig(ctx context.Context) (common.Address, error)
- type DeployAlphabetVMInput
- type DeployAlphabetVMOutput
- type DeployAlphabetVMScript
- type DeployAltDAInput
- type DeployAltDAOutput
- type DeployAltDAScript
- type DeployAsteriscInput
- type DeployAsteriscOutput
- type DeployAsteriscScript
- type DeployDisputeGameInput
- type DeployDisputeGameOutput
- type DeployDisputeGameScript
- type DeployImplementationsInput
- type DeployImplementationsOutput
- type DeployImplementationsScript
- type DeployMIPS2Input
- type DeployMIPS2Output
- type DeployMIPSInput
- type DeployMIPSOutput
- type DeployMIPSScript
- type DeployOPChainInput
- type DeployOPChainOutput
- type DeployOPChainScript
- type DeploySuperchainInput
- type DeploySuperchainOutput
- type DeploySuperchainScript
- type L2GenesisInput
- type L2GenesisScript
- type PreinstallsScript
- type ReadImplementationAddressesInput
- type ReadImplementationAddressesOutput
- type ReadImplementationAddressesScript
- type ReadSuperchainDeploymentInput
- type ReadSuperchainDeploymentOutput
- type ReadSuperchainDeploymentScript
- type Scripts
- type SetDisputeGameImplInput
- type SingleScript
- type StartingAnchorRoot
- type VoidScript
Constants ¶
This section is empty.
Variables ¶
var DefaultStartingAnchorRoot = StartingAnchorRoot{ Root: common.Hash{0xde, 0xad}, L2BlockNumber: common.Big0, }
var PermissionedGameStartingAnchorRoot = []byte{
0xde, 0xad, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
}
PermissionedGameStartingAnchorRoot is a root of bytes32(hex"dead") for the permissioned game at block 0, and no root for the permissionless game.
Functions ¶
func EncodeStartingAnchorRoot ¶ added in v1.11.0
func EncodeStartingAnchorRoot(root StartingAnchorRoot) ([]byte, error)
func InsertPreinstalls ¶ added in v1.13.1
InsertPreinstalls inserts preinstalls in the given host. This is part of the L2Genesis already, but is isolated to be reused for L1 dev genesis.
func NewDeployImplementationsForgeCaller ¶ added in v1.14.0
func NewDeployImplementationsForgeCaller(client *forge.Client) forge.ScriptCaller[DeployImplementationsInput, DeployImplementationsOutput]
func NewDeployOPChainForgeCaller ¶ added in v1.14.0
func NewDeployOPChainForgeCaller(client *forge.Client) forge.ScriptCaller[DeployOPChainInput, DeployOPChainOutput]
func NewDeploySuperchainForgeCaller ¶ added in v1.14.0
func NewDeploySuperchainForgeCaller(client *forge.Client) forge.ScriptCaller[DeploySuperchainInput, DeploySuperchainOutput]
func NewReadImplementationAddressesForgeCaller ¶ added in v1.14.0
func NewReadImplementationAddressesForgeCaller(client *forge.Client) forge.ScriptCaller[ReadImplementationAddressesInput, ReadImplementationAddressesOutput]
func RunScriptSingle ¶ added in v1.11.0
func RunScriptVoid ¶ added in v1.11.0
func SetDisputeGameImpl ¶ added in v1.11.0
func SetDisputeGameImpl( h *script.Host, input SetDisputeGameImplInput, ) error
Types ¶
type AddGameTypeInput ¶ added in v1.13.3
type AddGameTypeInput struct {
L1ProxyAdminOwner common.Address `abi:"prank"`
OPCMImpl common.Address `abi:"opcmImpl"`
SystemConfigProxy common.Address
DelayedWETHProxy common.Address
DisputeGameType uint32
DisputeAbsolutePrestate common.Hash
DisputeMaxGameDepth *big.Int
DisputeSplitDepth *big.Int
DisputeClockExtension uint64
DisputeMaxClockDuration uint64
InitialBond *big.Int
VM common.Address `abi:"vm"`
Permissioned bool
SaltMixer string
}
func (AddGameTypeInput) MarshalJSON ¶ added in v1.13.3
func (a AddGameTypeInput) MarshalJSON() ([]byte, error)
func (*AddGameTypeInput) UnmarshalJSON ¶ added in v1.13.3
func (a *AddGameTypeInput) UnmarshalJSON(b []byte) error
type AddGameTypeOutput ¶ added in v1.13.3
type AddGameTypeScript ¶ added in v1.13.3
type AddGameTypeScript script.DeployScriptWithOutput[AddGameTypeInput, AddGameTypeOutput]
func NewAddGameTypeScript ¶ added in v1.13.3
func NewAddGameTypeScript(host *script.Host) (AddGameTypeScript, error)
type Contract ¶
type Contract struct {
// contains filtered or unexported fields
}
func (*Contract) GenericAddressGetter ¶
func (*Contract) GetAddressByNameViaAddressManager ¶
func (c *Contract) GetAddressByNameViaAddressManager(ctx context.Context, name string) (common.Address, error)
Used to call getAddress(string) on legacy AddressManager contract
func (*Contract) ProtocolVersions ¶
type DeployAlphabetVMInput ¶ added in v1.11.0
type DeployAlphabetVMOutput ¶ added in v1.11.0
type DeployAlphabetVMScript ¶ added in v1.13.1
type DeployAlphabetVMScript script.DeployScriptWithOutput[DeployAlphabetVMInput, DeployAlphabetVMOutput]
func NewDeployAlphabetVMScript ¶ added in v1.13.1
func NewDeployAlphabetVMScript(host *script.Host) (DeployAlphabetVMScript, error)
NewDeployAlphabetVMScript loads and validates the DeployAlphabetVM2 script contract
type DeployAltDAInput ¶
type DeployAltDAOutput ¶
type DeployAltDAScript ¶
type DeployAltDAScript script.DeployScriptWithOutput[DeployAltDAInput, DeployAltDAOutput]
func NewDeployAltDAScript ¶ added in v1.13.1
func NewDeployAltDAScript(host *script.Host) (DeployAltDAScript, error)
NewDeployAltDAScript loads and validates the DeployAltDA script contract
type DeployAsteriscInput ¶ added in v1.11.0
type DeployAsteriscOutput ¶ added in v1.11.0
type DeployAsteriscScript ¶ added in v1.13.1
type DeployAsteriscScript script.DeployScriptWithOutput[DeployAsteriscInput, DeployAsteriscOutput]
func NewDeployAsteriscScript ¶ added in v1.13.1
func NewDeployAsteriscScript(host *script.Host) (DeployAsteriscScript, error)
NewDeployAsteriscScript loads and validates the DeployAsterisc script contract
type DeployDisputeGameInput ¶
type DeployDisputeGameInput struct {
Release string
UseV2 bool
GameKind string
GameType uint32
AbsolutePrestate common.Hash
MaxGameDepth *big.Int
SplitDepth *big.Int
ClockExtension uint64
MaxClockDuration uint64
DelayedWethProxy common.Address
AnchorStateRegistryProxy common.Address
VmAddress common.Address
L2ChainId *big.Int
Proposer common.Address
Challenger common.Address
}
type DeployDisputeGameOutput ¶
type DeployDisputeGameScript ¶
type DeployDisputeGameScript script.DeployScriptWithOutput[DeployDisputeGameInput, DeployDisputeGameOutput]
func NewDeployDisputeGameScript ¶ added in v1.13.1
func NewDeployDisputeGameScript(host *script.Host) (DeployDisputeGameScript, error)
NewDeployDisputeGameScript loads and validates the DeployDisputeGame2 script contract
type DeployImplementationsInput ¶
type DeployImplementationsInput struct {
WithdrawalDelaySeconds *big.Int
MinProposalSizeBytes *big.Int
ChallengePeriodSeconds *big.Int
ProofMaturityDelaySeconds *big.Int
DisputeGameFinalityDelaySeconds *big.Int
MipsVersion *big.Int
DevFeatureBitmap common.Hash
FaultGameV2MaxGameDepth *big.Int
FaultGameV2SplitDepth *big.Int
FaultGameV2ClockExtension *big.Int
FaultGameV2MaxClockDuration *big.Int
SuperchainConfigProxy common.Address
ProtocolVersionsProxy common.Address
SuperchainProxyAdmin common.Address
L1ProxyAdminOwner common.Address
Challenger common.Address
}
type DeployImplementationsOutput ¶
type DeployImplementationsOutput struct {
Opcm common.Address `json:"opcmAddress"`
OpcmContractsContainer common.Address `json:"opcmContractsContainerAddress"`
OpcmGameTypeAdder common.Address `json:"opcmGameTypeAdderAddress"`
OpcmDeployer common.Address `json:"opcmDeployerAddress"`
OpcmUpgrader common.Address `json:"opcmUpgraderAddress"`
OpcmInteropMigrator common.Address `json:"opcmInteropMigratorAddress"`
OpcmStandardValidator common.Address `json:"opcmStandardValidatorAddress"`
DelayedWETHImpl common.Address `json:"delayedWETHImplAddress"`
OptimismPortalImpl common.Address `json:"optimismPortalImplAddress"`
OptimismPortalInteropImpl common.Address `json:"optimismPortalInteropImplAddress"`
ETHLockboxImpl common.Address `json:"ethLockboxImplAddress" abi:"ethLockboxImpl"`
PreimageOracleSingleton common.Address `json:"preimageOracleSingletonAddress"`
MipsSingleton common.Address `json:"mipsSingletonAddress"`
SystemConfigImpl common.Address `json:"systemConfigImplAddress"`
L1CrossDomainMessengerImpl common.Address `json:"l1CrossDomainMessengerImplAddress"`
L1ERC721BridgeImpl common.Address `json:"l1ERC721BridgeImplAddress"`
L1StandardBridgeImpl common.Address `json:"l1StandardBridgeImplAddress"`
OptimismMintableERC20FactoryImpl common.Address `json:"optimismMintableERC20FactoryImplAddress"`
DisputeGameFactoryImpl common.Address `json:"disputeGameFactoryImplAddress"`
AnchorStateRegistryImpl common.Address `json:"anchorStateRegistryImplAddress"`
SuperchainConfigImpl common.Address `json:"superchainConfigImplAddress"`
ProtocolVersionsImpl common.Address `json:"protocolVersionsImplAddress"`
FaultDisputeGameV2Impl common.Address `json:"faultDisputeGameV2ImplAddress"`
PermissionedDisputeGameV2Impl common.Address `json:"permissionedDisputeGameV2ImplAddress"`
SuperFaultDisputeGameImpl common.Address `json:"superFaultDisputeGameImplAddress"`
SuperPermissionedDisputeGameImpl common.Address `json:"superPermissionedDisputeGameImplAddress"`
}
type DeployImplementationsScript ¶
type DeployImplementationsScript script.DeployScriptWithOutput[DeployImplementationsInput, DeployImplementationsOutput]
func NewDeployImplementationsScript ¶ added in v1.13.1
func NewDeployImplementationsScript(host *script.Host) (DeployImplementationsScript, error)
NewDeployImplementationsScript loads and validates the DeployImplementations script contract
type DeployMIPS2Input ¶ added in v1.13.1
type DeployMIPS2Output ¶ added in v1.13.1
type DeployMIPSInput ¶
type DeployMIPSOutput ¶
func DeployMIPS ¶
func DeployMIPS( host *script.Host, input DeployMIPSInput, ) (DeployMIPSOutput, error)
type DeployMIPSScript ¶
type DeployMIPSScript script.DeployScriptWithOutput[DeployMIPS2Input, DeployMIPS2Output]
func NewDeployMIPSScript ¶ added in v1.13.1
func NewDeployMIPSScript(host *script.Host) (DeployMIPSScript, error)
NewDeployMIPSScript loads and validates the DeployMIPS2 script contract
type DeployOPChainInput ¶ added in v1.11.0
type DeployOPChainInput struct {
OpChainProxyAdminOwner common.Address
SystemConfigOwner common.Address
Batcher common.Address
UnsafeBlockSigner common.Address
Proposer common.Address
Challenger common.Address
BasefeeScalar uint32
BlobBaseFeeScalar uint32
L2ChainId *big.Int
Opcm common.Address
SaltMixer string
GasLimit uint64
DisputeGameType uint32
DisputeAbsolutePrestate common.Hash
DisputeMaxGameDepth *big.Int
DisputeSplitDepth *big.Int
DisputeClockExtension uint64
DisputeMaxClockDuration uint64
AllowCustomDisputeParameters bool
OperatorFeeScalar uint32
OperatorFeeConstant uint64
}
type DeployOPChainOutput ¶
type DeployOPChainOutput struct {
OpChainProxyAdmin common.Address
AddressManager common.Address
L1ERC721BridgeProxy common.Address
SystemConfigProxy common.Address
OptimismMintableERC20FactoryProxy common.Address
L1StandardBridgeProxy common.Address
L1CrossDomainMessengerProxy common.Address
// Fault proof contracts below.
OptimismPortalProxy common.Address
EthLockboxProxy common.Address `evm:"ethLockboxProxy"`
DisputeGameFactoryProxy common.Address
AnchorStateRegistryProxy common.Address
FaultDisputeGame common.Address
PermissionedDisputeGame common.Address
DelayedWETHPermissionedGameProxy common.Address
DelayedWETHPermissionlessGameProxy common.Address
}
type DeployOPChainScript ¶
type DeployOPChainScript script.DeployScriptWithOutput[DeployOPChainInput, DeployOPChainOutput]
func NewDeployOPChainScript ¶ added in v1.14.0
func NewDeployOPChainScript(host *script.Host) (DeployOPChainScript, error)
NewDeployOPChainScript loads and validates the DeployOPChain script contract
type DeploySuperchainInput ¶
type DeploySuperchainInput struct {
Guardian common.Address `toml:"guardian"`
ProtocolVersionsOwner common.Address `toml:"protocolVersionsOwner"`
SuperchainProxyAdminOwner common.Address `toml:"superchainProxyAdminOwner"`
Paused bool `toml:"paused"`
RecommendedProtocolVersion params.ProtocolVersion `toml:"recommendedProtocolVersion"`
RequiredProtocolVersion params.ProtocolVersion `toml:"requiredProtocolVersion"`
}
type DeploySuperchainOutput ¶
type DeploySuperchainOutput struct {
ProtocolVersionsImpl common.Address `json:"protocolVersionsImplAddress"`
ProtocolVersionsProxy common.Address `json:"protocolVersionsProxyAddress"`
SuperchainConfigImpl common.Address `json:"superchainConfigImplAddress"`
SuperchainConfigProxy common.Address `json:"superchainConfigProxyAddress"`
SuperchainProxyAdmin common.Address `json:"proxyAdminAddress"`
}
type DeploySuperchainScript ¶
type DeploySuperchainScript script.DeployScriptWithOutput[DeploySuperchainInput, DeploySuperchainOutput]
func NewDeploySuperchainScript ¶ added in v1.13.1
func NewDeploySuperchainScript(host *script.Host) (DeploySuperchainScript, error)
NewDeploySuperchainScript loads and validates the DeploySuperchain script contract
type L2GenesisInput ¶
type L2GenesisInput struct {
L1ChainID *big.Int
L2ChainID *big.Int
L1CrossDomainMessengerProxy common.Address
L1StandardBridgeProxy common.Address
L1ERC721BridgeProxy common.Address
OpChainProxyAdminOwner common.Address
SequencerFeeVaultRecipient common.Address
SequencerFeeVaultMinimumWithdrawalAmount *big.Int
SequencerFeeVaultWithdrawalNetwork *big.Int
BaseFeeVaultRecipient common.Address
BaseFeeVaultMinimumWithdrawalAmount *big.Int
BaseFeeVaultWithdrawalNetwork *big.Int
L1FeeVaultRecipient common.Address
L1FeeVaultMinimumWithdrawalAmount *big.Int
L1FeeVaultWithdrawalNetwork *big.Int
OperatorFeeVaultRecipient common.Address
OperatorFeeVaultMinimumWithdrawalAmount *big.Int
OperatorFeeVaultWithdrawalNetwork *big.Int
GovernanceTokenOwner common.Address
Fork *big.Int
DeployCrossL2Inbox bool
EnableGovernance bool
FundDevAccounts bool
ChainFeesRecipient common.Address
L1FeesDepositor common.Address
}
type L2GenesisScript ¶
type L2GenesisScript script.DeployScriptWithoutOutput[L2GenesisInput]
func NewL2GenesisScript ¶ added in v1.13.3
func NewL2GenesisScript(host *script.Host) (L2GenesisScript, error)
type PreinstallsScript ¶ added in v1.13.1
type PreinstallsScript struct {
SetPreinstalls func() error
}
type ReadImplementationAddressesInput ¶ added in v1.10.0
type ReadImplementationAddressesInput struct {
AddressManager common.Address
L1ERC721BridgeProxy common.Address
SystemConfigProxy common.Address
OptimismMintableERC20FactoryProxy common.Address
L1StandardBridgeProxy common.Address
OptimismPortalProxy common.Address
DisputeGameFactoryProxy common.Address
DelayedWETHPermissionedGameProxy common.Address
Opcm common.Address
}
type ReadImplementationAddressesOutput ¶ added in v1.10.0
type ReadImplementationAddressesOutput struct {
DelayedWETH common.Address
OptimismPortal common.Address
OptimismPortalInterop common.Address
EthLockbox common.Address `evm:"ethLockbox"`
SystemConfig common.Address
AnchorStateRegistry common.Address
L1CrossDomainMessenger common.Address
L1ERC721Bridge common.Address
L1StandardBridge common.Address
OptimismMintableERC20Factory common.Address
DisputeGameFactory common.Address
MipsSingleton common.Address
PreimageOracleSingleton common.Address
FaultDisputeGameV2 common.Address
PermissionedDisputeGameV2 common.Address
SuperFaultDisputeGame common.Address
SuperPermissionedDisputeGame common.Address
OpcmDeployer common.Address
OpcmUpgrader common.Address
OpcmGameTypeAdder common.Address
OpcmStandardValidator common.Address
OpcmInteropMigrator common.Address
}
type ReadImplementationAddressesScript ¶ added in v1.10.0
type ReadImplementationAddressesScript script.DeployScriptWithOutput[ReadImplementationAddressesInput, ReadImplementationAddressesOutput]
func NewReadImplementationAddressesScript ¶ added in v1.14.0
func NewReadImplementationAddressesScript(host *script.Host) (ReadImplementationAddressesScript, error)
NewReadImplementationAddressesScript loads and validates the ReadImplementationAddresses script contract
type ReadSuperchainDeploymentInput ¶ added in v1.13.3
type ReadSuperchainDeploymentOutput ¶ added in v1.13.3
type ReadSuperchainDeploymentOutput struct {
ProtocolVersionsImpl common.Address
ProtocolVersionsProxy common.Address
SuperchainConfigImpl common.Address
SuperchainConfigProxy common.Address
SuperchainProxyAdmin common.Address
Guardian common.Address
ProtocolVersionsOwner common.Address
SuperchainProxyAdminOwner common.Address
RecommendedProtocolVersion [32]byte
RequiredProtocolVersion [32]byte
}
type ReadSuperchainDeploymentScript ¶ added in v1.13.3
type ReadSuperchainDeploymentScript script.DeployScriptWithOutput[ReadSuperchainDeploymentInput, ReadSuperchainDeploymentOutput]
func NewReadSuperchainDeploymentScript ¶ added in v1.13.3
func NewReadSuperchainDeploymentScript(host *script.Host) (ReadSuperchainDeploymentScript, error)
type Scripts ¶ added in v1.13.3
type Scripts struct {
DeployAlphabetVM DeployAlphabetVMScript
DeployAltDA DeployAltDAScript
DeployAsterisc DeployAsteriscScript
DeployDisputeGame DeployDisputeGameScript
DeployImplementations DeployImplementationsScript
DeployMIPS DeployMIPSScript
DeploySuperchain DeploySuperchainScript
DeployOPChain DeployOPChainScript
}
Scripts contains all the deployment scripts for ease of passing them around