Skip to main content
5 votes

Create_program_address vs find_program_address

They serve different purposes and depends on your context you can decide which one to use or a combination of both. create_program_address is for creating PDA with provided seeds and bump Example ...
BFault's user avatar
  • 281
4 votes

Creating a Custom Vanity Key / Wallet

When a Solana wallet is generated using a mnemonic, is has a set "derivation path". The reason the wallet you generated with the CLI is different in the CLI and in your web wallet is because ...
nickfrosty's user avatar
  • 1,199
4 votes
Accepted

MagicEden DutchAuction address

The program address is DA14CwvMNkbMggye6Fkvqa1cMxo2Rh3neLvo8ufWoyeL https://solscan.io/account/DA14CwvMNkbMggye6Fkvqa1cMxo2Rh3neLvo8ufWoyeL How did i find it? Most auctions on the UI are english ...
Arowana's user avatar
  • 2,373
4 votes
Accepted

Create_program_address vs find_program_address

When checking if some account matches an expected derived PDA, you can use either. find_program_address consumes more CUs, so create_program_address is preferred when the bump is available. It's ...
Whiteseal's user avatar
  • 3,597
3 votes
Accepted

Get AccountInfo from ProgramId, or invoke program method using ProgramID

Accounts can't be loaded on the runtime, rather they can only be pre-loaded and passed unto it. You'd have to pass in all the accounts you need(or think you might need) in from the client. There's no ...
Ademola's user avatar
  • 3,944
2 votes
Accepted

Solana Keygen Pubkey Prompt Won't Let Me Type

You're still typing, just the command doesn't reveal what you are typing. This is typically used with sensitive information like passwords or in this case a seed phrase. Try just typing the seed ...
Pixeled's user avatar
  • 486
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 ...
Buzzec's user avatar
  • 574
2 votes
Accepted

Why does CandyMachine use `cmp_pubkeys` function and not an `Eq` trait?

The sol_memcmp syscall is run as native code which is both faster and cheaper than Eq/PartialEq in eBPF. You can find the syscall implementation here.
trent.sol's user avatar
  • 4,585
1 vote

How to create multiple wallets, also known HD wallets with rust code?

The best practice for readers to be able to help is to provide the error that is thrown by the code. With this, I believe it will be called `Result::unwrap()` on an `Err` value: InvalidDerivationPath(&...
chalda's user avatar
  • 1,657

Only top scored, non community-wiki answers of a minimum length are eligible