Documentation
¶
Index ¶
- Variables
- func Upgrade(host *script.Host, input UpgradeOPChainInput) error
- func UpgradeSuperchainConfig(host *script.Host, input UpgradeSuperchainConfigInput) error
- type DisputeGameConfig
- type EncodableDisputeGameConfig
- type EncodableUpgradeInput
- type ExtraInstruction
- type FaultDisputeGameConfig
- type GameType
- type PermissionedDisputeGameConfig
- type ScriptInput
- type SuperPermissionedDisputeGameConfig
- type UpgradeInputV2
- type UpgradeOPChain
- type UpgradeOPChainInput
- type UpgradeSuperchainConfigInput
- type UpgradeSuperchainConfigScript
- type Upgrader
- type ZKDisputeGameConfig
Constants ¶
This section is empty.
Variables ¶
var DefaultUpgrader = new(Upgrader)
Functions ¶
func UpgradeSuperchainConfig ¶
func UpgradeSuperchainConfig(host *script.Host, input UpgradeSuperchainConfigInput) error
Types ¶
type DisputeGameConfig ¶
type DisputeGameConfig struct {
Enabled bool `json:"enabled"`
InitBond *big.Int `json:"initBond"`
GameType GameType `json:"gameType"`
FaultDisputeGameConfig *FaultDisputeGameConfig `json:"faultDisputeGameConfig,omitempty"`
PermissionedDisputeGameConfig *PermissionedDisputeGameConfig `json:"permissionedDisputeGameConfig,omitempty"`
SuperPermissionedDisputeGameConfig *SuperPermissionedDisputeGameConfig `json:"superPermissionedDisputeGameConfig,omitempty"`
ZKDisputeGameConfig *ZKDisputeGameConfig `json:"zkDisputeGameConfig,omitempty"`
}
DisputeGameConfig represents the configuration for a dispute game.
type EncodableDisputeGameConfig ¶
type EncodableDisputeGameConfig struct {
Enabled bool
InitBond *big.Int
GameType uint32
GameArgs []byte
}
EncodableDisputeGameConfig is an intermediate struct that matches the encoder expectation.
type EncodableUpgradeInput ¶
type EncodableUpgradeInput struct {
SystemConfig common.Address
DisputeGameConfigs []EncodableDisputeGameConfig
ExtraInstructions []ExtraInstruction
}
EncodableUpgradeInput is an intermediate struct that matches the encoder expectation for the UpgradeInputV2 struct.
type ExtraInstruction ¶
ExtraInstruction represents an additional upgrade instruction for the upgrade on OPCM v2.
type FaultDisputeGameConfig ¶
FaultDisputeGameConfig represents the configuration for a fault dispute game. It contains the absolute prestate of the fault dispute game.
type PermissionedDisputeGameConfig ¶
type PermissionedDisputeGameConfig struct {
AbsolutePrestate common.Hash `json:"absolutePrestate"`
Proposer common.Address `json:"proposer"`
Challenger common.Address `json:"challenger"`
}
PermissionedDisputeGameConfig represents the configuration for a permissioned dispute game. It contains the absolute prestate, proposer, and challenger of the permissioned dispute game.
type ScriptInput ¶
type ScriptInput struct {
Prank common.Address `evm:"prank"`
Opcm common.Address `evm:"opcm"`
UpgradeInput []byte `evm:"upgradeInput"`
}
ScriptInput represents the input struct that is actually passed to the script. It contains the prank, opcm, and upgrade input.
type SuperPermissionedDisputeGameConfig ¶ added in v1.19.0
SuperPermissionedDisputeGameConfig represents the configuration for a super-permissioned dispute game. It contains the proposer of the super-permissioned dispute game.
type UpgradeInputV2 ¶
type UpgradeInputV2 struct {
SystemConfig common.Address `json:"systemConfig"`
DisputeGameConfigs []DisputeGameConfig `json:"disputeGameConfigs"`
ExtraInstructions []ExtraInstruction `json:"extraInstructions"`
}
UpgradeInputV2 represents the upgrade input for OPCM v2.
type UpgradeOPChain ¶
type UpgradeOPChainInput ¶
type UpgradeOPChainInput struct {
Prank common.Address `json:"prank"`
Opcm common.Address `json:"opcm"`
UpgradeInputV2 *UpgradeInputV2 `json:"upgradeInput,omitempty"`
}
UpgradeOPChainInput represents the struct that is read from the config file.
func (*UpgradeOPChainInput) EncodedUpgradeInputV2 ¶
func (u *UpgradeOPChainInput) EncodedUpgradeInputV2() ([]byte, error)
EncodedUpgradeInputV2 encodes the upgrade input, assumes UpgradeInputV2 is not nil
type UpgradeSuperchainConfigScript ¶
type UpgradeSuperchainConfigScript script.DeployScriptWithoutOutput[UpgradeSuperchainConfigInput]
func NewUpgradeSuperchainConfigScript ¶
func NewUpgradeSuperchainConfigScript(host *script.Host) (UpgradeSuperchainConfigScript, error)
NewDeployImplementationsScript loads and validates the DeployImplementations script contract
type Upgrader ¶
type Upgrader struct{}
func (*Upgrader) ArtifactsURL ¶
func (*Upgrader) UpgradeSuperchainConfig ¶
type ZKDisputeGameConfig ¶ added in v1.17.0
type ZKDisputeGameConfig struct {
AbsolutePrestate common.Hash `json:"absolutePrestate"`
Verifier common.Address `json:"verifier"`
MaxChallengeDuration uint64 `json:"maxChallengeDuration"`
MaxProveDuration uint64 `json:"maxProveDuration"`
ChallengerBond *big.Int `json:"challengerBond"`
}
ZKDisputeGameConfig represents the configuration for a ZK dispute game. It contains the absolute prestate, verifier address, challenge/prove durations, and challenger bond.