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!
- Host: GitHub
- URL: https://github.com/net2devcrypto/erc-20-transfer-events
- Owner: net2devcrypto
- Created: 2024-04-10T22:31:28.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-11T05:37:13.000Z (almost 2 years ago)
- Last Synced: 2025-01-29T21:43:17.083Z (12 months ago)
- Topics: erc-20, etherscan, smart-contract-events, solidity
- Language: JavaScript
- Homepage:
- Size: 25.4 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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!!