Skip to content

Conversation

@huangzhen1997
Copy link
Contributor

@huangzhen1997 huangzhen1997 commented Dec 9, 2025

Jira.

Adding TON timelock converter support. Note the TON support for executor override is also added here, but there's another PR for supporting the migration to MCMS-Tools repo: https://github.com/smartcontractkit/mcms-tools/pull/261

Need to add test coverage

@huangzhen1997 huangzhen1997 requested a review from a team as a code owner December 9, 2025 22:54
Copilot AI review requested due to automatic review settings December 9, 2025 22:54
@changeset-bot
Copy link

changeset-bot bot commented Dec 9, 2025

⚠️ No Changeset found

Latest commit: ad23d0e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions
Copy link

github-actions bot commented Dec 9, 2025

👋 huangzhen1997, thanks for creating this pull request!

To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team.

Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks!

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extends the CLDF (Chainlink Deployments Framework) proposal conversion logic to support the TON (The Open Network) blockchain. The changes enable TON chain integration by adding necessary converters, executors, and inspectors while also updating various dependencies.

Key changes:

  • Add TON support to MCMS v2 CLI with timelock converter, executor, and inspector implementations
  • Introduce TxOps struct to encapsulate TON transaction operation configuration
  • Update multiple dependencies including Go version, chainlink-ccip, mcms, and tonutils-go

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
go.mod Updates Go version to 1.25.3 and upgrades multiple dependencies including TON-related libraries
engine/cld/legacy/cli/mcmsv2/mcms_v2.go Adds TON chain family support with converter, executor, and inspector implementations; refactors variable naming
chain/ton/ton_chain.go Introduces TxOps struct to hold wallet and amount configuration for transactions
chain/ton/provider/rpc_provider.go Initializes TxOps with default transaction amount in RPC provider
chain/ton/provider/ctf_provider_test.go Updates test to verify TxOps instead of Wallet field
chain/ton/provider/ctf_provider.go Initializes TxOps with default amount; fixes wallet method call to use WalletAddress()

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@huangzhen1997 huangzhen1997 marked this pull request as draft December 9, 2025 23:04
@huangzhen1997 huangzhen1997 changed the title Extend cldf proposal conversion logic for TON Extend cldf timelock converter logic for TON Dec 9, 2025
URL: url,
TxOps: cldf_ton.TxOps{
Wallet: tonWallet,
Amount: tlb.MustFromTON(defaultTxTONAmount), // default amount for transactions

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good for now, too simple to scale - we need to track this item.

We will need to be able to load gas configuration (from somewhere) which will need to tell us how much on average something costs to do (per contract call), and something a CLD user should be able to easily override.

cc @patricios-space @vicentevieytes re: per call gas configuration

Copy link

@krebernisak krebernisak Jan 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@huangzhen1997 I suggest we drop the TxOps idea for now (from this PR), and just use 3x static defaults for value amounts we need:

  1. MCMS configurer: 0.25 TON
  2. MCMS executor: 0.25 TON
  3. Timelock executor: 0.25 TON

That way we will simplify this integration PR, and work on gas configuration/estimation provider in a follow up as Amount: tlb.MustFromTON(defaultTxTONAmount), // default amount for transactions will not be enough to support our requirements.

We will need to build a more dynamic gas estimator and use it instead of static values.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the default to be 0.25 for now. Created a ticket for the gas estimator

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 8 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Client: nodeClient,
Wallet: tonWallet,
WalletAddress: tonWallet.Address(),
WalletAddress: tonWallet.WalletAddress(),
Copy link

Copilot AI Dec 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change from tonWallet.Address() to tonWallet.WalletAddress() lacks test coverage. The existing test in ctf_provider_test.go only checks that WalletAddress is not empty but doesn't verify the correct method is being called or that the address value is as expected.

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot This is not true, it's tested in rpc_provider_test.go line 276

@huangzhen1997 huangzhen1997 marked this pull request as ready for review December 12, 2025 04:33
Copilot AI review requested due to automatic review settings December 12, 2025 04:33
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 8 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings January 23, 2026 17:14
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings January 23, 2026 17:26
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings January 23, 2026 17:41
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Client: nodeClient,
Wallet: tonWallet,
WalletAddress: tonWallet.Address(),
WalletAddress: tonWallet.WalletAddress(),
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code previously called tonWallet.Address() and now calls tonWallet.WalletAddress(). If these methods return different values or have different behaviors, this could break existing functionality. Verify that WalletAddress() returns the same address format as the previous Address() method.

Suggested change
WalletAddress: tonWallet.WalletAddress(),
WalletAddress: tonWallet.Address(),

Copilot uses AI. Check for mistakes.
Copilot AI review requested due to automatic review settings January 23, 2026 18:30
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings January 23, 2026 20:57
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings January 23, 2026 22:42
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 10 out of 11 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings January 23, 2026 23:46
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 10 out of 11 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@huangzhen1997 huangzhen1997 force-pushed the NONEVM-3069/extend-cldf-proposal-logic-support-ton-timelock-converter branch from d3318f4 to 120f23b Compare January 24, 2026 00:21
Copilot AI review requested due to automatic review settings January 24, 2026 00:24
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@cl-sonarqube-production
Copy link

Quality Gate failed Quality Gate failed

Failed conditions
75.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants