chainflags

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ChainIDFlag = &IntFlag{
	Name:  "chain-id",
	Usage: "Chain ID",
	Aliases: NewAliases(
		"chain_id",
	),
}
View Source
var DVSApproverKeyName = &StringFlag{
	Name:  "approver-key-name",
	Usage: "approver key name",
	Aliases: []string{
		"dvs-approver-key-name",
	},
}
View Source
var DVSCentralSchedulerAddress = &StringFlag{
	Name:  "central-scheduler",
	Usage: "central scheduler address",
	Aliases: []string{
		"dvs-central-scheduler",
	},
}

TODO(menduo @2025-03-20, Thu, 14:10): set dvs-xxx as default name later

View Source
var DVSEjectionManagerAddress = &StringFlag{
	Name:  "dvs-ejection-manager",
	Usage: "ejection manager address",
	Aliases: []string{
		"ejection-manager",
	},
}
View Source
var DVSFrom = &StringFlag{
	Name:  "dvs-from",
	Usage: "dvs from key name",
}
View Source
var DVSOperatorStakeManagerAddress = &StringFlag{
	Name:  "dvs-operator-stake-manager",
	Usage: "Address of the DVS operator stake manager contract",
	Aliases: []string{
		"stake-registry",
	},
}
View Source
var DVSRPCURL = &StringFlag{
	Name:  "dvs-rpc-url",
	Usage: "RPC URL of the DVS",
}
View Source
var EthRPCURLFlag = &StringFlag{
	Name:  "rpc-url",
	Usage: "URL of the Ethereum RPC server",
}

EthRPCURLFlag is the flag for the Ethereum RPC URL of Pell EVM

View Source
var FromKeyNameFlag = &StringFlag{
	Name:  "from",
	Usage: "Name of the key to use for signing the transaction",
}

common flags

View Source
var GroupNumbers = &StringFlag{
	Name:  "groups",
	Usage: "group numbers",
}
View Source
var MetadataURI = &StringFlag{
	Name:  "metadata-uri",
	Usage: "metadata URI",
}
View Source
var PellDVSDirectoryAddress = &StringFlag{
	Name:  "dvs-directory",
	Usage: "Address of the DVS directory contract on Pell EVM",
}
View Source
var PellDelegationManagerAddress = &StringFlag{
	Name:  "delegation-manager",
	Usage: "Address of the delegation contract",
}
View Source
var PellRegistryRouterAddress = &StringFlag{
	Name:  "registry-router",
	Usage: "Address of the registry router contract",
}
View Source
var PellRegistryRouterFactoryAddress = &StringFlag{
	Name:  "registry-router-factory",
	Usage: "Address of the registry router factory contract",
}

flags for Pell EVM

Functions

func MarkFlagsAreRequired

func MarkFlagsAreRequired(cmd *cobra.Command, flags ...IFlagBase) error

func NewAliases

func NewAliases(alias ...string) []string

func RequireFromFlag

func RequireFromFlag() error

func RequireFromFlagPersistentForCmds

func RequireFromFlagPersistentForCmds(cmds ...*cobra.Command) error

func SetPellChainPersistentFlags

func SetPellChainPersistentFlags(cmds ...*cobra.Command)

Types

type IFlagBase

type IFlagBase interface {
	GetName() string
}

type IntFlag

type IntFlag struct {
	Name    string
	Aliases []string
	Usage   string
	Value   int
	Default int
	EnvVars []string
}

func (*IntFlag) AddToCmdFlag

func (f *IntFlag) AddToCmdFlag(cmds ...*cobra.Command) *IntFlag

func (*IntFlag) AddToCmdPersistentFlags

func (f *IntFlag) AddToCmdPersistentFlags(cmds ...*cobra.Command) *IntFlag

func (*IntFlag) GetName

func (f *IntFlag) GetName() string

type StringFlag

type StringFlag struct {
	Name    string
	Aliases []string
	Usage   string
	Value   string
	Default string
	EnvVars []string
}

func (*StringFlag) AddToCmdFlag

func (f *StringFlag) AddToCmdFlag(cmds ...*cobra.Command) *StringFlag

func (*StringFlag) AddToCmdPersistentFlags

func (f *StringFlag) AddToCmdPersistentFlags(cmds ...*cobra.Command) *StringFlag

func (*StringFlag) GetBool

func (f *StringFlag) GetBool() bool

func (*StringFlag) GetName

func (f *StringFlag) GetName() string

func (*StringFlag) GetValue

func (f *StringFlag) GetValue() string

func (*StringFlag) MarkRequired

func (f *StringFlag) MarkRequired(cmds ...*cobra.Command) error

func (*StringFlag) SetValue

func (f *StringFlag) SetValue()

SetValue sets the value of the flag, if it is not already set, make sure to call this after all flags are parsed

Jump to

Keyboard shortcuts

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