curl --request POST \
--url https://shield.api.enso.build/api/v1/simulate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"chainId": 1,
"transaction": {
"data": "0x3593564c000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000066c5a817",
"value": "1000000000000000000",
"to": "0x80EbA3855878739F4710233A8a19d89Bdd2ffB8E",
"from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"operationType": 123,
"receiver": "<string>",
"spender": "<string>",
"executor": "<string>",
"origin": "<string>",
"authorityDelegate": "<string>",
"initCode": "<string>"
},
"tokenIn": [
"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"
],
"tokenOut": [
"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
],
"amountIn": [
"1000000000000000000"
],
"preSimulationTransactions": [
{
"data": "0x3593564c000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000066c5a817",
"value": "1000000000000000000",
"to": "0x80EbA3855878739F4710233A8a19d89Bdd2ffB8E",
"from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"operationType": 123,
"receiver": "<string>",
"spender": "<string>",
"executor": "<string>",
"origin": "<string>",
"authorityDelegate": "<string>",
"initCode": "<string>"
}
]
}
'{
"simulationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"chainId": 1,
"result": {
"status": "Success",
"amountOut": [
"<string>"
],
"gas": "<string>",
"error": "<unknown>"
}
}Simulates a transaction on a forked EVM state to predict output amounts and gas consumption. Returns a simulationId that can be used with the /validate endpoint to verify the transaction before signing.
curl --request POST \
--url https://shield.api.enso.build/api/v1/simulate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"chainId": 1,
"transaction": {
"data": "0x3593564c000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000066c5a817",
"value": "1000000000000000000",
"to": "0x80EbA3855878739F4710233A8a19d89Bdd2ffB8E",
"from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"operationType": 123,
"receiver": "<string>",
"spender": "<string>",
"executor": "<string>",
"origin": "<string>",
"authorityDelegate": "<string>",
"initCode": "<string>"
},
"tokenIn": [
"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"
],
"tokenOut": [
"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
],
"amountIn": [
"1000000000000000000"
],
"preSimulationTransactions": [
{
"data": "0x3593564c000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000066c5a817",
"value": "1000000000000000000",
"to": "0x80EbA3855878739F4710233A8a19d89Bdd2ffB8E",
"from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"operationType": 123,
"receiver": "<string>",
"spender": "<string>",
"executor": "<string>",
"origin": "<string>",
"authorityDelegate": "<string>",
"initCode": "<string>"
}
]
}
'{
"simulationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"chainId": 1,
"result": {
"status": "Success",
"amountOut": [
"<string>"
],
"gas": "<string>",
"error": "<unknown>"
}
}Enso API key passed as Bearer token in Authorization header
Request to simulate a transaction
Chain ID (e.g., 1 for Ethereum mainnet)
x >= 01
The transaction to simulate
Show child attributes
Input token addresses
[
"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"
]
Output token addresses to track
[
"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
]
Input amounts in wei (one per tokenIn)
["1000000000000000000"]
Optional setup transactions to execute before the main simulation (e.g., token approvals)
Show child attributes
Simulation completed (check result.status for success or error)
Response from the simulate endpoint
Unique identifier for this simulation. Use with /validate to verify transactions before signing.
"a1b2c3d4-e5f6-7890-abcd-ef1234567890"
Chain ID the simulation was run on
1
Simulation result containing status, output amounts, and gas
Show child attributes
Was this page helpful?