bootstrap

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: 26 Imported by: 1 module, 1 package

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

View Source
const (
	OutfileFlagName                            = "outfile"
	MinWithdrawalDelaySecondsFlagName          = "min-withdrawal-delay-seconds"
	MaxWithdrawalDelaySecondsFlagName          = "max-withdrawal-delay-seconds"
	MinProposalSizeBytesFlagName               = "min-proposal-size-bytes"
	ChallengePeriodSecondsFlagName             = "challenge-period-seconds"
	MinProofMaturityDelaySecondsFlagName       = "min-proof-maturity-delay-seconds"
	MaxProofMaturityDelaySecondsFlagName       = "max-proof-maturity-delay-seconds"
	MinDisputeGameFinalityDelaySecondsFlagName = "min-dispute-game-finality-delay-seconds"
	MaxDisputeGameFinalityDelaySecondsFlagName = "max-dispute-game-finality-delay-seconds"
	MIPSVersionFlagName                        = "mips-version"
	DevFeatureBitmapFlagName                   = "dev-feature-bitmap"
	SP1VerifierAddressFlagName                 = "sp1-verifier-address"
	ProxyOwnerFlagName                         = "proxy-owner"
	SuperchainProxyAdminOwnerFlagName          = "superchain-proxy-admin-owner"
	GuardianFlagName                           = "guardian"
	PausedFlagName                             = "paused"
)

Variables

