commands

package
v0.1.0-preview.4.rc Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2025 License: MIT Imports: 68 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AVSCommand = &cli.Command{
	Name:  "avs",
	Usage: "Manage EigenLayer AVS (Autonomous Verifiable Services) projects",
	Subcommands: []*cli.Command{
		CreateCommand,
		config.Command,
		context.Command,
		BuildCommand,
		DevnetCommand,
		DeployCommand,
		TransportCommand,
		RunCommand,
		TestCommand,
		CallCommand,
		ReleaseCommand,
		template.Command,
	},
}
View Source
var BuildCommand = &cli.Command{
	Name:  "build",
	Usage: "Compiles AVS components (smart contracts via Foundry, Go binaries for operators/aggregators)",
	Flags: append([]cli.Flag{
		&cli.StringFlag{
			Name:  "context",
			Usage: "Select the context to use in this command (devnet, testnet or mainnet)",
		},
	}, common.GlobalFlags...),
	Action: func(cCtx *cli.Context) error {
		logger := common.LoggerFromContext(cCtx)

		configsMigratedCount, err := configs.MigrateConfig(logger)
		if err != nil {
			logger.Error("config migration failed: %w", err)
		}
		if configsMigratedCount > 0 {
			logger.Info("configs migrated: %d", configsMigratedCount)
		}

		contextsMigratedCount, err := contexts.MigrateContexts(logger)
		if err != nil {
			logger.Error("context migrations failed: %w", err)
		}
		if contextsMigratedCount > 0 {
			logger.Info("contexts migrated: %d", contextsMigratedCount)
		}

		// Run scriptPath from cwd
		const dir = ""

		// Get the config (based on if we're in a test or not)
		var cfg *common.ConfigWithContextConfig

		contextName := cCtx.String("context")

		if contextName == "" {
			cfg, contextName, err = common.LoadDefaultConfigWithContextConfig()
		} else {
			cfg, contextName, err = common.LoadConfigWithContextConfig(contextName)
		}
		if err != nil {
			return fmt.Errorf("failed to load configurations: %w", err)
		}

		language := cfg.Config.Project.TemplateLanguage
		if language == "" {
			language = "go"
		}

		logger.Info("Building %s AVS project", language)

		version := cfg.Context[contextName].Artifact.Version
		if version == "" {
			version = "0"
		}

		logger.Debug("Project Name: %s", cfg.Config.Project.Name)
		logger.Debug("Building AVS components...")

		scriptsDir := filepath.Join(".devkit", "scripts")

		output, err := common.CallTemplateScript(cCtx.Context, logger, dir, filepath.Join(scriptsDir, "build"), common.ExpectJSONResponse,
			[]byte("--image"),
			[]byte(cfg.Config.Project.Name),
			[]byte("--tag"),
			[]byte(version),
			[]byte("--lang"),
			[]byte(language),
		)
		if err != nil {
			logger.Error("Build script failed with error: %v", err)
			return fmt.Errorf("build failed: %w", err)
		}

		contextPath := filepath.Join("config", "contexts", fmt.Sprintf("%s.yaml", contextName))
		contextNode, err := common.LoadYAML(contextPath)
		if err != nil {
			return fmt.Errorf("failed to load context yaml: %w", err)
		}

		rootNode := contextNode.Content[0]

		contextSection := common.GetChildByKey(rootNode, "context")
		if contextSection == nil {
			contextSection = &yaml.Node{Kind: yaml.MappingNode}
			rootNode.Content = append(rootNode.Content,
				&yaml.Node{Kind: yaml.ScalarNode, Value: "context"},
				contextSection,
			)
		}

		if err := updateArtifactFromBuild(contextSection, output); err != nil {
			return fmt.Errorf("failed to update artifact: %w", err)
		}

		if err := common.WriteYAML(contextPath, contextNode); err != nil {
			return fmt.Errorf("failed to write merged yaml: %w", err)
		}

		logger.Info("Build completed successfully")
		return nil
	},
}

BuildCommand defines the "build" command

