Skip to main content

Questions tagged [program]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
14 views

What happened to this meme coin?

How something like this shown in the chart can happen and how can I possibly find out before it happens. https://dexscreener.com/solana/2wicz7qpvun1rnuhvusdf8xah22rbkixekgs43rdboj4
curious155165's user avatar
0 votes
1 answer
18 views

can not deploy, getting weird error

i'm trying to build and deploy a program, but i get errors while building (althought it still finishes the build), and i can't deploy. Here is the error while deploying : ELF error: Failed to parse ...
Effe2's user avatar
  • 1,200
0 votes
0 answers
15 views

Funding Unfunded Account using Smart Contract

I am searching a way to fund a account using smart conttact, that work fine if the receiver is already done some transactions. This is failing if there is no transactions done on the account. How can ...
SKS's user avatar
  • 21
1 vote
1 answer
39 views

Invoking Solana Programs

I was checking different ways to initialize a solana program. I am quiet new to field and expecting some support here. I am running some VMs on a auto scaling group. I want to invoke a program when ...
SKS's user avatar
  • 21
2 votes
1 answer
32 views

Deploy a program from another program

I'm trying to build a bridge and I need to create pools in both chains In Solidity, I would be creating a contract that deploys and manage individual pools, but not sure if that can be achieved in ...
Julio Merida Pollos's user avatar
1 vote
1 answer
12 views

Is there a reason for usage of C representation of types in some SPL

For example, why is there COption when compared to the Native Rust primitives and the Rust native Option? What's the advantage of having this?
Jimii's user avatar
  • 3,420
0 votes
1 answer
19 views

How can I develop to purchase NFT in Solana and anchor

Help me please~~~ Could you send me a sample code or project?
Mullane Benjamin's user avatar
-1 votes
0 answers
12 views

What is leger space Solana?

Solana is a blockchain platform that has gained significant prominence in the cryptocurrency and decentralized application (dApp) space in recent years. Launched in 2017, Solana utilizes a unique ...
Esmael Kelil Abduro's user avatar
1 vote
1 answer
43 views

Account creation on Solana

Suppose I have a PDA address that hasn't been initialized yet and I send SOL to it, Am I correct in assuming that this account will exist? Who will have control over this account? Will it still be by ...
Jimii's user avatar
  • 3,420
2 votes
1 answer
22 views

How is program size calculated

I would love to know how a Solana program's size is calculated. Do PDA's size that are owned by the program add up when this calculation is done? What about arguments?
Jimii's user avatar
  • 3,420
0 votes
1 answer
25 views

Is the stateless-ask program deployed on mainnet somewhere?

Has someone or some organization deployed the stateless ask program on mainnet somewhere? https://github.com/solana-labs/solana-program-library/tree/master/stateless-asks
spirobel's user avatar
0 votes
1 answer
21 views

Best practice design PDA in solana

