Find new deployed ERC20 tokens #3337
Replies: 1 comment
-
Do you mean created by you or any person? I assume it's by other people (since you could simply use a factory contract). But detecting ERC20 tokens created by others is very tricky. This is because a contract can seem like it's an ERC20 but it can be not (someone can write a contract that could pass your checks but isn't fully ERC20). A fair way etherscan seems to do it is by looking at events in a new block and identifying Transfer ones and assigning the contract that emitted it as ERC20 (you can confirm this by deploying a ERC20 contract without any initial mints, the token tracker is shown on Etherscan only after the first mint/transfer). Doing this with ethers.js over RPC provider can be costly but still possible. You'd have to get a block and all of it's tx hashes, and fetch receipts for every txs which will contain logs. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
I am searching for a way to detect newly created ERC20 tokens.
Maybe you got a smart idea how to do this with Ether JS or other coding ways?
Thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions