/uniswap-fork

Uniswap V2 Fork

Primary LanguageTypeScript

Uniswap Fork

How to run this.

  • Note: This is intended to run on testnet (Rinkeby), make sure you have enough ETH + ERC20 tokens:
https://faucets.chain.link/rinkeby
https://teller.gitbook.io/teller-1/testing-guide/getting-testnet-tokens-rinkeby
  1. Clone the repo

  2. cd into the uniswap-contracts and install the packages, then deploy the contracts

$ cd uniswap-contracts
$ npm install
  1. Make sure to change the privateKeyDev on the hardhat.config.js file to match one of the private keys of your node.

  2. Compile and deploy:

$ npx hardhat compile
$ npx hardhat run scripts/deploy.js --network rinkeby
  1. Copy the contracts addresses, i.e.:
Deploying contracts using 0xae010f0c8Ba3360F2A9D8b035CB07C290f6e01fe
WETH deployed to : 0xCBde346527cd6dBb2B8ce6aFcbf9e5BdeA12FD8d
Factory deployed to : 0xa69E9a242AF23728323a1bF0212E7e852367E807
Router V02 deployed to :  0x66F234E6f341A392aCcE3717dE6C3bcEF8190184
Multicall deployed to : 0xfc9541F8471eB3032d1F118954167733CB1209bD
VolcanoCoin deployed to : 0x64d71B10369A05e24Fd40743Bc6633C2A07531d5
  1. cd into the uniswap-interface and install the packages using yarn:
$ cd interface
$ npm install -g yarn
$ yarn
  1. Run it:
$ yarn start
  1. Access to it through http://localhost:3000

  2. In case you are wondering, token's list is here

Disclaimer:

All of the smart contracts were extracted from the official UniswapV2 Core and Uniswap Interface v3.0.0 repositories.

Creators