Skip to content

Instantly share code, notes, and snippets.

@arcticmatt
Created August 6, 2022 22:22
Show Gist options
  • Save arcticmatt/d5b77fdaa512d1b175382b5a98301d2e to your computer and use it in GitHub Desktop.
Save arcticmatt/d5b77fdaa512d1b175382b5a98301d2e to your computer and use it in GitHub Desktop.
// Old code
pub fn test_ix<'info>(
ctx: Context<'_, '_, '_, 'info, TestIx<'info>>,
test1: u8,
test2: u16,
test3: u32,
) -> Result<()> {
msg!("test1 {}", test1);
msg!("test2 {}", test2);
msg!("test3 {}", test3);
Ok(())
}
// Old output
// 'Program log: test1 1',
// 'Program log: test2 2',
// 'Program log: test3 3',
// New code
pub fn test_ix<'info>(
ctx: Context<'_, '_, '_, 'info, TestIx<'info>>,
test1: u8,
test3: u32,
) -> Result<()> {
msg!("test1 {}", test1);
msg!("test3 {}", test3);
Ok(())
}
// New output (using the same client code)
// 'Program log: test1 1',
// 'Program log: test3 196610',
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment