Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
yash-atreya committed Jan 8, 2025
1 parent e8fd329 commit 7267ce4
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion crates/provider/src/provider/trait.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1106,7 +1106,7 @@ impl<N: Network> Provider<N> for RootProvider<N> {

#[cfg(test)]
mod tests {
use std::time::Duration;
use std::{str::FromStr, time::Duration};

use super::*;
use crate::{builder, ProviderBuilder, WalletProvider};
Expand Down Expand Up @@ -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\"])]"));
}
}

0 comments on commit 7267ce4

Please sign in to comment.