Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor/garden #344

Merged
merged 2 commits into from
Feb 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 17 additions & 41 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,14 @@ authors = ["Primitive Bits, Inc."]

[[bin]]
name = "excalibur"
path = "bin/src/main.rs"
path = "bin/main.rs"


# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[workspace.dependencies]
# Local
bindings = { path = "./crates/bindings", version = "0.1.0" }
analysis = { path = "./crates/analysis", version = "0.1.0" }
clients = { path = "./crates/clients", version = "0.1.0" }
sim = { path = "./crates/sim", version = "0.1.0" }
datatypes = { path = "./crates/datatypes", version = "0.1.0" }
Expand All @@ -31,31 +30,20 @@ ethers = { version = "=2.0.13", features = ["ws", "openssl", "rustls"] }
ethers-core = "2.0.4"

# ethereum types
revm = { version = "=3.5.0", features = ["ethersdb", "std", "serde"] }
revm-primitives = { version = "=1.3.0" }
alloy-primitives = { version = "0.5.0", features = ["serde"] }
alloy-sol-types = "0.5.2"
alloy-providers = { git = "https://github.com/alloy-rs/alloy.git", rev = "0ba6b61" }
alloy-networks = { git = "https://github.com/alloy-rs/alloy.git", rev = "0ba6b61" }
alloy-rpc-client = { git = "https://github.com/alloy-rs/alloy.git", rev = "0ba6b61", features = [
"pubsub",
"ws",
"reqwest",
] }
alloy-rpc-types = { git = "https://github.com/alloy-rs/alloy.git", rev = "0ba6b61" }
alloy-transport-ws = { git = "https://github.com/alloy-rs/alloy.git", rev = "0ba6b61" }
alloy-transport-http = { git = "https://github.com/alloy-rs/alloy.git", rev = "0ba6b61" }
alloy-rlp = "0.3"
alloy-pubsub = { git = "https://github.com/alloy-rs/alloy.git", rev = "0ba6b61" }
alloy-signer = { git = "https://github.com/alloy-rs/alloy.git", rev = "0ba6b61" }
revm = { version = "5.0.0", features = ["ethersdb", "std", "serde"] }
revm-primitives = { version = "2.0.0" }
alloy-primitives = { version = "0.6.3", features = ["serde"] }
alloy-sol-types = "0.6.3"

reqwest = "=0.11.23"
# Can we fix this so that we point to actual versions?
alloy-rlp = "0.3"
reqwest = "0.11.24"

## Config and parsing
serde = "=1.0.196"
serde_json = "=1.0.113"
serde_with = { version = "=3.4.0", features = ["chrono_0_4"] }
config = "0.13.3"
serde_with = { version = "3.6.1", features = ["chrono_0_4"] }
config = "0.14.0"

## Async
tokio = { version = "=1.36.0", features = ["macros", "full"] }
Expand All @@ -69,38 +57,34 @@ tracing-futures = { version = "=0.2.5", default-features = false }
anyhow = "=1.0.79"
thiserror = "=1.0.57"

itertools = "=0.12.0"
itertools = "0.12.1"
rand = "=0.8.5"
bytesize = "=1.2.0"
bytesize = "1.3.0"
dotenv = "=0.15.0"
uuid = { version = "=1.6.1", features = ["v4", "serde"] }
uuid = { version = "1.7.0", features = ["v4", "serde"] }
clap = { version = "4.5.0", features = ["derive"] }

# Visualization
plotters = "=0.3.5"

# math
RustQuant = { version = "=0.0.42", features = ["seedable"] }
RustQuant = { version = "0.0.45", features = ["seedable"] }
statrs = "=0.16.0"
reikna = "=0.12.3"

# Storage
linked-hash-map = "=0.5.6"
directories-next = "=2.0.0"
criterion = "=0.5.1"

# time
chrono = { version = "=0.4.31", features = ["serde"] }
chrono = { version = "0.4.34", features = ["serde"] }

