If you're writing Solana instructions involving tokens/NFTs, please require the token's mint account to be passed!

Otherwise, if you query for the mint's transactions, transactions that include your instruction may not show up... more on this 👇
For example—the regular "Transfer" instruction of the SPL Token Program does not take in the mint account.

Thus, if you transfer an NFT using this instruction, it WON'T show up on that NFT's Solana Explorer page. Image
That's why @phantom uses the "Transfer Checked" instruction, which does take in the mint account.

And that's why NFT transfers conducted via Phantom will always show up in Solana Explorer for the token mint account. Image
For example, this transaction

explorer.solana.com/tx/5V59Lsj8vJ8…

shows up for this token mint

explorer.solana.com/address/CbcNE5…
Note: this is why @MagicEden_NFT transactions aren't listed in Solana Explorer.

For example, the instruction they use to list NFTs on the marketplace doesn't take in the mint account.

And thus, listing transactions don't show up in Solana Explorer on the mint account's page.
Why does this matter?

Well, say someone wanted to build a nice UI showing all of an NFT's transactions.

The most straightforward way to do this is to use connection.getConfirmedSignaturesForAddress2(mint), parse the transactions, and display them.
But if an instruction doesn't take in the mint account... transactions including the instruction may not show up when you call getConfirmedSignaturesForAddress2!

And that makes it harder for developers to build cool stuff.

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with pencilflip.sol 🍄

pencilflip.sol 🍄 Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @pencilflip

Jan 16,
The @metaplex team is working on a new metadata standard for both fungible and non-fungible tokens.

It's backwards compatible and has official support for on-chain collections. And it's currently being tested in devnet.

For more details, see below 👇
1/ First, and perhaps most importantly, this new standard is backwards compatible.

This means NFTs that use the old standard will still function properly (e.g. be displayed properly in Phantom) once the new standard rolls out.
2/ So, what changes does the new standard introduce?

First, let's look at the old on-chain metadata struct. Image
Read 14 tweets
Dec 12, 2021
Solana vs. Ethereum L2s, a UX comparison
1/ A lot of people are excited about ZK-rollups, and for good reason.

However, from a UX experience, ZK-rollups aren't too different than existing L2s. E.g. Polygon already offers low fees and fast transactions.

Let's look at Solana vs. L2s, and see why one might be preferred.
2/ To simplify things, I'll mainly be looking at Polygon.

Yes, I know that ZK-rollups are more secure than Polygon's sidechain.

But really, most users don't care about that 🤷‍♂️. Users care about things like low fees and fast transactions, e.g. how good the UX is.
Read 14 tweets
Dec 10, 2021
How do Solana CPIs work?

That is, how do Solana programs call into other Solana programs?

Here's a quick 6 tweet explanation 👇
1/ If you're unfamiliar with Solana transactions/instructions, you might want to take a look at this first.

2/ Calling between programs is achieved by one program invoking an instruction of the other.

Here's how that looks in practice.

The first arg is the instruction to be invoked, and the second arg is the array of accounts required by that instruction.
Read 9 tweets
Dec 4, 2021
Is Solana centralized?

There are three main reasons why people say Solana is centralized:

1. Expensive to run a validator
2. Token distribution
3. Only one blockchain software client

Let's take a look at each of these reasons 👇
1/ IMO it doesn't matter how much it costs to be a validator—it matters how many validators there actually are, and what the Nakamoto coefficient is.

Turns out Solana's Nakamoto coefficient is pretty high (19 validators required to halt the network).

2/ 19 may not sound like a huge number, but it's higher than Ethereum's Nakamoto coefficient.

The NC for PoW Ethereum is 3 (etherchain.org/miner), and for PoS Ethereum it's 4 (source is a bit outdated, not sure exactly what it is now).

Read 20 tweets
Nov 23, 2021
Here's a diagram that shows all the different parts of a Solana transaction.

More details below 👇
1/ Each Solana transaction contains a message, and the first part of each message is its header.

The header is simple, it just contains the numbers described in the diagram.
2/ The next part of the transaction message is an array of accounts. They are ordered based on whether they require a signature and whether they are writable.

This array also contains the addresses of the programs used by the instructions.
Read 8 tweets
Nov 18, 2021
1/ Here's a thread of all the Solana threads I've written (a thread of threads), plus some great threads/tweets by other folks. I'll try to keep adding onto this in the future.

First, 11 resources to get started with Solana development

2/ Solana accounts explained in 5 tweets

3/ A simple breakdown of Solana accounts

Read 40 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(