Skip to content

Commit 32a23d0

Browse files
committed
clippy + fmt
1 parent 7a56116 commit 32a23d0

File tree

4 files changed

+15
-32
lines changed

4 files changed

+15
-32
lines changed

Cargo.lock

Lines changed: 10 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,3 @@ tokio-stream = "0.1.17"
6060
url = "2.5.4"
6161
tracing = "0.1.41"
6262
async-trait = "0.1.88"
63-
tower = "0.4"
64-
bytes = "1"
65-
http = "0.2"

src/tasks/submit/flashbots/provider.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,12 @@ impl Flashbots {
9898
}
9999

100100
/// Builds an EIP-191 signature for the given body bytes.
101-
async fn compute_signature(&self, body_bz: &Vec<u8>) -> Result<String, eyre::Error> {
102-
let payload = format!("0x{:x}", keccak256(body_bz.clone()));
101+
async fn compute_signature(&self, body_bz: &[u8]) -> Result<String, eyre::Error> {
102+
let payload = format!("0x{:x}", keccak256(body_bz));
103103
let signature = self.signer.sign_message(payload.as_ref()).await?;
104104
dbg!(signature.to_string());
105105
let address = self.signer.address();
106-
let value = format!("{}:{}", address, signature);
106+
let value = format!("{address}:{signature}");
107107
Ok(value)
108108
}
109109
}

tests/flashbots_provider_test.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use alloy::{
88
};
99
use builder::{
1010
tasks::submit::flashbots::Flashbots,
11-
test_utils::{new_signed_tx, setup_sepolia_config, setup_logging},
11+
test_utils::{new_signed_tx, setup_logging, setup_sepolia_config},
1212
};
1313
use std::str::FromStr;
1414

@@ -40,7 +40,7 @@ async fn test_simulate_valid_bundle_sepolia() {
4040
dbg!("submitting bundle with 1 tx", &bundle_body);
4141
let bundle = MevSendBundle::new(latest_block, Some(0), ProtocolVersion::V0_1, bundle_body);
4242

43-
let _ = flashbots.simulate_bundle(bundle).await.expect("failed to simulate bundle");
43+
flashbots.simulate_bundle(bundle).await.expect("failed to simulate bundle");
4444
}
4545

4646
async fn get_test_provider() -> Flashbots {

0 commit comments

Comments
 (0)