fix(examples): use correct verifyBatchInclusion
function and update python scripts on examples/verify
#1796
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Use correct
verifyBatchInclusion
function and update python scripts onexamples/verify
Description
The example available in
examples/verify
uses the deprecatedverifyBatchInclusion
function which does not receivesenderAddress
. It should use the following functionAlso, the python scripts to generate the verification data does not work. It uses an old version of the encoded data file.
How to Test
There are two cases to test, the first one is using cURL and the second one is using a Python script.
For both cases, there are some common steps:
With send some proofs is enough. We need to use one of the verification data files received after the creation of the task
Proofs verification data should be available in
./aligned_verification_data/
For example,
Complete the .env with the following values
Then run
This will output the address of the deployed contract. You will need this address to interact with the contract.
In my case it is
0xA15BB66138824a1c7167f5E85b957d04Dd34E468
Use case 1: Using cURL to check the verification
Note: You need to change
b8c17406_0.json
with your json fileIn this case we replace
CONTRACT_ADDRESS
with0xA15BB66138824a1c7167f5E85b957d04Dd34E468
andCALLDATA
with the output of step 1.The output should be as follow
The
result
:0x0000000000000000000000000000000000000000000000000000000000000001
means it was verified in AlignedUse case 2: Using a Python script to check the verification
Replace
--contract-address
with your deployed contract and--aligned-verification-data
with your proof data.--sender-address
is the Devnet BatcherPaymentService contract.It should return
Type of change
close #1795
Checklist
testnet
, everything else tostaging