From b996adcac3da4a802bd1da0d063cc63a9454bed7 Mon Sep 17 00:00:00 2001 From: Hardhat Chad Date: Mon, 26 May 2025 14:16:19 -0700 Subject: [PATCH] paid --- api/src/state/block.rs | 2 +- program/src/bet.rs | 2 +- program/src/initialize.rs | 2 +- program/src/payout.rs | 4 ++-- program/src/reset.rs | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/api/src/state/block.rs b/api/src/state/block.rs index efb89fd..eb69691 100644 --- a/api/src/state/block.rs +++ b/api/src/state/block.rs @@ -21,7 +21,7 @@ pub struct Block { pub noise: [u8; 32], /// Whether or not the current round has paid out. - pub payed_out: u64, + pub paid: u64, /// The amount of ORE to distribute to the winner. pub reward: u64, diff --git a/program/src/bet.rs b/program/src/bet.rs index ec92f35..a6ede61 100644 --- a/program/src/bet.rs +++ b/program/src/bet.rs @@ -20,7 +20,7 @@ pub fn process_bet(accounts: &[AccountInfo<'_>], data: &[u8]) -> ProgramResult { let block = block_info .as_account_mut::(&ore_api::ID)? .assert_mut(|b| b.ends_at > clock.slot)? - .assert_mut(|b| b.payed_out == 0)?; + .assert_mut(|b| b.paid == 0)?; block_bets_info .is_writable()? .as_associated_token_account(block_info.key, &block.mint)?; diff --git a/program/src/initialize.rs b/program/src/initialize.rs index 2e4922d..89ee7f0 100644 --- a/program/src/initialize.rs +++ b/program/src/initialize.rs @@ -36,7 +36,7 @@ pub fn process_initialize(accounts: &[AccountInfo<'_>], _data: &[u8]) -> Program block.ends_at = 0; block.mint = spl_token::native_mint::ID; block.noise = [0; 32]; - block.payed_out = 0; + block.paid = 0; block.reward = 0; block.started_at = 0; block.total_wagers = 0; diff --git a/program/src/payout.rs b/program/src/payout.rs index cd94666..d49b3b7 100644 --- a/program/src/payout.rs +++ b/program/src/payout.rs @@ -16,7 +16,7 @@ pub fn process_payout(accounts: &[AccountInfo<'_>], _data: &[u8]) -> ProgramResu let block = block_info .as_account_mut::(&ore_api::ID)? .assert_mut(|b| b.ends_at <= clock.slot)? - .assert_mut(|b| b.payed_out == 0)?; + .assert_mut(|b| b.paid == 0)?; treasury_info.has_address(&TREASURY_ADDRESS)?; treasury_tokens_info .has_address(&TREASURY_TOKENS_ADDRESS)? @@ -26,7 +26,7 @@ pub fn process_payout(accounts: &[AccountInfo<'_>], _data: &[u8]) -> ProgramResu slot_hashes_sysvar.is_sysvar(&sysvar::slot_hashes::ID)?; // Mark the block as paid out. - block.payed_out = 1; + block.paid = 1; // Skip payout if no bets were placed. if block.cumulative_sum == 0 || block.reward == 0 { diff --git a/program/src/reset.rs b/program/src/reset.rs index b224644..b0bf473 100644 --- a/program/src/reset.rs +++ b/program/src/reset.rs @@ -16,7 +16,7 @@ pub fn process_reset(accounts: &[AccountInfo<'_>], _data: &[u8]) -> ProgramResul let block = block_info .as_account_mut::(&ore_api::ID)? .assert_mut(|b| b.ends_at <= clock.slot)? - .assert_mut(|b| b.payed_out != 0)?; + .assert_mut(|b| b.paid != 0)?; let mint = mint_info .has_address(&MINT_ADDRESS)? .is_writable()? @@ -46,7 +46,7 @@ pub fn process_reset(accounts: &[AccountInfo<'_>], _data: &[u8]) -> ProgramResul block.current_round += 1; block.ends_at = clock.slot + 150; // 60 seconds block.noise = [0; 32]; - block.payed_out = 0; + block.paid = 0; block.reward = net_emissions - boost_reward; block.started_at = clock.slot; block.total_wagers = 0;