When developing contract in solana, I had seen some example (include example in solana cook book - https://solanacookbook.com/gaming/store-sol-in-pda.html#tiny-adventure-anchor-program-part-two) had ...
Nhat Minh Nguyen Quang's user avatar
1 vote
1 answer
22 views

Is there anyway to decode program account change that I don’t know the struct?

I’m trying to decode update that I got from the call of “connection.onProgramAcccountChange” but I don’t know the struct of possible outcome, is there anyway to get the struct or decode it somehow ? ...
Daniel Kotlarov's user avatar
0 votes
1 answer
25 views

Tx Reverting Even If Internal CPI Fails

Creating a CPI call, since it returns a Result. If the internal call throws an error, err should have an err() field as per the definition. The whole transaction should not revert, but it is reverting....
Priyanshu Mishra's user avatar
0 votes
2 answers
62 views

Revoke Mint authority in Anchor

How can I revoke the mint authority of my SPL token using Anchor? Using the Revoke accounts context seems not to make a difference. Side note, what does source represent from anchor's SPL token ...
Jimii's user avatar
  • 3,420
0 votes
2 answers
55 views

Is it possible to burn tokens on transfer?

Hey is it possible to create a token2022, and burn x% of tokens on every transfer? Something like transfer tax, but burning the tokens. Also i got second question, how can i deploy token on-chain, ...
youwish's user avatar
  • 33
1 vote
1 answer
11 views

Does <AccountInfo> have the accont key?

Looking at getMultipleAccountInfo it returns a AccountInfo<T>: { data: T; executable: boolean; lamports: number; owner: PublicKey; rentEpoch?: number; } Am I correct in ...
kekti's user avatar
  • 55
1 vote
1 answer
28 views

Websocket version of getProgramAccounts

Is there a WebSocket version of getProgramAccounts that allows me to fetch PDAs with supplied seeds?
kekti's user avatar
  • 55
2 votes
1 answer
34 views

Relational PDA design through seeds

I have somewhat what seems to be a fairly simple question. Lets assume we are building a Todo list where everything is public. And lets say a user will be able to create a new Task and that task will ...
kekti's user avatar
  • 55
0 votes
0 answers
6 views

want to what's wrong in my contract as i can't able to call my deposit function

use anchor_lang::prelude::*; use anchor_spl::token::{self, Token, TokenAccount, Transfer as SplTransfer}; // use solana_program::system_instruction; use solana_program::{account_info::AccountInfo, ...
SACRED- ESP's user avatar
0 votes
1 answer
35 views

Can't run local validator on MAC

Hello I'm getting the following error: Error: failed to start validator: Failed to create ledger at test-ledger: io error: Error checking to unpack genesis archive: Archive error: extra entry found: &...
Soldevrookie's user avatar
1 vote
3 answers
189 views

Deploying a program to mainnet seems impossible?

I have no issue deploying to testnet and devnet, but everything I've tried to get the program to deploy to mainnet using the CLI ends up with it hanging. Has anyone deployed a program recently (April ...
Crypto Actuary's user avatar
0 votes
0 answers
16 views

Can anyone help me, they changed the owner of my account and I don't know what to do?

Can anyone help me, they changed the owner of my account and I don't know what to do? my wallet 86tBAuUuyJE8hUj1wBy2WfAKGts8KhJD6skpyUUowzRJ They hacked me and changed the owner, is there a way to ...
tonynhu's user avatar
0 votes
0 answers
31 views

How do i get manual about token-creator-lac.vercel.app

I need manual about "https://token-creator-lac.vercel.app/". do you have any manual about "https://token-creator-lac.vercel.app/"? My email is [email protected] please send me. ...
블루검객's user avatar
2 votes
0 answers
235 views

Cannot deploy program onto solana mainnet

First of all, it's super slow when deploy(anchor deploy) my program to mainnet, I got error: Blockhash expired. 4 retries remaining Blockhash expired. 3 retries remaining Blockhash expired. 2 retries ...
user2873314's user avatar
0 votes
1 answer
99 views

failed to send transaction: Transaction simulation failed: Error processing Instruction 0: custom program error: 0x5

I encountered an error while executing a program call. Specifically, the error arises during the invocation of a function where I'm attempting to create a metadata account using the ...
Manav Panchal's user avatar
1 vote
1 answer
69 views

get transactions/logs from different program, on a span of blocks

Here is the situation: I'm using Rust. I need to be able to "listen" to transaction, or at least logs from a list of solana program. I cannot use Websocket's "logsubscribe" ...
Nathan's user avatar
  • 177
1 vote
1 answer
215 views

"package solana-program v1.18.7 cannot be built" error [duplicate]

I have a new Rust project that gives the following error when I compile it. package `solana-program v1.18.7` cannot be built because it requires rustc 1.72.0 or newer, while the currently active rustc ...
mezzosoprano's user avatar
0 votes
2 answers
134 views

creating a custom spl token 22

hey i made a custom keypair and want to make a custom contact address like my keypair. then I spl-token create-token and entered my keypair json and I got this "Error: "default signer is ...
BurnerDragon's user avatar
0 votes
1 answer
174 views

How To Name Solana Instructions and Add Program Public Name

On Solscan, when you go to Analytics and scroll to the bottom, I noticed some programs like Raydium, Pyth and Metaplex have public name's set and you see that instead of seeing the program account ...
Brian M.'s user avatar
  • 121
1 vote
2 answers
37 views

Does a CPI method to a program leave any special footprint on the blockchain?

Firstly, do I understand correctly that CPI call is one of the ways to call a method of program? If so, only by examining a TX on the blockchain, will it be possible to distinguish a CPI call to a ...
kriss100's user avatar
0 votes
1 answer
68 views

Validate secp256k1 ethereum signature?

I’m working on an anchor-lang project to validate secp256k1 ethereum signature. I used secp256k1_recover program docs as a reference for this code. The problem is that the public key I get from the ...
Teodor Zafirov's user avatar
0 votes
0 answers
65 views

Deserialize Solana.Transaction Golang

I have a Golang Solana.Transaction object and want to obtain the raw/pre-compiled instruction details. How can I deserialize the Transaction.Message.Instruction?
Ron's user avatar
  • 1
1 vote
1 answer
59 views

How to pause program on Solana?

How can I pause program in Anchor on Solana like pause provided by Solidity? I know programs on Solana is stateless, but I need to achieve this function.
user9310's user avatar
0 votes
0 answers
25 views

My ownership transferred to another program. How can i set it back to systemprogram?

Scammer transferred my program to another program. Now my wallet is assigned to his program. So I it can't pay for transaction fees anymore. How can I set it back to system program to recover ?
Coşkun Kömürcü's user avatar
0 votes
1 answer
326 views

Solana Transactions using Solders object has no attribute 'recent_blockhash'

Below is the Python code I wrote to try to engage the logs of a deployed program. I don't know why I keep getting the following error: An error occurred: 'solders.transaction.Transaction' object has ...
Dino Anastos's user avatar
2 votes
1 answer
62 views

Access Account Discriminator in Anchor

I wish to access the discriminator of an Account Type inside a program. The only method I found is let mut init_storage_data = ctx.accounts.storage.try_to_vec().unwrap();, but it's skips the first 8 ...
PandaPanda's user avatar
1 vote
2 answers
43 views

Is There a Limit To How Many People Can Transfer SOL Into a "Pot" Account?

I'm building a game and want to give players the ability to pool SOL into a PDA account that is distributed to the player that wins. I've read about write-locked accounts, but usually only in the ...
Brian M.'s user avatar
  • 121
0 votes
1 answer
62 views

Deploying program with sol_remaining_compute_units() gives "invalid account data"

Including something like msg!("remaining compute: {}", solana_program::compute_units::sol_remaining_compute_units()); will lead to error when deploying RPC URL: https://api.devnet.solana....
Pun's user avatar
  • 1
1 vote
1 answer
130 views

What determines the size of a program

How is the size of a program calculated? If all accounts have a limit of 10 kibibytes, I assume that also applies to programs as well? How will the extend program size affect this? does it allow me to ...
Jimii's user avatar
  • 3,420
2 votes
1 answer
121 views

Deserialise getAccountInfo data from Rust rpcclient for a PDA from drift protocol

Basically I have the following code in devnet. I want to call getAccountInfo to get some account information. I have a PDA: JD71QyQpAJvoyq4p6mfwyaw4rY9qaDLk4CQpHeuPSpEK created by the programId: ...
panicKing's user avatar
2 votes
1 answer
32 views

canonical method of calling programs functions in script format

I have a couple deployed programs on Devnet. Is there a standard way of calling functions on a deployed program, assuming I have the IDL? Obviously I could write a test but a test typically deploys a ...
AceGravity's user avatar
3 votes
2 answers
820 views

How do I interact with closed-source Solana programs with no public IDL?

How do I interact with a program that has no open source and no Anchor program IDL. I need to get types, accounts and instructions for this program: https://solscan.io/account/...
FDFD FDFD's user avatar
1 vote
1 answer
21 views

What standard of NFT to adopt when wanting to mint a set of nft to a collection and then mint NFT one by one to the collection

I want to mint a set of NFT to a collection and then want to mint NFT one by one...what standard and procedure would be best in terms of tx cost would that be most efficient in this scenario?
Tahlil's user avatar
  • 161
3 votes
1 answer
487 views

Is it possible to invoke a program using solana cli?

I'm using anchor framework to write and deploy programs in solana blockchain. I run solana-test-validator and then use anchor deploy to deploy my simple hello-world program. It gives me the programs ...
Amir reza Riahi's user avatar
2 votes
1 answer
141 views

How do you avoid frontrunning when initializing a program with a PDA?

Let's say I have a PDA which maintains the global state of my program. This is like a singleton. And the following snippets of code initialize it : pub fn initialize(ctx: Context<Initialize>) -&...
Dylan Kerler's user avatar
2 votes
1 answer
367 views

Adoptability of token program 2022

So I'm having to create a nontransferable spl token and token program 2022 does provide features for it. The thing is I want to know that has the program been globally accepted in the solana ecosystem ...
Muhammad Ali's user avatar
1 vote
1 answer
157 views

Why do I get an error when trying to make an associated token account via anchor?

let create_cpi_accounts = associated_token::Create { payer: ctx.accounts.user.to_account_info(), associated_token: ctx.accounts.wallet.to_account_info(), authority: ...
Dylan Kerler's user avatar
1 vote
1 answer
451 views

How can I deploy an SPL fungible token through anchor?

I attempt to create a new account with the anchor #[account(init)] macro, then assign ownership of the new account to the token program, and then attempt to send the initialize_mint instruction to the ...
Dylan Kerler's user avatar
2 votes
1 answer
194 views

Why does my SOL transfer succeed despite the fact that it reduces the balance to 0, below the rent exempt amount?

The solana documentation states that any transaction which will cause an account to go below it's rent exempt balance, should fail (here). Every time an account's balance is reduced, a check is ...
Dylan Kerler's user avatar