[dependencies]
datatypes.workspace = true
clients.workspace = true
cfmm_math.workspace = true
sim.workspace = true

clap = { version = "=4.4.14", features = ["derive"] }

criterion.workspace = true
analysis.workspace = true
clap.workspace = true

tokio.workspace = true
tracing.workspace = true
Expand Down Expand Up @@ -146,15 +130,7 @@ revm-primitives.workspace = true
# alloy
alloy-primitives.workspace = true
alloy-sol-types.workspace = true
alloy-providers.workspace = true
alloy-networks.workspace = true
alloy-rpc-client.workspace = true
alloy-rpc-types.workspace = true
alloy-transport-ws.workspace = true
alloy-rlp.workspace = true
alloy-pubsub.workspace = true
alloy-transport-http.workspace = true
alloy-signer.workspace = true
reqwest.workspace = true

# workspace deps
Expand Down
16 changes: 0 additions & 16 deletions bin/Cargo.toml

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 5 additions & 5 deletions bin/src/components/logos.rs → bin/components/logos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,22 @@ use crate::components::styles::MINT_500;

/// Placeholder for the Excalibur logo.
#[allow(dead_code)]
const EXCALIBUR_LOGO: &[u8] = include_bytes!("../../../assets/logos/excalibur_logo.png");
const EXCALIBUR_LOGO: &[u8] = include_bytes!("../../assets/logos/excalibur_logo.png");

#[allow(dead_code)]
pub fn excalibur_logo() -> icon::Icon {
icon::from_file_data(EXCALIBUR_LOGO, None).unwrap()
}

const EXCALIBUR_LOGO_2: &[u8] = include_bytes!("../../../assets/logos/daggeremoji.png");
const EXCALIBUR_LOGO_2: &[u8] = include_bytes!("../../assets/logos/daggeremoji.png");

pub fn excalibur_logo_2() -> icon::Icon {
icon::from_file_data(EXCALIBUR_LOGO_2, None).unwrap()
}

const ETHER_LOGO: &[u8] = include_bytes!("../../../assets/logos/ethtokenicon.svg");
const USDC_LOGO: &[u8] = include_bytes!("../../../assets/logos/usdcvector.svg");
const LP_LOGO: &[u8] = include_bytes!("../../../assets/logos/ethusdclp.svg");
const ETHER_LOGO: &[u8] = include_bytes!("../../assets/logos/ethtokenicon.svg");
const USDC_LOGO: &[u8] = include_bytes!("../../assets/logos/usdcvector.svg");
const LP_LOGO: &[u8] = include_bytes!("../../assets/logos/ethusdclp.svg");

pub fn ether_logo() -> iced::widget::svg::Handle {
svg::Handle::from_memory(ETHER_LOGO)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ use clients::protocol::{LogNormalF64, PoolInitParamsF64};
use datatypes::portfolio::coin::Coin;
use iced::{futures::TryFutureExt, subscription, Padding};
use sim::{from_ethers_u256, to_ethers_address, to_ethers_u256};
use RustQuant::stochastics::{GeometricBrownianMotion, StochasticProcess, Trajectories};
use RustQuant::{
models::GeometricBrownianMotion,
stochastics::{StochasticProcess, Trajectories},
};

use self::{
create::{FormView, LiquidityTypes, Times},
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion bin/src/loader.rs → bin/loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ pub async fn connect_to_server() -> anyhow::Result<()> {
Ok(())
}

pub const DAGGER_SQUARE_FONT_BYTES: &[u8] = include_bytes!("../../assets/fonts/DAGGERSQUARE.otf");
pub const DAGGER_SQUARE_FONT_BYTES: &[u8] = include_bytes!("../assets/fonts/DAGGERSQUARE.otf");

impl Loader {
/// Creates a new Loader with the given flags and returns a tuple of the
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading
Loading