Skip to main content

Questions tagged [account]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
4 votes
1 answer
295 views

What is the data size of a wallet account?

I want to calculate the minimum balance for Rent-except and have found code like this: const { Connection, clusterApiUrl, LAMPORTS_PER_SOL } = require('@solana/web3.js'); const connection = new ...
breeze wang's user avatar
0 votes
0 answers
199 views

Error: AccountNotFound: on Solana CLI

So I setup Solana CLI on Ubuntu (Windows sub system WSL2). I started up my solana-test-validator Then I opened up a new Linux terminal instance and set solana config set --url localhost Finally I ...
Mark's user avatar
  • 45
0 votes
1 answer
61 views

Identifying Solana Account Types Programmatically: Account, Program Account, Token Account, Vote Account, and More

In Solana, how can I programmatically determine the account type of a specific Solana address, such as whether it is an account, program account, token account, vote account, or any other account type?...
Hit's user avatar
  • 3
0 votes
1 answer
1k views

Program Error: "Instruction #3 Failed - Account is frozen"

An error occurred when I purchased the IQ50 from birdeye. I tried several times but it still didn’t work.
Choi Rofish's user avatar
0 votes
1 answer
70 views

Who gets to create token associated accounts on Solana?

I understand the differences between token mint accounts and token associated accounts. As I'm building a web-app allowing people to mint spl tokens on our website, we are facing a question about who ...
Maxareo's user avatar
  • 101
0 votes
0 answers
29 views

Can anyone help me, they changed the owner of my account and I don't know what to do?

Can anyone help me, they changed the owner of my account and I don't know what to do? my wallet 86tBAuUuyJE8hUj1wBy2WfAKGts8KhJD6skpyUUowzRJ They hacked me and changed the owner, is there a way to ...
tonynhu's user avatar
0 votes
0 answers
78 views

how to reactivate solana network after locking wallet

Yesterday, I fell victim to a scam which resulted in the theft of my funds. As a precautionary measure, I have locked my wallet. However, upon attempting to access my Solana network via the Phantom ...
maitri naik's user avatar
2 votes
2 answers
279 views

Zero_copy not working , Getting `Zeroable` is not implemented for `[Event; 25000]`, while trying example

I'm trying This example by anchor to initialize large accounts and using zero_copy on them. https://github.com/coral-xyz/anchor/blob/master/tests/zero-copy/programs/zero-copy/src/lib.rs#L156-L165 I'm ...
Abhishek Faliya's user avatar
0 votes
1 answer
86 views

why "Error: memory allocation failed, out of memory" error?

I have a program that use to store configuration, as show bellow. All work well except that, 'set_fee' function throw error: > Program logged: "Instruction: SetFee" > Program logged: &...
breeze wang's user avatar
0 votes
1 answer
124 views

Error Creating account: failed to send transaction: Transaction simulation failed: Attempt to debit an account but found no record of a prior credit

I am creating accounts for my application using custodial wallets while creating account I am getting above error. import { Connection, Keypair, LAMPORTS_PER_SOL, SystemProgram, Transaction, ...
Viraj's user avatar
  • 3
2 votes
1 answer
85 views

Is there a way to store a reference to a zero copy account in a regular account?

Is there a way to store reference to a zero copy account in a regular account? Something like #[account] pub struct HoldingAccount { [account(zero)] pub myReferenceToAZeroCopyAccount: Box<...
techiejd's user avatar
1 vote
1 answer
597 views

obtain the contract of a token through the address of a holder

I am currently learning the basics of programming in solana using the different json functions and I have a question Is there a function that gives you the contract of a token having only the address ...
lea's user avatar
  • 11
2 votes
1 answer
124 views

Is there a way to get size_of an account from the client?

I'd like to use getMinimumBalanceForRentExemption. With that said, it expects a parameter of the size of the data account. I'd like to know if there's a way to get the estimate size of an account or ...
techiejd's user avatar
0 votes
1 answer
92 views

why "Transaction references a signature that is unnecessary" warning, and value of 'isSigner' is false in IDL?

I was playing with counter program in program-example repo. When run test, I got warning: Transaction references a signature that is unnecessary, only the fee payer and instruction signer accounts ...
breeze wang's user avatar
0 votes
1 answer
145 views

What is this wallet.GetAccount(index) stuff?

With Solana, there is the possibility to get accounts which obviously depend on the wallet. This can be done using the wallets GetAccount(index) function, e.g. with Account fromAccount = wallet....
HansHeinz's user avatar
0 votes
1 answer
59 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
0 votes
1 answer
353 views

My wallet can't send sol to others and can't mint nft

I met a problem my sol address can't send out sol to another wallet but can send it into it, and my address can't mint nft. Really don't know what's with it. Really strange. My address is ...
user9385's user avatar
0 votes
1 answer
133 views

What's the best way to listen for epoch updates?

I want to generate a proof from the epoch vote accounts to the Epoch Accounts hash, so I was thinking of listening to epoch updates and then generating a proof. I'm aware that bank has a ...
Harsh Patel's user avatar
0 votes
0 answers
14 views

Error when trying to update an account on Solana built with anchor

Here's the error I am getting: Link to transaction: https://explorer.solana.com/tx/5LSyn7NfjK4me56nU8fiYVb9RGXCe7AJ7MBFYKBfcvxh35sLN9krkYU7fFLTJWWW6iz3aTpu3K4kXdhwAb8kydEq?cluster=devnet Here's the ...
denimcodes's user avatar
4 votes
2 answers
246 views

Why do some token accounts own themselves?

I was under the impression that accounts owned by users owned a set of token accounts which each represent one distinct token that they own - meaning token accounts would only be owned by a user. For ...
xxl's user avatar
  • 43
1 vote
1 answer
92 views

best way to convert `account_index` to address using rust rpc-client and JSON RPC response

When using the solana-rpc-client in Rust to retrieve a transaction, the output is EncodedTransactionWithStatusMeta. The metadata includes the following struct: pub struct UiTransactionTokenBalance { ...
S.R's user avatar
  • 141
1 vote
1 answer
602 views

what's the correct way to declare an account for program to receive and store SOL?

Demo bellowed is what I figure out to make program receive SOL. But it seem have room to improve, especially 'NewAccount', which look ugly, but I can't found property Account type to replace it. I ...
breeze wang's user avatar
3 votes
1 answer
277 views

In what context is the hash of a ed25519 public key used as an address?

According to the docs, a Solana address is one of the following: an ed25519 public key a program-derived account address (32byte value forced off the ed25519 curve) a hash of an ed25519 public key ...
McBain's user avatar
  • 5,384
1 vote
1 answer
298 views

What determines the size of a program

How is the size of a program calculated? If all accounts have a limit of 10 kibibytes, I assume that also applies to programs as well? How will the extend program size affect this? does it allow me to ...
Jimii's user avatar
  • 7,712
1 vote
4 answers
360 views

Failed Token Develop and Lose Money :) [closed]

Before I start, I would like to apologize for writing a long message. I am a novice software developer who is just starting to learn Solana. Therefore, I wrote the whole story from start to finish ...
TryingToBeSolDev's user avatar
2 votes
1 answer
220 views

Why does the active stake plus the rent reserve not equal to the total balance? How to correctly calculate the total balance?

So I am trying to report the difference balances on an staking account. My assumption was: total balance = active stake + rent reserve However, this equation is not true when looking at the numbers in ...
sibabtcs's user avatar
0 votes
1 answer
42 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
2 votes
2 answers
2k views

Transaction Error: Signature Verification Failed: Missing Signature For PublicKey

I'm building a transaction on devnet that previously worked when I tested my program. I don't think it's the program itself, but how I am passing down the signatures which is slightly different from ...
Brian M.'s user avatar
  • 141
1 vote
1 answer
65 views

Reducing calls to .load() in constraints

When using constraints with a zero-copy account that uses AccountLoader, you can reduce acc.load() calls like: #[account( mut, constraint = { let acc = some_acc.load()?;...
Whiteseal's user avatar
  • 3,607
0 votes
2 answers
569 views

Solana Crypto Retrieval

Recently I sent Solana to the following address: GJRs4FwHtemZ5ZE9x3FNvJ8TMwitKTh21yxdRPqn7npE I sent it from my Coinbase Wallet account, now it has come to my attention that crypto sent CAN NOT be ...
RubinSon's user avatar
2 votes
2 answers
212 views

How many PDA accounts can I create? Is it unlimited?

I am going to store huge number of record for my on-chain program. Each record's size is small (likely 100Bytes), but need to store many(maybe millions) records on-chain. From what I have known ...
breeze wang's user avatar
0 votes
2 answers
96 views

Different formats of Solana accounts

Is there a way to know whether an address is an token Program/Storage/Data/Vote/Stake/Withdraw account from the format only? If not, how can I find this out with the help of the node RPC? I guess I ...
sibabtcs's user avatar
1 vote
0 answers
220 views

Account:try_from with different Anchor versions

I have a program which is on 0.28.0, and it uses an 0.26.0 dep. It builds without issue. Let's say the deps look like: [dependencies] anchor-lang = "0.28.0" solana-program = "=1.16.23&...
Whiteseal's user avatar
  • 3,607
1 vote
0 answers
58 views

Is there a maximum number of pdas that can be owned by Solana account?

I am building an application and it is relatively heavy on the creation of PDAs. I will be using a private cluster, so the cost of PDA creation is irrelevant. But I am trying to understand the ...
david lampach's user avatar
0 votes
1 answer
154 views

ThawAccount Error: Invalid account state for operation

When I perform a transaction I get an error and log entries: 'Program log: Instruction: ThawAccount', 'Program log: Error: Invalid account state for operation', How to check whether an account is ...
Leo Loki's user avatar
  • 464
2 votes
3 answers
194 views

How to close account?

I am trying to close an account with a balance of 890880 lamport (getMinimumBalanceForRentExemption api result) for rent, and I send a transaction to transfer the 885880 amount via system transfer. ...
Koichi's user avatar
  • 81
1 vote
1 answer
378 views

Issues with Using AnchorSerialize and AnchorDeserialize Traits

so I'm looking to create an instruction that creates an account called GamePot that contains a field called TokenInfo that holds the data for what is meant to be any particular SPL token with a mint ...
Brian M.'s user avatar
  • 141
3 votes
1 answer
70 views

How to allocate `Optional` accounts on heap?

I am trying to use optional accounts and since there are many accounts, i tried boxing them. But looks like the derive macro panics when i try to box the optional accounts like below. escrow_account: ...
Dhruv D Jain's user avatar
0 votes
2 answers
113 views

What does it mean Garbage Collection?

I wonder what is Garbage Collection?. When an Account no longer has enough Lamports to pay its rent, it will be removed from the network in a process known as Garbage Collection. Someone let you know?....
Gus's user avatar
  • 21
2 votes
1 answer
696 views

What does it mean Lamport?

What does it mean Lamport?. How many Lamports is one Solana?. Is it important?. What is Lamport balance?. How to calculate it?. How many Lamports should I have in my account to be estimated rent ...
Gus's user avatar
  • 21
0 votes
1 answer
93 views

What's rent?. What's estimated become exempt?

I,d like to know what’s rent?. How to calculate it?. Does it work now?. Does it exist now?. When to become rent exempt?. I use Solflare and I’ve an account with more or less 200 Solana and I do ...
Gus's user avatar
  • 21
0 votes
1 answer
45 views

Is it possible to set up an account to point to another account?

I'm making an anchor program where I would like to make a user ID easily retrievable with their Pk, sequential ID or username. one way I thought is to make a PK link account (in case the seed for the ...
alex's user avatar
  • 1
0 votes
1 answer
35 views

Why choose Solana exchange instead of others? [closed]

I just log into this exchange and I need to understand why use this exchange
Christian Maraschin's user avatar
0 votes
0 answers
129 views

Embedded wallets, USDC and account rental

I'm evaluating Solana as an option to support Generate an embedded, user owned, wallet per sign-up (BYO as secondary option). Only deal with USDC in and between these wallets, i.e. no customer ...
uxcxdx's user avatar
  • 101
1 vote
1 answer
59 views

Is there a throttle in place for account creations or can I create accounts at 50k tps?

Other networks have throttles, I noticed there is a minimum balance on Solana, so does that mean as long as I have enough SOL I can create accounts at a rate of 50k tps? @ripatel
Michael's user avatar
  • 13
3 votes
3 answers
321 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
0 votes
1 answer
424 views

Account change listener is not working for phantom wallet

I am using this code given below in my react application to listen an account change event but facing issue as no response or error i am getting on changing account form phantom wallet .i have ...
rishab's user avatar
  • 1
1 vote
2 answers
220 views

Are enums with associated values permitted?

Not sure if this is really an anchor or solana related question, since I am able to compile, just not to run tests. I can run code and test against code that has an account that has following enum: #[...
mega_creamery's user avatar
1 vote
1 answer
146 views

Get all accounts from ledger

To obtain all account information from the ledger, I used the following command: solana-ledger-tool --ledger /mnt/ledger/ accounts However, only the following information is printed, and the account ...
Solextra's user avatar
0 votes
1 answer
578 views

How to parse changes of the balances in json of a TX?

I sent 0.13 SOL from one ordinary wallet to other. There's been no interraction with a smart contract, nor was it a token but SOL sent. Here's a part of a TX in its raw form which I've obtained via ...
Nondi's user avatar
  • 15