Skip to content

Commit 305b3c3

Browse files
authored
Replace jasoncarver.eth with ens.eth (#3022)
* Replace jasoncarver.eth with ens.eth * Set proper current address for ens.eth * Revert non-ens docs * Update bytes representation of address
1 parent db7e344 commit 305b3c3

File tree

2 files changed

+19
-18
lines changed

2 files changed

+19
-18
lines changed

docs/ens_overview.rst

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,8 @@ Get the Address for an ENS Name
188188
.. code-block:: python
189189
190190
from ens.auto import ns
191-
eth_address = ns.address('jasoncarver.eth')
192-
assert eth_address == '0x582AC4D8929f58c217d4a52aDD361AE470a8a4cD'
191+
eth_address = ns.address('ens.eth')
192+
assert eth_address == '0xFe89cc7aBB2C4183683ab71653C4cdc9B02D44b7'
193193
194194
The ``ENS`` module has no opinion as to which TLD you can use,
195195
but will not infer a TLD if it is not provided with the name.
@@ -199,13 +199,13 @@ Get the ENS Name for an Address
199199

200200
.. code-block:: python
201201
202-
domain = ns.name('0x582AC4D8929f58c217d4a52aDD361AE470a8a4cD')
202+
domain = ns.name('0xFe89cc7aBB2C4183683ab71653C4cdc9B02D44b7')
203203
204204
# name() also accepts the bytes version of the address
205-
assert ns.name(b'[ c$o!\x91\xf1\x8f&u\xce\xdb\x8b(\x10.\x95tX') == domain
205+
assert ns.name(b'\xfe\x89\xccz\xbb,A\x83h:\xb7\x16S\xc4\xcd\xc9\xb0-D\xb7') == domain
206206
207207
# confirm that the name resolves back to the address that you looked up:
208-
assert ns.address(domain) == '0x582AC4D8929f58c217d4a52aDD361AE470a8a4cD'
208+
assert ns.address(domain) == '0xFe89cc7aBB2C4183683ab71653C4cdc9B02D44b7'
209209
210210
.. note:: For accuracy, and as a recommendation from the ENS documentation on
211211
`reverse resolution <https://docs.ens.domains/dapp-developer-guide/resolving-names#reverse-resolution>`_,
@@ -233,24 +233,24 @@ you must already be the owner of the domain (or its parent).
233233

234234
.. code-block:: python
235235
236-
ns.setup_address('jasoncarver.eth', '0x582AC4D8929f58c217d4a52aDD361AE470a8a4cD')
236+
ns.setup_address('ens.eth', '0xFe89cc7aBB2C4183683ab71653C4cdc9B02D44b7')
237237
238238
In the common case where you want to point the name to the owning address, you can skip the address.
239239

240240
.. code-block:: python
241241
242-
ns.setup_address('jasoncarver.eth')
242+
ns.setup_address('ens.eth')
243243
244244
You can claim arbitrarily deep subdomains.
245245

246246
.. code-block:: python
247247
248-
ns.setup_address('supreme.executive.power.derives.from.a.mandate.from.the.masses.jasoncarver.eth')
248+
ns.setup_address('supreme.executive.power.derives.from.a.mandate.from.the.masses.ens.eth')
249249
250250
# wait for the transaction to be mined, then:
251251
assert (
252-
ns.address('supreme.executive.power.derives.from.a.mandate.from.the.masses.jasoncarver.eth')
253-
== '0x582AC4D8929f58c217d4a52aDD361AE470a8a4cD'
252+
ns.address('supreme.executive.power.derives.from.a.mandate.from.the.masses.ens.eth')
253+
== '0xFe89cc7aBB2C4183683ab71653C4cdc9B02D44b7'
254254
)
255255
256256
.. warning:: Gas costs scale up with the number of subdomains!
@@ -265,14 +265,14 @@ this is referred to as "reverse" resolution. The ENS Reverse Resolver is used fo
265265

266266
.. code-block:: python
267267
268-
ns.setup_name('jasoncarver.eth', '0x582AC4D8929f58c217d4a52aDD361AE470a8a4cD')
268+
ns.setup_name('ens.eth', '0xFe89cc7aBB2C4183683ab71653C4cdc9B02D44b7')
269269
270270
If you don't supply the address, :meth:`~ens.ENS.setup_name` will assume you want the
271271
address returned by :meth:`~ens.ENS.address`.
272272

273273
.. code-block:: python
274274
275-
ns.setup_name('jasoncarver.eth')
275+
ns.setup_name('ens.eth')
276276
277277
If the name doesn't already point to an address, :meth:`~ens.ENS.setup_name` will
278278
call :meth:`~ens.ENS.setup_address` for you.
@@ -281,7 +281,7 @@ Wait for the transaction to be mined, then:
281281

282282
.. code-block:: python
283283
284-
assert ns.name('0x582AC4D8929f58c217d4a52aDD361AE470a8a4cD') == 'jasoncarver.eth'
284+
assert ns.name('0xFe89cc7aBB2C4183683ab71653C4cdc9B02D44b7') == 'ens.eth'
285285
286286
....
287287

@@ -298,15 +298,15 @@ You'll need to setup the address first, and then the text can be set:
298298

299299
.. code-block:: python
300300
301-
ns.setup_address('jasoncarver.eth', '0x582AC4D8929f58c217d4a52aDD361AE470a8a4cD')
302-
ns.set_text('jasoncarver.eth', 'url', 'https://example.com')
301+
ns.setup_address('ens.eth', '0xFe89cc7aBB2C4183683ab71653C4cdc9B02D44b7')
302+
ns.set_text('ens.eth', 'url', 'https://example.com')
303303
304304
A transaction dictionary can be passed as the last argument if desired:
305305

306306
.. code-block:: python
307307
308308
transaction_dict = {'from': '0x123...'}
309-
ns.set_text('jasoncarver.eth', 'url', 'https://example.com', transaction_dict)
309+
ns.set_text('ens.eth', 'url', 'https://example.com', transaction_dict)
310310
311311
If the transaction dictionary is not passed, sensible defaults will be used, and if
312312
a transaction dictionary is passed but does not have a ``from`` value,
@@ -319,7 +319,7 @@ Anyone can read the data from an ENS Record:
319319

320320
.. code-block:: python
321321
322-
url = ns.get_text('jasoncarver.eth', 'url')
322+
url = ns.get_text('ens.eth', 'url')
323323
assert url == 'https://example.com'
324324
325325
....
@@ -334,7 +334,7 @@ You can get the resolver for an ENS name via the :meth:`~ens.ENS.resolver` metho
334334

335335
.. code-block:: python
336336
337-
>>> resolver = ns.resolver('jasoncarver.eth')
337+
>>> resolver = ns.resolver('ens.eth')
338338
>>> resolver.address
339339
'0x5B2063246F2191f18F2675ceDB8b28102e957458'
340340

newsfragments/3020.docs.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Replace references to ``jasoncarver.eth`` with ``ens.eth``.

0 commit comments

Comments
 (0)