All Questions
Tagged with program anchor-lang
5 questions
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
3
answers
60
views
what is the name of the second parameter for `CpiContext`
For example, when calling the instruction to mint_to my wallet,
I initialize the cpi_context
let cpi_context = CpiContext::new(
ctx.accounts.token_program.to_account_info(),
...
1
vote
2
answers
567
views
Is there a way to overwrite data in an account?
I have a PDA account, and I am trying to change the data format in the account.
from this
#[account]
pub dummy_data {
x_point: f32
}
to
#[account]
pub dummy_data {
x_point: u64,
y_point: f64,
...
3
votes
1
answer
4k
views
Error Message: A seeds constraint was violated
Here is my code
#[program]
pub mod anchor_code {
use super::*;
pub fn new_wallet(ctx: Context<WalletInfo>) -> Result<()>{
Ok(())
}
}
#[derive(Accounts)]
pub struct ...
1
vote
1
answer
52
views
Enum in PDA does not update, ever
#[derive(AnchorSerialize, AnchorDeserialize, Clone, Copy, PartialEq, Eq, Debug)]
#[repr(u8)]
pub enum Stage {
Initiated, // user has paid
Processing,
Processed,
Finished,
}
#[derive(
...