tpl_token_interface/
lib.rs

1#![allow(clippy::arithmetic_side_effects)]
2#![deny(missing_docs)]
3#![cfg_attr(not(test), warn(unsafe_code))]
4
5//! An ERC20-like Token program for the Trezoa blockchain
6
7use {
8    trezoa_program_error::{ProgramError, ProgramResult},
9    trezoa_pubkey::Pubkey,
10};
11
12pub mod error;
13pub mod instruction;
14pub mod native_mint;
15pub mod state;
16
17trezoa_pubkey::declare_id!("4JkrrPuuQPxDZuBW1bgrM1GBa8oYg1LxcuX9szBPh3ic");
18
19/// Checks that the supplied program ID is the correct one for TPL Standard Library-token
20pub fn check_program_account(tpl_token_program_id: &Pubkey) -> ProgramResult {
21    if tpl_token_program_id != &id() {
22        return Err(ProgramError::IncorrectProgramId);
23    }
24    Ok(())
25}