Skip to content

Commit 10e86c7

Browse files
committed
feat: FromEnvVar for SignetConstants types
1 parent 96ccbd1 commit 10e86c7

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ repository = "https://github.com/init4tech/bin-base"
1515
[dependencies]
1616
init4-from-env-derive = "0.1.0"
1717

18+
19+
# Signet
20+
signet-constants = { git = "https://github.com/init4tech/signet-sdk.git", branch = "main" }
21+
1822
# Tracing
1923
tracing = "0.1.40"
2024
tracing-core = "0.1.33"
@@ -45,7 +49,6 @@ alloy = { version = "0.12.6", optional = true, default-features = false, feature
4549
serde = { version = "1", features = ["derive"] }
4650
async-trait = { version = "0.1.80", optional = true }
4751

48-
4952
# AWS
5053
aws-config = { version = "1.1.7", optional = true }
5154
aws-sdk-kms = { version = "1.15.0", optional = true }

src/utils/from_env.rs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
use signet_constants::{
2+
HostConstants, RollupConstants, SignetConstants, SignetEnvironmentConstants,
3+
SignetSystemConstants,
4+
};
15
use std::{convert::Infallible, env::VarError, num::ParseIntError, str::FromStr};
26

37
/// The `derive(FromEnv)` macro.
@@ -609,7 +613,12 @@ impl_for_parseable!(
609613
i128,
610614
isize,
611615
url::Url,
612-
tracing::Level
616+
tracing::Level,
617+
SignetConstants,
618+
SignetEnvironmentConstants,
619+
SignetSystemConstants,
620+
HostConstants,
621+
RollupConstants
613622
);
614623

615624
#[cfg(feature = "alloy")]

0 commit comments

Comments
 (0)