Skip to main content

New answers tagged

1 vote

Anchor: Do I need to validate PDAs when passing them into my program?

yes you should otherwise people could just give any PDA address from your program (of the same kind)
Effe2's user avatar
  • 1,525
2 votes
Accepted

Anchor: Do I need to validate PDAs when passing them into my program?

Not really, But you should. You can do it as suggested using an anchor constraint in the #[derive(Accounts)] struct #[account( seeds = [b"some_seed"], bump, seeds:...
Jimii's user avatar
  • 5,442
0 votes

PDA signed CPI access control

Going through each question individually: The design is perfectly reasonable. Depending on how each game is designed, you might be able to refactor some game logic into a combined account, but ...
Jon C's user avatar
  • 17.8k
0 votes

How to filter most recently created pdas of a program

There is no technically way to achieve this. One clunky way would be to save some non-precise timestamp (like ddmmyyyy) in the PDA (wasting space for sure), and then u can query that with memcmp for ...
Billy Mango's user avatar
0 votes

cargo build works but `cargo build-sbf` and `anchor build` fail with unsupported target error

i am actually facing same issue, mine doesn't generate an error, cargo build-bpf does nothing, same with anchor build, it does absolutely nothing , doesn't log any error , doesn't generate .so file, i ...
Johnson's user avatar
1 vote
Accepted

How to make NFT with Solana?

You have 3 options: Using the Metaplex Token Metadata Program - Nft Standard https://developers.metaplex.com/token-metadata Using the Metaplex Core - Next Solana NFT standard. https://developers....
beliveN DAOist.dev's user avatar
0 votes

Close PDA account dynamically and conditionally in secure way

I think this is new approach, which can be used in new anchor versions. https://github.com/coral-xyz/anchor/pull/2169/files
Julbh's user avatar
  • 138

Top 50 recent answers are included