# Getting the Event Proof

The first step is to fetch the **Event Proof** from **Sepolia**.  An important parameter is the block number which ensures that Hashi can verify the proof against the block header stored on **Chiado**. This is possible if the block header related the emitted event on the origin chain (**Sepolia** in this case) has already been propagated to the target chain (**Chiado** in this case). To check the block propagation status is possible to use the [Hashi Explorer](/hashi/meta/explorer.md).

**Fetching the Proof**

Use the following `curl` command to fetch the **account and storage proof** for the following **ERC20** `Transaction` : [tx-example](https://sepolia.etherscan.io/tx/0x25a6a5c138f3b5a434a3a2b5d6bf7bdf97cb700bd7515f801ecfb71f1d965e7b).

{% tabs %}
{% tab title="Curl" %}

```javascript
curl --location --request POST 'https://jsonrpc.hashi-explorer.xyz/v1' \
--header 'Content-Type: application/json' \
--data-raw '{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "hashi_getReceiptProof",
  "params": {
    "logIndex": 397,
    "blockNumber": 7016999,
    "chainId": 11155111,
    "transactionHash": "0x25a6a5c138f3b5a434a3a2b5d6bf7bdf97cb700bd7515f801ecfb71f1d965e7b"
  }
}'
```

{% endtab %}

{% tab title="Javascript" %}

```python
import axios from "axios";

const main = async () => {
  // fetch event proof from Hashi Prover
  console.log("Fetching event proof from Hashi prover...");
  const result = await axios.post(
    `http://jsonrpc.hashi-explorer.xyz:3000/v1`,
    {
      jsonrpc: "2.0",
      method: "hashi_getReceiptProof",
      params: {
        logIndex: 397,
        blockNumber: 7016999,
        chainId: 11155111,
        transactionHash: "0x25a6a5c138f3b5a434a3a2b5d6bf7bdf97cb700bd7515f801ecfb71f1d965e7b",
      },
      id: 1,
    },
    {
      headers: {
        "Content-Type": "application/json",
      },
    }
  );
  console.log("Event proof result", result.data.result.proof);
};

main();
```

{% endtab %}
{% endtabs %}

* **chainId**: 11155111 (Sepolia).
* **txHash**: The tx-hash that emitted the Transfer Event on **Sepolia**: [tx-example](https://sepolia.etherscan.io/tx/0x25a6a5c138f3b5a434a3a2b5d6bf7bdf97cb700bd7515f801ecfb71f1d965e7b).
* **logIndex**: The log index for the event.
* **blockNumber**: The block number on Sepolia, 7016999, which must have already been propagated to Chiado via Hashi for the proof to be valid. The block number must reference a block that appears after the block containing the event. In this case [7016999](https://sepolia.etherscan.io/block/7016999) > [7016956](https://sepolia.etherscan.io/block/7016956)

This `curl` command / script returns the E**vent Proof** for the `Transfer` **Event** on **Sepolia**, which will be used for verification on **Chiado**.

### References

1. [Receipt proof request script](https://github.com/crosschain-alliance/hashi-template/blob/main/offchain/script/receipt-proof.js)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://crosschain-alliance.gitbook.io/hashi/getting-started/quick-start/verifying-foreign-event/getting-the-event-proof.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
