Questions tagged [solana-sdk]
The solana-sdk tag has no usage guidance.
112 questions
0
votes
1
answer
21
views
How combine presigned VersionedTransacctions in solana with js sdk
I want to combine presignes transaction into one.
export const combineVersionedTransactions = (
rawTransactions: VersionedTransaction[],
blockhash: string,
feePayer: PublicKey,
)...
0
votes
0
answers
11
views
Facing Missing authorization rules account
Not able to use ruleSet with updateAsUpdateAuthorityV2 where we are setting ruleSet and than updating authority in metadata.
const tx = await createProgrammableNft(umi, {
mint,
sellerFeeBasisPoints: ...
2
votes
1
answer
26
views
Missing authorization rules account
Not able to use ruleSet with updateAsUpdateAuthorityV2 where we are setting ruleSet and than updating authority in metadata.
const tx = await createProgrammableNft(umi, {
mint,
...
1
vote
0
answers
31
views
How can i verify an account state against a slot hash?
I would like to read account data in a trustless manner using only the slot hash. Is this possible? Something similar to Ethereum storage or receipt proofs.
0
votes
0
answers
25
views
Solana Defi Opportunity
I'm hiring for a Solana Smart Contract Eng with Strong Rust skills for a brilliant DeFi project.
Reach out if interested: andrew at axiom recruit dot com
0
votes
1
answer
63
views
How can a swap between two decentralized exchanges (DEXs) be made atomic?
Is it possible to write a program that buys a token on Raydium, then sells it on Orca, and if there’s an error during the sale on Orca, to reverse the changes and refund the user on Raydium? How can ...
0
votes
1
answer
19
views
Transaction not found in getSignaturesForAddress() returned array
getSignaturesForAddress misses one particular transaction of slot 304499001, for address Fch1oixTPri8zxBnmdCEADoJW2toyFHxqDZacQkwdvSP, transaction signature is ...
0
votes
1
answer
19
views
i tried to make a transction on sol chain between two wallet
hello i try to make a app that use solana wallet for connection when i want to make a transaction between two wallet i got this error
index-DKfn-846.js:104 Error sending message: Error: failed to get ...
1
vote
2
answers
55
views
black3 dependency is stopping my cargo build not sure what this errors reason is for
failed to select a version for `blake3` which could resolve this conflict
jasonwilliams@Jasons-MacBook-Pro solana-arbitrage-bot % cargo tree -e features | grep blake3
Updating git repository `...
1
vote
0
answers
37
views
How to filter Solana log subscriptions
I am trying to only listen to transactions regarding ONE specific program and only one specific instruction.
For example I only want to see logs of transactions that executed the "create" ...
1
vote
1
answer
30
views
anchor_lang::Owner` is not implemented for `anchor_spl::token_interface::Mint
use anchor_lang::prelude::*;
use anchor_spl::token::Token;
use anchor_spl::token_interface::Mint;
declare_id!("FtUL5xL7oZasB5zaDUETbeHs9jcf9gopQD3Z1V92YyKv");
pub mod constants {
pub ...
0
votes
0
answers
30
views
What am i doing wrong? Solders library doesn't work correctly
import base58
from solders.keypair import Keypair
from solders.pubkey import Pubkey
from solana.rpc.api import Client as SolanaClient
from solana.transaction import Transaction
from solders....
0
votes
0
answers
28
views
Swap transection is successful and fee deducted but no swap happend
I am trying to build a node js app that take my Tatum.io solana wallet address which have SOL and USD-Coins and make swap. I want to convert USDC from my wallet to SOL or convert SOL to USD-Coins. the ...
0
votes
1
answer
29
views
Getting "Invalid Arguments" error while sending versioned transaction although it passes after multiple retries with the same arguments
I am using "@solana/web3.js": "^1.90.0".
While sending versioned transactions I am getting "Invalid Arguments". I have a retry logic in place that retries failed ...
1
vote
1
answer
63
views
Retrieving Gas Fee Data for Transactions on the Solana Blockchain
I need to retrieve the gas fee for transactions on the current Solana blockchain. Can you recommend a method or tool that I can use to get this data?
0
votes
1
answer
47
views
how to get logs and innerInstruction from Transaction with python in Solana Blockchain
I am trying to get logs and innerInstruction from Raw instruction data.
The option to use the getTransaction RPC Method does not work, because the transaction I am trying to read is not yet in the ...
2
votes
1
answer
49
views
Error "KeyExcludedFromSecondaryIndexMessage" When Using get_program_accounts for SPL Token on Solana
I'm attempting to retrieve the top 100 holders of a specific SPL token on the Solana blockchain using the solana-py library in Python. However, I keep encountering an error that prevents me from ...
0
votes
0
answers
159
views
How Swap on Jupiter via Jito tips?
jupiter = Jupiter(
async_client=solana_client,
keypair=sender,
)
token_mint = "T1oYbAejEESrZLtSAjumAXhzFqZGNxQ4kVN9vPUoxMv" # Mint адрес токена, который вы хотите купить
amount_in_sol = 0....
1
vote
1
answer
22
views
Compatibility of Rust and BPF target
Encountering issues when trying to add the bpfel-unknown-unknown target for your Rust setup to develop Solana programs. The main problem seems to stem from the fact that you're still using the stable ...
2
votes
1
answer
80
views
Please help me to write a script that can buy on Jupiter through a squad wallet
import {
Connection,
ConnectionConfig,
Keypair,
PublicKey,
TransactionMessage,
VersionedMessage,
VersionedTransaction,
} from "@solana/web3.js";
import path from "path&...
1
vote
1
answer
36
views
Ideal way to listen to SPL token transfer?
The solana cookbook subscribe to events snippet gives only sol balance at best,https://solana.com/developers/cookbook/development/subscribing-events.
So, i have used a signature using public key, and ...
2
votes
1
answer
60
views
Spl Tokens deployed with Token 2022 program giving error during ATA creation with Solana/Web3.js
When i try to use methods like createAssociatedTokenAccount, getAssociatedTokenAddress i get error as "incorrect program id for instruction". The token address used her was my spl tokens ...
3
votes
1
answer
77
views
Is it possible to deploy a program in just one transaction?
I know that deploy a solana program will send many transactions because each tx has a limited size, most transactions are just for uploading program codes.
So I tried to copy program code on chain, ...
2
votes
2
answers
50
views
send_transaction rarely get confirmed
My transactions only rarely get confirmed, sometimes only once a day, even though I’m using a paid starter plan with QuickNode. Despite raising this issue with QuickNode, I haven’t received a response ...
0
votes
0
answers
15
views
Data for Raydium Pool Maker fees transaction level
I used to be a Uniswap LP and we used a subgraph from TheGraph to pull transaction level maker fees for our LP positions for various pools.
Is there anything like this for Raydium? Clearly it is ...
0
votes
2
answers
47
views
How to airdrop to a randomly generated keypair for tests?
#[test]
fn test_create_user_pda() {
let wallet = solana_sdk::signer::keypair::Keypair::new();
I want to use this wallet as a payer, how do I make an airdrop in a test?
Attempt to debit an account ...
0
votes
0
answers
20
views
Solana Durable Nounce in Python
Could someone share an example how to use durable nounce in Python. Currently, my use case is that I want to create a limit order to be execute later on, but I want to use connect wallet to allow the ...
0
votes
1
answer
54
views
solana sendRawTransaction sometimes fail, sometimes success
i got a problem when i broadcast the rawTransaction by the solana-api.
it always return the txHash for me and it correct for the calculate first signature. but i can't found it on the explorer, and my ...
0
votes
2
answers
130
views
How to get the public key of a private key with Rust?
I've got a 32-bytes private key. I want to calculate the corresponding public key of this private key. How can I achieve this with Rust? I can't find such a function in solana-sdk crate.
0
votes
0
answers
13
views
Is it possible for a developer to create a multitoken ecosystem of dapps on Solana?
Can a developer project create its own multitoken ecosystem of dapps on Solana.
Like a mini Solana for a specific use case running on Solana?
Thanks.
1
vote
1
answer
26
views
`solana-transaction-status` and `solana-sdk` edge incompatibility
In my project, I'm trying to use the edge versions of both solana-sdk and solana-program-test. However, I get the following error.
Updating crates.io index
Updating git repository `https://...
1
vote
1
answer
36
views
getFeeForMessage returns null value
I am following docs and making the following solana rpc call to devnet solana(https://api.devnet.solana.com) but I am getting null value in response
this is my body
{
"id":1,
"...
0
votes
1
answer
47
views
cargo.toml many versions error? (master + v2.0)
I am new to Solana and Rust, I took latest from https://github.com/solana-labs/solana.git
I open cargo.toml (I tried "master" and "v2.0" branch) from VSCode, many versions errors.
...
0
votes
0
answers
9
views
cargo-install-all.sh: ‘bash\r’: No such file or directory (On Windows laptop with WSL)
I am new to Solana and Rust, I took latest from https://github.com/solana-labs/solana.git
Under WSL (Windows Subsystem for Linux),
./scripts/cargo-install-all.sh --validator-only .
You'd see ...
0
votes
1
answer
65
views
How to verify offchain signed message inside onchain program
I want to implement verfying signature same as ethereum in solana
ethereum guide (https://solidity-by-example.org/signature/)
0
votes
1
answer
38
views
How to enter associated token address in solana playground?
I was following a youtube tutorial to mint nft tokens on solana playground. I wanna add Associated token address. In this tutorial there was an option to generate this using the owner account and mint ...
1
vote
2
answers
302
views
Gasless Transaction or Sponsoring Gas Fee for users
I'm building a Chess platform on Telegram MiniApp and in the browser as well. However, I have a question I would love to ask:
I was looking for Gasless Transactions (developers sponsoring gas fees for ...
0
votes
1
answer
69
views
Make build fail due to typedef redefinition with different types
I was trying build this example https://github.com/solana-labs/solana-program-library/tree/master/examples/c
I was trying build it using make and i am facing this error
error: typedef redefinition ...
0
votes
1
answer
39
views
IPC node for Solana
For ethereum, we can make IPC calls, if the RPC and client are running on the same machine (eg. in Python, can use https://pypi.org/project/ethereum-ipc-client/).
Is there some way to configure a ...
0
votes
1
answer
43
views
How do I store text data in an account
I am trying to store small amount of metadata in an account but it always throws validation error. Do I need to create a custom program because of that? I am new to web3 kinds of stuff.
const ...
1
vote
1
answer
115
views
how to get all Program tokens in ProgramID in Solana network mainnet ecosystem with javascript
Hi I want to get all Program tokens in a ProgramId, but I get an error here errors 401: it seems this error is rpc does not allow access to the getProgramAccounts method how can I fix it?
const { ...
1
vote
1
answer
97
views
How to create a private cluster on Solana?
I want to have a private cluster (not linked with mainnet) for my application, the primary use case is to create investor wallets, create NFTs and transfer of these NFTs on blockchain.
I want to have ...
0
votes
0
answers
49
views
Not to setup solana rpc node. -2.8 Slots Behind
A little guidance to trobuleshoot this issue would be appreciated. Thanks in advance
Server Specs:
CPU: AMD EPYC 7402P 24-Core Processor
RAM: DDR4 2666MHz 512GB (4 x 128GB 2666MHz RDIMM)
Bandwitdth: ...
0
votes
1
answer
96
views
How to decode `solana_sdk::instruction::CompiledInstruction` (rust solana sdk)?
I want to extract some user readable data from CompiledInstruction. Specifically, I want to understand if CompiledInstruction is native token transfer (SOL), and print sender, recipient, and amount. I ...
1
vote
1
answer
19
views
Calling transfer function from node server on anchor
Error: AnchorError caused by account: recipient. Error Code: ConstraintMut. Error Number: 2000. Error Message: A mut constraint was violated.
#![allow(clippy::result_large_err)]
use anchor_lang::...
1
vote
2
answers
36
views
Blocks on testnet have no transactions
I'm very starting with Solana so sorry for the noob questions.
I'm trying to extract data via Solana API as follows:
use solana_client::rpc_client::RpcClient;
let client = RpcClient::new("...
0
votes
1
answer
27
views
Can not use account after allocate the space
i'm new to solana. When i do allocate 100 byte from the docs on my account like this:
let allocateTransaction = new Transaction({
feePayer: senderKeypair.publicKey,
});
allocateTransaction....
1
vote
1
answer
31
views
Face error while install target sbf-solana-solana
I was trying to add target sbf-solana-solana by the command\
rustup target add sbf-solana-solana
but i am facing as issue
error: toolchain 'stable-x86_64-unknown-linux-gnu' does not support target '...
0
votes
0
answers
33
views
Transferring Mint through Phantom
I want to transfer mint(Bonk) through Phantom Wallet to my address. I am using React js and solana/web3.js, solana/spl-token packages that help me to for transactions. Solana transfer through Phantom ...
0
votes
1
answer
52
views
Signing multiple transfers using the CLI and submitting them in bulk via HTTP RPC
I'm working on a feature in my app where the user will sign two transfers and then broadcast them in one transaction. I'm a little confused in the steps, and just to clarify we are not using the web3 ...