mirror of
https://github.com/d0zingcat/ore.git
synced 2026-06-09 07:36:52 +00:00
cleanup
This commit is contained in:
14
Cargo.lock
generated
14
Cargo.lock
generated
@@ -1110,18 +1110,6 @@ dependencies = [
|
|||||||
"zeroize",
|
"zeroize",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "meteora-pools-sdk"
|
|
||||||
version = "0.1.1"
|
|
||||||
source = "git+https://github.com/regolith-labs/meteora-pools-sdk?branch=master#6f5a7eab4a460435591765a7d278f117a946b3bd"
|
|
||||||
dependencies = [
|
|
||||||
"borsh 0.10.4",
|
|
||||||
"num-derive 0.4.2",
|
|
||||||
"num-traits",
|
|
||||||
"solana-program",
|
|
||||||
"thiserror 2.0.12",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "mpl-token-metadata"
|
name = "mpl-token-metadata"
|
||||||
version = "5.1.0"
|
version = "5.1.0"
|
||||||
@@ -1282,7 +1270,6 @@ version = "3.7.0"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"bytemuck",
|
"bytemuck",
|
||||||
"const-crypto",
|
"const-crypto",
|
||||||
"meteora-pools-sdk",
|
|
||||||
"mpl-token-metadata",
|
"mpl-token-metadata",
|
||||||
"num_enum",
|
"num_enum",
|
||||||
"solana-program",
|
"solana-program",
|
||||||
@@ -1317,7 +1304,6 @@ name = "ore-program"
|
|||||||
version = "3.7.0"
|
version = "3.7.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bincode",
|
"bincode",
|
||||||
"meteora-pools-sdk",
|
|
||||||
"mpl-token-metadata",
|
"mpl-token-metadata",
|
||||||
"ore-api 3.7.0",
|
"ore-api 3.7.0",
|
||||||
"ore-boost-api",
|
"ore-boost-api",
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ bincode = "1.3.3"
|
|||||||
bytemuck = "1.14.3"
|
bytemuck = "1.14.3"
|
||||||
bytemuck_derive = "1.7.0"
|
bytemuck_derive = "1.7.0"
|
||||||
const-crypto = "0.1.0"
|
const-crypto = "0.1.0"
|
||||||
meteora-pools-sdk = "0.1"
|
|
||||||
mpl-token-metadata = "5.1"
|
mpl-token-metadata = "5.1"
|
||||||
num_enum = "0.7.2"
|
num_enum = "0.7.2"
|
||||||
ore-api = { path = "api" }
|
ore-api = { path = "api" }
|
||||||
@@ -36,7 +35,7 @@ thiserror = "1.0.57"
|
|||||||
tokio = { version = "1.37.0", features = ["full"] }
|
tokio = { version = "1.37.0", features = ["full"] }
|
||||||
|
|
||||||
[patch.crates-io]
|
[patch.crates-io]
|
||||||
meteora-pools-sdk = { git = "https://github.com/regolith-labs/meteora-pools-sdk", branch = "master" }
|
|
||||||
|
|
||||||
[profile.release]
|
[profile.release]
|
||||||
overflow-checks = true
|
overflow-checks = true
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ keywords.workspace = true
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
bytemuck.workspace = true
|
bytemuck.workspace = true
|
||||||
const-crypto.workspace = true
|
const-crypto.workspace = true
|
||||||
meteora-pools-sdk.workspace = true
|
|
||||||
mpl-token-metadata.workspace = true
|
mpl-token-metadata.workspace = true
|
||||||
num_enum.workspace = true
|
num_enum.workspace = true
|
||||||
solana-program.workspace = true
|
solana-program.workspace = true
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
use meteora_pools_sdk::instructions::Swap;
|
|
||||||
use spl_token::native_mint;
|
use spl_token::native_mint;
|
||||||
use steel::*;
|
use steel::*;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
consts::{MINT_ADDRESS, TREASURY_ADDRESS, TREASURY_TOKENS_ADDRESS},
|
consts::{MINT_ADDRESS, TREASURY_ADDRESS},
|
||||||
instruction::*,
|
instruction::*,
|
||||||
state::*,
|
state::*,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ default = []
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bincode.workspace = true
|
bincode.workspace = true
|
||||||
meteora-pools-sdk.workspace = true
|
|
||||||
mpl-token-metadata.workspace = true
|
mpl-token-metadata.workspace = true
|
||||||
ore-api.workspace = true
|
ore-api.workspace = true
|
||||||
ore-boost-api.workspace = true
|
ore-boost-api.workspace = true
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ pub fn process_close(accounts: &[AccountInfo<'_>], _data: &[u8]) -> ProgramResul
|
|||||||
mint_base_info,
|
mint_base_info,
|
||||||
market_info,
|
market_info,
|
||||||
token_program,
|
token_program,
|
||||||
market_hash.amount(),
|
vault_base.amount(),
|
||||||
&[MARKET, &market.id.to_le_bytes()],
|
&[MARKET, &market.id.to_le_bytes()],
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
|
|||||||
@@ -24,11 +24,11 @@ pub fn process_swap(accounts: &[AccountInfo<'_>], data: &[u8]) -> ProgramResult
|
|||||||
.as_account_mut::<Market>(&ore_api::ID)?
|
.as_account_mut::<Market>(&ore_api::ID)?
|
||||||
.assert_mut(|m| m.id == block.id)?
|
.assert_mut(|m| m.id == block.id)?
|
||||||
.assert_mut_err(
|
.assert_mut_err(
|
||||||
|m| m.base.reserves() > 0,
|
|m| m.base.liquidity() > 0,
|
||||||
OreError::InsufficientLiquidity.into(),
|
OreError::InsufficientLiquidity.into(),
|
||||||
)?
|
)?
|
||||||
.assert_mut_err(
|
.assert_mut_err(
|
||||||
|m| m.quote.reserves() > 0,
|
|m| m.quote.liquidity() > 0,
|
||||||
OreError::InsufficientLiquidity.into(),
|
OreError::InsufficientLiquidity.into(),
|
||||||
)?;
|
)?;
|
||||||
mint_base_info.has_address(&market.base.mint)?.as_mint()?;
|
mint_base_info.has_address(&market.base.mint)?.as_mint()?;
|
||||||
|
|||||||
Reference in New Issue
Block a user