From bd881a6ba43df07dc3e96af1b9ceffd8b92986f0 Mon Sep 17 00:00:00 2001 From: Mackenzie Wildman Date: Wed, 9 Aug 2023 09:35:22 -0400 Subject: [PATCH 1/3] how-to section --- docs/hub/Guides/cnfts.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 docs/hub/Guides/cnfts.md diff --git a/docs/hub/Guides/cnfts.md b/docs/hub/Guides/cnfts.md new file mode 100644 index 0000000..ba9f80e --- /dev/null +++ b/docs/hub/Guides/cnfts.md @@ -0,0 +1,25 @@ +--- +sidebar_position: 9 +--- + +# Compressed NFTs on Solana + +Why they're so great + +## How to mint cNFTs with Hub + +### Step 1: Create a Collection on Solana +On Hub, cNFTs can be minted from a *Collection*. Collection support is currently API-only. We are working to add collection creation to Hub Console as well. To view the API call that creates a new collection on Hub, please see [Creating a Collection via API](../developers/create-collection-api.md). Be sure to set `"blockchain": "SOLANA"` - cNFTs are built on Solana. + +You can view your new collection on Hub Console, on your project's Collections tab. The Type is "Open" for any collections created using the `createCollection` mutation. + +Note that a collection is also created for each drop in your project - these collections that correspond to a drop have Type "Drop" and can *not* be used to mint a cNFT. + +### Step 2: Mint to Collection +cNFTs can be minted to any Solana collection that was created using the `createCollection` mutation. This is currently possible using the Hub API and coming soon to the Hub Console. Use the `mintToCollection` that's detailed at [Minting to a Collection via API](../developers/mint-to-collection-api.md). + +To mint a *compressed* NFT, simply set `"compressed": true`. + +## Follow along + +Add a video demo \ No newline at end of file From 50783dcdd8631f4bcdbab65d1d18f3d93fd307bd Mon Sep 17 00:00:00 2001 From: Mackenzie Wildman Date: Wed, 9 Aug 2023 12:19:31 -0400 Subject: [PATCH 2/3] more goodies --- docs/hub/Guides/cnfts.md | 100 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 97 insertions(+), 3 deletions(-) diff --git a/docs/hub/Guides/cnfts.md b/docs/hub/Guides/cnfts.md index ba9f80e..ef5381d 100644 --- a/docs/hub/Guides/cnfts.md +++ b/docs/hub/Guides/cnfts.md @@ -4,12 +4,68 @@ sidebar_position: 9 # Compressed NFTs on Solana -Why they're so great +Compressed NFTs (cNFTs) use State Compression and merkle trees to drastically reduce the storage cost for NFTs. Instead of storing an NFT's metadata in a typical Solana account, cNFTs store the metadata within the ledger (off-chain, but subject to consensus), rather than fully on-chain like conventional NFTs. + +This allows cNFTs to still inherit the security and speed of the Solana blockchain, while at the same time reducing the overall storage costs. + +Solana RPC providers are utilized to store and manage data off-chain. Indexers are used to manage transaction data and facilitate data queries between RPCs and on-chain smart contracts for cNFTs. + +Existing smart contracts on Solana need to be modified to interact with cNFTs, as this technology is still fairly new. However, with time and growing adoption, cNFTs should become fully supported by all programs in the ecosystem. + +With HUB, you can mint and also transfer cNFTs, like any NFTs. And just like we support [transfer tracking](./transfer-out-of-hub-wallet.md) for all NFTs, cNFTs can be tracked as well so that you always know which wallets are holding your NFTs! + +### How much cheaper are cNFTs? + +Minting 10 Million NFTs on Solana used to cost 2.5 Million dollars. Now it’ll cost less than $250! This is assuming a price of $21 for each $SOL. [[Source](https://solana.com/news/state-compression-compressed-nfts-solana)] + +### What are the benefits of cNFTs? + +cNFTs will not only make minting NFTs more accessible to everyone, but it will also allow for more creativity to flourish in the NFT space. By reducing storage costs, creators, game developers and businesses of all kinds can now mint more NFTs & leverage the blockchain more effectively, experiment with new kinds of collections, and create more affordable experiences for everyone. + +Opening up unimaginable use-cases like storing platform engagement like likes, comments, etc, daily streams of user data, daily or even hourly on-chain actions by users, etc, all are now possible at a fraction of the cost! ## How to mint cNFTs with Hub ### Step 1: Create a Collection on Solana -On Hub, cNFTs can be minted from a *Collection*. Collection support is currently API-only. We are working to add collection creation to Hub Console as well. To view the API call that creates a new collection on Hub, please see [Creating a Collection via API](../developers/create-collection-api.md). Be sure to set `"blockchain": "SOLANA"` - cNFTs are built on Solana. +On Hub, cNFTs can be minted from a *Collection*. Collection support is currently API-only. We are working to add collection creation to Hub Console as well. You can interact with our API at [https://api.holaplex.com/](https://api.holaplex.com/) using an access token from your Hub organization. + +```graphql + mutation CreateCollection($input: CreateCollectionInput!) { + createCollection(input: $input) { + collection { + id + creationStatus + } + } + } + ``` + Variables: + ```json + { + "input": { + "project":"", + "blockchain": "SOLANA", + "creators":[ + { + "address": "", + "share": 100, + "verified": false + } + ], + "metadataJson": { + "name": "Collection name", + "symbol": "SYMBOL", + "description": "Collection description", + "image": "", + "attributes": [] + } + } + } + ``` + +Note the `creator` field `verified` can only be set to `true` when the creator is the treasury wallet. Otherwise, the `creator` input must have `"verified": false`. + +For more info on creating a new collection on Hub, please see [Creating a Collection via API](../developers/create-collection-api.md). Be sure to set `"blockchain": "SOLANA"` - cNFTs are built on Solana. You can view your new collection on Hub Console, on your project's Collections tab. The Type is "Open" for any collections created using the `createCollection` mutation. @@ -20,6 +76,44 @@ cNFTs can be minted to any Solana collection that was created using the `createC To mint a *compressed* NFT, simply set `"compressed": true`. +```graphql + mutation MintToCollection($input: MintToCollectionInput!) { + mintToCollection(input: $input) { + collectionMint { + id + creationStatus + compressed + } + } + } + ``` + Variables: + ```json + { + "input": { + "collection": "", + "recipient": "", + "compressed": true, + "creators":[ + { + "address": "", + "share": 100, + "verified": false + } + ], + "metadataJson": { + "name": "Token name", + "symbol": "SYMBOL", + "description": "Token description", + "image": "", + "attributes": [] + } + } + } + ``` + + Note the `creator` field `verified` can only be set to `true` when the creator is the project treasury wallet. Otherwise, the `creator` input must have `"verified": false`. + ## Follow along -Add a video demo \ No newline at end of file +Demo video coming soon! \ No newline at end of file From f995cb7f7332f133b2f127fb02932397f02141b0 Mon Sep 17 00:00:00 2001 From: Pontus Andersson Date: Wed, 9 Aug 2023 11:29:43 -0500 Subject: [PATCH 3/3] Update cnfts.md --- docs/hub/Guides/cnfts.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/hub/Guides/cnfts.md b/docs/hub/Guides/cnfts.md index ef5381d..8b80f89 100644 --- a/docs/hub/Guides/cnfts.md +++ b/docs/hub/Guides/cnfts.md @@ -4,15 +4,15 @@ sidebar_position: 9 # Compressed NFTs on Solana -Compressed NFTs (cNFTs) use State Compression and merkle trees to drastically reduce the storage cost for NFTs. Instead of storing an NFT's metadata in a typical Solana account, cNFTs store the metadata within the ledger (off-chain, but subject to consensus), rather than fully on-chain like conventional NFTs. +Compressed NFTs (cNFTs) use State Compression and merkle trees to reduce the storage cost for NFTs by nearly 1000x. Instead of storing an NFT's metadata in a typical Solana account, cNFTs store the metadata within the ledger (off-chain, but subject to consensus), rather than fully on-chain like conventional NFTs. -This allows cNFTs to still inherit the security and speed of the Solana blockchain, while at the same time reducing the overall storage costs. +This allows cNFTs to inherit the security and speed of the Solana blockchain, while at the same time reduce overall storage costs. Solana RPC providers are utilized to store and manage data off-chain. Indexers are used to manage transaction data and facilitate data queries between RPCs and on-chain smart contracts for cNFTs. -Existing smart contracts on Solana need to be modified to interact with cNFTs, as this technology is still fairly new. However, with time and growing adoption, cNFTs should become fully supported by all programs in the ecosystem. +Existing smart contracts on Solana may need to be modified to interact with cNFTs, as this technology is still fairly new. However, with time and growing adoption, cNFTs will become fully supported by all programs in the ecosystem. -With HUB, you can mint and also transfer cNFTs, like any NFTs. And just like we support [transfer tracking](./transfer-out-of-hub-wallet.md) for all NFTs, cNFTs can be tracked as well so that you always know which wallets are holding your NFTs! +With HUB, you can mint and also transfer cNFTs, just like any NFTs. And just like we support [transfer tracking](./transfer-out-of-hub-wallet.md) for all NFTs, cNFTs can be tracked as well so that you always know which wallets are holding your NFTs! ### How much cheaper are cNFTs? @@ -65,7 +65,7 @@ On Hub, cNFTs can be minted from a *Collection*. Collection support is currently Note the `creator` field `verified` can only be set to `true` when the creator is the treasury wallet. Otherwise, the `creator` input must have `"verified": false`. -For more info on creating a new collection on Hub, please see [Creating a Collection via API](../developers/create-collection-api.md). Be sure to set `"blockchain": "SOLANA"` - cNFTs are built on Solana. +For more info on creating a new collection on Hub, please see [Creating a Collection via API](../developers/create-collection-api.md). Be sure to set `"blockchain": "SOLANA"` - cNFTs are only available on Solana. You can view your new collection on Hub Console, on your project's Collections tab. The Type is "Open" for any collections created using the `createCollection` mutation. @@ -116,4 +116,4 @@ To mint a *compressed* NFT, simply set `"compressed": true`. ## Follow along -Demo video coming soon! \ No newline at end of file +Demo video coming soon!