Repository navigation
Add withdrawable fee jettons via JettonWithdrawable - #833
Conversation
f5cb23c
duck-types
left a comment
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
You are potentially allocating an extra cell unecessarily.
| val wrapCell = loadForwardPayloadAsCell(forwardPayload); | |
| val wrapSlice = loadForwardPayloadAsSlice(forwardPayload); |
| var s = wrapCell.beginParse(); | ||
| if (s.loadUint(32) != Jetton_ForwardPayloadWrap_OPCODE) { | ||
| return null; | ||
| } |
There was a problem hiding this comment.
Why don't you use builtin decoder?
| 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
There was a problem hiding this comment.
You can also use a lazy loading + match
There was a problem hiding this comment.
Sure, polished code here
|
|
||
| struct (0x2d61600c) Jetton_ForwardPayloadWrap { | ||
| /// The address the tagged operation is reported back to on failure. | ||
| initiator: address |
There was a problem hiding this comment.
Shouldn't this go inside the context, too? It's only used when the message bounces
There was a problem hiding this comment.
I've put this in the wrap for convenience as in most cases you will at least need the initiator.
* 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
* 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>
…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>
…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>
Summary
Adds withdrawal of accrued fee jettons to the TON TokenPools via a new shared, stateless handler,
JettonWithdrawable(lib/funding/jetton_withdrawable.tolk), mirroring EVMFeeTokenHandler.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) -> coinsrelays caller-suppliedAskToTransferpairs to the specified jetton wallets.msgValue >= running sum(transfer.value) + MIN_RESERVE,maxAmountbound,allowedRecipientsallowlist (throwsZeroAddressNotAllowedfor zero/none dest regardless), and a no-customPayloadguard.WithdrawContext(opcode + initiator) viacustomPayload, so a bounce is recognized and the initiator is notified with aWithdrawFailedreply (onWithdrawBounced).Pool wiring
onBouncedMessageis extended to discriminate a fee-withdrawAskToTransferbounce from the existing pool-op asks.accruedFeesledger. 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.JettonWithdrawable_Withdrawas aTokenPool_InMessage, dispatched ononInternalMessagetoonWithdrawFeeTokensDispatch.Tests
TokenPool.withdrawFeeTokens.behavior.tsruns in all three pool specs (LockRelease,BurnMint,Lockbox): accrues-on-lock, withdraw-as-owner, withdraw-as-feeAdmin, reject-non-owner.Notes
onramp/messages.tolkTODO): migrate the OnRamp's native-TONWithdrawFeeTokensto this shared handler so it can also sweep fee jettons.