High-level tools and library to interact with Ethereum
Project description
eth-tools
Small library/CLI tool wrapping web3py.
Installation
pip install git+https://github.com/danhper/ethereum-tools.git
CLI Usage
Web3 provider needs to be set either through the WEB3_PROVIDER_URI
environment
variable or through the --web3-uri
CLI flag.
Fetching blocks
eth-tools fetch-blocks -s 10000000 -e 10000999 -o blocks.csv.gz
Fetching events
eth-tools fetch-events -a 0x6b175474e89094c44da98b954eedeac495271d0f --abi /path/to/abi.json -s 10000000 -e 10000999 -o events.jsonl.gz
Library usage
from web3 import Web3
from web3.providers.auto import load_provider_from_environment
from eth_tools.block_iterator import BlockIterator
provider = load_provider_from_environment()
web3 = Web3(provider)
block_iterator = BlockIterator(web3, start_block=10_000_000, end_block=10_000_999)
for block in block_iterator:
print(block.number)
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
ethereum-tools-0.0.0.tar.gz
(10.5 kB
view details)
Built Distribution
File details
Details for the file ethereum-tools-0.0.0.tar.gz
.
File metadata
- Download URL: ethereum-tools-0.0.0.tar.gz
- Upload date:
- Size: 10.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c7fb00752cfe8a9dc791d3c1adf4fc476594f174a4400f1a7ed6ea8a78929a6f |
|
MD5 | f941e9d4f33d5539f875dad83dbcbd85 |
|
BLAKE2b-256 | fde984e63cca43a821771e3cd8dc83776e2a19ca53b264375e8c311f1c1d03ce |
File details
Details for the file ethereum_tools-0.0.0-py3-none-any.whl
.
File metadata
- Download URL: ethereum_tools-0.0.0-py3-none-any.whl
- Upload date:
- Size: 13.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d608066dd068ed9af862ffd4351841f3cd99f507ee943ba1c5908361c9b44f3 |
|
MD5 | eedd43fb664d23ce7e24de6b561548b9 |
|
BLAKE2b-256 | f421fa0830ce9b24c52af6bc7fe1d96c1ca76adb086fb16b73017eb51e816b44 |