- OS: linux. (Windows and mac are not fully tested)
- Python >= 3.10
You can choose a data source that suits you in the following section.
If you want to download via BigQuery, you should prepare an account and environment.
- Sign up a Google account. and then access Google cloud to register Google cloud platform.
- Create a new project, https://console.cloud.google.com/projectcreate
- Create a service account
- Manage keys of the service account just created, create a new key with type of JSON, then you will get a JSON file which will be used to permit demeter-fetch to access google cloud.
If you want to try your own query, you can visit Google cloud console. Or query via api, whose tutorial can be found here
Here is an example of query from blocks.
select * from bigquery-public-data.crypto_ethereum.blocks where timestamp="2015-07-30 15:26:28"
If you want to query from RPC interface of evm chains, you should prepare a node. Or query from an RPC provider like infura, quicknode or alchemy. Setting up your own node will reduce network transmission delays, thus reducing download times. If you have trouble on connection, demeter-fetch also provides proxy configuration.
If you have your own node, you can try Chifra from trueblocks.
After installing, you can indexing chain data with chifra scrape
.
When sync finished, chifra support exporting chain data like blocks, transactions, logs, balances.
demeter-fetch is available on Pypi, you can install by
pip install demeter-fetch
Then prepare a configration file according to config-sample.toml
At last, execute:
demeter-fetch -c config.aave.toml
If you want to use pre-release version, you can clone this repo, and run locally.
git clone https://github.com/zelos-alpha/demeter-fetch.git
cd demeter-fetch
python main.py -c config.aave.toml
Using different configuration files, demeter can download different types of data. Visit samples section for more examples