Skip to main content

Tools for exporting Solana blockchain data to CSV or JSON

Project description

Solana ETL CLI

Solana ETL lets you convert blockchain data into convenient formats like CSVs and relational databases.

Quickstart

Install Solana ETL CLI:

cd cli
python setup.py install

Environment:

> export SERUM_DEX_V3 = "9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin"
> export METADATA_PROGRAM_ID = "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"

Export all

> solanaetl export_all \
    --start 138802069 \
    --end 138802069 \
    --output-dir=./output

Export blocks and transactions (include input accounts, instructions):

> solanaetl export_blocks_and_transactions --start-block 0 --end-block 500000 \
    --blocks-output blocks.csv \
    --transactions-output transactions.csv \
    --instructions-output instructions.csv

Export instructions:

> solanaetl extract_field -i transactions.csv -o transaction_signatures.txt -f signature
> solanaetl export_instructions \
    -t ./transaction_signatures.txt \
    -o instructions.csv

Extract token transfer:

> solanaetl extract_token_transfers \
    -i ./instructions.csv \
    -o token_transfers.csv

Export accounts:

> solanaetl extract_accounts \
    -t ./transactions.csv \
    -o accounts.csv

Export tokens:

> solanaetl extract_tokens \
    -a ./accounts.csv \
    -o tokens.csv

Test

> python -m pip install -r requirements_test.txt
> python -m pytest

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

solana-etl-0.0.6.tar.gz (27.4 kB view details)

Uploaded Source

File details

Details for the file solana-etl-0.0.6.tar.gz.

File metadata

  • Download URL: solana-etl-0.0.6.tar.gz
  • Upload date:
  • Size: 27.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for solana-etl-0.0.6.tar.gz
Algorithm Hash digest
SHA256 b94093a87e698fa4425b71143bf9db8f2f8d52598fc82a51af5c8d5dc9d09165
MD5 d75678ef422c83289bb0ac5f9c9df947
BLAKE2b-256 026db69ec716b87c2eaefcb7d02996bc3b8faa3dd8d3d8985b448ecf85dd7787

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page