write.account.withdraw
Build an unsigned transaction to withdraw assets from an Arcadia account to the owner's wallet, ensuring the account remains collateralized.
Instructions
Build an unsigned transaction to withdraw assets from an Arcadia account to the owner's wallet. Only the account owner can withdraw. Will revert if the account has debt and withdrawal would make it undercollateralized. Does not support max_uint256 — pass exact amounts from read.account.info. Account version is auto-detected on-chain (override with account_version if needed).
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| account_address | Yes | Arcadia account address | |
| asset_addresses | Yes | Token contract addresses to withdraw | |
| asset_amounts | Yes | Amounts in raw units/wei, one per asset | |
| asset_ids | No | Token IDs: 0 for ERC20, NFT token ID for ERC721 | |
| asset_types | No | V4 only. Asset types per asset: 1=ERC20, 2=ERC721, 3=ERC1155. If omitted, inferred from asset_ids (non-zero → ERC721). | |
| account_version | No | Override account version (3 or 4). Auto-detected on-chain if omitted. | |
| chain_id | No | Chain ID: 8453 (Base) or 130 (Unichain) |