Skip to content

Latest commit

 

History

History
66 lines (53 loc) · 1.92 KB

README.md

File metadata and controls

66 lines (53 loc) · 1.92 KB

Uniswap V2

Actions Status Version

In-depth documentation on Uniswap V2 is available at uniswap.org.

The built contract artifacts can be browsed via unpkg.com.

Overview

This repository contains smart contracts and scripts to deploy Uniswap V2 related contracts and get the initcodehash from the Utils contract.

Prerequisites

  • Node.js v12+ LTS and npm (comes with Node)
  • Hardhat

Installation

Clone the repository:

git clone https://github.com/Caerus-Chain/uniswap-v2-core

Navigate to the project folder:

cd uniswap-v2-core

Install dependencies:

npm install

Set Up Configuration:

  1. Review the .example.env file.
  2. Create a .env file based on the example and adjust the values as needed.

For Linux or macOS:

cp .example.env .env

For Windows:

copy .example.env .env

Compilation

Compile the smart contracts using Hardhat:

npx hardhat compile

Quick Start Guide

1. Testing

Run the following command to execute the contract tests. Make sure you've written the tests in your Hardhat project's test directory.

npx hardhat test

2. Deployment:

To deploy the Uniswap V2 related contracts, first compile the contracts using Hardhat's built-in Solidity compiler. Then, deploy UniswapV2Factory and Utils contracts to your desired network, which in this case is the Caerus network.

Run the following command:

npx hardhat run scripts/deploy.js --network caerus

Conclusion

If you would like to contribute to the project, please fork the repository, make your changes, and then submit a pull request. We appreciate all contributions and feedback!