diff --git a/deployment/ccip/test_helpers.go b/deployment/ccip/test_helpers.go index e83d0717468..a8aa6182d16 100644 --- a/deployment/ccip/test_helpers.go +++ b/deployment/ccip/test_helpers.go @@ -11,9 +11,11 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/core/types" "github.com/pkg/errors" - cciptypes "github.com/smartcontractkit/chainlink-ccip/pkg/types/ccipocr3" + "github.com/smartcontractkit/chainlink-testing-framework/lib/utils/testcontext" + cciptypes "github.com/smartcontractkit/chainlink-ccip/pkg/types/ccipocr3" + "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/require" diff --git a/deployment/environment/devenv/rmn_config.go b/deployment/environment/devenv/rmn_config.go index 24340b01e12..59d5e5d1cdb 100644 --- a/deployment/environment/devenv/rmn_config.go +++ b/deployment/environment/devenv/rmn_config.go @@ -43,18 +43,24 @@ type Stability struct { HardConfirmations int `toml:"hard_confirmations"` } -type RemoteChain struct { - Name string `toml:"name"` - Stability Stability `toml:"stability"` - StartBlockNumber int `toml:"start_block_number"` - OffRamp string `toml:"off_ramp"` - RMNRemote string `toml:"rmn_remote"` +type ChainParam struct { + Name string `toml:"name"` + Stability Stability `toml:"stability"` +} + +type RemoteChains struct { + Name string `toml:"name"` + OnRampStartBlockNumber int `toml:"on_ramp_start_block_number"` + OffRamp string `toml:"off_ramp"` + OnRamp string `toml:"on_ramp"` + RMNRemote string `toml:"rmn_remote"` } type SharedConfig struct { Networking SharedConfigNetworking `toml:"networking"` HomeChain HomeChain `toml:"home_chain"` - RemoteChains []RemoteChain `toml:"remote_chains"` + ChainParams []ChainParam `toml:"chain_params"` + RemoteChains []RemoteChains `toml:"remote_chains"` } func (s SharedConfig) afn2ProxySharedConfigFile() (string, error) { diff --git a/integration-tests/ccip-tests/testsetups/test_helpers.go b/integration-tests/ccip-tests/testsetups/test_helpers.go index 7cb9d649f2e..8d0e0b6b88d 100644 --- a/integration-tests/ccip-tests/testsetups/test_helpers.go +++ b/integration-tests/ccip-tests/testsetups/test_helpers.go @@ -180,21 +180,27 @@ func GenerateTestRMNConfig(t *testing.T, nRMNNodes int, tenv ccipdeployment.Depl // Just set all RMN nodes to support all chains. state, err := ccipdeployment.LoadOnchainState(tenv.Env, tenv.Ab) require.NoError(t, err) - var remoteChains []devenv.RemoteChain + var chainParams []devenv.ChainParam + var remoteChains []devenv.RemoteChains + var rpcs []devenv.Chain for chainSel, chain := range state.Chains { c, _ := chainsel.ChainBySelector(chainSel) rmnName := MustCCIPNameToRMNName(c.Name) - remoteChains = append(remoteChains, devenv.RemoteChain{ + chainParams = append(chainParams, devenv.ChainParam{ Name: rmnName, Stability: devenv.Stability{ Type: "ConfirmationDepth", SoftConfirmations: 0, HardConfirmations: 0, }, - StartBlockNumber: 0, - OffRamp: chain.OffRamp.Address().String(), - RMNRemote: chain.RMNRemote.Address().String(), + }) + remoteChains = append(remoteChains, devenv.RemoteChains{ + Name: rmnName, + OnRampStartBlockNumber: 0, + OffRamp: chain.OffRamp.Address().String(), + OnRamp: chain.OnRamp.Address().String(), + RMNRemote: chain.RMNRemote.Address().String(), }) rpcs = append(rpcs, devenv.Chain{ Name: rmnName, @@ -213,6 +219,7 @@ func GenerateTestRMNConfig(t *testing.T, nRMNNodes int, tenv ccipdeployment.Depl RMNHome: state.Chains[tenv.HomeChainSel].RMNHome.Address().String(), }, RemoteChains: remoteChains, + ChainParams: chainParams, } rmnConfig := make(map[string]devenv.RMNConfig)