Skip to content

Latest commit

 

History

History
40 lines (29 loc) · 1.32 KB

hw9-uniswap.md

File metadata and controls

40 lines (29 loc) · 1.32 KB

HW9-UNISWAP

Goal

Implement a single swap contract and provide liquidity to a pool

Instructions

  1. Follow the setup instructions here: https://docs.uniswap.org/contracts/v3/guides/local-environment

  2. 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"
module.exports = {
  solidity: "0.7.6",
  defaultNetwork: "hardhat",
  networks: {
    hardhat: {
      forking: {
        url: "<YOUR_INFURA_NODE_MAINNET_ETH_URL>"
      }
    }
  }
};
  1. 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

  2. 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

  3. Please submit to the appropriate assignment on bCourses