Skip to main content

ape-ens: Ape plugin for ENS argument conversion and contracts

Project description

Quick Start

Ape plugin for ENS argument conversion and contracts

Dependencies

  • python3 version 3.8 or greater, python3-dev

Installation

via pip

You can install the latest release via pip:

pip install ape-ens

via setuptools

You can clone the repository and use setuptools for the most up-to-date version:

git clone https://github.com/ApeWorX/ape-ens.git
cd ape-ens
python3 setup.py install

Quick Usage

The ENS plugin requires a mainnet connection to resolve ENS names because ENS contracts are only deployed to mainnet. Thus, the first thing you should do is ensure you have configured a mainnet provider. For example, if you use infura or alchemy, install the associated plugin:

ape plugins install infura

Afterwards, you should see it in the output of the list command:

$ ape plugins list

Installed Plugins:
  infura      0.4.0
  ...

After your provider plugin of choice is installed, configure it to be your default mainnet provider in your ape-config.yaml file:

ethereum:
  mainnet:
    default_provider: infura

Finally, you can start the ape console using any network of your choice:

ape console --network :rinkeby:infura

Then, convert an ens domain to an AddressType:

In [1]: from ape.types import AddressType
In [2]: convert("vitalik.eth", AddressType)
Out[2]: '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045'

The ENS plugin temporarily connects to mainnet, caches the address resolution, and then your original network uses the result.

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-ens-0.5.0.tar.gz (14.9 kB view details)

Uploaded Source

Built Distribution

ape_ens-0.5.0-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file ape-ens-0.5.0.tar.gz.

File metadata

  • Download URL: ape-ens-0.5.0.tar.gz
  • Upload date:
  • Size: 14.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/37.1 requests/2.28.1 requests-toolbelt/0.9.1 urllib3/1.26.12 tqdm/4.64.1 importlib-metadata/4.12.0 keyring/23.9.1 rfc3986/2.0.0 colorama/0.4.5 CPython/3.8.13

File hashes

Hashes for ape-ens-0.5.0.tar.gz
Algorithm Hash digest
SHA256 5fa0bae2bf9cb56bd392e0c8b5439ce3a2e46a438941e926885b90e6bd33f3fe
MD5 6dbadfae5342427a0654fc106db48d40
BLAKE2b-256 5d2b0a08c7faec6087d4fc43202614d0aaffc350b4e6d30649f311214bcf7c8c

See more details on using hashes here.

File details

Details for the file ape_ens-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: ape_ens-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 8.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/37.1 requests/2.28.1 requests-toolbelt/0.9.1 urllib3/1.26.12 tqdm/4.64.1 importlib-metadata/4.12.0 keyring/23.9.1 rfc3986/2.0.0 colorama/0.4.5 CPython/3.8.13

File hashes

Hashes for ape_ens-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cf7275a3050c9df2ebaa86b01f2c2a9f7ade6e083e8b4e92bf8d448017bf766f
MD5 61d7c4f432224f3c60ac4302983fa50c
BLAKE2b-256 d4d83b098ed4ce876d0e1b2d5f214698c87cf0a8308f468f0a64f92c41f84dc8

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