๐Ÿฆ„
Uniswapper
A component for swapping erc20s on Uniswap (plus tokenlists + local forks of mainnet!)

Branch Info

Author: Austin Griffith Source code: https://github.com/scaffold-eth/scaffold-eth-examples/tree/uniswapper Intended audience: Intermediate Topics: Scaffold-eth basics, DEX

๐Ÿƒโ€โ™€๏ธ Quick Start

1
git clone -b uniswapper https://github.com/scaffold-eth/scaffold-eth-examples.git uniswapper-scaffold
2
โ€‹
3
cd uniswapper-scaffold
Copied!
1
yarn install
Copied!
1
yarn start
Copied!
  • In a second terminal window run:
1
yarn fork
Copied!
This branch uses a local fork of mainnet, which is easy to do with Hardhat (see here to learn more). The template configuration uses an Infura node, however this is not a full archive node, so it will only work for an hour or so. To get a long-lasting fork...
  • Go to alchemyapi.io and get an API key for mainnet
  • Replace the Infura URL with an Alchemy URL with your API key (i.e. https://eth-mainnet.alchemyapi.io/v2/<API_KEY_HERE>) into the fork script on line 28 of /packages/hardhat/package.json
๐Ÿ“ฑ Open http://localhost:3000 to see the app
Notes:
  • This widget uses tokenlists to import the erc20s of your choice