Airdrop Utils
Airdrop utils module contains the verify function to check if a Merkle proof combined with an address and amount are part of the Merkle tree root.
verify
Checks if the sender is allowed to redeem an amount
from an airdrop using Merkle proofs. It returns the index of his Merkle proof to add to the Bitmap struct.
@param root: The Merkle tree root that keeps track of all the airdrops.
@param proof: The proof that the sender can redeem the
amount
from the airdrop.@param amount: The airdrop amount.
@param sender: The address of the airdrop user.
@return u256. An index.
Aborts
if the leaf or proof are invalid.
Last updated