Skip to main content
8 votes
Accepted

How do you change your Solana CLI version?

If you want to change your current installed Solana CLI version, just type the following command: solana-install init <VERSION> where <VERSION> is the desired CLI version to install.
Jacob Creech's user avatar
  • 3,874
7 votes

Mac: `platform-tools` 1.16: `cargo build-sbf` error: failed to run custom build command for `blake3 v1.4.0`

If you're on Mac and also running into this issue, you basically need to add a compiler flag for $HOME/.local/share/solana/install/releases/1.16.1/solana-release/bin/sdk/sbf/dependencies/platform-...
Joe C's user avatar
  • 1,086
6 votes
Accepted

"Error: no device found" when using Ledger Nano S Plus with Solana CLI

It turns out that the USB Product IDs for the Ledger Nano S Plus had not been added to the solana-remote-wallet crate until v1.10.31 and v1.11.3. Updating the CLI tools to one of these versions, or ...
trent.sol's user avatar
  • 4,425
5 votes
Accepted

How to measure the network's current Transactions Per Second (TPS)

There's an RPC function: https://docs.solana.com/developing/clients/jsonrpc-api#getrecentperformancesamples It returns an array of objects like: { "numSlots": 126, "numTransactions&...
Callum M's user avatar
  • 3,170
4 votes
Accepted

How do I import and export a wallet keypair generated from CLI to a wallet provider like phantom or solflare?

Open the the .json file created by the CLI and copy the contents(it should look like [12,54,11,64,etc...]). Then go to the wallet you want to use, select import private key and paste the contents. ...
DevelopingJoku's user avatar
4 votes
Accepted

How to distinguish between types of functionality provided by Solana CLI and Solana JSON RPC API?

The CLI uses JSONRPC via the solana-client Rust crate. Everything it does is either available from, or derivable from, JSONRPC method calls
trent.sol's user avatar
  • 4,425
4 votes
Accepted

How do you convert the byte array returned as "Data" for a given instruction into a human-readable form?

Background This is a bit of a broad question, as there are several cases to consider, but the basic fact to understand is: the data field in an instruction is the arbitrary, serialized input given to ...
man0s's user avatar
  • 690
4 votes
Accepted

Access Phantom account with Solana CLI

First, you’ll need to install the Solana CLI. Generate a File System Wallet. From the command line, run: $ solana-keygen recover 'prompt:?key=0/0' --outfile ~/.config/solana/id.json This will prompt ...
AKSHAY DHAYAL's user avatar
4 votes

Anchor compatibility issues

If rustup update doesn’t work it’s probably the fact that Solana has a different rustc version set in the tool chain. Check this post or like a dozen similar ones. solana building error for v1.16.3. ...
david lampach's user avatar
3 votes
Accepted

What is the best way to update the Solana CLI?

After you already have the Solana CLI installed on your system, you can quickly update to the latest version using the CLI itself. To update, run the update command: solana-install update This will ...
nickfrosty's user avatar
  • 1,058
3 votes
Accepted

Problem with installing Solana CLI on Windows 11

You are running through a proxy. If this is intentional, you can try below to work around it. If it is not, you may want to look into that. Add: --ssl-no-revoke Docs: https://curl.se/docs/manpage....
Bryon M's user avatar
  • 170
3 votes

How can I re-create a File System Wallet given a seed phrase (and passphrase)?

To restore the wallet for a given mnemonic if you have CLI installed you can use solana-keygen solana-keygen recover To know more - Solana Cookbook
maddy's user avatar
  • 358
3 votes
Accepted

Error processing Instruction 0: sum of account balances before and after instruction do not match

Problem solved✔️ In my case I had a function that had two shipments of balances. One through the system program with transfer and another through try_borrow_mut_lamports()?. First you have to put the ...
Mateo Lafalce's user avatar
3 votes

Error: Non-base58 character

PROBLEM SOLVED My part on the client side was perfect. The thing that caused the error was an account (not used by the instruction) that will be used to do fetch later. Therefore, if you see this ...
Mateo Lafalce's user avatar
3 votes
Accepted

How do I delete CLI wallet?

Though Solana wallets can exist anywhere in the file system depending on where they were created, most are located in ~/.config/solana (on linux and mac systems). That being said, please be sure that ...
m_callens's user avatar
  • 889
