diff --git a/api/src/consts.rs b/api/src/consts.rs index 5973d52..4341a97 100644 --- a/api/src/consts.rs +++ b/api/src/consts.rs @@ -58,6 +58,9 @@ pub const MINT_ADDRESS: Pubkey = pubkey!("ESovLnpNMatjLDcStPtuZvidiufBdoyoEGr76o pub const TREASURY_ADDRESS: Pubkey = Pubkey::new_from_array(ed25519::derive_program_address(&[TREASURY], &PROGRAM_ID).0); +/// The address of the treasury account. +pub const TREASURY_BUMP: u8 = ed25519::derive_program_address(&[TREASURY], &PROGRAM_ID).1; + /// Denominator for protocol fee calculations. pub const FEE_RATE_BPS: u64 = 100; diff --git a/program/src/mine.rs b/program/src/mine.rs index dff6d7d..d518a08 100644 --- a/program/src/mine.rs +++ b/program/src/mine.rs @@ -131,13 +131,14 @@ pub fn process_mine(accounts: &[AccountInfo<'_>], data: &[u8]) -> ProgramResult miner.total_rewards += reward_amount; // Mint to recipient. - mint_to_signed( + mint_to_signed_with_bump( mint_ore_info, recipient_info, treasury_info, token_program, reward_amount, &[TREASURY], + TREASURY_BUMP, )?; // Emit event.