View Source
var (
	OutfileFlag = &cli.StringFlag{
		Name:    OutfileFlagName,
		Usage:   "Output file. Use - for stdout.",
		EnvVars: deployer.PrefixEnvVar("OUTFILE"),
		Value:   "-",
	}
	MinWithdrawalDelaySecondsFlag = &cli.Uint64Flag{
		Name:    MinWithdrawalDelaySecondsFlagName,
		Usage:   "Lowest withdrawal delay in seconds a chain may configure on the DelayedWETH.",
		EnvVars: deployer.PrefixEnvVar("MIN_WITHDRAWAL_DELAY_SECONDS"),
		Value:   standard.MinWithdrawalDelaySeconds,
	}
	MaxWithdrawalDelaySecondsFlag = &cli.Uint64Flag{
		Name:    MaxWithdrawalDelaySecondsFlagName,
		Usage:   "Highest withdrawal delay in seconds a chain may configure on the DelayedWETH.",
		EnvVars: deployer.PrefixEnvVar("MAX_WITHDRAWAL_DELAY_SECONDS"),
		Value:   standard.MaxWithdrawalDelaySeconds,
	}
	MinProposalSizeBytesFlag = &cli.Uint64Flag{
		Name:    MinProposalSizeBytesFlagName,
		Usage:   "PreimageOracle minimum proposal size in bytes.",
		EnvVars: deployer.PrefixEnvVar("MIN_PROPOSAL_SIZE_BYTES"),
		Value:   standard.MinProposalSizeBytes,
	}
	ChallengePeriodSecondsFlag = &cli.Uint64Flag{
		Name:    ChallengePeriodSecondsFlagName,
		Usage:   "PreimageOracle challenge period in seconds.",
		EnvVars: deployer.PrefixEnvVar("CHALLENGE_PERIOD_SECONDS"),
		Value:   standard.ChallengePeriodSeconds,
	}
	MinProofMaturityDelaySecondsFlag = &cli.Uint64Flag{
		Name:    MinProofMaturityDelaySecondsFlagName,
		Usage:   "Lowest proof maturity delay in seconds a chain may configure on the OptimismPortal.",
		EnvVars: deployer.PrefixEnvVar("MIN_PROOF_MATURITY_DELAY_SECONDS"),
		Value:   standard.MinProofMaturityDelaySeconds,
	}
	MaxProofMaturityDelaySecondsFlag = &cli.Uint64Flag{
		Name:    MaxProofMaturityDelaySecondsFlagName,
		Usage:   "Highest proof maturity delay in seconds a chain may configure on the OptimismPortal.",
		EnvVars: deployer.PrefixEnvVar("MAX_PROOF_MATURITY_DELAY_SECONDS"),
		Value:   standard.MaxProofMaturityDelaySeconds,
	}
	MinDisputeGameFinalityDelaySecondsFlag = &cli.Uint64Flag{
		Name:    MinDisputeGameFinalityDelaySecondsFlagName,
		Usage:   "Lowest dispute game finality delay in seconds a chain may configure on the AnchorStateRegistry.",
		EnvVars: deployer.PrefixEnvVar("MIN_DISPUTE_GAME_FINALITY_DELAY_SECONDS"),
		Value:   standard.MinDisputeGameFinalityDelaySeconds,
	}
	MaxDisputeGameFinalityDelaySecondsFlag = &cli.Uint64Flag{
		Name:    MaxDisputeGameFinalityDelaySecondsFlagName,
		Usage:   "Highest dispute game finality delay in seconds a chain may configure on the AnchorStateRegistry.",
		EnvVars: deployer.PrefixEnvVar("MAX_DISPUTE_GAME_FINALITY_DELAY_SECONDS"),
		Value:   standard.MaxDisputeGameFinalityDelaySeconds,
	}
	DisputeMaxGameDepthFlag = &cli.Uint64Flag{
		Name:    "dispute-max-game-depth",
		Usage:   "Maximum depth of the dispute game tree (value as string). Defaults to the standard value.",
		EnvVars: deployer.PrefixEnvVar("DISPUTE_MAX_GAME_DEPTH"),
		Value:   standard.DisputeMaxGameDepth,
	}
	DisputeSplitDepthFlag = &cli.Uint64Flag{
		Name:    "dispute-split-depth",
		Usage:   "Depth at which the dispute game tree splits (value as string). Defaults to the standard value.",
		EnvVars: deployer.PrefixEnvVar("DISPUTE_SPLIT_DEPTH"),
		Value:   standard.DisputeSplitDepth,
	}
	DisputeClockExtensionFlag = &cli.Uint64Flag{
		Name:    "dispute-clock-extension",
		Usage:   "Clock extension in seconds for dispute game timing. Defaults to the standard value.",
		EnvVars: deployer.PrefixEnvVar("DISPUTE_CLOCK_EXTENSION"),
		Value:   standard.DisputeClockExtension,
	}
	DisputeMaxClockDurationFlag = &cli.Uint64Flag{
		Name:    "dispute-max-clock-duration",
		Usage:   "Maximum clock duration in seconds for dispute game timing. Defaults to the standard value.",
		EnvVars: deployer.PrefixEnvVar("DISPUTE_MAX_CLOCK_DURATION"),
		Value:   standard.DisputeMaxClockDuration,
	}
	MIPSVersionFlag = &cli.Uint64Flag{
		Name:    MIPSVersionFlagName,
		Usage:   "MIPS version.",
		EnvVars: deployer.PrefixEnvVar("MIPS_VERSION"),
		Value:   standard.MIPSVersion,
	}
	DevFeatureBitmapFlag = &cli.StringFlag{
		Name:    DevFeatureBitmapFlagName,
		Usage:   "Development feature bitmap.",
		EnvVars: deployer.PrefixEnvVar("DEV_FEATURE_BITMAP"),
		Value:   common.Hash{}.Hex(),
	}
	SP1VerifierAddressFlag = &cli.StringFlag{
		Name:    SP1VerifierAddressFlagName,
		Usage:   "Raw SP1 verifier wrapped by the release's SP1PlonkAdapter. Defaults to Succinct's v6.1.0 PLONK verifier on Ethereum mainnet and Sepolia; required on every other L1, unless --" + deployer.DeployMockSP1VerifierFlagName + " is set.",
		EnvVars: deployer.PrefixEnvVar("SP1_VERIFIER_ADDRESS"),
		Value:   common.Address{}.Hex(),
	}
	DeployMockSP1VerifierFlag = &cli.BoolFlag{
		Name: deployer.DeployMockSP1VerifierFlagName,
		Usage: "deploy a mock SP1 verifier for the ZK dispute game, on an L1 without a release verifier. " +
			"Development only: the mock accepts every proof.",
		EnvVars: deployer.PrefixEnvVar("DEPLOY_MOCK_SP1_VERIFIER"),
	}
	ProxyOwnerFlag = &cli.StringFlag{
		Name:    ProxyOwnerFlagName,
		Usage:   "Proxy owner address.",
		EnvVars: deployer.PrefixEnvVar("PROXY_OWNER"),
		Value:   common.Address{}.Hex(),
	}
	SuperchainProxyAdminOwnerFlag = &cli.StringFlag{
		Name:    SuperchainProxyAdminOwnerFlagName,
		Usage:   "Owner address for the superchain proxy admin",
		EnvVars: deployer.PrefixEnvVar("SUPERCHAIN_PROXY_ADMIN_OWNER"),
		Value:   common.Address{}.Hex(),
	}
	GuardianFlag = &cli.StringFlag{
		Name:    GuardianFlagName,
		Usage:   "Guardian address",
		EnvVars: deployer.PrefixEnvVar("GUARDIAN"),
		Value:   common.Address{}.Hex(),
	}
	PausedFlag = &cli.BoolFlag{
		Name:    PausedFlagName,
		Usage:   "Initial paused state",
		EnvVars: deployer.PrefixEnvVar("PAUSED"),
	}
	SuperchainConfigProxyFlag = &cli.StringFlag{
		Name:    "superchain-config-proxy",
		Usage:   "Superchain config proxy.",
		EnvVars: deployer.PrefixEnvVar("SUPERCHAIN_CONFIG_PROXY"),
	}
	L1ProxyAdminOwnerFlag = &cli.StringFlag{
		Name:    "l1-proxy-admin-owner",
		Aliases: []string{"upgrade-controller"},
		Usage:   "L1 ProxyAdmin Owner.",
		EnvVars: append(deployer.PrefixEnvVar("L1_PROXY_ADMIN_OWNER"), deployer.PrefixEnvVar("UPGRADE_CONTROLLER")...),
	}
	SuperchainProxyAdminFlag = &cli.StringFlag{
		Name:    "superchain-proxy-admin",
		Usage:   "Superchain proxy admin.",
		EnvVars: deployer.PrefixEnvVar("SUPERCHAIN_PROXY_ADMIN"),
	}
	ConfigFileFlag = &cli.StringFlag{
		Name:    "config",
		Usage:   "Path to a JSON file",
		EnvVars: deployer.PrefixEnvVar("CONFIG"),
	}
	ChallengerFlag = &cli.StringFlag{
		Name:    "challenger",
		Usage:   "Challenger.",
		EnvVars: deployer.PrefixEnvVar("CHALLENGER"),
	}
)
View Source
var Commands = []*cli.Command{
	{
		Name:   "implementations",
		Usage:  "Bootstraps implementations.",
		Flags:  cliapp.ProtectFlags(ImplementationsFlags),
		Action: ImplementationsCLI,
	},
	{
		Name:   "superchain",
		Usage:  "Bootstrap the Superchain configuration",
		Flags:  cliapp.ProtectFlags(SuperchainFlags),
		Action: SuperchainCLI,
	},
}

