Documentation
¶
Index ¶
Constants ¶
View Source
const ModuleName = "k2"
Variables ¶
View Source
var ( WalletPrivateKeyFlag = &cli.StringFlag{ Name: ModuleName + "." + "eth1-private-key", Usage: "The private key of the validator wallet", Category: strings.ReplaceAll(strings.ToUpper(ModuleName), "_", " "), EnvVars: []string{"ETH1_PRIVATE_KEY"}, } Web3SignerUrlFlag = &cli.StringFlag{ Name: ModuleName + "." + "web3-signer-url", Usage: "The url of the web3 signer", Category: strings.ReplaceAll(strings.ToUpper(ModuleName), "_", " "), } PayoutRecipientFlag = &cli.StringFlag{ Name: ModuleName + "." + "payout-recipient", Usage: "The address of the payout recipient, optional would then default to the registration fee recepient address", Category: strings.ReplaceAll(strings.ToUpper(ModuleName), "_", " "), } BeaconNodeUrlFlag = &cli.StringFlag{ Name: ModuleName + "." + "beacon-node-url", Usage: "The url of the beacon node", Category: strings.ReplaceAll(strings.ToUpper(ModuleName), "_", " "), } ExecutionNodeUrlFlag = &cli.StringFlag{ Name: ModuleName + "." + "execution-node-url", Usage: "The url of the execution node", Category: strings.ReplaceAll(strings.ToUpper(ModuleName), "_", " "), } ExclusionListFlag = &cli.StringFlag{ Name: ModuleName + "." + "exclusion-list", Usage: "The list of addresses to exclude from either the Proposer Registration or Native Delegation", Category: strings.ReplaceAll(strings.ToUpper(ModuleName), "_", " "), } MaxGasPriceFlag = &cli.Uint64Flag{ Name: ModuleName + "." + "max-gas-price", Usage: "The maximum gas price to use for transactions, in Gwei", Category: strings.ReplaceAll(strings.ToUpper(ModuleName), "_", " "), Value: 10, } RegistrationOnlyFlag = &cli.BoolFlag{ Name: ModuleName + "." + "registration-only", Usage: "Only register the validators in the proposer registry, do not natively delegate", Category: strings.ReplaceAll(strings.ToUpper(ModuleName), "_", " "), } ListenAddressFlag = &cli.StringFlag{ Name: ModuleName + "." + "listen-address", Usage: "The address to listen on for incoming requests", Category: strings.ReplaceAll(strings.ToUpper(ModuleName), "_", " "), } ClaimThresholdFlag = &cli.Float64Flag{ Name: ModuleName + "." + "claim-threshold", Usage: "The threshold for claiming rewards, in KETH", Category: strings.ReplaceAll(strings.ToUpper(ModuleName), "_", " "), } )
View Source
var K2ConfigConstants = map[uint64]K2Config{ 1: { ProposerRegistryContractAddress: common.HexToAddress("0xF7F6D8F8b76E94379034d333f4B5FE1694A32D87"), SignatureSwapperUrl: &url.URL{ Scheme: "https", Host: "signature-swapper.ponrelay.com", }, }, 5: { K2LendingContractAddress: common.HexToAddress("0xEEc98aBa34AB03EC1533D37F5256651b43E32d05"), K2NodeOperatorContractAddress: common.HexToAddress("0x10b37A1A3e3114fe479B2cf962dB8806c941d2Dc"), ProposerRegistryContractAddress: common.HexToAddress("0x1643ec804d944Da97d90c013cBaCD1358Cce1bAF"), SignatureSwapperUrl: &url.URL{ Scheme: "https", Host: "goerli-signature-swapper.ponrelay.com", }, BalanceVerificationUrl: &url.URL{ Scheme: "https", Host: "verify-effective-balance-goerli.restaking.cloud", }, }, }
A mapping of chain IDs to their respective K2 known configurations
View Source
var K2ConfigDefaults = K2Config{ ValidatorWalletPrivateKey: nil, ValidatorWalletAddress: common.Address{}, Web3SignerUrl: nil, SignatureSwapperUrl: nil, BeaconNodeUrl: nil, ExecutionNodeUrl: nil, K2LendingContractAddress: common.Address{}, K2NodeOperatorContractAddress: common.Address{}, ProposerRegistryContractAddress: common.Address{}, BalanceVerificationUrl: nil, PayoutRecipient: common.Address{}, ExclusionListFile: "", MaxGasPrice: 0, RegistrationOnly: false, ListenAddress: &url.URL{Scheme: "http", Host: "localhost:10000"}, ClaimThreshold: 0.0, }
Functions ¶
func NewCommand ¶
Types ¶
type K2Config ¶
type K2Config struct { ValidatorWalletPrivateKey *ecdsa.PrivateKey ValidatorWalletAddress common.Address Web3SignerUrl *url.URL SignatureSwapperUrl *url.URL BeaconNodeUrl *url.URL ExecutionNodeUrl *url.URL K2LendingContractAddress common.Address K2NodeOperatorContractAddress common.Address ProposerRegistryContractAddress common.Address BalanceVerificationUrl *url.URL // for effective balance reporting for verifiable signatures to claim rewards PayoutRecipient common.Address // to override the payout recipient for all validators ExclusionListFile string // to exclude validators from registration or native delegation MaxGasPrice uint64 RegistrationOnly bool ListenAddress *url.URL ClaimThreshold float64 // To only claim rewards if the validator has earned more than this threshold (in KETH) }
Click to show internal directories.
Click to hide internal directories.