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
Cargo.toml
[dependencies] anchor-lang = "0.25.0" switchboard-v2 = "0.1.16"
lib.rs
pub fn initialize(ctx: Context<GetResult>) -> Result<()> { let aggregator = &ctx.accounts.aggregator_feed; let val: u64 = AggregatorAccountData::new(aggregator)? .get_result()? .try_into()?; Ok(()) }
AggregatorAccountData::new(aggregator) throws an error saying
AggregatorAccountData::new(aggregator)
lifetime may not live long enough argument requires that `'1` must outlive `'2`
The text was updated successfully, but these errors were encountered:
Ok so since I see the program has been updated to use AccountLoad instead of AccountInfo i think the examples and docs should be updated
let aggregator = &ctx.accounts.aggregator_feed.load()?; let val:f64 = aggregator .get_result()? .try_into()?;
Happy to make the necessary changes across programs
Sorry, something went wrong.
No branches or pull requests
Cargo.toml
lib.rs
AggregatorAccountData::new(aggregator)
throws an error sayingThe text was updated successfully, but these errors were encountered: