Top new questions this week:
|
I want to add a check that once a function is called it should never be called again. I want initialization to be one-time only. Is this a good approach if I take a bool value and set it to false …
|
I need to put a check on Max whitelisted NFTs. Like each user can mint 10 NFTs. Any rust code snippet or reference would be helpful.
|
What am I doing wrong? Is that not how we use tuples in rust? Account: #[account] pub struct UserLedger { pub list: Vec<(String, u32)>, } Error Message: Error: Type not found: {“type&…
|
how can i use Token-2022 in anchor program? There is anchor_spl crate but i dont see any reference to Token-2022. There are examples only with javascript but no for anchor program spl.solana….
|
If an account is not generated via PDA and is instead created as a new keypair, how should this new keypair be treated? Is it important to custody this somewhere secure? github.com/coral-xyz/…
|
Is there a way to create and initialize an account in Anchor without a discriminator? I tried testing with an initialize instruction that makes a CPI to system program to create an account and then …
|
I’ve been interested in smart contract’s lately and I was wondering what separates them from just normal scripts that track transactions or something. Can they control NFTs and wallets? Like what …
|
Greatest hits from previous weeks:
|
I’m curious what the practical difference is between the Transfer and TransferChecked instructions, and when should we use one over the other. In this question, I’m using Transfer/TransferChecked as …
|
As a beginner, what is a good way to understand the purpose of Program Derived Addresses being bumped until they are off of the ed25519 elliptic curve? What is the ed25519 elliptic curve? How is it …
|
I was debugging an issue in our backend where two parallel transaction ended up having the same Transaction ID. This is what Solana docs say about the Transaction ID: Transaction ID The first …
|
Try to send a transaction using phantom wallet and vuejs. import { createUpdateMetadataAccountV2Instruction } from ‘@metaplex-foundation/mpl-token-metadata’; import { Transaction } from ‘@solana/…
|
I have a this function pub fn sign_up(ctx: Context<SignUp> , user_name: String , phone_number: String , email: String) -> Result<()> {// logic is here} And in SignUp i have : #[derive(…
|
I am using anchor and I need to check that two different PDAs have not been initialized. Later on in a different function call I need to check if a PDA has been initialized before closing the account. …
|
On minting single or two NFTs phantom wallet shows the balance that will be detected before signing Tx but on multiple mint more than 2, it will show msg “unable to fetch balance changes” …
|
Can you answer these questions?
|
I’m trying to create some layouts for serum-dex Slab accounts, where, export class Slab { readonly header: SlabHeader; readonly nodes: SlabNode[]; constructor(header: SlabHeader, nodes: …
|
Running anchor test in a project with multiple Test.toml files executes every command labeled “test” in every Test.toml [script] block, (and from that of the Anchor.toml too). I’ve looked …
|
Getting this error Error: failed to start validator: Failed to create ledger at test-ledger: blockstore error when running solana-test-validator on m1
|