Skip to main content

Questions tagged [account-data]

The tag has no usage guidance.

1 vote
1 answer
18 views

Checking the generated PDA against the user's PDA input

First of all, I'm new to Solana development (came from an Ethereum background), so sorry if my question is too basic. I'm following the SolDev course, I'm on course state management. I have a ...
0xbrivan's user avatar
1 vote
0 answers
34 views

Reading all kinds of information from the blockchain

(For a project of mine which is a full Solana blockchain "status" tracker. For public!) Problem: Reading Pair/Pool info How do I even get the info which pairs exist without looping through ...
axlynom's user avatar
  • 31
0 votes
1 answer
47 views

Are Tx process parallel? How are the account data guaranteed not overrided each other by simultaneous Tx?

As stated in title. Does runtime sort all input account an add mutex-locker to those accounts that are mutable?
breeze wang's user avatar
2 votes
2 answers
216 views

createInitializeMintInstruction() ----> error: invalid account data for instruction using

I am trying to use the "createInitializeMintInstruction()" using JS to create a token. The problem is when executing, it throws an error. Concretely this one: Transaction simulation failed: ...
lauteriust3's user avatar
1 vote
1 answer
34 views

rent handling in storage

How does this "collecting rent" work exactly(or used to work)? Does it iterate over all the accounts that are not rent exempt per every epoch? in this link, i saw this line: requires the ...
Sepehr Mirnasrollahi's user avatar
1 vote
2 answers
374 views

Decode account data

I am trying to decode data from accounts. This is the IDL for the data I want to decode: { "name": "deployment", "type": { "kind": "...
CryptoTioSam's user avatar
1 vote
2 answers
1k views

Token balances on liquidity pools

How can I get to the price in a liquidity pool? I assumed it would be as simple as getting the balances of both tokens and doing quoteBalance / baseBalance, but that doesn't seem to be the case. Below ...
lsrth's user avatar
  • 21
1 vote
1 answer
99 views

Correct way to define and initialize a variable-length account in Anchor

I have been following the Tic-Tac-Toe tutorial and i am experimenting with creating a PDA account in my program that holds a variable-length list of values (in particular, public keys representing ...
munifao's user avatar
  • 53
2 votes
1 answer
560 views

Decode data from GetAccountInfo in python for a Raydium pair

Maybe my approach is wrong. I'm new to Solana dev. I'm using the Solana mainnet API and I'm trying to get the liquidity pool amounts for a given token pair on raydium. My code: res=solana_client....
Ricouello's user avatar
  • 121
0 votes
1 answer
71 views

Deploying program with sol_remaining_compute_units() gives "invalid account data"

Including something like msg!("remaining compute: {}", solana_program::compute_units::sol_remaining_compute_units()); will lead to error when deploying RPC URL: https://api.devnet.solana....
Pun's user avatar
  • 1
0 votes
1 answer
37 views

The data that anchor' account stored surprise me, for a non-PDA account, it store all history input data. Why?

I play this https://beta.solpg.io/62d67703f6273245aca4f5fe example days ago. Just added more logs inside initialize() instruction. After invoke initialize() multiple times with different 'new_account' ...
breeze wang's user avatar
1 vote
2 answers
85 views

does account declared among different`#[derive(Accounts)]` struct share one storage?

When learning PDAs, I got an example that use PDAs to implement voting: https://github.com/bfriel/crunchy-vs-smooth/blob/master/programs/crunchy-vs-smooth/src/lib.rs#L34 We can see that there are code:...
breeze wang's user avatar
1 vote
0 answers
36 views

Increase PDA size after deployment

I read somewhere some time ago that Solana now provides feature to increase the PDA size post deployment. For example, let's assume that I deploy a PDA with a capacity to hold 10 Publickeys and later ...
Vineet Kinger's user avatar
2 votes
2 answers
931 views

Check if an account is a Token Account

We are given some public key that may be a token account (could be ATA or not) and want to find out if it is. Currently I am doing this by calling getAccount from @solana/spl-token and seeing if it ...
Ahri's user avatar
  • 4,897
2 votes
3 answers
190 views

Extending struct fields in a PDA and ensuring compatibility

I need to extend the fields I have within a PDA. Some accounts are already live, so I want those to still be compatible with the new layout. As a simple illustrative example, consider this account ...
mega_creamery's user avatar

15 30 50 per page