0xFacet / facet-vm

This app implements the Facet Protocol. It processes Dumb Contract interactions and makes the results available via an HTTP API.
https://docs.facet.org
104 stars 18 forks source link

Ability to simulate transactions with state #287

Open RogerPodacter opened 6 months ago

RogerPodacter commented 6 months ago

Adds a new controller action /contracts/simulate_with_state. In addition to the usual simulation params the user provides the current state the simulation should run in. This is an object with the following keys: ["eth_blocks", "ethscriptions", "contract_transactions", "contract_calls", "contract_artifacts", "contracts"].

Then, when the simulation is complete, the user is returned not only the transaction receipt but also the new world state. The user can then pass the new world state in for a subsequent call.

github-actions[bot] commented 4 months ago

:warning: Attention Required: You are potentially modifying VM logic. Please ensure this will not affect tx processing and that other VM instances have had adequate time to pull the latest changes.