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

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.6.1.tar.gz (15.9 kB view details)

Uploaded Source

Built Distribution

ape_ens-0.6.1-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ape-ens-0.6.1.tar.gz
  • Upload date:
  • Size: 15.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.11

File hashes

Hashes for ape-ens-0.6.1.tar.gz
Algorithm Hash digest
SHA256 de2641aa373b4516c8e74580430c5b71d0652706f059a38c98be6c0e459b5580
MD5 3ef1951d9d7ca6fadbe9d8e63ced3184
BLAKE2b-256 6496d1b493c9e28ecb8855a1d1b20eabbe1ad10543792cac098e65c70c26c9d2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ape_ens-0.6.1-py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.11

File hashes

Hashes for ape_ens-0.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d09a8ca3ae23126a6debb7599ae9e7c82cf11d09d790cdc8a7a2325990756832
MD5 15e06da605e9eb549a6458fc5fd68fbc
BLAKE2b-256 66c693e5d9dc31184e5e17c7cdc61c5ad01272b165a3b14ef6b8a5d0d5003387

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