Functions

func ImplementationsCLI

func ImplementationsCLI(cliCtx *cli.Context) error

func SuperchainCLI

func SuperchainCLI(cliCtx *cli.Context) error

Types

type ImplementationsConfig

type ImplementationsConfig struct {
	L1RPCUrl                           string             `cli:"l1-rpc-url"`
	PrivateKey                         string             `cli:"private-key"`
	ArtifactsLocator                   *artifacts.Locator `cli:"artifacts-locator"`
	MIPSVersion                        int                `cli:"mips-version"`
	MinWithdrawalDelaySeconds          uint64             `cli:"min-withdrawal-delay-seconds"`
	MaxWithdrawalDelaySeconds          uint64             `cli:"max-withdrawal-delay-seconds"`
	MinProposalSizeBytes               uint64             `cli:"min-proposal-size-bytes"`
	ChallengePeriodSeconds             uint64             `cli:"challenge-period-seconds"`
	MinProofMaturityDelaySeconds       uint64             `cli:"min-proof-maturity-delay-seconds"`
	MaxProofMaturityDelaySeconds       uint64             `cli:"max-proof-maturity-delay-seconds"`
	MinDisputeGameFinalityDelaySeconds uint64             `cli:"min-dispute-game-finality-delay-seconds"`
	MaxDisputeGameFinalityDelaySeconds uint64             `cli:"max-dispute-game-finality-delay-seconds"`
	DevFeatureBitmap                   common.Hash        `cli:"dev-feature-bitmap"`
	SP1Verifier                        common.Address     `cli:"sp1-verifier-address"`
	FaultGameMaxGameDepth              uint64             `cli:"dispute-max-game-depth"`
	FaultGameSplitDepth                uint64             `cli:"dispute-split-depth"`
	FaultGameClockExtension            uint64             `cli:"dispute-clock-extension"`
	FaultGameMaxClockDuration          uint64             `cli:"dispute-max-clock-duration"`
	SuperchainConfigProxy              common.Address     `cli:"superchain-config-proxy"`
	L1ProxyAdminOwner                  common.Address     `cli:"l1-proxy-admin-owner"`
	SuperchainProxyAdmin               common.Address     `cli:"superchain-proxy-admin"`
	Challenger                         common.Address     `cli:"challenger"`
	CacheDir                           string             `cli:"cache-dir"`
	// DeployMockSP1Verifier deploys an accept-all SP1 verifier on an L1 without a release verifier,
	// in place of SP1Verifier.
	DeployMockSP1Verifier bool
	// ReceiptQueryInterval is how often to poll for each broadcast's receipt. Zero uses the broadcaster's default.
	ReceiptQueryInterval time.Duration

	Logger log.Logger
}

func (*ImplementationsConfig) Check

func (c *ImplementationsConfig) Check() error

type SuperchainConfig

type SuperchainConfig struct {
	L1RPCUrl         string
	PrivateKey       string
	Logger           log.Logger
	ArtifactsLocator *artifacts.Locator
	CacheDir         string
	// ReceiptQueryInterval is how often to poll for each broadcast's receipt. Zero uses the broadcaster's default.
	ReceiptQueryInterval time.Duration

	SuperchainProxyAdminOwner common.Address
	Guardian                  common.Address
	Paused                    bool
}

func (*SuperchainConfig) Check

func (c *SuperchainConfig) Check() error

Jump to

Keyboard shortcuts

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