From 18388c146815f8e2e3e72bb5ae6112278570fdf8 Mon Sep 17 00:00:00 2001 From: benesjan Date: Mon, 7 Oct 2024 17:43:59 +0000 Subject: [PATCH] WIP --- .../noir-contracts/contracts/dex_contract/src/main.nr | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/noir-projects/noir-contracts/contracts/dex_contract/src/main.nr b/noir-projects/noir-contracts/contracts/dex_contract/src/main.nr index 008279854d14..2ae0294e730b 100644 --- a/noir-projects/noir-contracts/contracts/dex_contract/src/main.nr +++ b/noir-projects/noir-contracts/contracts/dex_contract/src/main.nr @@ -262,16 +262,7 @@ contract DEX { _unlock(&mut context); } - // Swaps `amount_out` of `token_out` for at most `amount_in_max` of `token_in`. The `from_0_to_1` flag indicates - // whether we are swapping `token0` for `token1` or vice versa. - #[public] - fn swap_tokens_for_exact_tokens(amount_out: u64, amount_in_max: u64, from_0_to_1: bool) { - _lock(&mut context); - - // TODO - - _unlock(&mut context); - } + // Note: swap_tokens_for_exact_tokens is not important for our purposes so I am not doing it. // After locking and unlocking there will be 1 public data write because we always commit the last change and // "val1 --> val2 --> val1" does not result in 0 public data writes. TODO: Either optimize this or introduce