lib.rs 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. // This file is autogenerated with https://github.com/acheroncrypto/native-to-anchor
  2. use anchor_lang::prelude::*;
  3. declare_id!("11111111111111111111111111111111");
  4. #[program]
  5. pub mod spl_stateless_asks {
  6. use super::*;
  7. pub fn accept_offer(
  8. ctx: Context<AcceptOffer>,
  9. has_metadata: bool,
  10. maker_size: u64,
  11. taker_size: u64,
  12. bump_seed: u8,
  13. ) -> Result<()> {
  14. Ok(())
  15. }
  16. }
  17. #[derive(Accounts)]
  18. pub struct AcceptOffer<'info> {
  19. maker_wallet: AccountInfo<'info>,
  20. taker_wallet: Signer<'info>,
  21. #[account(mut)]
  22. maker_src_account: AccountInfo<'info>,
  23. #[account(mut)]
  24. maker_dst_account: AccountInfo<'info>,
  25. #[account(mut)]
  26. taker_src_account: AccountInfo<'info>,
  27. #[account(mut)]
  28. taker_dst_account: AccountInfo<'info>,
  29. maker_mint: AccountInfo<'info>,
  30. taker_mint: AccountInfo<'info>,
  31. authority: AccountInfo<'info>,
  32. token_program: Program<'info, Token>,
  33. // optional_system_program: Program<'info, System>,
  34. }
  35. #[error_code]
  36. pub enum UtilError {
  37. #[msg("PublicKeyMismatch")]
  38. PublicKeyMismatch,
  39. #[msg("InvalidMintAuthority")]
  40. InvalidMintAuthority,
  41. #[msg("UninitializedAccount")]
  42. UninitializedAccount,
  43. #[msg("IncorrectOwner")]
  44. IncorrectOwner,
  45. #[msg("PublicKeysShouldBeUnique")]
  46. PublicKeysShouldBeUnique,
  47. #[msg("StatementFalse")]
  48. StatementFalse,
  49. #[msg("NotRentExempt")]
  50. NotRentExempt,
  51. #[msg("NumericalOverflow")]
  52. NumericalOverflow,
  53. }