View Source
var CallCommand = &cli.Command{
	Name:  "call",
	Usage: "Submits tasks to the local devnet, triggers off-chain execution, and aggregates results",
	Flags: append([]cli.Flag{
		&cli.StringFlag{
			Name:  "context",
			Usage: "Select the context to use in this command (devnet, testnet or mainnet)",
		},
	}, common.GlobalFlags...),
	Action: func(cCtx *cli.Context) error {

		logger := common.LoggerFromContext(cCtx)

		contextName := cCtx.String("context")

		// Set path for context yaml
		var err error
		var contextJSON []byte
		if contextName == "" {
			contextJSON, contextName, err = common.LoadDefaultRawContext()
		} else {
			contextJSON, contextName, err = common.LoadRawContext(contextName)
		}
		if err != nil {
			return fmt.Errorf("failed to load context: %w", err)
		}

		if contextName != devnet.DEVNET_CONTEXT {
			cmdParams := reconstructCommandParams(cCtx.Args().Slice())

			return fmt.Errorf(
				"call failed: `devkit avs call` only available on devnet - please run `devkit avs call --context devnet %s`",
				cmdParams,
			)
		}

		logger.Debug("Testing AVS tasks...")

		parts := cCtx.Args().Slice()
		if len(parts) == 0 {
			return fmt.Errorf("no parameters supplied")
		}

		// Run scriptPath from cwd
		const dir = ""

		scriptPath := filepath.Join(".devkit", "scripts", "call")

		paramsMap, err := parseParams(strings.Join(parts, " "))
		if err != nil {
			return err
		}
		paramsJSON, err := json.Marshal(paramsMap)
		if err != nil {
			return err
		}

		if _, err := common.CallTemplateScript(cCtx.Context, logger, dir, scriptPath, common.ExpectNonJSONResponse, contextJSON, paramsJSON); err != nil {
			return fmt.Errorf("call failed: %w", err)
		}

		logger.Info("Task execution completed successfully")
		return nil
	},
}

CallCommand defines the "call" command

