Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ require (
github.com/samber/lo v1.52.0
github.com/smartcontractkit/ccip-owner-contracts v0.1.0
github.com/smartcontractkit/chain-selectors v1.0.98
github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20260506144252-c100eabfda74
github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20260506144252-c100eabfda74
github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20260415165642-49f23e4d76cc
github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20260415165642-49f23e4d76cc
github.com/smartcontractkit/chainlink-common v0.11.2-0.20260429111145-3667714e0b37
github.com/smartcontractkit/chainlink-deployments-framework v0.101.0
github.com/smartcontractkit/chainlink-evm v0.3.4-0.20260429160308-91a892a60171
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -850,10 +850,10 @@ github.com/smartcontractkit/chain-selectors v1.0.98 h1:fuI7CQ1o5cX64eO4/Lvwtfhdp
github.com/smartcontractkit/chain-selectors v1.0.98/go.mod h1:qy7whtgG5g+7z0jt0nRyii9bLND9m15NZTzuQPkMZ5w=
github.com/smartcontractkit/chainlink-aptos v0.0.0-20260430175646-295a7f9a1500 h1:045jrHCLI+MpeAyByJkyHbEjq0+aTPt04C7+sbsNNtw=
github.com/smartcontractkit/chainlink-aptos v0.0.0-20260430175646-295a7f9a1500/go.mod h1:zfE2R7887kiwXkGTHKPe5NBgwhFwIC3pnA2uAxrbvig=
github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20260506144252-c100eabfda74 h1:D03Y3PxaeMgK34N7zCOhc+86mw6FPalESR2Cl6x9728=
github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20260506144252-c100eabfda74/go.mod h1:xu0Jum/nGRkjBwT/Vq7WCElWOTBBkFRwG0ZIaw9tF2I=
github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20260506144252-c100eabfda74 h1:8etwBkRHwfWG54+1JldkPiYihu1bRwImvoqpGDrsXBU=
github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20260506144252-c100eabfda74/go.mod h1:67YbnoglYD61Pz/jTVCgav9wFq7S35OU8UyQSvPllRw=
github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20260415165642-49f23e4d76cc h1:mvobZx5JV5PhG/9IXPReV+8mAGnupl0HIWQZ43zxzd4=
github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20260415165642-49f23e4d76cc/go.mod h1:gzCVLUlNov/zFXSC7G6zcGkZU1IfNOHaakbAPDe5Woc=
github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20260415165642-49f23e4d76cc h1:War93neyFmv7pzuElZeZC3qc/OfGtLvEXvqL3qeBfM0=
github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20260415165642-49f23e4d76cc/go.mod h1:67YbnoglYD61Pz/jTVCgav9wFq7S35OU8UyQSvPllRw=
github.com/smartcontractkit/chainlink-ccip/deployment v0.0.0-20260504204047-af9826978b72 h1:WJ+KO7/UgwoQoVVj1Hl+4MuzTW4/3I+wYxqgABLQyC0=
github.com/smartcontractkit/chainlink-ccip/deployment v0.0.0-20260504204047-af9826978b72/go.mod h1:Ls0oszLvhzV3/D0ivG85sh8qmmcsVhKplmepQdFq98E=
github.com/smartcontractkit/chainlink-common v0.11.2-0.20260429111145-3667714e0b37 h1:pEfHIsxPA6oeMDNeXSQCtbB+9GGiiHXygyh60mC69cA=
Expand Down
80 changes: 80 additions & 0 deletions legacy/pkg/family/evm/changesets/deploy_mcms.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
package changesets

import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
bindings "github.com/smartcontractkit/ccip-owner-contracts/pkg/gethwrappers"
cldf_evm "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm"
cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment"
"github.com/smartcontractkit/chainlink-deployments-framework/pkg/logger"
"github.com/smartcontractkit/mcms/sdk"
mcmsTypes "github.com/smartcontractkit/mcms/types"

gethwrappers_zksync "github.com/smartcontractkit/cld-changesets/legacy/pkg/family/evm/changesets/zksync"
cldchangesetscommon "github.com/smartcontractkit/cld-changesets/pkg/common"
)

