v1.0: incinerator backport (#9837)
This commit is contained in:
@@ -21,8 +21,12 @@ impl Parse for Id {
|
||||
let id_vec = bs58::decode(id_literal.value())
|
||||
.into_vec()
|
||||
.map_err(|_| syn::Error::new_spanned(&id_literal, "failed to decode base58 id"))?;
|
||||
let id_array = <[u8; 32]>::try_from(<&[u8]>::clone(&&id_vec[..]))
|
||||
.map_err(|_| syn::Error::new_spanned(&id_literal, "id is not 32 bytes long"))?;
|
||||
let id_array = <[u8; 32]>::try_from(<&[u8]>::clone(&&id_vec[..])).map_err(|_| {
|
||||
syn::Error::new_spanned(
|
||||
&id_literal,
|
||||
format!("id is not 32 bytes long: len={}", id_vec.len()),
|
||||
)
|
||||
})?;
|
||||
let bytes = id_array.iter().map(|b| LitByte::new(*b, Span::call_site()));
|
||||
quote! {
|
||||
::solana_sdk::pubkey::Pubkey::new_from_array(
|
||||
|
6
sdk/src/incinerator.rs
Normal file
6
sdk/src/incinerator.rs
Normal file
@@ -0,0 +1,6 @@
|
||||
//! Lamports credited to this address will be removed from the total supply (burned) at the end of
|
||||
//! the current block.
|
||||
|
||||
crate::declare_id!("1nc1nerator11111111111111111111111111111111");
|
||||
|
||||
pub const ACTIVATION_EPOCH: u64 = 30; // Incinerator activates on mainnet-beta at this epoch
|
@@ -10,6 +10,7 @@ pub mod entrypoint_native;
|
||||
pub mod epoch_schedule;
|
||||
pub mod fee_calculator;
|
||||
pub mod hash;
|
||||
pub mod incinerator;
|
||||
pub mod inflation;
|
||||
pub mod instruction;
|
||||
pub mod loader_instruction;
|
||||
|
Reference in New Issue
Block a user