View Source
var CreateCommand = &cli.Command{
	Name:      "create",
	Usage:     "Initializes a new AVS project scaffold (Hourglass model)",
	ArgsUsage: "<project-name> [target-dir]",
	Flags: append([]cli.Flag{
		&cli.StringFlag{
			Name:  "dir",
			Usage: "Set output directory for the new project",
			Value: ".",
		},
		&cli.StringFlag{
			Name:  "lang",
			Usage: "Programming language to generate project files",
			Value: "go",
		},
		&cli.StringFlag{
			Name:  "template",
			Usage: "Specifies AVS architecture (task-based/hourglass, epoch-based, etc.)",
			Value: "hourglass",
		},
		&cli.StringFlag{
			Name:  "template-url",
			Usage: "Direct GitHub base URL to use as template (overrides templates.yml)",
		},
		&cli.StringFlag{
			Name:  "template-version",
			Usage: "Git ref (tag, commit, branch) for the template",
		},
		&cli.StringFlag{
			Name:  "env",
			Usage: "Chooses the environment (local, testnet, mainnet)",
			Value: "local",
		},
		&cli.BoolFlag{
			Name:  "overwrite",
			Usage: "Force overwrite if project directory already exists",
		},
	}, common.GlobalFlags...),
	Action: func(cCtx *cli.Context) error {

		if cCtx.NArg() == 0 {
			return fmt.Errorf("project name is required\nUsage: avs create <project-name> [flags]")
		}
		projectName := cCtx.Args().First()
		dest := cCtx.Args().Get(1)

		logger, tracker := common.GetLoggerFromCLIContext(cCtx)

		// use dest from dir flag or positional
		var targetDir string
		if dest != "" {
			targetDir = dest
		} else {
			targetDir = cCtx.String("dir")
		}

		targetDir, err := filepath.Abs(filepath.Join(targetDir, projectName))
		if err != nil {
			return fmt.Errorf("failed to resolve absolute path for target directory: %w", err)
		}

		logger.Debug("Creating new AVS project: %s", projectName)
		logger.Debug("Directory: %s", cCtx.String("dir"))
		logger.Debug("Template: %s", cCtx.String("template"))
		logger.Debug("Language: %s", cCtx.String("lang"))
		logger.Debug("Environment: %s", cCtx.String("env"))
		if cCtx.String("template-path") != "" {
			logger.Debug("Template Path: %s", cCtx.String("template-path"))
		}

		mainBaseURL, mainVersion, mainLang, err := getTemplateURLs(cCtx)
		if err != nil {
			return err
		}

		if err := createProjectDir(logger, targetDir, cCtx.Bool("overwrite")); err != nil {
			return err
		}

		logger.Debug("Using template: %s", mainBaseURL)
		if mainVersion != "" {
			logger.Info("Template version: %s", mainVersion)
		}

		fetcher := &template.GitFetcher{

			Client: template.NewGitClient(),
			Logger: *progresslogger.NewProgressLogger(
				logger,
				tracker,
			),
			Config: template.GitFetcherConfig{
				Verbose: cCtx.Bool("verbose"),
			},
		}
		if err := fetcher.Fetch(cCtx.Context, mainBaseURL, mainVersion, targetDir); err != nil {
			return fmt.Errorf("failed to fetch template from %s: %w", mainBaseURL, err)
		}

		readMePath := filepath.Join(targetDir, "README.md")
		readMeTemplate, err := os.ReadFile(readMePath)
		if err != nil {
			logger.Warn("Project README.md is missing: %w", err)
		}
		readMeTemplate = append(readMeTemplate, project.RawReadme...)
		err = os.WriteFile(readMePath, readMeTemplate, 0644)
		if err != nil {
			return fmt.Errorf("failed to write README.md: %w", err)
		}

		scriptDir := filepath.Join(".devkit", "scripts")
		scriptPath := filepath.Join(scriptDir, "init")

		logger.Info("Installing template dependencies\n\n")

		if _, err = common.CallTemplateScript(cCtx.Context, logger, targetDir, scriptPath, common.ExpectNonJSONResponse, []byte(mainLang)); err != nil {
			return fmt.Errorf("failed to initialize %s: %w", scriptPath, err)
		}

		logger.Debug("\nFinalising new project\n\n")

		err = os.WriteFile(filepath.Join(targetDir, ".env.example"), []byte(config.EnvExample), 0644)
		if err != nil {
			return fmt.Errorf("failed to write .env.example: %w", err)
		}

		appEnv, ok := common.AppEnvironmentFromContext(cCtx.Context)
		if !ok {
			return fmt.Errorf("could not determine application environment")
		}

		if err := common.SaveUserId(appEnv.UserUUID); err != nil {
			return fmt.Errorf("failed to save global settings: %w", err)
		}

		globalTelemetryEnabled, err := common.GetGlobalTelemetryPreference()
		if err != nil {

			logger.Debug("Unable to get global telemetry preference, defaulting to false: %v", err)
		}

		telemetryEnabled := false
		if globalTelemetryEnabled != nil {
			telemetryEnabled = *globalTelemetryEnabled
		}

		if err := copyDefaultConfigToProject(logger, targetDir, projectName, appEnv.ProjectUUID, mainBaseURL, mainVersion, mainLang, telemetryEnabled); err != nil {
			return fmt.Errorf("failed to initialize %s: %w", common.BaseConfig, err)
		}

		if err := copyDefaultKeystoresToProject(logger, targetDir); err != nil {
			return fmt.Errorf("failed to initialize keystores: %w", err)
		}

		if err := copyZeusFileToProject(logger, targetDir); err != nil {
			return fmt.Errorf("failed to initialize .zeus: %w", err)
		}

		if err := initGitRepo(cCtx, targetDir, logger); err != nil {
			logger.Warn("Failed to initialize Git repository in %s: %v", targetDir, err)
		}

		logger.Info("\nProject %s created successfully in %s. Run 'cd %s' to get started.", projectName, targetDir, targetDir)
		return nil
	},
}

CreateCommand defines the "create" command

View Source
var DeployCommand = &cli.Command{
	Name:  "deploy",
	Usage: "Deploy AVS components to specified network",
	Subcommands: []*cli.Command{
		{
			Name:  "contracts",
			Usage: "Deploy contracts to specified network",
			Subcommands: []*cli.Command{
				{
					Name:  "l1",
					Usage: "Deploy L1 contracts to specified network",
					Flags: append([]cli.Flag{
						&cli.StringFlag{
							Name:  "context",
							Usage: "Select the context to use in this command (devnet, testnet or mainnet)",
						},
						&cli.BoolFlag{
							Name:  "skip-setup",
							Usage: "Skip AVS setup steps (metadata update, registrar setup, etc.) after contract deployment",
							Value: false,
						},
						&cli.BoolFlag{
							Name:  "use-zeus",
							Usage: "Use Zeus CLI to fetch l1(*) and l2(*) core addresses",
							Value: true,
						},
					}, common.GlobalFlags...),
					Action: StartDeployL1Action,
				},
				{
					Name:  "l2",
					Usage: "Deploy L2 contracts to specified network",
					Flags: append([]cli.Flag{
						&cli.StringFlag{
							Name:  "context",
							Usage: "Select the context to use in this command (devnet, testnet or mainnet)",
						},
					}, common.GlobalFlags...),
					Action: StartDeployL2Action,
				},
			},
		},
	},
}

