error.rs 652 B

123456789101112131415161718192021
  1. use anchor_lang::error_code;
  2. #[error_code]
  3. pub enum FundraiserError {
  4. #[msg("The amount to raise has not been met")]
  5. TargetNotMet,
  6. #[msg("The amount to raise has been achieved")]
  7. TargetMet,
  8. #[msg("The contribution is too big")]
  9. ContributionTooBig,
  10. #[msg("The contribution is too small")]
  11. ContributionTooSmall,
  12. #[msg("The maximum amount to contribute has been reached")]
  13. MaximumContributionsReached,
  14. #[msg("The fundraiser has not ended yet")]
  15. FundraiserNotEnded,
  16. #[msg("The fundraiser has ended")]
  17. FundraiserEnded,
  18. #[msg("Invalid total amount. i should be bigger than 3")]
  19. InvalidAmount
  20. }