Skip to content

hiteshjoshi1/uni-v3-backend

Repository files navigation

Uniswap V3 backend

Goal

  • 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

Initial Setup

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 
  1. Updated the tsconfig.json
  2. 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
  1. Write tests

  2. Deploy

Boiler plate autogenerated , can remove later

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

About

Uni V3 backend

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published