Skip to content

Instantly share code, notes, and snippets.

View loocurse's full-sized avatar
😀

Lucas loocurse

😀
  • Singapore
View GitHub Profile
... // import statements
contract MyToken is ERC721, Ownable {
// vars
function _convertLeaf(address _user, uint256 _quantity)
internal
pure
returns (bytes32)
{
...
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
contract MyToken is ERC721, Ownable {
bytes32 rootHash = '0x...'
mapping(address => uint256) tokenCount;
...
@loocurse
loocurse / Layman.sol
Created April 8, 2022 04:03
Layman whitelist implementation
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
contract MyToken is ERC721, Ownable {
mapping(address => bool) whitelist;