- deploy V3 locally
- understand contracts end 2
- understand concentrated liquidity
- deploy to Sepolia?
- test flash loans in Sepolia
- test pool rebalancing in Sepolia with mock CEX prices
1.Use Node > 22 nvm ls nvm use lts/jod
2.Setup for project creation
mkdir uni-v3-backend && cd uni-v3-backend
Create a project
npm init -y
Install dev dependencies
npm i -D hardhat typescript ts-node @types/node \
@nomicfoundation/hardhat-toolbox @nomicfoundation/hardhat-ethers @nomicfoundation/hardhat-verify \
typechain @typechain/hardhat @typechain/ethers-v6 \
hardhat-dependency-compiler dotenv
Install non-dev dependencies
npm i ethers @uniswap/v3-core @uniswap/v3-periphery @uniswap/swap-router-contracts canonical-weth
Initialise using Hardhat
npx hardhat init
- Updated the tsconfig.json
- Update hardhat-config.ts
- Tell hardhat what compilers would you be using. As I will compile Uni v3 code, I would need 0.7.6 and 0.4.18 for Weth9
-
Write tests
-
Deploy
Try running some of the following tasks:
npx hardhat help
npx hardhat test
REPORT_GAS=true npx hardhat test
npx hardhat node
npx hardhat ignition deploy ./ignition/modules/Lock.ts