Skip to main content

All Questions

Tagged with
2 votes
1 answer
50 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
FluffyMuffin47's user avatar
0 votes
0 answers
45 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 ...
user2873314's user avatar
1 vote
1 answer
52 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 ...
user2873314's user avatar
0 votes
2 answers
38 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,250
2 votes
1 answer
34 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
0 votes
1 answer
24 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
0 votes
1 answer
45 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
76 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,907
2 votes
1 answer
36 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
1 answer
40 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
1 answer
66 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
2 votes
1 answer
70 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
45 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
2 votes
1 answer
33 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
2 votes
1 answer
153 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

15 30 50 per page