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
0
votes
1 answer

Transactions using solana python

I'm trying to make an arbitrage program. Although I'm not able to write the transactions code using solana. I did refer from here(Sending solana transactions with python). I've made 2 accounts one with phantom and another with solflare. Hence, the…
Noob
  • 117
  • 1
  • 11
0
votes
1 answer

Is it possible to mint an NFT in Solana "unrevealed" and then reveal it later on?

I'm trying to orchestrate an NFT presale on Solana, such that the collectible is revealed at a specific time after purchase. Is that possible on Solana and how?
0
votes
1 answer

Connecting Pyth.Network to C#

Hello I am looking for some help to implement JSON RPC in C# to be able to read data from Pyth.Network. I know this is a general question. I've attempted some examples but I am not able to get all the necessary libraries to make something…
0
votes
1 answer

How to update token name and decimal on solana network?

I did submit PR to solana-token git repository for my token. But I want to update my token name and decimals. How can I do that? I did resubmit but getting error.
Lovely
  • 306
  • 2
  • 12
0
votes
1 answer

How can I make a "Token Counter" in Solana smart contract?

I want to create a "token counter" which value increases after each token sale. I should make a struct, However I don't know how to store it to be able to keep for next contract calling and use that. Can you help me?
Amin
  • 387
  • 1
  • 6
  • 17
0
votes
1 answer

How to solve Solana custom spl token create error

When I run cargo install spl-token-cli on my server for create spl token, I am getting error. What is problem? I can't find solution. what is solution?
Lovely
  • 306
  • 2
  • 12
0
votes
2 answers

How to create web3.Keypair object for Solana javascript API?

I want users to come and mint tokens on my website. I have followed Solana docs and came across the following code in the Javascript client section. var web3Connection = new web3.Connection( web3.clusterApiUrl("devnet"), 'confirmed', ); //…
XCEPTION
  • 1,671
  • 1
  • 18
  • 38
0
votes
1 answer

How do I get json from url in smart contracts?

My NFT-tokens metadata are in URL. I want to get content of the url which is in json format, after that convert to a object that I can use for making NFT-Tokens. In the following, there is a part of my smart contact which show a function for…
Amin
  • 387
  • 1
  • 6
  • 17
0
votes
1 answer

The accounts must be put with some sequence or can be random when initiate a TransactionInstruction?

Here it is, we have a account list when create TransactionInstruction. So the list could have a random order? or it must follow some specific order? const keys = [ { pubkey: key1, isSigner: true, isWritable: true, }, …
Noldorin Zhang
  • 181
  • 1
  • 2
  • 7
0
votes
1 answer

How to access JSON RPC API Solana Javascript in Linux Envoirment?

I am trying to access the SOLANA API, specifically from this GitHub: https://github.com/solana-labs/solana-web3.js with all these actions: https://solana-labs.github.io/solana-web3.js/ and read the Solana documentation…
Pro Girl
  • 762
  • 7
  • 21
0
votes
1 answer

How to hide accounts in explorer?

For now solana explorer displays all the accounts pubkeys that interact in the instructions. Is there an option to hide these accounts in the instructions?
0
votes
1 answer

Calling specific endpoint on Solana smart contract

I'm trying to call a specific endpoint on a Solana smart contract using @solana-web3 and I can't quite figure out how todo that. Iv'e seen it done like this: const buffer = Buffer.from("hello"); const instruction = new…
Max Campbell
  • 595
  • 9
  • 22
0
votes
1 answer

why could it get the associated account for a new generated address?

It is weird that it can get the associated account since it is new generated address. const account = Keypair.generate(); let address = await Token.getAssociatedTokenAddress( ASSOCIATED_TOKEN_PROGRAM_ID, TOKEN_PROGRAM_ID, token.publicKey, …
Noldorin Zhang
  • 181
  • 1
  • 2
  • 7
0
votes
1 answer

Solana transfer amount null

I'm attempting to transfer tokens from one Solana address to another, while I was able to prompt the data, the amount is always blank. With many tweaks and changes, it seems like the amount stays null. If I don't include the amount, the row doesn't…
0
votes
1 answer

Solana how to stake native SOL to a Rust program and withdraw SOL from a program?

I have Googled about this and only found how to send tokens via command line: https://spl.solana.com/token But I need to stake/withdraw Native SOL, not tokens, into/from Rust programs. Also I found this about Rust native…
Russo
  • 2,186
  • 2
  • 26
  • 42