Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Async ens no factory #2547

Merged
merged 5 commits into from
Jul 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions docs/ens.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,16 @@ ENS API

Continue below for the detailed specs on each method and class in the ens module.

ens\.main module
ens\.ens module
----------------

.. automodule:: ens.main
.. automodule:: ens.ens
:members:

ens\.async_ens module
---------------------

.. automodule:: ens.async_ens
:members:

ens\.exceptions module
Expand Down
16 changes: 8 additions & 8 deletions docs/ens_overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ an address from a name, set up your own address, and more.
Setup
-----

Create an :class:`~ens.main.ENS` object (named ``ns`` below) in one of three ways:
Create an :class:`~ens.ENS` object (named ``ns`` below) in one of three ways:

1. Automatic detection
2. Specify an instance or list of :ref:`providers`
Expand Down Expand Up @@ -93,7 +93,7 @@ Set Up Your Name and Address
Link a Name to an Address
^^^^^^^^^^^^^^^^^^^^^^^^^

You can set up your name so that :meth:`~ens.main.ENS.address` will show the address it points to. In order to do so,
You can set up your name so that :meth:`~ens.ENS.address` will show the address it points to. In order to do so,
you must already be the owner of the domain (or its parent).

.. code-block:: python
Expand Down Expand Up @@ -123,7 +123,7 @@ You can claim arbitrarily deep subdomains.
Link an Address to a Name
^^^^^^^^^^^^^^^^^^^^^^^^^

You can set up your address so that :meth:`~ens.main.ENS.name` will show the name that points to it.
You can set up your address so that :meth:`~ens.ENS.name` will show the name that points to it.

This is like Caller ID. It enables you and others to take an account and determine what name points to it. Sometimes
this is referred to as "reverse" resolution. The ENS Reverse Resolver is used for this functionality.
Expand All @@ -132,15 +132,15 @@ this is referred to as "reverse" resolution. The ENS Reverse Resolver is used fo

ns.setup_name('jasoncarver.eth', '0x5B2063246F2191f18F2675ceDB8b28102e957458')

If you don't supply the address, :meth:`~ens.main.ENS.setup_name` will assume you want the
address returned by :meth:`~ens.main.ENS.address`.
If you don't supply the address, :meth:`~ens.ENS.setup_name` will assume you want the
address returned by :meth:`~ens.ENS.address`.

.. code-block:: python

ns.setup_name('jasoncarver.eth')

If the name doesn't already point to an address, :meth:`~ens.main.ENS.setup_name` will
call :meth:`~ens.main.ENS.setup_address` for you.
If the name doesn't already point to an address, :meth:`~ens.ENS.setup_name` will
call :meth:`~ens.ENS.setup_address` for you.

Wait for the transaction to be mined, then:

Expand Down Expand Up @@ -195,7 +195,7 @@ Working With Resolvers
Get the Resolver for an ENS Record
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

You can get the resolver for an ENS name via the :meth:`~ens.main.ENS.resolver` method.
You can get the resolver for an ENS name via the :meth:`~ens.ENS.resolver` method.

.. code-block:: python

Expand Down
5 changes: 5 additions & 0 deletions docs/providers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,12 @@ Contract is fully implemented for the Async provider. The only documented except
the moment is where :class:`ENS` is needed for address lookup. All addresses that are passed to Async
contract should not be :class:`ENS` addresses.

ENS
^^^^^^^^
ENS is fully implemented for the Async provider.

Supported Middleware
^^^^^^^^^^^^^^^^^^^^
- :meth:`Gas Price Strategy <web3.middleware.gas_price_strategy_middleware>`
- :meth:`Buffered Gas Estimate Middleware <web3.middleware.buffered_gas_estimate_middleware>`
- :meth:`Stalecheck Middleware <web3.middleware.make_stalecheck_middleware>`
8 changes: 7 additions & 1 deletion ens/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# flake8: noqa

from .main import (
from .async_ens import (
AsyncENS,
)
from .base_ens import (
BaseENS,
)
from .ens import (
ENS,
)

Expand Down
Loading