基于区块链的毕业设计etherscan-python – 以太网扫描python
本文提供基于区块链的毕业设计国外最新区块链项目源码下载,包括solidity,eth,fabric等blockchain区块链,基于区块链的毕业设计etherscan-python – 以太网扫描python 是一篇很好的国外资料
etherscan-python
A minimal, yet complete, python API for etherscan.io.
All of the free GET endpoints from the following modules are provided:
Accounts (source)
get_eth_balance
get_eth_balance_multiple
get_normal_txs_by_address
get_normal_txs_by_address_paginated
get_internal_txs_by_address
get_internal_txs_by_address_paginated
get_internal_txs_by_txhash
get_internal_txs_by_block_range_paginated
get_erc20_token_transfer_events_by_address
get_erc20_token_transfer_events_by_contract_address_paginated
get_erc20_token_transfer_events_by_address_and_contract_paginated
get_erc721_token_transfer_events_by_address
get_erc721_token_transfer_events_by_contract_address_paginated
get_erc721_token_transfer_events_by_address_and_contract_paginated
get_mined_blocks_by_address
get_mined_blocks_by_address_paginated
Contracts (source)
get_contract_abi
get_contract_source_code
Transactions (source)
get_contract_execution_status
get_tx_receipt_status
Blocks (source)
get_block_reward_by_block_number
get_est_block_countdown_time_by_block_number
get_block_number_by_timestamp
GETH/Parity Proxy (source)
get_proxy_block_number
get_proxy_block_by_number
get_proxy_uncle_by_block_number_and_index
get_proxy_block_transaction_count_by_number
get_proxy_transaction_by_hash
get_proxy_transaction_by_block_number_and_index
get_proxy_transaction_count
get_proxy_transaction_receipt
get_proxy_call
get_proxy_code_at
get_proxy_storage_position_at
get_proxy_gas_price
get_proxy_est_gas
Tokens (source)
get_total_supply_by_contract_address
get_acc_balance_by_token_and_contract_address
Gas Tracker (source)
get_est_confirmation_time
get_gas_oracle
Stats (source)
get_total_eth_supply
get_eth_last_price
get_eth_nodes_size
If you think that a newly-added method is missing, kindly open an issue as a feature request and I will do my best to add it.
Installation
Before proceeding, you should register an account on etherscan.io and generate a personal API key to use.
Assuming conda is already installed on your system, first create the environment:
conda env create -f env.yml
Activate the environment:
conda activate etherscan-python
Then, install the package:
pip install .
Run unittests
Test that everything looks OK on your end before proceeding:
coverage run -m unittest discover && coverage report -m
This will regenerate the logs under logs/
with the most recent results and the timestamp of the execution.
Usage
In python
, create a client with your personal etherscan.io API key:
from etherscan import Etherscan api_key = YOUR_API_KEY config_path = "etherscan/configs/stable.json" eth = Etherscan.from_config(config_path, api_key)
Then you can call all available methods, e.g.:
eth.get_eth_balance(address="0xddbd2b932c763ba5b1b7ae3b362eac3e8d40121a") > '40891631566070000000000'
Examples
Examples (arguments and results) for all methods may be found as JSON files here. For example, if you want to use the method get_block_number_by_timestamp
, you can find the supported arguments and the format of its output in its respective JSON file:
{ "method": "get_block_number_by_timestamp", "module": "blocks", "kwargs": { "timestamp": "1578638524", "closest": "before" }, "log_timestamp": "2020-09-30-15:39:18", "res": "9251482" }
where kwargs
refer to the required named arguments and res
refers to the expected result if you were to run:
eth.get_block_number_by_timestamp(timestamp="1578638524", closest="before") > '9251482'
Disclaimer: Those examples blindly use the arguments originally showcased here and the selected wallets/contracts do not reflect any personal preference. You should refer to the same source for additional information regarding specific argument values.
Issues
For problems regarding installing or using the package please open an issue. Kindly avoid disclosing potentially sensitive information such as your API keys or your wallet addresses.
Powered by Etherscan.io APIs.
We use optional third-party analytics cookies to understand how you use GitHub.com so we can build better products. Learn more.
We use optional third-party analytics cookies to understand how you use GitHub.com so we can build better products.
You can always update your selection by clicking Cookie Preferences at the bottom of the page. For more information, see our Privacy Statement.
Essential cookies
We use essential cookies to perform essential website functions, e.g. they’re used to log you in. Learn more
Always active
Analytics cookies
We use analytics cookies to understand how you use our websites so we can make them better, e.g. they’re used to gather information about the pages you visit and how many clicks you need to accomplish a task. Learn more
Ignoring build and dist
etherscan-python
一个最小但完整的python API以太网扫描.io.
All of the free GET endpoints from the following modules are provided:
Accounts (source)
- 按按按地址分配的按u地址
- 按按按按u地址分配的按u地址
- 获得内部用的按按按u地址分列的按u地址
- 获得内部用的按按按按按按按按按按按按按按按按按按按按按按按按按按按按按按按按按按按按按按按按按按按按按按按按按按按按按按按按按按按按按按按按按按按按按某某某一个按某一个按某一个按某一个按某一个按某一个按某个地址划分的按某一个按某一个按某一个地址划分的按某一个按某一个按某一个地址划分li>按地址获取令牌传送事件根据《合同地址》和《合同》的页码,将20个事件由“U”合同获得“20”个令牌“U”转移事件“U事件由“U”地址“U”地址“U合同”标页
- 获得“获得”erc721“U令牌”U转移“U事件”U按U地址“U按地址”转移事件U按U地址按地址
get_internal_txs_by_address_paginated
- 获得“获得erc721”的“U令牌”U转移“U事件”由“U合同”合同地址“U地址”分页的
get_internal_txs_by_block_range_paginated
get_erc20_token_transfer_events_by_address
- 李>获得“获得”erc721“U令牌”通过721“U令牌”的“U转移”U的事件,通过“U的合同地址”的地址,按“U的“U事件按地址和合同分页<
- 根据地址获得“块”的块,按“地址”得到“块”的“块”,按“地址”的“块”按“地址”分页的
- 获得合同,获得合同的源代码
- 获得合同的源代码
- 获得合同,合同的执行情况执行状态
- 获得“送”的“收到”的状态
- 获得“块”的“奖励”,按“块”的块数获得
Contracts (source)
- 获得“获得”块“块”的奖励,按块块的块数获得的奖励
- 获得“获得”块,获得“块”的块,块块的执行情况的执行状态
Transactions (source)
- 获得代理交易的交易数量的数量
- 获得_proxy _交易的u收据
Blocks (source)
- 获得_proxy _uproxy _ _ _proxy _ _ _proxy _ _ _proxy _存储_位置_
- 获得_proxy _的天然气价格
- 获得_总供应_总供应_,通过合同_合同的地址
GETH/Parity Proxy (source)
- 获得_供应_供应_总供应_ _ _供应u _ _ _ _ _ _ _u按令牌和合同地址
- 获取确认时间
get_proxy_uncle_by_block_number_and_index
get_proxy_block_transaction_count_by_number
get_proxy_transaction_by_hash
get_proxy_transaction_by_block_number_and_index
get_proxy_transaction_count
get_proxy_transaction_receipt
get_proxy_call
get_proxy_code_at
get_proxy_storage_position_at
get_proxy_gas_price
get_proxy_est_gas
Tokens (source)
get_total_supply_by_contract_address
get_acc_balance_by_token_and_contract_address
Gas Tracker (source)
get_est_confirmation_time
get_gas_oracle
Stats (source)
get_total_eth_supply
get_eth_last_price
get_eth_nodes_size
If you think that a newly-added method is missing, kindly open an issue as a feature request and I will do my best to add it.
Installation
Before proceeding, you should register an account on etherscan.io and generate a personal API key to use.
Assuming conda is already installed on your system, first create the environment:
conda env create -f env.yml
conda activate etherscan-python
继续之前,您应该在上注册一个帐户以太网扫描.io并生成一个要使用的个人API密钥。
pip install .
Run unittests
假设系统上已经安装了conda,首先创建环境:
coverage run -m unittest discover && coverage report -m
激活环境:
Usage
然后,安装程序包:
from etherscan import Etherscan api_key = YOUR_API_KEY config_path = "etherscan/configs/stable.json" eth = Etherscan.from_config(config_path, api_key)
在继续之前,测试您的端部是否一切正常:
eth.get_eth_balance(address="0xddbd2b932c763ba5b1b7ae3b362eac3e8d40121a") > '40891631566070000000000'
Examples
这将使用最新的结果和执行的时间戳在logs/下重新生成日志。
{ "method": "get_block_number_by_timestamp", "module": "blocks", "kwargs": { "timestamp": "1578638524", "closest": "before" }, "log_timestamp": "2020-09-30-15:39:18", "res": "9251482" }
在python中,使用您的个人以太网扫描.ioAPI键:
eth.get_block_number_by_timestamp(timestamp="1578638524", closest="before") > '9251482'
然后您可以调用所有可用的方法,例如:
Issues
所有方法的示例(参数和结果)都可以在这里找到JSON文件。例如,如果要使用get_block_number_by_timestamp方法,您可以在其各自的JSON文件中找到支持的参数及其输出格式:
其中kwargs表示必需的命名参数,res表示运行时的预期结果:
免责声明:这些示例盲目使用此处最初显示的参数,而选定的钱包/合同则不使用反映个人喜好。有关特定参数值的其他信息,请参阅同一源。
有关安装或使用软件包的问题,请打开问题。请避免泄露潜在的敏感信息,如您的API密钥或钱包地址。
Essential cookies
由以太网扫描.io原料药。
Always active
Analytics cookies
我们使用可选的第三方分析cookies来了解您如何使用GitHub.com网站所以我们可以制造更好的产品。了解更多。
Ignoring build and dist
部分转自网络,侵权联系删除区块链源码网
区块链知识分享网, 以太坊dapp资源网, 区块链教程, fabric教程下载, 区块链书籍下载, 区块链资料下载, 区块链视频教程下载, 区块链基础教程, 区块链入门教程, 区块链资源 » 基于区块链的毕业设计etherscan-python – 以太网扫描python