This is a sample root. Want to generate your own? Go to the homepage or use our API.

Here’s the Merkle root for your allowlist
0x9bcb34c8aba34a442d549dc3ae29995d5d1646440b80329ba55f6978a5bf23ce
The entire list of addresses in the allowlist can be found on the membership page for your Merkle root.
Wire up your Merkle root with the guide below. If you need help, DM us on Twitter.

How to use the Merkle root in your contract

1. Install dependencies

Install the following libraries to generate the proof for a wallet on your site.

Terminal
npm install merkletreejs ethers

2. Add Merkle tree code

Use the following code to generate Merkle proofs for your root.

merkle.ts
import { MerkleTree } from 'merkletreejs';
import { utils } from 'ethers';
const addresses: string[] = [
// your addresses will be filled in here automatically when
// you click the "Copy" button on the top of this code block
];
const tree = new MerkleTree(
addresses.map(utils.keccak256),
utils.keccak256,
{ sortPairs: true },
);
console.log('the Merkle root is:', tree.getRoot().toString('hex'));
export function getMerkleRoot() {
return tree.getRoot().toString('hex');
}
export function getMerkleProof(address: string) {
const hashedAddress = utils.keccak256(address);
return tree.getHexProof(hashedAddress);
}

3. Pass Merkle proof to your contract

Using the file above, import the getMerkleProof function to generate a proof for a connected wallet.

mintpage.tsx
import { getMerkleProof } from './merkle.ts';
// right before minting, get the Merkle proof for the current wallet
// const walletAddress = ...
const merkleProof = getMerkleProof(walletAddress);
// pass this to your contract
await myContract.mintAllowList(merkleProof);

4. Check the Merkle proof in your contract

With your Merkle root, you can check proofs using this helper from OpenZeppelin's contracts.

NFTContract.sol
import {MerkleProof} from "openzeppelin/utils/cryptography/MerkleProof.sol";
contract NFTContract is ERC721 {
bytes32 public merkleRoot;
constructor(bytes32 _merkleRoot) {
merkleRoot = _merkleRoot;
}
// Check the Merkle proof using this function
function allowListed(address _wallet, bytes32[] calldata _proof)
public
view
returns (bool)
{
return
MerkleProof.verify(
_proof,
merkleRoot,
keccak256(abi.encodePacked(_wallet))
);
}
function mintAllowList(uint256 _tokenId, bytes32[] calldata _proof) external {
require(allowListed(msg.sender, _proof), "You are not on the allowlist");
_mint(msg.sender, _tokenId);
}
}