DeployCommand defines the "deploy" command

View Source
var DevnetCommand = &cli.Command{
	Name:  "devnet",
	Usage: "Manage local AVS development network (Docker-based)",
	Subcommands: []*cli.Command{
		{
			Name:  "start",
			Usage: "Starts Docker containers and deploys local contracts",
			Flags: append([]cli.Flag{
				&cli.StringFlag{
					Name:  "context",
					Usage: "Select the context to use in this command (devnet, testnet or mainnet)",
				},
				&cli.BoolFlag{
					Name:  "reset",
					Usage: "Wipe and restart the devnet from scratch",
				},
				&cli.StringFlag{
					Name:  "fork",
					Usage: "Fork from a specific chain (e.g. Base, OP)",
				},
				&cli.BoolFlag{
					Name:  "headless",
					Usage: "Run without showing logs or interactive TUI",
				},
				&cli.IntFlag{
					Name:  "l1-port",
					Usage: "Specify a custom port for local devnet L1",
					Value: 8545,
				},
				&cli.IntFlag{
					Name:  "l2-port",
					Usage: "Specify a custom port for local devnet L2",
					Value: 9545,
				},
				&cli.BoolFlag{
					Name:  "skip-avs-run",
					Usage: "Skip starting offchain AVS components",
					Value: false,
				},
				&cli.BoolFlag{
					Name:  "skip-transporter",
					Usage: "Skip starting/submitting Stake Root via transporter",
					Value: false,
				},
				&cli.BoolFlag{
					Name:  "skip-deploy-contracts",
					Usage: "Skip deploying contracts and only start local devnet",
					Value: false,
				},
				&cli.BoolFlag{
					Name:  "skip-setup",
					Usage: "Skip AVS setup steps (metadata update, registrar setup, etc.) after contract deployment",
					Value: false,
				},
				&cli.BoolFlag{
					Name:  "use-zeus",
					Usage: "Use Zeus CLI to fetch l1(sepolia) and l2(base sepolia) core addresses",
					Value: false,
				},
				&cli.BoolFlag{
					Name:  "persist",
					Usage: "Persist devnet containers unless stop is used explicitly",
					Value: false,
				},
			}, common.GlobalFlags...),
			Action: StartDevnetAction,
		},
		{
			Name:  "deploy-contracts",
			Usage: "Deploy all L1/L2 and AVS contracts to devnet",
			Flags: []cli.Flag{
				&cli.StringFlag{
					Name:  "context",
					Usage: "Select the context to use in this command (devnet, testnet or mainnet)",
				},
			},
			Action: DeployL1ContractsAction,
		},
		{
			Name:  "stop",
			Usage: "Stops and removes all containers and resources",
			Flags: []cli.Flag{
				&cli.StringFlag{
					Name:  "context",
					Usage: "Select the context to use in this command (devnet, testnet or mainnet)",
				},
				&cli.BoolFlag{
					Name:  "all",
					Usage: "Stop all running devnet containers",
					Value: true,
				},
				&cli.StringFlag{
					Name:  "project.name",
					Usage: "Stop containers associated with the given project name",
				},
				&cli.IntFlag{
					Name:  "l1-port",
					Usage: "Stop only the L1 container running on the specified port",
				},
				&cli.IntFlag{
					Name:  "l2-port",
					Usage: "Stop only the L2 container running on the specified port",
				},
			},
			Action: StopDevnetAction,
		},
		{
			Name:   "list",
			Usage:  "Lists all running devkit devnet containers with their ports",
			Action: ListDevnetContainersAction,
		},
	},
}

DevnetCommand defines the "devnet" command

