An open API service indexing awesome lists of open source software.

https://github.com/net2devcrypto/erc-20-transfer-events

A function that returns transfer events from ERC-20 token smart contracts without the need of third party API. Straight from the blockchain!
https://github.com/net2devcrypto/erc-20-transfer-events

erc-20 etherscan smart-contract-events solidity

Last synced: 4 months ago
JSON representation

A function that returns transfer events from ERC-20 token smart contracts without the need of third party API. Straight from the blockchain!

Awesome Lists containing this project

README

          

# ERC-20-Transfer-Events
A function that returns transfer events from ERC-20 token smart contracts without the need of third party API. Straight from the blockchain!

> [!NOTE]
> THE FILES ATTACHED TO THIS REPO ARE FOR EDUCATIONAL PURPOSES ONLY.
> NOT FINANCIAL ADVICE
> USE IT AT YOUR OWN RISK, I'M NOT RESPONSIBLE FOR ANY USE, ISSUES.

Instructions

1- Download Repo folder "erc20-transfer-events", extract, open events.js and modify as you need:

```shell
//Replace with values, save and run!
const rpcaddress = "https://eth.llamarpc.com" //RPC ADDRESS, Example ETH Mainnet RPC Address.
const tokenaddress = "0xdAC17F958D2ee523a2206206994597C13D831ec7"; // TOKEN ADDRESS, Example USDT Address on Ethereum Mainnet.
const lastNumberOfBlocks = 5; //Most recent amount of blocks to Get Event Info. You might have limitations going above 100.
const converted = "mwei"; // Value conversion wei 18, mwei 6, gwei 10, Verify with token contract decimals.
```
Save file CTRL + S;

2- Install dependencies then run!

```shell
cd erc20-transfer-events
npm i
node events.js
```

ENJOY!!

A BIG FAVOR, IF YOU FIND THIS REPO USEFUL, PLEASE GIVE IT A STAR, FOLLOW ME ON GITHUB AND Subscribe to my YouTube Channel @NET2DEV!!