mirror of
https://github.com/d0zingcat/ore.git
synced 2026-05-13 23:16:52 +00:00
fix utils import
This commit is contained in:
6
Cargo.lock
generated
6
Cargo.lock
generated
@@ -1286,7 +1286,7 @@ checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381"
|
||||
|
||||
[[package]]
|
||||
name = "ore-api"
|
||||
version = "2.1.2"
|
||||
version = "2.1.3"
|
||||
dependencies = [
|
||||
"array-const-fn-init",
|
||||
"bytemuck",
|
||||
@@ -1304,7 +1304,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "ore-program"
|
||||
version = "2.1.2"
|
||||
version = "2.1.3"
|
||||
dependencies = [
|
||||
"drillx",
|
||||
"mpl-token-metadata",
|
||||
@@ -1318,7 +1318,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "ore-utils"
|
||||
version = "2.1.2"
|
||||
version = "2.1.3"
|
||||
dependencies = [
|
||||
"bytemuck",
|
||||
"solana-program",
|
||||
|
||||
@@ -3,7 +3,7 @@ resolver = "2"
|
||||
members = ["api", "program", "utils"]
|
||||
|
||||
[workspace.package]
|
||||
version = "2.1.2"
|
||||
version = "2.1.3"
|
||||
edition = "2021"
|
||||
license = "Apache-2.0"
|
||||
homepage = "https://ore.supply"
|
||||
@@ -19,8 +19,8 @@ const-crypto = "0.1.0"
|
||||
drillx = { version = "2.0.0", features = ["solana"] }
|
||||
mpl-token-metadata = "4.1.2"
|
||||
num_enum = "0.7.2"
|
||||
ore-api = { path = "api", version = "2.1.0" }
|
||||
ore-utils = { path = "utils", features = ["spl"], version = "2.1.0" }
|
||||
ore-api = { path = "api", version = "2.1.3" }
|
||||
ore-utils = { path = "utils", features = ["spl"], version = "2.1.3" }
|
||||
solana-program = "^1.18"
|
||||
spl-token = { version = "^4", features = ["no-entrypoint"] }
|
||||
spl-associated-token-account = { version = "^2.3", features = [ "no-entrypoint" ] }
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
use bytemuck::{Pod, Zeroable};
|
||||
|
||||
use crate::utils::impl_to_bytes;
|
||||
use ore_utils::impl_to_bytes;
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Pod, Zeroable)]
|
||||
|
||||
@@ -1,16 +1,14 @@
|
||||
use bytemuck::{Pod, Zeroable};
|
||||
use drillx::Solution;
|
||||
use num_enum::TryFromPrimitive;
|
||||
use ore_utils::{impl_instruction_from_bytes, impl_to_bytes};
|
||||
use solana_program::{
|
||||
instruction::{AccountMeta, Instruction},
|
||||
pubkey::Pubkey,
|
||||
system_program, sysvar,
|
||||
};
|
||||
|
||||
use crate::{
|
||||
consts::*,
|
||||
utils::{impl_instruction_from_bytes, impl_to_bytes},
|
||||
};
|
||||
use crate::consts::*;
|
||||
|
||||
#[repr(u8)]
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq, TryFromPrimitive)]
|
||||
|
||||
@@ -5,8 +5,6 @@ pub mod instruction;
|
||||
pub mod loaders;
|
||||
pub mod state;
|
||||
|
||||
pub(crate) use ore_utils as utils;
|
||||
|
||||
use solana_program::declare_id;
|
||||
|
||||
declare_id!("oreV2ZymfyeXgNgBdqMkumTqqAprVqgBWQfoYkrtKWQ");
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
use ore_utils::{loaders::*, AccountDeserialize, Discriminator};
|
||||
use solana_program::{account_info::AccountInfo, program_error::ProgramError, pubkey::Pubkey};
|
||||
|
||||
use crate::{
|
||||
consts::*,
|
||||
state::{Bus, Config, Proof, Treasury},
|
||||
utils::{loaders::*, AccountDeserialize, Discriminator},
|
||||
};
|
||||
|
||||
/// Errors if:
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
use bytemuck::{Pod, Zeroable};
|
||||
|
||||
use crate::utils::{impl_account_from_bytes, impl_to_bytes, Discriminator};
|
||||
use ore_utils::{impl_account_from_bytes, impl_to_bytes, Discriminator};
|
||||
|
||||
use super::AccountDiscriminator;
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
use bytemuck::{Pod, Zeroable};
|
||||
|
||||
use crate::utils::{impl_account_from_bytes, impl_to_bytes, Discriminator};
|
||||
use ore_utils::{impl_account_from_bytes, impl_to_bytes, Discriminator};
|
||||
|
||||
use super::AccountDiscriminator;
|
||||
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
use bytemuck::{Pod, Zeroable};
|
||||
use ore_utils::{impl_account_from_bytes, impl_to_bytes, Discriminator};
|
||||
use solana_program::pubkey::Pubkey;
|
||||
|
||||
use crate::utils::{impl_account_from_bytes, impl_to_bytes, Discriminator};
|
||||
|
||||
use super::AccountDiscriminator;
|
||||
|
||||
/// Proof accounts track a miner's current hash, claimable rewards, and lifetime stats.
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
use bytemuck::{Pod, Zeroable};
|
||||
|
||||
use crate::utils::{impl_account_from_bytes, impl_to_bytes, Discriminator};
|
||||
use ore_utils::{impl_account_from_bytes, impl_to_bytes, Discriminator};
|
||||
|
||||
use super::AccountDiscriminator;
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ macro_rules! impl_to_bytes {
|
||||
#[macro_export]
|
||||
macro_rules! impl_account_from_bytes {
|
||||
($struct_name:ident) => {
|
||||
impl crate::utils::AccountDeserialize for $struct_name {
|
||||
impl $crate::AccountDeserialize for $struct_name {
|
||||
fn try_from_bytes(
|
||||
data: &[u8],
|
||||
) -> Result<&Self, solana_program::program_error::ProgramError> {
|
||||
|
||||
Reference in New Issue
Block a user