Questions tagged [program]
The program tag has no usage guidance.
163 questions
1
vote
1
answer
27
views
Are these parameters possible?
I have an idea in mind to crrate a token/coin for a real world utility solving a problem in a huge sector. I want to create an SPL token/coin but it would need to be as safe and transparent as ...
1
vote
1
answer
41
views
How to solve the cargo build-sbf error?
I have just started with rust and solana.
Firstly, I created a solana program using the command:
cargo init hello_world --lib
everything ran fine, and then i read from the official docs, to build i ...
1
vote
0
answers
32
views
How to reuse the same guard in mpl-candy-machine when minting NFTs
When minting an NFT from candy machine, I want to force users to make multiple payments (so that creators could receive fees from mints).
But it seems like reusing the same guards with candy-guard ...
2
votes
1
answer
27
views
What does it mean for a Solana program to not be associated with a ProgramData Address?
From the Solana docs on Program Accounts, when a new program is deployed, a Program Account and an associated Program Executable Data Account is created and the Program Account stores the address of ...
1
vote
0
answers
12
views
How to prevent signature replay when using Ed25519 Native Program
If I am using the Native Ed25519 Program to verify a message signature, I will need to add the pre instruction that will contain signature, message and public key to verify. In my custom program, I ...
2
votes
1
answer
23
views
zig programs on solana
I'm trying to deploy a solana zig program, but running into some ELF issues and was wondering if someone has any experience with that
here is my repo for reproduction https://github.com/anticode-dev/...
0
votes
0
answers
25
views
Raydium swap: Program log: Error: Invalid Sign Account
Just created instruction to swap on raydium v4 in golang and when i try to send the transaction, have this error:
Program log: Error: Invalid Sign Account
checked my public and private key and are ...
2
votes
0
answers
28
views
solana localnet - Error while upgrading a program loaded at genesis using `solana-test-validator`?
Is it possible to redeploy a program if it was loaded at genesis (specifically on solana-test-validator)?
Error while upgrading a program loaded at genesis
While doing some testing, I am experiencing ...
0
votes
1
answer
36
views
BTreeMap 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 ...
1
vote
1
answer
31
views
Why are some core programs on Solana mutable?
I have a few questions regarding the upgrade authority on basic programs deployed on the Solana blockchain, i.e. the Stake Pool Program or the Token-2022 Program.
Why do these programs still retain ...
0
votes
0
answers
122
views
im looking to create a MEV bot on solana, but i need help
ive recently noticed this wallet:
https://solscan.io/account/93gMmYdHDwK9JS8Xnj8ST4tG1HdpeDeS18tjkTLNn2xG#transactions
making hundereds of sol every single day. I found out that i need to be validator ...
1
vote
1
answer
26
views
where to specify progamId on client side to interact with a progam if at all
I am trying to interact with a basic counter program using coral-xyz, deployed it in localnet and devnet
but failed to interact with both.
following soldev/course
Error: Simulation failed.
Message: ...
1
vote
0
answers
17
views
Unable to withdraw whETH from Psyfi whETH Covered Call Vault
I am unable to withdraw my whETH from Psyfi's vault. Attempts to do so show the following error message on Phantom "This transaction reverted during simulation. Funds may be lost if submitted&...
1
vote
0
answers
74
views
How to protect myself against sandwiches (MEV)?
At the last days I'm getting sandwiched like more than 4 times a day while I must use high slippage, and jito isn't good enough solution because it delays my buys at most.
How I can protect myself ...
2
votes
1
answer
79
views
Admin endpoints in a program
How can I ensure that a function can only be called by the address that deployed the program, or the address that is the mint authority ? In anchor
0
votes
0
answers
122
views
deploy program and failed at 99% almost every time?
Error: 1 write transactions failed
There was a problem deploying: Output { status: ExitStatus(unix_wait_status(256)), stdout: "", stderr: "" }.
what this means? some one rejected ...
2
votes
1
answer
435
views
Got error "account data too small for instruction" when run Anchor deploy?
Sometimes I got this error when deploy program with running "anchor deploy":
Error: Deploying program failed: RPC response error -32002: Transaction simulation failed: Error processing ...
0
votes
1
answer
118
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
0
votes
2
answers
74
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 ...
0
votes
0
answers
19
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 ...
1
vote
1
answer
78
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 ...
2
votes
1
answer
73
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 ...
1
vote
1
answer
14
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?
0
votes
1
answer
50
views
How can I develop to purchase NFT in Solana and anchor
Help me please~~~
Could you send me a sample code or project?
1
vote
1
answer
55
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 ...
2
votes
1
answer
86
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?
0
votes
1
answer
28
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
0
votes
1
answer
76
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 ...
1
vote
1
answer
37
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 ?
...
0
votes
1
answer
131
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....
0
votes
2
answers
148
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 ...
1
vote
2
answers
147
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, ...
1
vote
1
answer
15
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 ...
1
vote
1
answer
58
views
Websocket version of getProgramAccounts
Is there a WebSocket version of getProgramAccounts that allows me to fetch PDAs with supplied seeds?
2
votes
1
answer
37
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 ...
0
votes
0
answers
10
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, ...
0
votes
1
answer
184
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: &...
1
vote
3
answers
313
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 ...
0
votes
0
answers
29
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 ...
0
votes
0
answers
40
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.
...
2
votes
1
answer
313
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 ...
0
votes
1
answer
312
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 ...
1
vote
1
answer
201
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" ...
1
vote
1
answer
294
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 ...
0
votes
2
answers
257
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 ...
0
votes
1
answer
329
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 ...
1
vote
2
answers
47
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 ...
0
votes
1
answer
171
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 ...
0
votes
0
answers
110
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?
1
vote
1
answer
102
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.