Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

m2 mainnet / goerli v2 contracts #39

Merged
merged 11 commits into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from 10 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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ bin
# Config files
metadata.json
operator-config.yaml
operator-config.yaml.old
operator.yaml
operator.yaml.old
config/*

# build
Expand Down
4 changes: 2 additions & 2 deletions cmd/eigenlayer/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ func main() {

app.Name = "eigenlayer"
app.Usage = "EigenLayer CLI"
app.Version = "0.5.2"
app.Copyright = "(c) 2023 EigenLabs"
app.Version = "0.6.0"
app.Copyright = "(c) 2024 EigenLabs"

// Initialize the dependencies
prompter := utils.NewPrompter()
Expand Down
37 changes: 18 additions & 19 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,21 @@ go 1.21

require (
github.com/AlecAivazis/survey/v2 v2.3.7
github.com/Layr-Labs/eigensdk-go v0.0.9
github.com/ethereum/go-ethereum v1.13.5
github.com/Layr-Labs/eigensdk-go v0.1.0
github.com/ethereum/go-ethereum v1.13.8
github.com/stretchr/testify v1.8.4
github.com/urfave/cli/v2 v2.27.1
github.com/wagslane/go-password-validator v0.3.0
go.uber.org/mock v0.3.0
gopkg.in/yaml.v2 v2.4.0
gopkg.in/yaml.v3 v3.0.1
)

require (
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/StackExchange/wmi v1.2.1 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bits-and-blooms/bitset v1.7.0 // indirect
github.com/bits-and-blooms/bitset v1.10.0 // indirect
github.com/btcsuite/btcd/btcec/v2 v2.2.0 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/consensys/bavard v0.1.13 // indirect
Expand All @@ -30,22 +31,20 @@ require (
github.com/ethereum/c-kzg-4844 v0.4.0 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect
github.com/go-stack/stack v1.8.1 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/uuid v1.5.0 // indirect
github.com/gorilla/websocket v1.4.2 // indirect
github.com/holiman/uint256 v1.2.3 // indirect
github.com/holiman/uint256 v1.2.4 // indirect
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.18 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b // indirect
github.com/mmcloughlin/addchain v0.4.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_golang v1.17.0 // indirect
github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16 // indirect
github.com/prometheus/common v0.44.0 // indirect
github.com/prometheus/procfs v0.11.1 // indirect
github.com/prometheus/client_golang v1.18.0 // indirect
github.com/prometheus/client_model v0.5.0 // indirect
github.com/prometheus/common v0.45.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect
github.com/supranational/blst v0.3.11 // indirect
Expand All @@ -54,14 +53,14 @@ require (
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.26.0 // indirect
golang.org/x/crypto v0.14.0 // indirect
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect
golang.org/x/mod v0.12.0 // indirect
golang.org/x/sync v0.3.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/term v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
golang.org/x/tools v0.13.0 // indirect
golang.org/x/crypto v0.17.0 // indirect
golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect
golang.org/x/mod v0.14.0 // indirect
golang.org/x/sync v0.5.0 // indirect
golang.org/x/sys v0.15.0 // indirect
golang.org/x/term v0.15.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/tools v0.15.0 // indirect
google.golang.org/protobuf v1.31.0 // indirect
rsc.io/tmplfunc v0.0.3 // indirect
)
81 changes: 40 additions & 41 deletions go.sum

Large diffs are not rendered by default.

25 changes: 8 additions & 17 deletions pkg/operator/config/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func CreateCmd(p utils.Prompter) *cli.Command {
Both of these are needed for operator registration
`,
Action: func(ctx *cli.Context) error {
op := types.OperatorConfig{}
op := types.OperatorConfigNew{}

// Prompt user to generate empty or non-empty files
populate, err := p.Confirm("Would you like to populate the operator config file?")
Expand Down Expand Up @@ -66,7 +66,7 @@ func CreateCmd(p utils.Prompter) *cli.Command {
}

fmt.Println(
"Created operator.yaml and metadata.json files. Please fill in the smart contract configuration details(el_slasher_address and bls_public_key_compendium_address) provided by EigenLayer team. ",
"Created operator.yaml and metadata.json files. Please fill in the smart contract configuration details(el_delegation_manager_address) provided by EigenLayer team. ",
shrimalmadhur marked this conversation as resolved.
Show resolved Hide resolved
)
fmt.Println(
"Please fill in the metadata.json file and upload it to a public url. Then update the operator.yaml file with the url (metadata_url).",
Expand All @@ -81,15 +81,15 @@ func CreateCmd(p utils.Prompter) *cli.Command {
return createCmd
}

func promptOperatorInfo(config *types.OperatorConfig, p utils.Prompter) (types.OperatorConfig, error) {
func promptOperatorInfo(config *types.OperatorConfigNew, p utils.Prompter) (types.OperatorConfigNew, error) {
// Prompt and set operator address
operatorAddress, err := p.InputString("Enter your operator address:", "", "",
func(s string) error {
return validateAddressIsNonZeroAndValid(s)
},
)
if err != nil {
return types.OperatorConfig{}, err
return types.OperatorConfigNew{}, err
}
config.Operator.Address = operatorAddress

Expand Down Expand Up @@ -134,7 +134,7 @@ func promptOperatorInfo(config *types.OperatorConfig, p utils.Prompter) (types.O
},
)
if err != nil {
return types.OperatorConfig{}, err
return types.OperatorConfigNew{}, err
}
config.Operator.EarningsReceiverAddress = earningsAddress

Expand All @@ -143,7 +143,7 @@ func promptOperatorInfo(config *types.OperatorConfig, p utils.Prompter) (types.O
func(s string) error { return nil },
)
if err != nil {
return types.OperatorConfig{}, err
return types.OperatorConfigNew{}, err
}
config.EthRPCUrl = rpcUrl

Expand All @@ -152,23 +152,14 @@ func promptOperatorInfo(config *types.OperatorConfig, p utils.Prompter) (types.O
func(s string) error { return nil },
)
if err != nil {
return types.OperatorConfig{}, err
return types.OperatorConfigNew{}, err
}
config.PrivateKeyStorePath = ecdsaKeyPath

// Prompt for bls key path
blsKeyPath, err := p.InputString("Enter your bls key path:", "", "",
func(s string) error { return nil },
)
if err != nil {
return types.OperatorConfig{}, err
}
config.BlsPrivateKeyStorePath = blsKeyPath

// Prompt for network & set chainId
chainId, err := p.Select("Select your network:", []string{"mainnet", "goerli", "holesky", "local"})
if err != nil {
return types.OperatorConfig{}, err
return types.OperatorConfigNew{}, err
}

switch chainId {
Expand Down
11 changes: 2 additions & 9 deletions pkg/operator/config/operator-config-example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,9 @@ operator:
staker_opt_out_window_blocks: 0
metadata_url: https://example.com/metadata.json

# EigenLayer Slasher contract address
# EigenLayer Delegation manager contract address
# This will be provided by EigenLayer team
el_slasher_address:

# Address of BLS Public Key Compendium contract
# This will be provided by EigenLayer team
bls_public_key_compendium_address:
el_delegation_manager_address:

# ETH RPC URL to the ethereum node you are using for on-chain operations
eth_rpc_url: http://localhost:8545
Expand All @@ -38,8 +34,5 @@ signer_type: local_keystore
# Full path to local ecdsa private key store file
private_key_store_path: <path-to>/test.ecdsa.key.json

# Full path to local bls private key store file
bls_private_key_store_path: <path-to>/test.bls.key.json

# Chain ID: 1 for mainnet, 5 for Goerli, 17000 for holesky, 31337 for local
chain_id: 5
Loading
Loading