Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ import (
"github.com/aptos-labs/aptos-go-sdk"

cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment"
cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils"
"github.com/smartcontractkit/chainlink/deployment/ccip/shared"
"github.com/smartcontractkit/chainlink/deployment/common/proposalutils"
"github.com/smartcontractkit/chainlink/deployment/common/types"
)

// DeployAptosChainConfig is a configuration for deploying CCIP Package for Aptos chains
type DeployAptosChainConfig struct {
MCMSDeployConfigPerChain map[uint64]types.MCMSWithTimelockConfigV2
MCMSTimelockConfigPerChain map[uint64]proposalutils.TimelockConfig
MCMSTimelockConfigPerChain map[uint64]cldfproposalutils.TimelockConfig
ContractParamsPerChain map[uint64]ChainContractParams
}

Expand Down
7 changes: 3 additions & 4 deletions deployment/ccip/changeset/aptos/config/deploy_curse_mcms.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +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"

"github.com/smartcontractkit/chainlink/deployment/common/proposalutils"
cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment"
cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils"
)

// DeployCurseMCMSConfig holds per-chain configuration for deploying and
// configuring a CurseMCMS contract on Aptos chains.
type DeployCurseMCMSConfig struct {
CurseMCMSConfigPerChain map[uint64]cldfproposalutils.MCMSWithTimelockConfig
MCMSTimelockConfigPerChain map[uint64]proposalutils.TimelockConfig
MCMSTimelockConfigPerChain map[uint64]cldfproposalutils.TimelockConfig
}

