gemachain_runtime/
inline_spl_token_v2_0.rs

1// Partial SPL Token v2.0.x declarations inlined to avoid an external dependency on the spl-token crate
2gemachain_sdk::declare_id!("TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA");
3
4pub(crate) mod new_token_program {
5    gemachain_sdk::declare_id!("nTokHfnBtpt4V6xiEbBSduiGCrQ6wSF3rxC8WeWAQ9F");
6}
7
8/*
9    spl_token::state::Account {
10        mint: Pubkey,
11        owner: Pubkey,
12        amount: u64,
13        delegate: COption<Pubkey>,
14        state: AccountState,
15        is_native: COption<u64>,
16        delegated_amount: u64,
17        close_authority: COption<Pubkey>,
18    }
19*/
20pub const SPL_TOKEN_ACCOUNT_MINT_OFFSET: usize = 0;
21pub const SPL_TOKEN_ACCOUNT_OWNER_OFFSET: usize = 32;
22
23pub mod state {
24    const LEN: usize = 165;
25    pub struct Account;
26    impl Account {
27        pub fn get_packed_len() -> usize {
28            LEN
29        }
30    }
31}
32
33pub mod native_mint {
34    gemachain_sdk::declare_id!("So11111111111111111111111111111111111111112");
35
36    /*
37        Mint {
38            mint_authority: COption::None,
39            supply: 0,
40            decimals: 9,
41            is_initialized: true,
42            freeze_authority: COption::None,
43        }
44    */
45    pub const ACCOUNT_DATA: [u8; 82] = [
46        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
47        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
48        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
49    ];
50}