context.rs 710 B

1234567891011121314151617181920212223242526
  1. use crate::account::*;
  2. use anchor_lang::prelude::*;
  3. use anchor_spl::token::Token;
  4. #[derive(Accounts)]
  5. pub struct TestInit<'info> {
  6. #[account(init, payer = payer, space = Data::INIT_SPACE + 8)]
  7. pub data: Account<'info, Data>,
  8. #[account(mut)]
  9. pub payer: Signer<'info>,
  10. pub system_program: Program<'info, System>,
  11. }
  12. #[derive(Accounts)]
  13. pub struct TestInitAnother<'info> {
  14. #[account(init, payer = payer, space = Data::INIT_SPACE + 8)]
  15. pub another: Account<'info, Another>,
  16. #[account(mut)]
  17. pub payer: Signer<'info>,
  18. pub system_program: Program<'info, System>,
  19. }
  20. #[derive(Accounts)]
  21. pub struct TestRemainingAccounts<'info> {
  22. pub token_program: Program<'info, Token>,
  23. }