Documentation
¶
Index ¶
Constants ¶
View Source
const ModuleName = "pno"
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"}, } ExecutionNodeUrlFlag = &cli.StringFlag{ Name: ModuleName + "." + "execution-node-url", Usage: "The url of the execution node", 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), "_", " "), } ListenAddressFlag = &cli.StringFlag{ Name: ModuleName + "." + "listen-address", Usage: "The address to listen on for incoming requests", 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, } AutoReDelegateFlag = &cli.BoolFlag{ Name: ModuleName + "." + "auto-redelegate", Usage: "Whether to automatically redelegate available netively delegated balance to self", Category: strings.ReplaceAll(strings.ToUpper(ModuleName), "_", " "), } K2LendingContractAddressFlag = &cli.StringFlag{ Name: ModuleName + "." + "k2-lending-contract-address", Usage: "The address of the K2 lending contract to override the internal configuration", Category: strings.ReplaceAll(strings.ToUpper(ModuleName), "_", " "), } K2NodeOperatorContractAddressFlag = &cli.StringFlag{ Name: ModuleName + "." + "k2-node-operator-contract-address", Usage: "The address of the K2 node operator contract to override the internal configuration", Category: strings.ReplaceAll(strings.ToUpper(ModuleName), "_", " "), } )
View Source
var PNOConfigConstants = map[uint64]PNOConfig{ 5: { K2LendingContractAddress: common.HexToAddress("0x5f3b5DfA2fBf3fDfEe9fA3d3c6e7fCf3f3f3f3f3f"), K2NodeOperatorContractAddress: common.HexToAddress("0x10b37A1A3e3114fe479B2cf962dB8806c941d2Dc"), PNORegistryContractAddress: common.HexToAddress("0x5f3b5DfA2fBf3fDfEe9fA3d3c6e7fCf3f3f3f3f3f"), }, 17000: { K2LendingContractAddress: common.HexToAddress("0x4655512B176243Dd161e61a818899324AE4E9323"), K2NodeOperatorContractAddress: common.HexToAddress("0xe7C28eb37802c4015e65a8c55e182A9d5421Cac3"), PNORegistryContractAddress: common.HexToAddress("0xfFa542ef408440A34809cBb754Aecb28dB1F5c5c"), }, }
A mapping of chain IDs to their respective PNO known configurations
View Source
var PNOConfigDefaults = PNOConfig{ ValidatorWalletPrivateKey: nil, ValidatorWalletAddress: common.Address{}, ExecutionNodeUrl: nil, BeaconNodeUrl: nil, K2LendingContractAddress: common.Address{}, K2NodeOperatorContractAddress: common.Address{}, PNORegistryContractAddress: common.Address{}, ListenAddress: &url.URL{Scheme: "http", Host: "localhost:9000"}, MaxGasPrice: 0, AutoReDelegateFlag: false, }
Functions ¶
func NewCommand ¶
Types ¶
type PNOConfig ¶
type PNOConfig struct {
ValidatorWalletPrivateKey *ecdsa.PrivateKey
ValidatorWalletAddress common.Address
ExecutionNodeUrl *url.URL
BeaconNodeUrl *url.URL
K2LendingContractAddress common.Address
K2NodeOperatorContractAddress common.Address
PNORegistryContractAddress common.Address
ListenAddress *url.URL
MaxGasPrice uint64
AutoReDelegateFlag bool
}
Click to show internal directories.
Click to hide internal directories.