Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
ccd4da9
feat: use FQN in deployment-mod and adopt updates to mcms and cldf
patricios-space May 14, 2026
ad7f2b3
Revert "fix: pin root module version to main branch"
patricios-space May 14, 2026
a8e9cde
Revert "fix: pin smoke test version"
patricios-space May 14, 2026
7b345cd
fix: bump imports
patricios-space May 14, 2026
92ad5cd
fix: missing typeAndVersion
patricios-space May 14, 2026
b1f66df
fix: nit picks
patricios-space May 14, 2026
e116c3e
fix: bump imports
patricios-space May 15, 2026
3c07270
fix: gomods tidy
patricios-space May 15, 2026
32edf94
fix: bump imports
patricios-space May 15, 2026
ea3af34
fix: bump go to 1.26.2
patricios-space May 15, 2026
e636800
fix: bump cldf to latest (migrates docker/docker to moby/moby)
patricios-space May 15, 2026
a624fab
fix: use go 1.26.2 for building packages
patricios-space May 15, 2026
102d814
fix: resolver key type
patricios-space May 15, 2026
fd71d52
fix: bump imports to release
patricios-space May 15, 2026
8605cbf
fix: extend mcms/types.OperationsMetadata with ContractTypeFull
patricios-space May 18, 2026
2452b4f
fix: bump imports
patricios-space May 18, 2026
6c99590
fix: go mod tidy
patricios-space May 18, 2026
d3ed4a1
fix: bump imports
patricios-space May 18, 2026
04cb9e6
fix: bump imports
patricios-space May 18, 2026
cd27d25
fix: duplicated import
patricios-space May 18, 2026
42a5824
fix: keep string type fallback
patricios-space May 18, 2026
013c014
fix: bump imports
patricios-space May 19, 2026
4add510
fix: lint
patricios-space May 19, 2026
115d481
fix: lint
patricios-space May 19, 2026
c167501
fix: modgraph
patricios-space May 19, 2026
94b8ad7
fix: bump nix
patricios-space May 19, 2026
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
10 changes: 9 additions & 1 deletion cmd/chainlink-ton-extras/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@
lock = pkgs.callPackage ./lock.nix {inherit pkgs;};
package-info = builtins.fromJSON (builtins.readFile ../../pkg/package.json);

go_1_26_2 = pkgs.go_1_26.overrideAttrs (_old: rec {
version = "1.26.2";
src = pkgs.fetchurl {
url = "https://go.dev/dl/go${version}.src.tar.gz";
hash = "sha256-LpHrtpR6lulDb7KzkmqIAu/mOm03Xf/sT4Kqnb1v1Ds=";
};
});

