Test intents without modifying blockchain state using the simulate_intents function
The simulate_intents function runs intent code without modifying the Verifier contract’s state. It accepts the same MultiPayload input as execute_intents.
Use current_salt from the simulation response when constructing versioned nonces. A nonce is only valid if its embedded salt matches one of the salts in the contract’s registry.
Simulation outputs may include additional data in future updates. Contact the NEAR Intents team if your application requires more detailed output.
Simulated results are designed to closely match actual execution outcomes through extensive testing.However, due to the asynchronous nature of the NEAR blockchain, it’s not possible to simulate intents exactly as they would execute in reality.
To date, simulation and execution results have always matched. If you discover a case where they differ, please contact the NEAR Intents team and report it as a bug.
Simulations reflect only side effects within the Verifier contract and exclude those from external asynchronous calls.
Was this page helpful?
⌘I
Assistant
Responses are generated using AI and may contain mistakes.