Fastest way to get liquidity pool creation event
What is the fastest way to get liquidity pool creation event?I have tried using popular rpc webhook and logs subscribe websockets but I end up receiving the creation event about 5 seconds behind the...
View ArticleCheck if coin is registrered on Raydium
What is the most efficient way to check if a Solana coin is listed on DEX in Python?I know it can be done through dexscreener getToken API. However, I don't need any information about the token other...
View ArticleSwapping on Raydium
I am using the Raydium script to swap transactions, and I'm currently testing on the mainnet. I tried to swap a small amount of 0.001 SOL, but each time I do this, I receive a transaction hash....
View Articleassertion `left == right` failed: Bank snapshot genesis creation time does...
I am setting up solana-test-validator using the ledgerhttp://160.202.128.9:8899/snapshot-294878673-a6AxTznrH1mgMp6UhcP8Y7x4LXswTk7Grob8TFaRtSm.tar.zstusing command solana-test-validator --ledger...
View ArticleUsing declare_id with Environment Variables
I’m wondering if it's possible to use:declare_id!(ENV::PROGRAM_ID);This would allow me to work with several developers without needing to share:wallet = "~/.config/solana/id.json"
View ArticleHow can I set up an RPC node for the Solana testnet
There are only articles to start with a local validator. I don't want to start any local validator; I want to run an RPC node for the real testnet. How can I do it? I can't find any documentation...
View ArticleWhat is relationship between an Entry and a Block in Solana
I have always thought of Blocks in Solana (and in any blockchain really) as containing a list of transactions.But in Solana, it seems there is also the concept of an Entry, which from what I am reading...
View ArticleNeeding aprropriate Bytes input to return true value of isMutable
from solders.pubkey import Pubkeyfrom solana.rpc.api import Clientfrom borsh_construct import CStruct, String, U8, Boolfrom construct import Bytesclient =...
View ArticleTokenAccountNotFoundError from getOrCreateAssociatedTokenAccount
Error I'm getting: TokenAccountNotFoundErrorIt happens at getOrCreateAssociatedTokenAccount, I had checked other posts with same issue where they had to change commitment to "confirmed", but that...
View ArticleHow to retrieve the price of SOL to USDC manually?
def SOL_USDC(): client = Client("https://api.mainnet-beta.solana.com") base = "6P4tvbzRY6Bh3MiWDHuLqyHywovsRwRpfskPvyeSoHsz" quote = "6mK4Pxs6GhwnessH7CvPivqDYauiHZmAdbEFDpXFk9zt" base_pubkey =...
View Articlegetprogramaccounts with filter on symbol ? (token 2022)
I'm using token 2022 with metadata pointer extension, and the metadata are held in the mint account.I would like to fetch all mint addresses with a particular symbol, i know how to construct this kind...
View ArticleIs there an ecosystem crate that provides a bloom filter implementation?
I would like to use a bloom filter in my program. Is there an existing crate I can use that will let me do this?
View ArticleCross-program invocation with unauthorized signer orr writable account
use anchor_lang::{ prelude::*, system_program::{create_account, CreateAccount}, }; use anchor_spl::{ associated_token::AssociatedToken, token_interface::{Mint, TokenAccount, TokenInterface} }; use...
View ArticleClose Associated Token Account (token 2022 program) to get back deposited sol
I have created 2 types of Associated Token Account:1, Use token program:https://solscan.io/tx/3BC6yNwcaandgzSgFX4YP1nYopPLsa9RyRdqi4bDmKLpWsjiRqMKRaQaoZhgbBQpEsMhcFLoZwobKMVZvrLuUi6C2, Use token 2022...
View Articlecargo.toml many versions error? (master + v2.0)
I am new to Solana and Rust, I took latest from https://github.com/solana-labs/solana.gitI open cargo.toml (I tried "master" and "v2.0" branch) from VSCode, many versions errors.Is that to be...
View ArticleBTreeMap on Anchor ^0.29.0 stopped working?
Before anchor 0.29.0, BTreeMaps where working correctly in my programs, but now that I'm moving to ^0.29.0 I'm getting the following errors for every BTreeMap when I'm building my program.no associated...
View ArticleStream/retrieve *all* native SOL *transfers* above a certain value
I'm trying to stream (or alternatively, repeatedly historically obtain over a short period of time) all native SOL transfers from a single sender wallet to a single receiver wallet. That is to say, I...
View ArticleError while testing code
Here is my solana todolist program#![allow(clippy::result_large_err)]use anchor_lang::prelude::*;declare_id!("6u7Wzgps8X8Qjd5AaqaF5mpKdfZzSfNt2MaPjATf2Z6Y");#[program]pub mod todolist { use super::*;...
View ArticleHow can I disable direct mapping feature gate on local test validator?
I need to test some code that looks like it may work differently on mainnet, which currently does not have the feature gate active.
View ArticleWhere can I find `BUFFER_PUBKEY` to upgrade a program?
Which public key should be used as a <BUFFER_PUBKEY> and where can I find it?solana program upgradeerror: The following required arguments were not...
View Article