From 1210835d9fb696cf388cb13e3eeb6ee8b0fec62e Mon Sep 17 00:00:00 2001 From: Pablo Deymonnaz Date: Wed, 9 Oct 2024 19:04:45 -0300 Subject: [PATCH] integration_test.go fixed --- tests/integration/integration_test.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/integration/integration_test.go b/tests/integration/integration_test.go index 963cc173..dd510f8e 100644 --- a/tests/integration/integration_test.go +++ b/tests/integration/integration_test.go @@ -25,6 +25,7 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" + "github.com/ethereum/go-ethereum/ethclient" "github.com/testcontainers/testcontainers-go" "github.com/testcontainers/testcontainers-go/wait" ) @@ -60,11 +61,11 @@ func TestIntegration(t *testing.T) { if err != nil { t.Fatalf("Failed to create logger: %s", err.Error()) } - ethRpcClient, err := eth.NewClient(aggConfigRaw.EthRpcUrl) + ethRpcClient, err := ethclient.Dial(aggConfigRaw.EthRpcUrl) if err != nil { t.Fatalf("Failed to create eth client: %s", err.Error()) } - ethWsClient, err := eth.NewClient(aggConfigRaw.EthWsUrl) + ethWsClient, err := ethclient.Dial(aggConfigRaw.EthWsUrl) if err != nil { t.Fatalf("Failed to create eth client: %s", err.Error()) } @@ -97,11 +98,13 @@ func TestIntegration(t *testing.T) { } txMgr := txmgr.NewSimpleTxManager(skWallet, ethRpcClient, logger, aggregatorAddr) + ethRpcClientInstrumented := eth.NewInstrumentedClientFromClient(ethRpcClient, nil) + config := &config.Config{ EcdsaPrivateKey: aggregatorEcdsaPrivateKey, Logger: logger, EthHttpRpcUrl: aggConfigRaw.EthRpcUrl, - EthHttpClient: ethRpcClient, + EthHttpClient: *ethRpcClientInstrumented, EthWsRpcUrl: aggConfigRaw.EthWsUrl, EthWsClient: ethWsClient, OperatorStateRetrieverAddr: common.HexToAddress(credibleSquaringDeploymentRaw.Addresses.OperatorStateRetrieverAddr),