Skip to content

[NONEVM-5742] [OffRamp Flow] Add missing support for offchainTokenData - #884

Merged
duck-types merged 9 commits into
mainfrom
fix/exec-report-offchainTokenData
Sep 15, 2026
Merged

duck-types merged 9 commits into
mainfrom
fix/exec-report-offchainTokenData

Conversation

@duck-types

@duck-types duck-types commented Sep 11, 2026 •

Copy link
Copy Markdown
Collaborator

NONEVM-5742

followup: #889

@duck-types
duck-types force-pushed the fix/exec-report-offchainTokenData branch 2 times, most recently from 5838633 to eeb01ba Compare September 14, 2026 14:44
@duck-types
duck-types changed the base branch from main to fix/abigen-bug-lisp_list September 14, 2026 14:46
@duck-types
duck-types force-pushed the fix/exec-report-offchainTokenData branch 2 times, most recently from 5afe581 to 2e4a7c0 Compare September 14, 2026 18:06
@duck-types
duck-types requested a lite review from Copilot September 14, 2026 19:44
@duck-types
duck-types marked this pull request as ready for review September 14, 2026 19:44
@duck-types
duck-types requested a review from a team as a code owner September 14, 2026 19:44

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.

🟡 Changes recommended

One or more issues must be addressed before approval.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Adds TON support for offchainTokenData, migrates token administration to a standalone registry, and introduces CCV/fee-query bindings.

Changes:

  • Updates CCIP dependencies and registry deployment models.
  • Adds Lisp-list and execute-report serialization support.
  • Adds token-pool CCV queries, fee getters, and array encoding.
