All Questions

Filter by
Sorted by
Tagged with
0 votes
0 answers
2 views

Start using Jupiter SDK, load

I try to use Jupiter SDK, but receive incorrect account name during parsing Error: Failed to parse tick array DVL89XGZmTAZNwvNQHfxUiNVvt4GpBHYn4kT3yoJ8NKP code: this.jupiter = await Jupiter.load({ ...
  • 341
0 votes
0 answers
10 views

What are common practices for solana staking account address generation for wallet developers?

In order to delegate funds they must be moved into a staking account. The staking account address can be anything, even random bits as long as it doesn’t collide with any other staking account address....
0 votes
0 answers
13 views

native invoke_signed create_account pda: writable privilege escalated

i'm thinking the client can't create my pda state_account since only the program can sign for it, but i must be missing something. my native excerpt: let state_account = next_account_info(...
1 vote
1 answer
24 views

Do Empty System Accounts require initialization before receiving SOL?

When I transfer SOL from my wallet to a PDA (~1000 Lamports). I get Transaction simulation failed: Transaction results in an account (2) without insufficient funds for rent Do I need to initialize my ...
  • 3,060
0 votes
2 answers
13 views

Equivalent of toBuffer on the browser?

I have a node.js app where I succeed to convert an anchor BN to buffer but it does not works on the browser, it looks like I have to use something else. Works on node.js but not on the browser: new ...
2 votes
0 answers
11 views

What's the best way to restore a keyPair from a string, extracted with secretKey.toString()?

Say I have a secretKeyString extracted from a keyPair using keyPair.secretKey.toString(); I know I can restore a keyPair from the string with: const secretKeyStringToKeypair = (secretKeyString: string)...
1 vote
0 answers
12 views

Why did I get access to the wallet?

I generated a 12-word BIP39 word sequence using a third-party library (not from the solana tools). Next, I went to the phantom mobile application and added a wallet by restoring it using a 12-word ...
  • 121
0 votes
0 answers
7 views

Connection.getBalance not working anymore

This code used to work fine to look up my SOL balance in my wallet: const loadBalances = async (walletKey: string) => { console.log('looking up balances for: ', walletKey); let connection ...
2 votes
1 answer
17 views

Is it possible to retrieve an IDL using getAccountInfo() without brute forcing anchor decode() on the accounts

Is there a pattern in which account the IDL is stored in?
  • 51
2 votes
1 answer
14 views

Control time anchor test

I want to control time like moving forward to a specified block or time so that we can check if the function after the block/time lasts works well. Is there any way to do that in anchor solana?
  • 161
0 votes
0 answers
11 views

Instruction index: 0 Reason: A seeds constraint was violated. Getting this while testing in playground for the UpdateFund ctx

#[program] pub mod fund { use super::*; pub fn initialize_user( ctx:Context<InitializeUser>, ) -> Result<()> { msg!("User Initialized"); ...
  • 1
0 votes
0 answers
13 views

Moved to Address book by mistake

I hope someone can help I’ve moved some usdc into an address book by mistake on phantom. How do I put this back into my account?
  • 1
1 vote
1 answer
47 views

How can I use TypeScript to change the mint authority of a token account?

I know it is possible to change the mint authority using solana-spl as shown here. How can I achieve the same thing using TypeScript/JS?
  • 55
1 vote
1 answer
17 views

Deployed Contracts From a User Address

I am trying to fetch all the programs deployed by a given address. I went through the Solana documentation but I could not figure out how I can do it. I am considering to use solscan.io to fetch the ...
2 votes
0 answers
6 views

Timelock update of a smart contract

Is there a standard way to time lock the update of a smart contract or do i have to deploy my own time lock program ? At the moment, i didn't find any information about it.
  • 56
1 vote
1 answer
12 views

Does minimum balance for rent exempt change over time

I am building a wallet where I have multiple accounts. I would like to know what the rent exempt line is at all times. So that when transfers are being made, they don't end up failing because they go ...
1 vote
0 answers
13 views

Serverbased auth solution for solana wallet

I created my first opensource project: serverbased login + auth through solana message signing with the T3 stack (nextjs, next-auth, trpc & prisma) https://github.com/mattiprive/solana-login-t3-...
  • 109
1 vote
1 answer
10 views

SOL transfer fee calculation

I experience a strange behavior of the SOL transfer. I use Typescript @solana/web3.js client that do SOL transfer from local wallet filled with SOLs automatically at solana-test-validator start. Then ...
  • 131
1 vote
1 answer
49 views

Is there any way to get spl decimal in program?

Is there any way to get spl decimal in program? Sorry about this, this question is too short so I have to add this sentence.
  • 161
0 votes
1 answer
16 views

How do I filter token accounts by amount of tokens?

I understand how to use memcmp to get accounts for a particular token using getParsedProgramAccounts, however since memcmp is an equality, I can't really query for "greater than" a certain ...
1 vote
2 answers
37 views

Is it possible to create an account (new keypair) using PHP?

I don't have experience with solana yet and I have question in my work. I see that it is possible to generate a key pair with web3.js But is it possible to generate a new pshair with php ?
  • 121
0 votes
1 answer
22 views

accessing metaplex metadata in a react app via a curl request to RPC or getAccountInfo directly

I am trying to decode the metadata account data for an NFT in a react app. The metaplex SDK makes use of the connection object, which is fine for public nodes, but my front end connects to my ...
  • 387
1 vote
2 answers
59 views

Why use the 'AccountInfo' account type?

I'm looking for clarification on when and why I should use the 'AccountInfo' type instead of passing an account as a function parameter in anchor_lang. For example: Both following programs do the same ...
0 votes
0 answers
13 views

Create a custodial wallet system

I've seen an app (MagicLink) allowing simplified wallet management for users who are not familiar with the blockchain, and it's a system that interests me. However, I don't necessarily like to depend ...
  • 368
1 vote
2 answers
49 views

Stack offset error for anchor build

How can I fix this error? This is a basic anchor smart contract that initializes an account. There's only one value, an integer, stored. I tried boxing the account (to put the storage on the heap, ...
  • 23
1 vote
0 answers
8 views

Phantom transaction expired error on using durable nonce

phantom shows transaction expired error when using durable nonces . Looks like phantom isnt recognising the durable nonce in the recent blockhash and instead considering it as an old blockhash, ...
0 votes
0 answers
13 views

Network issue on solana pay

when I scan the QR from Phantom wallet for sol transaction with my wifi connection it'working fine but when I switch to cellular network I am facing network issue.Could anyone explain me what is the ...
0 votes
0 answers
14 views

Can we upload more than 1 media file for 1 NFT with sugar

I want to know if I can upload more than 1 media file for a single NFT with sugar candy machine V3 or not. What I mean is I want to upload an image and an MP4 file for the same NFT and want to put ...
1 vote
1 answer
28 views

How to Mint a NFT which belongs to certain collection in Anchor tests

Is there an easy way to mint some fake NFT that belongs to certain fake collection within Anchor JS tests? This would be really handy for testing Anchor instructions, NFTs validation/authentication ...
  • 548
2 votes
1 answer
24 views

Signature verification failed

I am trying to create a sign in transaction using the following code (using react wallet adapter): const tx = new Transaction().add( // create nonce account SystemProgram....
1 vote
1 answer
33 views

How to pull the total balance on an SPL token for a wallet address in solana (python)

Also posted on stack overflow I'm looking to get the token balance for an SPL token in solana based on the: Wallet address of the token holder The token address How can I do this? I thought it would ...
2 votes
1 answer
18 views

I'm trying to initialize my accounts and the tx goes through but it says the account doesn't exist when i retrieve info from it

essentially all the lists are the same, but when i call the bluelist account i get " Error: Account does not exist HkBnFqgNQfWisvKkDwSbUzE2EJ3jriQHY64H4t3EjjeM" this error happens on ...
  • 21
1 vote
2 answers
56 views

How to store data directly on the Solana blockchain?

I am a beginner to Solana Development and I recently learned that data in Solana blockchain can be stored inside accounts. Instead of this is it possible to store the data directly in a block instead ...
2 votes
1 answer
23 views

Calling the getSignaturesForAddress returns empty

Context: I am trying to get a history of transactions for an address. I plan to use the getSignaturesForAddress() to get all the signatures I could use to find all the confirmed transactions using the ...
  • 31
0 votes
1 answer
22 views

General stats on RPC endpoint?

I was using the public mainnet-beta RPC endpoint for my Dapp until I started getting 403 from the API. I am starting to look at private RPC. I am still quite confused on what is the price for one ...
3 votes
2 answers
114 views

Is there a way to estimate the transaction size?

Currently to get the size of a transaction I have to do the following const tx = new Transaction().add(...) const { blockhash } = await connection.getLatestBlockhash(); tx.recentBlockhash = blockhash; ...
  • 41
1 vote
3 answers
38 views

How do I get an NFT collection holders?

Here's what I have tried, and it seems to be buggy. Using SolScan.io I found the collection, then went to Holders, and clicked "next" to get the next 10. I realized this data is wrong, as in,...
  • 113
2 votes
2 answers
19 views

Deriving an associated token account address

How can I derive an associated token account address for a given wallet address and token mint?
  • 21
1 vote
2 answers
26 views

Find collection in a Sharky offer loan transaction

I'm trying to analyze a transaction for the NFT Lending protocol Sharky.fi. This txn for example : Cm4pCJFCKQzmtuZ254itotMokhK8X6zs7YfeWKYE6i8kpaowZ3XzUPWJbhvvcoZ6KxULP79PEBy8A3P4nmPpkgg We have an ...
  • 21
3 votes
2 answers
34 views

How to get the Collection's public key out of certain NFT in Anchor

How can I find out the Collection's public key of some NFT in Anchor? I know it was easy to do with the Solana SDK, but as far as I know it is not compatible with Anchor. More specifically, how can I ...
  • 548
0 votes
0 answers
9 views

Hello everyone Please help with the following problem: solana-farm-ctrl: command not found

Following the "Quick Start" instructions for deploying the farm, I started working with Fund. Conducted the build, which was successful (as well as the farm build). Next was the command: ...
  • 1
0 votes
0 answers
10 views

How to send versioned transaction using serum multisig

I need to send the versioned transaction through the address lookup table using serum multisig, I first created the multisig transaction using the serum method of createTransaction then I need to send ...
  • 353
1 vote
1 answer
12 views

Empty pre/postTokenBalances when there is an actual token transfer

The RPC returns empty arrays for pre/postTokenBalances for the transaction below, when there is actually a token transfer. https://explorer.solana.com/tx/...
  • 11
0 votes
1 answer
11 views

solana-farm-ctrl: command not found

Following the "Quick Start" instructions for deploying the farm, I started working with Fund. Conducted the build, which was successful (as well as the farm build). Next was the command: ...
  • 1
1 vote
2 answers
33 views

How to set space for PDA that store a Vec of structs in data

I'm having this pda account to store data in program so how can I set the space correctly? #[derive(Clone, AnchorSerialize, AnchorDeserialize)] pub struct MarketItem { item_id: u128, owner: ...
  • 161
0 votes
1 answer
15 views

How to send message and signature as Vec<u8> and [u8; 64] to program

I'm following this repo (https://github.com/GuidoDipietro/solana-ed25519-secp256k1-sig-verification) to create and verify signature, but the way to create instruction isn't used anymore so I'm trying ...
  • 161
0 votes
0 answers
11 views

Crypto missing from phantom wallet

it will be great if anyone can help me out. Recently, I have uninstalled my Google Chrome browser which has my phantom wallet saved into it's extension. And when I re-installed it, and tried to import ...
1 vote
2 answers
17 views

Devnet CPI "unknown program" and "An account required by the instruction is missing"

Testing CPI calls on devnet (e.g. programs both deployed to devnet, anchor.toml set to devnet) yields this error: 'Unknown program Ev6JrN5HqrKwXhoB9jucLdn51yzzDvWmBHkubXWavRio', 'Program <...
  • 1,040
0 votes
0 answers
12 views

Error downloading the ComputeBudget program to use on local validator

Per the Solana Cookbook, I'd like to set a transaction priority by using fees. transaction.add( ComputeBudgetProgram.setComputeUnitLimit({ units: 1_000_000, }) ); transaction.add( ...
1 vote
0 answers
35 views

Single-node validator stuck on "Haven't landed a vote, so skipping my leader slot"

What are the steps to getting a single-node validator in a private network (using the solana-validator binary) running? The current setup I'm doing is solana-genesis \ --enable-warmup-epochs \ --...
  • 133

15 30 50 per page
1
2 3 4 5
51