Solution from https://twitter.com/developeruche
The Goal is to release merkle proof system used for airdrop verification with KZG commitment.
This is how I implemented it and got stuck when trying to implement the solidity verifier.
- I get all the address of the valid address and amount, concat it and obtain the hash of the concat.
- I map each of these hashes to a field element… giving me a vector of field element.
- I interpolated each of this field elements to get a polynomial. (this polynomial's degree is very huge, for the Optimism Airdrop I used as a case study, I was a 268K degree polynomial.
- Commit to the polynomial
- Push the polynomial commitment onchain
- Generate proof function to be used by users
- User can now call the contract and the contract verification logic would carry out the validity assations
The contract need to prove point is in
verify
with :