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
cpi
The autogenerated cpi code always adds a lifetime parameter. For some
#[derive(Accounts)] pub struct Initialize {}
the macros generate
#[cfg(feature = "cpi")] pub mod cpi { use super::*; use std::marker::PhantomData; pub struct Return<T> { phantom: std::marker::PhantomData<T>, } impl<T: AnchorDeserialize> Return<T> { pub fn get(&self) -> T { let (_key, data) = anchor_lang::solana_program::program::get_return_data() .unwrap(); T::try_from_slice(&data).unwrap() } } pub fn initialize<'a, 'b, 'c, 'info>( ctx: anchor_lang::context::CpiContext< 'a, 'b, 'c, 'info, crate::cpi::accounts::Initialize<'info>, >, data: Vec<u8>, ) -> anchor_lang::Result<()> { // redacted
which does not compile due to the added lifetime parameter on crate::cpi::accounts::Initialize<'info>
crate::cpi::accounts::Initialize<'info>
The text was updated successfully, but these errors were encountered:
Duplicate of #1628
There is also a draft PR to solve it: #1659
Sorry, something went wrong.
No branches or pull requests
The autogenerated cpi code always adds a lifetime parameter. For some
the macros generate
which does not compile due to the added lifetime parameter on
crate::cpi::accounts::Initialize<'info>
The text was updated successfully, but these errors were encountered: