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....
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
...
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 ...
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 ...
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 ...
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 ...
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/...
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 ...
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 ...
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 ...
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, ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
rust × 553solana-program × 245
anchor × 234
web3.js × 58
anchor-lang × 46
spl-token × 44
pda × 36
transactions × 26
nft × 25
cargo × 22
solana-sdk × 21
solana-cli × 20
metaplex × 18
rustc × 18
program × 16
account × 15
anchor-client × 14
typescript × 14
mpl-token-metadata × 14
rpc × 13
cpi × 13
native-programs × 13
solana-client × 11
raydium × 11
transfer × 10