deployer

package
v1.9.4 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2024 License: MIT Imports: 20 Imported by: 3

Documentation

Index

Constants

View Source
const (
	EnvVarPrefix       = "DEPLOYER"
	L1RPCURLFlagName   = "l1-rpc-url"
	L1ChainIDFlagName  = "l1-chain-id"
	L2ChainIDsFlagName = "l2-chain-ids"
	WorkdirFlagName    = "workdir"
	OutdirFlagName     = "outdir"
	PrivateKeyFlagName = "private-key"
)

Variables

View Source
var (
	L1RPCURLFlag = &cli.StringFlag{
		Name: L1RPCURLFlagName,
		Usage: "RPC URL for the L1 chain. Can be set to 'genesis' for deployments " +
			"that will be deployed at the launch of the L1.",
		EnvVars: []string{
			"L1_RPC_URL",
		},
	}
	L1ChainIDFlag = &cli.Uint64Flag{
		Name:    L1ChainIDFlagName,
		Usage:   "Chain ID of the L1 chain.",
		EnvVars: PrefixEnvVar("L1_CHAIN_ID"),
		Value:   900,
	}
	L2ChainIDsFlag = &cli.StringFlag{
		Name:    L2ChainIDsFlagName,
		Usage:   "Comma-separated list of L2 chain IDs to deploy.",
		EnvVars: PrefixEnvVar("L2_CHAIN_IDS"),
	}
	WorkdirFlag = &cli.StringFlag{
		Name:    WorkdirFlagName,
		Usage:   "Directory storing intent and stage. Defaults to the current directory.",
		EnvVars: PrefixEnvVar("WORKDIR"),
		Value:   cwd(),
		Aliases: []string{
			OutdirFlagName,
		},
	}
	PrivateKeyFlag = &cli.StringFlag{
		Name:    PrivateKeyFlagName,
		Usage:   "Private key of the deployer account.",
		EnvVars: PrefixEnvVar("PRIVATE_KEY"),
	}
)
View Source
var GlobalFlags = append([]cli.Flag{}, oplog.CLIFlags(EnvVarPrefix)...)
View Source
var V160ArtifactsURL = state.MustParseArtifactsURL("https://storage.googleapis.com/oplabs-contract-artifacts/artifacts-v1-ee07c78c3d8d4cd8f7a933c050f5afeebaa281b57b226cc6f092b19de2a8d61f.tar.gz")

Functions

func Apply added in v1.9.3

func Apply(ctx context.Context, cfg ApplyConfig) error

func ApplyCLI added in v1.9.3

func ApplyCLI() func(cliCtx *cli.Context) error

func ApplyPipeline added in v1.9.3

func ApplyPipeline(
	ctx context.Context,
	env *pipeline.Env,
	intent *state.Intent,
	st *state.State,
) error

func Init added in v1.9.3

func Init(cfg InitConfig) error

func InitCLI added in v1.9.3

func InitCLI() func(ctx *cli.Context) error

func PrefixEnvVar added in v1.9.4

func PrefixEnvVar(name string) []string

Types

type ApplyConfig added in v1.9.3

type ApplyConfig struct {
	L1RPCUrl   string
	Workdir    string
	PrivateKey string
	Logger     log.Logger
	// contains filtered or unexported fields
}

func (*ApplyConfig) Check added in v1.9.3

func (a *ApplyConfig) Check() error

type InitConfig added in v1.9.3

type InitConfig struct {
	L1ChainID  uint64
	Outdir     string
	L2ChainIDs []common.Hash
}

func (*InitConfig) Check added in v1.9.3

func (c *InitConfig) Check() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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