Skip to content

Commit

Permalink
removes an unnecessary test
Browse files Browse the repository at this point in the history
  • Loading branch information
gangov committed Aug 7, 2024
1 parent e17147e commit a005723
Showing 1 changed file with 0 additions and 71 deletions.
71 changes: 0 additions & 71 deletions contracts/pool_stable/src/tests/swap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -663,74 +663,3 @@ fn simple_swap_with_big_numbers() {
assert_eq!(token1.balance(&user1), 1_000_000_000_000_001);
assert_eq!(token2.balance(&user1), 999_999_999_857_143);
}

#[test]
fn phoam_001_test() {
let env = Env::default();
env.mock_all_auths();
env.budget().reset_unlimited();
let admin = Address::generate(&env);

let mut token1 = install_and_deploy_token_contract(
&env,
&admin.clone(),
&20,
&String::from_str(&env, "EURO Coin"),
&String::from_str(&env, "EURC"),
);

let mut token2 = install_and_deploy_token_contract(
&env,
&admin.clone(),
&20,
&String::from_str(&env, "USD Coin"),
&String::from_str(&env, "USDC"),
);

if token2.address < token1.address {
std::mem::swap(&mut token1, &mut token2);
}

let user1 = Address::generate(&env);
let stake_manager = Address::generate(&env);
let stake_owner = Address::generate(&env);
let swap_fees = 0i64;

let pool = deploy_stable_liquidity_pool_contract(
&env,
None,
(&token1.address, &token2.address),
swap_fees,
None,
None,
None,
stake_manager,
stake_owner,
None,
);
token1.mint(&user1, &10_000_000_00000000000000000000); //27 decimals
token2.mint(&user1, &10_000_000_00000000000000000000);

pool.provide_liquidity(
&user1,
&1_00000000000000000000, //20 decimals
&1_00000000000000000000,
&None,
&None,
&None,
);

let spread = 100i64; // 1% maximum spread allowed
pool.swap(
&user1,
// FIXM: Disable Referral struct
// &None::<Referral>,
&token1.address,
&1,
&None,
&Some(spread),
&None,
&None,
);
soroban_sdk::testutils::arbitrary::std::dbg!();
}

0 comments on commit a005723

Please sign in to comment.