Pass tokenIn, amountIn, and tokenOut so Enso Quoter knows which assets to track. The predicted outputs come back in result.amountOut, one value per tokenOut, in wei.
Definition
Token-flow fields are how you tell the simulator which balances matter. The calldata can touch many contracts; Quoter reports the output amounts for the tokens you list, not a full trace of every internal transfer unless you track those tokens.
How it works
Set
tokenInto the input token addresses andamountInto the matching input amounts, as string arrays in wei, one amount pertokenIn.Set
tokenOutto the output token addresses you want previewed.If tokens are received by an address other than the sender, set optional
receiver.After simulation,
result.amountOutis aligned withtokenOut. Useresult.statusto decide whether to show those amounts.For a batch simulate call, the same top-level
tokenIn,tokenOut, andamountInapply to every transaction in the request.
How Enso does this
These fields are required on POST https://quoter.api.enso.build/api/v1/simulate. See Simulating Transactions and How It Works. They do not change the calldata; they only select what the fork preview measures.
FAQ
What if I omit tokenOut?
tokenIn, tokenOut, and amountIn are required. Without them, the request is invalid (HTTP 400 for missing required fields).
Can I track both the spent token and a position token?
Yes. List every output address you want measured in tokenOut, and read the corresponding amountOut entries.
Related articles
How do I preview the output of a transaction?
How do I estimate tokens received from a contract call?
How do I simulate multiple transactions at once?
What is minAmountOut?
How do I simulate a DeFi transaction before sending it?