File summaries
File Description
staging-monitor/go.mod Updated as part of this pull request.
scripts/oplint/lock.nix Updated as part of this pull request.
scripts/oplint/default.nix Updated as part of this pull request.
scripts/.chainlink-ton_version Updated as part of this pull request.
pkg/ccip/ocr/contract_transmitter_test.go Updated as part of this pull request.
pkg/ccip/model/router.go Updated as part of this pull request.
pkg/ccip/model/offramp.go Updated as part of this pull request.
pkg/ccip/chainaccessor/config.go Updated as part of this pull request.
pkg/ccip/bindings/tokenregistry/tokenregistry.go Updated as part of this pull request.
pkg/ccip/bindings/tokenpool/types.go Updated as part of this pull request.
pkg/ccip/bindings/tokenpool/reader.go Updated as part of this pull request.
pkg/ccip/bindings/tokenpool/lockreleaselockbox/reader.go Updated as part of this pull request.
pkg/ccip/bindings/tokenpool/lockrelease/reader.go Updated as part of this pull request.
pkg/ccip/bindings/tokenpool/burnmint/reader.go Updated as part of this pull request.
pkg/ccip/bindings/tokenadminregistryentry/token_admin_registry_entry.go Updated as part of this pull request.
pkg/ccip/bindings/tokenadminregistry/token_admin_registry.go Updated as part of this pull request.
pkg/ccip/bindings/router/router.go Updated as part of this pull request.
pkg/ccip/bindings/onramp/onramp.go Updated as part of this pull request.
pkg/ccip/bindings/offramp/reader.go Updated as part of this pull request.
pkg/ccip/bindings/offramp/offramp.go Updated as part of this pull request.
pkg/ccip/bindings/offramp/offramp_test.go Updated as part of this pull request.
pkg/ccip/bindings/offramp/exitcode_string.go Updated as part of this pull request.
pkg/ccip/bindings/ccipsendexecutor/ccipsendexecutor.go Updated as part of this pull request.
pkg/bindings/index.go Updated as part of this pull request.
integration-tests/model/router_test.go Updated as part of this pull request.
integration-tests/go.mod Updated as part of this pull request.
integration-tests/deployment/ccip/token_adapter_test.go Updated as part of this pull request.
integration-tests/deployment/ccip/cs_transfer_ownership_test.go Updated as part of this pull request.
integration-tests/deployment/ccip/cs_test.go Updated as part of this pull request.
go.sum Updated as part of this pull request.
go.mod Updated as part of this pull request.
flake.nix Updated as part of this pull request.
devenv/go.mod Updated as part of this pull request.
deployment/testadapter/test_adapter.go Updated as part of this pull request.
deployment/state/state.go Updated as part of this pull request.
deployment/go.mod Updated as part of this pull request.
deployment/ccip/sequence/deploy_ccip.go Updated as part of this pull request.
deployment/ccip/cs_test_helpers.go Updated as part of this pull request.
deployment/ccip/config/deploy.go Updated as part of this pull request.
deployment/ccip/1_6_0/sequences/tokens.go Updated as part of this pull request.
deployment/ccip/1_6_0/sequences/deploy_chain_contracts.go Updated as part of this pull request.
contracts/wrappers/TokenAdminRegistryEntry.compile.ts Updated as part of this pull request.
contracts/wrappers/TokenAdminRegistry.compile.ts Updated as part of this pull request.
contracts/wrappers/tests.examples.LispList.compile.ts Updated as part of this pull request.
contracts/wrappers/gen/ccip/TokenRegistry.ts Updated as part of this pull request.
contracts/wrappers/gen/ccip/test/MockAdvancedPoolHooks.ts Updated as part of this pull request.
contracts/wrappers/gen/ccip/MerkleRoot.ts Updated as part of this pull request.
contracts/wrappers/firedrill/FiredrillOffRamp.ts Updated as part of this pull request.
contracts/tests/gas-report/ccip/messaging/OnRamp.spec.ts Updated as part of this pull request.
contracts/tests/gas-report/ccip/messaging/OffRamp.spec.ts Updated as part of this pull request.
contracts/tests/gas-report/ccip/messaging/FeeQuoter.spec.ts Updated as part of this pull request.
contracts/tests/ccip/sendExecutor/SendExecutor.spec.ts Updated as part of this pull request.
contracts/tests/ccip/router/Router.Setup.ts Updated as part of this pull request.
contracts/tests/ccip/receiveExecutor/ReceiveExecutor.execution.spec.ts Updated as part of this pull request.
contracts/tests/ccip/pools/LockReleaseTokenPool.spec.ts Updated as part of this pull request.
contracts/tests/ccip/pools/LockReleaseLockboxTokenPool.spec.ts Updated as part of this pull request.
contracts/tests/ccip/pools/BurnMintTokenPool.spec.ts Updated as part of this pull request.
contracts/tests/ccip/onramp/OnRamp.Setup.ts Updated as part of this pull request.
contracts/tests/ccip/onramp/OnRamp.send.spec.ts Updated as part of this pull request.
contracts/tests/ccip/onramp/OnRamp.generateMessageID.spec.ts Updated as part of this pull request.
contracts/tests/ccip/onramp/OnRamp.executorExited.spec.ts Updated as part of this pull request.
contracts/tests/ccip/offramp/OffRamp.Setup.ts Updated as part of this pull request.
contracts/tests/ccip/offramp/OffRamp.execute.spec.ts Updated as part of this pull request.
contracts/tests/ccip/merkleRoot/MerkleRoot.spec.ts Updated as part of this pull request.
contracts/tests/ccip/e2e/CCIPSendWithTokenTransfer.spec.ts Updated as part of this pull request.
contracts/scripts/generateContractsPkg.ts Updated as part of this pull request.
contracts/contracts/firedrill/firedrill_offramp.tolk Updated as part of this pull request.
contracts/contracts/ccip/token_registry/types.tolk Updated as part of this pull request.
contracts/contracts/ccip/token_registry/messages.tolk Updated as part of this pull request.
contracts/contracts/ccip/token_registry/contract.tolk Updated as part of this pull request.
contracts/contracts/ccip/token_admin_registry/types.tolk Updated as part of this pull request.
contracts/contracts/ccip/token_admin_registry/storage.tolk Updated as part of this pull request.
contracts/contracts/ccip/token_admin_registry/messages.tolk Updated as part of this pull request.
contracts/contracts/ccip/token_admin_registry/events.tolk Updated as part of this pull request.
contracts/contracts/ccip/token_admin_registry/errors.tolk Updated as part of this pull request.
contracts/contracts/ccip/token_admin_registry/contract.tolk Updated as part of this pull request.
contracts/contracts/ccip/token_admin_registry_entry/types.tolk Updated as part of this pull request.
contracts/contracts/ccip/token_admin_registry_entry/storage.tolk Updated as part of this pull request.
contracts/contracts/ccip/token_admin_registry_entry/messages.tolk Updated as part of this pull request.
contracts/contracts/ccip/token_admin_registry_entry/errors.tolk Updated as part of this pull request.
contracts/contracts/ccip/token_admin_registry_entry/contract.tolk Updated as part of this pull request.
contracts/contracts/ccip/test/mock_advanced_pool_hooks.tolk Updated as part of this pull request.
contracts/contracts/ccip/router/types.tolk Updated as part of this pull request.
contracts/contracts/ccip/router/storage.tolk Updated as part of this pull request.
contracts/contracts/ccip/router/messages.tolk Updated as part of this pull request.
contracts/contracts/ccip/router/contract.tolk Updated as part of this pull request.
contracts/contracts/ccip/receive_executor/types.tolk Updated as part of this pull request.
contracts/contracts/ccip/receive_executor/messages.tolk Updated as part of this pull request.
contracts/contracts/ccip/receive_executor/contract.tolk Updated as part of this pull request.
contracts/contracts/ccip/pools/TokenPool.tolk Updated as part of this pull request.
contracts/contracts/ccip/pools/lock_release/messages.tolk Updated as part of this pull request.
contracts/contracts/ccip/pools/lock_release/contract.tolk Updated as part of this pull request.
contracts/contracts/ccip/pools/lock_release_lockbox/messages.tolk Updated as part of this pull request.
contracts/contracts/ccip/pools/lock_release_lockbox/contract.tolk Updated as part of this pull request.
contracts/contracts/ccip/pools/lib/token_pool/messages.tolk Updated as part of this pull request.
contracts/contracts/ccip/pools/burn_mint/messages.tolk Updated as part of this pull request.
contracts/contracts/ccip/pools/burn_mint/contract.tolk Updated as part of this pull request.
contracts/contracts/ccip/onramp/types.tolk Updated as part of this pull request.
contracts/contracts/ccip/onramp/storage.tolk Updated as part of this pull request.
contracts/contracts/ccip/onramp/messages.tolk Updated as part of this pull request.
contracts/contracts/ccip/onramp/contract.tolk Updated as part of this pull request.
contracts/contracts/ccip/offramp/types.tolk Updated as part of this pull request.
contracts/contracts/ccip/offramp/messages.tolk Updated as part of this pull request.
contracts/contracts/ccip/offramp/errors.tolk Updated as part of this pull request.
contracts/contracts/ccip/offramp/contract.tolk Updated as part of this pull request.
contracts/contracts/ccip/merkle_root/messages.tolk Updated as part of this pull request.
contracts/contracts/ccip/merkle_root/contract.tolk Updated as part of this pull request.
contracts/contracts/ccip/ccipsend_executor/types.tolk Updated as part of this pull request.
contracts/contracts/ccip/ccipsend_executor/messages.tolk Updated as part of this pull request.
contracts/contracts/ccip/ccipsend_executor/contract.tolk Updated as part of this pull request.
contracts/Acton.toml Updated as part of this pull request.
cmd/chainlink-ton/lock.nix Updated as part of this pull request.
cmd/chainlink-ton/default.nix Updated as part of this pull request.
cmd/chainlink-ton-extras/lock.nix Updated as part of this pull request.
cmd/chainlink-ton-extras/default.nix Updated as part of this pull request.
cciplib/ccip/codec/msghasher_test.go Updated as part of this pull request.
cciplib/ccip/codec/executecodec.go Updated as part of this pull request.
cciplib/ccip/codec/executecodec_test.go Updated as part of this pull request.
cciplib/ccip/bindings/onramp/onramp.go Updated as part of this pull request.
cciplib/ccip/bindings/onramp/onramp_test.go Updated as part of this pull request.
cciplib/ccip/bindings/ocr/executereport.go Updated as part of this pull request.
cciplib/ccip/bindings/ocr/executereport_test.go Updated as part of this pull request.
cciplib/ccip/bindings/common/common.go Updated as part of this pull request.
.github/workflows/dependabot-lock-nix-fixup.yml Updated as part of this pull request.
Review details

