NFTs on Solana are simply just some SPL-Tokens. But what makes them special from other tokens? Few things... #Day11#Solana#NFTs
1. Max Supply - The max supply of such tokens is restricted to 1. Which means at any time, there won't exist more than 1 such token.
2. Decimals - These tokens can't be fractionalized. Their decimals property is set to 0.
You can't send someone 0.5 NFT right? as compared to sending someone 0.5 Sols or some other token.
3. Mint Authority - While minting an NFT, initially the payer is set as mint authority for the concerned token.
However, Before the trx ends, a new account is created and made the mint and freeze authority for the token ensuring it can't be minted ever again.
Most importantly they have some metadata attached to them.
A PDA which uses NFTs mint as a seed phrase is used to store its metadata.
Candy Machine is a special type of machine/program developed by @metaplex to help in minting NFTs on Solana.
SUGAR CLI, also built by them makes the process of uploading NFTs on-chain super easy 🤌
Took a step further and created my own NFTs 🫡 Haha feels good seeing them. My goal is to let others mint my NFTs by just scanning a QR code. Will look how I can achieve that. Calling it a day. It keeps getting better 🥰
• • •
Missing some Tweet in this thread? You can try to
force a refresh
The curious case of using offset values with data slice property 🤔 #Solana#Day8#offset
dataSlice is used to literally slice 🔪 the returned data buffer.
Let's say you have a dataBuffer in which the first 8bytes are storing data you don't need. So, we can slice that from all the data and then carry out operations on the remaining data. Optimized much? 🤌
Now, the no. of bytes, to slice from the beginning, is defined as an 'offset' value inside of it.
Or
using offset value in dataSlice defines how much bytes to slice, in the returned buffer.
Analogy: You can either buy all the potatoes and then decide what potatoes to use for making 🍟 or you can filter out the good potatoes while purchasing them. In either case the fries will be made of good 🥔 #Day7#Solana#filtering
Sorry 😛, stay with me. Here purchasing 🥔 refer to fetching accounts data using 2 approaches:
1. Fetching all acc. without any data (just their pubKeys) ~ (purchasing all)
2. Filtering what acc. to fetch, before fetching them without any data ~ (filtering before buying)
In the 1st approach, one is fetching accounts without any data.
Now what that means is, we have a pubkey with us.
Whenever a client demands for data, we will be using the pubkey we saved earlier to further fetch associated account data.