Implement a single swap contract and provide liquidity to a pool
-
Follow the setup instructions here: https://docs.uniswap.org/contracts/v3/guides/local-environment
-
Before running "npx hardhat test --network localhost", make sure to do the follwing:
- Change "module exports" of your "hardhat.config.js" to the code block below
- Make sure you replace "YOUR_INFURA_NODE_MAINNET_ETH_URL" accordingly
- If you need help doint this, please ping the hw9 channel on discord
- Afterwards both tests should pass wehn running "npx hardhat test --network localhost"
- Change "module exports" of your "hardhat.config.js" to the code block below
module.exports = {
solidity: "0.7.6",
defaultNetwork: "hardhat",
networks: {
hardhat: {
forking: {
url: "<YOUR_INFURA_NODE_MAINNET_ETH_URL>"
}
}
}
};
-
Complete the "Single Swaps" section (linked below) and attach a screen shot of you tests passing after running the test command https://docs.uniswap.org/contracts/v3/guides/swaps/single-swaps
-
Complete everything under the "Providing Liquidity" section (linked below) and attach a screen shot of you tests passing after running the test command https://docs.uniswap.org/contracts/v3/guides/providing-liquidity/setting-up
-
Please submit to the appropriate assignment on bCourses