# Fetch karalabe/hid for HIDAPI C sources and headers
karalabe-hid = pkgs.fetchFromGitHub {
owner = "karalabe";
Expand All @@ -13,7 +21,7 @@
sha256 = "sha256-z3KSqKrIoy6WR2HUPjKJEm93NvuN0m9Edcq5BtGO5yA=";
};
in
pkgs.buildGo126Module rec {
pkgs.buildGo126Module.override {go = go_1_26_2;} rec {
inherit (package-info) version;
pname = "chainlink-ton-extras";

Expand Down
2 changes: 1 addition & 1 deletion cmd/chainlink-ton-extras/lock.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Notice: `pkgs.lib.fakeHash` can be used as a placeholder,
# but `lock-nix-tidy` will only replace actual hashes.
{pkgs}: {
chainlink-ton-extras = "sha256-egm3TSMzfQkryP51w7+hkWUPDd/TUcloJf4Pp+2DQmQ=";
chainlink-ton-extras = "sha256-pjWmDf1X3VRUBOuBSWOzOuBcgHgkhYAasQKHOMCCD2k=";
}
9 changes: 8 additions & 1 deletion cmd/chainlink-ton/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,15 @@
}: let
lock = pkgs.callPackage ./lock.nix {inherit pkgs;};
package-info = builtins.fromJSON (builtins.readFile ../../pkg/package.json);
go_1_26_2 = pkgs.go_1_26.overrideAttrs (_old: rec {
version = "1.26.2";
src = pkgs.fetchurl {
url = "https://go.dev/dl/go${version}.src.tar.gz";
hash = "sha256-LpHrtpR6lulDb7KzkmqIAu/mOm03Xf/sT4Kqnb1v1Ds=";
};
});
in
pkgs.buildGo126Module rec {
pkgs.buildGo126Module.override {go = go_1_26_2;} rec {
inherit (package-info) version;
pname = "chainlink-ton";

Expand Down
2 changes: 1 addition & 1 deletion cmd/chainlink-ton/lock.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Notice: `pkgs.lib.fakeHash` can be used as a placeholder,
# but `lock-nix-tidy` will only replace actual hashes.
{pkgs}: {
chainlink-ton = "sha256-egm3TSMzfQkryP51w7+hkWUPDd/TUcloJf4Pp+2DQmQ=";
chainlink-ton = "sha256-pjWmDf1X3VRUBOuBSWOzOuBcgHgkhYAasQKHOMCCD2k=";
}
1 change: 1 addition & 0 deletions deployment/ccip/1_6_0/sequences/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"github.com/xssnick/tonutils-go/address"

chainsel "github.com/smartcontractkit/chain-selectors"

"github.com/smartcontractkit/chainlink-deployments-framework/datastore"

"github.com/smartcontractkit/chainlink-ccip/deployment/deploy"
Expand Down
52 changes: 26 additions & 26 deletions deployment/ccip/1_6_0/sequences/connect_chains.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,14 +150,13 @@ var ConfigureLaneLegAsSource = cldf_ops.NewSequence(
return sequences.OnChainOutput{}, fmt.Errorf("failed to get feequoter owner: %w", err)
}

contractType := bindings.PkgCCIP + ".FeeQuoter"
r, err := cldf_ops.ExecuteOperation(b, opston.SendMessages, dp, opston.SendMessagesInput{
Messages: []opston.InternalMessage[any]{
{
Bounce: true,
DstAddr: &addr,
Amount: tlb.MustFromTON("0.1"), // TODO (ops/gas): static, should allow overrides?
Body: codec.MustWrapMessage[any](contractType, body),
Body: codec.MustWrapMessage[any](bindings.TypeFeeQuoter, body),
},
},
Plan: true, // plan to construct a batch
Expand All @@ -167,10 +166,11 @@ var ConfigureLaneLegAsSource = cldf_ops.NewSequence(
}

plan := !sender.Equals(owner) // plan if sender is not owner
_inputMCMS.Add(opston.AsCells(r.Output.Plans), plan, []types.OperationMetadata{
_inputMCMS.Add(opston.AsCells(r.Output.Plans), plan, []mcms.OperationMetadata{
{
ContractType: contractType,
Tags: []string{},
ContractType: bindings.ShortFeeQuoter,
ContractTypeFull: bindings.TypeFeeQuoter,
Tags: []string{},
},
})
}
Expand Down Expand Up @@ -209,14 +209,13 @@ var ConfigureLaneLegAsSource = cldf_ops.NewSequence(
return sequences.OnChainOutput{}, fmt.Errorf("failed to get onramp owner: %w", err)
}

contractType := bindings.PkgCCIP + ".OnRamp"
r, err := cldf_ops.ExecuteOperation(b, opston.SendMessages, dp, opston.SendMessagesInput{
Messages: []opston.InternalMessage[any]{
{
Bounce: true,
DstAddr: &addr,
Amount: tlb.MustFromTON("0.1"), // TODO (ops/gas): static, should allow overrides?
Body: codec.MustWrapMessage[any](contractType, body),
Body: codec.MustWrapMessage[any](bindings.TypeOnRamp, body),
},
},
Plan: true,
Expand All @@ -226,10 +225,11 @@ var ConfigureLaneLegAsSource = cldf_ops.NewSequence(
}

plan := !sender.Equals(owner) // plan if sender is not owner
_inputMCMS.Add(opston.AsCells(r.Output.Plans), plan, []types.OperationMetadata{
_inputMCMS.Add(opston.AsCells(r.Output.Plans), plan, []mcms.OperationMetadata{
{
ContractType: contractType,
Tags: []string{},
ContractType: bindings.ShortOnRamp,
ContractTypeFull: bindings.TypeOnRamp,
Tags: []string{},
},
})
}
Expand All @@ -246,18 +246,18 @@ var ConfigureLaneLegAsSource = cldf_ops.NewSequence(
}

addr := stateCCIP.FeeQuoter
contractType := bindings.PkgCCIP + ".FeeQuoter"

owner, err := tvm.CallGetterLatest(b.GetContext(), chain.Client, &addr, ownable2step.GetOwner)
if err != nil {
return sequences.OnChainOutput{}, fmt.Errorf("failed to get feequoter owner: %w", err)
}

plan := !sender.Equals(owner) // plan if sender is not owner
_inputMCMS.Add(r.Output, plan, []types.OperationMetadata{
_inputMCMS.Add(r.Output, plan, []mcms.OperationMetadata{
{
ContractType: contractType,
Tags: []string{},
ContractType: bindings.ShortFeeQuoter,
ContractTypeFull: bindings.TypeFeeQuoter,
Tags: []string{},
},
})
}
Expand All @@ -276,18 +276,18 @@ var ConfigureLaneLegAsSource = cldf_ops.NewSequence(
}

addr := stateCCIP.Router
contractType := bindings.PkgCCIP + ".Router"

owner, err := tvm.CallGetterLatest(b.GetContext(), chain.Client, &addr, ownable2step.GetOwner)
if err != nil {
return sequences.OnChainOutput{}, fmt.Errorf("failed to get router owner: %w", err)
}

plan := !sender.Equals(owner) // plan if sender is not owner
_inputMCMS.Add(r.Output, plan, []types.OperationMetadata{
_inputMCMS.Add(r.Output, plan, []mcms.OperationMetadata{
{
ContractType: contractType,
Tags: []string{},
ContractType: bindings.ShortRouter,
ContractTypeFull: bindings.TypeRouter,
Tags: []string{},
},
})
}
Expand Down Expand Up @@ -335,17 +335,17 @@ var ConfigureLaneLegAsDest = cldf_ops.NewSequence(
return sequences.OnChainOutput{}, fmt.Errorf("failed to update offramp sources: %w", err)
}

contractType := bindings.PkgCCIP + ".OffRamp"
owner, err := tvm.CallGetterLatest(b.GetContext(), chain.Client, &stateCCIP.OffRamp, ownable2step.GetOwner)
if err != nil {
return sequences.OnChainOutput{}, fmt.Errorf("failed to get offramp owner: %w", err)
}

plan := !sender.Equals(owner) // plan if sender is not owner
_inputMCMS.Add(r.Output, plan, []types.OperationMetadata{
_inputMCMS.Add(r.Output, plan, []mcms.OperationMetadata{
{
ContractType: contractType,
Tags: []string{},
ContractType: bindings.ShortOffRamp,
ContractTypeFull: bindings.TypeOffRamp,
Tags: []string{},
},
})
}
Expand All @@ -362,17 +362,17 @@ var ConfigureLaneLegAsDest = cldf_ops.NewSequence(
return sequences.OnChainOutput{}, fmt.Errorf("failed to update router: %w", err)
}

contractType := bindings.PkgCCIP + ".Router"
owner, err := tvm.CallGetterLatest(b.GetContext(), chain.Client, &stateCCIP.Router, ownable2step.GetOwner)
if err != nil {
return sequences.OnChainOutput{}, fmt.Errorf("failed to get router owner: %w", err)
}

plan := !sender.Equals(owner) // plan if sender is not owner
_inputMCMS.Add(r.Output, plan, []types.OperationMetadata{
_inputMCMS.Add(r.Output, plan, []mcms.OperationMetadata{
{
ContractType: contractType,
Tags: []string{},
ContractType: bindings.ShortRouter,
ContractTypeFull: bindings.TypeRouter,
Tags: []string{},
},
})
}
Expand Down
16 changes: 12 additions & 4 deletions deployment/ccip/1_6_0/sequences/fastcurse.go
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,12 @@ func (a *TonCurseAdapter) Curse() *cldf_ops.Sequence[api.CurseInput, sequences.O
}

out := sequences.OnChainOutput{}
meta := []types.OperationMetadata{
{ContractType: contractType, Tags: []string{}}, // TODO: add appropriate tags
meta := []mcms.OperationMetadata{
{
ContractType: bindings.ShortRouter,
Tags: []string{},
ContractTypeFull: bindings.TypeRouter,
}, // TODO: add appropriate tags
}

return mcms.WithOperationOutput(out, r.Output, types.ChainSelector(in.ChainSelector), meta)
Expand Down Expand Up @@ -400,8 +404,12 @@ func (a *TonCurseAdapter) Uncurse() *cldf_ops.Sequence[api.CurseInput, sequences
}

out := sequences.OnChainOutput{}
meta := []types.OperationMetadata{
{ContractType: contractType, Tags: []string{}}, // TODO: add appropriate tags
meta := []mcms.OperationMetadata{
{
ContractType: bindings.ShortRouter,
Tags: []string{},
ContractTypeFull: bindings.TypeRouter,
}, // TODO: add appropriate tags
}

return mcms.WithOperationOutput(out, r.Output, types.ChainSelector(in.ChainSelector), meta)
Expand Down
5 changes: 3 additions & 2 deletions deployment/ccip/1_6_0/sequences/ocr.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ import (

"github.com/Masterminds/semver/v3"

"github.com/smartcontractkit/chainlink-common/pkg/types/ccipocr3"
"github.com/smartcontractkit/mcms/types"

"github.com/smartcontractkit/chainlink-common/pkg/types/ccipocr3"

deployops "github.com/smartcontractkit/chainlink-ccip/deployment/deploy"
"github.com/smartcontractkit/chainlink-ccip/deployment/utils/sequences"

Expand Down Expand Up @@ -68,7 +69,7 @@ var SetOCR3Config = cldf_ops.NewSequence(

plan := !sender.Equals(owner) // plan if sender is not owner

_inputMCMS.Add(r.Output, plan, []types.OperationMetadata{})
_inputMCMS.Add(r.Output, plan, []mcms.OperationMetadata{})
}

r, err := cldf_ops.ExecuteOperation(b, mcms.SendOrPlan, dp, _inputMCMS)
Expand Down
17 changes: 9 additions & 8 deletions deployment/ccip/1_6_0/sequences/transfer_ownership.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ func (a *TonTransferOwnershipAdapter) SequenceTransferOwnershipViaMCMS() *cldfop
return sequences.OnChainOutput{}, fmt.Errorf("timelock address not initialized for chain %d, cannot plan transfer ownership to non-deployer", in.ChainSelector)
}

contractType := bindings.PkgLib + ".access.Ownable"
//nolint:govet // allow shadowing
contractAddr, err := address.ParseAddr(contractRef.Address)
if err != nil {
Expand Down Expand Up @@ -126,7 +125,7 @@ func (a *TonTransferOwnershipAdapter) SequenceTransferOwnershipViaMCMS() *cldfop
Bounce: true,
DstAddr: contractAddr,
Amount: tlb.MustFromTON("0.1"),
Body: codec.MustWrapMessage[any](contractType, body),
Body: codec.MustWrapMessage[any](bindings.TypeOwnable, body),
},
},
Plan: true,
Expand All @@ -137,10 +136,11 @@ func (a *TonTransferOwnershipAdapter) SequenceTransferOwnershipViaMCMS() *cldfop

// Send directly if deployer is the current owner, otherwise plan through MCMS
plan := !deployerAddr.Equals(currentOwner)
_inputMCMS.Add(opston.AsCells(r.Output.Plans), plan, []types.OperationMetadata{
_inputMCMS.Add(opston.AsCells(r.Output.Plans), plan, []opsmcms.OperationMetadata{
{
ContractType: contractType,
Tags: []string{},
ContractType: bindings.ShortOwnable,
ContractTypeFull: bindings.TypeOwnable,
Tags: []string{},
},
})
}
Expand Down Expand Up @@ -216,10 +216,11 @@ func (a *TonTransferOwnershipAdapter) SequenceAcceptOwnership() *cldfops.Sequenc
// AcceptOwnership must be called by the proposed owner.
// Plan through MCMS if the proposed owner is not the deployer (i.e., timelock needs to accept).
plan := !sender.Equals(proposedOwner)
_inputMCMS.Add(opston.AsCells(r.Output.Plans), plan, []types.OperationMetadata{
_inputMCMS.Add(opston.AsCells(r.Output.Plans), plan, []opsmcms.OperationMetadata{
{
ContractType: contractType,
Tags: []string{},
ContractType: bindings.ShortOwnable,
ContractTypeFull: bindings.TypeOwnable,
Tags: []string{},
},
})
}
Expand Down
2 changes: 1 addition & 1 deletion deployment/ccip/cs_set_ocr3_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func (cs SetOCR3Config) Apply(env cldf.Environment, cfg SetOCR3OffRampConfig) (c

plan := !sender.Equals(owner) // plan if sender is not owner

_inputMCMS.Add(r.Output, plan, []types.OperationMetadata{})
_inputMCMS.Add(r.Output, plan, []opsmcms.OperationMetadata{})
}

r, err := operations.ExecuteOperation(env.OperationsBundle, opsmcms.SendOrPlan, dp, _inputMCMS)
Expand Down
2 changes: 1 addition & 1 deletion deployment/ccip/sequence/deploy_ccip.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func deployCCIPSequence(b operations.Bundle, dp *dep.DependencyProvider, in Depl
// Fetch the contract code using the Fully Qualified Name of the contracts instead of the types used in the datastore
retrieveContractsOpts := utils.RetrieveCompiledContractsOpts{
Package: contractsPackage,
Contracts: []string{
Contracts: []tvm.FullyQualifiedName{
bindings.TypeRouter,
bindings.TypeFeeQuoter,
bindings.TypeOffRamp,
Expand Down
Loading
Loading