-
Clone the repository or download the code.
-
Navigate to the project directory.
-
Install the necessary dependencies using npm:
cd defi npm install
-
Create a
.env
file in the project directory with the following content:RPC_URL=https://sepolia.infura.io/v3/YOUR_INFURA_PROJECT_ID PRIVATE_KEY=YOUR_PRIVATE_KEY
Replace
YOUR_INFURA_PROJECT_ID
with your Infura project ID andYOUR_PRIVATE_KEY
with your Ethereum wallet's private key.
-
Run the script using Node.js:
node app.js