Documentation
¶
Index ¶
- Constants
- Variables
- func CallTemplateScript(cmdCtx context.Context, logger iface.Logger, dir string, scriptPath string, ...) (map[string]interface{}, error)
- func CleanYAML(v interface{}) interface{}
- func CloneNode(n *yaml.Node) *yaml.Node
- func CompareVersions(v1, v2 string) (bool, error)
- func DeepMerge(dst, src *yaml.Node) *yaml.Node
- func EnsureDockerIsRunning(cCtx *cli.Context) error
- func FindProjectRoot() (string, error)
- func GetChildByKey(node *yaml.Node, path string) *yaml.Node
- func GetEffectiveTelemetryPreference() (bool, error)
- func GetEigenLayerAddresses(contextName string, cfg *ConfigWithContextConfig) (...)
- func GetForkUrlDefault(contextName string, cfg *ConfigWithContextConfig, chainName string) (string, error)
- func GetGlobalConfigDir() (string, error)
- func GetGlobalConfigPath() (string, error)
- func GetGlobalTelemetryPreference() (*bool, error)
- func GetLogger(verbose bool) (iface.Logger, iface.ProgressTracker)
- func GetLoggerFromCLIContext(cCtx *cli.Context) (iface.Logger, iface.ProgressTracker)
- func GetProjectUUID() string
- func GetZeusAddresses(ctx context.Context, logger iface.Logger) (*L1ZeusAddressData, *L2ZeusAddressData, error)
- func HandleFirstRunTelemetryPrompt(logger iface.Logger) (bool, bool, error)
- func HandleFirstRunTelemetryPromptWithOptions(logger iface.Logger, opts TelemetryPromptOptions) (bool, bool, error)
- func ImpersonateAccount(client *rpc.Client, address common.Address) error
- func InterfaceToNode(v interface{}) (*yaml.Node, error)
- func IsFirstRun() (bool, error)
- func IsSemver(s string) bool
- func IsTelemetryEnabled() bool
- func IsValidABI(v interface{}) error
- func IsVerboseEnabled(cCtx *cli.Context, cfg *ConfigWithContextConfig) bool
- func ListYaml(filePath string, logger iface.Logger) error
- func LoadBaseConfig() (map[string]interface{}, error)
- func LoadConfig() (string, *yaml.Node, *yaml.Node, error)
- func LoadContext(contextName string) (string, *yaml.Node, *yaml.Node, string, error)
- func LoadContextConfig(ctxName string) (map[string]interface{}, error)
- func LoadDefaultContext() (string, *yaml.Node, *yaml.Node, string, error)
- func LoadDefaultRawConfigWithContext() ([]byte, string, error)
- func LoadDefaultRawContext() ([]byte, string, error)
- func LoadMap(path string) (map[string]interface{}, error)
- func LoadRawConfigWithContext(contextName string) ([]byte, string, error)
- func LoadRawContext(contextName string) ([]byte, string, error)
- func LoadYAML(path string) (*yaml.Node, error)
- func LoggerFromContext(cCtx *cli.Context) iface.Logger
- func MapToSortedSlice(keyed map[string]map[string]any) []any
- func MarkFirstRunComplete() error
- func NodeToInterface(node *yaml.Node) (interface{}, error)
- func Normalize(i interface{}) interface{}
- func NormalizeToKeyedMap(input any, idField string) map[string]map[string]any
- func ParseETHAmount(amountStr string) (*big.Int, error)
- func ParseVersion(v string) (major, minor, patch int, err error)
- func PeelBoolFromFlags(args []string, longFlag, shortFlag string) bool
- func ProgressTrackerFromContext(ctx context.Context) iface.ProgressTracker
- func RequireNonZero(s interface{}) error
- func SaveGlobalConfig(config *GlobalConfig) error
- func SaveProjectIdAndTelemetryToggle(projectDir string, projectUuid string, telemetryEnabled bool) error
- func SaveUserId(userUuid string) error
- func SetGlobalTelemetryPreference(enabled bool) error
- func SetMappingValue(mapNode, keyNode, valNode *yaml.Node)
- func SetProjectTelemetry(enabled bool) error
- func StopImpersonatingAccount(client *rpc.Client, address common.Address) error
- func TelemetryPromptWithOptions(logger iface.Logger, opts TelemetryPromptOptions) (bool, error)
- func ToStringID(value any) string
- func UpdateContextWithZeusAddresses(context context.Context, logger iface.Logger, contextMap *yaml.Node, ...) error
- func WithAppEnvironment(ctx *cli.Context)
- func WithLogger(ctx context.Context, logger iface.Logger) context.Context
- func WithProgressTracker(ctx context.Context, tracker iface.ProgressTracker) context.Context
- func WithShutdown(ctx context.Context) context.Context
- func WriteMap(path string, m map[string]interface{}) error
- func WriteToPath(root *yaml.Node, path []string, val string) (*yaml.Node, error)
- func WriteYAML(path string, node *yaml.Node) error
- func YamlToMap(b []byte) (map[string]interface{}, error)
- type AppEnvironment
- type ArtifactConfig
- type AvsConfig
- type ChainConfig
- type ChainContextConfig
- type Config
- type ConfigBlock
- type ConfigWithContextConfig
- type ContextConfig
- type ContractCaller
- func (cc *ContractCaller) ConfigureOpSetCurveType(ctx context.Context, avsAddress common.Address, opSetId uint32, ...) error
- func (cc *ContractCaller) CreateApprovalSignature(ctx context.Context, stakerAddress common.Address, ...) (DelegationManager.ISignatureUtilsMixinTypesSignatureWithExpiry, error)
- func (cc *ContractCaller) CreateGenerationReservation(ctx context.Context, opSetId uint32, operatorTableCalculator common.Address, ...) error
- func (cc *ContractCaller) CreateOperatorSets(ctx context.Context, avsAddress common.Address, ...) error
- func (cc *ContractCaller) DelegateToOperator(ctx context.Context, operatorAddress common.Address, ...) error
- func (cc *ContractCaller) DepositIntoStrategy(ctx context.Context, strategyAddress common.Address, amount *big.Int) error
- func (cc *ContractCaller) EncodeBN254KeyData(pubKey *bn254.PublicKey) ([]byte, error)
- func (cc *ContractCaller) GetBN254OperatorSetOwner(ctx context.Context, avsAddress common.Address, operatorSetId uint32) (common.Address, error)
- func (cc *ContractCaller) GetECDSAOperatorSetOwner(ctx context.Context, avsAddress common.Address, operatorSetId uint32) (common.Address, error)
- func (cc *ContractCaller) GetOperatorRegistrationMessageHash(ctx context.Context, operatorAddress common.Address, avsAddress common.Address, ...) ([32]byte, error)
- func (cc *ContractCaller) GetRegistry() *contracts.ContractRegistry
- func (cc *ContractCaller) GetReleaseMetadataUri(avsAddress common.Address, operatorSetId uint32) (string, error)
- func (cc *ContractCaller) ModifyAllocations(ctx context.Context, operatorAddress common.Address, operatorPrivateKey string, ...) error
- func (cc *ContractCaller) PackUint256Pair(x, y *big.Int) ([]byte, error)
- func (cc *ContractCaller) PublishRelease(ctx context.Context, avsAddress common.Address, ...) error
- func (cc *ContractCaller) RegisterAsOperator(ctx context.Context, operatorAddress common.Address, allocationDelay uint32, ...) error
- func (cc *ContractCaller) RegisterForOperatorSets(ctx context.Context, operatorAddress, avsAddress common.Address, ...) error
- func (cc *ContractCaller) RegisterKeyInKeyRegistrar(ctx context.Context, operatorAddress common.Address, avsAddress common.Address, ...) error
- func (cc *ContractCaller) RegisterStrategiesFromConfig(cfg *OperatorSpec) error
- func (cc *ContractCaller) RegisterTokensFromStrategies(cfg *OperatorSpec) error
- func (cc *ContractCaller) SendAndWaitForTransaction(ctx context.Context, txDescription string, ...) error
- func (cc *ContractCaller) SetAVSRegistrar(ctx context.Context, avsAddress, registrarAddress common.Address) error
- func (cc *ContractCaller) SetReleaseMetadata(ctx context.Context, metadataUri string, avsAddress common.Address, ...) error
- func (cc *ContractCaller) UpdateAVSMetadata(ctx context.Context, avsAddress common.Address, metadataURI string) error
- func (cc *ContractCaller) WhitelistChainIdInCrossRegistry(ctx context.Context, operatorTableUpdater common.Address, chainId uint64) error
- type CurveType
- type DeployedL1Contracts
- type DeployedL2Contracts
- type EigenLayerConfig
- type EigenLayerL1Config
- type EigenLayerL2Config
- type ForkConfig
- type GlobalConfig
- type HandlerFunc
- type L1ZeusAddressData
- type L2ZeusAddressData
- type OperatorAllocation
- type OperatorKeystores
- type OperatorRegistration
- type OperatorSet
- type OperatorSetAllocation
- type OperatorSpec
- type ProjectConfig
- type ProjectSettings
- type ResponseExpectation
- type StakeRootEntry
- type StakerDeposits
- type StakerSpec
- type Strategy
- type TelemetryPromptOptions
- type Transporter
Constants ¶
const ( // L1 and L2 config names L1 = "l1" L2 = "l2" // ContractsDir is the subdirectory name for contract components ContractsDir = "contracts" // Makefile is the name of the makefile used for root level operations Makefile = "Makefile" // ContractsMakefile is the name of the makefile used for contract level operations ContractsMakefile = "Makefile" // GlobalConfigFile is the name of the global YAML used to store global config details (eg, user_id) GlobalConfigFile = "config.yaml" // Filename for devkit project config BaseConfig = "config.yaml" // Filename for zeus config ZeusConfig = ".zeus" // Docker open timeout DockerOpenTimeoutSeconds = 10 // Docker open retry interval in milliseconds DockerOpenRetryIntervalMilliseconds = 500 // CrossChainRegistryOwnerAddress is the address of the owner of the cross chain registry CrossChainRegistryOwnerAddress = "0xb094Ba769b4976Dc37fC689A76675f31bc4923b0" // Curve type constants/enums for KeyRegistrar CURVE_TYPE_KEY_REGISTRAR_UNKNOWN = 0 CURVE_TYPE_KEY_REGISTRAR_ECDSA = 1 CURVE_TYPE_KEY_REGISTRAR_BN254 = 2 // These are fallback EigenLayer deployment addresses when not specified in context (assumes seploia) ALLOCATION_MANAGER_ADDRESS = "0x42583067658071247ec8CE0A516A58f682002d07" DELEGATION_MANAGER_ADDRESS = "0xD4A7E1Bd8015057293f0D0A557088c286942e84b" STRATEGY_MANAGER_ADDRESS = "0x2E3D6c0744b10eb0A4e6F679F71554a39Ec47a5D" KEY_REGISTRAR_ADDRESS = "0xA4dB30D08d8bbcA00D40600bee9F029984dB162a" CROSS_CHAIN_REGISTRY_ADDRESS = "0x287381B1570d9048c4B4C7EC94d21dDb8Aa1352a" BN254_TABLE_CALCULATOR_ADDRESS = "0xa19E3B00cf4aC46B5e6dc0Bbb0Fb0c86D0D65603" ECDSA_TABLE_CALCULATOR_ADDRESS = "0xaCB5DE6aa94a1908E6FA577C2ade65065333B450" MULTICHAIN_PROXY_ADMIN = "0xC5dc0d145a21FDAD791Df8eDC7EbCB5330A3FdB5" EIGEN_CONTRACT_ADDRESS = "0x3B78576F7D6837500bA3De27A60c7f594934027E" RELEASE_MANAGER_ADDRESS = "0xd9Cb89F1993292dEC2F973934bC63B0f2A702776" )
Project structure constants
const DefaultConfigWithContextConfigPath = "config"
Variables ¶
var GlobalFlags = []cli.Flag{ &cli.BoolFlag{ Name: "verbose", Aliases: []string{"v"}, Usage: "Enable verbose logging", }, &cli.BoolFlag{ Name: "enable-telemetry", Usage: "Enable telemetry collection on first run without prompting", }, &cli.BoolFlag{ Name: "disable-telemetry", Usage: "Disable telemetry collection on first run without prompting", }, }
GlobalFlags defines flags that apply to the entire application (global flags).
Functions ¶
func CallTemplateScript ¶
func CompareVersions ¶ added in v0.0.9
CompareVersions returns true if v1 > v2
func DeepMerge ¶
DeepMerge merges two *yaml.Node trees recursively
- If both nodes are MappingNodes, their keys are merged:
- Matching keys: recurse if both values are maps, else src replaces dst
- New keys in src are appended to dst
- For non-mapping nodes, src replaces dst - All merged values are deep-cloned to avoid shared references
func EnsureDockerIsRunning ¶
EnsureDockerIsRunning checks if Docker is running and attempts to launch Docker Desktop if not.
func FindProjectRoot ¶
FindProjectRoot searches upward from current directory to find config/config.yaml
func GetChildByKey ¶
GetChildByKey returns the value node associated with the given key from a MappingNode
func GetEffectiveTelemetryPreference ¶
GetEffectiveTelemetryPreference returns the effective telemetry preference Project setting takes precedence over global setting
func GetEigenLayerAddresses ¶
func GetEigenLayerAddresses(contextName string, cfg *ConfigWithContextConfig) (allocationManager, delegationManager, strategyManager, keyRegistrar, crossChainRegistry, bn254TableCalculator, ecdsaTableCalculator, releaseManager string)
GetEigenLayerAddresses returns EigenLayer L1 addresses from the context config Falls back to constants if not found in context
func GetForkUrlDefault ¶
func GetForkUrlDefault(contextName string, cfg *ConfigWithContextConfig, chainName string) (string, error)
func GetGlobalConfigDir ¶
GetGlobalConfigDir returns the XDG-compliant directory where global devkit config should be stored
func GetGlobalConfigPath ¶
GetGlobalConfigPath returns the full path to the global config file
func GetGlobalTelemetryPreference ¶
GetGlobalTelemetryPreference returns the global telemetry preference
func GetLogger ¶
func GetLogger(verbose bool) (iface.Logger, iface.ProgressTracker)
Get logger for the env we're in
func GetLoggerFromCLIContext ¶
GetLoggerFromCLIContext creates a logger based on the CLI context It checks the verbose flag and returns the appropriate logger
func GetProjectUUID ¶
func GetProjectUUID() string
GetProjectUUID returns the project UUID from config.yaml or empty string if not found
func GetZeusAddresses ¶
func GetZeusAddresses(ctx context.Context, logger iface.Logger) (*L1ZeusAddressData, *L2ZeusAddressData, error)
GetZeusAddresses runs the zeus env show commands and extracts core EigenLayer addresses.
func HandleFirstRunTelemetryPrompt ¶
HandleFirstRunTelemetryPrompt checks if this is a first run and prompts for telemetry Returns the telemetry preference (true/false) and whether this was a first run
func HandleFirstRunTelemetryPromptWithOptions ¶
func HandleFirstRunTelemetryPromptWithOptions(logger iface.Logger, opts TelemetryPromptOptions) (bool, bool, error)
HandleFirstRunTelemetryPromptWithOptions handles first run with configurable options
func ImpersonateAccount ¶ added in v0.0.9
ImpersonateAccount enables impersonation of an account on Anvil
func InterfaceToNode ¶
InterfaceToNode converts a Go value (typically map[string]interface{}) into a *yaml.Node
func IsFirstRun ¶
IsFirstRun checks if this is the user's first time running devkit
func IsTelemetryEnabled ¶
func IsTelemetryEnabled() bool
IsTelemetryEnabled returns whether telemetry is enabled for the project It checks both global and project-level preferences, with project taking precedence
func IsValidABI ¶
func IsValidABI(v interface{}) error
func IsVerboseEnabled ¶
func IsVerboseEnabled(cCtx *cli.Context, cfg *ConfigWithContextConfig) bool
IsVerboseEnabled checks if either the CLI --verbose flag is set, or config.yaml has log level = "debug"
func ListYaml ¶
ListYaml prints the contents of a YAML file to stdout, preserving order and comments. It rejects non-.yaml/.yml extensions and surfaces precise errors.
func LoadBaseConfig ¶
func LoadContext ¶ added in v0.0.9
func LoadContextConfig ¶
func LoadDefaultRawContext ¶
func LoggerFromContext ¶
LoggerFromContext retrieves the logger from the context If no logger is found, it returns a non-verbose logger as fallback
func MapToSortedSlice ¶
MapToSortedSlice converts a keyed map back to a slice sorted by numeric id if possible.
func MarkFirstRunComplete ¶
func MarkFirstRunComplete() error
MarkFirstRunComplete marks that the first run has been completed
func NodeToInterface ¶
NodeToInterface converts a *yaml.Node back into a Go interface{}
func Normalize ¶
func Normalize(i interface{}) interface{}
Normalize will walk any nested map[interface{}]interface{} -> map[string]interface{}, and also recurse into []interface{}
func NormalizeToKeyedMap ¶
NormalizeToKeyedMap converts a slice or map of objects into a map keyed by the given field.
func ParseETHAmount ¶ added in v0.0.9
ParseETHAmount parses ETH amount strings like "5ETH", "10.5ETH", "1000000000000000000" (wei) Returns the amount in wei as *big.Int
func ParseVersion ¶ added in v0.0.9
ParseVersion converts version string like "0.0.5" to comparable integers
func PeelBoolFromFlags ¶
PeelBoolFromFlags reports whether a boolean CLI flag is set anywhere in args, It supports these forms:
--verbose --verbose=true|false|1|0|yes|no|t|f --verbose true|false|1|0|yes|no|t|f -v -v=true|false|1|0|yes|no|t|f -v true|false|1|0|yes|no|t|f
The last occurrence wins. If a flag is present without an explicit value, it is treated as true.
func ProgressTrackerFromContext ¶
func ProgressTrackerFromContext(ctx context.Context) iface.ProgressTracker
ProgressTrackerFromContext retrieves the progress tracker from the context If no tracker is found, it returns a non-verbose tracker as fallback
func RequireNonZero ¶
func RequireNonZero(s interface{}) error
func SaveGlobalConfig ¶
func SaveGlobalConfig(config *GlobalConfig) error
SaveGlobalConfig saves the global configuration to disk
func SaveProjectIdAndTelemetryToggle ¶
func SaveProjectIdAndTelemetryToggle(projectDir string, projectUuid string, telemetryEnabled bool) error
SaveProjectIdAndTelemetryToggle saves project settings to config.yaml
func SaveUserId ¶
SaveUserId saves user settings to the global config, but preserves existing UUID if present
func SetGlobalTelemetryPreference ¶
SetGlobalTelemetryPreference sets the global telemetry preference
func SetMappingValue ¶
SetMappingValue sets mapNode[keyNode.Value] = valNode, replacing existing or appending if missing.
func SetProjectTelemetry ¶
SetProjectTelemetry sets telemetry preference for the current project only
func StopImpersonatingAccount ¶ added in v0.0.9
StopImpersonatingAccount disables impersonation of an account on Anvil
func TelemetryPromptWithOptions ¶
func TelemetryPromptWithOptions(logger iface.Logger, opts TelemetryPromptOptions) (bool, error)
TelemetryPromptWithOptions presents the telemetry opt-in dialog with configurable behavior
func ToStringID ¶
ToStringID converts a value of various numeric or string types into a string ID.
func UpdateContextWithZeusAddresses ¶
func UpdateContextWithZeusAddresses(context context.Context, logger iface.Logger, contextMap *yaml.Node, contextName string) error
UpdateContextWithZeusAddresses updates the context configuration with addresses from Zeus
func WithAppEnvironment ¶
func WithLogger ¶
WithLogger stores the logger in the context
func WithProgressTracker ¶
WithProgressTracker stores the progress tracker in the context
func WithShutdown ¶
WithShutdown creates a new context that will be cancelled on SIGTERM/SIGINT
func WriteToPath ¶
WriteToPath sets or overwrites a value in the YAML tree given a dot-delimited path.
Types ¶
type AppEnvironment ¶
type AppEnvironment struct {
CLIVersion string
OS string
Arch string
ProjectUUID string
UserUUID string
}
func AppEnvironmentFromContext ¶
func AppEnvironmentFromContext(ctx context.Context) (*AppEnvironment, bool)
func NewAppEnvironment ¶
func NewAppEnvironment(os, arch, projectUuid, userUuid string) *AppEnvironment
type ArtifactConfig ¶ added in v0.0.10
type ArtifactConfig struct {
ArtifactId string `json:"artifactId" yaml:"artifactId"`
Component string `json:"component" yaml:"component"`
Digest string `json:"digest" yaml:"digest"`
Registry string `json:"registry" yaml:"registry"`
Version string `json:"version" yaml:"version"`
}
ArtifactConfig defines the structure for release artifacts
type ChainConfig ¶
type ChainConfig struct {
ChainID int `json:"chain_id" yaml:"chain_id"`
RPCURL string `json:"rpc_url" yaml:"rpc_url"`
Fork *ForkConfig `json:"fork,omitempty" yaml:"fork,omitempty"`
}
type ChainContextConfig ¶
type ChainContextConfig struct {
Name string `json:"name" yaml:"name"`
Chains map[string]ChainConfig `json:"chains" yaml:"chains"`
Transporter Transporter `json:"transporter,omitempty" yaml:"transporter,omitempty"`
DeployerPrivateKey string `json:"deployer_private_key" yaml:"deployer_private_key"`
AppDeployerPrivateKey string `json:"app_private_key" yaml:"app_private_key"`
Stakers []StakerSpec `json:"stakers" yaml:"stakers"`
Operators []OperatorSpec `json:"operators" yaml:"operators"`
Avs AvsConfig `json:"avs" yaml:"avs"`
EigenLayer *EigenLayerConfig `json:"eigenlayer" yaml:"eigenlayer"`
DeployedL1Contracts []DeployedL1Contracts `json:"deployed_l1_contracts" yaml:"deployed_l1_contracts"`
DeployedL2Contracts []DeployedL2Contracts `json:"deployed_l2_contracts" yaml:"deployed_l2_contracts"`
OperatorSets []OperatorSet `json:"operator_sets" yaml:"operator_sets"`
OperatorRegistrations []OperatorRegistration `json:"operator_registrations" yaml:"operator_registrations"`
Artifact *ArtifactConfig `json:"artifact" yaml:"artifact"`
}
type Config ¶
type Config struct {
Version string `json:"version" yaml:"version"`
Config ConfigBlock `json:"config" yaml:"config"`
}
func LoadBaseConfigYaml ¶
type ConfigBlock ¶
type ConfigBlock struct {
Project ProjectConfig `json:"project" yaml:"project"`
}
type ConfigWithContextConfig ¶
type ConfigWithContextConfig struct {
Config ConfigBlock `json:"config" yaml:"config"`
Context map[string]ChainContextConfig `json:"context" yaml:"context"`
}
func LoadConfigWithContextConfig ¶
func LoadConfigWithContextConfig(contextName string) (*ConfigWithContextConfig, string, error)
func LoadDefaultConfigWithContextConfig ¶
func LoadDefaultConfigWithContextConfig() (*ConfigWithContextConfig, string, error)
type ContextConfig ¶
type ContextConfig struct {
Version string `json:"version" yaml:"version"`
Context ChainContextConfig `json:"context" yaml:"context"`
}
type ContractCaller ¶
type ContractCaller struct {
// contains filtered or unexported fields
}
ContractCaller provides a high-level interface for interacting with contracts
func NewContractCaller ¶
func (*ContractCaller) ConfigureOpSetCurveType ¶ added in v0.0.9
func (*ContractCaller) CreateApprovalSignature ¶ added in v0.0.9
func (cc *ContractCaller) CreateApprovalSignature(ctx context.Context, stakerAddress common.Address, operatorAddress common.Address, approverAddress common.Address, approverPrivateKey string, approverSalt [32]byte, expiry *big.Int) (DelegationManager.ISignatureUtilsMixinTypesSignatureWithExpiry, error)
func (*ContractCaller) CreateGenerationReservation ¶ added in v0.0.9
func (*ContractCaller) CreateOperatorSets ¶
func (cc *ContractCaller) CreateOperatorSets(ctx context.Context, avsAddress common.Address, createSetParams []allocationmanager.IAllocationManagerTypesCreateSetParams) error
func (*ContractCaller) DelegateToOperator ¶ added in v0.0.9
func (cc *ContractCaller) DelegateToOperator(ctx context.Context, operatorAddress common.Address, signature DelegationManager.ISignatureUtilsMixinTypesSignatureWithExpiry, approverSalt [32]byte) error
func (*ContractCaller) DepositIntoStrategy ¶ added in v0.0.9
func (*ContractCaller) EncodeBN254KeyData ¶ added in v0.0.9
func (cc *ContractCaller) EncodeBN254KeyData(pubKey *bn254.PublicKey) ([]byte, error)
func (*ContractCaller) GetBN254OperatorSetOwner ¶
func (*ContractCaller) GetECDSAOperatorSetOwner ¶
func (*ContractCaller) GetOperatorRegistrationMessageHash ¶ added in v0.0.9
func (*ContractCaller) GetRegistry ¶ added in v0.0.9
func (cc *ContractCaller) GetRegistry() *contracts.ContractRegistry
GetRegistry returns the contract registry for external access
func (*ContractCaller) GetReleaseMetadataUri ¶
func (*ContractCaller) ModifyAllocations ¶ added in v0.0.9
func (*ContractCaller) PackUint256Pair ¶
func (cc *ContractCaller) PackUint256Pair(x, y *big.Int) ([]byte, error)
abi.encode(uint256 x, uint256 y)
func (*ContractCaller) PublishRelease ¶ added in v0.0.10
func (cc *ContractCaller) PublishRelease(ctx context.Context, avsAddress common.Address, artifacts []releasemanager.IReleaseManagerTypesArtifact, operatorSetId uint32, upgradeByTime uint32) error
func (*ContractCaller) RegisterAsOperator ¶
func (*ContractCaller) RegisterForOperatorSets ¶
func (*ContractCaller) RegisterKeyInKeyRegistrar ¶ added in v0.0.9
func (*ContractCaller) RegisterStrategiesFromConfig ¶ added in v0.0.9
func (cc *ContractCaller) RegisterStrategiesFromConfig(cfg *OperatorSpec) error
RegisterStrategiesFromConfig registers all strategy contracts found in the configuration
func (*ContractCaller) RegisterTokensFromStrategies ¶ added in v0.0.9
func (cc *ContractCaller) RegisterTokensFromStrategies(cfg *OperatorSpec) error
RegisterTokensFromStrategies registers all underlying token contracts from strategies
func (*ContractCaller) SendAndWaitForTransaction ¶
func (cc *ContractCaller) SendAndWaitForTransaction( ctx context.Context, txDescription string, fn func() (*types.Transaction, error), ) error
func (*ContractCaller) SetAVSRegistrar ¶
func (cc *ContractCaller) SetAVSRegistrar(ctx context.Context, avsAddress, registrarAddress common.Address) error
SetAVSRegistrar sets the registrar address for an AVS
func (*ContractCaller) SetReleaseMetadata ¶
func (*ContractCaller) UpdateAVSMetadata ¶
func (*ContractCaller) WhitelistChainIdInCrossRegistry ¶ added in v0.0.9
type CurveType ¶ added in v0.0.10
type CurveType string
CurveType represents the cryptographic curve type for operator sets
type DeployedL1Contracts ¶ added in v0.0.10
type DeployedL2Contracts ¶ added in v0.0.10
type EigenLayerConfig ¶
type EigenLayerConfig struct {
L1 EigenLayerL1Config `json:"l1" yaml:"l1"`
L2 EigenLayerL2Config `json:"l2" yaml:"l2"`
}
type EigenLayerL1Config ¶ added in v0.0.9
type EigenLayerL1Config struct {
AllocationManager string `json:"allocation_manager" yaml:"allocation_manager"`
DelegationManager string `json:"delegation_manager" yaml:"delegation_manager"`
StrategyManager string `json:"strategy_manager" yaml:"strategy_manager"`
BN254TableCalculator string `json:"bn254_table_calculator" yaml:"bn254_table_calculator"`
ECDSATableCalculator string `json:"ecdsa_table_calculator" yaml:"ecdsa_table_calculator"`
CrossChainRegistry string `json:"cross_chain_registry" yaml:"cross_chain_registry"`
KeyRegistrar string `json:"key_registrar" yaml:"key_registrar"`
ReleaseManager string `json:"release_manager" yaml:"release_manager"`
OperatorTableUpdater string `json:"operator_table_updater" yaml:"operator_table_updater"`
TaskMailbox string `json:"task_mailbox" yaml:"task_mailbox"`
PermissionController string `json:"permission_controller" yaml:"permission_controller"`
}
type EigenLayerL2Config ¶ added in v0.0.9
type EigenLayerL2Config struct {
BN254CertificateVerifier string `json:"bn254_certificate_verifier" yaml:"bn254_certificate_verifier"`
ECDSACertificateVerifier string `json:"ecdsa_certificate_verifier" yaml:"ecdsa_certificate_verifier"`
OperatorTableUpdater string `json:"operator_table_updater" yaml:"operator_table_updater"`
TaskMailbox string `json:"task_mailbox" yaml:"task_mailbox"`
}
type ForkConfig ¶
type GlobalConfig ¶
type GlobalConfig struct {
// FirstRun tracks if this is the user's first time running devkit
FirstRun bool `yaml:"first_run"`
// TelemetryEnabled stores the user's global telemetry preference
TelemetryEnabled *bool `yaml:"telemetry_enabled,omitempty"`
// The users uuid to identify user across projects
UserUUID string `yaml:"user_uuid"`
}
GlobalConfig contains user-level configuration that persists across all devkit usage
func LoadGlobalConfig ¶
func LoadGlobalConfig() (*GlobalConfig, error)
LoadGlobalConfig loads the global configuration, creating defaults if needed
type HandlerFunc ¶
HandlerFunc defines operations on a YAML node
type L1ZeusAddressData ¶ added in v0.0.10
type L1ZeusAddressData struct {
AllocationManager string `json:"allocationManager"`
DelegationManager string `json:"delegationManager"`
StrategyManager string `json:"strategyManager"`
CrossChainRegistry string `json:"crossChainRegistry"`
KeyRegistrar string `json:"keyRegistrar"`
ReleaseManager string `json:"releaseManager"`
OperatorTableUpdater string `json:"operatorTableUpdater"`
TaskMailbox string `json:"taskMailbox"`
PermissionController string `json:"permissionController"`
}
L1ZeusAddressData represents the addresses returned by zeus list command
type L2ZeusAddressData ¶ added in v0.0.10
type OperatorAllocation ¶ added in v0.0.9
type OperatorAllocation struct {
StrategyAddress string `json:"strategy_address" yaml:"strategy_address"`
Name string `json:"name" yaml:"name"`
OperatorSetAllocations []OperatorSetAllocation `json:"operator_set_allocations" yaml:"operator_set_allocations"`
}
OperatorAllocation defines strategy allocation for an operator
type OperatorKeystores ¶
type OperatorKeystores struct {
AVSAddress string `json:"avs,omitempty" yaml:"avs,omitempty"`
OperatorSet uint64 `json:"operatorSet,omitempty" yaml:"operatorSet,omitempty"`
ECDSAKeystorePath string `json:"ecdsa_keystore_path,omitempty" yaml:"ecdsa_keystore_path,omitempty"`
ECDSAKeystorePassword string `json:"ecdsa_keystore_password,omitempty" yaml:"ecdsa_keystore_password,omitempty"`
BlsKeystorePath string `json:"bls_keystore_path" yaml:"bls_keystore_path"`
BlsKeystorePassword string `json:"bls_keystore_password" yaml:"bls_keystore_password"`
}
OperatorKeystore defines keystore data available to an operator
type OperatorRegistration ¶
type OperatorSet ¶
type OperatorSetAllocation ¶ added in v0.0.9
type OperatorSetAllocation struct {
OperatorSet string `json:"operator_set" yaml:"operator_set"`
AllocationInWads string `json:"allocation_in_wads" yaml:"allocation_in_wads"`
}
OperatorSetAllocation defines allocation for a specific operator set
type OperatorSpec ¶
type OperatorSpec struct {
Address string `json:"address" yaml:"address"`
ECDSAKey string `json:"ecdsa_key,omitempty" yaml:"ecdsa_key,omitempty"`
Stake string `json:"stake,omitempty" yaml:"stake,omitempty"`
Keystores []OperatorKeystores `json:"keystores,omitempty" yaml:"keystores,omitempty"`
Allocations []OperatorAllocation `json:"allocations,omitempty" yaml:"allocations,omitempty"`
}
type ProjectConfig ¶
type ProjectConfig struct {
Name string `json:"name" yaml:"name"`
Version string `json:"version" yaml:"version"`
Context string `json:"context" yaml:"context"`
ProjectUUID string `json:"project_uuid,omitempty" yaml:"project_uuid,omitempty"`
TelemetryEnabled bool `json:"telemetry_enabled" yaml:"telemetry_enabled"`
TemplateBaseURL string `json:"templateBaseUrl,omitempty" yaml:"templateBaseUrl,omitempty"`
TemplateVersion string `json:"templateVersion,omitempty" yaml:"templateVersion,omitempty"`
TemplateLanguage string `json:"templatelanguage,omitempty" yaml:"templatelanguage,omitempty"`
}
type ProjectSettings ¶
type ProjectSettings struct {
ProjectUUID string `yaml:"project_uuid"`
TelemetryEnabled bool `yaml:"telemetry_enabled"`
}
ProjectSettings contains the project-level configuration
func LoadProjectSettings ¶
func LoadProjectSettings() (*ProjectSettings, error)
LoadProjectSettings loads project settings from config.yaml
type ResponseExpectation ¶
type ResponseExpectation int
const ( ExpectNonJSONResponse ResponseExpectation = iota ExpectJSONResponse )
type StakeRootEntry ¶ added in v0.0.9
type StakerDeposits ¶ added in v0.0.9
type StakerDeposits struct {
StrategyAddress string `json:"strategy_address" yaml:"strategy_address"`
Name string `json:"name" yaml:"name"`
DepositAmount string `json:"deposit_amount" yaml:"deposit_amount"`
}
StakerDeposits defines a deposit to a strategy
type StakerSpec ¶ added in v0.0.9
type StakerSpec struct {
StakerAddress string `json:"address" yaml:"address"`
StakerECDSAKey string `json:"ecdsa_key" yaml:"ecdsa_key"`
Deposits []StakerDeposits `json:"deposits" yaml:"deposits"`
OperatorAddress string `json:"operator" yaml:"operator"`
}
StakerSpec defines a staker configuration with address, key, and deposits
type TelemetryPromptOptions ¶
type TelemetryPromptOptions struct {
// EnableTelemetry automatically enables telemetry without prompting (for --enable-telemetry flag)
EnableTelemetry bool
// DisableTelemetry automatically disables telemetry without prompting (for --disable-telemetry flag)
DisableTelemetry bool
// SkipPromptInCI skips the prompt in CI environments (defaults to disabled)
SkipPromptInCI bool
}
TelemetryPromptOptions controls how the telemetry prompt behaves
type Transporter ¶ added in v0.0.9
type Transporter struct {
Schedule string `json:"schedule" yaml:"schedule"`
PrivateKey string `json:"private_key" yaml:"private_key"`
BlsPrivateKey string `json:"bls_private_key" yaml:"bls_private_key"`
ActiveStakeRoots []StakeRootEntry `json:"active_stake_roots,omitempty" yaml:"active_stake_roots,omitempty"`
}