Skip to content

Add withdrawable fee jettons via JettonWithdrawable - #833

Merged
krebernisak merged 47 commits into
mainfrom
feat/fee-withdraw
Sep 7, 2026
Merged

krebernisak merged 47 commits into
mainfrom
feat/fee-withdraw

Conversation

@krebernisak

@krebernisak krebernisak commented Aug 18, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Adds withdrawal of accrued fee jettons to the TON TokenPools via a new shared, stateless handler, JettonWithdrawable (lib/funding/jetton_withdrawable.tolk), mirroring EVM FeeTokenHandler.WithdrawFeeTokens.

This replaces the per-pool manual fee sweep with a generalized, msg-driven flow that all three pool families can share.

Highlights

Shared handler (JettonWithdrawable)

  • onWithdraw(msgValue, sender, msg, maxAmount, allowedRecipients) -> coins relays caller-supplied AskToTransfer pairs to the specified jetton wallets.
  • Enforces, in a single loop:
    • inbound-value coverage: msgValue >= running sum(transfer.value) + MIN_RESERVE,
    • per-transfer maxAmount bound,
    • optional allowedRecipients allowlist (throws ZeroAddressNotAllowed for zero/none dest regardless), and a no-customPayload guard.
  • Each relayed ask is tagged with a WithdrawContext (opcode + initiator) via customPayload, so a bounce is recognized and the initiator is notified with a WithdrawFailed reply (onWithdrawBounced).

Pool wiring

  • burn/mint & lockbox: use the base unbounded relay, and onBouncedMessage is extended to discriminate a fee-withdraw AskToTransfer bounce from the existing pool-op asks.
  • lock/release (no-lockbox demo): keeps the extra accruedFees ledger. Fees accrue on confirmed lock settle (onLockOrBurnTransferContinueWithFeeSettlement); withdrawals are bounded by the ledger and decrement it by the total actually moved (onWithdrawFeeTokensBounded, maxAmount = st.accruedFees). A bounced withdraw ask re-credits the ledger.
  • Adds JettonWithdrawable_Withdraw as a TokenPool_InMessage, dispatched on onInternalMessage to onWithdrawFeeTokensDispatch.

Tests

  • Shared TokenPool.withdrawFeeTokens.behavior.ts runs in all three pool specs (LockRelease, BurnMint, Lockbox): accrues-on-lock, withdraw-as-owner, withdraw-as-feeAdmin, reject-non-owner.
  • Bounded-ledger overdraw-guard test (lock/release only).
  • New bounce-discrimination coverage for the withdraw ask in each family.

Notes

  • Auth (owner / fee-admin) is enforced by the caller before invoking the handler; the handler itself only enforces the per-transfer allowlist/limit/value guards.
  • Follow-up (see onramp/messages.tolk TODO): migrate the OnRamp's native-TON WithdrawFeeTokens to this shared handler so it can also sweep fee jettons.

@krebernisak
krebernisak requested a review from a team as a code owner August 18, 2026 08:39
@nicolasgnr nicolasgnr added the Flag label Sep 1, 2026
duck-types
duck-types previously approved these changes Sep 2, 2026
vicentevieytes
vicentevieytes previously approved these changes Sep 3, 2026
duck-types
duck-types previously approved these changes Sep 4, 2026

@duck-types duck-types 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.

I'm not 100% sold on the opcode manual parsing

