Skip to main content

No project description provided

Project description

Hitomi

License: Apache CircleCI Codacy Badge PyPI Code style: black

Ethereum console for any node.

Install

$ pip install hitomi

Quick start

Provide a node to connect to and it will drop you into a Python REPL console.

$ hitomi https://mainnet.infura.io      
Hitomi v0.1.1.

Connected to https://mainnet.infura.io.
Chain ID: 1
Block number: 9294088
Mining: False (0 hash rate)
Syncing: False

>>> 

The initialized web3 object is available. All available commands are documented here

>>> web3.eth.blockNumber
1
>>> web3.eth.getBlock(1)
{   'difficulty': 0,
    'extraData': HexBytes('0x'),
    'gasLimit': 6721975,
    'gasUsed': 130535,
    'hash': HexBytes('0x85e4b6c1b09258ac87b135d40be27da551faeb7d47c39fd6c031bfb9e2ccb33a'),
    'logsBloom': HexBytes('0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'),
    'miner': '0x0000000000000000000000000000000000000000',
    'mixHash': HexBytes('0x0000000000000000000000000000000000000000000000000000000000000000'),
    'nonce': HexBytes('0x0000000000000000'),
    'number': 1,
    'parentHash': HexBytes('0x0cb1921fc2953b6fff2f7db200cb9329c4f23c2aa4f9428dfe7c7af24996b16e'),
    'receiptsRoot': HexBytes('0x9d8502b53de7e5aca49e6b80af927d7b8e9cea242ea907527b406c259d3912ec'),
    'sha3Uncles': HexBytes('0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347'),
    'size': 1000,
    'stateRoot': HexBytes('0xb65b969d6179e8a2f8946fa9525918d0dbcabbe4e168071b273bd27603938ef2'),
    'timestamp': 1579701558,
    'totalDifficulty': 0,
    'transactions': [   HexBytes('0x46b40a1bf33d4d656734bd88966b520dce601d919d2a6f848d3b8c0bae3c3086')],
    'transactionsRoot': HexBytes('0x9138007037f44109896cba97cdb66cb31232ee83c36fb226ae28e304144540f3'),
    'uncles': []}

Commands

Once you are dropped in the console there are some commands available

Accounts

>>> accounts
[   '0xd802f1f519E0F871C6aD07689C09F305F26b1b4a',
    '0x14a7bc9a095e8cc4c7CC3BE8F1a7F3702A942538',
    '0x1790A965472dB702d042AB3D5CAa35bC34133293',
    '0xf0ba180BDE68d5cF6c885977DC85f591CBB255a9',
    '0x269734969962453E11E12027642180a9f26b67E4',
    '0x605489943C49F294262DDCBDC8d2BC181D452084',
    '0x5486d7345809d7b68f3aAE773FD67BB2f0c388A3',
    '0xd2706e9dCe4CD06A64E4556254C800e070f42644',
    '0x98ffbeE4A7cf2E47FA343b09E4Bae737e7BcD535',
    '0xf12286180309C4fb7A644f4F08a294a9c2AA23B4']

Why Hitomi?

Hitomi Tanaka

Project details


Download files

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

Files for hitomi, version 0.3.4
Filename, size File type Python version Upload date Hashes
Filename, size hitomi-0.3.4-py3-none-any.whl (10.8 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size hitomi-0.3.4.tar.gz (8.9 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page