We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When defining a program module and instructions as follows
#[light_program] #[program] pub mod zktest { use super::*; pub fn compress01<'info>( ctx: LightContext<'_, '_, '_, 'info, Compress01<'info>>, ) -> Result<()> { ctx.light_accounts.compressed_user_record.user_authority = ctx.accounts.signer.key(); Ok(()) } // It doesn't work pub fn compress02<'info>( ctx: LightContext<'_, '_, '_, 'info, Compress02<'info>>, ) -> Result<()> { instructions::compress02(&mut ctx) } }
the function body of compress02 is expanded like this:
compress02
let mut ctx: ::light_sdk::context::LightContext<Compress02, LightCompress02> = ::light_sdk::context::LightContext::new( ctx, inputs, merkle_context, merkle_tree_root_index, address_merkle_context, address_merkle_tree_root_index, )?; let inputs = ParamsCompress02 {}; ctx.check_constraints(&inputs)?; ctx.derive_address_seeds(address_merkle_context, &inputs); let ParamsCompress02 {} = inputs; ctx.verify(proof)?; instructions::compress02(&mut ctx)
and changes made to ctx in the instructions::compress02 function are not being reflected.
ctx
instructions::compress02
Current workaround is to assign the result into a temporary variable and return it.
pub fn compress02<'info>( ctx: LightContext<'_, '_, '_, 'info, Compress02<'info>>, ) -> Result<()> { let retval = instructions::compress02(&mut ctx); retval }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When defining a program module and instructions as follows
the function body of
compress02
is expanded like this:and changes made to
ctx
in theinstructions::compress02
function are not being reflected.Current workaround is to assign the result into a temporary variable and return it.
The text was updated successfully, but these errors were encountered: