Skip to content

Commit

Permalink
fix Ptr ref & toml
Browse files Browse the repository at this point in the history
  • Loading branch information
RensR committed Sep 7, 2023
1 parent e728e46 commit 847fd9e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 15 deletions.
4 changes: 2 additions & 2 deletions integration-tests/ccip-tests/testsetups/ccip.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
25 changes: 12 additions & 13 deletions integration-tests/ccip-tests/types/config/node/core.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand All @@ -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),
},
},
})
Expand All @@ -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)
Expand Down

0 comments on commit 847fd9e

Please sign in to comment.