Skip to main content

Questions tagged [solana-program]

The tag has no usage guidance, but it has a tag wiki.

Filter by
Sorted by
Tagged with
0 votes
0 answers
5 views

Solana Playground airdrop for hello_world not working: "You have requested too many airdrops."

I'm trying to deploy Hello_world on solana playground. This is my first ever program on solana/devnet. devnet says I need 0.42 SOL to deploy and to execute "solana airdrop 5" to receive SOL ...
Chase Van Bibber's user avatar
0 votes
0 answers
15 views

Weird behavior with @solana/web3.js confirmTransaction

I have a function that send transaction using the code below: const signature = await connection.sendTransaction(tx, { skipPreflight: true, maxRetries: 10, }) If I send a transaction using ...
Richard Ore's user avatar
1 vote
0 answers
8 views

block I GET Compute Budget: SetComputeUnitLimit DEDUCTIN FROM EVERY TRANSACTION

Compute Budget ComputeBudget111111111111111111111111111111 Instruction Data Raw 030417010000000000 Input Args {2 items discriminator:{2 items type: "u8" data: 3 } microLamports:{2 items type:...
Paola Orozco's user avatar
0 votes
1 answer
13 views

Fetch Top Solana Token Account holders via API

For solana tokens I want to fetch top accounts not Token Account. How i can via api?
Abdullah Azeem's user avatar
1 vote
0 answers
6 views

Pubkey to std::vec::Vec<u8> error when running anchor build v0.30.0

Error here when running anchor build on version 0.30.0. It turns out I was simply using <generic_program>::ID.key() and i just needed to remove .key(), so <generic_program>::ID
Burger Bob's user avatar
  • 1,406
1 vote
0 answers
11 views

Error: missing field `discriminator` at line 28 column 5

Hello im trying to build simple smart contract using anchor and solang but when im trying "anchor build" command im getting this error: info: Solang version v0.3.3 help: found contract '...
dustinioxyz's user avatar
0 votes
2 answers
18 views

will it raise higher cost when setComputeUnitLimit to higer and higher CU than actually used?

From my first impression, the setComputeUnitLimit() just set the cap of execute unit, so, said Tx actually need 300_000 CU, then I can call setComputeUnitLimit() with any value that higher than ...
breeze wang's user avatar
0 votes
1 answer
24 views

expected a sequence of length 32 (got 43) error when using solana in Python

Solana community! I'm working on a Python script to filter transactions executed through the SPL Token Program. I aim to specifically identify and list new token creation transactions. However, I'm ...
Nerevaine's user avatar
1 vote
1 answer
16 views

I am trying to write a program in Rust for Solana, but I encounter a problem when using the macro #[entrypoint]

I am trying to write a program in Rust for Solana, but I encounter a problem when using the macro #[entrypoint]. Here is my code: // src/lib.rs use solana_program::entrypoint; use solana_program::{ ...
1 vote
0 answers
6 views

Try to create mint and ATAaccount shows Error:Transaction simulation failed:Error processing Instruction 0:Program failed to complete

Try to create mint and ATA account, When I run anchor test, it shows Error: failed to send transaction: Transaction simulation failed: Error processing Instruction 0: Program failed to complete here ...
papi's user avatar
  • 51
1 vote
1 answer
32 views

Error: target/idl/sol_404.json doesn't exist. Did you run `anchor build`?

I run anchor build , and it indeeded generate a sol404.json , but when I run the anchor test it shows /Users/brooke/Desktop/sol404/node_modules/.bin/ts-mocha -p ./tsconfig.json -t 1000000 'tests/**/*....
papi's user avatar
  • 51
0 votes
0 answers
20 views

Token swap error 0x26 InvalidSplTokenProgram on raydium rust

i'm currently following this repo https://github.com/raydium-io/raydium-contract-instructions/blob/master/client/src/main.rs to perform a raydium swap but when i tried testing, i'm getting error ...
irregular's user avatar
1 vote
0 answers
9 views

Error: AnchorError caused by account: token_metadata_program. Error Code: InvalidProgramExecutable. Error Number: 3009

I run anchor test and then it shows Error: AnchorError caused by account: token_metadata_program. Error Code: InvalidProgramExecutable. Error Number: 3009. Error Message: Program account is not ...
papi's user avatar
  • 51
1 vote
0 answers
4 views

Fetch NFT holders

I want to fetch the NFT holders. I want to pass the address of an NFT and get back all the previous holders of that NFT. I already obtained the collection's holders, but now I need the NFT holders.
Maidi's user avatar
  • 454
1 vote
1 answer
18 views

How to Interact with solana Programs?

I am beginner with Solana chain, Learning things compared to EVM based blockchain. I want to know one thing is like how can we interact with Solana program(contract),though i know we can use Solana/...
Bhushan Dhiware's user avatar
0 votes
1 answer
18 views

Can i modify a account data in a program, if the account is not mentioned in the account struct?

I wanted to know if I can modify the Pda owned by the same program when not mentioned in the account struct. what i want to do is modify several PDAs at once like more than 50, So I can't pass more ...
Abhishek Faliya's user avatar
1 vote
1 answer
28 views

How can I resolve this "Error processing Instruction 1: custom program error: 0x1004"

I'm running into the following error trying to work through the transfer hook docs. https://solana.com/developers/guides/token-extensions/transfer-hook I am using Ubuntu on Windows WSL: I am running ...
Ayman's user avatar
  • 111
2 votes
1 answer
89 views

error[E0599]: no associated item named `__anchor_private_full_path` found for struct `anchor_spl::token::TokenAccount` in the current scope

I run my code, and it shows, looks like I need to intro pub token_program: Program<'info, Token>, but I did, you can get more information from my code below error[E0599]: no associated item ...
papi's user avatar
  • 51
0 votes
0 answers
25 views

Java script code to swap solana coin on Orca

I met issues with Solana trading bot development. I plan to exchange Solana coins using the Orca platform and are using the Whirlpool SDK. This is my current code. But this only works once out of 10 ...
yang jang's user avatar
0 votes
0 answers
11 views

Error: Program is not executable after I launch client to interact with helloworld.sol

This is in reference to the following repo: https://github.com/solana-labs/example-helloworld/ So after a few hiccups I managed to compile helloworld.so I then deployed that beast using: solana ...
Mark's user avatar
  • 1
0 votes
0 answers
10 views

How to create solana program in native rust for minting fungible tokens like ERC20? I did following code:-

use borsh::{BorshDeserialize, BorshSerialize}; use solana_program::{ account_info::{next_account_info, AccountInfo}, clock::Clock, entrypoint, entrypoint::ProgramResult, msg, program_error::...
Aditya's user avatar
  • 11
2 votes
1 answer
20 views

can a solana wallet address have restrictions that disable SPL Token functionality?

I would like to know if it is possible to effectively turn off the ability for a wallet address to receive SPL Tokens...To put it another way- have the wallet only recieve native SOL. Is there a way ...
Nick's user avatar
  • 31
0 votes
0 answers
10 views

Raydium SDK V1 Frok

I am confused about Raydium dex. I need help I forked the Raydium DEX repository the Raydium SDK V1 demo and am currently working on it. Is this approach viable considering that Raydium is now ...
Maidi's user avatar
  • 454
0 votes
0 answers
16 views

blacklist token

I would like to know how I can create a black list on Solana, with solidity I do: function updateBlacklist(address _address, bool _isBlacklisted) public { isBlacklisted[_address] = _isBlacklisted; ...
Murilo de Souza Lopes's user avatar
0 votes
0 answers
24 views

WalletSendTransactionError: Non-base58 character

I am facing issue with the minting of the NFT. This is the code inside my react component. const { connection } = useConnection(); const { publicKey, sendTransaction } = useWalletSol(); const ...
niishaaant's user avatar
2 votes
1 answer
94 views

What is the data size of a wallet account?

I want to calculate the minimum balance for Rent-except and have found code like this: const { Connection, clusterApiUrl, LAMPORTS_PER_SOL } = require('@solana/web3.js'); const connection = new ...
breeze wang's user avatar
1 vote
1 answer
25 views

Solana: Delayed transfer

Is there a way how to (programmatically) reserve an amount on wallet A (not owned by me, but the owner is willing to give a permission for this transaction) (preferably if it couldn't be used for ...
Betka Nezbedka's user avatar
0 votes
1 answer
17 views

declared program id mismatch

We copied a solana program from a youtube vid. The program id : Ecr5UgGyJTnKraLRPYBXrK9RD7DfoVDYfSioVksnnfjA is this one. We copied it and deployed it on our own and here is what we got. program id : ...
SACRED- ESP's user avatar
0 votes
0 answers
24 views

Phantom Wallet: Issue with transaction, failed to send transaction: Transaction precompile verification failure InvalidAccountIndex

We're utilizing React version 16 and Node.js version 16. While creating an anchor provider to retrieve the program, we're encountering an error: "Failed to send transaction: Transaction ...
Sajjad Akhtar's user avatar
0 votes
1 answer
19 views

I have staked PYTH and I want to withdraw it but it's in a HACKED wallet

Can you help me what to do with a hacked wallet. It automatically drains the wallet whenever I send solana in it. Is there a way I can Unstake PYTH to another wallet?
user13548's user avatar
0 votes
1 answer
29 views

How to add maxRetries to solana-py send_transaction

I send tx with Python SDK send_transaction function. ctx = Client(RPC_URL, commitment=Commitment("confirmed")) txn = ctx.send_transaction(tx, *signers) I want to add to send tx process ...
Jahspear's user avatar
  • 101
1 vote
2 answers
41 views

What's the Agave blockchain and how it's related to Solana?

Currently all the PRs in the Solana repo were closed by bot that points to Agave blockchain. I didn't find any info on what it is and how it's related to Solana blockchain. Could anyone please clarify?...
solanauser67's user avatar
0 votes
1 answer
13 views

How to calculate offset for the Stake Program in getProgramAccounts for a validtor info account?

I'm trying to create a filter that will return the associated validator info account for a provided validator pubkey. How do I structure the json params passed to getProgramAccounts? I've been able to ...
Bobby Dore's user avatar
0 votes
1 answer
14 views

Anchor PDA Cross-program invocation with unauthorized signer or writable account token 2022

i'm testing the Token Extension MetaData Pointer NFT using this example: https://github.com/solana-developers/program-examples/tree/main/tokens/token-2022/nft-meta-data-pointer/anchor, but, instead of ...
0xNicko's user avatar
  • 31
0 votes
0 answers
16 views

Accidentally sent tokens to Associated Token Account Program ID

I made a mistake and accidentally sent my tokens directly to the Associated Token Account Program ID: ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL. I understand that this is a program ID and not a ...
Syntax Surge's user avatar
1 vote
1 answer
12 views

`Event doesnt exist` error when integrating anchor wallet on expo app

When attempting to sign a transaction as anchor.Wallet in a react native expo app for a solana program, the error Property Event doesnt exist is given
brimigs's user avatar
  • 76
0 votes
1 answer
24 views

Solana Program Deploy command failing due to llc text sections Error

The deploy command is failing. How can I fix this error. I found no documentation about this error. After running cargo-build-sbf in my hello_world test project I get this error: $ solana program ...
TheFox's user avatar
  • 101
0 votes
1 answer
11 views

can't connect to my local when doing hello world on rustc

solana program deploy C:\Users\kamba\OneDrive\"Рабочий стол"\blockchain_assignment_2\solana-hello-world-local Error: RPC request error: cluster version query failed: error sending request ...
Kuanysh's user avatar
0 votes
0 answers
25 views

Check 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 ...
Lars Mohammed's user avatar
0 votes
1 answer
12 views

Compute sha256 hash of a very large input that doesn't fit in one transaction

If I want to compute the sha256 hash of some bytes, I can use solana_program::hashv::hashv, which works fine for a small piece of data that can be hashed in one transaction. Let's say I want to hash ...
Ahri's user avatar
  • 3,325
0 votes
0 answers
22 views

Solana Leaderboard for Simple webapp [closed]

What approach would you recommend for creating a Solana based leaderboard for a simple webapp game? Would this be to create it using NFTs? Or to create a program that maintains a list of the top 10 ...
user23524156's user avatar
1 vote
1 answer
11 views

Durable-Nonces: Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'toBuffer')

On the Client/Browser When trying to initialize a new NonceAccount following the recipe from the [Cookbook][1] & Phantom Solana Coobook Instruction: https://solanacookbook.com/references/offline-...
Eduardo Chongkan's user avatar
2 votes
1 answer
51 views

Why do sandwich attacks still exist on jito?

Why does jito have abandoned the mempool subscription method, but there is still a sandwich attack in jito's tips account? How did they do it? Or is it that jito’s internal developers are exploiting ...
young seraph's user avatar
0 votes
1 answer
23 views

Who gets to create token associated accounts on Solana?

I understand the differences between token mint accounts and token associated accounts. As I'm building a web-app allowing people to mint spl tokens on our website, we are facing a question about who ...
Maxareo's user avatar
  • 101
0 votes
0 answers
27 views

How are people buying even faser than the owner of the CA?

What are the steps these people take that allow them to purchase a token faster than the owner of the CA? They purchase in split seconds. What are the RPC configurations and generally actions that ...
Hossein Jalali's user avatar
0 votes
0 answers
27 views

Phantom wallet could be compromised, want connecting to Ledger [closed]

I have my funds staked on Phantom. One day in the past i clicked on a scam NFT. But in the last moment i didn´t connected the wallet. Luckyli. Later on i learned and deleted every connected app in my ...
Jotka's user avatar
  • 1
0 votes
0 answers
17 views

Locker and vester for Solana

Seriously how does anybody lockup their LP or vest tokens on solana? Do they just hold them? There's like no service out there to do it
David G's user avatar
  • 101
3 votes
0 answers
21 views

Anchor Test fails with version error [duplicate]

Issue: I installed everything needed to start developing on Solana. I am trying to test a simple contract but when i run: anchor test, it errors out the following: error: package `solana-program v1.18....
Dutch's user avatar
  • 31
0 votes
0 answers
18 views

Anchor program test with error: Transaction failed to sanitize accounts offsets correctly

hope someone can help me. i modity the project which called AMM https://github.com/ironaddicteddog/anchor-amm after update the version of anchor and rewrite test code. but face the problem : Error: ...
imoyaki's user avatar
0 votes
1 answer
8 views

How to pass multiple contexts to a single function?

I'm creating a staking contract and one of the functions that takes in the deposits, I'm using a struct in the context of transferring SPL, however, to keep the records for the same I need to create ...
ProgrammerForFun's user avatar

1
2 3 4 5
23