feat(core): re-export H128 (#1786)

* feat(core): re-export H128

* chore: cargo fmt
This commit is contained in:
Dan Cline 2022-10-14 22:53:38 -04:00 committed by GitHub
parent 2c28fa47e7
commit a07581489a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -5,7 +5,9 @@ pub type Selector = [u8; 4];
/// A transaction Hash /// A transaction Hash
pub use ethabi::ethereum_types::H256 as TxHash; 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 mod transaction;
pub use transaction::{ pub use transaction::{

View File

@ -52,8 +52,8 @@ async fn example() -> Result<()> {
println!("Reserves (token A, Token B): ({}, {})", reserve0, reserve1); println!("Reserves (token A, Token B): ({}, {})", reserve0, reserve1);
let price = let price =
if reserve0 > reserve1 { 1000 * reserve0 / reserve1 } else { 1000 * reserve1 / reserve0 } if reserve0 > reserve1 { 1000 * reserve0 / reserve1 } else { 1000 * reserve1 / reserve0 } /
/ 1000; 1000;
println!("token0 / token1 price = {}", price); println!("token0 / token1 price = {}", price);
let liquidity = 100.into(); let liquidity = 100.into();