mirror of
https://github.com/d0zingcat/ore.git
synced 2026-05-13 15:09:57 +00:00
test
This commit is contained in:
@@ -257,8 +257,8 @@ async fn bury(
|
|||||||
let amount_u64 = ui_amount_to_amount(amount_f64, TOKEN_DECIMALS);
|
let amount_u64 = ui_amount_to_amount(amount_f64, TOKEN_DECIMALS);
|
||||||
let wrap_ix = ore_api::sdk::wrap(payer.pubkey());
|
let wrap_ix = ore_api::sdk::wrap(payer.pubkey());
|
||||||
let bury_ix = ore_api::sdk::bury(payer.pubkey(), amount_u64);
|
let bury_ix = ore_api::sdk::bury(payer.pubkey(), amount_u64);
|
||||||
submit_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;
|
simulate_transaction(rpc, payer, &[wrap_ix, bury_ix]).await;
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ pub fn process_bury(accounts: &[AccountInfo<'_>], data: &[u8]) -> ProgramResult
|
|||||||
// Share some ORE with stakers.
|
// Share some ORE with stakers.
|
||||||
let mut shared_amount = 0;
|
let mut shared_amount = 0;
|
||||||
if treasury.total_staked > 0 {
|
if treasury.total_staked > 0 {
|
||||||
shared_amount = 0; // TODO: calculate shared amount
|
shared_amount = ONE_ORE / 10_000; // TODO: calculate shared amount
|
||||||
treasury.rewards_factor += Numeric::from_fraction(shared_amount, treasury.total_staked);
|
treasury.rewards_factor += Numeric::from_fraction(shared_amount, treasury.total_staked);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
use solana_program::pubkey;
|
use solana_program::pubkey;
|
||||||
use steel::*;
|
use steel::*;
|
||||||
|
|
||||||
pub const AUTHORIZED_ACCOUNTS: [Pubkey; 3] = [
|
pub const AUTHORIZED_ACCOUNTS: [Pubkey; 4] = [
|
||||||
pubkey!("pqspJ298ryBjazPAr95J9sULCVpZe3HbZTWkbC1zrkS"),
|
pubkey!("pqspJ298ryBjazPAr95J9sULCVpZe3HbZTWkbC1zrkS"),
|
||||||
pubkey!("By5JFFueXCqeqLk5MzR8ZSwFxASz3SKWX2TVfT1LTFbX"),
|
pubkey!("By5JFFueXCqeqLk5MzR8ZSwFxASz3SKWX2TVfT1LTFbX"),
|
||||||
pubkey!("5Nb2ibzu4bWrwis2vNVD4mJprt6KTchzW6wgbVWM2PkY"),
|
pubkey!("5Nb2ibzu4bWrwis2vNVD4mJprt6KTchzW6wgbVWM2PkY"),
|
||||||
|
pubkey!("6tUUXB6LuTE1Pzpe6sP4mZL9CNA5XQYGWYbn1oqPpKeH"),
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user