write.account.create
Build an unsigned transaction to create an Arcadia account. Choose V3 margin for borrowing or V4 spot for holding any ERC20. Get the predetermined account address.
Instructions
Build an unsigned transaction to create a new Arcadia account via the Factory contract. account_version: 3 with creditor → V3 margin account (can borrow/leverage). account_version: 0 or 4 → V4 spot account (no borrowing, creditor is ignored, any ERC20 allowed). Returns the predicted account address (deterministic via CREATE2).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| salt | Yes | Unique salt (uint32) for deterministic account address | |
| wallet_address | Yes | Wallet address that will send the transaction (tx.origin, needed for address prediction) | |
| account_version | No | Account version: 0 = latest (V4 spot), 3 = margin (can borrow). 1/2 = legacy. | |
| creditor | No | Lending pool address for V3 margin account. Ignored for V4 spot accounts (version 0 or 4). | |
| chain_id | No | Chain ID: 8453 (Base), 130 (Unichain), or 10 (Optimism) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| description | Yes | ||
| transaction | Yes | ||
| predicted_account_address | No |