Repository navigation
feat(fee): transfer tokens in fee deposit and withdraw (#1187) - #1383
Closed
lienhoatienphung-svg wants to merge 1 commit into
Closed
lienhoatienphung-svg wants to merge 1 commit into
lienhoatienphung-svg wants to merge 1 commit into
Conversation
lienhoatienphung-svg
force-pushed
the
feature/1187-fee-token-transfers
branch
from
October 16, 2026 07:47
cefbb1c to
379dcf4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1187
Summary
Updates
FeeContractso fee accounting is backed 1:1 by real token transfers:DataKey::Tokenduringinit(env, admin, token)and exposes it viaget_token(env).amountfromcallerto the contract viatoken::Client::new(&env, &token_addr).transfer(&caller, &contract_addr, &amount)duringdeposit.amountfrom the contract torecipientviatoken::Client::transferduringwithdrawafter verifying bothaccumulated >= amountand on-ledger token balance.Acceptance Criteria Mapping
test_deposit_and_withdrawandtest_deposit_without_token_balance_fails_and_keeps_counter_in_sync.test_deposit_and_withdrawandtest_withdraw_to_valid_recipient_succeeds.client.get_accumulated() <= token_client.balance(&contract_id)).FeeContract::get_token(env: Env) -> Result<Address, ContractError>with TTL extension and auth snapshot coverage.Validation
cargo test -p callora-feePayout Wallet (Base Mainnet USDC / EVM):
0x3806cd592a508d1992Ed007C2F53de251C2E7452