3 votes

I want to add metadata to the Solana token on cli

Token metadata on Solana is normally all handled via the Metaplex Metadata standard. For both fungible (regular SPL tokens) and non-fungible tokens (NFTs). So unfortunately, you cannot use the regular ...
nickfrosty's user avatar
  • 1,058
3 votes
Accepted

Change config file location in CLI

There's unfortunately a chicken-and-egg issue, since if you want to set a new default config file, you'll have to write that information somewhere, which would end up being another config file. You ...
Jon C's user avatar
  • 16.1k
3 votes

Error on building sdk with solita on anchor-lang:0.28.0

Solution posted by @zkKirol : https://discord.com/channels/848060988636921856/849844496941842432/1153277836157796383 Download the anchor-cli : 0.28.0 binary and copy paste it in .crates folder which ...
Athar Mohd's user avatar
3 votes

Anchor compatibility issues

You probably want to update to the newest solana version 1.17 like so: sh -c "$(curl -sSfL https://release.solana.com/v1.17.17/install)" https://docs.solana.com/de/cli/install-solana-cli-...
Jonas H.'s user avatar
  • 5,787
2 votes

Track Delegators for a particular Validator

//stake account is owned by the stake program which runs the complex transactions requried to facilitate staking. const { Connection, clusterApiUrl, PublicKey } = require("@solana/web3.js"); ...
Yilmaz's user avatar
  • 1,164
2 votes
Accepted

Track Delegators for a particular Validator

Solution: docs.solana.com/cli/usage#solana-stakes Call the Solana CLI command to access the staking information for delegators.
Popski's user avatar
  • 63
2 votes

Track Solana Validator Rewards

Unfortunately, as you've realized, "credits" are difficult to convert into SOL, and it'll be really tricky to convert those yourself. You can fetch each block with getBlock https://docs....
Jon C's user avatar
  • 16.1k
2 votes
Accepted

How can I re-create a File System Wallet given a seed phrase (and passphrase)?

@krishnna's answer is correct implicitly. The explicit command would be more like: solana-keygen recover --outfile recovered-wallet.json ASK The pertinent part being the addition of the ASK ...
trent.sol's user avatar
  • 4,425
2 votes
Accepted

Is there a solana cli for the terminal like eth-cli?

The Solana CLI is the Solana Tool Suite. The CLI has a number of tools such as keypair generation, staking, and more.
Jacob Creech's user avatar
  • 3,874
2 votes
Accepted

How to update authority on a rugged project?

No delegate on account means that there is no delegate to revoke on the token account. spl-token authorize Token_Address mint New_Authority_Address would fail with Owner does not match because ...
Jacob Creech's user avatar
  • 3,874
2 votes

How to measure the network's current Transactions Per Second (TPS)

TPS is no measure of the "health" of the network. there is no single or even small number of metrics that can indicate "health" of a distributed system as complex as Solana in any ...
trent.sol's user avatar
  • 4,425
2 votes

NFT batch transact

You can build a transaction with multiple instructions (createTransferCheckedInstruction) to move each token (up to the instruction limit). https://solanacookbook.com/references/token.html#how-to-...
Ohad Dahan's user avatar
2 votes

NFT batch transact

A single transaction has a byte limit which is what causes that ~33 account limit. That limit also includes programs in addition to what you listed above. A transaction is atomic in and of itself, but ...
Buzzec's user avatar
  • 544
2 votes

Running "spl-stake-pool create-pool" on localhost gives error "Transaction simulation failed: Attempt to load a program that does not exist"

Figured it out, instead of just running $ solana-test-validator we need to run $ solana-test-validator -c SPoo1Ku8WFXoNDMHPsrGSTSG1Y47rzgn41SLUNakuHy -c EmiU8AQkB2sswTxVB6aCmsAJftoowZG GDXuytm6X65R3 --...
Anish Mukherjee's user avatar
2 votes
Accepted

Error on building sdk with solita on anchor-lang:0.28.0

fix I'm using: in cargo.toml inside programs/name_of_your_program change anchor-lang to 0.27.0 do NOT run anchor build then run yarn solita, it will initialy start working but fail at the end that ...
zkKirol's user avatar
  • 54

Only top scored, non community-wiki answers of a minimum length are eligible