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

Solana CLI verify-offchain-signature not compatible with message signing...

We have an API that verifies and off-chain signature using the Solana CLI. It runs the following command:solana verify-offchain-signature #{message} #{signature} --signer #{public_key}Our test suite...

View Article


How to understand if transaction is a native token transfer?

I'm noob in Solana so sorry for dumb question.Using rust sdk I got EncodedTransactionWithStatusMeta from the network. I want to filter out all transactions which are not native token transfers (SOL),...

View Article


will it fail if the program tried to create an account with the same seeds...

#[account( init, seeds = [ AMM_CONFIG_SEED.as_bytes() ], bump, payer = admin, space = 8 + AmmConfig::INIT_SPACE, )] pub amm_config: Account<'info, AmmConfig>,as shown here, the seed is constant...

View Article

TypeError with camelCase and IDL Constraint Issue in Anchor TS Test Code

I'm working on a Solana project using Anchor, and I'm encountering two issues when trying to run a test with ts-mocha.TypeError:The first error message I'm getting is:TypeError: Expected the input to...

View Article

How can we add our project to the blowfish whitelist? Phantom will block us

we are the development team of the website recymysol.com. Our project is to help users recycle idle tokens sol.We have just been online for a short time, but we found yesterday that users were blocked...

View Article


Run a calback when transection is confirmed in solana Blink

i want to send an email whenever a transection succeed in solana Blink.Is there any call back that we can run based on if the transection failed od succeed in Blink.

View Article

How can I write unit tests with a future timestamp?

I have an ICO program created using Anchor, and I want to test with a future timestamp. How can I write unit tests with a future timestamp?

View Article

How to retrieve total token supply (circulating minted tokens) within a...

I'm developing a Solana program using the Anchor framework. In one of my instructions, I need to fetch the total number of minted tokens currently in circulation. I'm aware that this information can be...

View Article


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...

View Article


How do you change the signer of an transaction or replicate a transaction...

I want to prep a versionedTransaction to sell some tokens before I receive them. Such that the instant they hit my wallet the transaction triggers - rather than deal with the delay of compiling the...

View Article

Program account fails to change state of owned data account

I am working on a simple project, where a wallet account is created, credited some SOL, then assigned a program contract as its owner (via assign instruction). In the use case, the program should...

View Article

Creating a single sided vault, using float for calculating ratio

When making a single sided vault, aka deposit X get Y. is it safe to just use a float to get the ratio?right now I just calculate the ratio with like so:(x_underlying_token_account_amount as f64) /...

View Article

Assuming confidential transactions, is the use of a different public key for...

In the field of cryptocurrency design, there is a critical question of whether we can build, or have already built, a cryptocurrency that both (1) is highly efficient at scale (i.e., capable of...

View Article


How to swap SOL token / vise versa but on-chain (in a smart contract)? On...

I'm aware of this question How to interact with router for swap transaction?but mine is different.How to swap a token for SOL or vise versa from within a Solana program/smart contract? That is,...

View Article

CLMM Pool on Raydium

I'm confused about creating a pool on CLMM on Raydium. I'm using the Raydium SDK to create a DEX, but I'm stuck understanding the addresses involved.As far as I understand, there are three main...

View Article


raydium clmm pool swap

I can perform token swap transactions in Raydium with Python. but I don't know how to do this on a token in the clmm pool. I can collect the keys from the Raydium API in the normal AMM pool and perform...

View Article

Can not find a working example for simple Swap and Jupyter API in python

noob here.TL;DR can anyone please provide a working example with library versions in python to execute a simple swap using jupyter api or at least point me to a working documentation??Longer version:...

View Article


solana-lldb cannot start due to inability to find libpython3.8.so.1.0

I am new-ish to solana. I am on an Ubuntu 22 virtual machine. I am trying to use solana-lldb alongside solana-ledger-tool program run -l ~/test-ledger -e debugger ~/dev/program/build/program.so so that...

View Article

How to close a token account when the token is no longer liquid

Closing a token account requires the account balance to be zero, but when that token's liquidity is drained, I cannot then swap that token to bring it to zero balance.

View Article

im looking to create a MEV bot on solana, but i need help

ive recently noticed this wallet:https://solscan.io/account/93gMmYdHDwK9JS8Xnj8ST4tG1HdpeDeS18tjkTLNn2xG#transactionsmaking hundereds of sol every single day. I found out that i need to be validator to...

View Article
Browsing all 7906 articles
Browse latest View live