Search Results
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 |
2
votes
can we store values in constant at the time of program deployment?
You can use Rust feature flags for this use-case. These can be used as environment variables, which allow you to set deployment environments, config, and more.
For example, you'll set them in your Car …
3
votes
How to Convert from Account<'info, TokenAccount> to UncheckedAccount<'info>
The two types aren't inherently different under the hood. UncheckedAccount simply skips the validation checks a normal included account would go through in an Anchor instruction.
You can attempt to re …
4
votes
Mainnet contract deployment hangs
Use solana program deploy ./target/deploy/<program-name>.so with the following flags
--use-rpc if you have a custom RPC URL (solana config set -u <url>)
--with-compute-unit-price <micro-lamports> to …
3
votes
How to catch error or throw custom error if PDA doesn't exist in Solana program
To check if a PDA is initialized, or check it against an account being passed into the program, the following can be done (if using anchor)
Import Pubkey:
use anchor_lang::solana_program::pubkey::Pubk …