View Source
var ReleaseCommand = &cli.Command{
	Name:  "release",
	Usage: "Manage AVS releases and artifacts",
	Subcommands: []*cli.Command{
		{
			Name:  "publish",
			Usage: "Publish a new AVS release",
			Flags: append(common.GlobalFlags, []cli.Flag{
				&cli.StringFlag{
					Name:  "context",
					Usage: "Select the context to use in this command (devnet, testnet or mainnet)",
				},
				&cli.Int64Flag{
					Name:     "upgrade-by-time",
					Usage:    "Unix timestamp by which the upgrade must be completed",
					Required: true,
				},
				&cli.StringFlag{
					Name:  "registry",
					Usage: "Registry to use for the release. If not provided, will use registry from context",
				},
			}...),
			Action: publishReleaseAction,
		},
		{
			Name:  "uri",
			Usage: "Set release metadata URI for an operator set",
			Flags: append(common.GlobalFlags, []cli.Flag{
				&cli.StringFlag{
					Name:  "context",
					Usage: "Select the context to use in this command (devnet, testnet or mainnet)",
				},
				&cli.StringFlag{
					Name:     "metadata-uri",
					Usage:    "Metadata URI to set for the release",
					Required: true,
				},
				&cli.UintFlag{
					Name:     "operator-set-id",
					Usage:    "Operator set ID",
					Required: true,
				},
				&cli.StringFlag{
					Name:  "avs-address",
					Usage: "AVS address (if not provided, will use from context)",
				},
			}...),
			Action: setReleaseMetadataURIAction,
		},
	},
}

ReleaseCommand defines the "release" command

View Source
var RunCommand = &cli.Command{
	Name:  "run",
	Usage: "Start offchain AVS components",
	Flags: append([]cli.Flag{
		&cli.StringFlag{
			Name:  "context",
			Usage: "Select the context to use in this command (devnet, testnet or mainnet)",
		},
	}, common.GlobalFlags...),
	Action: func(cCtx *cli.Context) error {

		return AVSRun(cCtx)
	},
}

RunCommand defines the "run" command

View Source
var TelemetryCommand = &cli.Command{
	Name:  "telemetry",
	Usage: "Manage telemetry settings",
	Flags: []cli.Flag{
		&cli.BoolFlag{
			Name:  "enable",
			Usage: "Enable telemetry collection",
		},
		&cli.BoolFlag{
			Name:  "disable",
			Usage: "Disable telemetry collection",
		},
		&cli.BoolFlag{
			Name:  "status",
			Usage: "Show current telemetry status",
		},
		&cli.BoolFlag{
			Name:  "global",
			Usage: "Apply setting globally (affects all projects and global default)",
		},
	},
	Action: func(cCtx *cli.Context) error {
		logger := common.LoggerFromContext(cCtx)

		enable := cCtx.Bool("enable")
		disable := cCtx.Bool("disable")
		status := cCtx.Bool("status")
		global := cCtx.Bool("global")

		if (enable && disable) || (!enable && !disable && !status) {
			return fmt.Errorf("specify exactly one of --enable, --disable, or --status")
		}

		if status {
			return showTelemetryStatus(logger, global)
		}

		if enable {
			return enableTelemetry(logger, global)
		}

		if disable {
			return disableTelemetry(logger, global)
		}

		return nil
	},
}

TelemetryCommand allows users to manage telemetry settings

View Source
var TestCommand = &cli.Command{
	Name:  "test",
	Usage: "Run AVS tests",
	Flags: append([]cli.Flag{
		&cli.StringFlag{
			Name:  "context",
			Usage: "Select the context to use in this command (devnet, testnet or mainnet)",
		},
	}, common.GlobalFlags...),
	Action: func(cCtx *cli.Context) error {

		return AVSTest(cCtx)
	},
}

TestCommand defines the "test" command

