ape-etherscan: Etherscan Explorer Plugin for Ethereum-based networks
Project description
Ape Etherscan Plugin
Etherscan Explorer Plugin for Ethereum-based networks.
Dependencies
- python3 version 3.7.2 or greater, python3-dev
Installation
via pip
You can install the latest release via pip
:
pip install ape-etherscan
via setuptools
You can clone the repository and use setuptools
for the most up-to-date version:
git clone https://github.com/ApeWorX/ape-etherscan.git
cd ape-etherscan
python3 setup.py install
Quick Usage
Transaction URLs
When you have this plugin installed, Etherscan explorer URLs appear in CLI output.
INFO: Submitted 0x123321123321123321123321123aaaadaaaee4b2aaa07901b80716cc357a9646
etherscan URL: https://rinkeby.etherscan.io/tx/0x123321123321123321123321123aaaadaaaee4b2aaa07901b80716cc357a9646
Contract Types
The ape-etherscan
plugin also assists in fetching contract_types
.
Use the Contract
top-level ape construct to create contract instances.
When you have an explorer plugin installed and it locates a contract type at the give address, the Contract
return-value will use that contract type.
from ape import accounts, Contract
# The following with fetch a contract type from mainnet using the `ape-explorer` plugin.
# The contract type is then cached to disc (and in memory for the active session) so that subsequent invocations don't require HTTP calls.
# The return value from `Contract` is a `ContractInstance`, so it is connected to your active provider and ready for transactions.
contract_from_mainnet = Contract("0x55a8a39bc9694714e2874c1ce77aa1e599461e18")
receipt = contract_from_mainnet.call_mutable_method("arg0", sender=accounts.load("acct"))
NOTE: Vyper contracts from Etherscan always return the name Vyper_contract
.
However, if the plugin detects that the contract type has a method named symbol
, it will use the return value from that call instead.
Development
Please see the contributing guide to learn more how to contribute to this project. Comments, questions, criticisms and pull requests are welcomed.
License
This project is licensed under the Apache 2.0.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file ape-etherscan-0.3.0.tar.gz
.
File metadata
- Download URL: ape-etherscan-0.3.0.tar.gz
- Upload date:
- Size: 72.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/35.0 requests/2.28.0 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.64.0 importlib-metadata/4.11.4 keyring/23.6.0 rfc3986/2.0.0 colorama/0.4.5 CPython/3.8.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d146e590ec1e1c31daa9b203a418e4feba041e4231faf030ad1d31436c9618c2 |
|
MD5 | 9e53675594e66e560b1a7ee6d3513e4c |
|
BLAKE2b-256 | 7e7fbc6db7a0b3b9461431e7a34c36e72c6f5d5adfdfbd4cb6dd824605d0f61b |
File details
Details for the file ape_etherscan-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: ape_etherscan-0.3.0-py3-none-any.whl
- Upload date:
- Size: 11.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/35.0 requests/2.28.0 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.64.0 importlib-metadata/4.11.4 keyring/23.6.0 rfc3986/2.0.0 colorama/0.4.5 CPython/3.8.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9106a9681d3c3db94a96a0a7b13194765530866afa0c49419bda077e980f9de7 |
|
MD5 | 5a7937a1ed90d128fe248a0f738247ef |
|
BLAKE2b-256 | bbed00217684a3caf8e59fae381c7dfe6c9caf63e4b7052a006080c4fdc7aaf0 |