0

I am a little confused about the workflow of NFT's on the Solana blockchain. I come from Ethereum and everything there is very clear. There is a smart contract that is executed on the blockchain which requires a specific amount of Ether to accept and you send the transaction out to the mempool to be picked up by a miner.

On Solana from what I've gathered is, the NFT creator creates a token using SPL that gives them an ID. Then someone else can create an account under one of their wallets to accept that specific type of token that was created. Then that person can use that account to mint the NFT using the ID we got earlier. Is that all correct?

If someone could please clear up the some of the things below it would be greatly appreciated.

Where does Candy Machine come into play here? What's the difference between the Mint Authority and the Update Authority? Does a collection need to run the spl create-token command for every single token?

justanotherguy
  • 395
  • 4
  • 17

1 Answers1

0

The Candy Machine by Metaplex (https://github.com/metaplex-foundation/metaplex) is the standard smart contract (actually known as programs in Solana) being used at the moment for minting NFTs in the Solana ecosystem.

It abstracts away from all the details you have described so people can simply clone and deploy the repo more or less rather than write your own contracts as in Eth.

An NFT in Solana is an SPL token with a metadata struct set to the Metaplex standard (i.e. a URI on-chain pointing to more metadata off-chain). This is the current agreed-upon standard for NFTs on Solana.

You are also right in saying Solana SPL tokens require an account to be created to "receive" NFTs or mint them as well. A new account will be created for each NFT. This is handled by the Candy Machine as well as the SPL token program built into Solana itself, so normally you don't have to deal with this unless writing your own contracts possibly. Check Solana docs / Anchor framework docs for more info on programming on Solana.

Pang
  • 9,564
  • 146
  • 81
  • 122
Sean O
  • 302
  • 1
  • 9
  • 1
    Thanks for the reply @j0hn_sm1th . In Ethereum there is a concept of minting through contract, and I noticed that candy-machine has these two functions called mintOne() and mintMany(). Am I able to use these function outside of my own project given I have access to the candy-machine id generated by the creators of the nft? – justanotherguy Jan 14 '22 at 22:46
  • Are you asking would someone be able to create another frontend or contract to mint NFTs from your contract? – Sean O Jan 14 '22 at 22:56
  • If thats what you are asking then yes. Anyone can call those functions, it should also be noted that candy machine has a "timer" that will not let anyone (except for the contract owner) to call these functions successfully until the timer has been reached. – Sean O Jan 14 '22 at 22:57
  • Well I want to know if I can pragmatically mint an NFT like I can on Ethereum. – justanotherguy Jan 14 '22 at 23:04
  • Yep you can, like creating a bot or something is definitely possible. – Sean O Jan 15 '22 at 02:47
  • How would I go about minting an NFT using a library like solana/web3? I see in the candy-machine repository there is a functions called mintOne. Is that something I should be using or should I be doing it differently? – justanotherguy Jan 15 '22 at 03:52
  • Yep, check one of the newer repos for candy machine version 2 frontends though. I haven't had a detailed look but I think there was some changes for the web3 interaction with the contract. https://github.com/metaplex-foundation/metaplex/tree/master/js/packages/candy-machine-ui. Here is one repo supported by metaplex and here is the docs https://docs.metaplex.com/candy-machine-v2/mint-frontend. It has a function here https://github.com/metaplex-foundation/metaplex/blob/master/js/packages/candy-machine-ui/src/candy-machine.ts#L246 that you might be looking for. – Sean O Jan 15 '22 at 05:29
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/241089/discussion-between-justanotherguy-and-j0hn-sm1th). – justanotherguy Jan 15 '22 at 16:17