Top new questions this week:
|
I’ve written a contract with anchor. This is how my withdraw function looks like(admin public key is random and used for demonstration only): const ADMIN_PUBKEY: &str = “…
|
Compared to the normal cargo build –release –workspace, rebuilding a program with cargo build-bpf (or sbf) ends up redoing quite a bit of work. If you have already built the workspace using cargo …
|
Using JS, how would I go about getting transaction information on transactions that affect the balance of a specific account? I’ve been able to listen for account changes with the following code, but …
|
If I am given an arbitrary Solana public key without any transactions associated to it, is there a way I can determine if this is a normal account or an ATA? My initial approach would be to see if it …
|
I would like to know if an on-chain program could encrypt data, store it in an account and be the only one able to decrypt the data? If it’s possible, how to do this? I feel it’s not possible because …
|
what is the difference between signer constraint: Checks the given account signed the transaction. Custom errors are supported via @. Consider using the Signer type if you would only have this …
|
I want to get all the program accounts with a filter. The variable country is a number in my code and I don’t know how to convert it to bytes for the filtering to work. const country = 0; const …
|
Greatest hits from previous weeks:
|
How, for example, might you implement a simple “coin-flip” game as an on-chain Solana program? The concept is that a player deposits a coin or token, and the smart contract generates a “…
|
I have the JSON file containing the keypair which has an array containing 64 values: $ cat ~/my-solana-wallet/demo.json [4,182,130,247,119,117,227,207,112,73,170,126,222,197,244,99,215,107,255,202,33,…
|
I just migrated my NFT collection to the new Metaplex certified collection standard using their tool at link Now when I try and run .nfts().update() I get the following error Source: Program > …
|
I try to sign a text and I get this error. const anchorWallet = useAnchorWallet(); const MEMO_PROGRAM_ADDRESS = “MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr”; const MEMO_PROGRAM_ID = new …
|
The Transaction class has a sign and partialSign method. What are the differences between them and what are the different use cases of using partialSign over sign
|
Following error occurs when I try to run anchor test: Error: failed to send transaction: Transaction simulation failed: Error processing Instruction 0: Program failed to complete at Connection….
|
I probably am doing something really stupid but this basic thing doesn’t seem to work for me for this scenario. I checked the other questions similar to this one but they are either different …
|
Can you answer these questions?
|
I am getting the “Transaction simulation failed: Transaction results in an account (2) without insufficient funds for rent” error while executing the transaction, So how can I check the …
|
I found pretty interesting documentation on spl.solana.com however I believe it’s not accurate on one side! The section below taken from the site shows a way we can send spl tokens, via JS by funding …
|
Is there a way to access some form of unique identifier for the transaction that’s currently executing from the BPF execution context(program code)? The two options I have in mind, but I haven’t been …
|