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 ArticleIs there any API in Raydium to get the price to token pair?
How can I use the Raydium API to get on chain prices of tokens?
View Articlenot able to retrieve solflare wallet address
My code is running on local in py eni , I am trying to get solflare wallet address after connecting to it but it getting errorhere is the full code<!DOCTYPE html><html...
View Articlefailed to get recent blockhash: SolanaJSONRPCError: failed to get recent...
todo.js:132 adding todo: Error: failed to get recent blockhash: SolanaJSONRPCError: failed to get recent blockhash: Method not found at Connection.getRecentBlockhash (index.browser.esm.js:6542:13) at...
View ArticleHow should I calculate compound interest in Solana programs?
I am doing the exercise from the Solana lending protocol video from YouTube, and would like to calculate compound interest, ensuring:Good floating point accuracyMy program works within CU limitsUsing E...
View ArticleJito Bundles - in the same transaction?
I am exploring Jito bundles, and able to execute them in a test. But I am noticing that when my are executed they show as 2 transactions on explorer, instead of one.Here is an example of my Jito...
View ArticleI try getTransaction and save to DB, I can't find accountKeys in message,...
// Solana WebSocket URLconst WS_URL = process.env.SOLANA_WS_URL || 'https://api.mainnet-beta.solana.com/';const connection = new Connection(WS_URL, 'confirmed');const RAYDIUM_AMM_PROGRAM_ID = new...
View ArticleCan’t sign a transaction partially (partialSign) in Node.js
I got an error when I was trying to sign a tx using a node script for a multi-sig account.Here is my code snippet. const { blockhash } = await connection.getLatestBlockhash(); const transaction = new...
View ArticleHelp Needed: ERR_MODULE_NOT_FOUND in Solana TypeScript Project
I’m currently working on a TypeScript project using the Solana Web3.js library and encountered the following error when trying to run my script:PS D:\Code\ts> npx esrun...
View ArticleHow to Import python modules in Solana Playground?
I'm testing the Smart contract in seahorse and can't find the way to import python modules like time, random etc. Is there any way as I'm getting error of:> Building...Error: could not find import...
View ArticleHow to visually understand canopy depth in a Concurrent Merkle Tree
I've been trying for a while how to visually understand the canopy in a Concurrent Merkle Tree but I cannot fully understand it.According to the docs, the canopy depth is the amount of upper nodes that...
View ArticleHow can I retrieve Raydium Swap instruction account keys using a mint address...
I'm working on creating a Raydium swap instruction for the Solana blockchain using Rust and need to construct it solely with Pubkeys, without making any external API calls. Specifically, I'm looking to...
View Articleoctal escape sequences are not allowed in strict mode
import {createNft,fetchDigitalAsset,mplTokenMetadata,} from "@metaplex-foundation/mpl-token-metadata";import {airdropIfRequired,getExplorerLink,getKeypairFromFile,} from...
View ArticleFind marketAuthority/SerumVaultSigner (owner of non-ATA vault accounts)
When fetching pools from the Raydium Liquidity API one of the keys listed is marketAuthority. It appears in the Raydium Swap txs as SerumVaultSigner, so I would like to retrieve this value to make...
View ArticleQuery Regarding Solana Contribution Cap Implementation
We're exploring the implementation of a crucial feature for Solana-based project. Would it be possible to make a mechanism that enforces an individual contribution cap to a liquidity pool? This is...
View ArticleRequest for Assistance: Retrieving Parsed Transaction Data in Rust for Solana...
Currently, I am running a Solana test validator, and it's functioning perfectly. However, I am facing a challenge when it comes to retrieving transaction data in Rust.In the "@solana/web3.js" library...
View ArticleAnchor build completes without error, but no .so file
I'm trying to build Raydium amm-cpi. Everything went well, anchor build completes without an error but there is no .so file in the target/deploy/ dir.target/idl/amm_cpi.json and target/types/amm_cpi.ts...
View ArticleHow to mint token after close mint in Token extension program
I'm a beginner, and I'm learning the close mint part of the token extension program. I want to understand how to mint an amount of tokens then close mint (not allowed to mint any more tokens)Thank you...
View ArticleHow to get amount transaction from getTransaction
How to get inputs, outputs amounts from rpc getTransactionBecause each transaction returns different data and structure
View Article