Questions tagged [solana]

Use for questions about programming on the Solana Blockchain Platform or using its Anchor Framework. Use with the appropriate language tag.

From the website:

Solana is a decentralized blockchain built to enable scalable, user-friendly apps for the world.

Developer documentation can be found here, including information about Solana's Anchor Framework.

1213 questions
-1
votes
1 answer

how to get the the amount of the given token address in anchor solana?

I'm getting two token addresses address as input for a function in my solana program. How can fetch the balance for the two token. using getTokenSupply in solana webjs i can get it in javascript how can i get that in rust. const data = await…
mohan A
  • 65
  • 2
  • 10
-1
votes
3 answers

Solana - How to get token balance for a foreign account?

In Solana you can get your own balance with the CLI $ spl-token accounts But how do I get the token balance of a foreign account if I have the account ID or his pubkey? When I use the solana explorer I can see the information I need when I search…
Boommeister
  • 1,591
  • 2
  • 15
  • 54
-2
votes
0 answers

Missing Avax Coins After Solana to Wormhole Avalanche Transfer

I sent 1092 Avax coins from the Solana network to the Avalanche blockchain using Wormhole, but only 669 of them were reflected. How can I locate the remaining coins and determine their whereabouts ?? TXID…
ONYXSHU
  • 1
  • 1
-2
votes
1 answer

Disable Receiving Tokens for Solana PDA

I am using PDAs in my Solana smart contract to hold SPL-Tokens deposited by users. I would like to be able to take a percentage of each deposit sent to a user's PDA as a fee. However, to my understanding, there is nothing stopping a user from just…
-2
votes
1 answer

I am trying to build a facebook clone dapp using solana and next js. I followed the tutorial but i still run into this error

I followed the tutorial yet this error isn't being solved](https://i.stack.imgur.com/2qNEF.jpg) I tried to use {} instead of [] but still the same error occurs
Pranoz
  • 1
-2
votes
1 answer

How to Find Candy Machine V2 on SolScan

So Guys, i'm really noob at blockchain thins, but i'm trying my best to learn. I would love to know how to find the Candy Machine V2 on SolScan, i see a lot of bots can mint with this Candy Machine ID, but i don't how to find it. Thanks for the help…
-2
votes
1 answer

Error with modules gumdrop-cli.ts metaplex

I've been testing metaplex and wanted to try testing gumdrop, I downloaded the gumdrop repo from here https://github.com/metaplex-foundation/gumdrop/ and tried running it but it didn't work. I then placed it inside the original metaplex folder…
-2
votes
1 answer

Candy Machine V2 Testing on Devnet....reset?

Hope everyone is great! This might be a silly question but just wanted to be sure as i'm seeing few mixed reviews on this. I've got candy machine up and running, all settings work including the whitelist function. Did couple test mints from an…
Liz
  • 5
  • 1
-2
votes
1 answer

How to order processes in a nested loop?

So here I'm building a script which will take a token from the list and send it to the wallet from another list. It's very important for me to do it in order, so wallet 1 receives token 1, wallet 2 receives token 2 and so on. I'm doing a nested…
dev
  • 11
  • 2
-2
votes
1 answer

How to find the owner Solana NFT in the past timestamp?

Understanding that it is pretty straightforward to fetch the current owner of a NFT on Solana (get holder of solana nft using python), how could we get the owner at certain timestamp in the past? One way I could think of is to get all the transfer…
noooooooob
  • 1,872
  • 3
  • 21
  • 27
-2
votes
1 answer

Phantom wallet: Solana transactions debug

I need to know which instuctions list is used for a transaction in order to use it in my application. For example: There is an unknown NFT marketplace, I can buy NFT through the "Buy" button in the browser. I want to buy these nft programmatically,…
-2
votes
1 answer

Is there a function to list all SPL Tokens in a Wallet using Rust

Is there a function which can get a list of all tokens a wallet owns using Rust?
uniQ
  • 115
  • 2
  • 16
-2
votes
1 answer

Keeping private data private in a Solana Rust program

I am trying to write a guess-the-number game on Solana. I am trying to write a Solana program (smart-contract) where the smart contract randomly picks a random number and whoever guesses it wins. Its a simple hello-world kind of a situation. Can I…
Marci-man
  • 2,113
  • 3
  • 28
  • 76
-2
votes
1 answer

Solana Rust program BTreeMap

I have read this article here and I understood that HashMap is not usable in Solana, thus, I need to use BTreeMap. I am a beginner in Rust and I am having an error with the following code when trying to move from Ethereum to Solana : pub fn…
FBK
  • 52
  • 5
  • 20
-2
votes
1 answer

getttting temporary value dropped while borrow in solana smart contract

pub fn burn_liquidity(ctx: Context, _to: Pubkey) -> ProgramResult { let pool_account = &ctx.accounts.pool_account; let token1_account = &ctx.accounts.pool_token1_account; let token2_account =…
mohan A
  • 65
  • 2
  • 10
1 2 3
80
81