Skip to content

Commit eec9b83

Browse files
committed
reduced bin size
1 parent 77493d0 commit eec9b83

31 files changed

Lines changed: 248 additions & 415 deletions

Cargo.lock

Lines changed: 141 additions & 283 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 16 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,6 @@
22
members = [".", "crates/*", "examples"]
33
resolver = "2"
44

5-
[package]
6-
name = "angstrom-v4"
7-
version.workspace = true
8-
edition.workspace = true
9-
10-
[dependencies]
11-
uni-v4-common = { path = "crates/uni-v4-common" }
12-
uni-v4-structure = { path = "crates/uni-v4-structure" }
13-
uni-v4-upkeeper = { path = "crates/uni-v4-upkeeper" }
14-
15-
# Re-export all the dependencies that downstream users might need
16-
alloy.workspace = true
17-
alloy-primitives.workspace = true
18-
jsonrpsee.workspace = true
19-
eyre.workspace = true
20-
futures.workspace = true
21-
tokio.workspace = true
22-
tracing.workspace = true
23-
tracing-subscriber.workspace = true
24-
25-
[features]
26-
default = []
27-
integration = []
28-
295
[workspace.package]
306
version = "0.1.0"
317
edition = "2024"
@@ -39,22 +15,27 @@ uni-v4-structure = { path = "crates/uni-v4-structure" }
3915
uni-v4-upkeeper = { path = "crates/uni-v4-upkeeper" }
4016

