Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 44 additions & 36 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,19 @@ import (
)

type CliConfig struct {
DryRun bool
UpdaterKeyFile string
UpdaterKeyPass string
NumRetries int
ConsensusEndpoint string
ExecutionEndpoint string
PoolAddress string
LogLevel string
ApiPort int
MetricsPort int
CheckPointSyncUrl string
RelayersEndpoints []string
DryRun bool
UpdaterKeyFile string
UpdaterKeyPass string
NumRetries int
ConsensusEndpoint string
ExecutionEndpoint string
PoolAddress string
EigenManagerAddress string
LogLevel string
ApiPort int
MetricsPort int
CheckPointSyncUrl string
RelayersEndpoints []string
}

// By default the release is a custom build. CI takes care of upgrading it with
Expand All @@ -46,6 +47,7 @@ func NewCliConfig() (*CliConfig, error) {
var consensusEndpoint = flag.String("consensus-endpoint", "", "Ethereum consensus endpoint")
var executionEndpoint = flag.String("execution-endpoint", "", "Ethereum execution endpoint")
var poolAddress = flag.String("pool-address", "", "Address of the smoothing pool contract")
var eigenManagerAddress = flag.String("eigen-manager-address", "", "Address of the eigen manager contract")
var relayersEndpointsStr = flag.String("relayers-endpoints", "", "Comma-separated list of relayers endpoints")

flag.Parse()
Expand Down Expand Up @@ -77,6 +79,10 @@ func NewCliConfig() (*CliConfig, error) {
return nil, errors.New("pool-address: " + *poolAddress + " is not a valid address")
}

if !common.IsHexAddress(*eigenManagerAddress) {
return nil, errors.New("eigen-manager-address: " + *eigenManagerAddress + " is not a valid address")
}

// Post process the relayers endpoints, make it a slice
relayersEndpoints := strings.Split(*relayersEndpointsStr, ",")

Expand All @@ -98,36 +104,38 @@ func NewCliConfig() (*CliConfig, error) {
}

cliConf := &CliConfig{
DryRun: *dryRun,
UpdaterKeyFile: *updaterKeystoreFile,
UpdaterKeyPass: *updaterKeystorePass,
NumRetries: *numRetries,
ConsensusEndpoint: *consensusEndpoint,
ExecutionEndpoint: *executionEndpoint,
PoolAddress: *poolAddress,
LogLevel: *logLevel,
ApiPort: *apiPort,
MetricsPort: *metricsPort,
CheckPointSyncUrl: *checkPointSyncUrl,
RelayersEndpoints: relayersEndpoints,
DryRun: *dryRun,
UpdaterKeyFile: *updaterKeystoreFile,
UpdaterKeyPass: *updaterKeystorePass,
NumRetries: *numRetries,
ConsensusEndpoint: *consensusEndpoint,
ExecutionEndpoint: *executionEndpoint,
PoolAddress: *poolAddress,
EigenManagerAddress: *eigenManagerAddress,
LogLevel: *logLevel,
ApiPort: *apiPort,
MetricsPort: *metricsPort,
CheckPointSyncUrl: *checkPointSyncUrl,
RelayersEndpoints: relayersEndpoints,
}
logConfig(cliConf)
return cliConf, nil
}

func logConfig(cfg *CliConfig) {
log.WithFields(log.Fields{
"DryRun": cfg.DryRun,
"UpdaterKeyFile": cfg.UpdaterKeyFile,
"UpdaterKeyPass": "hidden",
"NumRetries": cfg.NumRetries,
"ConsensusEndpoint": cfg.ConsensusEndpoint,
"ExecutionEndpoint": cfg.ExecutionEndpoint,
"PoolAddress": cfg.PoolAddress,
"LogLevel": cfg.LogLevel,
"ApiPort": cfg.ApiPort,
"MetricsPort": cfg.MetricsPort,
"CheckPointSyncUrl": cfg.CheckPointSyncUrl,
"RelayersEndpoints": cfg.RelayersEndpoints,
"DryRun": cfg.DryRun,
"UpdaterKeyFile": cfg.UpdaterKeyFile,
"UpdaterKeyPass": "hidden",
"NumRetries": cfg.NumRetries,
"ConsensusEndpoint": cfg.ConsensusEndpoint,
"ExecutionEndpoint": cfg.ExecutionEndpoint,
"PoolAddress": cfg.PoolAddress,
"EigenManagerAddress": cfg.EigenManagerAddress,
"LogLevel": cfg.LogLevel,
"ApiPort": cfg.ApiPort,
"MetricsPort": cfg.MetricsPort,
"CheckPointSyncUrl": cfg.CheckPointSyncUrl,
"RelayersEndpoints": cfg.RelayersEndpoints,
}).Info("Cli Config:")
}
2 changes: 1 addition & 1 deletion contract/abi.abi

