From ca29981e9e2b317bcd157fe7e2a8fe66d87d8864 Mon Sep 17 00:00:00 2001 From: hana <81144685+2501babe@users.noreply.github.com> Date: Mon, 14 Apr 2025 10:34:04 -0700 Subject: [PATCH] generic-token: make consts used in rpc pub --- generic-token/src/token.rs | 4 ++-- generic-token/src/token_2022.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/generic-token/src/token.rs b/generic-token/src/token.rs index 5089d55f..d6c5afea 100644 --- a/generic-token/src/token.rs +++ b/generic-token/src/token.rs @@ -19,8 +19,8 @@ solana_pubkey::declare_id!("TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"); close_authority: COption, } */ -const SPL_TOKEN_ACCOUNT_MINT_OFFSET: usize = 0; -const SPL_TOKEN_ACCOUNT_OWNER_OFFSET: usize = 32; +pub const SPL_TOKEN_ACCOUNT_MINT_OFFSET: usize = 0; +pub const SPL_TOKEN_ACCOUNT_OWNER_OFFSET: usize = 32; const SPL_TOKEN_ACCOUNT_AMOUNT_OFFSET: usize = 64; const SPL_TOKEN_ACCOUNT_STATE_OFFSET: usize = 108; pub(crate) const SPL_TOKEN_ACCOUNT_LENGTH: usize = 165; diff --git a/generic-token/src/token_2022.rs b/generic-token/src/token_2022.rs index d4d1b8ff..3005fb10 100644 --- a/generic-token/src/token_2022.rs +++ b/generic-token/src/token_2022.rs @@ -8,7 +8,7 @@ use crate::token::{ solana_pubkey::declare_id!("TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"); // `spl_token_program_2022::extension::AccountType::Account` ordinal value -const ACCOUNTTYPE_ACCOUNT: u8 = 2; +pub const ACCOUNTTYPE_ACCOUNT: u8 = 2; // Token2022 enforces that TLV data cannot make a Mint or Account that is precisely // the length of a Multisig, to allow them to be distinguished.