token: Add features for new program releases (#24742)
* token: Add features for new program releases * Add PR number
This commit is contained in:
parent
4e58b3870c
commit
b4503d4110
|
@ -6828,20 +6828,20 @@ impl Bank {
|
||||||
self.rent_collector.rent.burn_percent = 50; // 50% rent burn
|
self.rent_collector.rent.burn_percent = 50; // 50% rent burn
|
||||||
}
|
}
|
||||||
|
|
||||||
if new_feature_activations.contains(&feature_set::spl_token_v3_3_0_release::id()) {
|
if new_feature_activations.contains(&feature_set::spl_token_v3_4_0::id()) {
|
||||||
self.replace_program_account(
|
self.replace_program_account(
|
||||||
&inline_spl_token::id(),
|
&inline_spl_token::id(),
|
||||||
&inline_spl_token::new_token_program::id(),
|
&inline_spl_token::program_v3_4_0::id(),
|
||||||
"bank-apply_spl_token_v3_3_0_release",
|
"bank-apply_spl_token_v3_4_0",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if new_feature_activations.contains(&feature_set::spl_associated_token_account_v1_0_4::id())
|
if new_feature_activations.contains(&feature_set::spl_associated_token_account_v1_1_0::id())
|
||||||
{
|
{
|
||||||
self.replace_program_account(
|
self.replace_program_account(
|
||||||
&inline_spl_associated_token_account::id(),
|
&inline_spl_associated_token_account::id(),
|
||||||
&inline_spl_associated_token_account::program_v1_0_4::id(),
|
&inline_spl_associated_token_account::program_v1_1_0::id(),
|
||||||
"bank-apply_spl_associated_token_account_v1_4_0",
|
"bank-apply_spl_associated_token_account_v1_1_0",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Partial SPL Associated Token Account declarations inlined to avoid an external dependency on the spl-associated-token-account crate
|
// Partial SPL Associated Token Account declarations inlined to avoid an external dependency on the spl-associated-token-account crate
|
||||||
solana_sdk::declare_id!("ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL");
|
solana_sdk::declare_id!("ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL");
|
||||||
|
|
||||||
pub(crate) mod program_v1_0_4 {
|
pub(crate) mod program_v1_1_0 {
|
||||||
solana_sdk::declare_id!("nata4apBRD9S9256v3X8RxDQ7jmK7wLEsGNHhRNWFq3");
|
solana_sdk::declare_id!("NatA1Zyo48dJ7yuwR7cGURwhskKA8ywUyxb9GvG7mTC");
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,8 +3,8 @@ use solana_sdk::pubkey::{Pubkey, PUBKEY_BYTES};
|
||||||
|
|
||||||
solana_sdk::declare_id!("TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA");
|
solana_sdk::declare_id!("TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA");
|
||||||
|
|
||||||
pub(crate) mod new_token_program {
|
pub(crate) mod program_v3_4_0 {
|
||||||
solana_sdk::declare_id!("nTok2oJvx1CgbYA2SznfJLmnKLEL6sYdh2ypZms2nhm");
|
solana_sdk::declare_id!("NToK4t5AQzxPNpUA84DkxgfXaVDbDQQjpHKCqsbY46B");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -367,6 +367,14 @@ pub mod update_rewards_from_cached_accounts {
|
||||||
solana_sdk::declare_id!("28s7i3htzhahXQKqmS2ExzbEoUypg9krwvtK2M9UWXh9");
|
solana_sdk::declare_id!("28s7i3htzhahXQKqmS2ExzbEoUypg9krwvtK2M9UWXh9");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub mod spl_token_v3_4_0 {
|
||||||
|
solana_sdk::declare_id!("Ftok4njE8b7tDffYkC5bAbCaQv5sL6jispYrprzatUwN");
|
||||||
|
}
|
||||||
|
|
||||||
|
pub mod spl_associated_token_account_v1_1_0 {
|
||||||
|
solana_sdk::declare_id!("FaTa17gVKoqbh38HcfiQonPsAaQViyDCCSg71AubYZw8");
|
||||||
|
}
|
||||||
|
|
||||||
lazy_static! {
|
lazy_static! {
|
||||||
/// Map of feature identifiers to user-visible description
|
/// Map of feature identifiers to user-visible description
|
||||||
pub static ref FEATURE_NAMES: HashMap<Pubkey, &'static str> = [
|
pub static ref FEATURE_NAMES: HashMap<Pubkey, &'static str> = [
|
||||||
|
@ -453,6 +461,8 @@ lazy_static! {
|
||||||
(executables_incur_cpi_data_cost::id(), "Executables incure CPI data costs"),
|
(executables_incur_cpi_data_cost::id(), "Executables incure CPI data costs"),
|
||||||
(fix_recent_blockhashes::id(), "stop adding hashes for skipped slots to recent blockhashes"),
|
(fix_recent_blockhashes::id(), "stop adding hashes for skipped slots to recent blockhashes"),
|
||||||
(update_rewards_from_cached_accounts::id(), "update rewards from cached accounts"),
|
(update_rewards_from_cached_accounts::id(), "update rewards from cached accounts"),
|
||||||
|
(spl_token_v3_4_0::id(), "SPL Token Program version 3.4.0 release #24740"),
|
||||||
|
(spl_associated_token_account_v1_1_0::id(), "SPL Associated Token Account Program version 1.1.0 release #24741"),
|
||||||
/*************** ADD NEW FEATURES HERE ***************/
|
/*************** ADD NEW FEATURES HERE ***************/
|
||||||
]
|
]
|
||||||
.iter()
|
.iter()
|
||||||
|
|
Loading…
Reference in New Issue