Suppressed comments (3)

contracts/contracts/ccip/offramp/types.tolk:17

  • This says no-token reports use an empty outer list, but onExecuteSingleReport immediately requires offchainTokenData.asSingle(), so the valid wire shape is a singleton outer list whose inner list is empty. Please document the required [[]] shape here (or change the contract validation) so the ABI contract is not misleading.
    // An empty list when the report carries no token transfers; otherwise each
    // outer entry is a message and each inner entry is that message's token-data blob.

contracts/contracts/ccip/onramp/contract.tolk:280

  • OnRamp derives the registry entry from its own executor.deployableCode, while the registry derives the same address from st.entryDeployment.deployableCode. These are independent storage fields and can differ when a registry is reused or upgraded, so token sends can query an uninitialized address even though registration succeeded. Use the registry's canonical deployment code or enforce a code-hash match during configuration.
        tokenRegistry = TokenAdminRegistryEntry.deriveAddress(
            deployables.getExecutorDeployment().deployableCode,
            token,
            deployables.getTokenAdminRegistry(),
        ).calculateAddress();

deployment/ccip/1_6_0/sequences/tokens.go:572

  • RegisterToken derives the entry address inside the registry using its stored entryDeployment.deployableCode, but this sequence derives it from locally retrieved compiledContracts. If the datastore points to an existing registry deployed from another package/version, the hashes differ: registration deploys one address while this wait polls another and checks the local entry code. Read the registry's configured deployment or reject a package/version mismatch before registering.
  • Files reviewed: 138/139 changed files
  • Comments generated: 6
  • Review effort level: Lite

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

