import { type Address, type PublicClient, type StateOverride } from "viem"; import { type SlotHints } from "./slotHints.js"; export type GetBalanceOverridesOptions = { /** * Caller-supplied on-chain balances. When a token's balance here meets the * required amount, the per-call `balanceOf` RPC is skipped and no override * is emitted. */ walletBalances?: Record
; /** * Caller-supplied slot hints. When `balanceSlotIndex` is present for a * token, the slot is computed cryptographically; access-list discovery is * skipped. Missing entries fall back to access-list discovery before * sequential `fetchErc20SlotHints` probing. */ slotHints?: SlotHints; }; /** * Generate state overrides that give `account` sufficient ERC20 balances. * * Resolution order, per token: * 1. Use caller-supplied wallet balance when sufficient → no work. * 2. Read `balanceOf` on-chain; skip if sufficient. * 3. Use caller-supplied `balanceSlotIndex` → compute slot cryptographically. * 4. Use cached probed slot index (`fetchErc20SlotHints` cache) → same. * 5. Probe via `eth_createAccessList` discovery + per-slot verification. * 6. Fall back to sequential `fetchErc20SlotHints` probing when access-list * discovery is unavailable. * * Access-list probing handles proxy / namespaced token layouts when the RPC * supports it. Sequential probing remains the fallback for standard ERC20 * layouts on RPCs where `eth_createAccessList` is unavailable. */ export declare function getBalanceOverrides(client: PublicClient, account: Address, tokens: [Address, bigint][], options?: GetBalanceOverridesOptions): Promise