mirror of
https://github.com/d0zingcat/ore.git
synced 2026-05-20 23:16:46 +00:00
use strict treasury_tokens loader
This commit is contained in:
@@ -24,22 +24,16 @@ pub fn process_claim<'a, 'info>(
|
||||
let amount = u64::from_le_bytes(args.amount);
|
||||
|
||||
// Load accounts
|
||||
let [signer, beneficiary_info, mint_info, proof_info, treasury_info, treasury_tokens_info, token_program] =
|
||||
let [signer, beneficiary_info, proof_info, treasury_info, treasury_tokens_info, token_program] =
|
||||
accounts
|
||||
else {
|
||||
return Err(ProgramError::NotEnoughAccountKeys);
|
||||
};
|
||||
load_signer(signer)?;
|
||||
load_token_account(beneficiary_info, None, &MINT_ADDRESS, true)?;
|
||||
load_mint(mint_info, MINT_ADDRESS, true)?;
|
||||
load_proof(proof_info, signer.key, true)?;
|
||||
load_treasury(treasury_info, false)?;
|
||||
load_token_account(
|
||||
treasury_tokens_info,
|
||||
Some(treasury_info.key),
|
||||
&MINT_ADDRESS,
|
||||
true,
|
||||
)?;
|
||||
load_treasury_tokens(treasury_tokens_info, true)?;
|
||||
load_program(token_program, spl_token::id())?;
|
||||
|
||||
// Update miner balance
|
||||
|
||||
Reference in New Issue
Block a user