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.
Fetching the Proof
Use the following curl
command to fetch the account and storage proof for the following ERC20 Transaction
: tx-example.
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"
}
}'
chainId: 11155111 (Sepolia).
txHash: The tx-hash that emitted the Transfer Event on Sepolia: tx-example.
logIndex: The log index for the event.
This curl
command / script returns the Event Proof for the Transfer
Event on Sepolia, which will be used for verification on Chiado.
References
Last updated