This commit is contained in:
Hardhat Chad
2024-05-02 15:03:56 +00:00
parent 813006cc99
commit dc84a347e7
8 changed files with 47 additions and 7 deletions

View File

@@ -8,14 +8,14 @@ use crate::{
MINT_ADDRESS, TREASURY, TREASURY_BUMP,
};
/// Claim distributes owed token rewards from the treasury to the miner. Its responsibilies include:
/// 1. Decrement the miner's claimable rewards counter.
/// Claim distributes Ore from the treasury to a miner. Its responsibilies include:
/// 1. Decrement the miner's claimable balance.
/// 2. Transfer tokens from the treasury to the miner.
///
/// Safety requirements:
/// - Claim is a permissionless instruction and can be called by any miner.
/// - Claim is a permissionless instruction and can be called by any user.
/// - Can only succeed if the claimed amount is less than or equal to the miner's claimable rewards.
/// - The provided beneficiary token account, treasury, treasury token account, and token program must be valid.
/// - The provided beneficiary, token account, treasury, treasury token account, and token program must be valid.
pub fn process_claim<'a, 'info>(
_program_id: &Pubkey,
accounts: &'a [AccountInfo<'info>],