Why is [FAIL. Reason: MerkleAirdrop__InvalidProof()] happening when running the test in Section 4: Airdrop and Signatures? #2081
-
Every time I run the test in Section 4: Airdrop and Signatures, I've been getting this error:
I tried cloning the lesson repo and got the same error when running the test there. Why is that happening? Edit: Just to be clear, the failure is happening when running |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
This happens if you are using a wrong proof or the right proof but passing in the wrong user. Check your code to see which is causing your revert. You can also share your test and script so we also help you look and maybe we can catch the issue. |
Beta Was this translation helpful? Give feedback.
Hi @palmcivet7 you need to update the root in the deployment script: https://github.com/Cyfrin/foundry-merkle-airdrop-cu/blob/main/script/DeployMerkleAirdrop.s.sol
I have updated the repo, thanks for spotting this!
Double check the roots and proofs in the test (or interaction script) and root in the deployment script all match your
output.json
file:)Hope this helps