4117
# External dependencies
42-
alloy = { version = "1.0.41", features = [
43-
"rlp",
44-
"full",
45-
"node-bindings",
46-
"rpc-types-debug",
47-
"rpc-types-trace",
48-
"json-rpc",
49-
"rpc-client",
50-
"sol-types",
51-
"contract",
18+
alloy-contract = { version = "1.0.41", default-features = false }
19+
alloy-consensus = { version = "1.0.41", default-features = false }
20+
alloy-eips = { version = "1.0.41", default-features = false }
21+
alloy-network = { version = "1.0.41", default-features = false }
22+
alloy-provider = { version = "1.0.41", default-features = false, features = [
23+
"reqwest",
24+
"ws",
25+
"rpc-api",
26+
"anvil-node",
27+
] }
28+
alloy-rpc-types = { version = "1.0.41", default-features = false, features = [
29+
"eth",
30+
] }
31+
alloy-sol-types = { version = "1.4.1", default-features = false, features = [
32+
"json",
5233
] }
5334
alloy-primitives = { version = "1.4.1", default-features = false, features = [
5435
"map-foldhash",
5536
"rand",
5637
] }
57-
jsonrpsee = { version = "0.26.0", features = ["ws-client", "macros"] }
38+
jsonrpsee = { version = "0.26.0", features = ["ws-client", "macros", "client"] }
5839
arraydeque = "0"
5940
async-trait = "0.1"
6041
auto_impl = "1"

crates/uni-v4-common/Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,14 @@ repository.workspace = true
77

88
[dependencies]
99
# External dependencies
10-
alloy.workspace = true
10+
alloy-contract.workspace = true
1111
alloy-primitives.workspace = true
12+
alloy-sol-types.workspace = true
1213
dashmap.workspace = true
1314
eyre.workspace = true
1415
serde.workspace = true
1516
thiserror.workspace = true
1617
tokio.workspace = true
1718
tracing.workspace = true
1819
uni-v4-structure.workspace = true
19-
uniswap_v3_math.workspace = true
20+
uniswap_v3_math.workspace = true

crates/uni-v4-common/src/pool_key.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
use alloy::sol_types::SolValue;
21
use alloy_primitives::keccak256;
2+
use alloy_sol_types::SolValue;
33
use serde::{Deserialize, Serialize};
44

55
use crate::PoolId;
66

7-
alloy::sol!(
7+
alloy_sol_types::sol!(
88
type Currency is address;
99
type IHooks is address;
1010

crates/uni-v4-common/src/pools_impl.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ pub enum SwapSimulationError {
163163

164164
#[derive(Error, Debug)]
165165
pub enum PoolError {
166-
#[error("Invalid signature: [{}]", .0.iter().map(|b| format!("0x{}", alloy::hex::encode(b))).collect::<Vec<_>>().join(", "))]
166+
#[error("Invalid signature: [{}]", .0.iter().map(|b| format!("0x{}", alloy_primitives::hex::encode(b))).collect::<Vec<_>>().join(", "))]
167167
InvalidEventSignature(Vec<B256>),
168168
#[error("Swap simulation failed")]
169169
SwapSimulationFailed,
@@ -174,9 +174,9 @@ pub enum PoolError {
174174
#[error(transparent)]
175175
SwapSimulationError(#[from] SwapSimulationError),
176176
#[error(transparent)]
177-
AlloyContractError(#[from] alloy::contract::Error),
177+
AlloyContractError(#[from] alloy_contract::Error),
178178
#[error(transparent)]
179-
AlloySolTypeError(#[from] alloy::sol_types::Error),
179+
AlloySolTypeError(#[from] alloy_sol_types::Error),
180180
#[error(transparent)]
181181
Eyre(#[from] eyre::Error)
182182
}

crates/uni-v4-common/src/shared_pools.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ pub enum SwapSimulationError {
249249

250250
#[derive(Error, Debug)]
251251
pub enum PoolError {
252-
#[error("Invalid signature: [{}]", .0.iter().map(|b| format!("0x{}", alloy::hex::encode(b))).collect::<Vec<_>>().join(", "))]
252+
#[error("Invalid signature: [{}]", .0.iter().map(|b| format!("0x{}", alloy_primitives::hex::encode(b))).collect::<Vec<_>>().join(", "))]
253253
InvalidEventSignature(Vec<B256>),
254254
#[error("Swap simulation failed")]
255255
SwapSimulationFailed,
@@ -260,9 +260,9 @@ pub enum PoolError {
260260
#[error(transparent)]
261261
SwapSimulationError(#[from] SwapSimulationError),
262262
#[error(transparent)]
263-
AlloyContractError(#[from] alloy::contract::Error),
263+
AlloyContractError(#[from] alloy_contract::Error),
264264
#[error(transparent)]
265-
AlloySolTypeError(#[from] alloy::sol_types::Error),
265+
AlloySolTypeError(#[from] alloy_sol_types::Error),
266266
#[error(transparent)]
267267
Eyre(#[from] eyre::Error)
268268
}

crates/uni-v4-common/src/traits.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ pub trait PoolUpdateDelivery: Send + Sync {
5050
) -> Option<(
5151
PoolId,
5252
std::collections::HashMap<i32, uni_v4_structure::tick_info::TickInfo>,
53-
std::collections::HashMap<i16, alloy::primitives::U256>
53+
std::collections::HashMap<i16, alloy_primitives::U256>
5454
)>;
5555

5656
/// Get a new pool with full state

crates/uni-v4-common/src/updates.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ impl PoolUpdateDelivery for PoolUpdateQueue {
355355
) -> Option<(
356356
PoolId,
357357
std::collections::HashMap<i32, uni_v4_structure::tick_info::TickInfo>,
358-
std::collections::HashMap<i16, alloy::primitives::U256>
358+
std::collections::HashMap<i16, alloy_primitives::U256>
359359
)> {
360360
match self.updates.front() {
361361
Some(PoolUpdate::NewTicks { pool_id, ticks, tick_bitmap }) => {

crates/uni-v4-structure/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ authors.workspace = true
66
repository.workspace = true
77

88
[dependencies]
9-
alloy.workspace = true
109
alloy-primitives.workspace = true
1110
eyre.workspace = true
1211
itertools.workspace = true

crates/uni-v4-structure/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use alloy::primitives::{Address, I256};
1+
use alloy_primitives::{Address, I256};
22
use liquidity_base::BaselineLiquidity;
33
use pool_swap::{PoolSwap, PoolSwapResult};
44
use serde::{Deserialize, Serialize};

0 commit comments

Comments
 (0)