Skip to main content

How do I read Quoter validation checks?

The validate response includes a valid flag and a checks object for data, to, from, value, and chainId. If valid is false, inspect the failed fields and re-simulate; do not sign.

J
Written by Javier Diaz

The validate response includes a valid flag and a checks object for data, to, from, value, and chainId. If valid is false, inspect the failed fields and re-simulate. Do not sign.

Definition

Each check is an independent comparison between the unsigned transaction and the cached simulation. valid is true only when every check passes.

How it works

  • checks.data fails when calldata no longer matches (compared by hash), including a different function or arguments.

  • checks.to fails when the target contract changed (compared case-insensitively).

  • checks.from fails when a different account would submit (also case-insensitive).

  • checks.value fails when the native token amount in wei changed.

  • checks.chainId fails when the unsigned transaction targets a different chain than the simulation.

How Enso does this

POST https://quoter.api.enso.build/api/v1/validate returns valid, simulationId, and checks. See Validating Transactions and Error Handling. Log the simulationId for debugging. A 404 means the simulation was not found or expired, which is not a field-level check failure.

FAQ

If only one check fails, can I sign anyway?

No. Any failed check means valid is false. Do not sign. Re-simulate the transaction you intend to submit.

What should I log when valid is false?

Log the simulationId and the failed keys in checks. That tells you whether the payload, target, sender, value, or chain changed.

Related articles

  • How do I validate that a transaction has not been tampered with?

  • What happens if calldata changes after I simulate?

  • Why should I re-simulate instead of retrying validation?

  • Why did Quoter return a 404 on validate?

  • What is a simulationId?

Sources

Did this answer your question?