Metadata-Version: 2.1
Name: klaytn-etl-cli
Version: 0.1.0
Summary: Tools for exporting Klaytn blockchain data to JSON
Home-page: https://github.com/klaytn/klaytn-etl
Author: Yongchan Hong
Author-email: chan.hong@krustuniverse.com
Project-URL: Bug Reports, https://github.com/klaytn/klaytn-etl/issues
Project-URL: Source, https://github.com/klaytn/klaytn-etl/tree/klaytn-etl
Keywords: klaytn,etl,batch
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Requires-Python: >=3.7.2,<4
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: web3 (<6,>=5.29)
Requires-Dist: eth-rlp (<0.3)
Requires-Dist: eth-utils (==1.10)
Requires-Dist: eth-abi (==2.1.1)
Requires-Dist: python-dateutil (<3,>=2.8.0)
Requires-Dist: click (==8.0.4)
Requires-Dist: ethereum-dasm (==0.1.4)
Requires-Dist: pytz (==2022.1)
Requires-Dist: base58
Requires-Dist: requests
Requires-Dist: boto3
Provides-Extra: dev
Requires-Dist: pytest (~=4.3.0) ; extra == 'dev'

# 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).

***Notice: Klaytn ETL is still on the beta version. However, CLIs are all functional.***

***Documents about command reference will be soon updated.***

***Please check issues to figure out current works.***

## 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
    ```
