mirror of
https://github.com/d0zingcat/ore.git
synced 2026-06-01 07:36:50 +00:00
cleanup
This commit is contained in:
@@ -2,7 +2,7 @@ use meteora_pools_sdk::instructions::{SwapCpi, SwapCpiAccounts, SwapInstructionA
|
||||
use ore_api::prelude::*;
|
||||
use steel::*;
|
||||
|
||||
/// Swaps bets into ORE and buries the ORE.
|
||||
/// Swap wagers into ORE and bury the ORE.
|
||||
pub fn process_bury(accounts: &[AccountInfo<'_>], _data: &[u8]) -> ProgramResult {
|
||||
// Load accounts.
|
||||
let clock = Clock::get()?;
|
||||
@@ -61,19 +61,20 @@ pub fn process_bury(accounts: &[AccountInfo<'_>], _data: &[u8]) -> ProgramResult
|
||||
|
||||
// Burn (bury) the purchased ORE.
|
||||
let block_ore = block_ore_info.as_associated_token_account(block_info.key, &MINT_ADDRESS)?;
|
||||
let burn_amount = block_ore.amount();
|
||||
burn_signed_with_bump(
|
||||
block_ore_info,
|
||||
ore_mint_info,
|
||||
block_info,
|
||||
token_program_info,
|
||||
block_ore.amount(),
|
||||
burn_amount,
|
||||
&[BLOCK],
|
||||
block_bump,
|
||||
)?;
|
||||
|
||||
// Emit an event.
|
||||
BuryEvent {
|
||||
amount: block_ore.amount(),
|
||||
amount: burn_amount,
|
||||
ts: clock.unix_timestamp as u64,
|
||||
}
|
||||
.log();
|
||||
|
||||
Reference in New Issue
Block a user