Skip to content

Commit

Permalink
Merge pull request #210 from Cyfrin/main
Browse files Browse the repository at this point in the history
main --> dev
  • Loading branch information
solhosty authored Sep 19, 2024
2 parents e152858 + 7ebe980 commit 1358c59
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,3 @@ numerator = reserveIn * amountOut * 1000 / (amountOut * 997 + reserveIn * 1000)
The result of this calculation is then stored in the amounts array.

We will keep looping through the array until we get to `amounts[0]`, which will contain the amount of tokens that are needed to execute the swap. This entire process is performed inside the for loop.
/home/equious/Nevermore/uniswap-v2/2-swap/10-code-walk-get-amounts-in/+page.md
3 changes: 1 addition & 2 deletions courses/uniswap-v2/2-swap/14-swap-ex-1/+page.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,5 +87,4 @@ In our test, the **amountIn** is 1e18, the **amountOutMin** is 1, the **path** i

This is just a simple example of Uniswap V2 Router testing. We can expand on this by testing other functions, varying inputs, and simulating more complex scenarios.

The next step is to write more tests to cover other functions. We will also learn how to test the `swapExactTokensForETH` function. Let me know if you'd like to delve deeper into these topics.
/home/equious/Nevermore/uniswap-v2/2-swap/14-swap-ex-1/+page.md
The next step is to write more tests to cover other functions. We will also learn how to test the `swapExactTokensForETH` function.
1 change: 0 additions & 1 deletion courses/uniswap-v2/2-swap/2-swap-fee/+page.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,3 @@ dy = 1000 * 0.997 * 3000 / (6000000 + 1000 * 0.997)
```

We can now use a calculator to determine the value of *dy*, which would be approximately 0.498341 ETH.
/home/equious/Nevermore/uniswap-v2/2-swap/2-swap-fee/+page.md

0 comments on commit 1358c59

Please sign in to comment.