From 527c54199f1b1bfdff1f414d414a6b34c9fa5e69 Mon Sep 17 00:00:00 2001 From: Nartey Kodjo-Sarso <43901544+narteysarso@users.noreply.github.com> Date: Wed, 1 Jun 2022 12:56:23 +0000 Subject: [PATCH 1/5] fix comment to describe line of code --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 845a920..dc81cbe 100644 --- a/README.md +++ b/README.md @@ -228,9 +228,9 @@ Hardhat is an Ethereum development environment and framework designed for full s // Burn the sent LP tokens from the user's wallet because they are already sent to // remove liquidity _burn(msg.sender, _amount); - // Transfer `ethAmount` of Eth from user's wallet to the contract + // Transfer `ethAmount` of Eth from the contract to the user's wallet payable(msg.sender).transfer(ethAmount); - // Transfer `cryptoDevTokenAmount` of Crypto Dev tokens from the user's wallet to the contract + // Transfer `cryptoDevTokenAmount` of Crypto Dev tokens from the contract to the user's wallet ERC20(cryptoDevTokenAddress).transfer(msg.sender, cryptoDevTokenAmount); return (ethAmount, cryptoDevTokenAmount); } From fdfde4da7ed14895cd953bc572beff904ebfc2eb Mon Sep 17 00:00:00 2001 From: Nartey Kodjo-Sarso <43901544+narteysarso@users.noreply.github.com> Date: Wed, 1 Jun 2022 12:59:07 +0000 Subject: [PATCH 2/5] fix comment to describe line of code The comment on 102 does not describe the code on line 103. --- hardhat-tutorial/contracts/Exchange.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hardhat-tutorial/contracts/Exchange.sol b/hardhat-tutorial/contracts/Exchange.sol index a0515da..1e1782f 100644 --- a/hardhat-tutorial/contracts/Exchange.sol +++ b/hardhat-tutorial/contracts/Exchange.sol @@ -99,7 +99,7 @@ contract Exchange is ERC20 { _burn(msg.sender, _amount); // Transfer `ethAmount` of Eth from the contract to the user payable(msg.sender).transfer(ethAmount); - // Transfer `cryptoDevTokenAmount` of `Crypto Dev` tokens from the user's wallet to the contract + // Transfer `cryptoDevTokenAmount` of `Crypto Dev` tokens from the contract to the user's wallet ERC20(cryptoDevTokenAddress).transfer(msg.sender, cryptoDevTokenAmount); return (ethAmount, cryptoDevTokenAmount); } From a4fff4ab3f5220d82035fc4d4390b457f9b7705e Mon Sep 17 00:00:00 2001 From: Nartey Kodjo-Sarso <43901544+narteysarso@users.noreply.github.com> Date: Wed, 1 Jun 2022 16:07:53 +0000 Subject: [PATCH 3/5] fix unused import --- hardhat-tutorial/scripts/deploy.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hardhat-tutorial/scripts/deploy.js b/hardhat-tutorial/scripts/deploy.js index cac363b..edaceed 100644 --- a/hardhat-tutorial/scripts/deploy.js +++ b/hardhat-tutorial/scripts/deploy.js @@ -1,5 +1,5 @@ const { ethers } = require("hardhat"); -require("dotenv").config({ path: ".env" }); + const { CRYPTO_DEV_TOKEN_CONTRACT_ADDRESS } = require("../constants"); async function main() { From 4ec623f30799ada1f50162c00fc0c6dbaedd6304 Mon Sep 17 00:00:00 2001 From: Nartey Kodjo-Sarso <43901544+narteysarso@users.noreply.github.com> Date: Wed, 1 Jun 2022 16:17:42 +0000 Subject: [PATCH 4/5] fix remove duplicate code --- my-app/pages/index.js | 1 - 1 file changed, 1 deletion(-) diff --git a/my-app/pages/index.js b/my-app/pages/index.js index 05b3736..023075f 100644 --- a/my-app/pages/index.js +++ b/my-app/pages/index.js @@ -91,7 +91,6 @@ export default function Home() { setCDBalance(_cdBalance); setLPBalance(_lpBalance); setReservedCD(_reservedCD); - setReservedCD(_reservedCD); setEtherBalanceContract(_ethBalanceContract); } catch (err) { console.error(err); From f5a038ed53f5a260e9474e23a56637a9a8f3f2de Mon Sep 17 00:00:00 2001 From: Nartey Kodjo-Sarso <43901544+narteysarso@users.noreply.github.com> Date: Wed, 1 Jun 2022 16:19:53 +0000 Subject: [PATCH 5/5] fix remove code duplicate in README.md --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index dc81cbe..82fd54a 100644 --- a/README.md +++ b/README.md @@ -1229,7 +1229,6 @@ export default function Home() { setCDBalance(_cdBalance); setLPBalance(_lpBalance); setReservedCD(_reservedCD); - setReservedCD(_reservedCD); setEtherBalanceContract(_ethBalanceContract); } catch (err) { console.error(err);