Skip to content

"swap_tokens_forking_mainnet" is a Node.js application that performs token swaps on Ethereum's mainnet by forking it through Hardhat Network. The application makes use of the Uniswap protocol to swap Ethereum wrapped Ether (WETH) for Tether (USDT).

Notifications You must be signed in to change notification settings

pedrosgmagalhaes/swap_tokens_forking_mainnet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

"swap_tokens_forking_mainnet" is a Node.js application that performs token swaps on Ethereum's mainnet by forking it through Hardhat Network. The application makes use of the Uniswap protocol to swap Ethereum wrapped Ether (WETH) for Tether (USDT).

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published