Skip to content

Commit

Permalink
Use leaf hash from the node query. (availproject#169)
Browse files Browse the repository at this point in the history
  • Loading branch information
0xSasaPrsic authored Jun 9, 2023
1 parent 9604586 commit 575afbb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/validium/submitProof.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ async function getProof(availApi, hashBlock, dataIndex) {
async function checkProof(sepoliaApi, blockNumber, proof, numberOfLeaves, leafIndex, leafHash) {
const abi = JSON.parse(readFileSync(process.env.VALIDIYM_ABI_PATH).toString());
const availContract = new ethers.Contract(process.env.VALIDIUM_ADDRESS, abi, sepoliaApi);
return await availContract.checkDataRootMembership(BigInt(blockNumber), proof, BigInt(numberOfLeaves), BigInt(leafIndex), "0x63cd0ce830dcc00e53239b1f203a33f554514f09ab5a20cd5fc8ed9d0b5383f1")
return await availContract.checkDataRootMembership(BigInt(blockNumber), proof, BigInt(numberOfLeaves), BigInt(leafIndex), leafHash)
}

(async function submitProof() {
Expand Down

0 comments on commit 575afbb

Please sign in to comment.