XChain Platform Action - WITHDRAW
This action withdraws tokens from a contract’s derived address back to the contract owner.
PARAMS
| Name | Type | Description |
|---|---|---|
VERSION |
String | Format Version |
CONTRACT_ACTION_INDEX |
Integer | Action index of the deployed contract |
TICK |
String | Ticker name or Ticker ID |
QUANTITY |
String | Amount of TICK to withdraw |
Formats
Version 0
VERSION|CONTRACT_ACTION_INDEX|TICK|QUANTITY
Examples
WITHDRAW|0|12345|MYTOKEN|500
Withdraw 500 MYTOKEN from contract 12345 (debits C:BTC:12345, credits the owner)
WITHDRAW|0|12345|^99|250
Withdraw 250 of the token with TICK_ID 99 from contract 12345
Rules
- Available on all chains
- The contract identified by
CONTRACT_ACTION_INDEXmust exist - Only the contract owner (the address that broadcast the original
DEPLOYaction) may withdraw - The contract’s derived address (
C:<CHAIN>:<CONTRACT_ACTION_INDEX>) must hold a sufficient balance ofTICKto coverQUANTITY - No gas fee is charged; the on-chain transaction cost is sufficient
QUANTITYmust be a positive value with valid decimal format for the token
Notes
- Withdrawn tokens are debited from the contract’s derived address and credited to the contract owner’s address in the standard ledger
- The solvency check uses the standard
balancestable viagetAddressBalances()on the derived address - Use
DEPOSITto add tokens to a contract’s derived address - Use
^(caret) as a prefix when passingTICK_IDfor theTICKfield (e.g.^1234=TICK_ID1234) - Contracts may also return tokens to users via emitted SEND actions triggered by
EXECUTE;WITHDRAWis specifically for owner-initiated withdrawals - WITHDRAW does not require the contract to be active — owners can recover tokens from disabled contracts
Copyright © 2025–2026 Dankest, LLC
Based on XChain Platform by Dankest, LLC – https://dankest.llc
Licensed under the GNU Affero General Public License v3.0 (AGPL-3.0-or-later) with a commercial license available for proprietary use.
You may use, modify, and distribute this material under the terms of the License. See LICENSE and NOTICE for full terms. See the licensing overview.