Skip to content

Commit

Permalink
make lint and make generate
Browse files Browse the repository at this point in the history
  • Loading branch information
samlaf committed Jul 14, 2024
1 parent cf1bc90 commit 77c60bc
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 4 deletions.
2 changes: 1 addition & 1 deletion chainio/clients/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func BuildAll(
}

// creating EL clients: Reader, Writer and EigenLayer Contract Bindings
elChainReader, elChainWriter, elContractBindings, err := elcontracts.BuildClients(
elChainReader, elChainWriter, elContractBindings, err := elcontracts.BuildClientsFromConfig(
elcontracts.Config{
DelegationManagerAddress: avsRegistryContractBindings.DelegationManagerAddr,
AvsDirectoryAddress: avsRegistryContractBindings.AvsDirectoryAddr,
Expand Down
18 changes: 16 additions & 2 deletions chainio/clients/elcontracts/wire_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ type ClientsAndBindings struct {
ContractBindings *ContractBindings
}

func BuildClientsFromConfig(
func buildClientsFromConfig(
cfg Config,
ethClient eth.Client,
txMgr txmgr.TxManager,
logger logging.Logger,
eigenMetrics *metrics.EigenMetrics,
txMgr txmgr.TxManager,
) (*ClientsAndBindings, error) {
wire.Build(
NewBindingsFromConfig,
Expand All @@ -59,3 +59,17 @@ func BuildClientsFromConfig(
)
return &ClientsAndBindings{}, nil
}

func BuildClientsFromConfig(
cfg Config,
ethClient eth.Client,
txMgr txmgr.TxManager,
logger logging.Logger,
eigenMetrics *metrics.EigenMetrics,
) (*ChainReader, *ChainWriter, *ContractBindings, error) {
clientsAndBindings, err := buildClientsFromConfig(cfg, ethClient, txMgr, logger, eigenMetrics)
if err != nil {
return nil, nil, nil, err
}
return clientsAndBindings.ChainReader, clientsAndBindings.ChainWriter, clientsAndBindings.ContractBindings, nil
}
16 changes: 15 additions & 1 deletion chainio/clients/elcontracts/wire_gen.go

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

0 comments on commit 77c60bc

Please sign in to comment.