Skip to content

dappuniversity/ethers-v6-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ethers V6 Examples

Learn about Ethers.js v6 w/ example scripts.

Technology Stack & Tools

Requirements For Initial Setup

  • Install NodeJS. We recommend using the latest LTS (Long-Term-Support) version, and preferably installing NodeJS via NVM.

Note for Windows Users: We highly recommend installing and using WSL Ubuntu for building projects.

  • Create an Alchemy account, you'll need to create an app for the Ethereum chain, on the mainnet network

  • Create a Tenderly account, you'll need to create a project and a virtual testnet with the parent chain as Ethereum mainnet.

Setting Up

1. Clone/Download the Repository

2. Install Dependencies:

npm install

3. Setup Environment Variables

Before running any scripts, you'll want to create a .env file with the following values (see .env.example):

  • ALCHEMY_API_KEY=""
  • TENDERLY_RPC_URL=""

Running Scripts

1_accounts.js - Reading ETH Balance

node examples/1_accounts.js

2_send_signed_transactions.js - Sending ETH

node examples/2_send_signed_transactions.js

3_read_smart_contracts.js - Read USDC Balance

node examples/3_read_smart_contracts.js

4_write_smart_contracts.js - Send USDC

node examples/4_write_smart_contracts.js

5_contract_events.js - Query Contract Events

node examples/5_contract_events.js

About

Example scripts of using Ethers JS V6

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published