View Source
var TransportCommand = &cli.Command{
	Name:  "transport",
	Usage: "Transport Stake Root to L1",
	Subcommands: []*cli.Command{
		{
			Name:  "run",
			Usage: "Immediately transport stake root to L1",
			Flags: append([]cli.Flag{
				&cli.StringFlag{
					Name:  "context",
					Usage: "Select the context to use in this command (devnet, testnet or mainnet)",
				},
			}, common.GlobalFlags...),
			Action: func(cCtx *cli.Context) error {

				return Transport(cCtx, true)
			},
		},
		{
			Name:  "verify",
			Usage: "Verify that the context active_stake_roots match onchain state",
			Flags: append([]cli.Flag{
				&cli.StringFlag{
					Name:  "context",
					Usage: "Select the context to use in this command (devnet, testnet or mainnet)",
				},
			}, common.GlobalFlags...),
			Action: VerifyActiveStakeTableRoots,
		},
		{
			Name:  "schedule",
			Usage: "Schedule transport stake root to L1",
			Flags: append([]cli.Flag{
				&cli.StringFlag{
					Name:  "context",
					Usage: "Select the context to use in this command (devnet, testnet or mainnet)",
				},
				&cli.StringFlag{
					Name:  "cron-expr",
					Usage: "Specify a custom schedule to override config schedule",
					Value: "",
				},
			}, common.GlobalFlags...),
			Action: func(cCtx *cli.Context) error {

				contextName := cCtx.String("context")

				// Load config according to provided contextName
				var err error
				var cfg *common.ConfigWithContextConfig
				if contextName == "" {
					cfg, contextName, err = common.LoadDefaultConfigWithContextConfig()
				} else {
					cfg, contextName, err = common.LoadConfigWithContextConfig(contextName)
				}
				if err != nil {
					return fmt.Errorf("failed to load configurations for whitelist chain id in cross registry: %w", err)
				}

				envCtx, ok := cfg.Context[contextName]
				if !ok {
					return fmt.Errorf("context '%s' not found in configuration", contextName)
				}

				schedule := cCtx.String("cron-expr")
				if schedule == "" {
					schedule = envCtx.Transporter.Schedule
				}

				err = ScheduleTransport(cCtx, schedule)
				if err != nil {
					return fmt.Errorf("ScheduleTransport failed: %v", err)
				}

				select {}
			},
		},
	},
}
View Source
var UpgradeCommand = &cli.Command{
	Name:  "upgrade",
	Usage: "Upgrade devkit and template",
	Flags: append([]cli.Flag{
		&cli.StringFlag{
			Name:  "version",
			Usage: "Version to upgrade to (e.g. v0.0.8)",
			Value: "latest",
		},
	}, common.GlobalFlags...),
	Action: func(cCtx *cli.Context) error {
		return UpgradeDevkit(cCtx)
	},
}

UpgradeCommand defines the CLI command to upgrade the devkit binary and templates

Functions

func AVSRun

func AVSRun(cCtx *cli.Context) error

func AVSTest added in v0.0.10

func AVSTest(cCtx *cli.Context) error

func ConfigureOpSetCurveTypeAction added in v0.0.9

func ConfigureOpSetCurveTypeAction(cCtx *cli.Context, logger iface.Logger) error

ConfigureOpSetCurveType

func CreateAVSOperatorSetsAction

func CreateAVSOperatorSetsAction(cCtx *cli.Context, logger iface.Logger) error

func CreateGenerationReservationAction added in v0.0.9

func CreateGenerationReservationAction(cCtx *cli.Context, logger iface.Logger) error

func DelegateToOperatorsAction added in v0.0.9

func DelegateToOperatorsAction(cCtx *cli.Context, logger iface.Logger) error

func DeployL1ContractsAction

func DeployL1ContractsAction(cCtx *cli.Context) error

func DeployL2ContractsAction added in v0.0.10

func DeployL2ContractsAction(cCtx *cli.Context) error

func DepositIntoStrategiesAction added in v0.0.9

func DepositIntoStrategiesAction(cCtx *cli.Context, logger iface.Logger) error

func FetchZeusAddressesAction

func FetchZeusAddressesAction(cCtx *cli.Context) error

func GetLatestVersionFromGitHub added in v0.0.9

func GetLatestVersionFromGitHub(version string) (string, string, error)

GetLatestVersionFromGitHub queries the GitHub releases API and returns the latest tag and commit

func GetOnchainStakeTableRoots added in v0.0.9

func GetOnchainStakeTableRoots(cCtx *cli.Context) (map[uint64][32]byte, error)

Get all stake table roots from appropriate OperatorTableUpdaters

func ListDevnetContainersAction

func ListDevnetContainersAction(cCtx *cli.Context) error

func ModifyAllocationsAction added in v0.0.9