/// Parses a `Jetton_ForwardPayloadWrap` from a `forwardPayload`, or `null`
@inline
fun Jetton_ForwardPayloadWrap.from(forwardPayload: ForwardPayloadRemainder): Jetton_ForwardPayloadWrap? {
val wrapCell = loadForwardPayloadAsCell(forwardPayload);

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.

You are potentially allocating an extra cell unecessarily.

Suggested change
val wrapCell = loadForwardPayloadAsCell(forwardPayload);
val wrapSlice = loadForwardPayloadAsSlice(forwardPayload);

Comment on lines +33 to +36
var s = wrapCell.beginParse();
if (s.loadUint(32) != Jetton_ForwardPayloadWrap_OPCODE) {
return null;
}

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.

Why don't you use builtin decoder?

Suggested change
var s = wrapCell.beginParse();
if (s.loadUint(32) != Jetton_ForwardPayloadWrap_OPCODE) {
return null;
}
val UnpackException = 0xff
try {
return Jetton_ForwardPayloadWrap.fromCell(wrapCell, UnpackOptions { throwIfOpcodeDoesNotMatch: UnpackException})
} catch (e) {
if (e is UnpackException) {
return null;
}
throw e;
}

Alternativelly, you can use reflect.serializationPrefixOf to get the opcode instead of having a constant

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.

You can also use a lazy loading + match

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.

Sure, polished code here


struct (0x2d61600c) Jetton_ForwardPayloadWrap {
/// The address the tagged operation is reported back to on failure.
initiator: address

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.

Shouldn't this go inside the context, too? It's only used when the message bounces

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've put this in the wrap for convenience as in most cases you will at least need the initiator.

@krebernisak
krebernisak enabled auto-merge (squash) September 7, 2026 11:57
@krebernisak
krebernisak merged commit 54816ba into main Sep 7, 2026
37 checks passed
@krebernisak
krebernisak deleted the feat/fee-withdraw branch September 7, 2026 12:31
vicentevieytes pushed a commit that referenced this pull request Sep 7, 2026
* Add TP <> ContextExecutor integration to support async flow continuation

* Stash current behaviour - throw on error in transfer continuation

* Lock or burn transfer error handling and return

* LockReleaseLockboxTokenPool use ContextExecutor vs. local st

* yarn fmt

* Fix lint

* Update Go bindings

* Share code in TP lib + docs

* CE - wait for deploy confirmation before continuation

* Fix golangci-lint

* Remove local review

* Add TODOs for forwardTonAmount

* Migrate CE to OffRampAccount to support async flow

* Fix lock_release & lockbox flow

* Embed AskToTransfer in oa withdraw, check msg.transferInitiator == null on mint

* Document OffRampAccount contract

* TP compose consumeIn/OutboundRateLimit functions

* Replace CE on burn_mint burn path with CCT burn flow fwdPayload

* Fix oplint

* rm tests/debug_cells.test.ts

* Add OnRampAccount + handle TP deposit auth

* Improve TP error handling - return transfer

* PR feedback - missing lazy

* DepositAccount contract for on/off-ramp escrows

* Remove DepositAccount allowedJettonWallet

* Fix lint

* DepositAccount Go bindings

* Simplify deposit acc bounce handling

* Add withdrawable fee jettons via JettonWithdrawable

* Fix lint

* Add Go bindings + tlbe.Array

* Polish docs and fix lint

* Remove CE files post merge, polish

* Polish + rm unused compilation targets

* Fix lock/release tp fee withdrawal + Go bindings

* Add proper isZeroAddress check

* Fix withdrawable maxAmount checks

* Improve value check onWithdraw via reserve

* Add Jetton_ForwardPayloadWrap, used by JettonWithdrawable

* Remove duplicated field - ctx.withdrawInitiator

* PR feedback + polish

* Fix oplint

* Fix Go binding - lock/release storage
vicentevieytes added a commit that referenced this pull request Sep 11, 2026
* Add token_admin_registry parent contract

* outline propose/accept admin access control

* CCIP owner registration/ two-step admin lifecycle

* registration should be idempotent, events should be emitted by root

* decouple TokenAdminRegistry from the Router

* rename messages to correct prefix, add version to tokenInfo

* fix all existing test-suites after latest changes

* add tokenAdminRegistry.spec.ts test suite

* refactor onramp storage + off-chain bindings/deploy

* Update contracts/contracts/ccip/ccipsend_executor/messages.tolk

* ref: simplify internal messages and logic to handle single token transfer (#838)

* [NONEVM-5607] Overflow Static Analyzer (#802)

* feat: overflow static analyzer

* ref: move shared toml.ts lib

* feat: run with nix

* feat: add type notation

* fix: fmt and wrong file

* fix: comments

* TP deposit & async flow auth (deposit/withdraw accounts + CCT) (#814)

* Add TP <> ContextExecutor integration to support async flow continuation

* Stash current behaviour - throw on error in transfer continuation

* Lock or burn transfer error handling and return

* LockReleaseLockboxTokenPool use ContextExecutor vs. local st

* yarn fmt

* Fix lint

* Update Go bindings

* Share code in TP lib + docs

* CE - wait for deploy confirmation before continuation

* Fix golangci-lint

* Remove local review

* Add TODOs for forwardTonAmount

* Migrate CE to OffRampAccount to support async flow

* Fix lock_release & lockbox flow

* Embed AskToTransfer in oa withdraw, check msg.transferInitiator == null on mint

* Document OffRampAccount contract

* TP compose consumeIn/OutboundRateLimit functions

* Replace CE on burn_mint burn path with CCT burn flow fwdPayload

* Fix oplint

* rm tests/debug_cells.test.ts

* Add OnRampAccount + handle TP deposit auth

* Improve TP error handling - return transfer

* PR feedback - missing lazy

* Fix lint

* Fix test

* dependabump: update hashes (#856)

* DepositAccount contract for on/off-ramp escrows (#831)

* Add TP <> ContextExecutor integration to support async flow continuation

* Stash current behaviour - throw on error in transfer continuation

* Lock or burn transfer error handling and return

* LockReleaseLockboxTokenPool use ContextExecutor vs. local st

* yarn fmt

* Fix lint

* Update Go bindings

* Share code in TP lib + docs

* CE - wait for deploy confirmation before continuation

* Fix golangci-lint

* Remove local review

* Add TODOs for forwardTonAmount

* Migrate CE to OffRampAccount to support async flow

* Fix lock_release & lockbox flow

* Embed AskToTransfer in oa withdraw, check msg.transferInitiator == null on mint

* Document OffRampAccount contract

* TP compose consumeIn/OutboundRateLimit functions

* Replace CE on burn_mint burn path with CCT burn flow fwdPayload

* Fix oplint

* rm tests/debug_cells.test.ts

* Add OnRampAccount + handle TP deposit auth

* Improve TP error handling - return transfer

* PR feedback - missing lazy

* DepositAccount contract for on/off-ramp escrows

* Remove DepositAccount allowedJettonWallet

* Fix lint

* DepositAccount Go bindings

* Simplify deposit acc bounce handling

* Post merge fix - rm accounts/off_ramp_account

* Remove ContextExecutor contract - replaced with deposit acc

* Update Go bindings and add TP contracts to pkg archive

* Fix Go bindings - exit codes

* Update pool FQN and exit codes

* Fix exit codes

* nix: move acton and mkTsScriptApp to closure (#859)

* [NONEVM-5813] Delete mock Token Pool contract (#840)

* feat: use LockRelease TokenPool for tests

* fix: go tests and deployment sequences

* fix: missing Pools in the generator script

* fix: DepositAccount code missing from Token Pool

* fix: pin ton version

* dependabump (#853)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* [NONEVM-5812] Fix issues to run the e2e devenv test with TON as dest (#851)

* fix: DefaultTokenDestGasOverhead

* fix: fund LockRelease Token Pool

* fix: golint

* feat: fetch DepositAccount from TP

* fix: missmatch in Any2TVMTokenTransfer go binding

* doc: TODO missing gap

* fix: Execute amount didn't account for TokenTransfer flow

* fix: extractDestGasAmountFromMap should handle int64

* fix: update DefaultTokenDestGasOverhead

* fix: offramp missing from TokenPool config

* fix: broken TokenPool funding

* DataStore was outdated
* error finding TP in Datastore was ignored
* Missing wait and check after minting

* fix: raise forwardTonAmount on offRamp account notification

* fix: ExtraData is optional

* fix: nix hash

* test: updated gas calculation in transmiter

* fix: OffRamp_DispatchValidated value too low

* chore: bump imports to chainlink-ccip/deployment

* chore: bump imports to chainlink-ccip/deployment

* fix: unpin ton version

* fix: breaking change

* fix: ping ugorji/go/codec version

* fix: mock UltraFastCurseMCMS

* [NONEVM-5812] Run the e2e devenv test with TON as dest (#858)

* fix: remove local replace for cciplib

* fix: nix hash

* fix: remove env var guard on token transfer config and pool funding

* fix: bump to latest in feat/e2e-ton-as-dest

* Resolve contracts pkg relative paths via CWD (#870)

* Resolve loader relative paths via CWD

* Remove stale test

* Update .core_version - long running branch, build fix

* Bump ContractsPackageLatestSupported to contracts/1.6.2

* bump dependencies (#863)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* [WIP] Fix lodash & protobufjs (#861)

* fix lodash & protobufjs

* update lock.nix

* fixes

* Update to nixpkgs >= 26.11, drop x86_64-darwin support

* lint

* fix lint

* nix

* nix

* nix

* nix

* nix

* mockery

---------

Co-authored-by: Kristijan <kristijan.rebernisak@gmail.com>

* Add withdrawable fee jettons via JettonWithdrawable (#833)

* Add TP <> ContextExecutor integration to support async flow continuation

* Stash current behaviour - throw on error in transfer continuation

* Lock or burn transfer error handling and return

* LockReleaseLockboxTokenPool use ContextExecutor vs. local st

* yarn fmt

* Fix lint

* Update Go bindings

* Share code in TP lib + docs

* CE - wait for deploy confirmation before continuation

* Fix golangci-lint

* Remove local review

* Add TODOs for forwardTonAmount

* Migrate CE to OffRampAccount to support async flow

* Fix lock_release & lockbox flow

* Embed AskToTransfer in oa withdraw, check msg.transferInitiator == null on mint

* Document OffRampAccount contract

* TP compose consumeIn/OutboundRateLimit functions

* Replace CE on burn_mint burn path with CCT burn flow fwdPayload

* Fix oplint

* rm tests/debug_cells.test.ts

* Add OnRampAccount + handle TP deposit auth

* Improve TP error handling - return transfer

* PR feedback - missing lazy

* DepositAccount contract for on/off-ramp escrows

* Remove DepositAccount allowedJettonWallet

* Fix lint

* DepositAccount Go bindings

* Simplify deposit acc bounce handling

* Add withdrawable fee jettons via JettonWithdrawable

* Fix lint

* Add Go bindings + tlbe.Array

* Polish docs and fix lint

* Remove CE files post merge, polish

* Polish + rm unused compilation targets

* Fix lock/release tp fee withdrawal + Go bindings

* Add proper isZeroAddress check

* Fix withdrawable maxAmount checks

* Improve value check onWithdraw via reserve

* Add Jetton_ForwardPayloadWrap, used by JettonWithdrawable

* Remove duplicated field - ctx.withdrawInitiator

* PR feedback + polish

* Fix oplint

* Fix Go binding - lock/release storage

* applied simple PR comments

* fix missing event topics, revert rename

* move tokenRegistry into CCIPSendExecutor_Config

* route admin lifecycle through root contract

* remove SetTokenInfo and stick to SetPool setter

* add queryId, fix comment

* fix opcode oplint

* fmt

* fix model and tests to support tokenadminregistry

* bump cciplib

* update lock.nix files

* fix lock.nix again

* one more lock.nix

* local replace cciplib

* pin chainlink-ton version

* fix nix config to never use vendor for go mods

* fix linter

* deployment lint

---------

Co-authored-by: Patricio <contact@patricios.space>
Co-authored-by: Kristijan Rebernisak <kristijan.rebernisak@smartcontract.com>
Co-authored-by: Jordan Krage <jmank88@gmail.com>
Co-authored-by: André Vitor de Lima Matos <andre.vmatos@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: NicolasM <nicolasgnr@gmail.com>
Co-authored-by: Kristijan <kristijan.rebernisak@gmail.com>
vicentevieytes added a commit that referenced this pull request Sep 15, 2026
…873)

* Add token_admin_registry parent contract

* outline propose/accept admin access control

* CCIP owner registration/ two-step admin lifecycle

* registration should be idempotent, events should be emitted by root

* decouple TokenAdminRegistry from the Router

* rename messages to correct prefix, add version to tokenInfo

* fix all existing test-suites after latest changes

* add tokenAdminRegistry.spec.ts test suite

* refactor onramp storage + off-chain bindings/deploy

* Update contracts/contracts/ccip/ccipsend_executor/messages.tolk

* ref: simplify internal messages and logic to handle single token transfer (#838)

* [NONEVM-5607] Overflow Static Analyzer (#802)

* feat: overflow static analyzer

* ref: move shared toml.ts lib

* feat: run with nix

* feat: add type notation

* fix: fmt and wrong file

* fix: comments

* TP deposit & async flow auth (deposit/withdraw accounts + CCT) (#814)

* Add TP <> ContextExecutor integration to support async flow continuation

* Stash current behaviour - throw on error in transfer continuation

* Lock or burn transfer error handling and return

* LockReleaseLockboxTokenPool use ContextExecutor vs. local st

* yarn fmt

* Fix lint

* Update Go bindings

* Share code in TP lib + docs

* CE - wait for deploy confirmation before continuation

* Fix golangci-lint

* Remove local review

* Add TODOs for forwardTonAmount

* Migrate CE to OffRampAccount to support async flow

* Fix lock_release & lockbox flow

* Embed AskToTransfer in oa withdraw, check msg.transferInitiator == null on mint

* Document OffRampAccount contract

* TP compose consumeIn/OutboundRateLimit functions

* Replace CE on burn_mint burn path with CCT burn flow fwdPayload

* Fix oplint

* rm tests/debug_cells.test.ts

* Add OnRampAccount + handle TP deposit auth

* Improve TP error handling - return transfer

* PR feedback - missing lazy

* Fix lint

* Fix test

* dependabump: update hashes (#856)

* DepositAccount contract for on/off-ramp escrows (#831)

* Add TP <> ContextExecutor integration to support async flow continuation

* Stash current behaviour - throw on error in transfer continuation

* Lock or burn transfer error handling and return

* LockReleaseLockboxTokenPool use ContextExecutor vs. local st

* yarn fmt

* Fix lint

* Update Go bindings

* Share code in TP lib + docs

* CE - wait for deploy confirmation before continuation

* Fix golangci-lint

* Remove local review

* Add TODOs for forwardTonAmount

* Migrate CE to OffRampAccount to support async flow

* Fix lock_release & lockbox flow

* Embed AskToTransfer in oa withdraw, check msg.transferInitiator == null on mint

* Document OffRampAccount contract

* TP compose consumeIn/OutboundRateLimit functions

* Replace CE on burn_mint burn path with CCT burn flow fwdPayload

* Fix oplint

* rm tests/debug_cells.test.ts

* Add OnRampAccount + handle TP deposit auth

* Improve TP error handling - return transfer

* PR feedback - missing lazy

* DepositAccount contract for on/off-ramp escrows

* Remove DepositAccount allowedJettonWallet

* Fix lint

* DepositAccount Go bindings

* Simplify deposit acc bounce handling

* Post merge fix - rm accounts/off_ramp_account

* Remove ContextExecutor contract - replaced with deposit acc

* Update Go bindings and add TP contracts to pkg archive

* Fix Go bindings - exit codes

* Update pool FQN and exit codes

* Fix exit codes

* nix: move acton and mkTsScriptApp to closure (#859)

* [NONEVM-5813] Delete mock Token Pool contract (#840)

* feat: use LockRelease TokenPool for tests

* fix: go tests and deployment sequences

* fix: missing Pools in the generator script

* fix: DepositAccount code missing from Token Pool

* fix: pin ton version

* dependabump (#853)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* [NONEVM-5812] Fix issues to run the e2e devenv test with TON as dest (#851)

* fix: DefaultTokenDestGasOverhead

* fix: fund LockRelease Token Pool

* fix: golint

* feat: fetch DepositAccount from TP

* fix: missmatch in Any2TVMTokenTransfer go binding

* doc: TODO missing gap

* fix: Execute amount didn't account for TokenTransfer flow

* fix: extractDestGasAmountFromMap should handle int64

* fix: update DefaultTokenDestGasOverhead

* fix: offramp missing from TokenPool config

* fix: broken TokenPool funding

* DataStore was outdated
* error finding TP in Datastore was ignored
* Missing wait and check after minting

* fix: raise forwardTonAmount on offRamp account notification

* fix: ExtraData is optional

* fix: nix hash

* test: updated gas calculation in transmiter

* fix: OffRamp_DispatchValidated value too low

* chore: bump imports to chainlink-ccip/deployment

* chore: bump imports to chainlink-ccip/deployment

* fix: unpin ton version

* fix: breaking change

* fix: ping ugorji/go/codec version

* fix: mock UltraFastCurseMCMS

* [NONEVM-5812] Run the e2e devenv test with TON as dest (#858)

* fix: remove local replace for cciplib

* fix: nix hash

* fix: remove env var guard on token transfer config and pool funding

* fix: bump to latest in feat/e2e-ton-as-dest

* Resolve contracts pkg relative paths via CWD (#870)

* Resolve loader relative paths via CWD

* Remove stale test

* Update .core_version - long running branch, build fix

* Bump ContractsPackageLatestSupported to contracts/1.6.2

* bump dependencies (#863)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* [WIP] Fix lodash & protobufjs (#861)

* fix lodash & protobufjs

* update lock.nix

* fixes

* Update to nixpkgs >= 26.11, drop x86_64-darwin support

* lint

* fix lint

* nix

* nix

* nix

* nix

* nix

* mockery

---------

Co-authored-by: Kristijan <kristijan.rebernisak@gmail.com>

* Add withdrawable fee jettons via JettonWithdrawable (#833)

* Add TP <> ContextExecutor integration to support async flow continuation

* Stash current behaviour - throw on error in transfer continuation

* Lock or burn transfer error handling and return

* LockReleaseLockboxTokenPool use ContextExecutor vs. local st

* yarn fmt

* Fix lint

* Update Go bindings

* Share code in TP lib + docs

* CE - wait for deploy confirmation before continuation

* Fix golangci-lint

* Remove local review

* Add TODOs for forwardTonAmount

* Migrate CE to OffRampAccount to support async flow

* Fix lock_release & lockbox flow

* Embed AskToTransfer in oa withdraw, check msg.transferInitiator == null on mint

* Document OffRampAccount contract

* TP compose consumeIn/OutboundRateLimit functions

* Replace CE on burn_mint burn path with CCT burn flow fwdPayload

* Fix oplint

* rm tests/debug_cells.test.ts

* Add OnRampAccount + handle TP deposit auth

* Improve TP error handling - return transfer

* PR feedback - missing lazy

* DepositAccount contract for on/off-ramp escrows

* Remove DepositAccount allowedJettonWallet

* Fix lint

* DepositAccount Go bindings

* Simplify deposit acc bounce handling

* Add withdrawable fee jettons via JettonWithdrawable

* Fix lint

* Add Go bindings + tlbe.Array

* Polish docs and fix lint

* Remove CE files post merge, polish

* Polish + rm unused compilation targets

* Fix lock/release tp fee withdrawal + Go bindings

* Add proper isZeroAddress check

* Fix withdrawable maxAmount checks

* Improve value check onWithdraw via reserve

* Add Jetton_ForwardPayloadWrap, used by JettonWithdrawable

* Remove duplicated field - ctx.withdrawInitiator

* PR feedback + polish

* Fix oplint

* Fix Go binding - lock/release storage

* applied simple PR comments

* fix missing event topics, revert rename

* move tokenRegistry into CCIPSendExecutor_Config

* migrate build to acton for the main contracts, test contract code dependencies

* inline all subcontract deployable code

* fix linter

* refactor: move values into offramp/onramp static config structs

* remove legacy blueprint build for tact contracts from yarn build

* move acton outisde the with pkgs declaration

* fix acton runtime

* added missig lib dependencies

* fix contracts lock

* fmt ts

* add untracked testdata/ directory for tact contracts

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* fix identation

* migration functions for onramp and offramp

* fmt

* add compile call on abigen before generating the wrappers

---------

Co-authored-by: Patricio <contact@patricios.space>
Co-authored-by: Kristijan Rebernisak <kristijan.rebernisak@smartcontract.com>
Co-authored-by: Jordan Krage <jmank88@gmail.com>
Co-authored-by: André Vitor de Lima Matos <andre.vmatos@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: NicolasM <nicolasgnr@gmail.com>
Co-authored-by: Kristijan <kristijan.rebernisak@gmail.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
nicolasgnr added a commit that referenced this pull request Sep 16, 2026
…873)

* Add token_admin_registry parent contract

* outline propose/accept admin access control

* CCIP owner registration/ two-step admin lifecycle

* registration should be idempotent, events should be emitted by root

* decouple TokenAdminRegistry from the Router

* rename messages to correct prefix, add version to tokenInfo

* fix all existing test-suites after latest changes

* add tokenAdminRegistry.spec.ts test suite

* refactor onramp storage + off-chain bindings/deploy

* Update contracts/contracts/ccip/ccipsend_executor/messages.tolk

* ref: simplify internal messages and logic to handle single token transfer (#838)

* [NONEVM-5607] Overflow Static Analyzer (#802)

* feat: overflow static analyzer

* ref: move shared toml.ts lib

* feat: run with nix

* feat: add type notation

* fix: fmt and wrong file

* fix: comments

* TP deposit & async flow auth (deposit/withdraw accounts + CCT) (#814)

* Add TP <> ContextExecutor integration to support async flow continuation

* Stash current behaviour - throw on error in transfer continuation

* Lock or burn transfer error handling and return

* LockReleaseLockboxTokenPool use ContextExecutor vs. local st

* yarn fmt

* Fix lint

* Update Go bindings

* Share code in TP lib + docs

* CE - wait for deploy confirmation before continuation

* Fix golangci-lint

* Remove local review

* Add TODOs for forwardTonAmount

* Migrate CE to OffRampAccount to support async flow

* Fix lock_release & lockbox flow

* Embed AskToTransfer in oa withdraw, check msg.transferInitiator == null on mint

* Document OffRampAccount contract

* TP compose consumeIn/OutboundRateLimit functions

* Replace CE on burn_mint burn path with CCT burn flow fwdPayload

* Fix oplint

* rm tests/debug_cells.test.ts

* Add OnRampAccount + handle TP deposit auth

* Improve TP error handling - return transfer

* PR feedback - missing lazy

* Fix lint

* Fix test

* dependabump: update hashes (#856)

* DepositAccount contract for on/off-ramp escrows (#831)

* Add TP <> ContextExecutor integration to support async flow continuation

* Stash current behaviour - throw on error in transfer continuation

* Lock or burn transfer error handling and return

* LockReleaseLockboxTokenPool use ContextExecutor vs. local st

* yarn fmt

* Fix lint

* Update Go bindings

* Share code in TP lib + docs

* CE - wait for deploy confirmation before continuation

* Fix golangci-lint

* Remove local review

* Add TODOs for forwardTonAmount

* Migrate CE to OffRampAccount to support async flow

* Fix lock_release & lockbox flow

* Embed AskToTransfer in oa withdraw, check msg.transferInitiator == null on mint

* Document OffRampAccount contract

* TP compose consumeIn/OutboundRateLimit functions

* Replace CE on burn_mint burn path with CCT burn flow fwdPayload

* Fix oplint

* rm tests/debug_cells.test.ts

* Add OnRampAccount + handle TP deposit auth

* Improve TP error handling - return transfer

* PR feedback - missing lazy

* DepositAccount contract for on/off-ramp escrows

* Remove DepositAccount allowedJettonWallet

* Fix lint

* DepositAccount Go bindings

* Simplify deposit acc bounce handling

* Post merge fix - rm accounts/off_ramp_account

* Remove ContextExecutor contract - replaced with deposit acc

* Update Go bindings and add TP contracts to pkg archive

* Fix Go bindings - exit codes

* Update pool FQN and exit codes

* Fix exit codes

* nix: move acton and mkTsScriptApp to closure (#859)

* [NONEVM-5813] Delete mock Token Pool contract (#840)

* feat: use LockRelease TokenPool for tests

* fix: go tests and deployment sequences

* fix: missing Pools in the generator script

* fix: DepositAccount code missing from Token Pool

* fix: pin ton version

* dependabump (#853)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* [NONEVM-5812] Fix issues to run the e2e devenv test with TON as dest (#851)

* fix: DefaultTokenDestGasOverhead

* fix: fund LockRelease Token Pool

* fix: golint

* feat: fetch DepositAccount from TP

* fix: missmatch in Any2TVMTokenTransfer go binding

* doc: TODO missing gap

* fix: Execute amount didn't account for TokenTransfer flow

* fix: extractDestGasAmountFromMap should handle int64

* fix: update DefaultTokenDestGasOverhead

* fix: offramp missing from TokenPool config

* fix: broken TokenPool funding

* DataStore was outdated
* error finding TP in Datastore was ignored
* Missing wait and check after minting

* fix: raise forwardTonAmount on offRamp account notification

* fix: ExtraData is optional

* fix: nix hash

* test: updated gas calculation in transmiter

* fix: OffRamp_DispatchValidated value too low

* chore: bump imports to chainlink-ccip/deployment

* chore: bump imports to chainlink-ccip/deployment

* fix: unpin ton version

* fix: breaking change

* fix: ping ugorji/go/codec version

* fix: mock UltraFastCurseMCMS

* [NONEVM-5812] Run the e2e devenv test with TON as dest (#858)

* fix: remove local replace for cciplib

* fix: nix hash

* fix: remove env var guard on token transfer config and pool funding

* fix: bump to latest in feat/e2e-ton-as-dest

* Resolve contracts pkg relative paths via CWD (#870)

* Resolve loader relative paths via CWD

* Remove stale test

* Update .core_version - long running branch, build fix

* Bump ContractsPackageLatestSupported to contracts/1.6.2

* bump dependencies (#863)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* [WIP] Fix lodash & protobufjs (#861)

* fix lodash & protobufjs

* update lock.nix

* fixes

* Update to nixpkgs >= 26.11, drop x86_64-darwin support

* lint

* fix lint

* nix

* nix

* nix

* nix

* nix

* mockery

---------

Co-authored-by: Kristijan <kristijan.rebernisak@gmail.com>

* Add withdrawable fee jettons via JettonWithdrawable (#833)

* Add TP <> ContextExecutor integration to support async flow continuation

* Stash current behaviour - throw on error in transfer continuation

* Lock or burn transfer error handling and return

* LockReleaseLockboxTokenPool use ContextExecutor vs. local st

* yarn fmt

* Fix lint

* Update Go bindings

* Share code in TP lib + docs

* CE - wait for deploy confirmation before continuation

* Fix golangci-lint

* Remove local review

* Add TODOs for forwardTonAmount

* Migrate CE to OffRampAccount to support async flow

* Fix lock_release & lockbox flow

* Embed AskToTransfer in oa withdraw, check msg.transferInitiator == null on mint

* Document OffRampAccount contract

* TP compose consumeIn/OutboundRateLimit functions

* Replace CE on burn_mint burn path with CCT burn flow fwdPayload

* Fix oplint

* rm tests/debug_cells.test.ts

* Add OnRampAccount + handle TP deposit auth

* Improve TP error handling - return transfer

* PR feedback - missing lazy

* DepositAccount contract for on/off-ramp escrows

* Remove DepositAccount allowedJettonWallet

* Fix lint

* DepositAccount Go bindings

* Simplify deposit acc bounce handling

* Add withdrawable fee jettons via JettonWithdrawable

* Fix lint

* Add Go bindings + tlbe.Array

* Polish docs and fix lint

* Remove CE files post merge, polish

* Polish + rm unused compilation targets

* Fix lock/release tp fee withdrawal + Go bindings

* Add proper isZeroAddress check

* Fix withdrawable maxAmount checks

* Improve value check onWithdraw via reserve

* Add Jetton_ForwardPayloadWrap, used by JettonWithdrawable

* Remove duplicated field - ctx.withdrawInitiator

* PR feedback + polish

* Fix oplint

* Fix Go binding - lock/release storage

* applied simple PR comments

* fix missing event topics, revert rename

* move tokenRegistry into CCIPSendExecutor_Config

* migrate build to acton for the main contracts, test contract code dependencies

* inline all subcontract deployable code

* fix linter

* refactor: move values into offramp/onramp static config structs

* remove legacy blueprint build for tact contracts from yarn build

* move acton outisde the with pkgs declaration

* fix acton runtime

* added missig lib dependencies

* fix contracts lock

* fmt ts

* add untracked testdata/ directory for tact contracts

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* fix identation

* migration functions for onramp and offramp

* fmt

* add compile call on abigen before generating the wrappers

---------

Co-authored-by: Patricio <contact@patricios.space>
Co-authored-by: Kristijan Rebernisak <kristijan.rebernisak@smartcontract.com>
Co-authored-by: Jordan Krage <jmank88@gmail.com>
Co-authored-by: André Vitor de Lima Matos <andre.vmatos@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: NicolasM <nicolasgnr@gmail.com>
Co-authored-by: Kristijan <kristijan.rebernisak@gmail.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants