Skip to main content

Questions tagged [account]

The tag has no usage guidance.

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

change stake account withdraw auth where the auth is the account address it self

for development purposes i did the following: created stake account change its withdraw auth to the account address now i am trying to figure how i can change the withdraw auth back to wallet owner ...
Avaulto's user avatar
  • 102
1 vote
1 answer
36 views

Account creation on Solana

Suppose I have a PDA address that hasn't been initialized yet and I send SOL to it, Am I correct in assuming that this account will exist? Who will have control over this account? Will it still be by ...
Jimii's user avatar
  • 2,184
1 vote
1 answer
39 views

Avoid unnecessary account generation

For context, I am trying to implement a contract I have on solidity to solana. On solidity, I have a function like this, which writes data to state based on a condition. function handleMessage(bytes ...
woodland's user avatar
0 votes
0 answers
100 views

Why can't I find my coin in my Phantom wallet, while I have mine more than 200,000 coin

I'm unable to see any of my tapswap coin in my Phantom wallet, mean while I've mined more than 200000 taps
Segun Michael's user avatar
1 vote
1 answer
20 views

MODULE NOT FOUND

import * as dotenv from 'dotenv'; dotenv.config(); import { getKeypairFromEnvironment } from '@solana-developers/helpers'; const keypair = getKeypairFromEnvironment("SECRET_KEY"); console....
Kabin Giri's user avatar
0 votes
1 answer
16 views

Mutate account data of a program by another program

I have a sender program, and a receiver program. What I want to do is, sender program has a account, data_account. I want sender program to call modify_data of receiver program, which in turn mutates ...
woodland's user avatar
0 votes
1 answer
13 views

How do I allow two different signers to modify data in a PDA?

I'm trying to understand PDAs and ultimately want to be able to have a game where two different players (each with their own wallet) can modify the game state individually (i.e. one signer). For this ...
0xwtf's user avatar
  • 3
0 votes
0 answers
20 views

How to get LP total Supply and LP Burn, i have lp not burn

using the solana/web3.js , spl and sdk raydium libraries. in typescript I can get the remaining lp mint by getAccountInfo but I can't find what to do for the total and I don't want to use rugcheck ...
Gizmo's user avatar
  • 1
0 votes
1 answer
10 views

What exactly are `Interface<'info, T>` and `InterfaceAccount<'info, T>`

InterfaceAccount<'info, T> and Interface<'info, T> and Anchor accounts types Would love to know more about them, where I should use them and what differentiates the two.
Jimii's user avatar
  • 2,184
0 votes
0 answers
8 views

Looking to replicate Step.Finance DeFi aggregation, but can't find the right commands

I'm writing a little Node.js tool to see my balances across the Solana universe, but have only found ways to see the balances in my actual wallet (getParsedAccountInfo, getParsedTokenAccountsByOwner, ...
Ben's user avatar
  • 1
2 votes
0 answers
17 views

How to do account white listing using merkle tree on solana native rust program? Is it really possible to do whitelist account using merkle on solana?

I did this code But have doubt that it will not work as desired:- use borsh::{BorshDeserialize, BorshSerialize}; use merkletreers::tree::MerkleTree; use merkletreers::utils::hash_it; use ...
Aditya's user avatar
  • 103
0 votes
1 answer
33 views

Can’t recover wallet

I have recently attempted to reactivate my phantom account and I used my 12 recovery phrase words but it opened what looked like to me a different account as none of my crypto was there for me to see? ...
peteknowles79's user avatar
2 votes
1 answer
52 views

How to use realloc to increase account space in Anchor?

Lets say that I have the following account struct for my instruction: #[derive(Accounts)] pub struct IncreaseDataSize<'info> { #[account( mut, seeds = [signer.key().as_ref()],...
Matheus Baptistella's user avatar
0 votes
1 answer
20 views

Who owns the private key of delegated Staked Accounts?

I see on solscan.io account pages that most of them have isOnCurve false, but my delegated staked account has isOnCurve true. Does this mean someone has the private key of this account? Who? Usual ...
Unicornist's user avatar
2 votes
1 answer
107 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
32 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
  • 13
0 votes
1 answer
33 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
0 answers
302 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
26 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
15 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
22 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
76 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
32 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
47 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
55 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
301 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
47 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
35 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
59 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
41 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
103 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
56 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
12 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
118 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
43 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
249 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
115 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 ...
Ahri's user avatar
  • 3,365
1 vote
1 answer
87 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
  • 2,184
2 votes
4 answers
281 views

Failed Token Develop and Lose Money :)

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
102 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
36 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
1 answer
997 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
  • 111
1 vote
1 answer
39 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,060
0 votes
2 answers
243 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
99 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
67 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
107 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,060
1 vote
0 answers
40 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
99 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
  • 382
2 votes
2 answers
107 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
  • 71

1
2 3 4 5