diff --git a/deployment/ccip/changeset/aptos/config/deploy_curse_mcms.go b/deployment/ccip/changeset/aptos/config/deploy_curse_mcms.go index 2136654fda0..37b9511c894 100644 --- a/deployment/ccip/changeset/aptos/config/deploy_curse_mcms.go +++ b/deployment/ccip/changeset/aptos/config/deploy_curse_mcms.go @@ -3,17 +3,17 @@ package config import ( "fmt" + cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" + cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils" mcmstypes "github.com/smartcontractkit/mcms/types" - cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" - "github.com/smartcontractkit/chainlink/deployment/common/types" ) // DeployCurseMCMSConfig holds per-chain configuration for deploying and // configuring a CurseMCMS contract on Aptos chains. type DeployCurseMCMSConfig struct { - CurseMCMSConfigPerChain map[uint64]types.MCMSWithTimelockConfigV2 + CurseMCMSConfigPerChain map[uint64]cldfproposalutils.MCMSWithTimelockConfig MCMSTimelockConfigPerChain map[uint64]proposalutils.TimelockConfig } diff --git a/deployment/ccip/changeset/aptos/sequence/deploy_curse_mcms.go b/deployment/ccip/changeset/aptos/sequence/deploy_curse_mcms.go index ad18d645427..40a0fd7b467 100644 --- a/deployment/ccip/changeset/aptos/sequence/deploy_curse_mcms.go +++ b/deployment/ccip/changeset/aptos/sequence/deploy_curse_mcms.go @@ -5,17 +5,19 @@ import ( aptosmcms "github.com/smartcontractkit/mcms/sdk/aptos" mcmstypes "github.com/smartcontractkit/mcms/types" + cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils" + "github.com/smartcontractkit/chainlink-deployments-framework/operations" + "github.com/smartcontractkit/chainlink/deployment/ccip/changeset/aptos/dependency" "github.com/smartcontractkit/chainlink/deployment/ccip/changeset/aptos/operation" - "github.com/smartcontractkit/chainlink/deployment/common/types" ) // DeployCurseMCMSSeqInput holds the configuration for deploying CurseMCMS. type DeployCurseMCMSSeqInput struct { MCMSAddress aptos.AccountAddress CCIPAddress aptos.AccountAddress - CurseMCMS types.MCMSWithTimelockConfigV2 + CurseMCMS cldfproposalutils.MCMSWithTimelockConfig } // DeployCurseMCMSSeqOutput holds the deployed address and a CurseMCMS diff --git a/deployment/ccip/changeset/cs_orchestrate_changesets_test.go b/deployment/ccip/changeset/cs_orchestrate_changesets_test.go index 2673f0c4680..dc78fd25503 100644 --- a/deployment/ccip/changeset/cs_orchestrate_changesets_test.go +++ b/deployment/ccip/changeset/cs_orchestrate_changesets_test.go @@ -13,6 +13,9 @@ import ( "github.com/smartcontractkit/mcms/types" "github.com/stretchr/testify/require" + cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils" + cldftesthelpers "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils/testhelpers" + "github.com/smartcontractkit/chainlink-common/pkg/logger" cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" @@ -27,7 +30,6 @@ import ( "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" commonchangeset "github.com/smartcontractkit/chainlink/deployment/common/changeset" - commontypes "github.com/smartcontractkit/chainlink/deployment/common/types" ) var multiplyBy2 = operations.NewOperation( @@ -102,8 +104,8 @@ func newRuntimeWithMCMS(t *testing.T) *runtime.Runtime { require.NoError(t, err) err = rt.Exec( - runtime.ChangesetTask(cldf.CreateLegacyChangeSet(commonchangeset.DeployMCMSWithTimelockV2), map[uint64]commontypes.MCMSWithTimelockConfigV2{ - selector: proposalutils.SingleGroupTimelockConfigV2(t), + runtime.ChangesetTask(cldf.CreateLegacyChangeSet(commonchangeset.DeployMCMSWithTimelockV2), map[uint64]cldfproposalutils.MCMSWithTimelockConfig{ + selector: cldftesthelpers.SingleGroupTimelockConfig(t), }), ) require.NoError(t, err) diff --git a/deployment/ccip/changeset/solana_v0_1_0/cs_deploy_chain.go b/deployment/ccip/changeset/solana_v0_1_0/cs_deploy_chain.go index 3b6b2dff732..37020ff2a7f 100644 --- a/deployment/ccip/changeset/solana_v0_1_0/cs_deploy_chain.go +++ b/deployment/ccip/changeset/solana_v0_1_0/cs_deploy_chain.go @@ -15,6 +15,8 @@ import ( "github.com/smartcontractkit/mcms" mcmsTypes "github.com/smartcontractkit/mcms/types" + cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils" + cldf_solana "github.com/smartcontractkit/chainlink-deployments-framework/chain/solana" cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" @@ -76,7 +78,7 @@ type DeployChainContractsConfig struct { BurnMintTokenPoolMetadata string LockReleaseTokenPoolMetadata string // if specified, the mcms contracts will be deployed and initialized if they are not already deployed - MCMSWithTimelockConfig *types.MCMSWithTimelockConfigV2 + MCMSWithTimelockConfig *cldfproposalutils.MCMSWithTimelockConfig } type ChainContractParams struct { diff --git a/deployment/ccip/changeset/solana_v0_1_1/cs_deploy_chain.go b/deployment/ccip/changeset/solana_v0_1_1/cs_deploy_chain.go index e0e7622f0f1..cd1b30e2baf 100644 --- a/deployment/ccip/changeset/solana_v0_1_1/cs_deploy_chain.go +++ b/deployment/ccip/changeset/solana_v0_1_1/cs_deploy_chain.go @@ -14,6 +14,8 @@ import ( "github.com/smartcontractkit/mcms" mcmsTypes "github.com/smartcontractkit/mcms/types" + cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils" + cldf_solana "github.com/smartcontractkit/chainlink-deployments-framework/chain/solana" cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" @@ -78,7 +80,7 @@ type DeployChainContractsConfig struct { BurnMintTokenPoolMetadata []string LockReleaseTokenPoolMetadata []string // if specified, the mcms contracts will be deployed and initialized if they are not already deployed - MCMSWithTimelockConfig *types.MCMSWithTimelockConfigV2 + MCMSWithTimelockConfig *cldfproposalutils.MCMSWithTimelockConfig } type ChainContractParams struct { diff --git a/deployment/ccip/changeset/solana_v0_1_1/cs_deploy_chain_test.go b/deployment/ccip/changeset/solana_v0_1_1/cs_deploy_chain_test.go index 1205c38f356..955b5cc5c7b 100644 --- a/deployment/ccip/changeset/solana_v0_1_1/cs_deploy_chain_test.go +++ b/deployment/ccip/changeset/solana_v0_1_1/cs_deploy_chain_test.go @@ -12,6 +12,8 @@ import ( "github.com/smartcontractkit/quarantine" "github.com/stretchr/testify/require" + cldftesthelpers "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils/testhelpers" + cldf_chain "github.com/smartcontractkit/chainlink-deployments-framework/chain" cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" @@ -39,7 +41,7 @@ func initialDeployCS(t *testing.T, e cldf.Environment, buildConfig *ccipChangese require.NoError(t, err) feeAggregatorPrivKey, _ := solana.NewRandomPrivateKey() feeAggregatorPubKey := feeAggregatorPrivKey.PublicKey() - mcmsConfig := proposalutils.SingleGroupTimelockConfigV2(t) + mcmsConfig := cldftesthelpers.SingleGroupTimelockConfig(t) solLinkTokenPrivKey, _ := solana.NewRandomPrivateKey() return []commonchangeset.ConfiguredChangeSet{ commonchangeset.Configure( diff --git a/deployment/ccip/changeset/solana_v0_1_1/transfer_ccip_to_mcms_with_timelock_test.go b/deployment/ccip/changeset/solana_v0_1_1/transfer_ccip_to_mcms_with_timelock_test.go index fdb4a791279..d13aaa9d894 100644 --- a/deployment/ccip/changeset/solana_v0_1_1/transfer_ccip_to_mcms_with_timelock_test.go +++ b/deployment/ccip/changeset/solana_v0_1_1/transfer_ccip_to_mcms_with_timelock_test.go @@ -11,6 +11,8 @@ import ( chainselectors "github.com/smartcontractkit/chain-selectors" "github.com/stretchr/testify/require" + cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils" + cldftesthelpers "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils/testhelpers" "github.com/smartcontractkit/chainlink-ccip/chains/solana/contracts/tests/testutils" @@ -38,7 +40,6 @@ import ( solanastateview "github.com/smartcontractkit/chainlink/deployment/ccip/shared/stateview/solana" commonchangeset "github.com/smartcontractkit/chainlink/deployment/common/changeset" "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" - commontypes "github.com/smartcontractkit/chainlink/deployment/common/types" "github.com/smartcontractkit/chainlink/deployment/internal/soltestutils" ) @@ -275,7 +276,7 @@ func prepareEnvironmentForOwnershipTransfer(t *testing.T) (cldf.Environment, sta ), commonchangeset.Configure( cldf.CreateLegacyChangeSet(commonchangeset.DeployMCMSWithTimelockV2), - map[uint64]commontypes.MCMSWithTimelockConfigV2{ + map[uint64]cldfproposalutils.MCMSWithTimelockConfig{ solChainSel: { Canceller: cldftesthelpers.SingleGroupMCMS(t), Proposer: cldftesthelpers.SingleGroupMCMS(t), diff --git a/deployment/ccip/changeset/testhelpers/test_environment.go b/deployment/ccip/changeset/testhelpers/test_environment.go index 4d479f6d6fd..d287af93662 100644 --- a/deployment/ccip/changeset/testhelpers/test_environment.go +++ b/deployment/ccip/changeset/testhelpers/test_environment.go @@ -26,6 +26,9 @@ import ( "github.com/xssnick/tonutils-go/tlb" "go.uber.org/zap/zapcore" + cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils" + cldftesthelpers "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils/testhelpers" + ops "github.com/smartcontractkit/chainlink-ton/deployment/ccip" tonOperation "github.com/smartcontractkit/chainlink-ton/deployment/ccip/operation" "github.com/smartcontractkit/chainlink-ton/deployment/utils" @@ -73,6 +76,7 @@ import ( "github.com/smartcontractkit/chainlink-ccip/pluginconfig" "github.com/smartcontractkit/chainlink-common/keystore/corekeys/p2pkey" + "github.com/smartcontractkit/chainlink/deployment" "github.com/smartcontractkit/chainlink/deployment/ccip/changeset/globals" ccipChangeSetSolana "github.com/smartcontractkit/chainlink/deployment/ccip/changeset/solana_v0_1_0" @@ -725,9 +729,9 @@ func NewEnvironmentWithPrerequisitesContracts(t *testing.T, tEnv TestEnvironment e := NewEnvironment(t, tEnv) evmChains := e.Env.BlockChains.ListChainSelectors(cldf_chain.WithFamily(chain_selectors.FamilyEVM)) solChains := e.Env.BlockChains.ListChainSelectors(cldf_chain.WithFamily(chain_selectors.FamilySolana)) - mcmsCfg := make(map[uint64]commontypes.MCMSWithTimelockConfigV2) + mcmsCfg := make(map[uint64]cldfproposalutils.MCMSWithTimelockConfig) for _, c := range e.Env.BlockChains.ListChainSelectors(cldf_chain.WithFamily(chain_selectors.FamilyEVM)) { - mcmsCfg[c] = proposalutils.SingleGroupTimelockConfigV2(t) + mcmsCfg[c] = cldftesthelpers.SingleGroupTimelockConfig(t) } prereqCfg := make([]changeset.DeployPrerequisiteConfigPerChain, 0) for _, chain := range evmChains { @@ -855,7 +859,7 @@ func NewEnvironmentWithJobsAndContracts(t *testing.T, tEnv TestEnvironment) Depl } func DeployChainContractsToSolChainCSV0_1_1(e DeployedEnv, solChainSelector uint64, preload bool, buildSolConfig *ccipChangeSetSolanaV0_1_1.BuildSolanaConfig) ([]commonchangeset.ConfiguredChangeSet, error) { - var mcmsCfg *commontypes.MCMSWithTimelockConfigV2 + var mcmsCfg *cldfproposalutils.MCMSWithTimelockConfig if preload { // Pre load default programs err := SavePreloadedSolAddresses(e.Env, solChainSelector) @@ -863,7 +867,7 @@ func DeployChainContractsToSolChainCSV0_1_1(e DeployedEnv, solChainSelector uint return nil, err } } else { - mcmsCfg = &commontypes.MCMSWithTimelockConfigV2{ + mcmsCfg = &cldfproposalutils.MCMSWithTimelockConfig{ Proposer: mcmstypes.Config{ Quorum: 1, Signers: []common.Address{common.HexToAddress("0x0000000000000000000000000000000000000001")}, @@ -927,7 +931,7 @@ func DeployChainContractsToSolChainCSV0_1_1(e DeployedEnv, solChainSelector uint } func DeployChainContractsToSolChainCS(e DeployedEnv, solChainSelector uint64, preload bool, buildSolConfig *ccipChangeSetSolanaV0_1_1.BuildSolanaConfig) ([]commonchangeset.ConfiguredChangeSet, error) { - var mcmsCfg *commontypes.MCMSWithTimelockConfigV2 + var mcmsCfg *cldfproposalutils.MCMSWithTimelockConfig if preload { // Pre load default programs err := SavePreloadedSolAddresses(e.Env, solChainSelector) @@ -935,7 +939,7 @@ func DeployChainContractsToSolChainCS(e DeployedEnv, solChainSelector uint64, pr return nil, err } } else { - mcmsCfg = &commontypes.MCMSWithTimelockConfigV2{ + mcmsCfg = &cldfproposalutils.MCMSWithTimelockConfig{ Proposer: mcmstypes.Config{ Quorum: 1, Signers: []common.Address{common.HexToAddress("0x0000000000000000000000000000000000000001")}, diff --git a/deployment/ccip/changeset/testhelpers/test_helpers_solana_v0_1_0.go b/deployment/ccip/changeset/testhelpers/test_helpers_solana_v0_1_0.go index 70e2f7b1f06..d4b8a8c0d69 100644 --- a/deployment/ccip/changeset/testhelpers/test_helpers_solana_v0_1_0.go +++ b/deployment/ccip/changeset/testhelpers/test_helpers_solana_v0_1_0.go @@ -28,6 +28,8 @@ import ( "github.com/stretchr/testify/require" "golang.org/x/sync/errgroup" + cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils" + cldftesthelpers "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils/testhelpers" cldlegacysolmcms "github.com/smartcontractkit/cld-changesets/legacy/pkg/family/solana" @@ -2448,7 +2450,7 @@ func TransferOwnershipSolanaV0_1_0( *e, _, err = commoncs.ApplyChangesets(t, *e, []commoncs.ConfiguredChangeSet{ commoncs.Configure( cldf.CreateLegacyChangeSet(commoncs.DeployMCMSWithTimelockV2), - map[uint64]commontypes.MCMSWithTimelockConfigV2{ + map[uint64]cldfproposalutils.MCMSWithTimelockConfig{ solSelector: { Canceller: cldftesthelpers.SingleGroupMCMS(t), Proposer: cldftesthelpers.SingleGroupMCMS(t), diff --git a/deployment/ccip/changeset/testhelpers/test_helpers_solana_v0_1_1.go b/deployment/ccip/changeset/testhelpers/test_helpers_solana_v0_1_1.go index 94e7aa26902..921475345a4 100644 --- a/deployment/ccip/changeset/testhelpers/test_helpers_solana_v0_1_1.go +++ b/deployment/ccip/changeset/testhelpers/test_helpers_solana_v0_1_1.go @@ -17,6 +17,8 @@ import ( "github.com/gagliardetto/solana-go/rpc" "github.com/stretchr/testify/require" + cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils" + cldftesthelpers "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils/testhelpers" tonOps "github.com/smartcontractkit/chainlink-ton/deployment/ccip" @@ -50,7 +52,6 @@ import ( solanastateview "github.com/smartcontractkit/chainlink/deployment/ccip/shared/stateview/solana" commoncs "github.com/smartcontractkit/chainlink/deployment/common/changeset" "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" - commontypes "github.com/smartcontractkit/chainlink/deployment/common/types" "github.com/smartcontractkit/chainlink/deployment/utils/solutils" ) @@ -66,7 +67,7 @@ func TransferOwnershipSolanaV0_1_1( *e, _, err = commoncs.ApplyChangesets(t, *e, []commoncs.ConfiguredChangeSet{ commoncs.Configure( cldf.CreateLegacyChangeSet(commoncs.DeployMCMSWithTimelockV2), - map[uint64]commontypes.MCMSWithTimelockConfigV2{ + map[uint64]cldfproposalutils.MCMSWithTimelockConfig{ solSelector: { Canceller: cldftesthelpers.SingleGroupMCMS(t), Proposer: cldftesthelpers.SingleGroupMCMS(t), diff --git a/deployment/ccip/changeset/testhelpers/test_token_helpers.go b/deployment/ccip/changeset/testhelpers/test_token_helpers.go index b7548b7f6d0..e04f1104078 100644 --- a/deployment/ccip/changeset/testhelpers/test_token_helpers.go +++ b/deployment/ccip/changeset/testhelpers/test_token_helpers.go @@ -11,6 +11,8 @@ import ( chain_selectors "github.com/smartcontractkit/chain-selectors" "github.com/stretchr/testify/require" + cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils" + "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_5_1/token_pool" "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-evm/gethwrappers/shared/generated/initial/burn_mint_erc677" @@ -22,6 +24,7 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" cldftesthelpers "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils/testhelpers" + "github.com/smartcontractkit/chainlink/deployment" "github.com/smartcontractkit/chainlink/deployment/ccip/changeset" "github.com/smartcontractkit/chainlink/deployment/ccip/changeset/v1_5_1" @@ -30,7 +33,6 @@ import ( "github.com/smartcontractkit/chainlink/deployment/ccip/shared/stateview" commoncs "github.com/smartcontractkit/chainlink/deployment/common/changeset" "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" - commontypes "github.com/smartcontractkit/chainlink/deployment/common/types" ) const ( @@ -83,9 +85,9 @@ func SetupTwoChainEnvironmentWithTokens( } } - mcmsCfg := make(map[uint64]commontypes.MCMSWithTimelockConfigV2) + mcmsCfg := make(map[uint64]cldfproposalutils.MCMSWithTimelockConfig) for _, selector := range selectors { - mcmsCfg[selector] = proposalutils.SingleGroupTimelockConfigV2(t) + mcmsCfg[selector] = cldftesthelpers.SingleGroupTimelockConfig(t) } // Deploy one burn-mint token per chain to use in the tests diff --git a/deployment/ccip/changeset/v1_6/cs_add_new_chain_e2e.go b/deployment/ccip/changeset/v1_6/cs_add_new_chain_e2e.go index 68a3bb8c498..ae4f845361b 100644 --- a/deployment/ccip/changeset/v1_6/cs_add_new_chain_e2e.go +++ b/deployment/ccip/changeset/v1_6/cs_add_new_chain_e2e.go @@ -10,6 +10,8 @@ import ( "github.com/ethereum/go-ethereum/common" mcmslib "github.com/smartcontractkit/mcms" + cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils" + cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" "github.com/smartcontractkit/chainlink/deployment" @@ -20,13 +22,12 @@ import ( "github.com/smartcontractkit/chainlink/deployment/ccip/shared" "github.com/smartcontractkit/chainlink/deployment/ccip/shared/stateview" - commoncs "github.com/smartcontractkit/chainlink/deployment/common/changeset" - "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" - commontypes "github.com/smartcontractkit/chainlink/deployment/common/types" - "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_0/don_id_claimer" "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_3/fee_quoter" + commoncs "github.com/smartcontractkit/chainlink/deployment/common/changeset" + "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" + "github.com/smartcontractkit/chainlink/v2/core/capabilities/ccip/types" ) @@ -102,7 +103,7 @@ type AddCandidatesForNewChainConfig struct { // RemoteChains defines the remote chains to be connected to the new chain. RemoteChains []ChainDefinition `json:"remoteChains"` // MCMSDeploymentConfig configures the MCMS deployment to the new chain. - MCMSDeploymentConfig *commontypes.MCMSWithTimelockConfigV2 `json:"mcmsDeploymentConfig,omitempty"` + MCMSDeploymentConfig *cldfproposalutils.MCMSWithTimelockConfig `json:"mcmsDeploymentConfig,omitempty"` // MCMSConfig defines the MCMS configuration for the changeset. MCMSConfig *proposalutils.TimelockConfig `json:"mcmsConfig,omitempty"` // The offset to adjust the donID in DonIDClaimer (useful when certain DON IDs are dropped) @@ -285,7 +286,7 @@ func addCandidatesForNewChainLogic(e cldf.Environment, c AddCandidatesForNewChai // Deploy MCMS contracts if c.MCMSDeploymentConfig != nil { err = runAndSaveAddresses(func() (cldf.ChangesetOutput, error) { - return commoncs.DeployMCMSWithTimelockV2(e, map[uint64]commontypes.MCMSWithTimelockConfigV2{ + return commoncs.DeployMCMSWithTimelockV2(e, map[uint64]cldfproposalutils.MCMSWithTimelockConfig{ c.NewChain.Selector: *c.MCMSDeploymentConfig, }) }, newAddresses, e.ExistingAddresses) diff --git a/deployment/ccip/changeset/v1_6/cs_add_new_chain_e2e_test.go b/deployment/ccip/changeset/v1_6/cs_add_new_chain_e2e_test.go index 8b5bbc3d426..b460c919510 100644 --- a/deployment/ccip/changeset/v1_6/cs_add_new_chain_e2e_test.go +++ b/deployment/ccip/changeset/v1_6/cs_add_new_chain_e2e_test.go @@ -7,6 +7,7 @@ import ( "github.com/ethereum/go-ethereum/common" chain_selectors "github.com/smartcontractkit/chain-selectors" + cldftesthelpers "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils/testhelpers" "github.com/smartcontractkit/chainlink-ccip/chainconfig" "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_2_0/router" @@ -398,7 +399,7 @@ func TestAddAndPromoteCandidatesForNewChain(t *testing.T) { // Build new chain configuration nodeInfo, err := deployment.NodeInfo(e.NodeIDs, e.Offchain) require.NoError(t, err, "must get node info") - mcmsDeploymentCfg := proposalutils.SingleGroupTimelockConfigV2(t) + mcmsDeploymentCfg := cldftesthelpers.SingleGroupTimelockConfig(t) newChain := newChainConfigHelper(newChainSelector, deployedEnvironment.FeedChainSel, linkAddress, &nodeInfo, len(nodeInfo.NonBootstraps().PeerIDs())) if test.ErrStr != "" { @@ -643,7 +644,7 @@ func TestValidateTransmitterAddresses(t *testing.T) { FeeQuoterDestChainConfig: v1_6.DefaultFeeQuoterDestChainConfig(true), } - mcmsDeploymentCfg := proposalutils.SingleGroupTimelockConfigV2(t) + mcmsDeploymentCfg := cldftesthelpers.SingleGroupTimelockConfig(t) donIDOffSet := uint32(0) state, err := stateview.LoadOnchainState(e) require.NoError(t, err, "must load onchain state") diff --git a/deployment/ccip/changeset/v1_6/cs_add_registry_module_test.go b/deployment/ccip/changeset/v1_6/cs_add_registry_module_test.go index 5a4e6ba4884..9c692c2193c 100644 --- a/deployment/ccip/changeset/v1_6/cs_add_registry_module_test.go +++ b/deployment/ccip/changeset/v1_6/cs_add_registry_module_test.go @@ -5,6 +5,8 @@ import ( "github.com/ethereum/go-ethereum/common" chain_selectors "github.com/smartcontractkit/chain-selectors" + cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils" + cldftesthelpers "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils/testhelpers" "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-common/pkg/logger" @@ -16,7 +18,6 @@ import ( "github.com/smartcontractkit/chainlink/deployment/ccip/shared/stateview" commonchangeset "github.com/smartcontractkit/chainlink/deployment/common/changeset" "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" - commontypes "github.com/smartcontractkit/chainlink/deployment/common/types" ) func TestAddRegistryModuleChangeset(t *testing.T) { @@ -49,8 +50,8 @@ func TestAddRegistryModuleChangeset(t *testing.T) { ), commonchangeset.Configure( cldf.CreateLegacyChangeSet(commonchangeset.DeployMCMSWithTimelockV2), - map[uint64]commontypes.MCMSWithTimelockConfigV2{ - chain1: proposalutils.SingleGroupTimelockConfigV2(t), + map[uint64]cldfproposalutils.MCMSWithTimelockConfig{ + chain1: cldftesthelpers.SingleGroupTimelockConfig(t), }, ), commonchangeset.Configure( @@ -127,9 +128,9 @@ func TestAddRegistryModuleChangeset(t *testing.T) { }) } - mcmsConfigs := make(map[uint64]commontypes.MCMSWithTimelockConfigV2) + mcmsConfigs := make(map[uint64]cldfproposalutils.MCMSWithTimelockConfig) for _, chain := range chainSelectors { - mcmsConfigs[chain] = proposalutils.SingleGroupTimelockConfigV2(t) + mcmsConfigs[chain] = cldftesthelpers.SingleGroupTimelockConfig(t) } *env, err = commonchangeset.Apply(t, *env, @@ -230,8 +231,8 @@ func TestAddRegistryModuleChangeset(t *testing.T) { ), commonchangeset.Configure( cldf.CreateLegacyChangeSet(commonchangeset.DeployMCMSWithTimelockV2), - map[uint64]commontypes.MCMSWithTimelockConfigV2{ - chain1: proposalutils.SingleGroupTimelockConfigV2(t), + map[uint64]cldfproposalutils.MCMSWithTimelockConfig{ + chain1: cldftesthelpers.SingleGroupTimelockConfig(t), }, ), commonchangeset.Configure( @@ -316,8 +317,8 @@ func TestAddRegistryModuleChangeset(t *testing.T) { ), commonchangeset.Configure( cldf.CreateLegacyChangeSet(commonchangeset.DeployMCMSWithTimelockV2), - map[uint64]commontypes.MCMSWithTimelockConfigV2{ - chain1: proposalutils.SingleGroupTimelockConfigV2(t), + map[uint64]cldfproposalutils.MCMSWithTimelockConfig{ + chain1: cldftesthelpers.SingleGroupTimelockConfig(t), }, ), commonchangeset.Configure( diff --git a/deployment/ccip/changeset/v1_6/cs_deploy_chain_test.go b/deployment/ccip/changeset/v1_6/cs_deploy_chain_test.go index 429a0744f61..7374beeec79 100644 --- a/deployment/ccip/changeset/v1_6/cs_deploy_chain_test.go +++ b/deployment/ccip/changeset/v1_6/cs_deploy_chain_test.go @@ -5,6 +5,8 @@ import ( "github.com/Masterminds/semver/v3" "github.com/ethereum/go-ethereum/common" + cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils" + cldftesthelpers "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils/testhelpers" "github.com/stretchr/testify/require" chain_selectors "github.com/smartcontractkit/chain-selectors" @@ -26,8 +28,6 @@ import ( "github.com/smartcontractkit/chainlink/deployment/ccip/shared/stateview" commonchangeset "github.com/smartcontractkit/chainlink/deployment/common/changeset" "github.com/smartcontractkit/chainlink/deployment/common/opsutils" - "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" - commontypes "github.com/smartcontractkit/chainlink/deployment/common/types" ) func TestDeployChainContractsChangeset(t *testing.T) { @@ -70,10 +70,10 @@ func testDeployChainContractsChangesetWithEnv(t *testing.T, e cldf.Environment, nodes, err := deployment.NodeInfo(e.NodeIDs, e.Offchain) require.NoError(t, err) p2pIds := nodes.NonBootstraps().PeerIDs() - cfg := make(map[uint64]commontypes.MCMSWithTimelockConfigV2) + cfg := make(map[uint64]cldfproposalutils.MCMSWithTimelockConfig) contractParams := make(map[uint64]ccipseq.ChainContractParams) for _, chain := range e.BlockChains.ListChainSelectors(cldf_chain.WithFamily(chain_selectors.FamilyEVM)) { - cfg[chain] = proposalutils.SingleGroupTimelockConfigV2(t) + cfg[chain] = cldftesthelpers.SingleGroupTimelockConfig(t) contractParams[chain] = ccipseq.ChainContractParams{ FeeQuoterParams: ccipops.DefaultFeeQuoterParams(), OffRampParams: ccipops.DefaultOffRampParams(), diff --git a/deployment/ccip/changeset/v1_6/cs_deploy_registry_module_test.go b/deployment/ccip/changeset/v1_6/cs_deploy_registry_module_test.go index 06d3a1dd6be..7df78ca1e75 100644 --- a/deployment/ccip/changeset/v1_6/cs_deploy_registry_module_test.go +++ b/deployment/ccip/changeset/v1_6/cs_deploy_registry_module_test.go @@ -4,6 +4,8 @@ import ( "testing" chain_selectors "github.com/smartcontractkit/chain-selectors" + cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils" + cldftesthelpers "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils/testhelpers" "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-common/pkg/logger" @@ -14,8 +16,6 @@ import ( "github.com/smartcontractkit/chainlink/deployment/ccip/changeset/v1_6" "github.com/smartcontractkit/chainlink/deployment/ccip/shared/stateview" commonchangeset "github.com/smartcontractkit/chainlink/deployment/common/changeset" - "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" - commontypes "github.com/smartcontractkit/chainlink/deployment/common/types" ) func TestDeployRegistryModuleChangeset(t *testing.T) { @@ -254,8 +254,8 @@ func TestDeployRegistryModuleChangeset(t *testing.T) { ), commonchangeset.Configure( cldf.CreateLegacyChangeSet(commonchangeset.DeployMCMSWithTimelockV2), - map[uint64]commontypes.MCMSWithTimelockConfigV2{ - chain1: proposalutils.SingleGroupTimelockConfigV2(t), + map[uint64]cldfproposalutils.MCMSWithTimelockConfig{ + chain1: cldftesthelpers.SingleGroupTimelockConfig(t), }, ), ) @@ -302,9 +302,9 @@ func TestDeployRegistryModuleChangeset(t *testing.T) { }) } - mcmsConfigs := make(map[uint64]commontypes.MCMSWithTimelockConfigV2) + mcmsConfigs := make(map[uint64]cldfproposalutils.MCMSWithTimelockConfig) for _, chain := range chainSelectors { - mcmsConfigs[chain] = proposalutils.SingleGroupTimelockConfigV2(t) + mcmsConfigs[chain] = cldftesthelpers.SingleGroupTimelockConfig(t) } *env, err = commonchangeset.Apply(t, *env, diff --git a/deployment/ccip/changeset/v1_6/cs_translate_onramp_to_feequoter_test.go b/deployment/ccip/changeset/v1_6/cs_translate_onramp_to_feequoter_test.go index d0c8fee9783..56d17f88bbd 100644 --- a/deployment/ccip/changeset/v1_6/cs_translate_onramp_to_feequoter_test.go +++ b/deployment/ccip/changeset/v1_6/cs_translate_onramp_to_feequoter_test.go @@ -11,6 +11,9 @@ import ( "github.com/smartcontractkit/mcms/types" "github.com/stretchr/testify/require" + cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils" + cldftesthelpers "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils/testhelpers" + "github.com/smartcontractkit/chainlink-evm/pkg/utils" cldf_chain "github.com/smartcontractkit/chainlink-deployments-framework/chain" @@ -24,6 +27,7 @@ import ( "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_3/fee_quoter" "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_5_0/token_admin_registry" + "github.com/smartcontractkit/chainlink/deployment" "github.com/smartcontractkit/chainlink/deployment/ccip/changeset" "github.com/smartcontractkit/chainlink/deployment/ccip/changeset/testhelpers" @@ -37,7 +41,6 @@ import ( "github.com/smartcontractkit/chainlink/deployment/ccip/shared/stateview" commonchangeset "github.com/smartcontractkit/chainlink/deployment/common/changeset" "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" - commontypes "github.com/smartcontractkit/chainlink/deployment/common/types" "github.com/smartcontractkit/chainlink/v2/core/capabilities/ccip/ccipevm" ) @@ -433,10 +436,10 @@ func DeployUtil(t *testing.T, e *cldf.Environment, homeChainSel uint64) { nodes, err := deployment.NodeInfo(e.NodeIDs, e.Offchain) require.NoError(t, err) p2pIDs := nodes.NonBootstraps().PeerIDs() - cfg := make(map[uint64]commontypes.MCMSWithTimelockConfigV2) + cfg := make(map[uint64]cldfproposalutils.MCMSWithTimelockConfig) contractParams := make(map[uint64]ccipseq.ChainContractParams) for _, chain := range e.BlockChains.ListChainSelectors(cldf_chain.WithFamily(chain_selectors.FamilyEVM)) { - cfg[chain] = proposalutils.SingleGroupTimelockConfigV2(t) + cfg[chain] = cldftesthelpers.SingleGroupTimelockConfig(t) contractParams[chain] = ccipseq.ChainContractParams{ FeeQuoterParams: ccipops.DefaultFeeQuoterParams(), OffRampParams: ccipops.DefaultOffRampParams(), diff --git a/deployment/ccip/sequence/evm/v1_6/seq_deploy_chain.go b/deployment/ccip/sequence/evm/v1_6/seq_deploy_chain.go index 96c2db1c824..77c82a4a203 100644 --- a/deployment/ccip/sequence/evm/v1_6/seq_deploy_chain.go +++ b/deployment/ccip/sequence/evm/v1_6/seq_deploy_chain.go @@ -7,6 +7,7 @@ import ( "sync" "github.com/Masterminds/semver/v3" + cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" @@ -24,7 +25,6 @@ import ( ccipopsv1_2 "github.com/smartcontractkit/chainlink/deployment/ccip/operation/evm/v1_2" ccipopsv1_6 "github.com/smartcontractkit/chainlink/deployment/ccip/operation/evm/v1_6" opsutil "github.com/smartcontractkit/chainlink/deployment/common/opsutils" - commontypes "github.com/smartcontractkit/chainlink/deployment/common/types" ) type ChainContractParams struct { @@ -47,7 +47,7 @@ func (c ChainContractParams) Validate(selector uint64) error { type DeployChainContractsConfig struct { HomeChainSelector uint64 ContractParamsPerChain map[uint64]ChainContractParams - GasBoostConfigPerChain map[uint64]commontypes.GasBoostConfig + GasBoostConfigPerChain map[uint64]cldfproposalutils.GasBoostConfig } func (c DeployChainContractsConfig) Validate() error { @@ -107,7 +107,7 @@ type DeployChainContractsSeqConfig struct { DeployChainContractsConfig RMNHomeAddress common.Address AddressesPerChain map[uint64]CCIPAddresses - GasBoostConfigPerChain map[uint64]commontypes.GasBoostConfig + GasBoostConfigPerChain map[uint64]cldfproposalutils.GasBoostConfig } func (c DeployChainContractsSeqConfig) Validate() error { diff --git a/deployment/ccip/shared/deployergroup/deployer_group_test.go b/deployment/ccip/shared/deployergroup/deployer_group_test.go index 5aade525c97..30089ef4ce0 100644 --- a/deployment/ccip/shared/deployergroup/deployer_group_test.go +++ b/deployment/ccip/shared/deployergroup/deployer_group_test.go @@ -12,6 +12,9 @@ import ( "github.com/stretchr/testify/require" "k8s.io/utils/ptr" + cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils" + cldftesthelpers "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils/testhelpers" + cldf_chain "github.com/smartcontractkit/chainlink-deployments-framework/chain" mcmstypes "github.com/smartcontractkit/mcms/types" @@ -25,7 +28,6 @@ import ( "github.com/smartcontractkit/chainlink/deployment/ccip/shared/stateview" commonchangeset "github.com/smartcontractkit/chainlink/deployment/common/changeset" "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" - commontypes "github.com/smartcontractkit/chainlink/deployment/common/types" ) type mintConfig struct { @@ -315,7 +317,7 @@ func TestDeployerGroupWithTimelockAddressQualifier(t *testing.T) { } e, _ := testhelpers.NewMemoryEnvironment(t, testhelpers.WithNumOfChains(2), testhelpers.WithPrerequisiteDeploymentOnly(nil)) - mcmsCfg := make(map[uint64]commontypes.MCMSWithTimelockConfigV2) + mcmsCfg := make(map[uint64]cldfproposalutils.MCMSWithTimelockConfig) chain := e.Env.BlockChains.ListChainSelectors(cldf_chain.WithFamily(chain_selectors.FamilyEVM))[selectorIndex] // update the test config to include the qualifier for the selected chain @@ -323,7 +325,7 @@ func TestDeployerGroupWithTimelockAddressQualifier(t *testing.T) { chain: linktokenOwnerQualifier, } // Create a MCMS config for deployment with qualifier for the selected chain - cfg := proposalutils.SingleGroupTimelockConfigV2(t) + cfg := cldftesthelpers.SingleGroupTimelockConfig(t) cfg.Qualifier = ptr.To(linktokenOwnerQualifier) mcmsCfg[chain] = cfg diff --git a/deployment/ccip/shared/stateview/evm/validate_feequoter_test.go b/deployment/ccip/shared/stateview/evm/validate_feequoter_test.go index ccad50577ed..5f7a72bef4d 100644 --- a/deployment/ccip/shared/stateview/evm/validate_feequoter_test.go +++ b/deployment/ccip/shared/stateview/evm/validate_feequoter_test.go @@ -12,6 +12,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils" + cldftesthelpers "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils/testhelpers" + chain_selectors "github.com/smartcontractkit/chain-selectors" "github.com/smartcontractkit/chainlink-evm/pkg/utils" @@ -37,8 +40,6 @@ import ( "github.com/smartcontractkit/chainlink/deployment/ccip/shared" "github.com/smartcontractkit/chainlink/deployment/ccip/shared/stateview" commonchangeset "github.com/smartcontractkit/chainlink/deployment/common/changeset" - "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" - commontypes "github.com/smartcontractkit/chainlink/deployment/common/types" "github.com/smartcontractkit/chainlink/v2/core/capabilities/ccip/ccipevm" ) @@ -333,11 +334,11 @@ func deployV16Contracts(t *testing.T, tenv *cldf.Environment, homeChainSel uint6 require.NoError(t, err) p2pIDs := nodes.NonBootstraps().PeerIDs() - cfg := make(map[uint64]commontypes.MCMSWithTimelockConfigV2) + cfg := make(map[uint64]cldfproposalutils.MCMSWithTimelockConfig) contractParams := make(map[uint64]ccipseq.ChainContractParams) prereqCfg := make([]changeset.DeployPrerequisiteConfigPerChain, 0) for _, sel := range evmSelectors { - cfg[sel] = proposalutils.SingleGroupTimelockConfigV2(t) + cfg[sel] = cldftesthelpers.SingleGroupTimelockConfig(t) contractParams[sel] = ccipseq.ChainContractParams{ FeeQuoterParams: ccipops.DefaultFeeQuoterParams(), OffRampParams: ccipops.DefaultOffRampParams(), diff --git a/deployment/ccip/shared/stateview/state_test.go b/deployment/ccip/shared/stateview/state_test.go index 358ad70c088..991ec362a78 100644 --- a/deployment/ccip/shared/stateview/state_test.go +++ b/deployment/ccip/shared/stateview/state_test.go @@ -10,6 +10,8 @@ import ( chain_selectors "github.com/smartcontractkit/chain-selectors" "github.com/stretchr/testify/require" + cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils" + "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_5_0/commit_store" "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_5_0/evm_2_evm_offramp" "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_5_0/evm_2_evm_onramp" @@ -26,6 +28,7 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" cldftesthelpers "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils/testhelpers" + "github.com/smartcontractkit/chainlink/deployment" "github.com/smartcontractkit/chainlink/deployment/ccip/changeset/testhelpers" "github.com/smartcontractkit/chainlink/deployment/ccip/shared" @@ -463,8 +466,8 @@ func TestEnforceMCMSUsageIfProd(t *testing.T) { } if test.DeployMCMS { - err = rt.Exec(runtime.ChangesetTask(cldf.CreateLegacyChangeSet(commonchangeset.DeployMCMSWithTimelockV2), map[uint64]types.MCMSWithTimelockConfigV2{ - homeChainSelector: proposalutils.SingleGroupTimelockConfigV2(t), + err = rt.Exec(runtime.ChangesetTask(cldf.CreateLegacyChangeSet(commonchangeset.DeployMCMSWithTimelockV2), map[uint64]cldfproposalutils.MCMSWithTimelockConfig{ + homeChainSelector: cldftesthelpers.SingleGroupTimelockConfig(t), })) require.NoError(t, err, "failed to deploy MCMS") diff --git a/deployment/common/changeset/deploy_mcms_with_timelock.go b/deployment/common/changeset/deploy_mcms_with_timelock.go index 719ca75dc06..6f03e72061c 100644 --- a/deployment/common/changeset/deploy_mcms_with_timelock.go +++ b/deployment/common/changeset/deploy_mcms_with_timelock.go @@ -31,7 +31,7 @@ import ( // migrateAddressBookWithQualifiers migrates an address book to a data store, // applying custom qualifiers from MCMS configs when available -func migrateAddressBookWithQualifiers(ab cldf.AddressBook, cfgByChain map[uint64]types.MCMSWithTimelockConfigV2) (datastore.MutableDataStore, error) { +func migrateAddressBookWithQualifiers(ab cldf.AddressBook, cfgByChain map[uint64]cldfproposalutils.MCMSWithTimelockConfig) (datastore.MutableDataStore, error) { addrs, err := ab.Addresses() if err != nil { return nil, err @@ -87,7 +87,7 @@ func isMCMSContract(contractType string) bool { } var ( - _ cldf.ChangeSet[map[uint64]types.MCMSWithTimelockConfigV2] = DeployMCMSWithTimelockV2 + _ cldf.ChangeSet[map[uint64]cldfproposalutils.MCMSWithTimelockConfig] = DeployMCMSWithTimelockV2 // GrantRoleInTimeLock grants proposer, canceller, bypasser, executor, admin roles to the timelock contract with corresponding addresses if the // roles are not already set with the same addresses. @@ -99,7 +99,7 @@ var ( // DeployMCMSWithTimelockV2 deploys and initializes the MCM and Timelock contracts func DeployMCMSWithTimelockV2( - env cldf.Environment, cfgByChain map[uint64]types.MCMSWithTimelockConfigV2, + env cldf.Environment, cfgByChain map[uint64]cldfproposalutils.MCMSWithTimelockConfig, ) (cldf.ChangesetOutput, error) { newAddresses := cldf.NewMemoryAddressBook() @@ -170,7 +170,7 @@ func DeployMCMSWithTimelockV2( type GrantRoleInput struct { ExistingProposerByChain map[uint64]common.Address // if needed in the future, need to add bypasser and canceller here MCMS *proposalutils.TimelockConfig - GasBoostConfigPerChain map[uint64]types.GasBoostConfig + GasBoostConfigPerChain map[uint64]cldfproposalutils.GasBoostConfig } func grantRolePreconditions(e cldf.Environment, cfg GrantRoleInput) error { diff --git a/deployment/common/changeset/deploy_mcms_with_timelock_test.go b/deployment/common/changeset/deploy_mcms_with_timelock_test.go index a2538449680..f6c0ca93958 100644 --- a/deployment/common/changeset/deploy_mcms_with_timelock_test.go +++ b/deployment/common/changeset/deploy_mcms_with_timelock_test.go @@ -17,6 +17,9 @@ import ( "github.com/smartcontractkit/quarantine" "github.com/stretchr/testify/require" + cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils" + cldftesthelpers "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils/testhelpers" + timelockBindings "github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings/v0_1_1/timelock" "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" @@ -52,8 +55,8 @@ func TestGrantRoleInTimeLock(t *testing.T) { // deploy the MCMS with timelock contracts configuredChangeset := commonchangeset.Configure( cldf.CreateLegacyChangeSet(commonchangeset.DeployMCMSWithTimelockV2), - map[uint64]commontypes.MCMSWithTimelockConfigV2{ - selector: proposalutils.SingleGroupTimelockConfigV2(t), + map[uint64]cldfproposalutils.MCMSWithTimelockConfig{ + selector: cldftesthelpers.SingleGroupTimelockConfig(t), }, ) updatedEnv, err := commonchangeset.Apply(t, *env, configuredChangeset) @@ -170,7 +173,7 @@ func TestDeployMCMSWithTimelockV2WithFewExistingContracts(t *testing.T) { chain1 := rt.Environment().BlockChains.EVMChains()[selector1] - changesetConfig := map[uint64]commontypes.MCMSWithTimelockConfigV2{ + changesetConfig := map[uint64]cldfproposalutils.MCMSWithTimelockConfig{ selector1: { Proposer: mcmstypes.Config{ Quorum: 1, @@ -276,7 +279,7 @@ func TestDeployMCMSWithTimelockV2(t *testing.T) { evmChain := rt.Environment().BlockChains.EVMChains()[evmSelector] solChain := rt.Environment().BlockChains.SolanaChains()[solSelector] - changesetConfig := map[uint64]commontypes.MCMSWithTimelockConfigV2{ + changesetConfig := map[uint64]cldfproposalutils.MCMSWithTimelockConfig{ evmSelector: { Proposer: mcmstypes.Config{ Quorum: 1, @@ -461,7 +464,7 @@ func TestDeployMCMSWithTimelockV2SkipInitSolana(t *testing.T) { )) require.NoError(t, err) - changesetConfig := map[uint64]commontypes.MCMSWithTimelockConfigV2{ + changesetConfig := map[uint64]cldfproposalutils.MCMSWithTimelockConfig{ selector: { Proposer: mcmstypes.Config{ Quorum: 1, diff --git a/deployment/common/changeset/evm/mcms/mcms.go b/deployment/common/changeset/evm/mcms/mcms.go index 4b311216023..f900fb2e457 100644 --- a/deployment/common/changeset/evm/mcms/mcms.go +++ b/deployment/common/changeset/evm/mcms/mcms.go @@ -126,7 +126,7 @@ func DeployMCMSWithTimelockContractsEVM( env cldf.Environment, chain cldf_evm.Chain, ab cldf.AddressBook, - config commontypes.MCMSWithTimelockConfigV2, + config cldfproposalutils.MCMSWithTimelockConfig, state *evmstate.MCMSWithTimelockState, ) ([]operations.Report[any, any], error) { execReports := make([]operations.Report[any, any], 0) @@ -403,7 +403,7 @@ func GrantRolesForTimelock( chain cldf_evm.Chain, timelockContracts *cldfproposalutils.MCMSWithTimelockContracts, skipIfDeployerKeyNotAdmin bool, // If true, skip role grants if the deployer key is not an admin. - gasBoostConfig *commontypes.GasBoostConfig, + gasBoostConfig *cldfproposalutils.GasBoostConfig, ) (operations.SequenceReport[seqs.SeqGrantRolesTimelockInput, map[uint64][]opsutils.EVMCallOutput], error) { lggr := env.Logger ctx := env.GetContext() diff --git a/deployment/common/changeset/evm/mcms/mcms_test.go b/deployment/common/changeset/evm/mcms/mcms_test.go index 9c69a95467e..2ec6b3a9791 100644 --- a/deployment/common/changeset/evm/mcms/mcms_test.go +++ b/deployment/common/changeset/evm/mcms/mcms_test.go @@ -16,7 +16,6 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/onchain" evminternal "github.com/smartcontractkit/chainlink/deployment/common/changeset/evm/mcms" - "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" "github.com/smartcontractkit/chainlink/deployment/common/types" "github.com/smartcontractkit/chainlink/v2/core/logger" ) @@ -75,7 +74,7 @@ func TestDeployMCMSWithTimelockContracts(t *testing.T) { _, err = evminternal.DeployMCMSWithTimelockContractsEVM(*env, chain, ab, - proposalutils.SingleGroupTimelockConfigV2(t), + cldftesthelpers.SingleGroupTimelockConfig(t), nil, ) require.NoError(t, err) diff --git a/deployment/common/changeset/evm/mcms/seqs/seq_grant_roles_for_timelock.go b/deployment/common/changeset/evm/mcms/seqs/seq_grant_roles_for_timelock.go index 2dc38c08a06..03dfd85987c 100644 --- a/deployment/common/changeset/evm/mcms/seqs/seq_grant_roles_for_timelock.go +++ b/deployment/common/changeset/evm/mcms/seqs/seq_grant_roles_for_timelock.go @@ -8,12 +8,14 @@ import ( evmMcms "github.com/smartcontractkit/mcms/sdk/evm" mcmsTypes "github.com/smartcontractkit/mcms/types" + cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils" + cldf_evm "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm" cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" "github.com/smartcontractkit/chainlink-deployments-framework/operations" + "github.com/smartcontractkit/chainlink/deployment/common/changeset/evm/mcms/ops" "github.com/smartcontractkit/chainlink/deployment/common/opsutils" - commontypes "github.com/smartcontractkit/chainlink/deployment/common/types" "github.com/smartcontractkit/chainlink/deployment/common/view/v1_0" ) @@ -28,12 +30,12 @@ type RolesAndAddresses struct { } type SeqGrantRolesTimelockInput struct { - ContractType cldf.ContractType `json:"contractType"` - ChainSelector uint64 `json:"chainSelector"` - Timelock common.Address `json:"timelock"` - RolesAndAddresses []RolesAndAddresses `json:"rolesAndAddresses"` - IsDeployerKeyAdmin bool `json:"isDeployerKeyAdmin"` - GasBoostConfig *commontypes.GasBoostConfig `json:"gasBoostConfig"` + ContractType cldf.ContractType `json:"contractType"` + ChainSelector uint64 `json:"chainSelector"` + Timelock common.Address `json:"timelock"` + RolesAndAddresses []RolesAndAddresses `json:"rolesAndAddresses"` + IsDeployerKeyAdmin bool `json:"isDeployerKeyAdmin"` + GasBoostConfig *cldfproposalutils.GasBoostConfig `json:"gasBoostConfig"` } type SeqGrantRolesTimelockOutput struct { diff --git a/deployment/common/changeset/evm/mcms/seqs/seq_mcm_with_config.go b/deployment/common/changeset/evm/mcms/seqs/seq_mcm_with_config.go index 3d3529cd63a..1f9738fbd96 100644 --- a/deployment/common/changeset/evm/mcms/seqs/seq_mcm_with_config.go +++ b/deployment/common/changeset/evm/mcms/seqs/seq_mcm_with_config.go @@ -5,6 +5,7 @@ import ( "github.com/Masterminds/semver/v3" "github.com/ethereum/go-ethereum/common" + cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils" "github.com/smartcontractkit/mcms/sdk" mcmsTypes "github.com/smartcontractkit/mcms/types" @@ -12,17 +13,18 @@ import ( cldf_evm "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm" cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" "github.com/smartcontractkit/chainlink-deployments-framework/operations" + "github.com/smartcontractkit/chainlink/deployment/common/changeset/evm/mcms/ops" "github.com/smartcontractkit/chainlink/deployment/common/opsutils" commontypes "github.com/smartcontractkit/chainlink/deployment/common/types" ) type SeqDeployMCMWithConfigInput struct { - ContractType cldf.ContractType `json:"contractType"` - MCMConfig mcmsTypes.Config `json:"mcmConfig"` - ChainSelector uint64 `json:"chainSelector"` - GasBoostConfig *commontypes.GasBoostConfig `json:"gasBoostConfig"` - Qualifier *string `json:"qualifier"` + ContractType cldf.ContractType `json:"contractType"` + MCMConfig mcmsTypes.Config `json:"mcmConfig"` + ChainSelector uint64 `json:"chainSelector"` + GasBoostConfig *cldfproposalutils.GasBoostConfig `json:"gasBoostConfig"` + Qualifier *string `json:"qualifier"` } type SeqDeployMCMWithConfigOutput struct { diff --git a/deployment/common/changeset/example/link_transfer_test.go b/deployment/common/changeset/example/link_transfer_test.go index 0a492ee61c8..fd89e697e81 100644 --- a/deployment/common/changeset/example/link_transfer_test.go +++ b/deployment/common/changeset/example/link_transfer_test.go @@ -9,6 +9,7 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" chain_selectors "github.com/smartcontractkit/chain-selectors" + cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils" cldftesthelpers "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils/testhelpers" @@ -22,7 +23,6 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink/deployment/common/changeset" - "github.com/smartcontractkit/chainlink/deployment/common/types" ) // setupLinkTransferRuntime deploys all required contracts on a simulated chain to run tests which @@ -42,7 +42,7 @@ func setupLinkTransferRuntime(t *testing.T) (*runtime.Runtime, uint64) { config := cldftesthelpers.SingleGroupMCMS(t) err = rt.Exec( runtime.ChangesetTask(cldf.CreateLegacyChangeSet(changeset.DeployLinkToken), []uint64{selector}), - runtime.ChangesetTask(cldf.CreateLegacyChangeSet(changeset.DeployMCMSWithTimelockV2), map[uint64]types.MCMSWithTimelockConfigV2{ + runtime.ChangesetTask(cldf.CreateLegacyChangeSet(changeset.DeployMCMSWithTimelockV2), map[uint64]cldfproposalutils.MCMSWithTimelockConfig{ selector: { Canceller: config, Bypasser: config, diff --git a/deployment/common/changeset/example/solana_transfer_mcm_test.go b/deployment/common/changeset/example/solana_transfer_mcm_test.go index 8abfd92d907..054c6e4324f 100644 --- a/deployment/common/changeset/example/solana_transfer_mcm_test.go +++ b/deployment/common/changeset/example/solana_transfer_mcm_test.go @@ -12,6 +12,8 @@ import ( mcmsSolana "github.com/smartcontractkit/mcms/sdk/solana" "github.com/stretchr/testify/require" + cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils" + "github.com/smartcontractkit/chainlink-common/pkg/logger" cldf_chain "github.com/smartcontractkit/chainlink-deployments-framework/chain" @@ -23,6 +25,7 @@ import ( pdasol "github.com/smartcontractkit/cld-changesets/pkg/family/solana" cldftesthelpers "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils/testhelpers" + "github.com/smartcontractkit/chainlink/deployment" "github.com/smartcontractkit/chainlink/deployment/common/changeset" "github.com/smartcontractkit/chainlink/deployment/common/changeset/example" @@ -210,8 +213,8 @@ func TestTransferFromTimelockConfig_Apply(t *testing.T) { // Deploy MCMS and Timelock err = rt.Exec( - runtime.ChangesetTask(cldf.CreateLegacyChangeSet(changeset.DeployMCMSWithTimelockV2), map[uint64]types.MCMSWithTimelockConfigV2{ - selector: proposalutils.SingleGroupTimelockConfigV2(t), + runtime.ChangesetTask(cldf.CreateLegacyChangeSet(changeset.DeployMCMSWithTimelockV2), map[uint64]cldfproposalutils.MCMSWithTimelockConfig{ + selector: cldftesthelpers.SingleGroupTimelockConfig(t), }), ) require.NoError(t, err) diff --git a/deployment/common/changeset/mcms_firedrill_test.go b/deployment/common/changeset/mcms_firedrill_test.go index 6c629bbc051..9f73f359d51 100644 --- a/deployment/common/changeset/mcms_firedrill_test.go +++ b/deployment/common/changeset/mcms_firedrill_test.go @@ -7,6 +7,9 @@ import ( mcmsTypes "github.com/smartcontractkit/mcms/types" "github.com/stretchr/testify/require" + cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils" + cldftesthelpers "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils/testhelpers" + chain_selectors "github.com/smartcontractkit/chain-selectors" "github.com/smartcontractkit/chainlink-common/pkg/logger" @@ -19,7 +22,6 @@ import ( commonchangeset "github.com/smartcontractkit/chainlink/deployment/common/changeset" "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" - commontypes "github.com/smartcontractkit/chainlink/deployment/common/types" "github.com/smartcontractkit/chainlink/deployment/internal/soltestutils" "github.com/smartcontractkit/chainlink/deployment/utils/solutils" ) @@ -43,10 +45,10 @@ func TestMCMSSignFireDrillChangeset(t *testing.T) { solChain := rt.Environment().BlockChains.SolanaChains()[solSelector] // Deploy MCMS and Timelock - config := proposalutils.SingleGroupTimelockConfigV2(t) + config := cldftesthelpers.SingleGroupTimelockConfig(t) err = rt.Exec( - runtime.ChangesetTask(cldf.CreateLegacyChangeSet(commonchangeset.DeployMCMSWithTimelockV2), map[uint64]commontypes.MCMSWithTimelockConfigV2{ + runtime.ChangesetTask(cldf.CreateLegacyChangeSet(commonchangeset.DeployMCMSWithTimelockV2), map[uint64]cldfproposalutils.MCMSWithTimelockConfig{ evmSelector1: config, evmSelector2: config, solSelector: config, diff --git a/deployment/common/changeset/set_config_mcms_test.go b/deployment/common/changeset/set_config_mcms_test.go index ea2243cbc42..c59e1143bf3 100644 --- a/deployment/common/changeset/set_config_mcms_test.go +++ b/deployment/common/changeset/set_config_mcms_test.go @@ -16,6 +16,8 @@ import ( mcmstypes "github.com/smartcontractkit/mcms/types" "github.com/stretchr/testify/require" + cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils" + cldftesthelpers "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils/testhelpers" "github.com/smartcontractkit/chainlink-common/pkg/logger" @@ -29,7 +31,6 @@ import ( commonchangeset "github.com/smartcontractkit/chainlink/deployment/common/changeset" commonchangesetsolana "github.com/smartcontractkit/chainlink/deployment/common/changeset/solana" "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" - commontypes "github.com/smartcontractkit/chainlink/deployment/common/types" "github.com/smartcontractkit/chainlink/deployment/internal/soltestutils" ) @@ -48,11 +49,11 @@ func TestSetConfigMCMSV2EVM(t *testing.T) { chain1 := rt.Environment().BlockChains.EVMChains()[selector1] chain2 := rt.Environment().BlockChains.EVMChains()[selector2] - config := proposalutils.SingleGroupTimelockConfigV2(t) + config := cldftesthelpers.SingleGroupTimelockConfig(t) // Deploy MCMS and Timelock for selector1 & selector2 err = rt.Exec( - runtime.ChangesetTask(cldf.CreateLegacyChangeSet(commonchangeset.DeployMCMSWithTimelockV2), map[uint64]commontypes.MCMSWithTimelockConfigV2{ + runtime.ChangesetTask(cldf.CreateLegacyChangeSet(commonchangeset.DeployMCMSWithTimelockV2), map[uint64]cldfproposalutils.MCMSWithTimelockConfig{ selector1: config, selector2: config, }), @@ -186,8 +187,8 @@ func TestSetConfigMCMSV2Solana(t *testing.T) { // Deploy MCMS and Timelock err = rt.Exec( - runtime.ChangesetTask(cldf.CreateLegacyChangeSet(commonchangeset.DeployMCMSWithTimelockV2), map[uint64]commontypes.MCMSWithTimelockConfigV2{ - selector: proposalutils.SingleGroupTimelockConfigV2(t), + runtime.ChangesetTask(cldf.CreateLegacyChangeSet(commonchangeset.DeployMCMSWithTimelockV2), map[uint64]cldfproposalutils.MCMSWithTimelockConfig{ + selector: cldftesthelpers.SingleGroupTimelockConfig(t), }), ) require.NoError(t, err) @@ -294,12 +295,12 @@ func TestValidateV2(t *testing.T) { )) require.NoError(t, err) - config := proposalutils.SingleGroupTimelockConfigV2(t) + config := cldftesthelpers.SingleGroupTimelockConfig(t) // Deploy MCMS and Timelock err = rt.Exec( runtime.ChangesetTask(cldf.CreateLegacyChangeSet(commonchangeset.DeployLinkToken), []uint64{evmSelector}), - runtime.ChangesetTask(cldf.CreateLegacyChangeSet(commonchangeset.DeployMCMSWithTimelockV2), map[uint64]commontypes.MCMSWithTimelockConfigV2{ + runtime.ChangesetTask(cldf.CreateLegacyChangeSet(commonchangeset.DeployMCMSWithTimelockV2), map[uint64]cldfproposalutils.MCMSWithTimelockConfig{ evmSelector: config, solSelector: config, }), @@ -532,21 +533,21 @@ func TestSetConfigMCMSV2WithTimelockQualifier(t *testing.T) { // Deploy two MCMS instances on the same chain with different qualifiers, // mirroring the production setup where each chain has CLLCCIP and RMNMCMS deployments - cllccipConfig := proposalutils.SingleGroupTimelockConfigV2(t) + cllccipConfig := cldftesthelpers.SingleGroupTimelockConfig(t) cllccipConfig.Qualifier = &cllccipQualifier - rmnmcmsConfig := proposalutils.SingleGroupTimelockConfigV2(t) + rmnmcmsConfig := cldftesthelpers.SingleGroupTimelockConfig(t) rmnmcmsConfig.Qualifier = &rmnmcmsQualifier err = rt.Exec( - runtime.ChangesetTask(cldf.CreateLegacyChangeSet(commonchangeset.DeployMCMSWithTimelockV2), map[uint64]commontypes.MCMSWithTimelockConfigV2{ + runtime.ChangesetTask(cldf.CreateLegacyChangeSet(commonchangeset.DeployMCMSWithTimelockV2), map[uint64]cldfproposalutils.MCMSWithTimelockConfig{ selector: cllccipConfig, }), ) require.NoError(t, err) err = rt.Exec( - runtime.ChangesetTask(cldf.CreateLegacyChangeSet(commonchangeset.DeployMCMSWithTimelockV2), map[uint64]commontypes.MCMSWithTimelockConfigV2{ + runtime.ChangesetTask(cldf.CreateLegacyChangeSet(commonchangeset.DeployMCMSWithTimelockV2), map[uint64]cldfproposalutils.MCMSWithTimelockConfig{ selector: rmnmcmsConfig, }), ) @@ -622,11 +623,11 @@ func TestSetConfigMCMSV2Partial(t *testing.T) { require.NoError(t, err) chain := rt.Environment().BlockChains.EVMChains()[selector] - config := proposalutils.SingleGroupTimelockConfigV2(t) + config := cldftesthelpers.SingleGroupTimelockConfig(t) // Deploy MCMS and Timelock err = rt.Exec( - runtime.ChangesetTask(cldf.CreateLegacyChangeSet(commonchangeset.DeployMCMSWithTimelockV2), map[uint64]commontypes.MCMSWithTimelockConfigV2{ + runtime.ChangesetTask(cldf.CreateLegacyChangeSet(commonchangeset.DeployMCMSWithTimelockV2), map[uint64]cldfproposalutils.MCMSWithTimelockConfig{ selector: config, }), ) diff --git a/deployment/common/changeset/solana/mcms/mcms.go b/deployment/common/changeset/solana/mcms/mcms.go index c870aab842c..69366da4e20 100644 --- a/deployment/common/changeset/solana/mcms/mcms.go +++ b/deployment/common/changeset/solana/mcms/mcms.go @@ -10,6 +10,8 @@ import ( "github.com/gagliardetto/solana-go/rpc" solstate "github.com/smartcontractkit/cld-changesets/legacy/pkg/family/solana" + cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils" + cldf_solana "github.com/smartcontractkit/chainlink-deployments-framework/chain/solana" "github.com/smartcontractkit/chainlink-deployments-framework/datastore" cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" @@ -28,7 +30,7 @@ func DeployMCMSWithTimelockProgramsSolana( e cldf.Environment, chain cldf_solana.Chain, addressBook cldf.AddressBook, - config commontypes.MCMSWithTimelockConfigV2, + config cldfproposalutils.MCMSWithTimelockConfig, ) (*solstate.MCMSWithTimelockState, error) { addresses, err := e.ExistingAddresses.AddressesForChain(chain.Selector) if err != nil && !errors.Is(err, cldf.ErrChainNotFound) { diff --git a/deployment/common/changeset/solana/setup_test.go b/deployment/common/changeset/solana/setup_test.go index 758b765160c..8980198e87e 100644 --- a/deployment/common/changeset/solana/setup_test.go +++ b/deployment/common/changeset/solana/setup_test.go @@ -4,6 +4,8 @@ import ( "testing" chainselectors "github.com/smartcontractkit/chain-selectors" + cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils" + cldftesthelpers "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils/testhelpers" "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-common/pkg/logger" @@ -13,8 +15,6 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" "github.com/smartcontractkit/chainlink/deployment/common/changeset" - "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" - commontypes "github.com/smartcontractkit/chainlink/deployment/common/types" "github.com/smartcontractkit/chainlink/deployment/internal/soltestutils" ) @@ -33,8 +33,8 @@ func setupTest(t *testing.T) (*runtime.Runtime, uint64) { // Deploy MCMS and Timelock err = rt.Exec( - runtime.ChangesetTask(cldf.CreateLegacyChangeSet(changeset.DeployMCMSWithTimelockV2), map[uint64]commontypes.MCMSWithTimelockConfigV2{ - selector: proposalutils.SingleGroupTimelockConfigV2(t), + runtime.ChangesetTask(cldf.CreateLegacyChangeSet(changeset.DeployMCMSWithTimelockV2), map[uint64]cldfproposalutils.MCMSWithTimelockConfig{ + selector: cldftesthelpers.SingleGroupTimelockConfig(t), }), ) require.NoError(t, err) diff --git a/deployment/common/changeset/state/solana_test.go b/deployment/common/changeset/state/solana_test.go index be8d589bcbd..5dc132fd861 100644 --- a/deployment/common/changeset/state/solana_test.go +++ b/deployment/common/changeset/state/solana_test.go @@ -15,13 +15,14 @@ import ( mcmstypes "github.com/smartcontractkit/mcms/types" "github.com/stretchr/testify/require" + cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" solanaMCMS "github.com/smartcontractkit/chainlink/deployment/common/changeset/solana/mcms" - commontypes "github.com/smartcontractkit/chainlink/deployment/common/types" "github.com/smartcontractkit/chainlink/deployment/internal/soltestutils" ) @@ -42,7 +43,7 @@ func TestMCMSWithTimelockState_GenerateMCMSWithTimelockViewSolana(t *testing.T) defaultState := func() *solstate.MCMSWithTimelockState { addressBook := cldf.NewMemoryAddressBook() mcmsState, err := solanaMCMS.DeployMCMSWithTimelockProgramsSolana(*env, chain, addressBook, - commontypes.MCMSWithTimelockConfigV2{ + cldfproposalutils.MCMSWithTimelockConfig{ Proposer: mcmstypes.Config{ Quorum: 1, Signers: []common.Address{common.HexToAddress("0x0000000000000000000000000000000000000001")}, diff --git a/deployment/common/changeset/transfer_to_mcms_with_timelock_test.go b/deployment/common/changeset/transfer_to_mcms_with_timelock_test.go index c9c9e9df549..b8281b62c56 100644 --- a/deployment/common/changeset/transfer_to_mcms_with_timelock_test.go +++ b/deployment/common/changeset/transfer_to_mcms_with_timelock_test.go @@ -12,6 +12,8 @@ import ( evmstate "github.com/smartcontractkit/cld-changesets/legacy/pkg/family/evm" "github.com/stretchr/testify/require" + cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils" + "github.com/smartcontractkit/chainlink-deployments-framework/datastore" "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" @@ -40,8 +42,8 @@ func TestTransferToMCMSWithTimelockV2(t *testing.T) { // Setup contracts err = rt.Exec( runtime.ChangesetTask(cldf.CreateLegacyChangeSet(changeset.DeployLinkToken), []uint64{selector}), - runtime.ChangesetTask(cldf.CreateLegacyChangeSet(changeset.DeployMCMSWithTimelockV2), map[uint64]types.MCMSWithTimelockConfigV2{ - selector: proposalutils.SingleGroupTimelockConfigV2(t), + runtime.ChangesetTask(cldf.CreateLegacyChangeSet(changeset.DeployMCMSWithTimelockV2), map[uint64]cldfproposalutils.MCMSWithTimelockConfig{ + selector: cldftesthelpers.SingleGroupTimelockConfig(t), }), ) require.NoError(t, err) @@ -104,8 +106,8 @@ func TestTransferToMCMSWithTimelockV2DataStore(t *testing.T) { // Setup contracts err = rt.Exec( runtime.ChangesetTask(cldf.CreateLegacyChangeSet(changeset.DeployLinkToken), []uint64{selector}), - runtime.ChangesetTask(cldf.CreateLegacyChangeSet(changeset.DeployMCMSWithTimelockV2), map[uint64]types.MCMSWithTimelockConfigV2{ - selector: proposalutils.SingleGroupTimelockConfigV2(t), + runtime.ChangesetTask(cldf.CreateLegacyChangeSet(changeset.DeployMCMSWithTimelockV2), map[uint64]cldfproposalutils.MCMSWithTimelockConfig{ + selector: cldftesthelpers.SingleGroupTimelockConfig(t), }), ) require.NoError(t, err) @@ -200,8 +202,8 @@ func TestRenounceTimelockDeployerConfigValidate(t *testing.T) { // Deploy MCMS to selector 1 only, so we have a chain without MCMS err = rt.Exec( - runtime.ChangesetTask(cldf.CreateLegacyChangeSet(changeset.DeployMCMSWithTimelockV2), map[uint64]types.MCMSWithTimelockConfigV2{ - selector1: proposalutils.SingleGroupTimelockConfigV2(t), + runtime.ChangesetTask(cldf.CreateLegacyChangeSet(changeset.DeployMCMSWithTimelockV2), map[uint64]cldfproposalutils.MCMSWithTimelockConfig{ + selector1: cldftesthelpers.SingleGroupTimelockConfig(t), }), ) require.NoError(t, err) @@ -267,8 +269,8 @@ func TestRenounceTimelockDeployer(t *testing.T) { chain := rt.Environment().BlockChains.EVMChains()[selector] err = rt.Exec( - runtime.ChangesetTask(cldf.CreateLegacyChangeSet(changeset.DeployMCMSWithTimelockV2), map[uint64]types.MCMSWithTimelockConfigV2{ - selector: proposalutils.SingleGroupTimelockConfigV2(t), + runtime.ChangesetTask(cldf.CreateLegacyChangeSet(changeset.DeployMCMSWithTimelockV2), map[uint64]cldfproposalutils.MCMSWithTimelockConfig{ + selector: cldftesthelpers.SingleGroupTimelockConfig(t), }), ) require.NoError(t, err) diff --git a/deployment/common/opsutils/evm.go b/deployment/common/opsutils/evm.go index d20f1d3e622..5c8fdc18ed0 100644 --- a/deployment/common/opsutils/evm.go +++ b/deployment/common/opsutils/evm.go @@ -27,7 +27,6 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/operations" "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" - commontypes "github.com/smartcontractkit/chainlink/deployment/common/types" ) // EVMCallInput is the input structure for an EVM call operation. @@ -359,8 +358,8 @@ func CloneTransactOptsWithGas(opts *bind.TransactOpts, gasLimit uint64, gasPrice // GasBoostConfigsForChainMap creates a map of GasBoostConfig pointers for each chain in the provided chainMap. // If a chain selector exists in gasBoostConfigs, it uses that config; otherwise, it sets nil. -func GasBoostConfigsForChainMap[T any](chainMap map[uint64]T, gasBoostConfigs map[uint64]commontypes.GasBoostConfig) map[uint64]*commontypes.GasBoostConfig { - cfgs := make(map[uint64]*commontypes.GasBoostConfig, len(chainMap)) +func GasBoostConfigsForChainMap[T any](chainMap map[uint64]T, gasBoostConfigs map[uint64]cldfproposalutils.GasBoostConfig) map[uint64]*cldfproposalutils.GasBoostConfig { + cfgs := make(map[uint64]*cldfproposalutils.GasBoostConfig, len(chainMap)) if gasBoostConfigs == nil || chainMap == nil { // in either case, gas boosting should be empty return cfgs } @@ -379,7 +378,7 @@ func GasBoostConfigsForChainMap[T any](chainMap map[uint64]T, gasBoostConfigs ma // RetryDeploymentWithGasBoost is an ExecuteOption that retries EVM deployments with gas boosting. // It uses the provided GasBoostConfig to adjust the gas limit and gas price on each retry attempt. -func RetryDeploymentWithGasBoost[IN any](cfg *commontypes.GasBoostConfig) operations.ExecuteOption[EVMDeployInput[IN], cldf_evm.Chain] { +func RetryDeploymentWithGasBoost[IN any](cfg *cldfproposalutils.GasBoostConfig) operations.ExecuteOption[EVMDeployInput[IN], cldf_evm.Chain] { if cfg == nil { return withoutRetry[EVMDeployInput[IN], cldf_evm.Chain]() } @@ -402,7 +401,7 @@ func withoutRetry[IN, DEP any]() operations.ExecuteOption[IN, DEP] { // RetryCallWithGasBoost is an ExecuteOption that retries EVM calls with gas boosting. // It uses the provided GasBoostConfig to adjust the gas limit and gas price on each retry attempt. // If NoSend is true, it will not apply gas boosting since the transaction is never sent. -func RetryCallWithGasBoost[IN any](cfg *commontypes.GasBoostConfig) operations.ExecuteOption[EVMCallInput[IN], cldf_evm.Chain] { +func RetryCallWithGasBoost[IN any](cfg *cldfproposalutils.GasBoostConfig) operations.ExecuteOption[EVMCallInput[IN], cldf_evm.Chain] { // Use default retry option if no gas boost config is provided if cfg == nil { return operations.WithRetry[EVMCallInput[IN], cldf_evm.Chain]() @@ -422,7 +421,7 @@ func RetryCallWithGasBoost[IN any](cfg *commontypes.GasBoostConfig) operations.E }) } -func GetBoostedGasForAttempt(cfg commontypes.GasBoostConfig, attempt uint) (gasLimit uint64, gasPrice uint64) { +func GetBoostedGasForAttempt(cfg cldfproposalutils.GasBoostConfig, attempt uint) (gasLimit uint64, gasPrice uint64) { initialGasLimit := uint64(200_000) // 200k gasLimitIncrement := uint64(50_000) // 50k initialGasPrice := uint64(20_000_000_000) // 20 Gwei diff --git a/deployment/common/opsutils/evm_test.go b/deployment/common/opsutils/evm_test.go index 4edfaad4a72..75be18caff4 100644 --- a/deployment/common/opsutils/evm_test.go +++ b/deployment/common/opsutils/evm_test.go @@ -15,6 +15,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils" + chain_selectors "github.com/smartcontractkit/chain-selectors" mcmslib "github.com/smartcontractkit/mcms" mcmstypes "github.com/smartcontractkit/mcms/types" @@ -31,7 +33,6 @@ import ( "github.com/smartcontractkit/chainlink/deployment/ccip/shared/stateview" "github.com/smartcontractkit/chainlink/deployment/common/opsutils" "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" - commontypes "github.com/smartcontractkit/chainlink/deployment/common/types" ) func TestCloneTransactOptsWithGas(t *testing.T) { @@ -56,7 +57,7 @@ func TestCloneTransactOptsWithGas(t *testing.T) { func TestGasBoostConfigsForChainMap(t *testing.T) { t.Parallel() chainMap := map[uint64]string{1: "a", 2: "b"} - gasBoostConfigs := map[uint64]commontypes.GasBoostConfig{ + gasBoostConfigs := map[uint64]cldfproposalutils.GasBoostConfig{ 1: {InitialGasLimit: 10}, } cfgs := opsutils.GasBoostConfigsForChainMap(chainMap, gasBoostConfigs) @@ -70,7 +71,7 @@ func TestGasBoostConfigsForChainMap(t *testing.T) { func TestGetBoostedGasForAttempt_DefaultsAndOverrides(t *testing.T) { t.Parallel() - cfg := commontypes.GasBoostConfig{} + cfg := cldfproposalutils.GasBoostConfig{} limit, price := opsutils.GetBoostedGasForAttempt(cfg, 0) assert.Equal(t, uint64(200_000), limit) assert.Equal(t, uint64(20_000_000_000), price) @@ -78,7 +79,7 @@ func TestGetBoostedGasForAttempt_DefaultsAndOverrides(t *testing.T) { assert.Equal(t, uint64(200_000+2*50_000), limit) assert.Equal(t, uint64(20_000_000_000+2*10_000_000_000), price) - cfg = commontypes.GasBoostConfig{ + cfg = cldfproposalutils.GasBoostConfig{ InitialGasLimit: 1000, GasLimitIncrement: 100, InitialGasPrice: 2000, @@ -91,7 +92,7 @@ func TestGetBoostedGasForAttempt_DefaultsAndOverrides(t *testing.T) { func TestRetryDeploymentWithGasBoost(t *testing.T) { t.Parallel() - cfg := &commontypes.GasBoostConfig{ + cfg := &cldfproposalutils.GasBoostConfig{ InitialGasLimit: 1000, GasLimitIncrement: 100, InitialGasPrice: 2000, diff --git a/deployment/common/proposalutils/propose_test.go b/deployment/common/proposalutils/propose_test.go index 4eaa01142b6..d98523251c4 100644 --- a/deployment/common/proposalutils/propose_test.go +++ b/deployment/common/proposalutils/propose_test.go @@ -30,7 +30,6 @@ import ( "github.com/smartcontractkit/chainlink/deployment/common/changeset" "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" - commontypes "github.com/smartcontractkit/chainlink/deployment/common/types" "github.com/smartcontractkit/chainlink/deployment/internal/soltestutils" ) @@ -55,7 +54,7 @@ func TestBuildProposalFromBatchesV2(t *testing.T) { config := cldftesthelpers.SingleGroupMCMS(t) err = rt.Exec( - runtime.ChangesetTask(cldf.CreateLegacyChangeSet(changeset.DeployMCMSWithTimelockV2), map[uint64]commontypes.MCMSWithTimelockConfigV2{ + runtime.ChangesetTask(cldf.CreateLegacyChangeSet(changeset.DeployMCMSWithTimelockV2), map[uint64]cldfproposalutils.MCMSWithTimelockConfig{ evmSelector: { Canceller: config, Bypasser: config, diff --git a/deployment/common/types/types.go b/deployment/common/types/types.go index 9c1c71bc9d5..c46334d6c65 100644 --- a/deployment/common/types/types.go +++ b/deployment/common/types/types.go @@ -8,6 +8,8 @@ import ( "github.com/smartcontractkit/ccip-owner-contracts/pkg/config" mcmstypes "github.com/smartcontractkit/mcms/types" + cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils" + cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" ) @@ -61,13 +63,13 @@ type MCMSWithTimelockConfig struct { // MCMSWithTimelockConfigV2 holds the configuration for an MCMS with timelock. // Note that this type already exists in types.go, but this one is using the new lib version. type MCMSWithTimelockConfigV2 struct { - Canceller mcmstypes.Config `json:"canceller"` - Bypasser mcmstypes.Config `json:"bypasser"` - Proposer mcmstypes.Config `json:"proposer"` - TimelockMinDelay *big.Int `json:"timelockMinDelay"` - Label *string `json:"label"` - GasBoostConfig *GasBoostConfig `json:"gasBoostConfig"` - Qualifier *string `json:"qualifier"` + Canceller mcmstypes.Config `json:"canceller"` + Bypasser mcmstypes.Config `json:"bypasser"` + Proposer mcmstypes.Config `json:"proposer"` + TimelockMinDelay *big.Int `json:"timelockMinDelay"` + Label *string `json:"label"` + GasBoostConfig *cldfproposalutils.GasBoostConfig `json:"gasBoostConfig"` + Qualifier *string `json:"qualifier"` } type OCRParameters struct { diff --git a/deployment/cre/capabilities_registry/v2/changeset/configure_capabilities_registry_test.go b/deployment/cre/capabilities_registry/v2/changeset/configure_capabilities_registry_test.go index a261b8b90e9..fe7f2ad7990 100644 --- a/deployment/cre/capabilities_registry/v2/changeset/configure_capabilities_registry_test.go +++ b/deployment/cre/capabilities_registry/v2/changeset/configure_capabilities_registry_test.go @@ -14,6 +14,9 @@ import ( "google.golang.org/protobuf/testing/protocmp" "gopkg.in/yaml.v3" + cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils" + cldftesthelpers "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils/testhelpers" + "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-deployments-framework/datastore" cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" @@ -23,9 +26,8 @@ import ( capabilities_registry_v2 "github.com/smartcontractkit/chainlink-evm/gethwrappers/workflow/generated/capabilities_registry_wrapper_v2" "github.com/smartcontractkit/chainlink-common/keystore/corekeys/p2pkey" + commonchangeset "github.com/smartcontractkit/chainlink/deployment/common/changeset" - "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" - commontypes "github.com/smartcontractkit/chainlink/deployment/common/types" "github.com/smartcontractkit/chainlink/deployment/cre/capabilities_registry/v2/changeset" "github.com/smartcontractkit/chainlink/deployment/cre/capabilities_registry/v2/changeset/operations/contracts" "github.com/smartcontractkit/chainlink/deployment/cre/capabilities_registry/v2/changeset/pkg" @@ -554,8 +556,8 @@ func setupCapabilitiesRegistryWithMCMS(t *testing.T) *testFixture { // Deploy MCMS infrastructure first t.Log("Setting up MCMS infrastructure...") - timelockCfgs := map[uint64]commontypes.MCMSWithTimelockConfigV2{ - selector: proposalutils.SingleGroupTimelockConfigV2(t), + timelockCfgs := map[uint64]cldfproposalutils.MCMSWithTimelockConfig{ + selector: cldftesthelpers.SingleGroupTimelockConfig(t), } err = rt.Exec( diff --git a/deployment/cre/capabilities_registry/v2/changeset/multiple_mcms_test.go b/deployment/cre/capabilities_registry/v2/changeset/multiple_mcms_test.go index a9ad5313a30..994e377dabc 100644 --- a/deployment/cre/capabilities_registry/v2/changeset/multiple_mcms_test.go +++ b/deployment/cre/capabilities_registry/v2/changeset/multiple_mcms_test.go @@ -5,6 +5,8 @@ import ( "time" chainselectors "github.com/smartcontractkit/chain-selectors" + cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils" + cldftesthelpers "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils/testhelpers" "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-common/pkg/logger" @@ -14,8 +16,6 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" commonchangeset "github.com/smartcontractkit/chainlink/deployment/common/changeset" - "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" - commontypes "github.com/smartcontractkit/chainlink/deployment/common/types" "github.com/smartcontractkit/chainlink/deployment/cre/common/strategies" crecontracts "github.com/smartcontractkit/chainlink/deployment/cre/contracts" ) @@ -34,10 +34,10 @@ func TestMultipleMCMSDeploymentsConflict(t *testing.T) { // Create Team A's MCMS config with qualifier teamAQualifier := "team-a" - teamAConfig := proposalutils.SingleGroupTimelockConfigV2(t) + teamAConfig := cldftesthelpers.SingleGroupTimelockConfig(t) teamAConfig.Qualifier = &teamAQualifier - teamATimelockCfgs := map[uint64]commontypes.MCMSWithTimelockConfigV2{ + teamATimelockCfgs := map[uint64]cldfproposalutils.MCMSWithTimelockConfig{ selector: teamAConfig, } @@ -65,10 +65,10 @@ func TestMultipleMCMSDeploymentsConflict(t *testing.T) { // Create Team B's MCMS config with different qualifier teamBQualifier := "team-b" - teamBConfig := proposalutils.SingleGroupTimelockConfigV2(t) + teamBConfig := cldftesthelpers.SingleGroupTimelockConfig(t) teamBConfig.Qualifier = &teamBQualifier - teamBTimelockCfgs := map[uint64]commontypes.MCMSWithTimelockConfigV2{ + teamBTimelockCfgs := map[uint64]cldfproposalutils.MCMSWithTimelockConfig{ selector: teamBConfig, } diff --git a/deployment/cre/capabilities_registry/v2/changeset/update_don_test.go b/deployment/cre/capabilities_registry/v2/changeset/update_don_test.go index 50a3dc076b6..979a0154b88 100644 --- a/deployment/cre/capabilities_registry/v2/changeset/update_don_test.go +++ b/deployment/cre/capabilities_registry/v2/changeset/update_don_test.go @@ -9,6 +9,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils" + cldftesthelpers "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils/testhelpers" + chainselectors "github.com/smartcontractkit/chain-selectors" "github.com/smartcontractkit/chainlink-common/pkg/logger" @@ -20,8 +23,6 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" commonchangeset "github.com/smartcontractkit/chainlink/deployment/common/changeset" - "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" - commontypes "github.com/smartcontractkit/chainlink/deployment/common/types" "github.com/smartcontractkit/chainlink/deployment/cre/capabilities_registry/v2/changeset" "github.com/smartcontractkit/chainlink/deployment/cre/capabilities_registry/v2/changeset/operations/contracts" "github.com/smartcontractkit/chainlink/deployment/cre/capabilities_registry/v2/changeset/pkg" @@ -182,8 +183,8 @@ func setupRegistryForUpdateDON(t *testing.T, isWorkflow, useMCMS bool) *updFixtu } } - timelockCfgs := map[uint64]commontypes.MCMSWithTimelockConfigV2{ - selector: proposalutils.SingleGroupTimelockConfigV2(t), + timelockCfgs := map[uint64]cldfproposalutils.MCMSWithTimelockConfig{ + selector: cldftesthelpers.SingleGroupTimelockConfig(t), } updatedEnv, mcmsErr := commonchangeset.Apply(t, rt.Environment(), commonchangeset.Configure( diff --git a/deployment/cre/contracts/contracts_test.go b/deployment/cre/contracts/contracts_test.go index 032054e68ff..a494d0c7372 100644 --- a/deployment/cre/contracts/contracts_test.go +++ b/deployment/cre/contracts/contracts_test.go @@ -21,6 +21,7 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" + cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils" cldftesthelpers "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils/testhelpers" "github.com/smartcontractkit/chainlink/deployment" commonchangeset "github.com/smartcontractkit/chainlink/deployment/common/changeset" @@ -236,9 +237,9 @@ func TestNewOwnableV2(t *testing.T) { require.NoError(t, err) // Deploy the capability registry - mcmsCfg := make(map[uint64]types.MCMSWithTimelockConfigV2) + mcmsCfg := make(map[uint64]cldfproposalutils.MCMSWithTimelockConfig) for _, c := range rt.Environment().BlockChains.ListChainSelectors() { - mcmsCfg[c] = proposalutils.SingleGroupTimelockConfigV2(t) + mcmsCfg[c] = cldftesthelpers.SingleGroupTimelockConfig(t) } err = rt.Exec( runtime.ChangesetTask(cldf.CreateLegacyChangeSet(commonchangeset.DeployMCMSWithTimelockV2), mcmsCfg), diff --git a/deployment/cre/mcms/changeset/configure.go b/deployment/cre/mcms/changeset/configure.go index a579b885153..7af607cad3e 100644 --- a/deployment/cre/mcms/changeset/configure.go +++ b/deployment/cre/mcms/changeset/configure.go @@ -4,9 +4,9 @@ import ( "errors" cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" + cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils" "github.com/smartcontractkit/chainlink/deployment/common/changeset" - "github.com/smartcontractkit/chainlink/deployment/common/types" "github.com/smartcontractkit/chainlink/deployment/cre/contracts" ) @@ -15,7 +15,7 @@ type CsMCMSConfigure struct{} var _ cldf.ChangeSetV2[ConfigureChangesetInput] = CsMCMSConfigure{} type ContractConfiguration struct { - Config types.MCMSWithTimelockConfigV2 `json:"config,omitempty" yaml:"config,omitempty"` + Config cldfproposalutils.MCMSWithTimelockConfig `json:"config,omitempty" yaml:"config,omitempty"` } // MCMSConfigureChangesetInput is the input for the set MCMS configuration changeset. diff --git a/deployment/cre/mcms/changeset/configure_test.go b/deployment/cre/mcms/changeset/configure_test.go index 593089b03cd..1ae765c527c 100644 --- a/deployment/cre/mcms/changeset/configure_test.go +++ b/deployment/cre/mcms/changeset/configure_test.go @@ -9,13 +9,14 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils" + mcmsbindings "github.com/smartcontractkit/ccip-owner-contracts/pkg/gethwrappers" "github.com/smartcontractkit/chainlink-deployments-framework/datastore" testenv "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" - "github.com/smartcontractkit/chainlink/deployment/common/types" "github.com/smartcontractkit/chainlink/deployment/cre/mcms/changeset" "github.com/smartcontractkit/chainlink/deployment/cre/mcms/pkg" ) @@ -97,7 +98,7 @@ func TestMCMSConfiguration(t *testing.T) { } var updatedEOA = common.HexToAddress("0xA01E9eD15b18D3688D0B84D88a98ed750D56999C") -var testMCMSCfg2 = types.MCMSWithTimelockConfigV2{ +var testMCMSCfg2 = cldfproposalutils.MCMSWithTimelockConfig{ Proposer: pkg.MustGetMCMSConfig(1, []common.Address{updatedEOA}, nil), Bypasser: pkg.MustGetMCMSConfig(1, []common.Address{updatedEOA}, nil), Canceller: pkg.MustGetMCMSConfig(1, []common.Address{updatedEOA}, nil), diff --git a/deployment/cre/mcms/changeset/deploy.go b/deployment/cre/mcms/changeset/deploy.go index 6f1270853b6..06d0c1664a2 100644 --- a/deployment/cre/mcms/changeset/deploy.go +++ b/deployment/cre/mcms/changeset/deploy.go @@ -6,10 +6,11 @@ import ( "net/url" "strconv" - commonchangeset "github.com/smartcontractkit/chainlink/deployment/common/changeset" - commontypes "github.com/smartcontractkit/chainlink/deployment/common/types" + cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils" cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" + + commonchangeset "github.com/smartcontractkit/chainlink/deployment/common/changeset" ) type CsMCMSDeploy struct{} @@ -55,7 +56,7 @@ func (CsMCMSDeploy) VerifyPreconditions(env cldf.Environment, input DeployChange } func (CsMCMSDeploy) Apply(env cldf.Environment, input DeployChangesetInput) (cldf.ChangesetOutput, error) { - mcmsConfigPerChain := make(map[uint64]commontypes.MCMSWithTimelockConfigV2, len(input.ChainSelectors)) + mcmsConfigPerChain := make(map[uint64]cldfproposalutils.MCMSWithTimelockConfig, len(input.ChainSelectors)) // we set the qualifier per chain selector for _, s := range input.ChainSelectors { q := input.Qualifier(s) diff --git a/deployment/cre/mcms/changeset/deploy_test.go b/deployment/cre/mcms/changeset/deploy_test.go index a3225cd72c1..6ff99e81db8 100644 --- a/deployment/cre/mcms/changeset/deploy_test.go +++ b/deployment/cre/mcms/changeset/deploy_test.go @@ -9,10 +9,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils" + "github.com/smartcontractkit/chainlink-deployments-framework/datastore" testenv "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" - "github.com/smartcontractkit/chainlink/deployment/common/types" + "github.com/smartcontractkit/chainlink/deployment/cre/mcms/changeset" "github.com/smartcontractkit/chainlink/deployment/cre/mcms/pkg" ) @@ -57,7 +59,7 @@ func TestMCMSDeployment(t *testing.T) { var d = 5 * time.Second var eoa = common.HexToAddress("0xA01E9eD15b18D3688D0B84D88a98ed750D56999B") -var testMCMSCfg = types.MCMSWithTimelockConfigV2{ +var testMCMSCfg = cldfproposalutils.MCMSWithTimelockConfig{ Proposer: pkg.MustGetMCMSConfig(1, []common.Address{ eoa, }, nil), diff --git a/deployment/cre/test/env_setup.go b/deployment/cre/test/env_setup.go index 7b0802a90d5..cfebe57b1ae 100644 --- a/deployment/cre/test/env_setup.go +++ b/deployment/cre/test/env_setup.go @@ -9,6 +9,8 @@ import ( "testing" "github.com/ethereum/go-ethereum/common" + cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils" + cldftesthelpers "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils/testhelpers" "github.com/stretchr/testify/require" chain_selectors "github.com/smartcontractkit/chain-selectors" @@ -27,8 +29,6 @@ import ( "github.com/smartcontractkit/chainlink/deployment" "github.com/smartcontractkit/chainlink/deployment/common/changeset" - "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" - commontypes "github.com/smartcontractkit/chainlink/deployment/common/types" changeset2 "github.com/smartcontractkit/chainlink/deployment/cre/capabilities_registry/v2/changeset" envtest "github.com/smartcontractkit/chainlink/deployment/environment/test" changeset3 "github.com/smartcontractkit/chainlink/deployment/keystone/changeset" @@ -231,8 +231,8 @@ func SetupEnvV2(t *testing.T, useMCMS bool) *EnvWrapperV2 { if useMCMS { t.Log("Setting up MCMS infrastructure...") - timelockCfgs := map[uint64]commontypes.MCMSWithTimelockConfigV2{ - registryChainSel: proposalutils.SingleGroupTimelockConfigV2(t), + timelockCfgs := map[uint64]cldfproposalutils.MCMSWithTimelockConfig{ + registryChainSel: cldftesthelpers.SingleGroupTimelockConfig(t), } updatedEnv, mcmsErr := changeset.Apply(t, env, changeset.Configure( diff --git a/deployment/cre/workflow_registry/v2/changeset/fixture_test.go b/deployment/cre/workflow_registry/v2/changeset/fixture_test.go index aeb8a7ccc88..4c2df5d92f3 100644 --- a/deployment/cre/workflow_registry/v2/changeset/fixture_test.go +++ b/deployment/cre/workflow_registry/v2/changeset/fixture_test.go @@ -4,6 +4,8 @@ import ( "testing" "github.com/ethereum/go-ethereum/common" + cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils" + cldftesthelpers "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils/testhelpers" "github.com/stretchr/testify/require" chainselectors "github.com/smartcontractkit/chain-selectors" @@ -15,8 +17,6 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" commonchangeset "github.com/smartcontractkit/chainlink/deployment/common/changeset" - "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" - commontypes "github.com/smartcontractkit/chainlink/deployment/common/types" ) type testFixture struct { @@ -92,8 +92,8 @@ func setupTestWithMCMS(t *testing.T) *testFixture { fixture := setupTest(t) err := fixture.rt.Exec( - runtime.ChangesetTask(cldf.CreateLegacyChangeSet(commonchangeset.DeployMCMSWithTimelockV2), map[uint64]commontypes.MCMSWithTimelockConfigV2{ - fixture.selector: proposalutils.SingleGroupTimelockConfigV2(t), + runtime.ChangesetTask(cldf.CreateLegacyChangeSet(commonchangeset.DeployMCMSWithTimelockV2), map[uint64]cldfproposalutils.MCMSWithTimelockConfig{ + fixture.selector: cldftesthelpers.SingleGroupTimelockConfig(t), }), ) require.NoError(t, err, "failed to deploy MCMS") diff --git a/deployment/data-feeds/changeset/accept_ownership_test.go b/deployment/data-feeds/changeset/accept_ownership_test.go index 7068ece6935..e399acebe54 100644 --- a/deployment/data-feeds/changeset/accept_ownership_test.go +++ b/deployment/data-feeds/changeset/accept_ownership_test.go @@ -8,6 +8,8 @@ import ( chain_selectors "github.com/smartcontractkit/chain-selectors" "github.com/stretchr/testify/require" + cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils" + "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-deployments-framework/datastore" @@ -16,9 +18,8 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" cldftesthelpers "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils/testhelpers" + commonChangesets "github.com/smartcontractkit/chainlink/deployment/common/changeset" - "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" - commonTypes "github.com/smartcontractkit/chainlink/deployment/common/types" "github.com/smartcontractkit/chainlink/deployment/data-feeds/changeset/types" ) @@ -34,13 +35,13 @@ func TestAcceptOwnership(t *testing.T) { chain := rt.Environment().BlockChains.EVMChains()[selector] - MCMScfg := proposalutils.SingleGroupTimelockConfigV2(t) + MCMScfg := cldftesthelpers.SingleGroupTimelockConfig(t) MCMSQualifier := "MCMS_EVM_1" MCMScfg.Qualifier = &MCMSQualifier err = rt.Exec( runtime.ChangesetTask(cldf.CreateLegacyChangeSet( - commonChangesets.DeployMCMSWithTimelockV2), map[uint64]commonTypes.MCMSWithTimelockConfigV2{ + commonChangesets.DeployMCMSWithTimelockV2), map[uint64]cldfproposalutils.MCMSWithTimelockConfig{ selector: MCMScfg, }), ) diff --git a/deployment/data-feeds/changeset/confirm_aggregator_test.go b/deployment/data-feeds/changeset/confirm_aggregator_test.go index 8a9dcbb943c..c0b3f27e714 100644 --- a/deployment/data-feeds/changeset/confirm_aggregator_test.go +++ b/deployment/data-feeds/changeset/confirm_aggregator_test.go @@ -8,6 +8,8 @@ import ( chain_selectors "github.com/smartcontractkit/chain-selectors" "github.com/stretchr/testify/require" + cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils" + "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-deployments-framework/datastore" @@ -16,9 +18,9 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" cldftesthelpers "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils/testhelpers" + commonChangesets "github.com/smartcontractkit/chainlink/deployment/common/changeset" "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" - commonTypes "github.com/smartcontractkit/chainlink/deployment/common/types" "github.com/smartcontractkit/chainlink/deployment/data-feeds/changeset" "github.com/smartcontractkit/chainlink/deployment/data-feeds/changeset/types" ) @@ -51,7 +53,7 @@ func TestConfirmAggregator(t *testing.T) { require.Len(t, records, 1) proxyAddress := records[0].Address - MCMScfg := proposalutils.SingleGroupTimelockConfigV2(t) + MCMScfg := cldftesthelpers.SingleGroupTimelockConfig(t) MCMSQualifier := "MCMS_EVM_1" MCMScfg.Qualifier = &MCMSQualifier @@ -66,7 +68,7 @@ func TestConfirmAggregator(t *testing.T) { ProxyAddress: common.HexToAddress(proxyAddress), NewAggregatorAddress: common.HexToAddress("0x123"), }), - runtime.ChangesetTask(cldf.CreateLegacyChangeSet(commonChangesets.DeployMCMSWithTimelockV2), map[uint64]commonTypes.MCMSWithTimelockConfigV2{ + runtime.ChangesetTask(cldf.CreateLegacyChangeSet(commonChangesets.DeployMCMSWithTimelockV2), map[uint64]cldfproposalutils.MCMSWithTimelockConfig{ selector: MCMScfg, }), ) diff --git a/deployment/data-feeds/changeset/new_feed_with_proxy_test.go b/deployment/data-feeds/changeset/new_feed_with_proxy_test.go index feaaecfaae5..a9bfc7c1e1e 100644 --- a/deployment/data-feeds/changeset/new_feed_with_proxy_test.go +++ b/deployment/data-feeds/changeset/new_feed_with_proxy_test.go @@ -8,6 +8,8 @@ import ( chain_selectors "github.com/smartcontractkit/chain-selectors" "github.com/stretchr/testify/require" + cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils" + "github.com/smartcontractkit/chainlink-common/pkg/logger" cache "github.com/smartcontractkit/chainlink-evm/gethwrappers/data-feeds/generated/data_feeds_cache" @@ -18,9 +20,9 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" cldftesthelpers "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils/testhelpers" + commonChangesets "github.com/smartcontractkit/chainlink/deployment/common/changeset" "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" - commonTypes "github.com/smartcontractkit/chainlink/deployment/common/types" "github.com/smartcontractkit/chainlink/deployment/data-feeds/changeset" "github.com/smartcontractkit/chainlink/deployment/data-feeds/changeset/types" ) @@ -35,7 +37,7 @@ func TestNewFeedWithProxy(t *testing.T) { )) require.NoError(t, err) - MCMScfg := proposalutils.SingleGroupTimelockConfigV2(t) + MCMScfg := cldftesthelpers.SingleGroupTimelockConfig(t) MCMSQualifier := "MCMS_EVM_1" MCMScfg.Qualifier = &MCMSQualifier @@ -44,7 +46,7 @@ func TestNewFeedWithProxy(t *testing.T) { ChainsToDeploy: []uint64{selector}, Labels: []string{"data-feeds"}, }), - runtime.ChangesetTask(cldf.CreateLegacyChangeSet(commonChangesets.DeployMCMSWithTimelockV2), map[uint64]commonTypes.MCMSWithTimelockConfigV2{ + runtime.ChangesetTask(cldf.CreateLegacyChangeSet(commonChangesets.DeployMCMSWithTimelockV2), map[uint64]cldfproposalutils.MCMSWithTimelockConfig{ selector: MCMScfg, }), ) diff --git a/deployment/data-feeds/changeset/propose_aggregator_test.go b/deployment/data-feeds/changeset/propose_aggregator_test.go index 0bd1a9a8517..714f8bf8a80 100644 --- a/deployment/data-feeds/changeset/propose_aggregator_test.go +++ b/deployment/data-feeds/changeset/propose_aggregator_test.go @@ -8,6 +8,8 @@ import ( chain_selectors "github.com/smartcontractkit/chain-selectors" "github.com/stretchr/testify/require" + cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils" + "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-deployments-framework/datastore" @@ -16,9 +18,9 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" cldftesthelpers "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils/testhelpers" + commonChangesets "github.com/smartcontractkit/chainlink/deployment/common/changeset" "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" - commonTypes "github.com/smartcontractkit/chainlink/deployment/common/types" "github.com/smartcontractkit/chainlink/deployment/data-feeds/changeset" "github.com/smartcontractkit/chainlink/deployment/data-feeds/changeset/types" ) @@ -50,7 +52,7 @@ func TestProposeAggregator(t *testing.T) { require.Len(t, records, 1) proxyAddress := records[0].Address - MCMScfg := proposalutils.SingleGroupTimelockConfigV2(t) + MCMScfg := cldftesthelpers.SingleGroupTimelockConfig(t) MCMSQualifier := "MCMS_EVM_1" MCMScfg.Qualifier = &MCMSQualifier @@ -60,7 +62,7 @@ func TestProposeAggregator(t *testing.T) { ProxyAddress: common.HexToAddress(proxyAddress), NewAggregatorAddress: common.HexToAddress("0x123"), }), - runtime.ChangesetTask(cldf.CreateLegacyChangeSet(commonChangesets.DeployMCMSWithTimelockV2), map[uint64]commonTypes.MCMSWithTimelockConfigV2{ + runtime.ChangesetTask(cldf.CreateLegacyChangeSet(commonChangesets.DeployMCMSWithTimelockV2), map[uint64]cldfproposalutils.MCMSWithTimelockConfig{ selector: MCMScfg, }), ) diff --git a/deployment/data-feeds/changeset/remove_dataid_proxy_mapping_test.go b/deployment/data-feeds/changeset/remove_dataid_proxy_mapping_test.go index b33bb2c41e3..88ee9c7e1bd 100644 --- a/deployment/data-feeds/changeset/remove_dataid_proxy_mapping_test.go +++ b/deployment/data-feeds/changeset/remove_dataid_proxy_mapping_test.go @@ -8,6 +8,8 @@ import ( chain_selectors "github.com/smartcontractkit/chain-selectors" "github.com/stretchr/testify/require" + cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils" + "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-deployments-framework/datastore" @@ -16,9 +18,9 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" cldftesthelpers "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils/testhelpers" + commonChangesets "github.com/smartcontractkit/chainlink/deployment/common/changeset" "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" - commonTypes "github.com/smartcontractkit/chainlink/deployment/common/types" "github.com/smartcontractkit/chainlink/deployment/data-feeds/changeset" "github.com/smartcontractkit/chainlink/deployment/data-feeds/changeset/types" ) @@ -33,7 +35,7 @@ func TestRemoveFeedProxyMapping(t *testing.T) { )) require.NoError(t, err) - MCMScfg := proposalutils.SingleGroupTimelockConfigV2(t) + MCMScfg := cldftesthelpers.SingleGroupTimelockConfig(t) MCMSQualifier := "MCMS_EVM_1" MCMScfg.Qualifier = &MCMSQualifier @@ -42,7 +44,7 @@ func TestRemoveFeedProxyMapping(t *testing.T) { ChainsToDeploy: []uint64{selector}, Labels: []string{"data-feeds"}, }), - runtime.ChangesetTask(cldf.CreateLegacyChangeSet(commonChangesets.DeployMCMSWithTimelockV2), map[uint64]commonTypes.MCMSWithTimelockConfigV2{ + runtime.ChangesetTask(cldf.CreateLegacyChangeSet(commonChangesets.DeployMCMSWithTimelockV2), map[uint64]cldfproposalutils.MCMSWithTimelockConfig{ selector: MCMScfg, }), ) diff --git a/deployment/data-feeds/changeset/remove_feed_config_test.go b/deployment/data-feeds/changeset/remove_feed_config_test.go index 50adef13add..a9ca9abd41b 100644 --- a/deployment/data-feeds/changeset/remove_feed_config_test.go +++ b/deployment/data-feeds/changeset/remove_feed_config_test.go @@ -8,6 +8,8 @@ import ( chain_selectors "github.com/smartcontractkit/chain-selectors" "github.com/stretchr/testify/require" + cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils" + "github.com/smartcontractkit/chainlink-common/pkg/logger" cache "github.com/smartcontractkit/chainlink-evm/gethwrappers/data-feeds/generated/data_feeds_cache" @@ -18,9 +20,9 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" cldftesthelpers "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils/testhelpers" + commonChangesets "github.com/smartcontractkit/chainlink/deployment/common/changeset" "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" - commonTypes "github.com/smartcontractkit/chainlink/deployment/common/types" "github.com/smartcontractkit/chainlink/deployment/data-feeds/changeset" "github.com/smartcontractkit/chainlink/deployment/data-feeds/changeset/types" ) @@ -35,7 +37,7 @@ func TestRemoveFeedConfig(t *testing.T) { )) require.NoError(t, err) - MCMScfg := proposalutils.SingleGroupTimelockConfigV2(t) + MCMScfg := cldftesthelpers.SingleGroupTimelockConfig(t) MCMSQualifier := "MCMS_EVM_1" MCMScfg.Qualifier = &MCMSQualifier @@ -44,7 +46,7 @@ func TestRemoveFeedConfig(t *testing.T) { ChainsToDeploy: []uint64{selector}, Labels: []string{"data-feeds"}, }), - runtime.ChangesetTask(cldf.CreateLegacyChangeSet(commonChangesets.DeployMCMSWithTimelockV2), map[uint64]commonTypes.MCMSWithTimelockConfigV2{ + runtime.ChangesetTask(cldf.CreateLegacyChangeSet(commonChangesets.DeployMCMSWithTimelockV2), map[uint64]cldfproposalutils.MCMSWithTimelockConfig{ selector: MCMScfg, }), ) diff --git a/deployment/data-feeds/changeset/remove_feed_test.go b/deployment/data-feeds/changeset/remove_feed_test.go index f09fe0c4207..b92d0b2029a 100644 --- a/deployment/data-feeds/changeset/remove_feed_test.go +++ b/deployment/data-feeds/changeset/remove_feed_test.go @@ -8,6 +8,8 @@ import ( chain_selectors "github.com/smartcontractkit/chain-selectors" "github.com/stretchr/testify/require" + cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils" + "github.com/smartcontractkit/chainlink-common/pkg/logger" cache "github.com/smartcontractkit/chainlink-evm/gethwrappers/data-feeds/generated/data_feeds_cache" @@ -18,9 +20,9 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" cldftesthelpers "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils/testhelpers" + commonChangesets "github.com/smartcontractkit/chainlink/deployment/common/changeset" "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" - commonTypes "github.com/smartcontractkit/chainlink/deployment/common/types" "github.com/smartcontractkit/chainlink/deployment/data-feeds/changeset" "github.com/smartcontractkit/chainlink/deployment/data-feeds/changeset/types" ) @@ -35,7 +37,7 @@ func TestRemoveFeed(t *testing.T) { )) require.NoError(t, err) - MCMScfg := proposalutils.SingleGroupTimelockConfigV2(t) + MCMScfg := cldftesthelpers.SingleGroupTimelockConfig(t) MCMSQualifier := "MCMS_EVM_1" MCMScfg.Qualifier = &MCMSQualifier @@ -44,7 +46,7 @@ func TestRemoveFeed(t *testing.T) { ChainsToDeploy: []uint64{selector}, Labels: []string{"data-feeds"}, }), - runtime.ChangesetTask(cldf.CreateLegacyChangeSet(commonChangesets.DeployMCMSWithTimelockV2), map[uint64]commonTypes.MCMSWithTimelockConfigV2{ + runtime.ChangesetTask(cldf.CreateLegacyChangeSet(commonChangesets.DeployMCMSWithTimelockV2), map[uint64]cldfproposalutils.MCMSWithTimelockConfig{ selector: MCMScfg, }), ) diff --git a/deployment/data-feeds/changeset/set_bundle_feed_config_test.go b/deployment/data-feeds/changeset/set_bundle_feed_config_test.go index cbdff273f7d..53e9066decd 100644 --- a/deployment/data-feeds/changeset/set_bundle_feed_config_test.go +++ b/deployment/data-feeds/changeset/set_bundle_feed_config_test.go @@ -8,6 +8,8 @@ import ( chain_selectors "github.com/smartcontractkit/chain-selectors" "github.com/stretchr/testify/require" + cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils" + "github.com/smartcontractkit/chainlink-common/pkg/logger" cache "github.com/smartcontractkit/chainlink-evm/gethwrappers/data-feeds/generated/data_feeds_cache" @@ -18,9 +20,9 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" cldftesthelpers "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils/testhelpers" + commonChangesets "github.com/smartcontractkit/chainlink/deployment/common/changeset" "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" - commonTypes "github.com/smartcontractkit/chainlink/deployment/common/types" "github.com/smartcontractkit/chainlink/deployment/data-feeds/changeset" "github.com/smartcontractkit/chainlink/deployment/data-feeds/changeset/types" ) @@ -35,7 +37,7 @@ func TestSetBundleFeedConfig(t *testing.T) { )) require.NoError(t, err) - MCMScfg := proposalutils.SingleGroupTimelockConfigV2(t) + MCMScfg := cldftesthelpers.SingleGroupTimelockConfig(t) MCMSQualifier := "MCMS_EVM_1" MCMScfg.Qualifier = &MCMSQualifier @@ -44,7 +46,7 @@ func TestSetBundleFeedConfig(t *testing.T) { ChainsToDeploy: []uint64{selector}, Labels: []string{"data-feeds"}, }), - runtime.ChangesetTask(cldf.CreateLegacyChangeSet(commonChangesets.DeployMCMSWithTimelockV2), map[uint64]commonTypes.MCMSWithTimelockConfigV2{ + runtime.ChangesetTask(cldf.CreateLegacyChangeSet(commonChangesets.DeployMCMSWithTimelockV2), map[uint64]cldfproposalutils.MCMSWithTimelockConfig{ selector: MCMScfg, }), ) diff --git a/deployment/data-feeds/changeset/set_feed_admin_test.go b/deployment/data-feeds/changeset/set_feed_admin_test.go index c0016d0f974..ff6d136f063 100644 --- a/deployment/data-feeds/changeset/set_feed_admin_test.go +++ b/deployment/data-feeds/changeset/set_feed_admin_test.go @@ -8,6 +8,8 @@ import ( chain_selectors "github.com/smartcontractkit/chain-selectors" "github.com/stretchr/testify/require" + cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils" + "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-deployments-framework/datastore" @@ -16,9 +18,9 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" cldftesthelpers "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils/testhelpers" + commonChangesets "github.com/smartcontractkit/chainlink/deployment/common/changeset" "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" - commonTypes "github.com/smartcontractkit/chainlink/deployment/common/types" "github.com/smartcontractkit/chainlink/deployment/data-feeds/changeset" "github.com/smartcontractkit/chainlink/deployment/data-feeds/changeset/types" ) @@ -33,7 +35,7 @@ func TestSetCacheAdmin(t *testing.T) { )) require.NoError(t, err) - MCMScfg := proposalutils.SingleGroupTimelockConfigV2(t) + MCMScfg := cldftesthelpers.SingleGroupTimelockConfig(t) MCMSQualifier := "MCMS_EVM_1" MCMScfg.Qualifier = &MCMSQualifier @@ -42,7 +44,7 @@ func TestSetCacheAdmin(t *testing.T) { ChainsToDeploy: []uint64{selector}, Labels: []string{"data-feeds"}, }), - runtime.ChangesetTask(cldf.CreateLegacyChangeSet(commonChangesets.DeployMCMSWithTimelockV2), map[uint64]commonTypes.MCMSWithTimelockConfigV2{ + runtime.ChangesetTask(cldf.CreateLegacyChangeSet(commonChangesets.DeployMCMSWithTimelockV2), map[uint64]cldfproposalutils.MCMSWithTimelockConfig{ selector: MCMScfg, }), ) diff --git a/deployment/data-feeds/changeset/set_feed_config_test.go b/deployment/data-feeds/changeset/set_feed_config_test.go index 1e627dfba75..7c6cebfe025 100644 --- a/deployment/data-feeds/changeset/set_feed_config_test.go +++ b/deployment/data-feeds/changeset/set_feed_config_test.go @@ -8,6 +8,8 @@ import ( chain_selectors "github.com/smartcontractkit/chain-selectors" "github.com/stretchr/testify/require" + cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils" + "github.com/smartcontractkit/chainlink-common/pkg/logger" cache "github.com/smartcontractkit/chainlink-evm/gethwrappers/data-feeds/generated/data_feeds_cache" @@ -18,9 +20,9 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" cldftesthelpers "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils/testhelpers" + commonChangesets "github.com/smartcontractkit/chainlink/deployment/common/changeset" "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" - commonTypes "github.com/smartcontractkit/chainlink/deployment/common/types" "github.com/smartcontractkit/chainlink/deployment/data-feeds/changeset" "github.com/smartcontractkit/chainlink/deployment/data-feeds/changeset/types" ) @@ -35,7 +37,7 @@ func TestSetFeedConfig(t *testing.T) { )) require.NoError(t, err) - MCMScfg := proposalutils.SingleGroupTimelockConfigV2(t) + MCMScfg := cldftesthelpers.SingleGroupTimelockConfig(t) MCMSQualifier := "MCMS_EVM_1" MCMScfg.Qualifier = &MCMSQualifier @@ -44,7 +46,7 @@ func TestSetFeedConfig(t *testing.T) { ChainsToDeploy: []uint64{selector}, Labels: []string{"data-feeds"}, }), - runtime.ChangesetTask(cldf.CreateLegacyChangeSet(commonChangesets.DeployMCMSWithTimelockV2), map[uint64]commonTypes.MCMSWithTimelockConfigV2{ + runtime.ChangesetTask(cldf.CreateLegacyChangeSet(commonChangesets.DeployMCMSWithTimelockV2), map[uint64]cldfproposalutils.MCMSWithTimelockConfig{ selector: MCMScfg, }), ) diff --git a/deployment/data-feeds/changeset/update_data_id_proxy_test.go b/deployment/data-feeds/changeset/update_data_id_proxy_test.go index e5026d74133..1fa95f71a7e 100644 --- a/deployment/data-feeds/changeset/update_data_id_proxy_test.go +++ b/deployment/data-feeds/changeset/update_data_id_proxy_test.go @@ -8,6 +8,8 @@ import ( chain_selectors "github.com/smartcontractkit/chain-selectors" "github.com/stretchr/testify/require" + cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils" + "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-deployments-framework/datastore" @@ -16,9 +18,9 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" cldftesthelpers "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils/testhelpers" + commonChangesets "github.com/smartcontractkit/chainlink/deployment/common/changeset" "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" - commonTypes "github.com/smartcontractkit/chainlink/deployment/common/types" "github.com/smartcontractkit/chainlink/deployment/data-feeds/changeset" "github.com/smartcontractkit/chainlink/deployment/data-feeds/changeset/types" ) @@ -33,7 +35,7 @@ func TestUpdateDataIDProxyMap(t *testing.T) { )) require.NoError(t, err) - MCMScfg := proposalutils.SingleGroupTimelockConfigV2(t) + MCMScfg := cldftesthelpers.SingleGroupTimelockConfig(t) MCMSQualifier := "MCMS_EVM_1" MCMScfg.Qualifier = &MCMSQualifier @@ -42,7 +44,7 @@ func TestUpdateDataIDProxyMap(t *testing.T) { ChainsToDeploy: []uint64{selector}, Labels: []string{"data-feeds"}, }), - runtime.ChangesetTask(cldf.CreateLegacyChangeSet(commonChangesets.DeployMCMSWithTimelockV2), map[uint64]commonTypes.MCMSWithTimelockConfigV2{ + runtime.ChangesetTask(cldf.CreateLegacyChangeSet(commonChangesets.DeployMCMSWithTimelockV2), map[uint64]cldfproposalutils.MCMSWithTimelockConfig{ selector: MCMScfg, }), ) diff --git a/deployment/environment/crib/ccip_deployer.go b/deployment/environment/crib/ccip_deployer.go index 9e2a30b5dd9..b023c8ecca7 100644 --- a/deployment/environment/crib/ccip_deployer.go +++ b/deployment/environment/crib/ccip_deployer.go @@ -15,6 +15,8 @@ import ( "github.com/rs/zerolog" xerrgroup "golang.org/x/sync/errgroup" + cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils" + chainselectors "github.com/smartcontractkit/chain-selectors" "github.com/smartcontractkit/chainlink-ccip/chainconfig" @@ -28,6 +30,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/logger" cldf_chain "github.com/smartcontractkit/chainlink-deployments-framework/chain" cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" + "github.com/smartcontractkit/chainlink/v2/core/services/relay" "github.com/smartcontractkit/chainlink/deployment/ccip/changeset" @@ -55,7 +58,6 @@ import ( "github.com/smartcontractkit/chainlink/deployment" commonchangeset "github.com/smartcontractkit/chainlink/deployment/common/changeset" - commontypes "github.com/smartcontractkit/chainlink/deployment/common/types" "github.com/smartcontractkit/chainlink/deployment/environment/devenv" ) @@ -97,13 +99,13 @@ func DeployHomeChainContracts(ctx context.Context, lggr logger.Logger, envConfig } p2pIDs := nodes.NonBootstraps().PeerIDs() - cfg := make(map[uint64]commontypes.MCMSWithTimelockConfigV2) + cfg := make(map[uint64]cldfproposalutils.MCMSWithTimelockConfig) for _, chain := range e.BlockChains.ListChainSelectors(cldf_chain.WithFamily(chainselectors.FamilyEVM)) { mcmsConfig, err := mcmstypes.NewConfig(1, []common.Address{evmChains[chain].DeployerKey.From}, []mcmstypes.Config{}) if err != nil { return deployment.CapabilityRegistryConfig{}, e.ExistingAddresses, fmt.Errorf("failed to create mcms config: %w", err) } - cfg[chain] = commontypes.MCMSWithTimelockConfigV2{ + cfg[chain] = cldfproposalutils.MCMSWithTimelockConfig{ Canceller: mcmsConfig, Bypasser: mcmsConfig, Proposer: mcmsConfig, diff --git a/deployment/keystone/changeset/accept_ownership_test.go b/deployment/keystone/changeset/accept_ownership_test.go index 18ed87d3fe1..1ec4b1a18a2 100644 --- a/deployment/keystone/changeset/accept_ownership_test.go +++ b/deployment/keystone/changeset/accept_ownership_test.go @@ -7,14 +7,15 @@ import ( chain_selectors "github.com/smartcontractkit/chain-selectors" "github.com/stretchr/testify/require" + cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils" + cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" cldftesthelpers "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils/testhelpers" + commonchangeset "github.com/smartcontractkit/chainlink/deployment/common/changeset" - "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" - "github.com/smartcontractkit/chainlink/deployment/common/types" "github.com/smartcontractkit/chainlink/deployment/keystone/changeset" ) @@ -38,8 +39,8 @@ func TestAcceptAllOwnership(t *testing.T) { runtime.ChangesetTask(cldf.CreateLegacyChangeSet(changeset.DeployFeedsConsumer), &changeset.DeployFeedsConsumerRequest{ ChainSelector: registrySel, }), - runtime.ChangesetTask(cldf.CreateLegacyChangeSet(commonchangeset.DeployMCMSWithTimelockV2), map[uint64]types.MCMSWithTimelockConfigV2{ - registrySel: proposalutils.SingleGroupTimelockConfigV2(t), + runtime.ChangesetTask(cldf.CreateLegacyChangeSet(commonchangeset.DeployMCMSWithTimelockV2), map[uint64]cldfproposalutils.MCMSWithTimelockConfig{ + registrySel: cldftesthelpers.SingleGroupTimelockConfig(t), }), ) require.NoError(t, err) diff --git a/deployment/keystone/changeset/test/env_setup.go b/deployment/keystone/changeset/test/env_setup.go index 1c489dc3ec3..82bab6e89ed 100644 --- a/deployment/keystone/changeset/test/env_setup.go +++ b/deployment/keystone/changeset/test/env_setup.go @@ -10,6 +10,9 @@ import ( "github.com/stretchr/testify/require" "go.uber.org/zap/zapcore" + cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils" + cldftesthelpers "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils/testhelpers" + "github.com/smartcontractkit/chainlink-common/pkg/capabilities/pb" "github.com/smartcontractkit/chainlink-common/pkg/logger" @@ -24,8 +27,6 @@ import ( "github.com/smartcontractkit/chainlink/deployment" commonchangeset "github.com/smartcontractkit/chainlink/deployment/common/changeset" - "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" - commontypes "github.com/smartcontractkit/chainlink/deployment/common/types" "github.com/smartcontractkit/chainlink/deployment/cre/contracts" "github.com/smartcontractkit/chainlink/deployment/cre/ocr3" envtest "github.com/smartcontractkit/chainlink/deployment/environment/test" @@ -374,10 +375,10 @@ func setupTestEnv(t *testing.T, c EnvWrapperConfig) EnvWrapper { if c.UseMCMS { // deploy, configure and xfer ownership of MCMS on all chains - timelockCfgs := make(map[uint64]commontypes.MCMSWithTimelockConfigV2) + timelockCfgs := make(map[uint64]cldfproposalutils.MCMSWithTimelockConfig) for sel := range evmChains { t.Logf("Enabling MCMS on chain %d", sel) - timelockCfgs[sel] = proposalutils.SingleGroupTimelockConfigV2(t) + timelockCfgs[sel] = cldftesthelpers.SingleGroupTimelockConfig(t) } env, err = commonchangeset.Apply(t, env, commonchangeset.Configure( diff --git a/deployment/vault/changeset/batch_native_transfer_test.go b/deployment/vault/changeset/batch_native_transfer_test.go index 9059fd84bff..62b63c3d548 100644 --- a/deployment/vault/changeset/batch_native_transfer_test.go +++ b/deployment/vault/changeset/batch_native_transfer_test.go @@ -9,12 +9,15 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/require" + cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils" + cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" cldftesthelpers "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils/testhelpers" "github.com/smartcontractkit/chainlink-evm/pkg/testutils" + commonchangeset "github.com/smartcontractkit/chainlink/deployment/common/changeset" "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" commontypes "github.com/smartcontractkit/chainlink/deployment/common/types" @@ -232,10 +235,10 @@ func TestBatchNativeTransferIntegration(t *testing.T) { func setupMCMSInfrastructure(t *testing.T, rt *runtime.Runtime, chainSelectors []uint64) { t.Log("Setting up MCMS infrastructure with real deployment") - timelockCfgs := make(map[uint64]commontypes.MCMSWithTimelockConfigV2) + timelockCfgs := make(map[uint64]cldfproposalutils.MCMSWithTimelockConfig) for _, sel := range chainSelectors { t.Logf("Enabling MCMS on chain %d", sel) - timelockCfgs[sel] = proposalutils.SingleGroupTimelockConfigV2(t) + timelockCfgs[sel] = cldftesthelpers.SingleGroupTimelockConfig(t) } err := rt.Exec( diff --git a/deployment/vault/view/view_test.go b/deployment/vault/view/view_test.go index 51410e9488a..cfc1e0d4733 100644 --- a/deployment/vault/view/view_test.go +++ b/deployment/vault/view/view_test.go @@ -5,6 +5,8 @@ import ( "github.com/ethereum/go-ethereum/common" chainselectors "github.com/smartcontractkit/chain-selectors" + cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils" + cldftesthelpers "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils/testhelpers" "github.com/stretchr/testify/require" cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" @@ -12,8 +14,6 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" commonchangeset "github.com/smartcontractkit/chainlink/deployment/common/changeset" - "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" - commontypes "github.com/smartcontractkit/chainlink/deployment/common/types" "github.com/smartcontractkit/chainlink/deployment/vault/changeset" "github.com/smartcontractkit/chainlink/deployment/vault/changeset/types" ) @@ -106,9 +106,9 @@ func TestGenerateVaultView_WithMCMSAndWhitelist(t *testing.T) { func setupMCMS(t *testing.T, rt *runtime.Runtime, chainSelectors []uint64) { t.Helper() - timelockCfgs := make(map[uint64]commontypes.MCMSWithTimelockConfigV2) + timelockCfgs := make(map[uint64]cldfproposalutils.MCMSWithTimelockConfig) for _, sel := range chainSelectors { - timelockCfgs[sel] = proposalutils.SingleGroupTimelockConfigV2(t) + timelockCfgs[sel] = cldftesthelpers.SingleGroupTimelockConfig(t) } err := rt.Exec( diff --git a/integration-tests/smoke/ccip/ccip_add_chain_e2e_test.go b/integration-tests/smoke/ccip/ccip_add_chain_e2e_test.go index ea6e7b23981..7df04387b11 100644 --- a/integration-tests/smoke/ccip/ccip_add_chain_e2e_test.go +++ b/integration-tests/smoke/ccip/ccip_add_chain_e2e_test.go @@ -10,6 +10,10 @@ import ( mcmstypes "github.com/smartcontractkit/mcms/types" "github.com/stretchr/testify/require" + cldftesthelpers "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils/testhelpers" + + "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" + chain_selectors "github.com/smartcontractkit/chain-selectors" "github.com/smartcontractkit/chainlink-ccip/chainconfig" @@ -28,7 +32,7 @@ import ( "github.com/smartcontractkit/chainlink/deployment/ccip/shared" "github.com/smartcontractkit/chainlink/deployment/ccip/shared/stateview" commonchangeset "github.com/smartcontractkit/chainlink/deployment/common/changeset" - "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" + testsetups "github.com/smartcontractkit/chainlink/integration-tests/testsetups/ccip" ) @@ -159,7 +163,7 @@ func SetupNewChain( ) cldf.Environment { nodeInfo, err := deployment.NodeInfo(env.NodeIDs, env.Offchain) require.NoError(t, err, "must get node info") - mcmsDeploymentCfg := proposalutils.SingleGroupTimelockConfigV2(t) + mcmsDeploymentCfg := cldftesthelpers.SingleGroupTimelockConfig(t) tokenConfig := shared.NewTestTokenConfig(state.MustGetEVMChainState(feedChain).USDFeeds) // Build remote chain configurations diff --git a/integration-tests/smoke/ccip/ccip_cs_update_rmn_config_test.go b/integration-tests/smoke/ccip/ccip_cs_update_rmn_config_test.go index 4e2e89bf622..3e83524f384 100644 --- a/integration-tests/smoke/ccip/ccip_cs_update_rmn_config_test.go +++ b/integration-tests/smoke/ccip/ccip_cs_update_rmn_config_test.go @@ -6,6 +6,8 @@ import ( "time" "github.com/ethereum/go-ethereum/common" + cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils" + cldftesthelpers "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils/testhelpers" "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_0/rmn_home" @@ -25,7 +27,6 @@ import ( "github.com/smartcontractkit/chainlink/deployment/ccip/shared/stateview" commonchangeset "github.com/smartcontractkit/chainlink/deployment/common/changeset" "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" - commontypes "github.com/smartcontractkit/chainlink/deployment/common/types" ) var ( @@ -345,11 +346,11 @@ func TestSetRMNRemoteOnRMNProxy(t *testing.T) { t.Parallel() e, _ := testhelpers.NewMemoryEnvironment(t, testhelpers.WithNoJobsAndContracts()) allChains := e.Env.BlockChains.ListChainSelectors(cldf_chain.WithFamily(chainselectors.FamilyEVM)) - mcmsCfg := make(map[uint64]commontypes.MCMSWithTimelockConfigV2) + mcmsCfg := make(map[uint64]cldfproposalutils.MCMSWithTimelockConfig) var err error prereqCfgs := make([]changeset.DeployPrerequisiteConfigPerChain, 0) for _, c := range e.Env.BlockChains.ListChainSelectors(cldf_chain.WithFamily(chainselectors.FamilyEVM)) { - mcmsCfg[c] = proposalutils.SingleGroupTimelockConfigV2(t) + mcmsCfg[c] = cldftesthelpers.SingleGroupTimelockConfig(t) prereqCfgs = append(prereqCfgs, changeset.DeployPrerequisiteConfigPerChain{ ChainSelector: c, })