Skip to main content

Questions tagged [program]

2 votes
1 answer
53 views

I have relatively simple solana anchor program: About 10 methods No extra dependencies (only anchor-lang and anchor-spl) But still program size is 557K, which will be about 4 SOL or ~550$. This is ...
diralik's user avatar
  • 133
5 votes
1 answer
23 views

So the ProgramError enum has a bunch of entries where I'm not quite sure what they are supposed to be used for. For instance, what's the difference between IncorrectProgramId, IllegalOwner and ...
Solandy's user avatar
  • 915
1 vote
1 answer
32 views

I am trying to decode base64 data I got from the method programSubscribe. I have the IDL for the program, but I don't know how to get the event index for the notification. When I tried decoding Solana ...
Bob's user avatar
  • 13
3 votes
1 answer
48 views

I have a simple solana program instruction that does nothing but loop and print the remaining CUs left:- use anchor_lang::{ prelude::*, solana_program::log::sol_log_compute_units }; pub fn ...
abelmarnk's user avatar
  • 1,097
1 vote
1 answer
73 views

Is there any simple way to calculate the minimum rent required to create a associated token account onchain. In Token program it is 165 bytes, 2039280 lamports. But how do we calculate the same for ...
Thrishank 3410's user avatar
1 vote
1 answer
41 views

I'm encountering an issue with closing a Solana program on devnet: Initial situation: Program ID: BsnxXwnRuom3Y2Am3VJhaGJK7H8dMhNZbW2kHUaNMghw Program Data Account: ...
user44940's user avatar
3 votes
1 answer
255 views

I am new to Solana and just started reviewing a code base that had an already existing program, which is using the declare_id! macro from Anchor, like this: declare_id!("...
Paul Razvan Berg's user avatar
2 votes
1 answer
208 views

In Solidity, it is possible to define an ETH amount like so: uint256 treasury = 100 ether; Does something like that exist when developing a Solana program?
Paul Razvan Berg's user avatar
0 votes
0 answers
28 views

Advanced protection program recently installed on my moto g has been a burden and with it I've sorta lost control. Several of my apps passkeys have disappeared, leaving me with errors saying I need ...
Billy Smith's user avatar
0 votes
2 answers
44 views

I want to trigger the raydium:swap instruction on the Raydium Liquidity Pool V4 program and I'm wondering where i can find the right seeds to regenerate pdas for OpenBook
Hex Luther's user avatar
0 votes
1 answer
61 views

I'm developing a program like a marketplace (or something like that). I already created a collection, verified the collection, create a nft and marked it as part of this collection. I'm finding the ...
Francisco Rappazzini's user avatar
3 votes
1 answer
52 views

How does Solana validate an program account I deploy is valid sbpf bytecode? What would happen if I tried to deploy some random bytes to a program account (assuming the headers are correct, since I ...
McBain's user avatar
  • 6,933
0 votes
1 answer
68 views

I am writing a rust program (not a smart contract) that needs to execute a swap by calling the orca exchange smart contract. how would i do this. I have the IDL but i cannot seam to generate the ...
Luis Negrão's user avatar
0 votes
1 answer
74 views

Example: We have a simple program that allows you to create accounts. The create account instruction emits a custom event say “AccountCreated” We also have a node server subscribing to those events ...
Eddie Spaghetti's user avatar
5 votes
1 answer
94 views

The Checks Effects Interactions (CEI) pattern is a best practice on the EVM that involves structuring the code in such a way that it makes it secure against reentrancy attacks. Is there an equivalent ...
Paul Razvan Berg's user avatar

15 30 50 per page
1
2 3 4 5
12