chore: disable remove_liq example
This commit is contained in:
parent
b47567bfd2
commit
96e195d2d7
|
@ -19,11 +19,13 @@ abigen!(
|
||||||
]"#
|
]"#
|
||||||
);
|
);
|
||||||
|
|
||||||
|
fn main() {}
|
||||||
|
|
||||||
// Remove liquidity from uniswap V2.
|
// Remove liquidity from uniswap V2.
|
||||||
// This example will remove 500 liquidity of 2 test tokens, TA and TB on goerli testnet.
|
// This example will remove 500 liquidity of 2 test tokens, TA and TB on goerli testnet.
|
||||||
// This example uses pair contract and uniswap swap contract to remove liquidity.
|
// This example uses pair contract and uniswap swap contract to remove liquidity.
|
||||||
#[tokio::main]
|
#[allow(dead_code)]
|
||||||
async fn main() -> Result<()> {
|
async fn example() -> Result<()> {
|
||||||
let provider = Arc::new({
|
let provider = Arc::new({
|
||||||
// connect to the network
|
// connect to the network
|
||||||
let provider = Provider::<Http>::try_from(
|
let provider = Provider::<Http>::try_from(
|
||||||
|
@ -50,8 +52,8 @@ async fn main() -> 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();
|
||||||
|
|
Loading…
Reference in New Issue