https://github.com/kaiachain/kaia-etl
Python scripts for ETL (extract, transform and load) jobs for Klaytn blocks, transactions, ERC20 / ERC721 tokens, transfers, receipts, logs, contracts, internal transactions.
https://github.com/kaiachain/kaia-etl
blockchain-analytics erc20 erc721 etl export klaytn transaction
Last synced: 5 months ago
JSON representation
Python scripts for ETL (extract, transform and load) jobs for Klaytn blocks, transactions, ERC20 / ERC721 tokens, transfers, receipts, logs, contracts, internal transactions.
- Host: GitHub
- URL: https://github.com/kaiachain/kaia-etl
- Owner: kaiachain
- License: other
- Created: 2022-08-26T02:36:17.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-09-30T06:59:30.000Z (over 1 year ago)
- Last Synced: 2025-09-25T02:41:24.903Z (9 months ago)
- Topics: blockchain-analytics, erc20, erc721, etl, export, klaytn, transaction
- Language: Python
- Homepage:
- Size: 552 KB
- Stars: 25
- Watchers: 9
- Forks: 15
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Klaytn ETL
Klaytn ETL lets you convert Klaytn blockchain data into convenient formats like JSONs, CSVs and relational databases.
This is a fork of [Ethereum ETL](https://github.com/blockchain-etl/ethereum-etl).
[Full documentation available here](http://klaytn-etl.readthedocs.io/).
***Notice: Klaytn ETL is still on the beta version. However, CLIs are all functional.***
## Quickstart
Install Klaytn ETL:
```bash
pip3 install klaytn-etl-cli
```
Export blocks and transactions
```bash
> klaytnetl export_blocks_and_transactions --start-block 0 --end-block 5000 \
--blocks-output blocks.json --transactions-output transactions.json
```
Export ERC20 and ERC721 transfers
```bash
> klaytnetl export_token_transfers --start-block 0 --end-block 5000 \
--output token_transfers.json
```
Export traces
```bash
> klaytnetl export_traces --start-block 0 --end-block 5000 \
--output traces.json
```
Find other commands [here](klaytnetl/cli/__init__.py).
For the latest version, check out the repo and call
```bash
> pip3 install -e .
> python3 klaytnetl.py
```
### Running in Docker
1. Install Docker https://docs.docker.com/install/
2. Build a docker image
```bash
> docker build -t klaytn-etl:latest .
> docker image ls
```
3. Run a container out of the image
```bash
> docker run -v $HOME/output:/klaytn-etl/output klaytn-etl:latest export_all -s 0 -e 5499999 -b 100000
> docker run -v $HOME/output:/klaytn-etl/output klaytn-etl:latest export_all -s 2018-01-01 -e 2018-01-01
```