Skip to main content
Writes build unsigned EIP-5792-style batches with version, from, chainId and ordered calls[]. Each call has to, data and a decimal wei value. The current lending paths return zero value. Do not replace targets or reconstruct calldata from these examples. The API checks current chain state before building calls. Those checks cannot guarantee execution: balances, prices and liquidity may change before a transaction is mined. Request fresh calls if the user delays signing.
  1. Verify that the connected account matches from and is on Base Mainnet, chain ID 8453 or 0x2105.
  2. Show the action, assets, approvals and risks to the user. Confirm gas and token balances.
  3. Honor all returned capabilities and atomicity requirements. Preserve attribution suffixes if provided. Do not strip required fields to make a wallet accept the plan.
  4. Wait for successful execution, stop on failure and refresh positions. An API response alone is not a completed deposit, withdrawal or borrow.

Batch-Capable Wallet

With viem, pass any required capabilities and atomicity flag through. The connected wallet must support the plan; do not silently fall back to sequential transactions for an atomic plan.
Batch-capable wallet (viem)

Sequential EOA Execution

The lend flows can execute returned calls sequentially when no atomic capability is required. Wait for each successful receipt before sending the next. If the plan requires atomic execution, or contains capabilities this fallback does not implement, stop and use a compatible wallet.
EOA, sequential (viem)
An approval can succeed while a later action fails. Inspect the resulting state and request a fresh plan rather than replaying the old batch. If calling JSON-RPC directly, convert decimal value to a hex quantity; viem accepts a bigint.