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
...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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.
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(&...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
pubkey × 10solana-program × 4
keypair × 4
rust × 2
program × 2
address × 2
solana-keygen × 2
raydium × 2
anchor × 1
metaplex × 1
token × 1
wallet × 1
getprogramaccounts × 1
ledger × 1
seed × 1
magiceden × 1
beginner × 1
historical-data × 1
web3.js × 1
private-key × 1