This documentation provides a comprehensive guide for deploying UniswapV3 contracts. Tailored for developers, it streamlines the process of setting up, configuring, and deploying these contracts on various blockchain networks.
- Node.js and npm must be installed on your system.
- Familiarity with Ethereum development and the use of Hardhat.
-
Environment Setup
Begin by cloning the repository and installing the necessary dependencies. Rename the
example.env
file to.env
to prepare for environment variable configuration:mv example.env .env
-
Configure Environment Variables
Open the .env file in a text editor and input your private key:
PRIVATE_KEY=<YourPrivateKeyHere>
-
install dependencies
yarn
ornpm i
-
Adjusting Deployment Settings
Modify the
hardhat.config.js
file to target specific blockchain networks for deployment. This configuration allows for flexible deployment across supported chains.
- Edit the deployment script to correspond to your sepcific network
- Run the deployment script with the following command:
bash run.bash
This command deploys the UniswapV3 contracts, sets up example pools, and executes some initial swap transactions for sanity checks.
Upon successful deployment, the script outputs the addresses of the deployed contracts, example pools, and token addresses in .env
file.