forked from keep-starknet-strange/zaun
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request keep-starknet-strange#4 from karnotxyz/orchestrato…
…r_refactor refactor to workspace
- Loading branch information
Showing
30 changed files
with
458 additions
and
315 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,38 @@ | ||
[package] | ||
name = "madara-orchestrator" | ||
[workspace] | ||
resolver = "2" | ||
members = [ | ||
"crates/orchestrator", | ||
"crates/da_clients/da-client-interface", | ||
"crates/da_clients/ethereum", | ||
"crates/utils", | ||
] | ||
|
||
[workspace.package] | ||
version = "0.1.0" | ||
edition = "2021" | ||
authors = ["Apoorv Sadana <@apoorvsadana>"] | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] | ||
alloy = { git = "https://github.com/alloy-rs/alloy", rev = "86027c9bb984f3a12a30ffd2a3c5f2f06595f1d6", features = [ | ||
"providers", | ||
"rpc-client", | ||
"transport-http", | ||
], optional = true } | ||
async-trait = "0.1.77" | ||
axum = { version = "0.7.4", features = ["macros"] } | ||
axum-macros = "0.4.1" | ||
color-eyre = "0.6.2" | ||
dotenvy = "0.15.7" | ||
futures = "0.3.30" | ||
mongodb = { version = "2.8.1", features = ["bson-uuid-1"], optional = true } | ||
omniqueue = { version = "0.2.0", optional = true } | ||
reqwest = { version = "0.11.24", optional = true } | ||
rstest = "0.18.2" | ||
[workspace.dependencies] | ||
async-trait = { version = "0.1.77" } | ||
axum = { version = "0.7.4" } | ||
axum-macros = { version = "0.4.1" } | ||
color-eyre = { version = "0.6.2" } | ||
dotenvy = { version = "0.15.7" } | ||
futures = { version = "0.3.30" } | ||
mongodb = { version = "2.8.1" } | ||
omniqueue = { version = "0.2.0" } | ||
rstest = { version = "0.18.2" } | ||
serde = { version = "1.0.197" } | ||
serde_json = "1.0.114" | ||
starknet = "0.9.0" | ||
thiserror = "1.0.57" | ||
tokio = { version = "1.36.0", features = ["sync", "macros", "rt-multi-thread"] } | ||
tracing = "0.1.40" | ||
tracing-subscriber = { version = "0.3.18", features = ["env-filter"] } | ||
url = "2.5.0" | ||
uuid = { version = "1.7.0", features = ["v4", "serde"] } | ||
|
||
[features] | ||
default = ["ethereum", "with_mongdb", "with_sqs"] | ||
ethereum = ["alloy", "reqwest"] | ||
with_mongdb = ["mongodb"] | ||
with_sqs = ["omniqueue"] | ||
serde_json = { version = "1.0.114" } | ||
starknet = { version = "0.9.0" } | ||
thiserror = { version = "1.0.57" } | ||
tokio = { version = "1.36.0" } | ||
tracing = { version = "0.1.40" } | ||
tracing-subscriber = { version = "0.3.18" } | ||
url = { version = "2.5.0" } | ||
uuid = { version = "1.7.0" } | ||
da-client-interface = { path = "crates/da_clients/da-client-interface" } | ||
ethereum-da-client = { path = "crates/da_clients/ethereum" } | ||
utils = { path = "crates/utils" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[package] | ||
name = "da-client-interface" | ||
version.workspace = true | ||
edition.workspace = true | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] | ||
async-trait = { workspace = true } | ||
axum = { workspace = true } | ||
color-eyre = { workspace = true } | ||
starknet = { workspace = true } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
[package] | ||
name = "ethereum-da-client" | ||
version.workspace = true | ||
edition.workspace = true | ||
|
||
[dependencies] | ||
alloy = { git = "https://github.com/alloy-rs/alloy", rev = "86027c9bb984f3a12a30ffd2a3c5f2f06595f1d6", features = [ | ||
"providers", | ||
"rpc-client", | ||
"transport-http", | ||
] } | ||
async-trait = { workspace = true } | ||
color-eyre = { workspace = true } | ||
da-client-interface = { workspace = true } | ||
reqwest = { version = "0.11.24" } | ||
starknet = { workspace = true } | ||
url = { workspace = true } | ||
utils = { workspace = true } |
4 changes: 2 additions & 2 deletions
4
src/da_clients/ethereum/config.rs → crates/da_clients/ethereum/src/config.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
[package] | ||
name = "orchestrator" | ||
version.workspace = true | ||
edition.workspace = true | ||
|
||
[dependencies] | ||
async-trait = { workspace = true } | ||
axum = { workspace = true, features = ["macros"] } | ||
axum-macros = { workspace = true } | ||
color-eyre = { workspace = true } | ||
da-client-interface = { workspace = true } | ||
dotenvy = { workspace = true } | ||
ethereum-da-client = { workspace = true, optional = true } | ||
futures = { workspace = true } | ||
mongodb = { workspace = true, features = ["bson-uuid-1"], optional = true } | ||
omniqueue = { workspace = true, optional = true } | ||
rstest = { workspace = true } | ||
serde = { workspace = true } | ||
serde_json = { workspace = true } | ||
starknet = { workspace = true } | ||
thiserror = { workspace = true } | ||
tokio = { workspace = true, features = ["sync", "macros", "rt-multi-thread"] } | ||
tracing = { workspace = true } | ||
tracing-subscriber = { workspace = true, features = ["env-filter"] } | ||
url = { workspace = true } | ||
uuid = { workspace = true, features = ["v4", "serde"] } | ||
|
||
[features] | ||
default = ["ethereum", "with_mongodb", "with_sqs"] | ||
ethereum = ["ethereum-da-client"] | ||
with_mongodb = ["mongodb"] | ||
with_sqs = ["omniqueue"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[package] | ||
name = "utils" | ||
version.workspace = true | ||
edition.workspace = true | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] | ||
color-eyre = { workspace = true } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
use color_eyre::Result; | ||
|
||
pub fn get_env_var(key: &str) -> Result<String> { | ||
std::env::var(key).map_err(|e| e.into()) | ||
} | ||
|
||
pub fn get_env_var_or_panic(key: &str) -> String { | ||
get_env_var(key).unwrap_or_else(|e| panic!("Failed to get env var {}: {}", key, e)) | ||
} | ||
|
||
pub fn get_env_var_or_default(key: &str, default: &str) -> String { | ||
get_env_var(key).unwrap_or(default.to_string()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pub mod env_utils; |
Binary file not shown.