Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Jan 6, 2025
1 parent 2dcd669 commit ed4b270
Show file tree
Hide file tree
Showing 45 changed files with 295 additions and 295 deletions.
Binary file modified latest/.doctrees/commands/networks.doctree
Binary file not shown.
Binary file modified latest/.doctrees/environment.pickle
Binary file not shown.
Binary file modified latest/.doctrees/methoddocs/ape.doctree
Binary file not shown.
Binary file modified latest/.doctrees/methoddocs/ape_accounts.doctree
Binary file not shown.
Binary file modified latest/.doctrees/methoddocs/ape_compile.doctree
Binary file not shown.
Binary file modified latest/.doctrees/methoddocs/ape_ethereum.doctree
Binary file not shown.
Binary file modified latest/.doctrees/methoddocs/ape_node.doctree
Binary file not shown.
Binary file modified latest/.doctrees/methoddocs/ape_pm.doctree
Binary file not shown.
Binary file modified latest/.doctrees/methoddocs/ape_test.doctree
Binary file not shown.
Binary file modified latest/.doctrees/methoddocs/api.doctree
Binary file not shown.
Binary file modified latest/.doctrees/methoddocs/cli.doctree
Binary file not shown.
Binary file modified latest/.doctrees/methoddocs/contracts.doctree
Binary file not shown.
Binary file modified latest/.doctrees/methoddocs/exceptions.doctree
Binary file not shown.
Binary file modified latest/.doctrees/methoddocs/managers.doctree
Binary file not shown.
Binary file modified latest/.doctrees/methoddocs/plugins.doctree
Binary file not shown.
Binary file modified latest/.doctrees/methoddocs/types.doctree
Binary file not shown.
Binary file modified latest/.doctrees/methoddocs/utils.doctree
Binary file not shown.
4 changes: 2 additions & 2 deletions latest/commands/networks.html
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ <h2>list<a class="headerlink" href="#networks-list" title="Link to this heading"
<dd><p>Filter the results by ecosystem</p>
<dl class="field-list simple">
<dt class="field-odd">Options<span class="colon">:</span></dt>
<dd class="field-odd"><p>shibarium | flow-evm | shape | astar | avalanche | fantom | taiko | zetachain | zksync | bsc | crossfi | arbitrum | gnosis | cronos-zkevm | lens | optimism | polynomial | soneium | celo | xai | linea | blast | apechain | oort | cronos | mantle | xmtp | bttc | ethereum | palm | metis | abstract | world-chain | fraxtal | base | zora | geist | scroll | wemix | moonbeam | rootstock | unichain | lumia | berachain | polygon-zkevm | polygon | kroma</p>
<dd class="field-odd"><p>avalanche | arbitrum | polynomial | polygon | blast | zetachain | fantom | unichain | taiko | berachain | abstract | shibarium | lens | celo | scroll | base | bttc | moonbeam | flow-evm | gnosis | palm | soneium | xmtp | crossfi | shape | kroma | metis | zksync | xai | wemix | lumia | world-chain | apechain | linea | cronos-zkevm | cronos | bsc | fraxtal | oort | geist | rootstock | mantle | ethereum | zora | optimism | polygon-zkevm | astar</p>
</dd>
</dl>
</dd></dl>
Expand All @@ -204,7 +204,7 @@ <h2>list<a class="headerlink" href="#networks-list" title="Link to this heading"
<dd><p>Filter the results by network</p>
<dl class="field-list simple">
<dt class="field-odd">Options<span class="colon">:</span></dt>
<dd class="field-odd"><p>fuji | puppynet | opbnb | moonbase-fork | curtis | hekla-fork | alfajores | moonbase | alfajores-fork | polter-fork | goerli-fork | cardona-fork | polter | opbnb-fork | testnet-fork | donau-fork | prism-fork | nova | hekla | puppynet-fork | sepolia | minato-fork | cardona | chiado-fork | mumbai-fork | holesky-fork | mainnet-fork | dev-fork | bartio-fork | goerli | testnet | opbnb-testnet-fork | fuji-fork | donau | mainnet | minato | amoy | mumbai | opbnb-testnet | chiado | local | curtis-fork | nova-fork | moonriver-fork | amoy-fork | dev | bartio | moonriver | prism | holesky | sepolia-fork</p>
<dd class="field-odd"><p>opbnb | cardona | nova-fork | mumbai-fork | moonbase-fork | mainnet | mainnet-fork | amoy-fork | donau-fork | alfajores-fork | opbnb-testnet | polter | hekla | hekla-fork | cardona-fork | testnet | moonriver-fork | curtis | sepolia-fork | goerli-fork | fuji-fork | bartio-fork | bartio | curtis-fork | opbnb-testnet-fork | nova | moonriver | goerli | prism-fork | chiado-fork | puppynet | dev | minato | donau | dev-fork | amoy | polter-fork | chiado | mumbai | sepolia | minato-fork | alfajores | moonbase | testnet-fork | prism | holesky-fork | puppynet-fork | local | opbnb-fork | fuji | holesky</p>
</dd>
</dl>
</dd></dl>
Expand Down
8 changes: 4 additions & 4 deletions latest/methoddocs/ape_ethereum.html
Original file line number Diff line number Diff line change
Expand Up @@ -1883,10 +1883,10 @@
<dd><p>Create the multicall module contract on-chain, so we can use it.
Must use a provider that supports <code class="docutils literal notranslate"><span class="pre">debug_setCode</span></code>.</p>
<p>Usage example:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span data-line="1"><span class="kn">from</span> <span class="nn">ape_ethereum</span> <span class="kn">import</span> <span class="n">multicall</span>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span data-line="1"><span class="kn">from</span><span class="w"> </span><span class="nn">ape_ethereum</span><span class="w"> </span><span class="kn">import</span> <span class="n">multicall</span>
</span><span data-line="2">
</span><span data-line="3"><span class="nd">@pytest</span><span class="o">.</span><span class="n">fixture</span><span class="p">(</span><span class="n">scope</span><span class="o">=</span><span class="s2">&quot;session&quot;</span><span class="p">)</span>
</span><span data-line="4"><span class="k">def</span> <span class="nf">use_multicall</span><span class="p">():</span>
</span><span data-line="4"><span class="k">def</span><span class="w"> </span><span class="nf">use_multicall</span><span class="p">():</span>
</span><span data-line="5"> <span class="c1"># NOTE: use this fixture any test where you want to use a multicall</span>
</span><span data-line="6"> <span class="k">return</span> <span class="n">multicall</span><span class="o">.</span><span class="n">BaseMulticall</span><span class="o">.</span><span class="n">inject</span><span class="p">()</span>
</span></pre></div>
Expand All @@ -1901,7 +1901,7 @@
<dd><p>Bases: <a class="reference internal" href="#ape_ethereum.multicall.BaseMulticall" title="ape_ethereum.multicall.handlers.BaseMulticall"><code class="xref py py-class docutils literal notranslate"><span class="pre">BaseMulticall</span></code></a></p>
<p>Create a sequence of calls to execute at once using <code class="docutils literal notranslate"><span class="pre">eth_call</span></code> via the Multicall3 contract.</p>
<p>Usage example:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span data-line="1"><span class="kn">from</span> <span class="nn">ape_ethereum</span> <span class="kn">import</span> <span class="n">multicall</span>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span data-line="1"><span class="kn">from</span><span class="w"> </span><span class="nn">ape_ethereum</span><span class="w"> </span><span class="kn">import</span> <span class="n">multicall</span>
</span><span data-line="2">
</span><span data-line="3"><span class="n">call</span> <span class="o">=</span> <span class="n">multicall</span><span class="o">.</span><span class="n">Call</span><span class="p">()</span>
</span><span data-line="4"><span class="n">call</span><span class="o">.</span><span class="n">add</span><span class="p">(</span><span class="n">contract</span><span class="o">.</span><span class="n">myMethod</span><span class="p">,</span> <span class="o">*</span><span class="n">call_args</span><span class="p">)</span>
Expand Down Expand Up @@ -1994,7 +1994,7 @@
<p>Create a sequence of calls to execute at once using <code class="docutils literal notranslate"><span class="pre">eth_sendTransaction</span></code>
via the Multicall3 contract.</p>
<p>Usage example:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span data-line="1"><span class="kn">from</span> <span class="nn">ape_ethereum.multicall</span> <span class="kn">import</span> <span class="n">Transaction</span>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span data-line="1"><span class="kn">from</span><span class="w"> </span><span class="nn">ape_ethereum.multicall</span><span class="w"> </span><span class="kn">import</span> <span class="n">Transaction</span>
</span><span data-line="2">
</span><span data-line="3"><span class="n">txn</span> <span class="o">=</span> <span class="n">Transaction</span><span class="p">()</span>
</span><span data-line="4"><span class="n">txn</span><span class="o">.</span><span class="n">add</span><span class="p">(</span><span class="n">contract</span><span class="o">.</span><span class="n">myMethod</span><span class="p">,</span> <span class="o">*</span><span class="n">call_args</span><span class="p">)</span>
Expand Down
22 changes: 11 additions & 11 deletions latest/methoddocs/api.html
Original file line number Diff line number Diff line change
Expand Up @@ -1853,11 +1853,11 @@ <h1>ape.api<a class="headerlink" href="#ape-api" title="Link to this heading">
Use this to limit the values of a config item, such as colors <code class="docutils literal notranslate"><span class="pre">&quot;RED&quot;</span></code>, <code class="docutils literal notranslate"><span class="pre">&quot;BLUE&quot;</span></code>,
<code class="docutils literal notranslate"><span class="pre">&quot;GREEN&quot;</span></code>, rather than any arbitrary <code class="docutils literal notranslate"><span class="pre">str</span></code>.</p>
<p>Usage example:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span data-line="1"><span class="k">class</span> <span class="nc">MyEnum</span><span class="p">(</span><span class="n">ConfigEnum</span><span class="p">):</span>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span data-line="1"><span class="k">class</span><span class="w"> </span><span class="nc">MyEnum</span><span class="p">(</span><span class="n">ConfigEnum</span><span class="p">):</span>
</span><span data-line="2"> <span class="n">FOO</span> <span class="o">=</span> <span class="s2">&quot;FOO&quot;</span>
</span><span data-line="3"> <span class="n">BAR</span> <span class="o">=</span> <span class="s2">&quot;BAR&quot;</span>
</span><span data-line="4">
</span><span data-line="5"><span class="k">class</span> <span class="nc">MyConfig</span><span class="p">(</span><span class="n">PluginConfig</span><span class="p">):</span>
</span><span data-line="5"><span class="k">class</span><span class="w"> </span><span class="nc">MyConfig</span><span class="p">(</span><span class="n">PluginConfig</span><span class="p">):</span>
</span><span data-line="6"> <span class="n">my_enum</span><span class="p">:</span> <span class="n">MyEnum</span>
</span><span data-line="7">
</span><span data-line="8"><span class="n">model</span> <span class="o">=</span> <span class="n">MyConfig</span><span class="p">(</span><span class="n">my_enum</span><span class="o">=</span><span class="s2">&quot;FOO&quot;</span><span class="p">)</span>
Expand Down Expand Up @@ -2025,8 +2025,8 @@ <h1>ape.api<a class="headerlink" href="#ape-api" title="Link to this heading">
Implementations of this API must throw a <a class="reference internal" href="exceptions.html#ape.exceptions.ConversionError" title="ape.exceptions.ConversionError"><code class="xref py py-class docutils literal notranslate"><span class="pre">ConversionError</span></code></a>
when the item fails to convert properly.</p>
<p>Usage example:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span data-line="1"><span class="kn">from</span> <span class="nn">ape</span> <span class="kn">import</span> <span class="n">convert</span>
</span><span data-line="2"><span class="kn">from</span> <span class="nn">ape.types</span> <span class="kn">import</span> <span class="n">AddressType</span>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span data-line="1"><span class="kn">from</span><span class="w"> </span><span class="nn">ape</span><span class="w"> </span><span class="kn">import</span> <span class="n">convert</span>
</span><span data-line="2"><span class="kn">from</span><span class="w"> </span><span class="nn">ape.types</span><span class="w"> </span><span class="kn">import</span> <span class="n">AddressType</span>
</span><span data-line="3">
</span><span data-line="4"><span class="n">convert</span><span class="p">(</span><span class="s2">&quot;1 gwei&quot;</span><span class="p">,</span> <span class="nb">int</span><span class="p">)</span>
</span><span data-line="5"><span class="c1"># 1000000000</span>
Expand Down Expand Up @@ -2547,11 +2547,11 @@ <h1>ape.api<a class="headerlink" href="#ape-api" title="Link to this heading">
<dd><p>Get a contract method selector, typically via hashing such as <code class="docutils literal notranslate"><span class="pre">keccak</span></code>.
Defaults to using <code class="docutils literal notranslate"><span class="pre">keccak</span></code> but can be overridden in different ecosystems.</p>
<p>Override example:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span data-line="1"><span class="kn">from</span> <span class="nn">ape.api</span> <span class="kn">import</span> <span class="n">EcosystemAPI</span>
</span><span data-line="2"><span class="kn">from</span> <span class="nn">eth_pydantic_types</span> <span class="kn">import</span> <span class="n">HexBytes</span>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span data-line="1"><span class="kn">from</span><span class="w"> </span><span class="nn">ape.api</span><span class="w"> </span><span class="kn">import</span> <span class="n">EcosystemAPI</span>
</span><span data-line="2"><span class="kn">from</span><span class="w"> </span><span class="nn">eth_pydantic_types</span><span class="w"> </span><span class="kn">import</span> <span class="n">HexBytes</span>
</span><span data-line="3">
</span><span data-line="4"><span class="k">class</span> <span class="nc">MyEcosystem</span><span class="p">(</span><span class="n">EcosystemAPI</span><span class="p">):</span>
</span><span data-line="5"> <span class="k">def</span> <span class="nf">get_method_selector</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">abi</span><span class="p">:</span> <span class="n">MethodABI</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">HexBytes</span><span class="p">:</span>
</span><span data-line="4"><span class="k">class</span><span class="w"> </span><span class="nc">MyEcosystem</span><span class="p">(</span><span class="n">EcosystemAPI</span><span class="p">):</span>
</span><span data-line="5"> <span class="k">def</span><span class="w"> </span><span class="nf">get_method_selector</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">abi</span><span class="p">:</span> <span class="n">MethodABI</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">HexBytes</span><span class="p">:</span>
</span><span data-line="6"> <span class="k">return</span> <span class="n">HexBytes</span><span class="p">(</span><span class="n">abi</span><span class="o">.</span><span class="n">selector</span><span class="o">.</span><span class="n">encode</span><span class="p">())</span> <span class="c1"># Simple bytes selector</span>
</span></pre></div>
</div>
Expand Down Expand Up @@ -2996,7 +2996,7 @@ <h1>ape.api<a class="headerlink" href="#ape-api" title="Link to this heading">
method <a class="reference internal" href="#ape.api.providers.ProviderAPI.disconnect" title="ape.api.providers.ProviderAPI.disconnect"><code class="xref py py-meth docutils literal notranslate"><span class="pre">ape.api.providers.ProviderAPI.disconnect()</span></code></a>.</p>
<p><strong>NOTE</strong>: If multiple providers exist, uses whatever was “first” registered.</p>
<p>Usage example:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span data-line="1"><span class="kn">from</span> <span class="nn">ape</span> <span class="kn">import</span> <span class="n">networks</span>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span data-line="1"><span class="kn">from</span><span class="w"> </span><span class="nn">ape</span><span class="w"> </span><span class="kn">import</span> <span class="n">networks</span>
</span><span data-line="2"><span class="n">mainnet</span> <span class="o">=</span> <span class="n">networks</span><span class="o">.</span><span class="n">ethereum</span><span class="o">.</span><span class="n">mainnet</span> <span class="c1"># An instance of NetworkAPI</span>
</span><span data-line="3"><span class="k">with</span> <span class="n">mainnet</span><span class="o">.</span><span class="n">use_default_provider</span><span class="p">():</span>
</span><span data-line="4"> <span class="o">...</span>
Expand Down Expand Up @@ -3024,7 +3024,7 @@ <h1>ape.api<a class="headerlink" href="#ape-api" title="Link to this heading">
method <a class="reference internal" href="#ape.api.providers.ProviderAPI.connect" title="ape.api.providers.ProviderAPI.connect"><code class="xref py py-meth docutils literal notranslate"><span class="pre">ape.api.providers.ProviderAPI.connect()</span></code></a> and when exiting, it calls
method <a class="reference internal" href="#ape.api.providers.ProviderAPI.disconnect" title="ape.api.providers.ProviderAPI.disconnect"><code class="xref py py-meth docutils literal notranslate"><span class="pre">ape.api.providers.ProviderAPI.disconnect()</span></code></a>.</p>
<p>Usage example:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span data-line="1"><span class="kn">from</span> <span class="nn">ape</span> <span class="kn">import</span> <span class="n">networks</span>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span data-line="1"><span class="kn">from</span><span class="w"> </span><span class="nn">ape</span><span class="w"> </span><span class="kn">import</span> <span class="n">networks</span>
</span><span data-line="2">
</span><span data-line="3"><span class="n">mainnet</span> <span class="o">=</span> <span class="n">networks</span><span class="o">.</span><span class="n">ethereum</span><span class="o">.</span><span class="n">mainnet</span> <span class="c1"># An instance of NetworkAPI</span>
</span><span data-line="4"><span class="k">with</span> <span class="n">mainnet</span><span class="o">.</span><span class="n">use_provider</span><span class="p">(</span><span class="s2">&quot;infura&quot;</span><span class="p">):</span>
Expand Down Expand Up @@ -3081,7 +3081,7 @@ <h1>ape.api<a class="headerlink" href="#ape-api" title="Link to this heading">
<p>The method <a class="reference internal" href="#ape.api.networks.NetworkAPI.use_provider" title="ape.api.networks.NetworkAPI.use_provider"><code class="xref py py-meth docutils literal notranslate"><span class="pre">ape.api.networks.NetworkAPI.use_provider()</span></code></a> returns
an instance of this context manager.</p>
<p>Usage example:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span data-line="1"><span class="kn">from</span> <span class="nn">ape</span> <span class="kn">import</span> <span class="n">networks</span>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span data-line="1"><span class="kn">from</span><span class="w"> </span><span class="nn">ape</span><span class="w"> </span><span class="kn">import</span> <span class="n">networks</span>
</span><span data-line="2">
</span><span data-line="3"><span class="n">mainnet</span> <span class="o">=</span> <span class="n">networks</span><span class="o">.</span><span class="n">ethereum</span><span class="o">.</span><span class="n">mainnet</span> <span class="c1"># An instance of NetworkAPI</span>
</span><span data-line="4"><span class="k">with</span> <span class="n">mainnet</span><span class="o">.</span><span class="n">use_provider</span><span class="p">(</span><span class="s2">&quot;infura&quot;</span><span class="p">):</span>
Expand Down
Loading

0 comments on commit ed4b270

Please sign in to comment.