> For the complete documentation index, see [llms.txt](https://sodex.com/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sodex.com/documentation/for-developers/api-reference/json-rpc/eth-simulatev1.md).

# eth\_simulateV1

POST `https://mainnet.valuechain.xyz`

Simulates one or more sequences of calls against optional state overrides.

## Parameters

| Name      | Type            | Required | Description                                                                                                                                                                                                        |
| --------- | --------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `payload` | object          | Yes      | `blockStateCalls` plus optional `traceTransfers` and `validation`.                                                                                                                                                 |
| `block`   | quantity or tag | Yes      | Starting block: hex number, or `earliest`, `latest`, `safe`, `finalized`, or `pending`. See [block tags](/documentation/for-developers/developers/valuechain-evm/differences-from-ethereum.md#consensus-finality). |

## Result

**Simulation** (object\[]): Simulated block results, including per-call `returnData`, `gasUsed`, and `status`.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": [
    {
      "calls": [
        {
          "returnData": "0x",
          "gasUsed": "0x54be",
          "status": "0x1",
          "logs": []
        }
      ]
    }
  ]
}
```

## Code examples

### cURL

```bash
curl --request POST \
  --url https://mainnet.valuechain.xyz \
  --header 'Content-Type: application/json' \
  --data '{"jsonrpc": "2.0", "id": 1, "method": "eth_simulateV1", "params": [{"blockStateCalls": [{"calls": [{"from": "0x7779ef1c26a0437f9fbd06e21f238da8b8336cf2", "to": "0x5050505050505050505050505050505050505050", "data": "0x06fdde03"}]}], "traceTransfers": false, "validation": false}, "latest"]}'
```

### JavaScript

```javascript
const options = {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({"jsonrpc": "2.0", "id": 1, "method": "eth_simulateV1", "params": [{"blockStateCalls": [{"calls": [{"from": "0x7779ef1c26a0437f9fbd06e21f238da8b8336cf2", "to": "0x5050505050505050505050505050505050505050", "data": "0x06fdde03"}]}], "traceTransfers": false, "validation": false}, "latest"]})
};

fetch('https://mainnet.valuechain.xyz', options)
  .then((res) => res.json())
  .then((res) => console.log(res))
  .catch((err) => console.error(err));
```

### Python

```python
import requests

url = "https://mainnet.valuechain.xyz"
payload = {
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_simulateV1",
  "params": [
    {
      "blockStateCalls": [
        {
          "calls": [
            {
              "from": "0x7779ef1c26a0437f9fbd06e21f238da8b8336cf2",
              "to": "0x5050505050505050505050505050505050505050",
              "data": "0x06fdde03"
            }
          ]
        }
      ],
      "traceTransfers": false,
      "validation": false
    },
    "latest"
  ]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
```
