From 7267ce4ce3bea0c5b6de74161f65fbd065337ba5 Mon Sep 17 00:00:00 2001 From: Yash Atreya <44857776+yash-atreya@users.noreply.github.com> Date: Wed, 8 Jan 2025 20:05:18 +0530 Subject: [PATCH] test --- crates/provider/src/provider/trait.rs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/crates/provider/src/provider/trait.rs b/crates/provider/src/provider/trait.rs index 57eba4afb17..adee3d13544 100644 --- a/crates/provider/src/provider/trait.rs +++ b/crates/provider/src/provider/trait.rs @@ -1106,7 +1106,7 @@ impl Provider for RootProvider { #[cfg(test)] mod tests { - use std::time::Duration; + use std::{str::FromStr, time::Duration}; use super::*; use crate::{builder, ProviderBuilder, WalletProvider}; @@ -1839,4 +1839,20 @@ mod tests { .unwrap(); assert!(block.transactions.is_hashes()); } + + #[tokio::test] + async fn disable_test() { + let provider = ProviderBuilder::new() + .disable_recommended_fillers() + .with_cached_nonce_management() + .on_anvil(); + + let tx = TransactionRequest::default() + .with_kind(alloy_primitives::TxKind::Create) + .value(U256::from(1235)) + .with_input(Bytes::from_str("ffffffffffffff").unwrap()); + + let err = provider.send_transaction(tx).await.unwrap_err().to_string(); + assert!(err.contains("missing properties: [(\"NonceManager\", [\"from\"])]")); + } }