moonstream-to / moonworm

codegen for crypto degens and other ethereum smart contract toolkit for python
Apache License 2.0
36 stars 7 forks source link

Implement MoonstreamEthereumStateProvider and FunctionCallState for function call crawler #11

Closed Yhtiyar closed 2 years ago

Yhtiyar commented 2 years ago

EthereumStateProvider

In function call crawler I am using abstract class for EthereumStateProvider to get blocks, transaction.

I've already implemented EthereumStateProviderW3Impl which uses web3. But for crawling in moonstream we can use mix of our db and web3 for better performance. Since we are crawling all transactions, our db is enough, however if we face missing block from our db we need to get data from web3

FunctionCallCrawlerState

This is abstract class that implements saving/getting data from db. Need to write MoonstreamState for this crawler. Which will save data to labels

Yhtiyar commented 2 years ago

Resolved in #16