The simulation body should be included in the request body. You can follow the example below.
curl --location 'https://app.sentio.xyz/api/v1/solidity/simulate' \--header 'api-key: <API_KEY>' \--header 'Content-Type: application/json' \--data '{"projectOwner":"<USER>","projectSlug":"<PROJECT>","simulation": {"networkId":"1",// Chain ID, "1" for Ethereum mainnet. See chainlist.org for details"blockNumber":"17415072","transactionIndex":"97",// transaction index in the block// standard field for evm transactions"from":"0x5e8bb488e85ea732e17150862b1acfc213a7c13d","to":"0xef1c6e67703c7bd7107eed8303fbe6ec2554bf6b","value":"0x0","gas":"0x31ae2","gasPrice":"0xe59a1adbe", "input": "0x3593564c000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000647dffef0000000000000000000000000000000000000000000000000000000000000002080c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000003077b58d5d378391980000000000000000000000000000000000000000000000000000000032b2ced3e40e9d100000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002000000000000000000000000082646b22a3960da69ef7a778c16dd6fb85dd999000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000032b2ced3e40e9d1",
// overrides"stateOverrides": {"0x0811fd1808e14f0b93f0514313965a5f142c5539": {"balance":"0x1111111111111111" } },"blockOverride": {"baseFee":"0x0" } }}'
Your simulations will be saved, and a unique ID for each simulation is included in the response. It will be useful for fetching simulation details.
Bundle Simulation
You could also create bundle simulations so that one transaction could be executed one after another. For blockNumbertransactionIndexnetworkId and stateOverridesblockOverrides fields, only the first simulation takes effect.
It will return a list of successful simulation results, it will stop at the transaction that failed to be executed. e.g. if you simulate 4 transactions, while the 3 transactions can't be executed (e.g. wrong gas spec), then the result looks like this.
{
"bundleId": "WKTMcdBc",
"simulations": [
{
... result for tx 1
},
{
... result for tx 1
}
],
// tx 3 failed to execute, error will be recorded for this bundle
"error": "tracing failed: tip higher than fee cap: address 0x99922ca65188cC218A5d316969dc66d8672994f2, tip: 990000000, gasFeeCap: 1342723"
}
```