Skip to content

[NONEVM-5715] [OffRamp] Programable Token Transfer - #823

Open
duck-types wants to merge 3 commits into
ref/receive-executor/clean-up-statefrom
feat/programable-token-transfer/offramp
Open

[NONEVM-5715] [OffRamp] Programable Token Transfer#823
duck-types wants to merge 3 commits into
ref/receive-executor/clean-up-statefrom
feat/programable-token-transfer/offramp

Conversation

@duck-types

@duck-types duck-types commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

@duck-types duck-types changed the title wip: [OffRamp] Programable Token Transfer [NONEVM-5715] wip: [OffRamp] Programable Token Transfer Aug 7, 2026
@duck-types
duck-types force-pushed the feat/programable-token-transfer/offramp branch from 9a5ac74 to 964a017 Compare August 7, 2026 19:50
@duck-types
duck-types force-pushed the feat/programable-token-transfer/offramp branch from 964a017 to 4d0ed18 Compare August 7, 2026 19:50
@duck-types
duck-types force-pushed the feat/programable-token-transfer/offramp branch 2 times, most recently from c06d5b7 to acc0b36 Compare August 7, 2026 22:02
@duck-types
duck-types force-pushed the feat/programable-token-transfer/offramp branch from acc0b36 to f871c95 Compare August 7, 2026 22:03
@duck-types
duck-types force-pushed the feat/programable-token-transfer/offramp branch 2 times, most recently from 617a411 to 275b3e1 Compare August 7, 2026 22:42
@duck-types
duck-types changed the base branch from feat/token-transfer/offramp to fix/token-pool/releaseOrMint-should-notify-failure August 7, 2026 22:42
@duck-types
duck-types force-pushed the feat/programable-token-transfer/offramp branch from 275b3e1 to 0882d4a Compare August 7, 2026 23:48
@duck-types
duck-types force-pushed the feat/programable-token-transfer/offramp branch 2 times, most recently from deb5577 to ec03270 Compare August 10, 2026 18:28
@duck-types
duck-types force-pushed the feat/programable-token-transfer/offramp branch from ec03270 to bf4c7c2 Compare August 11, 2026 11:31
@duck-types
duck-types force-pushed the feat/programable-token-transfer/offramp branch from bf4c7c2 to 133a25b Compare August 11, 2026 11:32
@duck-types
duck-types changed the base branch from fix/token-pool/releaseOrMint-should-notify-failure to ref/receive-executor/clean-up-state August 11, 2026 11:32
@duck-types
duck-types force-pushed the feat/programable-token-transfer/offramp branch from 133a25b to 178b6a4 Compare August 11, 2026 20:59
@duck-types
duck-types requested a lite review from Copilot August 11, 2026 23:00
@duck-types duck-types changed the title [NONEVM-5715] wip: [OffRamp] Programable Token Transfer [NONEVM-5715] [OffRamp] Programable Token Transfer Aug 11, 2026
@duck-types
duck-types marked this pull request as ready for review August 11, 2026 23:00
@duck-types
duck-types requested a review from a team as a code owner August 11, 2026 23:00
@duck-types
duck-types requested a review from krebernisak August 11, 2026 23:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 TON CCIP OffRamp/ReceiveExecutor flow to support Programmable Token Transfers (PTT) (messages carrying both token transfer + calldata), and introduces a structured GasOverride mechanism (with receiverExecutionGasLimit) that can be propagated through execution.

Changes:

  • Adds GasOverride struct support across contracts/wrappers and threads it through Execute/InitExecute/DispatchValidated.
  • Enables PTT in ReceiveExecutor by executing the message after token transfer completion (instead of rejecting).
  • Updates manual execution to a new message variant (OffRamp_ManuallyExecute_VTT) and expands tests for PTT + retry/bounce flows.

Reviewed changes

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

Show a summary per file
File Description
contracts/wrappers/gen/ccip/ReceiveExecutor.ts Adds GasOverride type usage and storage/state wiring in generated wrapper.
contracts/wrappers/gen/ccip/OffRamp.ts Updates generated wrapper types/messages for GasOverride, dispatch gas field rename, and manual execute VTT variant.
contracts/wrappers/gen/ccip/MerkleRoot.ts Updates wrapper message types to use GasOverride instead of coins.
contracts/tests/ccip/receiveExecutor/ReceiveExecutor.execution.spec.ts Refactors helpers and adds/updates tests for token transfer + PTT execution/retry/bounce flows.
contracts/tests/ccip/offramp/OffRamp.Setup.ts Updates manual execution helper to send VTT variant with GasOverride.
contracts/tests/ccip/offramp/OffRamp.execute.spec.ts Updates gas override assertions and adds end-to-end PTT execution and failure tests.
contracts/contracts/ccip/receive_executor/types.tolk Extends ReceiveExecutor_State with persisted gasOverride.
contracts/contracts/ccip/receive_executor/storage.tolk Initializes gasOverride in persistent storage defaults.
contracts/contracts/ccip/receive_executor/messages.tolk Changes ReceiveExecutor_InitExecute.gasOverride from coins? to GasOverride?.
contracts/contracts/ccip/receive_executor/errors.tolk Removes PTTNotSupported error (PTT now supported).
contracts/contracts/ccip/receive_executor/contract.tolk Stores gas override in state; executes after token transfer when calldata exists (PTT).
contracts/contracts/ccip/offramp/types.tolk Introduces GasOverride struct + helper(s) for effective gas limit selection.
contracts/contracts/ccip/offramp/messages.tolk Updates message union for manual execute VTT and changes DispatchValidated gas field naming.
contracts/contracts/ccip/offramp/contract.tolk Uses effective gas limit helper and switches manual execute handling to VTT variant.
contracts/contracts/ccip/merkle_root/messages.tolk Updates MerkleRoot_Validate.gasOverride type to GasOverride?.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines 2021 to 2025
return {
$: 'OffRamp_ExecuteValidated',
gasOverride: null,
...args
}

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

TODO: check if this is a bug from our abigen.ts scrypt

Comment thread contracts/wrappers/gen/ccip/MerkleRoot.ts
Comment thread contracts/contracts/ccip/offramp/types.tolk Outdated
Comment thread contracts/contracts/ccip/offramp/messages.tolk Outdated
Comment thread contracts/contracts/ccip/offramp/contract.tolk Outdated
Comment thread contracts/wrappers/gen/ccip/OffRamp.ts
Comment thread contracts/wrappers/gen/ccip/ReceiveExecutor.ts
@duck-types
duck-types force-pushed the feat/programable-token-transfer/offramp branch from 178b6a4 to 98b3189 Compare August 11, 2026 23:37

struct (0xa00785cf) OffRamp_ManuallyExecute {
// `OffRamp_ManuallyExecute_V2` is a variant of the previous `OffRamp_ManuallyExecute` that adds token transfer support in CCIP 1.6
struct (0xfef433bd) OffRamp_ManuallyExecute_V2 {

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I'm not fully convinced of the V2 suffix as it will probably be confused with CCIP 2.0. What about VTT for (version token transfer)? It is a bit more descriptive and less likely to be confused with a future version of CCIP.

@duck-types
duck-types force-pushed the feat/programable-token-transfer/offramp branch 2 times, most recently from 9b84b61 to a306178 Compare August 13, 2026 14:02
@duck-types
duck-types force-pushed the feat/programable-token-transfer/offramp branch from a306178 to a78b680 Compare August 14, 2026 03:29
@duck-types
duck-types force-pushed the feat/programable-token-transfer/offramp branch from a78b680 to 1c4bac9 Compare August 14, 2026 03:56
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.

2 participants