// TODO: Remove this function once the tests are implemented for the new sequence.
func DeployMCMSWithConfigEVM(
contractType cldf.ContractType,
lggr logger.Logger,
chain cldf_evm.Chain,
ab cldf.AddressBook,
mcmConfig mcmsTypes.Config,
options ...DeployMCMSOption,
) (*cldf.ContractDeploy[*bindings.ManyChainMultiSig], error) {
groupQuorums, groupParents, signerAddresses, signerGroups, err := sdk.ExtractSetConfigInputs(&mcmConfig)
if err != nil {
lggr.Errorw("Failed to extract set config inputs", "chain", chain.String(), "err", err)
return nil, err
}
mcm, err := cldf.DeployContract(lggr, chain, ab,
func(chain cldf_evm.Chain) cldf.ContractDeploy[*bindings.ManyChainMultiSig] {
var (
mcmAddr common.Address
tx *types.Transaction
mcm *bindings.ManyChainMultiSig
err2 error
)
if chain.IsZkSyncVM {
mcmAddr, _, mcm, err2 = gethwrappers_zksync.DeployManyChainMultiSigZk(
nil,
chain.ClientZkSyncVM,
chain.DeployerKeyZkSyncVM,
chain.Client,
)
} else {
mcmAddr, tx, mcm, err2 = bindings.DeployManyChainMultiSig(
chain.DeployerKey,
chain.Client,
)
}

tv := cldf.NewTypeAndVersion(contractType, cldchangesetscommon.Version1_0_0)
for _, option := range options {
option(&tv)
}

return cldf.ContractDeploy[*bindings.ManyChainMultiSig]{
Address: mcmAddr, Contract: mcm, Tx: tx, Tv: tv, Err: err2,
}
})
if err != nil {
lggr.Errorw("Failed to deploy mcm", "chain", chain.String(), "err", err)
return mcm, err
}
mcmsTx, err := mcm.Contract.SetConfig(chain.DeployerKey,
signerAddresses,
// Signer 1 is int group 0 (root group) with quorum 1.
signerGroups,
groupQuorums,
groupParents,
false,
)
if _, confirmErr := cldf.ConfirmIfNoError(chain, mcmsTx, err); confirmErr != nil {
lggr.Errorw("Failed to confirm mcm config", "chain", chain.String(), "err", confirmErr)
return mcm, confirmErr
}

return mcm, nil
}
95 changes: 95 additions & 0 deletions legacy/pkg/family/evm/changesets/deploy_mcms_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
package changesets

import (
"encoding/json"
"testing"

chainsel "github.com/smartcontractkit/chain-selectors"
mcmscontracts "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/contracts/mcms"
"github.com/smartcontractkit/chainlink-deployments-framework/pkg/logger"
"github.com/stretchr/testify/require"

evmstate "github.com/smartcontractkit/cld-changesets/legacy/pkg/family/evm"

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

cldf_evm "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm"
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/onchain"
)

func TestDeployMCMSWithConfig(t *testing.T) {
t.Parallel()
lggr := logger.Test(t)

selector := chainsel.TEST_90000001.Selector
blockchains, err := onchain.NewEVMSimLoader().Load(t, []uint64{selector})
require.NoError(t, err)
require.Len(t, blockchains, 1)

// Convert the blockchains to concrete EVM chains.
chain, ok := blockchains[0].(cldf_evm.Chain)
require.True(t, ok)

ab := cldf.NewMemoryAddressBook()

// 1) Test WITHOUT a label
mcmNoLabel, err := DeployMCMSWithConfigEVM(
mcmscontracts.ProposerManyChainMultisig,
lggr,
chain,
ab,
cldftesthelpers.SingleGroupMCMS(t),
)
require.NoError(t, err)
require.Empty(t, mcmNoLabel.Tv.Labels, "expected no label to be set")

// 2) Test WITH a label
label := "SA"
mcmWithLabel, err := DeployMCMSWithConfigEVM(
mcmscontracts.ProposerManyChainMultisig,
lggr,
chain,
ab,
cldftesthelpers.SingleGroupMCMS(t),
WithLabel(label),
)
require.NoError(t, err)
require.NotNil(t, mcmWithLabel.Tv.Labels, "expected labels to be set")
require.Contains(t, mcmWithLabel.Tv.Labels, label, "label mismatch")
Comment on lines +45 to +60
}

func TestDeployMCMSWithTimelockContracts(t *testing.T) {
t.Parallel()
selector := chainsel.TEST_90000001.Selector
env, err := environment.New(t.Context(),
environment.WithEVMSimulated(t, []uint64{selector}),
)
require.NoError(t, err)

chain := env.BlockChains.EVMChains()[selector]

ab := cldf.NewMemoryAddressBook()

_, err = DeployMCMSWithTimelockContractsEVM(*env,
chain,
ab,
cldftesthelpers.SingleGroupTimelockConfig(t),
nil,
)
require.NoError(t, err)

addresses, err := ab.AddressesForChain(chainsel.TEST_90000001.Selector)
require.NoError(t, err)
require.Len(t, addresses, 5)

mcmsState, err := evmstate.MaybeLoadMCMSWithTimelockChainState(chain, addresses)
require.NoError(t, err)

v, err := mcmsState.GenerateMCMSWithTimelockView()
require.NoError(t, err)

_, err = json.MarshalIndent(v, "", " ")
require.NoError(t, err)
}
63 changes: 63 additions & 0 deletions legacy/pkg/family/evm/changesets/zksync/CallProxyZK.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

63 changes: 63 additions & 0 deletions legacy/pkg/family/evm/changesets/zksync/ManyChainMultiSigZK.go

Large diffs are not rendered by default.

63 changes: 63 additions & 0 deletions legacy/pkg/family/evm/changesets/zksync/RBACTimelockZK.go

Large diffs are not rendered by default.

Loading