From 4e3ecff458bb834edd2db7461753fc52b9abab0d Mon Sep 17 00:00:00 2001 From: Hardhat Chad Date: Tue, 14 Oct 2025 11:29:47 -0700 Subject: [PATCH] fix depoy --- cli/src/main.rs | 20 ++++++++++---------- program/src/deploy.rs | 4 ++-- program/src/wrap.rs | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/cli/src/main.rs b/cli/src/main.rs index 30742e2..1574b6f 100644 --- a/cli/src/main.rs +++ b/cli/src/main.rs @@ -157,16 +157,16 @@ async fn ata( rpc: &RpcClient, payer: &solana_sdk::signer::keypair::Keypair, ) -> Result<(), anyhow::Error> { - let user = pubkey!("BQbXD9tqv3ysrvojSZao2RoW9ucR4RmiKbKEaVWJp4J3"); + let user = pubkey!("Gmc26GMnhE3AWwdAQpxxsQPo6UYaob4wPRxUpmDsujoX"); let token = pubkey!("8H8rPiWW4iTFCfEkSnf7jpqeNpFfvdH9gLouAL3Fe2Zx"); let ata = get_associated_token_address(&user, &token); - // let ix = spl_associated_token_account::instruction::create_associated_token_account( - // &payer.pubkey(), - // &user, - // &token, - // &spl_token::ID, - // ); - // submit_transaction(rpc, payer, &[ix]).await?; + let ix = spl_associated_token_account::instruction::create_associated_token_account( + &payer.pubkey(), + &user, + &token, + &spl_token::ID, + ); + submit_transaction(rpc, payer, &[ix]).await?; let account = rpc.get_account(&ata).await?; println!("ATA: {}", ata); println!("Account: {:?}", account); @@ -224,8 +224,8 @@ async fn bury( let amount_u64 = ui_amount_to_amount(amount_f64, TOKEN_DECIMALS); let wrap_ix = ore_api::sdk::wrap(payer.pubkey()); let bury_ix = ore_api::sdk::bury(payer.pubkey(), amount_u64); - submit_transaction(rpc, payer, &[wrap_ix, bury_ix]).await?; - // simulate_transaction(rpc, payer, &[wrap_ix, bury_ix]).await; + // submit_transaction(rpc, payer, &[wrap_ix, bury_ix]).await?; + simulate_transaction(rpc, payer, &[wrap_ix, bury_ix]).await; Ok(()) } diff --git a/program/src/deploy.rs b/program/src/deploy.rs index d813b3b..00f52a2 100644 --- a/program/src/deploy.rs +++ b/program/src/deploy.rs @@ -94,8 +94,8 @@ pub fn process_deploy(accounts: &[AccountInfo<'_>], data: &[u8]) -> ProgramResul miner.cumulative = [0; 25]; miner.rewards_sol = 0; miner.rewards_ore = 0; - miner.round_id = round.id; - miner.checkpoint_id = round.id; + miner.round_id = 0; + miner.checkpoint_id = 0; miner.lifetime_rewards_sol = 0; miner.lifetime_rewards_ore = 0; miner diff --git a/program/src/wrap.rs b/program/src/wrap.rs index db36787..918f878 100644 --- a/program/src/wrap.rs +++ b/program/src/wrap.rs @@ -12,7 +12,7 @@ pub fn process_wrap(accounts: &[AccountInfo<'_>], _data: &[u8]) -> ProgramResult signer_info.is_signer()?; config_info .as_account::(&ore_api::ID)? - .assert(|c| c.admin == *signer_info.key)?; + .assert(|c| c.bury_authority == *signer_info.key)?; let treasury = treasury_info.as_account_mut::(&ore_api::ID)?; treasury_sol_info .is_writable()?