Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
1
vote
How do I throw an error if there are other instructions in a transaction?
You will have to use the solana instructions sysvar. You need to ensure that there is only one instruction and that that instruction is an invocation to your program, otherwise a user could create a p …
1
vote
Accepted
Verify data actually came from a certain program
A man-in-the-middle attack can be prevented by using a trusted rpc node through https with tls. This will inherently prevent this attack. If you don't have a trusted node you will need to run your own …
2
votes
Accepted
Inside programs is it "better" to pass Pubkey as a reference?
In general I suggest passing references rather than values for pubkeys. It goes against usual logic but bpf compute cost doesn't care about cache locality. There are some cases where it might be bette …
2
votes
NFT batch transact
A single transaction has a byte limit which is what causes that ~33 account limit. That limit also includes programs in addition to what you listed above. A transaction is atomic in and of itself, but …
2
votes
Accepted
How to decode anchor zero copy account with idl?
Anchor zero copy doesn't follow the rules of how Pod (the backing trait from bytemuck) is supposed to be implemented (violates the unsafe constraints). To fix it you need to add #[repr(packed)] to get …
3
votes
Deploy regular solana (not anchor) on mainnet
You use cargo build-sbf or cargo build-bpf (depending on you used version) to build your program. That will build a .so file in your target/deploy directory. From there you can use the solana program …