// Using sysvar without validating its address let rent = ctx.accounts.rent;
// Validate the sysvar address explicitly if ctx.accounts.rent.key() != sysvar::rent::ID { return Err(ProgramError::InvalidArgument); }
Last updated 3 months ago
Was this helpful?