📄Guru Season 2 Pass And ChainLink Functions Case
Integrating Chainlink Functions into the Guru Season 2 Pass NFT smart contract significantly enhances its capabilities, allowing for secure access to off-chain data and complex computations.
Authors: Evgeny Vakhteev, Evgeny Shestakov
Enhancing the GuruSeason2PassNFT Smart Contract with Chainlink Functions
Base: https://basescan.org/token/0xeb8ae9ed9df8bff58f9d364eef3c4986f4331d1e
function safeMint(bytes32[] calldata proof) public {
require(balanceOf(msg.sender) < NFT_PER_ADDRESS_LIMIT, "You have reached max number of NFT!");
require(block.timestamp <= MINTING_END_TIME, "SeasonPass has been sold out!");
bytes32 leaf = keccak256(bytes.concat(keccak256(abi.encode(msg.sender))));
require(MerkleProof.verify(proof, MERKLE_ROOT, leaf), "Invalid proof");
uint256 tokenId = _nextTokenId++;
_safeMint(msg.sender, tokenId);
}Last updated