func (c DeployCurseMCMSConfig) Validate() error {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import (
"errors"

"github.com/aptos-labs/aptos-go-sdk"

"github.com/smartcontractkit/chainlink/deployment/common/proposalutils"
cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils"
)

// DeployRegulatedTokenConfig drives the regulated token publish + initialize +
Expand All @@ -19,7 +18,7 @@ type DeployRegulatedTokenConfig struct {
TokenMint *TokenMint
// RegistrarPreregister is passed to DeployMCMSRegistrarToExistingObject (default true).
RegistrarPreregister *bool
MCMSConfig *proposalutils.TimelockConfig
MCMSConfig *cldfproposalutils.TimelockConfig
}

func (c DeployRegulatedTokenConfig) Validate() error {
Expand Down
4 changes: 2 additions & 2 deletions deployment/ccip/changeset/aptos/config/dynamic.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package config

import (
cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils"
"github.com/smartcontractkit/chainlink-deployments-framework/operations"
"github.com/smartcontractkit/chainlink/deployment/common/proposalutils"
)

type DynamicConfig struct {
Defs []operations.Definition
Inputs []any // Each element should be the corresponding input type for its operation
ChainSelector uint64
Description string
MCMSConfig *proposalutils.TimelockConfig
MCMSConfig *cldfproposalutils.TimelockConfig
}
7 changes: 4 additions & 3 deletions deployment/ccip/changeset/aptos/config/lane.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ import (
"github.com/ethereum/go-ethereum/common"
chainsel "github.com/smartcontractkit/chain-selectors"

cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils"

"github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_3/fee_quoter"
"github.com/smartcontractkit/chainlink/deployment/ccip/changeset/v1_6"
"github.com/smartcontractkit/chainlink/deployment/common/proposalutils"
)

type LaneConfig struct {
Expand All @@ -22,9 +23,9 @@ type LaneConfig struct {
// Lanes accept different chain families
type UpdateAptosLanesConfig struct {
// EVMMCMSConfig defines the MCMS configuration for EVM chains.
EVMMCMSConfig *proposalutils.TimelockConfig
EVMMCMSConfig *cldfproposalutils.TimelockConfig
// MCMSConfig defines the MCMS configuration for Aptos chains.
AptosMCMSConfig *proposalutils.TimelockConfig
AptosMCMSConfig *cldfproposalutils.TimelockConfig
// Lanes describes the lanes that we want to create.
Lanes []LaneConfig
// TestRouter indicates if we want to enable these lanes on the test router.
Expand Down
14 changes: 7 additions & 7 deletions deployment/ccip/changeset/aptos/config/lane_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (

aptos_fee_quoter "github.com/smartcontractkit/chainlink-aptos/bindings/ccip/fee_quoter"
"github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_3/fee_quoter"
cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils"
"github.com/smartcontractkit/chainlink/deployment/ccip/changeset/v1_6"
"github.com/smartcontractkit/chainlink/deployment/common/proposalutils"
"github.com/smartcontractkit/chainlink/v2/core/capabilities/ccip/ccipevm"
)

Expand All @@ -25,7 +25,7 @@ func TestToEVMUpdateLanesConfig(t *testing.T) {
{
name: "EVM <> Aptos Biderectional Lane",
input: UpdateAptosLanesConfig{
EVMMCMSConfig: &proposalutils.TimelockConfig{},
EVMMCMSConfig: &cldfproposalutils.TimelockConfig{},
Lanes: []LaneConfig{
{
Source: getEVMDef(),
Expand All @@ -42,7 +42,7 @@ func TestToEVMUpdateLanesConfig(t *testing.T) {
},
expected: v1_6.UpdateBidirectionalLanesChangesetConfigs{
UpdateFeeQuoterDestsConfig: v1_6.UpdateFeeQuoterDestsConfig{
MCMS: &proposalutils.TimelockConfig{},
MCMS: &cldfproposalutils.TimelockConfig{},
UpdatesByChain: map[uint64]map[uint64]fee_quoter.FeeQuoterDestChainConfig{
1881: {
4457093679053095497: fee_quoter.FeeQuoterDestChainConfig{
Expand Down Expand Up @@ -70,7 +70,7 @@ func TestToEVMUpdateLanesConfig(t *testing.T) {
},
},
UpdateFeeQuoterPricesConfig: v1_6.UpdateFeeQuoterPricesConfig{
MCMS: &proposalutils.TimelockConfig{},
MCMS: &cldfproposalutils.TimelockConfig{},
PricesByChain: map[uint64]v1_6.FeeQuoterPriceUpdatePerSource{
1881: {
GasPrices: map[uint64]*big.Int{
Expand All @@ -80,7 +80,7 @@ func TestToEVMUpdateLanesConfig(t *testing.T) {
},
},
UpdateOnRampDestsConfig: v1_6.UpdateOnRampDestsConfig{
MCMS: &proposalutils.TimelockConfig{},
MCMS: &cldfproposalutils.TimelockConfig{},
UpdatesByChain: map[uint64]map[uint64]v1_6.OnRampDestinationUpdate{
1881: {
4457093679053095497: v1_6.OnRampDestinationUpdate{
Expand All @@ -92,7 +92,7 @@ func TestToEVMUpdateLanesConfig(t *testing.T) {
},
},
UpdateOffRampSourcesConfig: v1_6.UpdateOffRampSourcesConfig{
MCMS: &proposalutils.TimelockConfig{},
MCMS: &cldfproposalutils.TimelockConfig{},
UpdatesByChain: map[uint64]map[uint64]v1_6.OffRampSourceUpdate{
1881: {
4457093679053095497: v1_6.OffRampSourceUpdate{
Expand All @@ -105,7 +105,7 @@ func TestToEVMUpdateLanesConfig(t *testing.T) {
},
UpdateRouterRampsConfig: v1_6.UpdateRouterRampsConfig{
TestRouter: false,
MCMS: &proposalutils.TimelockConfig{},
MCMS: &cldfproposalutils.TimelockConfig{},
UpdatesByChain: map[uint64]v1_6.RouterUpdates{
1881: {
OnRampUpdates: map[uint64]bool{
Expand Down
4 changes: 2 additions & 2 deletions deployment/ccip/changeset/aptos/config/migrate_onramp.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ package config
import (
"github.com/aptos-labs/aptos-go-sdk"

"github.com/smartcontractkit/chainlink/deployment/common/proposalutils"
cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils"
)

type MigrateOnRampDestChainConfigsToV2Config struct {
ChainSelector uint64
DestChainSelectors []uint64
RouterModuleAddresses []aptos.AccountAddress
MCMS *proposalutils.TimelockConfig
MCMS *cldfproposalutils.TimelockConfig
}
16 changes: 8 additions & 8 deletions deployment/ccip/changeset/aptos/config/token.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"github.com/aptos-labs/aptos-go-sdk"

"github.com/smartcontractkit/chainlink-deployments-framework/deployment"
cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils"
"github.com/smartcontractkit/chainlink/deployment/ccip/shared"
"github.com/smartcontractkit/chainlink/deployment/common/proposalutils"
)

type TokenParams struct {
Expand Down Expand Up @@ -44,13 +44,13 @@ type TokenMint struct {
type DeployTokenFaucetInput struct {
ChainSelector uint64
TokenCodeObjectAddress aptos.AccountAddress
MCMSConfig *proposalutils.TimelockConfig
MCMSConfig *cldfproposalutils.TimelockConfig
}

type MintTokenInput struct {
ChainSelector uint64
TokenCodeObjectAddress aptos.AccountAddress
MCMSConfig *proposalutils.TimelockConfig
MCMSConfig *cldfproposalutils.TimelockConfig
TokenMint
}

Expand All @@ -67,7 +67,7 @@ type TokenTransferInput struct {
type TransferTokenOwnershipInput struct {
ChainSelector uint64
Transfers []TokenTransferInput
MCMSConfig *proposalutils.TimelockConfig
MCMSConfig *cldfproposalutils.TimelockConfig
}

type TokenAcceptInput struct {
Expand All @@ -78,23 +78,23 @@ type TokenAcceptInput struct {
type AcceptTokenOwnershipInput struct {
ChainSelector uint64
Accepts []TokenAcceptInput
MCMSConfig *proposalutils.TimelockConfig
MCMSConfig *cldfproposalutils.TimelockConfig
}

type ExecuteTokenOwnershipTransferInput struct {
ChainSelector uint64
Transfers []TokenTransferInput
MCMSConfig *proposalutils.TimelockConfig
MCMSConfig *cldfproposalutils.TimelockConfig
}

type TransferTokenAdminInput struct {
ChainSelector uint64
Transfers []TokenTransferInput
MCMSConfig *proposalutils.TimelockConfig
MCMSConfig *cldfproposalutils.TimelockConfig
}

type AcceptTokenAdminInput struct {
ChainSelector uint64
Accepts []TokenAcceptInput
MCMSConfig *proposalutils.TimelockConfig
MCMSConfig *cldfproposalutils.TimelockConfig
}
10 changes: 5 additions & 5 deletions deployment/ccip/changeset/aptos/config/token_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

fee_quoter "github.com/smartcontractkit/chainlink-aptos/bindings/ccip/fee_quoter"
cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment"
"github.com/smartcontractkit/chainlink/deployment/common/proposalutils"
cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils"
)

type AddTokenPoolConfig struct {
Expand All @@ -21,7 +21,7 @@ type AddTokenPoolConfig struct {
TokenTransferFeeByRemoteChainConfig map[uint64]fee_quoter.TokenTransferFeeConfig
EVMRemoteConfigs map[uint64]EVMRemoteConfig
TokenParams TokenParams
MCMSConfig *proposalutils.TimelockConfig
MCMSConfig *cldfproposalutils.TimelockConfig
TokenMint *TokenMint
}

Expand Down Expand Up @@ -66,7 +66,7 @@ type TokenPoolTransfer struct {
type TransferTokenPoolOwnershipInput struct {
ChainSelector uint64
Transfers []TokenPoolTransfer
MCMSConfig *proposalutils.TimelockConfig
MCMSConfig *cldfproposalutils.TimelockConfig
}

type TokenPoolAccept struct {
Expand All @@ -77,11 +77,11 @@ type TokenPoolAccept struct {
type AcceptTokenPoolOwnershipInput struct {
ChainSelector uint64
Accepts []TokenPoolAccept
MCMSConfig *proposalutils.TimelockConfig
MCMSConfig *cldfproposalutils.TimelockConfig
}

type ExecuteTokenPoolOwnershipTransferInput struct {
ChainSelector uint64
Transfers []TokenPoolTransfer
MCMSConfig *proposalutils.TimelockConfig
MCMSConfig *cldfproposalutils.TimelockConfig
}
4 changes: 2 additions & 2 deletions deployment/ccip/changeset/aptos/config/upgrade.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package config

import "github.com/smartcontractkit/chainlink/deployment/common/proposalutils"
import cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils"

type UpgradeAptosChainConfig struct {
ChainSelector uint64
UpgradeCCIP bool
UpgradeOffRamp bool
UpgradeOnRamp bool
UpgradeRouter bool
MCMS *proposalutils.TimelockConfig
MCMS *cldfproposalutils.TimelockConfig
}
5 changes: 3 additions & 2 deletions deployment/ccip/changeset/aptos/cs_add_token_pool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@ import (
"github.com/smartcontractkit/chainlink-aptos/bindings/ccip_token_pools/managed_token_pool"
mcmsbind "github.com/smartcontractkit/chainlink-aptos/bindings/mcms"
cldf_chain "github.com/smartcontractkit/chainlink-deployments-framework/chain"
cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils"

aptoscs "github.com/smartcontractkit/chainlink/deployment/ccip/changeset/aptos"
"github.com/smartcontractkit/chainlink/deployment/ccip/changeset/aptos/config"
"github.com/smartcontractkit/chainlink/deployment/ccip/changeset/testhelpers"
"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"
)

var testTokenTransferFeeConfig = fee_quoter.TokenTransferFeeConfig{
Expand Down Expand Up @@ -59,7 +60,7 @@ func TestAddTokenPool_Apply(t *testing.T) {

// Configure token pool settings
cfg := config.AddTokenPoolConfig{
MCMSConfig: &proposalutils.TimelockConfig{
MCMSConfig: &cldfproposalutils.TimelockConfig{
MinDelay: time.Duration(1) * time.Second,
MCMSAction: mcmstypes.TimelockActionSchedule,
OverrideRoot: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ import (
"github.com/smartcontractkit/chainlink-deployments-framework/chain"
aptoschain "github.com/smartcontractkit/chainlink-deployments-framework/chain/aptos"
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-deployments-framework/engine/test/environment"
"github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime"

"github.com/smartcontractkit/chainlink/deployment/ccip/changeset/aptos/config"
"github.com/smartcontractkit/chainlink/deployment/ccip/shared"
aptosstate "github.com/smartcontractkit/chainlink/deployment/ccip/shared/stateview/aptos"
"github.com/smartcontractkit/chainlink/deployment/common/proposalutils"
"github.com/smartcontractkit/chainlink/deployment/common/types"
)

Expand Down Expand Up @@ -267,7 +267,7 @@ func TestDeployAptosChain_Apply(t *testing.T) {
TimelockMinDelay: big.NewInt(1),
},
},
MCMSTimelockConfigPerChain: map[uint64]proposalutils.TimelockConfig{
MCMSTimelockConfigPerChain: map[uint64]cldfproposalutils.TimelockConfig{
selector: {
MinDelay: time.Duration(1) * time.Second,
MCMSAction: mcmstypes.TimelockActionSchedule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@ import (
mcmstypes "github.com/smartcontractkit/mcms/types"
"github.com/stretchr/testify/require"

cldfproposalutils "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/mcms/proposalutils"

cldf_chain "github.com/smartcontractkit/chainlink-deployments-framework/chain"

aptoscs "github.com/smartcontractkit/chainlink/deployment/ccip/changeset/aptos"
"github.com/smartcontractkit/chainlink/deployment/ccip/changeset/aptos/config"
"github.com/smartcontractkit/chainlink/deployment/ccip/changeset/testhelpers"
commonchangeset "github.com/smartcontractkit/chainlink/deployment/common/changeset"
"github.com/smartcontractkit/chainlink/deployment/common/proposalutils"
)

func TestDeployRegulatedToken_Apply(t *testing.T) {
Expand All @@ -36,7 +38,7 @@ func TestDeployRegulatedToken_Apply(t *testing.T) {
Icon: "",
Project: "",
},
MCMSConfig: &proposalutils.TimelockConfig{
MCMSConfig: &cldfproposalutils.TimelockConfig{
MinDelay: time.Second,
MCMSAction: mcmstypes.TimelockActionSchedule,
OverrideRoot: false,
Expand Down
Loading
Loading