All Questions
Tagged with deserialization anchor-lang
3 questions
0
votes
1
answer
112
views
anchor_lang::AccountDeserialize
How to implement correctly try_deserialize and try_deserialize_unchecked for this Example struct? I've been trying, but failing miserably.
#[derive(Clone)]
pub struct ExampleProgram;
declare_id!(&...
6
votes
2
answers
2k
views
What's the best way to deserialize Anchor Account Data from AccountInfo?
I have struct MyAccount that I want to deserialize from a list of ctx.remaining_accounts. What's the best way of doing this?
Currently I'm using the following format, copied from jet protocol v2's ...
2
votes
1
answer
434
views
How to deserialized Anchor accounts in Rust
In JS/TS I can decode an account from bytes using the coder:
const program = new Program(IDL, new PublicKey(""), anchorProvider)
const decoded = program.coder.accounts.decode("...