Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Commit 5c1b7cc

Browse files
author
Samuel Furter
committed
ens code example fixed in documentation
1 parent a2e9285 commit 5c1b7cc

File tree

6 files changed

+23
-18
lines changed

6 files changed

+23
-18
lines changed
158 Bytes
Binary file not shown.
-1.98 KB
Binary file not shown.

docs/_build/html/_sources/web3-eth-ens.rst.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ web3.eth.ens
77
=========
88

99
The ``web3.eth.ens`` functions let you interacting with Ens.
10+
1011
.. code-block:: javascript
1112
1213
import {Ens} from 'web3-eth-ens';

docs/_build/html/searchindex.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/_build/html/web3-eth-ens.html

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -48,23 +48,26 @@ <h3>Navigation</h3>
4848
</div>
4949
<div class="section" id="web3-eth-ens">
5050
<h1>web3.eth.ens<a class="headerlink" href="#web3-eth-ens" title="Permalink to this headline"></a></h1>
51-
<p>The <code class="docutils literal notranslate"><span class="pre">web3.eth.ens</span></code> functions let you interacting with Ens.
52-
.. code-block:: javascript</p>
53-
<blockquote>
54-
<div><p>import {Ens} from ‘web3-eth-ens’;
55-
import {Accounts} from ‘web3-eth-accounts;</p>
56-
<p>// “Ens.providers.givenProvider” will be set if in an Ethereum supported browser.
57-
const eth = new Ens(</p>
58-
<blockquote>
59-
<div>Ens.givenProvider || ‘ws://some.local-or-remote.node:8546’,
60-
new Accounts(Ens.givenProvider || ‘ws://some.local-or-remote.node:8546’, options),
61-
options</div></blockquote>
62-
<p>);</p>
63-
<p>// or using the web3 umbrella package</p>
64-
<p>import {Web3 } from ‘web3’;
65-
const web3 = new Web3(Web3.givenProvider || ‘ws://some.local-or-remote.node:8546’, options);</p>
66-
<p>// -&gt; web3.eth.ens</p>
67-
</div></blockquote>
51+
<p>The <code class="docutils literal notranslate"><span class="pre">web3.eth.ens</span></code> functions let you interacting with Ens.</p>
52+
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="kr">import</span> <span class="p">{</span><span class="nx">Ens</span><span class="p">}</span> <span class="nx">from</span> <span class="s1">&#39;web3-eth-ens&#39;</span><span class="p">;</span>
53+
<span class="kr">import</span> <span class="p">{</span><span class="nx">Accounts</span><span class="p">}</span> <span class="nx">from</span> <span class="s1">&#39;web3-eth-accounts;</span>
54+
55+
<span class="s1">// &quot;Ens.providers.givenProvider&quot; will be set if in an Ethereum supported browser.</span>
56+
<span class="s1">const eth = new Ens(</span>
57+
<span class="s1"> Ens.givenProvider || &#39;</span><span class="nx">ws</span><span class="o">:</span><span class="c1">//some.local-or-remote.node:8546&#39;,</span>
58+
<span class="k">new</span> <span class="nx">Accounts</span><span class="p">(</span><span class="nx">Ens</span><span class="p">.</span><span class="nx">givenProvider</span> <span class="o">||</span> <span class="s1">&#39;ws://some.local-or-remote.node:8546&#39;</span><span class="p">,</span> <span class="nx">options</span><span class="p">),</span>
59+
<span class="nx">options</span>
60+
<span class="p">);</span>
61+
62+
63+
<span class="c1">// or using the web3 umbrella package</span>
64+
65+
<span class="kr">import</span> <span class="p">{</span><span class="nx">Web3</span> <span class="p">}</span> <span class="nx">from</span> <span class="s1">&#39;web3&#39;</span><span class="p">;</span>
66+
<span class="kr">const</span> <span class="nx">web3</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">Web3</span><span class="p">(</span><span class="nx">Web3</span><span class="p">.</span><span class="nx">givenProvider</span> <span class="o">||</span> <span class="s1">&#39;ws://some.local-or-remote.node:8546&#39;</span><span class="p">,</span> <span class="nx">options</span><span class="p">);</span>
67+
68+
<span class="c1">// -&gt; web3.eth.ens</span>
69+
</pre></div>
70+
</div>
6871
<hr class="docutils" />
6972
<div class="section" id="registry">
7073
<h2>registry<a class="headerlink" href="#registry" title="Permalink to this headline"></a></h2>

docs/web3-eth-ens.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ web3.eth.ens
77
=========
88

99
The ``web3.eth.ens`` functions let you interacting with Ens.
10+
1011
.. code-block:: javascript
1112
1213
import {Ens} from 'web3-eth-ens';

0 commit comments

Comments
 (0)