lib.rs 640 B

123456789101112131415161718192021222324252627282930
  1. use anchor_lang::prelude::*;
  2. declare_id!("Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS");
  3. #[program]
  4. pub mod ignore_non_accounts {
  5. use super::*;
  6. pub fn initialize(ctx: Context<Initialize>) -> Result<()> {
  7. Ok(())
  8. }
  9. }
  10. #[derive(Accounts)]
  11. pub struct Initialize<'info> {
  12. /// CHECK:
  13. checked1: UncheckedAccount<'info>,
  14. /// CHECK:
  15. checked2: AccountInfo<'info>,
  16. }
  17. #[derive(Debug)]
  18. pub struct ShouldIgnore1<'info> {
  19. unchecked1: UncheckedAccount<'info>,
  20. unchecked2: AccountInfo<'info>,
  21. }
  22. pub struct ShouldIgnore2<'info> {
  23. unchecked1: UncheckedAccount<'info>,
  24. unchecked2: AccountInfo<'info>,
  25. }