Web 3 py簡単な使い方(三)

1130 ワード

一.Web 3 pyのいくつかの使用例:1.クエリーブロック:・・・
numberで検索
web3.eth.getBlock(12345)
addressで検索
web3.eth.getBlock('0x767c2bfb3bdee3f78676c1285cd757bcd5d8c272cef2eb30d9733800a78c0b6d')
2.       :

web3.eth.getBlock('latest')
最近のブロックのnumberを取得
web3.eth.blockNumber

3.      :
···
web3.eth.getTransaction('0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060')
···
4.    
···
web3.eth.getTransactionReceipt('0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060')

二.Web 3 pyでは、ドキュメントにクエリーできるいくつかの詳細モジュールapiも提供されています.1.Web3.eth :http://web3py.readthedocs.io/en/latest/web3.eth.html 2.Web3.shh :http://web3py.readthedocs.io/en/latest/web3.shh.html 3.Web3.personal :http://web3py.readthedocs.io/en/latest/web3.personal.html 4.Web3.version :http://web3py.readthedocs.io/en/latest/web3.version.html 5.Web3.txpool :http://web3py.readthedocs.io/en/latest/web3.txpool.html 6.Web3.miner :http://web3py.readthedocs.io/en/latest/web3.miner.html 7.Web3.admin :http://web3py.readthedocs.io/en/latest/web3.admin.html