Quantcast
Channel: Multiple instruction constraints anchor - Solana Stack Exchange
Browsing latest articles
Browse All 2 View Live

Answer by Ahri for Multiple instruction constraints anchor

Turns out I'm just an idiot :)The way to do this is simply writing all the instruction vars inside the constraint:#[derive(Accounts)]#[instruction(my_param: u32, my_second_param: u32)]pub struct...

View Article


Multiple instruction constraints anchor

If I want to use instruction data in my account constraints, I can do it like so:#[derive(Accounts)]#[instruction(my_param: u32)]pub struct MyAccounts<'info> { #[account( seeds =...

View Article
Browsing latest articles
Browse All 2 View Live