-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: extract wallet api to own service
- Loading branch information
Showing
8 changed files
with
150 additions
and
115 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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,45 @@ | ||
[package] | ||
name = "odyssey-relay" | ||
version.workspace = true | ||
edition.workspace = true | ||
rust-version.workspace = true | ||
license.workspace = true | ||
repository.workspace = true | ||
description = "Odyssey Relay is an EIP-7702 native transaction batcher and sponsor." | ||
|
||
[lints] | ||
workspace = true | ||
|
||
[dependencies] | ||
alloy-signer-local.workspace = true | ||
alloy-network.workspace = true | ||
alloy-primitives.workspace = true | ||
odyssey-node.workspace = true | ||
odyssey-wallet.workspace = true | ||
odyssey-walltime.workspace = true | ||
eyre.workspace = true | ||
tracing.workspace = true | ||
reth-cli-util.workspace = true | ||
reth-node-builder.workspace = true | ||
reth-optimism-node.workspace = true | ||
reth-optimism-cli.workspace = true | ||
reth-provider.workspace = true | ||
clap = { workspace = true, features = ["derive"] } | ||
|
||
[features] | ||
default = ["jemalloc"] | ||
|
||
asm-keccak = ["reth-optimism-cli/asm-keccak"] | ||
|
||
jemalloc = ["reth-cli-util/jemalloc"] | ||
jemalloc-prof = ["jemalloc", "reth-cli-util/jemalloc-prof"] | ||
|
||
min-error-logs = ["tracing/release_max_level_error"] | ||
min-warn-logs = ["tracing/release_max_level_warn"] | ||
min-info-logs = ["tracing/release_max_level_info"] | ||
min-debug-logs = ["tracing/release_max_level_debug"] | ||
min-trace-logs = ["tracing/release_max_level_trace"] | ||
|
||
[[bin]] | ||
name = "odyssey" | ||
path = "src/main.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
//! # Odyssey Relay | ||
//! | ||
//! TBD | ||
use alloy_signer_local::PrivateKeySigner; | ||
use eyre::Context; | ||
|
||
fn run() -> eyre::Result<()> { | ||
let signer: PrivateKeySigner = std::env::var("RELAY_SK") | ||
.wrap_err("Environment variable `RELAY_SK` must be set") | ||
.and_then(|sk| sk.parse().wrap_err("Invalid signing key set in `RELAY_SK`"))?; | ||
|
||
Ok(()) | ||
} | ||
|
||
struct Cli { | ||
port: u16, | ||
upstream: Vec<String>, // todo make url | ||
constraints: Constraints, | ||
} | ||
|
||
struct Constraints { | ||
max_gas: u64, | ||
} | ||
|
||
#[doc(hidden)] | ||
fn main() { | ||
// Enable backtraces unless a RUST_BACKTRACE value has already been explicitly provided. | ||
if std::env::var_os("RUST_BACKTRACE").is_none() { | ||
std::env::set_var("RUST_BACKTRACE", "1"); | ||
} | ||
|
||
if let Err(err) = run() { | ||
eprint!("Error: {err:?}"); | ||
std::process::exit(1); | ||
} | ||
} |
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
Oops, something went wrong.