-
The actual NFT assets cannot be stored on the blockchain due to very high costs. Solution: Storing the asset off-chain
-
The key (link) to the content must be trully unique and immutable. Solution: The key is genrated based on the content (as content hash) using Contenet Addressing.
-
The content must be immutable and persistable forever. Solution: using Interplanetary File System (IPFS) to store the asset in the decentralized way. Improve the content persistance through Filecoin which uses Proof-Of-Replication to ensure the availability of the client's origial data, and Proof-Of-Spacetime to ensure that the data is stored continuisly overtime.
Requires account on nft.storage
Update NFT_STORAGE_API_KEY in .env
to upload asset & metadata to IPFS:
node scripts/store-asset.mjs
-
Start Hardhat Node
npx hardhat node
-
Run the Tests
npx hardhat test --network localhost --logs