Skip to main content
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
Results tagged with
Search options answers only not deleted user 1343
1 vote

What's the best way to deserialize Anchor Account Data from AccountInfo?

You have to setup a rust client. Create new cargo package inside your program root directory. And make sure to import your program in your client package (Cargo.toml) Create new solana client le …
vicyyn's user avatar
  • 4,295
8 votes
Accepted

What is Anchor (8 bytes) discriminator

The discriminator is defined by the first 8 bytes of the Sha256 hash of the account's Rust identifier--i.e., the struct type name--and ensures no account can be substituted for another. It lets Anchor …
vicyyn's user avatar
  • 4,295
3 votes
Accepted

How can I set a panic in anchor?

First, you need to create an error, the message will be sent when the error is thrown #[error_code] pub enum ErrorCode { #[msg("This is an ERROR!")] MyCustomError, } then in your instruction …
vicyyn's user avatar
  • 4,295
1 vote

How much of a PDA can a program control

a PDA is limited to how much the program offers in controllability. To elaborate. Let's say your program has a single instruction initialize that initializes a pda account. In that case, your program …
vicyyn's user avatar
  • 4,295
4 votes

how can i check / verify past events of my smartcontract?

You can fetch the transaction history of your program (address) and then parse the transactions using Anchor event parser. fetching the transactions connection.getSignaturesForAddress is limited to 10 …
vicyyn's user avatar
  • 4,295