-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added Core Candy Machine with hidden settings guide #306
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this Andre. Great first guide here, reads nice.
Just some small nits and a couple of comments that will have to be dicussed in slack/a meeting as probably to large a scope for github comments.
src/pages/core-candy-machine/guides/create-a-core-candy-machine-with-hidden-settings.md
Outdated
Show resolved
Hide resolved
src/pages/core-candy-machine/guides/create-a-core-candy-machine-with-hidden-settings.md
Outdated
Show resolved
Hide resolved
src/pages/core-candy-machine/guides/create-a-core-candy-machine-with-hidden-settings.md
Outdated
Show resolved
Hide resolved
src/pages/core-candy-machine/guides/create-a-core-candy-machine-with-hidden-settings.md
Outdated
Show resolved
Hide resolved
import * as fs from 'fs'; | ||
|
||
// We will be using Solana Devnet as endpoint, and loading the mplCoreCandyMachine plugin | ||
const umi = createUmi("https://api.devnet.solana.com") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should put a warning here that they will most likely need to upgrade to endpoint from an RPC provider. They will most likely get limited trying to do some of these actions, especially if they are doing larger mints.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a note about rate limit and added a reference to RPC provider resource
src/pages/core-candy-machine/guides/create-a-core-candy-machine-with-hidden-settings.md
Outdated
Show resolved
Hide resolved
You can find more details about setting up UMI [here](https://developers.metaplex.com/core/guides/javascript/how-to-create-a-core-nft-asset-with-javascript#setting-up-umi) | ||
|
||
### Prepare Reveal Data | ||
Now, let’s prepare the reveal data, which will include the metadata for the final revealed NFTs. This data contains the name and URI for each NFT in the collection and will be used to update the placeholder metadata after minting. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would possibly move the topic of "you need to upload all the data yourself" to the top here and explain that the uri's you are using are from the metadata json uploads. This also possibly won't be detremistic by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. Fixed
import { createCollection, ruleSet } from '@metaplex-foundation/mpl-core'; | ||
|
||
const collectionMint = generateSigner(umi); | ||
const collectionUpdateAuthority = generateSigner(umi); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Collection Update Authority should most likely default to umi.identity
just for safety purposes and for delegation purposes with Candy Machine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. Fixed
let collectionDetails = await fetchCollection(umi, collectionMint.publicKey); | ||
let collectionAssets = await fetchAssetsByCollection(umi,collectionMint.publicKey); | ||
|
||
for(let i = 0; i < candyMachineDetails.itemsRedeemed; i++) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While technically correct and would update the 5 assets most likely with no issues when you start getting into a greater number of assets things get a lot more complicated.
You need to deal with some form or cache file, errors, and retrys because inevitably revealing 10,000 nfts we are bound to get a failure and you have to keep 100% track of what assetId's have been revealed, what index has been revealed. Fetching all assets by collection I don't think will return the array in the same order each time.
It's something to discuss offline not here as it's a huge topic.
This would need some form of comment and warning that this is a super basic implementation of a reveal loop that wouldn't work at scale.
Co-authored-by: Tony Boyle <81017245+tonyboylehub@users.noreply.github.com>
Reworked according to review comments
No description provided.