mirror of
https://github.com/d0zingcat/ore.git
synced 2026-05-14 15:10:13 +00:00
ore_api prelude module
This commit is contained in:
@@ -6,6 +6,16 @@ pub mod loaders;
|
||||
pub mod sdk;
|
||||
pub mod state;
|
||||
|
||||
use solana_program::declare_id;
|
||||
pub mod prelude {
|
||||
pub use crate::consts::*;
|
||||
pub use crate::error::*;
|
||||
pub use crate::event::*;
|
||||
pub use crate::instruction::*;
|
||||
pub use crate::loaders::*;
|
||||
pub use crate::sdk::*;
|
||||
pub use crate::state::*;
|
||||
}
|
||||
|
||||
use steel::*;
|
||||
|
||||
declare_id!("oreV2ZymfyeXgNgBdqMkumTqqAprVqgBWQfoYkrtKWQ");
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use ore_api::{consts::*, error::OreError, instruction::*, loaders::*, state::Proof};
|
||||
use ore_api::prelude::*;
|
||||
use steel::*;
|
||||
|
||||
/// Claim distributes claimable ORE from the treasury to a miner.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use ore_api::state::Proof;
|
||||
use ore_api::prelude::*;
|
||||
use steel::*;
|
||||
|
||||
/// Close closes a proof account and returns the rent to the owner.
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
use ore_api::{
|
||||
consts::*,
|
||||
instruction::*,
|
||||
state::{Bus, Config, Treasury},
|
||||
};
|
||||
use ore_api::prelude::*;
|
||||
use solana_program::program_pack::Pack;
|
||||
use spl_token::state::Mint;
|
||||
use steel::*;
|
||||
|
||||
@@ -1,14 +1,7 @@
|
||||
use std::mem::size_of;
|
||||
|
||||
use drillx::Solution;
|
||||
use ore_api::{
|
||||
consts::*,
|
||||
error::OreError,
|
||||
event::MineEvent,
|
||||
instruction::Mine,
|
||||
loaders::OreAccountInfoValidation,
|
||||
state::{Bus, Config, Proof},
|
||||
};
|
||||
use ore_api::prelude::*;
|
||||
use solana_program::program::set_return_data;
|
||||
#[allow(deprecated)]
|
||||
use solana_program::{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use std::mem::size_of;
|
||||
|
||||
use ore_api::{consts::*, instruction::Open, state::Proof};
|
||||
use ore_api::prelude::*;
|
||||
use solana_program::{keccak::hashv, slot_hashes::SlotHash};
|
||||
use steel::*;
|
||||
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
use ore_api::{
|
||||
consts::*,
|
||||
error::OreError,
|
||||
loaders::*,
|
||||
state::{Bus, Config},
|
||||
};
|
||||
use ore_api::prelude::*;
|
||||
use steel::*;
|
||||
|
||||
/// Reset tops up the bus balances, updates the base reward rate, and sets up the ORE program for the next epoch.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use ore_api::{consts::*, instruction::Stake, loaders::*, state::Proof};
|
||||
use ore_api::prelude::*;
|
||||
use steel::*;
|
||||
|
||||
/// Stake deposits ORE into a proof account to earn multiplier.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use ore_api::state::Proof;
|
||||
use ore_api::prelude::*;
|
||||
use steel::*;
|
||||
|
||||
/// Update changes the miner authority on a proof account.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use ore_api::{consts::*, error::OreError, instruction::Stake, loaders::OreAccountInfoValidation};
|
||||
use ore_api::prelude::*;
|
||||
use steel::*;
|
||||
|
||||
/// Upgrade allows a user to migrate a v1 token to a v2 token at a 1:1 exchange rate.
|
||||
|
||||
Reference in New Issue
Block a user