Getting the Event Proof
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"
}
}'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();References
Last updated
Was this helpful?