From 847fd9ece425c6b8d73dcc887c3b052bf5c73d9b Mon Sep 17 00:00:00 2001 From: Rens Rooimans Date: Thu, 7 Sep 2023 16:49:46 +0200 Subject: [PATCH] fix Ptr ref & toml --- .../ccip-tests/testsetups/ccip.go | 4 +-- .../ccip-tests/types/config/node/core.go | 25 +++++++++---------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/integration-tests/ccip-tests/testsetups/ccip.go b/integration-tests/ccip-tests/testsetups/ccip.go index c078cc0ca7..d3da9fe32c 100644 --- a/integration-tests/ccip-tests/testsetups/ccip.go +++ b/integration-tests/ccip-tests/testsetups/ccip.go @@ -819,7 +819,7 @@ func DeployLocalCluster( if nonDevGethNetworks == nil { return errors.New("cannot create nodes with custom config without nonDevGethNetworks") } - toml, err := node.NewConfigFromToml(ccipnode.CCIPTOML, + toml, err := node.NewConfigFromToml(string(ccipnode.CCIPTOML), node.WithPrivateEVMs(nonDevGethNetworks)) if err != nil { return err @@ -910,7 +910,7 @@ func DeployEnvironments( */ } - tomlCfg, err := node.NewConfigFromToml(ccipnode.CCIPTOML, ccipnode.WithPrivateEVMs(nets)) + tomlCfg, err := node.NewConfigFromToml(string(ccipnode.CCIPTOML), ccipnode.WithPrivateEVMs(nets)) tomlStr, err := tomlCfg.TOMLString() require.NoError(t, err) clProps["toml"] = tomlStr diff --git a/integration-tests/ccip-tests/types/config/node/core.go b/integration-tests/ccip-tests/types/config/node/core.go index 66d5eda82d..cd1478ad44 100644 --- a/integration-tests/ccip-tests/types/config/node/core.go +++ b/integration-tests/ccip-tests/types/config/node/core.go @@ -7,12 +7,11 @@ import ( "github.com/smartcontractkit/chainlink-testing-framework/blockchain" + itutils "github.com/smartcontractkit/ccip/integration-tests/utils" "github.com/smartcontractkit/chainlink/integration-tests/types/config/node" - "github.com/smartcontractkit/chainlink/v2/core/assets" evmcfg "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config/toml" "github.com/smartcontractkit/chainlink/v2/core/services/chainlink" - "github.com/smartcontractkit/chainlink/v2/core/store/models" "github.com/smartcontractkit/chainlink/v2/core/utils" ) @@ -26,21 +25,21 @@ func WithPrivateEVMs(networks []blockchain.EVMNetwork) node.NodeConfigOpt { evmConfigs = append(evmConfigs, &evmcfg.EVMConfig{ ChainID: utils.NewBig(big.NewInt(network.ChainID)), Chain: evmcfg.Chain{ - AutoCreateKey: node.Ptr(true), - FinalityDepth: node.Ptr[uint32](50), + AutoCreateKey: itutils.Ptr(true), + FinalityDepth: itutils.Ptr[uint32](50), MinContractPayment: assets.NewLinkFromJuels(0), LogPollInterval: models.MustNewDuration(1 * time.Second), HeadTracker: evmcfg.HeadTracker{ - HistoryDepth: node.Ptr(uint32(100)), + HistoryDepth: itutils.Ptr(uint32(100)), }, GasEstimator: WithCCIPGasEstimator(network.ChainID), }, Nodes: []*evmcfg.Node{ { - Name: node.Ptr(network.Name), - WSURL: node.MustURL(network.URLs[0]), - HTTPURL: node.MustURL(network.HTTPURLs[0]), - SendOnly: node.Ptr(false), + Name: itutils.Ptr(network.Name), + WSURL: itutils.MustURL(network.URLs[0]), + HTTPURL: itutils.MustURL(network.HTTPURLs[0]), + SendOnly: itutils.Ptr(false), }, }, }) @@ -52,16 +51,16 @@ func WithPrivateEVMs(networks []blockchain.EVMNetwork) node.NodeConfigOpt { func WithCCIPGasEstimator(chainId int64) evmcfg.GasEstimator { cfg := evmcfg.GasEstimator{ - LimitDefault: node.Ptr(uint32(6000000)), + LimitDefault: itutils.Ptr(uint32(6000000)), PriceMax: assets.GWei(200), FeeCapDefault: assets.GWei(200), } switch chainId { case 421613: - cfg.LimitDefault = node.Ptr(uint32(100000000)) + cfg.LimitDefault = itutils.Ptr(uint32(100000000)) case 420: - cfg.BumpThreshold = node.Ptr(uint32(60)) - cfg.BumpPercent = node.Ptr(uint16(20)) + cfg.BumpThreshold = itutils.Ptr(uint32(60)) + cfg.BumpPercent = itutils.Ptr(uint16(20)) cfg.BumpMin = assets.GWei(100) case 5: cfg.PriceMax = assets.GWei(500)