Quantcast
Channel: Recent Questions - Solana Stack Exchange
Browsing all 7855 articles
Browse latest View live
↧

CustomAccount deserialization issue

I have this piece of code, it skips the first 8 bytes of the account data as that's the descriminatorpub struct CustomProgramAccountStruct { pub pubkey: Pubkey, pub authority: Pubkey, pub token:...

View Article


Listen to raydium swap transactions via websocket

I currently have a demand for a project that needs to listen to SWAP transactions between tokens, preferably via websocket.Currently I only found the programSubscribe method on the nodes, but it gives...

View Article


How can I get the program_id from the last transaction response Solana...

I have a codefn main() {let rpc_url = String::from("https://api.mainnet-beta.solana.com/");let client = RpcClient::new(rpc_url);let pk = Pubkey::from_str("adresshere").unwrap();let signatures =...

View Article

How to get live price in dollar for any Solana tokens?

I'm working on a Node.js bot using the Raydium SDK. My goal is to fetch the price of any token on the Solana blockchain, given its address, and display the updated price in the terminal every second. I...

View Article

How can I access the 'Retry-After' HTTP response header while using...

I've been trying to use the @solana/web3.js library to send RPC requests for transaction data but I'm getting hit with the following error:Error: 429 Too Many Requests:...

View Article


Monitoring the latest Price

I need help getting the latest price of a token.I am working on a sniper bot where users buy and sell the token at a specific price. I need to constantly monitor the current price, and if it matches...

View Article

web3.js returns my id instead of result on Accountsubscribe so can't unsubscribe

Using the solana/web3.js sdk, when I use connection.onAccountChange which is basically the AccountSubscribe I get as result an id.const subscriptionId = connection.onAccountChange(ata, (info, context)...

View Article

RPC request error when requesting devnet airdrop and during anchor deploy

I am trying to deploy my first anchor program and I got it to successfully build. However when I try to deploy it, it returns the error,Error: RPC request error: cluster version query failed: HTTP...

View Article


I can't fetch full transactions for Solana token from quicknode api. Some...

I am trying fetch all the signatures of a solana token with details. I am using monthly subscription. But Its failed to give full transactions. Some signatures are missing.Same happening with...

View Article


How to get Solana Blockchain price data from an API endpoint?

I need to get Solana blockchain ticker data for prices.

View Article

Use custom transfer function instead of Spl Token::transfer

I am creating a new token and gonna list it on some DEX platforms where user can buy my token.What i want is when a user gonna buy my token from any platform the transfer function should be my custom...

View Article

"Anchor deploy" deploys immutable program

I am using Anchor 0.30.1 which is the latest version.I used to use Anchor 0.30.0 and anchor deploy has deployed upgradeable programs.But after upgrading to 0.30.1, it deploys immutable program.This is...

View Article

when i am creating 'create-extra-metas' using cli i am getting 'invalid...

../../target/debug/spl-transfer-hook create-extra-metas HooGStFZgkeZ5wCSg9vHtuEYBSotB26tVEvXra4PEKYJ MoxLrhGXAjVnEiVAjG5ycQbp9MVd4sjfj1yLPFVXhkherror: send transaction: error: send transaction: RPC...

View Article


Handle big vector containing ton of structs

I'm looking for a way to handle a big struct.I want to understand how to create an account storing more than 10_000 structs inside is possible.Is there a simple way to do it? Or should I have to...

View Article

Anchor detecting wrong Rust version

Anchor keeps detecting my Rust version as 1.68.0-dev even though it is the newest one, any idea?jano@Jans-MacBook-Pro counter_2 % anchor testwarning:...

View Article


How to deserialize StakePool account data on a solana native program on chain?

let stake = try_from_slice_unchecked::<StakePool>(&stake_pool.data.borrow())?;i have tried try_from, try_from_slice,unchecheked and with schema as well, but I get this same error,the trait...

View Article

Image may be NSFW.
Clik here to view.

How to get how much sol was added to lp

Need to get how much sol and the token was added to lp with a signature when the token was created. Please provide a link to a project that has a solution, I am sure there are plenty. Using js would be...

View Article


Account Serialization error in `spl-stake-pool`'s add-validator instruction

I use this instruction in my program&add_validator_to_pool_with_vote( stake_pool_program.key,&stake, stake_pool.key, vote_account.key, None, ),&[ stake_pool.clone(), staker.clone(),...

View Article

Remaining Accounts lifetime

I have problem of borrowing accounts mutably from remaining accounts. Not exactly how to use AccountInfo, as error says that accounts does not live long enough.I am using Anchor 0.29, Solana-Program...

View Article

How Pyth is able to update each feed contract every block?

How they garantee the TX successful landing?Running their own validator would increase the certainty of landing the tx?Looks like they are sending the transaction here.

View Article
Browsing all 7855 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>