Skip to content
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
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,8 @@ thiserror = "2"

# misc
auto_impl = "1"
aws-config = { version = "1", default-features = true }
aws-sdk-kms = { version = "1", default-features = false }
bytes = "1.8"
walkdir = "2"
prettyplease = "0.2"
Expand Down Expand Up @@ -293,6 +295,7 @@ reqwest = { version = "0.12", default-features = false, features = [
"rustls-tls",
"rustls-tls-native-roots",
] }
rustls = "0.23"
semver = "1"
serde = { version = "1.0", features = ["derive"] }
serde_json = { version = "1.0", features = ["arbitrary_precision"] }
Expand Down
1 change: 1 addition & 0 deletions crates/anvil/src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ pub fn run() -> Result<()> {

/// Setup the exception handler and other utilities.
pub fn setup() -> Result<()> {
utils::install_crypto_provider();
handler::install();
utils::load_dotenv();
utils::enable_paint();
Expand Down
2 changes: 1 addition & 1 deletion crates/cast/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ serde_json.workspace = true
serde.workspace = true

# aws-kms
aws-sdk-kms = { version = "1", default-features = false, optional = true }
aws-sdk-kms = { workspace = true, default-features = false, optional = true }

# bin
foundry-cli.workspace = true
Expand Down
1 change: 1 addition & 0 deletions crates/cast/src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ pub fn run() -> Result<()> {

/// Setup the global logger and other utilities.
pub fn setup() -> Result<()> {
utils::install_crypto_provider();
handler::install();
utils::load_dotenv();
utils::subscriber();
Expand Down
1 change: 1 addition & 0 deletions crates/chisel/src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ pub fn run() -> Result<()> {

/// Setup the global logger and other utilities.
pub fn setup() -> Result<()> {
utils::install_crypto_provider();
handler::install();
utils::subscriber();
utils::load_dotenv();
Expand Down
1 change: 1 addition & 0 deletions crates/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ tokio = { workspace = true, features = ["macros"] }
tracing-subscriber = { workspace = true, features = ["registry", "env-filter"] }
tracing.workspace = true
yansi.workspace = true
rustls = { workspace = true, features = ["ring"] }

tracing-tracy = { version = "0.11", optional = true }

Expand Down
17 changes: 17 additions & 0 deletions crates/cli/src/utils/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,23 @@ pub fn enable_paint() {
yansi::whenever(yansi::Condition::cached(enable));
}

/// This force installs the default crypto provider.
///
/// This is necessary in case there are more than one available backends enabled in rustls (ring,
/// aws-lc-rs).
///
/// This should be called high in the main fn.
///
/// See also:
/// <https://github.com/snapview/tokio-tungstenite/issues/353#issuecomment-2455100010>
/// <https://github.com/awslabs/aws-sdk-rust/discussions/1257>
pub fn install_crypto_provider() {
// https://github.com/snapview/tokio-tungstenite/issues/353
rustls::crypto::ring::default_provider()
.install_default()
.expect("Failed to install default rustls crypto provider");
}

/// Useful extensions to [`std::process::Command`].
pub trait CommandUtils {
/// Returns the command's output if execution is successful, otherwise, throws an error.
Expand Down
1 change: 1 addition & 0 deletions crates/forge/src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ pub fn run() -> Result<()> {

/// Setup the global logger and other utilities.
pub fn setup() -> Result<()> {
utils::install_crypto_provider();
handler::install();
utils::load_dotenv();
utils::subscriber();
Expand Down
2 changes: 2 additions & 0 deletions crates/forge/tests/it/test_helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
use alloy_chains::NamedChain;
use alloy_primitives::U256;
use forge::{revm::primitives::SpecId, MultiContractRunner, MultiContractRunnerBuilder};
use foundry_cli::utils::install_crypto_provider;
use foundry_compilers::{
artifacts::{EvmVersion, Libraries, Settings},
compilers::multi::MultiCompiler,
Expand Down Expand Up @@ -172,6 +173,7 @@ impl ForgeTestData {
///
/// Uses [get_compiled] to lazily compile the project.
pub fn new(profile: ForgeTestProfile) -> Self {
install_crypto_provider();
init_tracing();
let config = Arc::new(profile.config());
let mut project = config.project().unwrap();
Expand Down
4 changes: 2 additions & 2 deletions crates/wallets/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ alloy-dyn-abi.workspace = true

# aws-kms
alloy-signer-aws = { workspace = true, features = ["eip712"], optional = true }
aws-config = { version = "1", default-features = true, optional = true }
aws-sdk-kms = { version = "1", default-features = false, optional = true }
aws-config = { workspace = true, default-features = true, optional = true }
aws-sdk-kms = { workspace = true, default-features = false, optional = true }

# gcp-kms
alloy-signer-gcp = { workspace = true, features = ["eip712"], optional = true }
Expand Down
1 change: 1 addition & 0 deletions deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ allow = [
"MPL-2.0",
"CDDL-1.0",
"Zlib",
"OpenSSL",
]

# Allow 1 or more licenses on a per-crate basis, so that particular licenses
Expand Down