Skip to content

Commit

Permalink
update eigensdk (#74)
Browse files Browse the repository at this point in the history
* update eigensdk

* error handling
  • Loading branch information
shrimalmadhur committed Mar 8, 2024
1 parent 1c3e01a commit 96308f8
Show file tree
Hide file tree
Showing 11 changed files with 93 additions and 69 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ build: ## Compile the binary
@go build -o bin/$(APP_NAME) cmd/$(APP_NAME)/main.go

mocks: ## generates mocks
go install go.uber.org/mock/mockgen@v0.3.0
go install go.uber.org/mock/mockgen@v0.4.0
go generate ./...

tests: ## runs all tests
Expand Down
14 changes: 7 additions & 7 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ go 1.21

require (
github.com/AlecAivazis/survey/v2 v2.3.7
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/Layr-Labs/eigensdk-go v0.1.1
github.com/ethereum/go-ethereum v1.13.12
github.com/stretchr/testify v1.9.0
github.com/urfave/cli/v2 v2.27.1
github.com/wagslane/go-password-validator v0.3.0
go.uber.org/mock v0.3.0
go.uber.org/mock v0.4.0
gopkg.in/yaml.v2 v2.4.0
gopkg.in/yaml.v3 v3.0.1
)
Expand All @@ -30,8 +30,8 @@ require (
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect
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/google/uuid v1.5.0 // indirect
github.com/go-ole/go-ole v1.3.0 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/gorilla/websocket v1.4.2 // indirect
github.com/holiman/uint256 v1.2.4 // indirect
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
Expand All @@ -57,7 +57,7 @@ require (
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/sys v0.16.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
Expand Down
33 changes: 17 additions & 16 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ github.com/AlecAivazis/survey/v2 v2.3.7 h1:6I/u8FvytdGsgonrYsVn2t8t4QiRnh6QSTqkk
github.com/AlecAivazis/survey/v2 v2.3.7/go.mod h1:xUTIdE4KCOIjsBAE1JYsUPoCqYdZ1reCfTwbto0Fduo=
github.com/DataDog/zstd v1.4.5 h1:EndNeuB0l9syBZhut0wns3gV1hL8zX8LIu6ZiVHWLIQ=
github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo=
github.com/Layr-Labs/eigensdk-go v0.1.0 h1:r6JnE80+9iRrEzDi1xd8ivEoZEfxSEWUfVJ7YtV/NBE=
github.com/Layr-Labs/eigensdk-go v0.1.0/go.mod h1:dXsu2OWndV9lNQQyYByr2o99SY00pT8DeGaaYZwOncc=
github.com/Layr-Labs/eigensdk-go v0.1.1 h1:AjUoieoAtaGxuxOHj6nB2xxuBTrghlYJl3AguICI9kc=
github.com/Layr-Labs/eigensdk-go v0.1.1/go.mod h1:c/yA0hmP2pJILySQLerQnDPcJ5Z3mtyH0hhjQGw3Xrc=
github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow=
github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM=
github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2 h1:+vx7roKuyA63nhn5WAunQHLTznkw5W8b1Xc0dNjp83s=
Expand Down Expand Up @@ -59,19 +59,19 @@ github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 h1:YLtO71vCjJRCBcrPMtQ9nqBsqpA1
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeCxkaw7y45JueMRL4DIyJDKs=
github.com/ethereum/c-kzg-4844 v0.4.0 h1:3MS1s4JtA868KpJxroZoepdV0ZKBp3u/O5HcZ7R3nlY=
github.com/ethereum/c-kzg-4844 v0.4.0/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0=
github.com/ethereum/go-ethereum v1.13.8 h1:1od+thJel3tM52ZUNQwvpYOeRHlbkVFZ5S8fhi0Lgsg=
github.com/ethereum/go-ethereum v1.13.8/go.mod h1:sc48XYQxCzH3fG9BcrXCOOgQk2JfZzNAmIKnceogzsA=
github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 h1:FtmdgXiUlNeRsoNMFlKLDt+S+6hbjVMEW6RGQ7aUf7c=
github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0=
github.com/ethereum/go-ethereum v1.13.12 h1:iDr9UM2JWkngBHGovRJEQn4Kor7mT4gt9rUZqB5M29Y=
github.com/ethereum/go-ethereum v1.13.12/go.mod h1:hKL2Qcj1OvStXNSEDbucexqnEt1Wh4Cz329XsjAalZY=
github.com/fjl/memsize v0.0.2 h1:27txuSD9or+NZlnOWdKUxeBzTAUkWCVh+4Gf2dWFOzA=
github.com/fjl/memsize v0.0.2/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0=
github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY=
github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw=
github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff h1:tY80oXqGNY4FhTFhk+o9oFHGINQ/+vhlm8HFzi6znCI=
github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww=
github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46 h1:BAIP2GihuqhwdILrV+7GJel5lyPV3u1+PgzrWLc0TkE=
github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46/go.mod h1:QNpY22eby74jVhqH4WhDLDwxc/vqsern6pW+u2kbkpc=
github.com/go-ole/go-ole v1.2.5/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY=
github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE=
github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78=
github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw=
github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU=
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
Expand All @@ -87,8 +87,8 @@ github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeN
github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0=
github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk=
github.com/google/uuid v1.5.0 h1:1p67kYwdtXjb0gL0BPiP1Av9wiZPo5A8z2cWkTZ+eyU=
github.com/google/uuid v1.5.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc=
github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
github.com/hashicorp/go-bexpr v0.1.10 h1:9kuI5PFotCboP3dkDYFr/wi0gg0QVbSNz5oFRpxn4uE=
Expand Down Expand Up @@ -165,8 +165,8 @@ github.com/status-im/keycard-go v0.2.0 h1:QDLFswOQu1r5jsycloeQh3bVU8n/NatHHaZobt
github.com/status-im/keycard-go v0.2.0/go.mod h1:wlp8ZLbsmrF6g6WjugPAx+IzoLrkdf9+mHxBEeo3Hbg=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/supranational/blst v0.3.11 h1:LyU6FolezeWAhvQk0k6O/d49jqgO52MSDDfYgbeoEm4=
github.com/supranational/blst v0.3.11/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw=
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY=
Expand All @@ -186,8 +186,8 @@ github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsr
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk=
go.uber.org/goleak v1.2.0/go.mod h1:XJYK+MuIchqpmGmUSAzotztawfKvYLUIgg7guXrwVUo=
go.uber.org/mock v0.3.0 h1:3mUxI1No2/60yUYax92Pt8eNOEecx2D3lcXZh2NEZJo=
go.uber.org/mock v0.3.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc=
go.uber.org/mock v0.4.0 h1:VcM4ZOtdbR4f6VXfiOpwpVJDL6lCReaZ6mw31wqh7KU=
go.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc=
go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo=
Expand Down Expand Up @@ -217,11 +217,12 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc=
golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU=
golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4=
Expand Down
82 changes: 41 additions & 41 deletions pkg/operator/keys/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,15 +133,15 @@ func saveBlsKey(keyName string, p utils.Prompter, keyPair *bls.KeyPair, insecure
}

err = keyPair.SaveToFile(fileLoc, password)
if err != nil {
return err
}
if err != nil {
return err
}

privateKeyHex := keyPair.PrivKey.String()
publicKeyHex := keyPair.PubKey.String()
privateKeyHex := keyPair.PrivKey.String()
publicKeyHex := keyPair.PubKey.String()

fmt.Printf("\nKey location: %s\nPublic Key: %s\n\n", fileLoc, publicKeyHex)
return displayWithLess(privateKeyHex, KeyTypeBLS)
fmt.Printf("\nKey location: %s\nPublic Key: %s\n\n", fileLoc, publicKeyHex)
return displayWithLess(privateKeyHex, KeyTypeBLS)
}

func saveEcdsaKey(
Expand Down Expand Up @@ -193,23 +193,23 @@ func saveEcdsaKey(
publicKeyHex := hexutil.Encode(publicKeyBytes)[4:]
address := crypto.PubkeyToAddress(*publicKeyECDSA).Hex()

fmt.Printf("\nKey location: %s\nPublic Key hex: %s\nEthereum Address: %s\n\n", fileLoc, publicKeyHex, address)
return displayWithLess(privateKeyHex, KeyTypeECDSA)
fmt.Printf("\nKey location: %s\nPublic Key hex: %s\nEthereum Address: %s\n\n", fileLoc, publicKeyHex, address)
return displayWithLess(privateKeyHex, KeyTypeECDSA)
}

func displayWithLess(privateKeyHex string, keyType string) error {
var message, border, keyLine string
tabSpace := " "
var message, border, keyLine string
tabSpace := " "

keyContent := tabSpace + privateKeyHex + tabSpace
borderLength := len(keyContent) + 4
border = strings.Repeat("/", borderLength)
paddingLine := "//" + strings.Repeat(" ", borderLength-4) + "//"
keyContent := tabSpace + privateKeyHex + tabSpace
borderLength := len(keyContent) + 4
border = strings.Repeat("/", borderLength)
paddingLine := "//" + strings.Repeat(" ", borderLength-4) + "//"

keyLine = fmt.Sprintf("//%s//", keyContent)
keyLine = fmt.Sprintf("//%s//", keyContent)

if keyType == KeyTypeECDSA {
message = fmt.Sprintf(`
if keyType == KeyTypeECDSA {
message = fmt.Sprintf(`
ECDSA Private Key (Hex):
%s
Expand All @@ -221,8 +221,8 @@ ECDSA Private Key (Hex):
🔐 Please backup the above private key hex in a safe place 🔒
`, border, paddingLine, keyLine, paddingLine, border)
} else if keyType == KeyTypeBLS {
message = fmt.Sprintf(`
} else if keyType == KeyTypeBLS {
message = fmt.Sprintf(`
BLS Private Key (Hex):
%s
Expand All @@ -234,34 +234,34 @@ BLS Private Key (Hex):
🔐 Please backup the above private key hex in a safe place 🔒
`, border, paddingLine, keyLine, paddingLine, border)
}
}

cmd := exec.Command("less", "-R")
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
cmd := exec.Command("less", "-R")
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr

stdin, err := cmd.StdinPipe()
if err != nil {
return fmt.Errorf("error creating stdin pipe: %w", err)
}
stdin, err := cmd.StdinPipe()
if err != nil {
return fmt.Errorf("error creating stdin pipe: %w", err)
}

if err := cmd.Start(); err != nil {
return fmt.Errorf("error starting less command: %w", err)
}
if err := cmd.Start(); err != nil {
return fmt.Errorf("error starting less command: %w", err)
}

if _, err := stdin.Write([]byte(message)); err != nil {
return fmt.Errorf("error writing message to less command: %w", err)
}
if _, err := stdin.Write([]byte(message)); err != nil {
return fmt.Errorf("error writing message to less command: %w", err)
}

if err := stdin.Close(); err != nil {
return fmt.Errorf("error closing stdin pipe: %w", err)
}
if err := stdin.Close(); err != nil {
return fmt.Errorf("error closing stdin pipe: %w", err)
}

if err := cmd.Wait(); err != nil {
return fmt.Errorf("error waiting for less command: %w", err)
}
if err := cmd.Wait(); err != nil {
return fmt.Errorf("error waiting for less command: %w", err)
}

return nil
return nil
}

func getStdInPassword() string {
Expand Down
17 changes: 17 additions & 0 deletions pkg/operator/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ func RegisterCmd(p utils.Prompter) *cli.Command {

elWriter, err := elContracts.BuildELChainWriter(
common.HexToAddress(operatorCfg.ELDelegationManagerAddress),
common.HexToAddress(operatorCfg.ELAVSDirectoryAddress),
ethClient,
logger,
noopMetrics,
Expand All @@ -108,6 +109,7 @@ func RegisterCmd(p utils.Prompter) *cli.Command {

reader, err := elContracts.BuildELChainReader(
common.HexToAddress(operatorCfg.ELDelegationManagerAddress),
common.HexToAddress(operatorCfg.ELAVSDirectoryAddress),
ethClient,
logger,
)
Expand Down Expand Up @@ -190,9 +192,24 @@ func validateAndMigrateConfigFile(path string) (*types.OperatorConfigNew, error)
return nil, err
}
}
elAVSDirectoryAddress, err := getAVSDirectoryAddress(operatorCfg.ChainId)
if err != nil {
return nil, err
}
operatorCfg.ELAVSDirectoryAddress = elAVSDirectoryAddress
return &operatorCfg, nil
}

func getAVSDirectoryAddress(chainID big.Int) (string, error) {
chainIDInt := chainID.Int64()
chainMetadata, ok := utils.ChainMetadataMap[chainIDInt]
if !ok {
return "", fmt.Errorf("chain ID %d not supported", chainIDInt)
} else {
return chainMetadata.ELAVSDirectoryAddress, nil
}
}

func getTransactionLink(txHash string, chainId *big.Int) string {
chainIDInt := chainId.Int64()
chainMetadata, ok := utils.ChainMetadataMap[chainIDInt]
Expand Down
1 change: 1 addition & 0 deletions pkg/operator/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ func StatusCmd(p utils.Prompter) *cli.Command {

reader, err := elContracts.BuildELChainReader(
common.HexToAddress(operatorCfg.ELDelegationManagerAddress),
common.HexToAddress(operatorCfg.ELAVSDirectoryAddress),
ethClient,
logger,
)
Expand Down
1 change: 1 addition & 0 deletions pkg/operator/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ func UpdateCmd(p utils.Prompter) *cli.Command {

elWriter, err := elContracts.BuildELChainWriter(
common.HexToAddress(operatorCfg.ELDelegationManagerAddress),
common.HexToAddress(operatorCfg.ELAVSDirectoryAddress),
ethClient,
logger,
noopMetrics,
Expand Down
1 change: 1 addition & 0 deletions pkg/types/chain_metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ package types
type ChainMetadata struct {
BlockExplorerUrl string
ELDelegationManagerAddress string
ELAVSDirectoryAddress string
}
9 changes: 5 additions & 4 deletions pkg/types/operator_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,11 @@ func (config OperatorConfig) MarshalYAML() (interface{}, error) {
type OperatorConfigNew struct {
Operator eigensdkTypes.Operator `yaml:"operator"`
ELDelegationManagerAddress string `yaml:"el_delegation_manager_address"`
EthRPCUrl string `yaml:"eth_rpc_url"`
PrivateKeyStorePath string `yaml:"private_key_store_path"`
SignerType SignerType `yaml:"signer_type"`
ChainId big.Int `yaml:"chain_id"`
ELAVSDirectoryAddress string
EthRPCUrl string `yaml:"eth_rpc_url"`
PrivateKeyStorePath string `yaml:"private_key_store_path"`
SignerType SignerType `yaml:"signer_type"`
ChainId big.Int `yaml:"chain_id"`
}

func (config OperatorConfigNew) MarshalYAML() (interface{}, error) {
Expand Down
1 change: 1 addition & 0 deletions pkg/utils/mocks/prompter.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pkg/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ var ChainMetadataMap = map[int64]types.ChainMetadata{
GoerliChainId: {
BlockExplorerUrl: "https://goerli.etherscan.io/tx",
ELDelegationManagerAddress: "0x1b7b8F6b258f95Cf9596EabB9aa18B62940Eb0a8",
ELAVSDirectoryAddress: "0x0AC9694c271eFbA6059e9783769e515E8731f935",
},
HoleskyChainId: {
BlockExplorerUrl: "https://holesky.etherscan.io/tx",
Expand Down

0 comments on commit 96308f8

Please sign in to comment.