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 ArticleListen 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 ArticleHow 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 ArticleHow 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 ArticleHow 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 ArticleMonitoring 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 Articleweb3.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 ArticleRPC 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 ArticleI 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 ArticleHow to get Solana Blockchain price data from an API endpoint?
I need to get Solana blockchain ticker data for prices.
View ArticleUse 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 Articlewhen 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 ArticleHandle 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 ArticleAnchor 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 ArticleHow 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 ArticleHow 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 ArticleAccount 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 ArticleRemaining 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 ArticleHow 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