memo / eco-nft

A basic guide to ecofriendly CryptoArt (NFTs)
722 stars 54 forks source link

Question: How do you handle the 10k transaction limit with etherscan? #16

Closed brendanmc6 closed 3 years ago

brendanmc6 commented 3 years ago

Just a question. I want the open source eth calculator to handle > 10k transactions but I'm not allowed to paginate past 10k. I have a solution in mind, but then I thought, maybe this is a problem Memo has already solved...

memo commented 3 years ago

Yes I have a gist that addresses this. I don't think it's perfect, but it seems to do the job https://gist.github.com/memo/5ccc30c072e647083824162968e38c3b

brendanmc6 commented 3 years ago

haha that's exactly the same solution I had in mind. Brilliant man thank you!

brendanmc6 commented 3 years ago

@memo oh one more thing, how do you determine the end block #? I was thinking about using a separate API to identify the latest ethereum block-height but I'd like to avoid an extra network request

memo commented 3 years ago

I use https://web3js.readthedocs.io/en/v1.3.4/ anyway, so I read the most recent block from there.