Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
1 vote
1 answer
41 views

How to solve the cargo build-sbf error?

I have just started with rust and solana. Firstly, I created a solana program using the command: cargo init hello_world --lib everything ran fine, and then i read from the official docs, to build i ...
1 vote
1 answer
40 views

Anchor build says "cannot be built because it requires rustc 1.75.0 or newer" I have rustc installed 1.82.0

Anchor Verification Issue: Rustc Version Mismatch in Docker Environment Command Executed anchor verify 3MRKmmRZ6Fm4tvEEjBZcuGG7nxWVSYCJd83WzmAGqm8J Problem Summary The program build fails due to a ...
2 votes
1 answer
25 views

which versions of Solana SDK and Anchor are compatible with the stable toolchain.?

which versions of Solana SDK and Anchor are compatible with the stable toolchain.? It appears that the current nightly toolchain you are using (nightly-x86_64-unknown-linux-gnu) does not support the ...
2 votes
2 answers
136 views

keep getting this error on a fresh ubuntu 24 lts, although my rustc version is 1.78.0

error: package solana-program v1.18.14 cannot be built because it requires rustc 1.75.0 or newer, while the currently active rustc version is 1.68.0-dev Either upgrade to rustc 1.75.0 or newer, or use ...
2 votes
1 answer
54 views

Solaan transaction delay

Is there any way that after a wallet signs a transaction I can delay the transaction from actually going through until I call a function or is this not possible, also open to work arounds. Thanks in ...
0 votes
0 answers
49 views

Anchor - Stuck with error SendTransactionError

I have been trying to write some custom contract in solana using Rust but always ending up with below error: Catch the SendTransactionError and call getLogs() on it for full details. at Connection....
0 votes
0 answers
222 views

Mempool transaction Stream

I want to listen to the Solana mempool for a MEV bot. I was checking out Jito for this purpose, but it appears to be deprecated. How can I listen to the mempool transaction information on Solana now ...
1 vote
1 answer
103 views

solana contract rust error anchor build

use anchor_lang::prelude::*; use anchor_spl::token::{self, Mint, Token, TokenAccount, Transfer, MintTo}; declare_id!("GTPh1tdHiMWVj3yBj2S2ZZftuLPEWPyQZ6Cy7g5ibM5K"); #[program] pub mod puj { ...
0 votes
0 answers
22 views

Getting error that I am using an older version of rust, but --version shows I am using latest

Although my Rust is version 1.78.0 I constantly am getting this error when I do an anchor build: error: package toml_edit v0.21.1 cannot be built because it requires rustc 1.69 or newer, while the ...
5 votes
2 answers
211 views

What's the benefit of using platform-tools compared to Rust's upstream bpfel-unknown-none target?

The fact that Solana's CLI installer shipped (and still ships) with a nearly year-long outdated version of platform-tools has been a pain point with the previous Solana team I've worked with. platform-...
3 votes
0 answers
21 views

Anchor Test fails with version error [duplicate]

Issue: I installed everything needed to start developing on Solana. I am trying to test a simple contract but when i run: anchor test, it errors out the following: error: package `solana-program v1.18....
2 votes
1 answer
515 views

Cannot compile `solana-program` crate with new `sqlx` versions

For some reason when trying to compile a project having both sqlx and solana-program I get an error on package version mismatches, which is strange, because those should come from different crates and ...
6 votes
1 answer
2k views

How do I fix "package solana-program v1.18.0 cannot be built because it requires rustc 1.72.0 or newer"?

When building an onchain program with cargo build-sbf using solana-program v1.18, I get the following error: error: package solana-program v1.18.0 cannot be built because it requires rustc 1.72.0 or ...
1 vote
1 answer
294 views

"package solana-program v1.18.7 cannot be built" error [duplicate]

I have a new Rust project that gives the following error when I compile it. package `solana-program v1.18.7` cannot be built because it requires rustc 1.72.0 or newer, while the currently active rustc ...
3 votes
3 answers
2k views

InstructionFallbackNotFound. Error Number: 101. Error Message: Fallback functions are not supported

Have a question related to custom program development. I've testing this program pub mod fluxtility { use super::*; pub fn buy_ticket(ctx: Context<Initialize>, lamports: u64) -> ...
0 votes
0 answers
94 views

cargo build-bpf package error: `ahash v0.8.8` cannot be built because it requires rustc 1.72.0 or newer

I'm using a simple hello world solana program from https://moralis.io/how-to-write-a-solana-smart-contract src/lib.rs use solana_program::{ account_info::AccountInfo, entrypoint, ...
1 vote
1 answer
242 views

Can anyone use SolGSN: Solana Gas Station?

I want to use SolGSN, where the user can't pay the gas fee like transferring the NFT. The admin has to pay the fee. However, this repository is outdated, and I've encountered several errors due to ...
3 votes
1 answer
482 views

How to get Mint Address of of SPL token using associated token account? without rpc call

I can get an associated token account knowing the mint address and wallet address with spl_associated_token_account::get_associated_token_address function But is it possible to get a mint address, ...
2 votes
2 answers
793 views

cargo build-bpf rustc version

I'm trying to use "cargo build-bpf" on a simple rust file, I'm using the "solana_program" dependency and the next error occurs: "error: package solana-program v1.16.5 cannot ...
2 votes
1 answer
472 views

solana play ground - too much SOL for initial deployment and RPC error

I'm trying to deploy some program locally with solana playground, when trying to deploy the program on dev-net the initial deployment costs 4.40 SOL, and when requesting more than 1 SOL(with "...
2 votes
1 answer
173 views

Depencencies in Cargo.toml file Solana-SDK and Solana-Client doesn't work

Hello I am trying desperately to use solana-sdk and solana-client but when I do cargo build-bpf it doesn't work. Can someone help me please? When I use only solana-client as a dependency the ...
1 vote
0 answers
77 views

RUSTFLAGS="-C instrument-coverage" with solana program [closed]

Trying to add check coverage, when using RUSTFLAGS="-C instrument-coverage" cargo build-bpf I'm getting: error: failed to run `rustc` to learn about target-specific information Caused by: ...