How to use MerkleProof library?

Found it!

pragma solidity ^0.6.0;

import "@openzeppelin/contracts/cryptography/MerkleProof.sol";


contract MyContract {

    Using MerkleProof for bytes32[];
    constructor()
        public
    {}

function claim(bytes32[] memory proof, bytes32 root) returns (bool) {
         require(proof.verify(root, keccak256(abi.encodePacked(msg.sender))), "Caller is not a claimer");
return true;
}
 
}
2 Likes