Skip to main content
2 votes
Accepted

How to Check if an NFT Belongs to a Specific Collection in Solana with mpl_token_metadata?

If you are using anchor, you will be able to fetch this from the deserialized account in the collection field key, ref: https://docs.rs/mpl-token-metadata/latest/mpl_token_metadata/types/struct....
Jimii's user avatar
  • 7,672
2 votes

Access violation in stack frame for fresh raydium-cpswap build

It's extremely likely that the two errors are related. There have been some reported increases of stack usage with newer versions of the Solana compiler: https://github.com/anza-xyz/agave/issues/1186 ...
Jon C's user avatar
  • 19.6k
1 vote

What's the Concept behind PDAs which are system Accounts?

System Account is just a name given to the PDA account. PDA accounts are owned by the program that derived them. The name for System account might come from the fact that they are holding lamports and ...
ApolloSurferPt's user avatar
1 vote
Accepted

How to Handle Base64-Encoded Signed Transactions in Rust

To handle a Base64-encoded signed transaction in Rust, you can follow these steps: Decode the Base64 string to get the original binary data (similar to how Base58 decode would work). Deserialize the ...
mumut3k's user avatar
  • 106
1 vote

Functionality of getVoteAccounts without relying on the RPC call

In my opinion, you cannot fully replicate getVoteAccounts on-chain because Solana programs (smart contracts) cannot directly access or query global account data (like all vote accounts) or perform the ...
pizzza1bit's user avatar
1 vote

Are these parameters possible?

No minting is possible Max token balance is not possible afaik using token or token22 trans fees is possible burning fees is possible token lockup is possible I would suggest using the following ...
Metasal's user avatar
  • 438
1 vote

Running anchor build gives error in solana program

At first, you need to extract the contents of the file which you downloaded. tar -xjf platform-tools-osx-aarch64.tar.bz2 Once extracted, move the contents to a convenient location, such as /usr/local/...
pizzza1bit's user avatar
1 vote
Accepted

Cannot Create an Associated Token Account

You might need to make sure the order of accounts in your accounts matches the ones in the instructions you are constructing in your tests. in your instruction, the token program comes before the ...
Jimii's user avatar
  • 7,672
1 vote
Accepted

mpl-token-metadata

You can check out all available instructions in the docs, via https://docs.rs/mpl-token-metadata/latest/mpl_token_metadata/instructions/index.html In particular, you are interested in the ...
Jimii's user avatar
  • 7,672
1 vote

How to Calculate Space for PDA Accounts with Dynamic Vectors in Solana?

Are there any best practices for handling PDA accounts with dynamic data like vectors Best practice is don't do it. If you MUST have dynamically sized storage for whatever reason, use a statically ...
Whiteseal's user avatar
  • 3,597
1 vote

How to Calculate Space for PDA Accounts with Dynamic Vectors in Solana?

To answer your questions.... You'll need to just put some amount that you want to allocate at the start. Using std::mem::size_of will be incorrect, since it'll give you the stack space for a Vec, ...
Jon C's user avatar
  • 19.6k

Only top scored, non community-wiki answers of a minimum length are eligible