"swap_tokens_forking_mainnet" is a Node.js application that performs token swaps on Ethereum's mainnet by forking it through the Hardhat Network. The application uses the Uniswap protocol to swap Ethereum wrapped Ether (WETH) for Tether (USDT).
These instructions will guide you on how to run this project locally.
- Node.js v14.17 or later
- Yarn v1.22 or later
You'll also need to have the following environment variable:
- INFURA_MAINNET_ENDPOINT: Your Infura mainnet URL
- Clone the repository:
git clone https://github.com/ioralabs/swap_tokens_forking_mainnet.git
- Change the working directory to swap_tokens_forking_mainnet:
cd swap_tokens_forking_mainnet
- Install the project dependencies:
yarn install
- Running the Project To execute the token swap, use the following command:
yarn hardhat run scripts/01_v2Swap.js
- This project is licensed under the ISC License - see the LICENSE.md file for details.