- This is an intention to fork UniswapV2 as endgame job for the Encode Club Avalance Workshop
- Slides can be found here
- 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
-
Clone the repo
-
cd into the uniswap-contracts and install the packages, then deploy the contracts
$ cd uniswap-contracts
$ npm install
-
Make sure to change the
privateKeyDev
on thehardhat.config.js
file to match one of the private keys of your node. -
Compile and deploy:
$ npx hardhat compile
$ npx hardhat run scripts/deploy.js --network rinkeby
- 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
- cd into the uniswap-interface and install the packages using yarn:
$ cd interface
$ npm install -g yarn
$ yarn
- Run it:
$ yarn start
-
Access to it through
http://localhost:3000
-
In case you are wondering, token's list is here
All of the smart contracts were extracted from the official UniswapV2 Core and Uniswap Interface v3.0.0 repositories.
- Miguel Gagliardo: migag9@gmail.com