Large diffs are not rendered by default.

333 changes: 332 additions & 1 deletion contract/contract.go

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions eigenLayer/manager/eigenpodmanager.abi
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"inputs":[{"internalType":"contract IETHPOSDeposit","name":"_ethPOS","type":"address"},{"internalType":"contract IBeacon","name":"_eigenPodBeacon","type":"address"},{"internalType":"contract IStrategyManager","name":"_strategyManager","type":"address"},{"internalType":"contract ISlasher","name":"_slasher","type":"address"},{"internalType":"contract IDelegationManager","name":"_delegationManager","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"podOwner","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"BeaconChainETHDeposited","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"podOwner","type":"address"},{"indexed":false,"internalType":"uint256","name":"shares","type":"uint256"},{"indexed":false,"internalType":"uint96","name":"nonce","type":"uint96"},{"indexed":false,"internalType":"address","name":"delegatedAddress","type":"address"},{"indexed":false,"internalType":"address","name":"withdrawer","type":"address"},{"indexed":false,"internalType":"bytes32","name":"withdrawalRoot","type":"bytes32"}],"name":"BeaconChainETHWithdrawalCompleted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"podOwner","type":"address"},{"indexed":false,"internalType":"int256","name":"newTotalShares","type":"int256"}],"name":"NewTotalShares","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"newPausedStatus","type":"uint256"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"contract IPauserRegistry","name":"pauserRegistry","type":"address"},{"indexed":false,"internalType":"contract IPauserRegistry","name":"newPauserRegistry","type":"address"}],"name":"PauserRegistrySet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"eigenPod","type":"address"},{"indexed":true,"internalType":"address","name":"podOwner","type":"address"}],"name":"PodDeployed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"podOwner","type":"address"},{"indexed":false,"internalType":"int256","name":"sharesDelta","type":"int256"}],"name":"PodSharesUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"newPausedStatus","type":"uint256"}],"name":"Unpaused","type":"event"},{"inputs":[{"internalType":"address","name":"podOwner","type":"address"},{"internalType":"uint256","name":"shares","type":"uint256"}],"name":"addShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"beaconChainETHStrategy","outputs":[{"internalType":"contract IStrategy","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"createPod","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"delegationManager","outputs":[{"internalType":"contract IDelegationManager","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"eigenPodBeacon","outputs":[{"internalType":"contract IBeacon","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ethPOS","outputs":[{"internalType":"contract IETHPOSDeposit","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"podOwner","type":"address"}],"name":"getPod","outputs":[{"internalType":"contract IEigenPod","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"podOwner","type":"address"}],"name":"hasPod","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"initialOwner","type":"address"},{"internalType":"contract IPauserRegistry","name":"_pauserRegistry","type":"address"},{"internalType":"uint256","name":"_initPausedStatus","type":"uint256"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"numPods","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"ownerToPod","outputs":[{"internalType":"contract IEigenPod","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"newPausedStatus","type":"uint256"}],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"pauseAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"index","type":"uint8"}],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pauserRegistry","outputs":[{"internalType":"contract IPauserRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"podOwnerShares","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"podOwner","type":"address"},{"internalType":"int256","name":"sharesDelta","type":"int256"}],"name":"recordBeaconChainETHBalanceUpdate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"podOwner","type":"address"},{"internalType":"uint256","name":"shares","type":"uint256"}],"name":"removeShares","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IPauserRegistry","name":"newPauserRegistry","type":"address"}],"name":"setPauserRegistry","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"slasher","outputs":[{"internalType":"contract ISlasher","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"pubkey","type":"bytes"},{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"bytes32","name":"depositDataRoot","type":"bytes32"}],"name":"stake","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"strategyManager","outputs":[{"internalType":"contract IStrategyManager","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newPausedStatus","type":"uint256"}],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"podOwner","type":"address"},{"internalType":"address","name":"destination","type":"address"},{"internalType":"uint256","name":"shares","type":"uint256"}],"name":"withdrawSharesAsTokens","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Loading
Loading