#
Solana
#
NFT Implementation
Our Non-transferable NFT implementation on Solana uses the SPL Token program to mint directly, rather than Metaplex's Candy Machine. We then use the in-built 'freeze' functionality of the SPL Token program to prevent transfers. We then set the freeze and mint authority to None.
See below for a full list of the instructions used to mint the NFT:
// EXTERNAL INSTRUCTIONS
/* create the mint account */
SystemProgram.createAccount()
/* initialize the mint*/
createInitializeMintInstruction()
/* create a token account that will hold the NFT */
createAssociatedTokenAccountInstruction()
/* mint 1 (and only) NFT to the mint account */
createMintToInstruction()
/* run our kycDAO program to create metadata and freeze the token */
mintWithArgs()
// CPI INSTRUCTIONS within mintWithArgs()
/* create the metadata account */
/* freeze the token */
/* set freeze authority to None */
/* set mint authority to None */
#
Metadata
On Solana we follow Metaplex's NFT metadata standard
Here is an example of the JSON metadata stored off-chain referred to in the uri
field:
{
"name": "kycDAO NFT",
"symbol": "KYCDAO",
"description": "A non-transferable NFT from kycDAO",
"image": "https://ipfs.io/ipfs/QmdCZ1yrHkHMBRRdMRFQyPeVnwGqPpch3BQiBVy62aBesb",
}