1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#![deny(missing_docs)]
#![forbid(unsafe_code)]
pub mod error;
pub mod instruction;
pub mod native_mint;
pub mod processor;
pub mod state;
#[cfg(not(feature = "no-entrypoint"))]
mod entrypoint;
pub use solana_program;
pub fn ui_amount_to_amount(ui_amount: f64, decimals: u8) -> u64 {
(ui_amount * 10_usize.pow(decimals as u32) as f64) as u64
}
pub fn amount_to_ui_amount(amount: u64, decimals: u8) -> f64 {
amount as f64 / 10_usize.pow(decimals as u32) as f64
}
solana_program::declare_id!("TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA");