write_account_create
Builds an unsigned Factory transaction to create a new Arcadia account, supporting V3 margin or V4 spot versions, and returns the predicted CREATE2 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 | |
| chain_id | No | Chain ID: 8453 (Base), 130 (Unichain), 10 (Optimism), or 4663 (Robinhood) | |
| creditor | No | Lending pool address for V3 margin account. Ignored for V4 spot accounts (version 0 or 4). | |
| 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. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| description | Yes | ||
| transaction | Yes | ||
| predicted_account_address | No |