Skip to content

Commit

Permalink
fixes after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
benesjan committed Nov 14, 2024
1 parent 3d1df42 commit 00d08bb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,9 @@ contract AMM {
// Since we don't collect a protocol fee (unlike Uniswap V2) we can set initial liquidity to an arbitrary
// value instead of sqrt(amount0 * amount1).
liquidity = INITIAL_LIQUIDITY;
liquidity_token.mint_public(AztecAddress::zero(), MINIMUM_LIQUIDITY.to_integer()).call(
&mut context,
); // permanently lock the first MINIMUM_LIQUIDITY tokens
liquidity_token
.mint_to_public(AztecAddress::zero(), MINIMUM_LIQUIDITY.to_integer())
.call(&mut context); // permanently lock the first MINIMUM_LIQUIDITY tokens
} else {
liquidity = std::cmp::min(
amount0 * total_supply / reserve0,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::AMM;
use dep::token::{test::utils::{check_private_balance, mint_private}, Token};
use dep::token::{test::utils::{check_private_balance, mint_to_private}, Token};
use aztec::{
keys::getters::get_public_keys,
oracle::{
Expand Down Expand Up @@ -70,13 +70,13 @@ pub unconstrained fn setup() -> (&mut TestEnvironment, AztecAddress, AztecAddres
let lp_balance_1 = 10000;
let swapper_balance_0 = 5000;

mint_private(&mut env, token0_address, liquidity_provider, lp_balance_0);
mint_to_private(&mut env, token0_address, liquidity_provider, lp_balance_0);
check_private_balance(token0_address, liquidity_provider, lp_balance_0);

mint_private(&mut env, token1_address, liquidity_provider, lp_balance_1);
mint_to_private(&mut env, token1_address, liquidity_provider, lp_balance_1);
check_private_balance(token1_address, liquidity_provider, lp_balance_1);

mint_private(&mut env, token0_address, swapper, swapper_balance_0);
mint_to_private(&mut env, token0_address, swapper, swapper_balance_0);
check_private_balance(token0_address, swapper, swapper_balance_0);

env.advance_block_by(1);
Expand Down

0 comments on commit 00d08bb

Please sign in to comment.