Skip to content

A script built on bscscan-python to query the BscScan API for events where BEP-20 tokens were minted. Only works if the token's contract emits a "Transfer" event originating from the zero address when minting.

Notifications You must be signed in to change notification settings

allt0ld/BscScan-Minting

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

BscScan-Minting

I used this script to verify how much CAKE gets emitted net of burns from Pancakeswap's MasterchefV2 contract. As far as I can tell, Pancakeswap's team's claims about ~321,200 CAKE being emitted daily (~2,248,400 weekly) are fairly accurate.

You'll need to install bscscan-python and sign up for an account on BscScan to generate an API key. BscScan's events (logs) endpoint returns up to 1,000 objects per query. I queried in periods of 40,320 BSC blocks because I found out through manual testing that the API would return nearly 1,000 minting objects for periods of around 56,000-69,000 blocks (only for CAKE specifically). Making 5 queries total was enough for my purposes, as the API rate limits to 5 queries/s, but if you need more, you'll need to update the algorithm to loop between querying the API up to 5 times at once and sleeping for around 1 s.

About

A script built on bscscan-python to query the BscScan API for events where BEP-20 tokens were minted. Only works if the token's contract emits a "Transfer" event originating from the zero address when minting.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages