native_mint.rs 373 B

1234567891011121314
  1. //! The Mint that represents the native token.
  2. use pinocchio::pubkey::Pubkey;
  3. /// There are `10^9` lamports in one SOL
  4. pub const DECIMALS: u8 = 9;
  5. // The Mint for native SOL Token accounts
  6. pub const ID: Pubkey = pinocchio_pubkey::pubkey!("So11111111111111111111111111111111111111112");
  7. #[inline(always)]
  8. pub fn is_native_mint(mint: &Pubkey) -> bool {
  9. mint == &ID
  10. }