log load treasury tokens

This commit is contained in:
alex
2024-07-10 10:06:09 -07:00
parent be147d17de
commit 26303d25e6
3 changed files with 9 additions and 1 deletions

View File

@@ -10,4 +10,4 @@ pub(crate) use ore_utils as utils;
use solana_program::declare_id;
// declare_id!("mineRHF5r6S7HyD9SppBfVMXMavDkJsxwGesEvxZr2A");
declare_id!("EcZSwrCoS7bgstnUMdELZGno2riZ6mhW8hvRbq6vUCNm");
declare_id!("2LL8td7HYkNk2TMEREpkAgGk7dUxp1QmDaoypDRHkuj5");

View File

@@ -271,9 +271,15 @@ pub fn load_treasury_tokens<'a, 'info>(
info: &'a AccountInfo<'info>,
is_writable: bool,
) -> Result<(), ProgramError> {
sol_log(&format!("key: {}", info.key.to_string()));
sol_log(&format!(
"treasury tokens address: {}",
TREASURY_TOKENS_ADDRESS.to_string()
));
if info.key.ne(&TREASURY_TOKENS_ADDRESS) {
return Err(ProgramError::InvalidSeeds);
}
sol_log("validated");
load_token_account(info, Some(&TREASURY_ADDRESS), &MINT_ADDRESS, is_writable)
}

View File

@@ -113,6 +113,8 @@ pub fn process_reset<'a, 'info>(
return Err(OreError::MaxSupply.into());
}
sol_log("funding treasury token account");
// Fund treasury token account
let amount = MAX_SUPPLY
.saturating_sub(mint.supply)