Skip to main content

Can I simulate a multicall with Enso Quoter?

Yes. If you already have multicall calldata, send it to Quoter as a single transaction. To preview up to five separate already-built transactions, use the batch simulate endpoint.

J
Written by Javier Diaz

Yes. If you already have multicall calldata, send it to Enso Quoter as a single transaction. To preview up to five separate already-built transactions in one request, use the batch simulate endpoint.

Definition

A multicall is typically one contract interaction whose calldata itself executes several inner calls. Quoter does not need a special multicall type for that: it is source-agnostic and will simulate any valid EVM calldata, including a multicall payload you encoded yourself.

How it works

  • For one multicall payload, set to to the multicall contract, data to the encoded batch, and the usual from, value, and chainId.

  • Pass tokenIn, tokenOut, and amountIn so Quoter can report the token flows you want to preview.

  • For several independent transactions rather than one multicall payload, use POST /api/v1/simulate/batch with up to five items that share the same token-flow fields.

  • Check result.status (or each batch result) before you treat the preview as safe to sign.

  • Validate the unsigned transaction or transactions before signing.

How Enso does this

Use POST https://quoter.api.enso.build/api/v1/simulate for a single payload, including a multicall, and POST /api/v1/simulate/batch for up to five already-built transactions. See Simulating Transactions and Third-Party Transactions. Public Quoter docs do not add multicall-specific request fields beyond this.

FAQ

Does Quoter unpack each inner multicall step in the response?

The documented response is simulationId, result.status, result.amountOut, result.gas, and result.error. Use tokenOut to track the outputs you care about.

Can I also simulate a Route transaction this way?

Yes, because Quoter is source-agnostic, but it is optional. Route already simulates internally.

Related articles

  • How do I simulate multiple transactions at once?

  • How do I simulate transactions from another protocol or aggregator?

  • How do I estimate tokens received from a contract call?

  • How do I check if a transaction will revert?

  • What is Enso Quoter?

Sources

Did this answer your question?