mint.rs 815 B

123456789101112131415161718192021222324252627
  1. use bytemuck::{Pod, Zeroable};
  2. use pinocchio::pubkey::Pubkey;
  3. use super::{PodBool, PodCOption};
  4. /// Mint data.
  5. #[repr(C)]
  6. #[derive(Clone, Copy, Default, Pod, Zeroable)]
  7. pub struct Mint {
  8. /// Optional authority used to mint new tokens. The mint authority may only
  9. /// be provided during mint creation. If no mint authority is present
  10. /// then the mint has a fixed supply and no further tokens may be
  11. /// minted.
  12. pub mint_authority: PodCOption<Pubkey>,
  13. /// Total supply of tokens.
  14. pub supply: [u8; 8],
  15. /// Number of base 10 digits to the right of the decimal place.
  16. pub decimals: u8,
  17. /// Is `true` if this structure has been initialized
  18. pub is_initialized: PodBool,
  19. /// Optional authority to freeze token accounts.
  20. pub freeze_authority: PodCOption<Pubkey>,
  21. }