Comment thread cciplib/ccip/bindings/common/common.go Outdated
Comment thread cciplib/ccip/codec/executecodec.go Outdated
Comment thread contracts/contracts/ccip/offramp/types.tolk
Comment thread contracts/contracts/ccip/onramp/storage.tolk
Comment thread contracts/contracts/ccip/token_admin_registry/contract.tolk
Comment thread pkg/ccip/bindings/ccipsendexecutor/ccipsendexecutor.go
Base automatically changed from fix/abigen-bug-lisp_list to main September 14, 2026 21:41
@duck-types
duck-types force-pushed the fix/exec-report-offchainTokenData branch from 698b0ad to 8059c47 Compare September 14, 2026 21:44

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.

🟡 Changes recommended

Address the reported serialization, forwarding, retry, documentation, and integration-coverage issues.

Get a fresh assessment by requesting another Copilot review.

Review details

Files not reviewed (1)

  • pkg/ccip/bindings/offramp/exitcode_string.go: Generated file

Suppressed comments (2)

cciplib/ccip/bindings/common/common.go:598

  • ToCell does not enforce the same chain-depth bound as LoadFromCell, so a report with more than 512 off-chain entries can be serialized into a list that the TVM/decoder cannot consume, after doing unbounded work. Reject lists over MaxCellChainDepth before building the chain (and cover the boundary in a test).
func (l LispList[T]) ToCell() (*cell.Cell, error) {
	tail := tvm.EmptyCell
	for i, v := range l {

contracts/contracts/ccip/offramp/contract.tolk:950

  • The new forwarding path is only exercised with Cell.EMPTY in the end-to-end token-transfer/PTT tests, and getTokenTransfer deliberately converts that sentinel to null. A regression in nested-list decoding or forwarding the actual blob would therefore pass; add a non-empty offchain-data case and assert that the TokenPool_ReleaseOrMintInV1 request contains the blob.
    val registryAddress = TokenAdminRegistryEntry.deriveAddress(
  • Files reviewed: 27/28 changed files
  • Comments generated: 3
  • Review effort level: Lite

Comment on lines 29 to 30
self.transfer = transfer.toCell();
return self

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.

Hey @krebernisak what's the desired behaviour here?

let tokenData = offchainTokenData
if (tokenData === undefined) {
tokenData = messages.map((msg) =>
msg.tokenAmounts ? msg.tokenAmounts.map(() => Cell.EMPTY) : [],
Comment thread contracts/contracts/ccip/offramp/types.tolk
Comment thread cciplib/ccip/bindings/ocr/executereport.go Outdated

@vicentevieytes vicentevieytes left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

lgtm

@duck-types
duck-types merged commit 6ba5e82 into main Sep 15, 2026
37 checks passed
@duck-types
duck-types deleted the fix/exec-report-offchainTokenData branch September 15, 2026 18:55
nicolasgnr pushed a commit that referenced this pull request Sep 16, 2026
…ta` (#884)

* feat: ExecuteReport now includes offchainTokenData (lisp_list)

* ref: lisp_list<lisp_list<cell>> multi message multi token

* fix: chainReport.OffchainTokenData could be nil

* doc: oudated comment

* test: offchainTokenData gets to the TokenPool
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.

3 participants