Fetch all transfer/approval logs, user balances and token holder for your ERC20 using TheGraph. It may take weeks to sync the subgraph, better deploy it once you deployed your scam token.
demo: https://thegraph.com/hosted-service/subgraph/ruggedev/uni-token
-
Fork this repo
-
Install dependencies
$ yarn
$ chmod u+x scripts/*
- Update
.env
$ cp .env.template .env
Remember to create the subgraph first.
-
Update
config.json
-
Generate
subgraph.yaml
file and deploy.
$ yarn prepare:yaml
$ yarn deploy
To get snapshot on a specific block height:
{
infos(block: {number: <BLOCK_NUMBER>}) {
id
lastUpdateBlock
lastUpdateTimestamp
transferCount
tokenHolder
}
}