MetaFactoryAI / wearables-nfts

NFTs controlling virtual analogues to products created by MetaFactory.
https://dysbulic.github.io/nft-wearable/
MIT License
2 stars 5 forks source link

NFT Merkle Distributor #12

Open META-DREAMER opened 2 years ago

META-DREAMER commented 2 years ago

In order to efficiently mint and distribute NFT wearables for all our buyers, we need to setup a merkle claim contract so users can pay the gas cost when they claim.

Requirements:

Sandbox has developed a lot of this functionality in their contracts so we can likely use that as reference: https://github.com/thesandboxgame/sandbox-smart-contracts/tree/master/src/solc_0.8/claims

They even have a merkle distributor contract that supports ERC20/1155/721 all in one.

Here's the JSON and code used to generate the merkle trees: https://github.com/thesandboxgame/sandbox-smart-contracts/tree/master/data/giveaways/multi_giveaway_1

Known Origin also has something similar, but only for 721s for now: https://github.com/knownorigin/merkle-royalties-distributor/blob/master/contracts/MerkleVault.sol