This repo contains scripts to create compressed NFTs. Compression is a new technology using Merkle tree wich allows to reduce network storage costs. In the case of NFTs, compression enables the mint of NFTs for a fraction of the cost as before. You can learn more about compression here and here. For an explanation of how scripts work, you can read this medium article
- Clone the repo and install the dependencies.
git clone https://github.com/cryptoloutre/compressed-nft.git
cd compressed-nft
npm install
- Open the
createTreeAndCollection.ts
file and modify it according to your needs. Basically, you will have to modify:
- the private key
- the
maxDepthSizePair
parameter - the
canopyDepth
parameter - the
collectionMetadata
parameter with your own collection metadata (name
,uri
,symbol
,creators
,sellerFeeBasisPoints
&isMutable
)
- Open the
mintCompressedNFT.ts
file and modify it according to your needs. Basically, you will have to modify:
- the private key
- the
compressedNFTMetadata
parameter with your own NFT metadata (symbol
,creators
,sellerFeeBasisPoints
&isMutable
)
- Open the
assets.json
file and modify it according to your needs. This file holds thename
, theuri
& thereceiverAddress
for each NFT you want to mint. - Run the following command to create your Merkle tree and your NFT collection
npx ts-node createTreeAndCollection.ts
- Once the execution is finished, run the following command to mint your compressed NFTs
npx ts-node mintCompressedNFT.ts