func ModifyAllocationsAction(cCtx *cli.Context, logger iface.Logger) error

func PerformUpgrade added in v0.0.9

func PerformUpgrade(version, binDir string, logger iface.Logger) error

PerformUpgrade downloads and installs the target version of the devkit binary. It supports both .tar.gz and raw .tar archive formats.

func RegisterKeyInKeyRegistrarAction added in v0.0.9

func RegisterKeyInKeyRegistrarAction(cCtx *cli.Context, logger iface.Logger) error

func RegisterOperatorsToAvsFromConfigAction added in v0.0.9

func RegisterOperatorsToAvsFromConfigAction(cCtx *cli.Context, logger iface.Logger) error

func RegisterOperatorsToEigenLayerFromConfigAction added in v0.0.9

func RegisterOperatorsToEigenLayerFromConfigAction(cCtx *cli.Context, logger iface.Logger) error

func ScheduleTransport added in v0.0.9

func ScheduleTransport(cCtx *cli.Context, cronExpr string) error

Schedule transport using the default parser and transportFunc

func ScheduleTransportWithParserAndFunc added in v0.0.9

func ScheduleTransportWithParserAndFunc(cCtx *cli.Context, cronExpr string, parser cron.Parser, transportFunc func()) error

Schedule transport using custom parser and transportFunc

func SetAVSRegistrarAction

func SetAVSRegistrarAction(cCtx *cli.Context, logger iface.Logger) error

func SetAllocationDelayAction added in v0.0.9

func SetAllocationDelayAction(cCtx *cli.Context, logger iface.Logger) error

func StartDeployL1Action

func StartDeployL1Action(cCtx *cli.Context) error

func StartDeployL2Action

func StartDeployL2Action(cCtx *cli.Context) error

func StartDevnetAction

func StartDevnetAction(cCtx *cli.Context) error

func StopDevnetAction

func StopDevnetAction(cCtx *cli.Context) error

func Transport added in v0.0.9

func Transport(cCtx *cli.Context, initialRun bool) error

func UpdateAVSMetadataAction

func UpdateAVSMetadataAction(cCtx *cli.Context, logger iface.Logger) error

func UpgradeDevkit added in v0.0.9

func UpgradeDevkit(cCtx *cli.Context) error

UpgradeDevkit resolves the latest version if needed and invokes PerformUpgrade to install the new version

func VerifyActiveStakeTableRoots added in v0.0.9

func VerifyActiveStakeTableRoots(cCtx *cli.Context) error

Verify the context stored ActiveStakeRoots match onchain state

func WhitelistChainIdInCrossRegistryAction added in v0.0.9

func WhitelistChainIdInCrossRegistryAction(cCtx *cli.Context, logger iface.Logger) error

func WriteStakeTableRootsToContext added in v0.0.9

func WriteStakeTableRootsToContext(cCtx *cli.Context, roots map[uint64][32]byte) error

Record StakeTableRoots in the context for later retrieval

Types

type BN254OperatorInfo

type BN254OperatorInfo struct {
	Pubkey  G1Point
	Weights []*big.Int
}

type ChainInfo

type ChainInfo struct {
	ChainId int64 `json:"chainId"`
}

type DeployContractJson

type DeployContractJson struct {
	Name      string      `json:"name"`
	Address   string      `json:"address"`
	ABI       interface{} `json:"abi"`
	ChainInfo ChainInfo   `json:"chainInfo"`
}

type DeployContractTransport

type DeployContractTransport struct {
	Name    string
	Address string
	ABI     string
}

type G1Point

type G1Point struct{ X, Y *big.Int }

type LatestRelease added in v0.0.9

type LatestRelease struct {
	TagName      string `json:"tag_name"`
	TargetCommit string `json:"target_commitish"`
}

LatestRelease defines the subset of GitHub release fields we care about

type OperatorSetRelease added in v0.0.10

type OperatorSetRelease struct {
	Digest      string `json:"digest"`
	Registry    string `json:"registry"`
	RuntimeSpec string `json:"runtimeSpec,omitempty"` // YAML content of the runtime spec
}

OperatorSetRelease represents the data for each operator set

type Receipt

type Receipt struct {
	Status          hexutil.Uint64 `json:"status"`
	TransactionHash ethcommon.Hash `json:"transactionHash"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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