Skip to content

Commit

Permalink
chore: fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
0xOsiris committed Aug 6, 2024
1 parent 3ec419b commit 643b049
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions benches/uniswapv2_simulate.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use alloy::primitives::{address, U256};
use criterion::{Criterion, criterion_group, criterion_main};
use criterion::{criterion_group, criterion_main, Criterion};

use amms::amm::AutomatedMarketMaker;
use amms::amm::uniswap_v2::UniswapV2Pool;
use amms::amm::AutomatedMarketMaker;

/// Generate a random ether amount between `from` and `to`
fn random_ether(from: f32, to: f32) -> u128 {
Expand All @@ -27,7 +27,7 @@ fn criterion_benchmark(c: &mut Criterion) {
b.iter(|| {
pool.reserve_0 = random_ether(1.0, 1000.0);
pool.reserve_1 = random_ether(1.0, 1000.0);
let swap_amount = U256::from(random_ether(1.0, 10.0));
let swap_amount = U256::from(random_ether(1.0, 10.0));
let _ = pool.simulate_swap(token_a, swap_amount).unwrap();
})
});
Expand Down

0 comments on commit 643b049

Please sign in to comment.