Skip to content

Latest commit

 

History

History
56 lines (38 loc) · 1.31 KB

README.md

File metadata and controls

56 lines (38 loc) · 1.31 KB

Swap Tokens Forking Mainnet

"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).

Getting Started

These instructions will guide you on how to run this project locally.

Tutorial

Prerequisites

  • 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

Installation

  1. Clone the repository:
git clone https://github.com/ioralabs/swap_tokens_forking_mainnet.git
  1. Change the working directory to swap_tokens_forking_mainnet:
cd swap_tokens_forking_mainnet
  1. Install the project dependencies:
yarn install
  1. Running the Project To execute the token swap, use the following command:
yarn hardhat run scripts/01_v2Swap.js

Acknowledgments

  • This project is licensed under the ISC License - see the LICENSE.md file for details.

Author

Pedro Magalhães