-
Notifications
You must be signed in to change notification settings - Fork 77
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
Mint NFT Action #51
Mint NFT Action #51
Conversation
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.
Looks good!
-
What are your opinions on the action parameters and response?
I think that's how what we want it to be. -
Should there be separate actions for generating metadata and master editions?
I think, no. It's premature. That one, who will decide to have an action to generate the metadata, can just extract it from here and create a new action. -
I pulled the convention of reading the metadata fields from a URL from the metaplex cli. Good or bad?
Looks great
{ | ||
mint: mint.publicKey, | ||
dest: recipient, | ||
amount: 1, |
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 guess amount should be configurable
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'm not that aware of the flow, but can we mint a few items? And does it makes sense?
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.
No, let's stick to 1 for now
6e50249
to
f191e74
Compare
…t and metadata json url
f191e74
to
834fac6
Compare
@m-sebastiyan and Metaplex team this is ready for final review. Unfortunately, batching even 2 nft instruction bundles into a single transaction exceeded the max instruction size so going with the single mint action. |
@b2kdaman that was an existing reference that I was looking to trim down to just the updateMetadata test since the mintNFT now bundles up the instructions but update is dependent on the create. I'm going to leave it in until an updateMetadata action is added. Also in terms of the interface do what do you all think of a class method on something like metadata or master edition?
It doesn't return an instance of the class which is the normal output of such methods. I'm good either way just see this pattern used already in the sdk. |
Can I get some more clarity on parameterizing the amount? |
🎉 This PR is included in version 3.4.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
FWIW there's a bug in this code when the creators array is missing or empty. The metaplex NFT standard supports this, but this code will throw this error: TypeError: Cannot read properties of undefined (reading 'reduce')
at /Users/nom/Workspaces/solana.workspace/solana-examples/node_modules/@metaplex/js/src/actions/mintNFT.ts:53:33 |
Changes
Bundle the available transaction instructions into a single action for creating a master edition NFT with some max supply based on a metadata JSON URL.
Questions