feat(core): re-export H128 (#1786)
* feat(core): re-export H128 * chore: cargo fmt
This commit is contained in:
parent
2c28fa47e7
commit
a07581489a
|
@ -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, 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::{
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue