Skip to content

Commit

Permalink
fixed linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
samlaf committed Nov 8, 2023
1 parent 3081f8a commit 0d79bd5
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
4 changes: 4 additions & 0 deletions chainio/constructor/constructor.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,10 @@ func (config *Config) buildElClients(
ethHttpClient,
logger,
)
if err != nil {
logger.Error("Failed to create EigenlayerContractBindings", "err", err)
return nil, nil, nil, err
}

// get the Reader for the EL contracts
elChainReader := elcontracts.NewELChainReader(
Expand Down
12 changes: 12 additions & 0 deletions chainio/utils/bindings.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ func NewAVSRegistryContractBindings(
}

stakeregistryAddr, err := contractBlsRegistryCoordinator.StakeRegistry(&bind.CallOpts{})
if err != nil {
logger.Error("Failed to fetch StakeRegistry address", "err", err)
return nil, err
}
contractStakeRegistry, err := stakeregistry.NewContractStakeRegistry(
stakeregistryAddr,
ethclient,
Expand All @@ -129,6 +133,10 @@ func NewAVSRegistryContractBindings(
}

blsPubkeyRegistryAddr, err := contractBlsRegistryCoordinator.BlsPubkeyRegistry(&bind.CallOpts{})
if err != nil {
logger.Error("Failed to fetch BLSPubkeyRegistry address", "err", err)
return nil, err
}
contractBlsPubkeyRegistry, err := blspubkeyregistry.NewContractBLSPubkeyRegistry(
blsPubkeyRegistryAddr,
ethclient,
Expand All @@ -139,6 +147,10 @@ func NewAVSRegistryContractBindings(
}

blsPubkeyCompendiumAddr, err := contractBlsPubkeyRegistry.PubkeyCompendium(&bind.CallOpts{})
if err != nil {
logger.Error("Failed to fetch BLSPublicKeyCompendium address", "err", err)
return nil, err
}
contractBlsPubkeyCompendium, err := blspubkeycompendium.NewContractBLSPublicKeyCompendium(
blsPubkeyCompendiumAddr,
ethclient,
Expand Down
2 changes: 0 additions & 2 deletions metrics/eigenmetrics_example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ func ExampleEigenMetrics() {
if err != nil {
panic(err)
}
// reg := prometheus.NewRegistry()
// eigenMetrics := metrics.NewEigenMetrics("exampleAvs", ":9090", reg, logger)

chainioConfig := constructor.Config{
EcdsaPrivateKeyString: "0x0",
Expand Down

0 comments on commit 0d79bd5

Please sign in to comment.