PreviewInput
Defined in: index.ts:33
What to preview: the calls (approvals first), who sends them, on which chain, and which addresses and contracts the app already knows.
Properties
Section titled “Properties”calls:
PreviewCall[]
Defined in: index.ts:37
Executed in order in one simulated block (approve first, then the call).
chainId
Section titled “chainId”chainId:
number
Defined in: index.ts:34
expectedApproval?
Section titled “expectedApproval?”
optionalexpectedApproval?:bigint
Defined in: index.ts:46
Amount the flow needs approved (base units); larger approvals are flagged.
expectedRecipient?
Section titled “expectedRecipient?”
optionalexpectedRecipient?:string
Defined in: index.ts:44
Where the funds are meant to arrive (a swap’s destination address).
from:
string
Defined in: index.ts:35
known?
Section titled “known?”
optionalknown?:Record<string,string>
Defined in: index.ts:42
Known contracts: address → label (e.g. a provider’s trusted targets).
native?
Section titled “native?”
optionalnative?:object
Defined in: index.ts:48
Native coin symbol and decimals for balance changes (default ETH / 18).
decimals
Section titled “decimals”decimals:
number
symbol
Section titled “symbol”symbol:
string
own:
string[]
Defined in: index.ts:40
Addresses that are “you” (all of the user’s accounts, lower or mixed case).
rpc:
Rpc
Defined in: index.ts:38
stateOverrides?
Section titled “stateOverrides?”
optionalstateOverrides?:Record<string, {balance?:bigint;code?:string;nonce?:number;stateDiff?:Record<string,string>; }>
Defined in: index.ts:55
State overrides applied to the simulated block (eth_simulateV1
stateOverrides, eth_call’s third parameter): e.g. fund the sender with a
native balance or an ERC-20 balance via stateDiff on the token’s
balance slot, to prove a flow a not-yet-funded account will sign.