Skip to content

Instantly share code, notes, and snippets.

@arcticmatt
Created August 6, 2022 22:18
Show Gist options
  • Save arcticmatt/2845de6c59c319b475cd5733463f36fc to your computer and use it in GitHub Desktop.
Save arcticmatt/2845de6c59c319b475cd5733463f36fc to your computer and use it in GitHub Desktop.
// Old code
pub fn test_ix<'info>(
_ctx: Context<'_, '_, '_, 'info, TestIx<'info>>,
) -> Result<()> {
Ok(())
}
// New code
pub fn test_ix<'info>(
_ctx: Context<'_, '_, '_, 'info, TestIx<'info>>,
_test: Option<bool>,
) -> Result<()> {
Ok(())
}
// Error
// Error: AnchorError occurred. Error Code: InstructionDidNotDeserialize. Error Number: 102. Error Message: The program could not deserialize the given instruction.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment