/redeemable-nft-contract

Primary LanguageTypeScriptOtherNOASSERTION

redeemable-nft-contract

This project contains a smart contract template for NFT collection. Besides the standard ERC721 interface powered by openzeppelin, we added a few features:

Air Drop

Only contract owner can call this function. Call this function with an array of address and each of them will receive one new minted NFT.

Private Mint

Anyone who have the valid signature can mint NFTs by paying enough crypto. The signature is generated by the signer address defined in EIP712Whitelist.sol. Contract owner can use toggleSaleStatus() to enable/disable private mint.

Redeem

NFT owner can burn the NFT to redeem a service like an eCoupon. After the NFT is burnt, the tokenId is added to a redeemed arrary and emit an event. To provide the service after the redemption, you will need an offchain server listening to the Redeem event.

Royalty Fee

NFT royalty fee powered by openzeppelin https://docs.openzeppelin.com/contracts/4.x/api/token/erc721#ERC721Royalty

PaymentSplitter

Payment splitter powered by openzeppelin. Used to share the revenue from private mint and royalty fee. https://docs.openzeppelin.com/contracts/4.x/api/finance#PaymentSplitter