From e600580c0348e959d74fdfb0db9d3cdfb67222d7 Mon Sep 17 00:00:00 2001 From: Dan Cline <6798349+Rjected@users.noreply.github.com> Date: Fri, 14 Oct 2022 22:34:52 -0400 Subject: [PATCH 1/2] feat(core): re-export H128 --- ethers-core/src/types/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ethers-core/src/types/mod.rs b/ethers-core/src/types/mod.rs index c97dfef39..bac36ddc9 100644 --- a/ethers-core/src/types/mod.rs +++ b/ethers-core/src/types/mod.rs @@ -5,7 +5,7 @@ pub type Selector = [u8; 4]; /// A transaction Hash pub use ethabi::ethereum_types::H256 as TxHash; -pub use ethabi::ethereum_types::{Address, Bloom, H160, H256, H32, H512, H64, U128, U256, U64}; +pub use ethabi::ethereum_types::{Address, Bloom, H128, H160, H256, H32, H512, H64, U128, U256, U64}; pub mod transaction; pub use transaction::{ From 80fcfc7886358bac7c3de8a48f910f087576cb39 Mon Sep 17 00:00:00 2001 From: Dan Cline <6798349+Rjected@users.noreply.github.com> Date: Fri, 14 Oct 2022 22:50:20 -0400 Subject: [PATCH 2/2] chore: cargo fmt --- ethers-core/src/types/mod.rs | 4 +++- examples/remove_liquidity.rs | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ethers-core/src/types/mod.rs b/ethers-core/src/types/mod.rs index bac36ddc9..af1715da5 100644 --- a/ethers-core/src/types/mod.rs +++ b/ethers-core/src/types/mod.rs @@ -5,7 +5,9 @@ pub type Selector = [u8; 4]; /// A transaction Hash pub use ethabi::ethereum_types::H256 as TxHash; -pub use ethabi::ethereum_types::{Address, Bloom, H128, H160, H256, H32, H512, H64, U128, U256, U64}; +pub use ethabi::ethereum_types::{ + Address, Bloom, H128, H160, H256, H32, H512, H64, U128, U256, U64, +}; pub mod transaction; pub use transaction::{ diff --git a/examples/remove_liquidity.rs b/examples/remove_liquidity.rs index cc84f0b56..1694ddf50 100644 --- a/examples/remove_liquidity.rs +++ b/examples/remove_liquidity.rs @@ -52,8 +52,8 @@ async fn example() -> Result<()> { println!("Reserves (token A, Token B): ({}, {})", reserve0, reserve1); let price = - if reserve0 > reserve1 { 1000 * reserve0 / reserve1 } else { 1000 * reserve1 / reserve0 } - / 1000; + if reserve0 > reserve1 { 1000 * reserve0 / reserve1 } else { 1000 * reserve1 / reserve0 } / + 1000; println!("token0 / token1 price = {}", price); let liquidity = 100.into();