Last active
July 21, 2018 07:46
-
-
Save traderbagel/5adda43c97a2ecc86355d4e6c87522d8 to your computer and use it in GitHub Desktop.
Initial web3.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> from web3 import HTTPProvider, Web3 | |
>>> from web3.utils.datastructures import AttributeDict | |
>>> FULL_NODE_HOSTS = 'https://mainnet.infura.io/v3/5ed2f03bbff64000b84fef413614c437' | |
>>> provider = HTTPProvider(FULL_NODE_HOSTS) | |
>>> web3 = Web3(provider) | |
>>> web3.eth.blockNumber | |
6002659 | |
>>> web3.version.node | |
"Geth/v1.8.6-patched-leveldb-8818ab0b/linux-amd64/go1.9.2" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment