[NONEVM-5715] [OffRamp] Programable Token Transfer - #823
Conversation
9a5ac74 to
964a017
Compare
964a017 to
4d0ed18
Compare
c06d5b7 to
acc0b36
Compare
acc0b36 to
f871c95
Compare
617a411 to
275b3e1
Compare
275b3e1 to
0882d4a
Compare
deb5577 to
ec03270
Compare
ec03270 to
bf4c7c2
Compare
bf4c7c2 to
133a25b
Compare
133a25b to
178b6a4
Compare
There was a problem hiding this comment.
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
GasOverridestruct support across contracts/wrappers and threads it throughExecute/InitExecute/DispatchValidated. - Enables PTT in
ReceiveExecutorby 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.
| return { | ||
| $: 'OffRamp_ExecuteValidated', | ||
| gasOverride: null, | ||
| ...args | ||
| } |
There was a problem hiding this comment.
TODO: check if this is a bug from our abigen.ts scrypt
178b6a4 to
98b3189
Compare
|
|
||
| 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 { |
There was a problem hiding this comment.
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.
9b84b61 to
a306178
Compare
a306178 to
a78b680
Compare
a78b680 to
1c4bac9
Compare
NONEVM-5715