Skip to main content

ape-etherscan: Etherscan Explorer Plugin for Ethereum-based networks

Project description

Ape Etherscan Plugin

The following blockchain explorers are supported in this plugin:

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 construct to create contract instances. When the explorer plugin locates a contract type for a given address, the Contract return-value uses that contract type.

from ape import accounts, Contract

contract = Contract("0x55a8a39bc9694714e2874c1ce77aa1e599461e18")
receipt = contract.call_mutable_method("arg0", sender=accounts.load("acct"))

The first line contract = Contract("0x55a8a39bc9694714e2874c1ce77aa1e599461e18") checks if ape has a cached contract-type for the address 0x55a8a39bc9694714e2874c1ce77aa1e599461e18. If it does not find a cached contract type, it uses an explorer plugin to attempt to find one. If found, the contract type is then cached to disk 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.

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


Download files

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

Source Distribution

ape-etherscan-0.3.1.tar.gz (73.4 kB view details)

Uploaded Source

Built Distribution

ape_etherscan-0.3.1-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

File details

Details for the file ape-etherscan-0.3.1.tar.gz.

File metadata

  • Download URL: ape-etherscan-0.3.1.tar.gz
  • Upload date:
  • Size: 73.4 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.1 requests-toolbelt/0.9.1 urllib3/1.26.10 tqdm/4.64.0 importlib-metadata/4.12.0 keyring/23.6.0 rfc3986/2.0.0 colorama/0.4.5 CPython/3.8.13

File hashes

Hashes for ape-etherscan-0.3.1.tar.gz
Algorithm Hash digest
SHA256 85ee30c381e7db07e451238463a007bda2a9dc165744ae5ec5d28be102f2bd74
MD5 bd40734a10163199b2d21436a90ded29
BLAKE2b-256 386ebfeebecee0b2fe37aa4ecd4b638ad75d6d34499ae8fb3a3e9a2bb45ff210

See more details on using hashes here.

File details

Details for the file ape_etherscan-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: ape_etherscan-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 11.8 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.1 requests-toolbelt/0.9.1 urllib3/1.26.10 tqdm/4.64.0 importlib-metadata/4.12.0 keyring/23.6.0 rfc3986/2.0.0 colorama/0.4.5 CPython/3.8.13

File hashes

Hashes for ape_etherscan-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6ba83a431ba3b35311a0599187b52a4ff733b9546beb27448b289fd4e858a5f8
MD5 383ea3fd41a419f4e7c3202432b6f246
BLAKE2b-256 f48d1e0b302e0f243eb05a42798fef0b7de631f4d3bdb1affee2336983abf9b6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page