Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Nov 4, 2024
1 parent c3650ee commit c33aecb
Show file tree
Hide file tree
Showing 22 changed files with 74 additions and 15 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_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/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.
Binary file modified latest/.doctrees/userguides/networks.doctree
Binary file not shown.
21 changes: 18 additions & 3 deletions latest/_sources/userguides/networks.md.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Networks

When interacting with a blockchain, you will have to select an ecosystem (e.g. Ethereum, Arbitrum, or Fantom), a network (e.g. Mainnet or Sepolia) and a provider (e.g. Eth-Tester, Node (Geth), or Alchemy).
Networks are part of ecosystems and typically defined in plugins.
For example, the `ape-ethereum` plugin comes with Ape and can be used for handling EVM-like behavior.
The `ape-ethereum` ecosystem and network(s) plugin comes with Ape and can be used for handling EVM-like behavior.
Networks are part of ecosystems and typically defined in plugins or custom-network configurations.
However, Ape works out-of-the-box (in a limited way) with any network defined in the [evmchains](https://github.com/ApeWorX/evmchains) library.

## Selecting a Network

Expand All @@ -25,7 +26,7 @@ ape test --network ethereum:local:foundry
ape console --network arbitrum:testnet:alchemy # NOTICE: All networks, even from other ecosystems, use this.
```

To see all possible values for `--network`, run the command:
To see all networks that work with the `--network` flag (besides those _only_ defined in `evmchains`), run the command:

```shell
ape networks list
Expand Down Expand Up @@ -100,6 +101,20 @@ ape networks list

In the remainder of this guide, any example below using Ethereum, you can replace with an L2 ecosystem's name and network combination.

## evmchains Networks

If a network is in the [evmchains](https://github.com/ApeWorX/evmchains) library, it will work in Ape automatically, even without a plugin or any custom configuration for that network.

```shell
ape console --network moonbeam
```

This works because the `moonbeam` network data is available in the `evmchains` library, and Ape is able to look it up.

```{warning}
Support for networks from evm-chains alone may be limited and require additional configuration to work in production use-cases.
```

## Custom Network Connection

You can add custom networks to Ape without creating a plugin.
Expand Down
6 changes: 3 additions & 3 deletions latest/commands/networks.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>holesky-fork | mainnet-fork | sepolia-fork | sepolia | mainnet | local | holesky</p>
<dd class="field-odd"><p>mainnet-fork | holesky | local | mainnet | holesky-fork | sepolia-fork | sepolia | goerli</p>
</dd>
</dl>
</dd></dl>
Expand All @@ -215,7 +215,7 @@ <h2>list<a class="headerlink" href="#networks-list" title="Link to this heading"
<dd><p>Filter the results by provider</p>
<dl class="field-list simple">
<dt class="field-odd">Options<span class="colon">:</span></dt>
<dd class="field-odd"><p>node | test</p>
<dd class="field-odd"><p>test | node</p>
</dd>
</dl>
</dd></dl>
Expand All @@ -241,7 +241,7 @@ <h2>run<a class="headerlink" href="#networks-run" title="Link to this heading">
<dd><p>Override the default network and provider. (see <cite>ape networks list</cite> for options)</p>
<dl class="field-list simple">
<dt class="field-odd">Options<span class="colon">:</span></dt>
<dd class="field-odd"><p>:mainnet:node | ethereum:mainnet:node | :mainnet | ethereum:mainnet | :sepolia:node | ethereum:sepolia:node | :sepolia | ethereum:sepolia | :holesky:node | ethereum:holesky:node | :holesky | ethereum:holesky | ::node | :local:node | ethereum::node | ethereum:local:node | ::test | :local:test | ethereum::test | ethereum:local:test | :local | ethereum:local | ethereum</p>
<dd class="field-odd"><p>:goerli:node | ethereum:goerli:node | :goerli | ethereum:goerli | :mainnet:node | ethereum:mainnet:node | :mainnet | ethereum:mainnet | :sepolia:node | ethereum:sepolia:node | :sepolia | ethereum:sepolia | :holesky:node | ethereum:holesky:node | :holesky | ethereum:holesky | ::node | :local:node | ethereum::node | ethereum:local:node | ::test | :local:test | ethereum::test | ethereum:local:test | :local | ethereum:local | ethereum</p>
</dd>
</dl>
</dd></dl>
Expand Down
6 changes: 6 additions & 0 deletions latest/genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -1557,6 +1557,8 @@ <h2 id="C">C</h2>
<li><a href="methoddocs/api.html#ape.api.providers.SubprocessProvider.connect">(ape.api.providers.SubprocessProvider method)</a>
</li>
<li><a href="methoddocs/ape_node.html#ape_node.GethDev.connect">(ape_node.GethDev method)</a>
</li>
<li><a href="methoddocs/ape_node.html#ape_node.Node.connect">(ape_node.Node method)</a>
</li>
</ul></li>
<li><a href="methoddocs/cli.html#ape.cli.commands.ConnectedProviderCommand">ConnectedProviderCommand (class in ape.cli.commands)</a>
Expand Down Expand Up @@ -3309,7 +3311,11 @@ <h2 id="S">S</h2>
<li><a href="methoddocs/api.html#ape.api.providers.ProviderAPI.send_private_transaction">send_private_transaction() (ape.api.providers.ProviderAPI method)</a>
</li>
<li><a href="methoddocs/api.html#ape.api.providers.ProviderAPI.send_transaction">send_transaction() (ape.api.providers.ProviderAPI method)</a>

<ul>
<li><a href="methoddocs/ape_node.html#ape_node.Node.send_transaction">(ape_node.Node method)</a>
</li>
</ul></li>
<li><a href="methoddocs/api.html#ape.api.networks.EcosystemAPI.serialize_transaction">serialize_transaction() (ape.api.networks.EcosystemAPI method)</a>

<ul>
Expand Down
32 changes: 28 additions & 4 deletions latest/methoddocs/ape_node.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion latest/methoddocs/api.html
Original file line number Diff line number Diff line change
Expand Up @@ -831,7 +831,7 @@ <h1>ape.api<a class="headerlink" href="#ape-api" title="Link to this heading">

<dl class="py method">
<dt class="sig sig-object py" id="ape.api.accounts.AccountAPI.transfer">
<span class="sig-name descname"><span class="pre">transfer</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">account</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">Annotated</span><span class="p"><span class="pre">[</span></span><span class="pre">ChecksumAddress</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">_AddressValidator</span><span class="p"><span class="pre">]</span></span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference internal" href="#ape.api.address.BaseAddress" title="ape.api.address.BaseAddress"><span class="pre">BaseAddress</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">value</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">str</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">data</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">bytes</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">str</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">private</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">bool</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference internal" href="#ape.api.transactions.ReceiptAPI" title="ape.api.transactions.ReceiptAPI"><span class="pre">ReceiptAPI</span></a></span></span><a class="headerlink" href="#ape.api.accounts.AccountAPI.transfer" title="Link to this definition"></a></dt>
<span class="sig-name descname"><span class="pre">transfer</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">account</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">Annotated</span><span class="p"><span class="pre">[</span></span><span class="pre">ChecksumAddress</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">_AddressValidator</span><span class="p"><span class="pre">]</span></span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference internal" href="#ape.api.address.BaseAddress" title="ape.api.address.BaseAddress"><span class="pre">BaseAddress</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">value</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">int</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">data</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">bytes</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">str</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">private</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">bool</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference internal" href="#ape.api.transactions.ReceiptAPI" title="ape.api.transactions.ReceiptAPI"><span class="pre">ReceiptAPI</span></a></span></span><a class="headerlink" href="#ape.api.accounts.AccountAPI.transfer" title="Link to this definition"></a></dt>
<dd><p>Send funds to an account.</p>
<dl class="field-list simple">
<dt class="field-odd">Raises<span class="colon">:</span></dt>
Expand Down
Binary file modified latest/objects.inv
Binary file not shown.
2 changes: 1 addition & 1 deletion latest/searchindex.js

Large diffs are not rendered by default.

20 changes: 17 additions & 3 deletions latest/userguides/networks.html
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@
<div class="sy-scrollbar sy-rside-inner px-6 xl:top-16 xl:sticky xl:pl-0 pt-6 pb-4"><div class="localtoc"><h3>On this page</h3><ul>
<li><a class="reference internal" href="#selecting-a-network">Selecting a Network</a></li>
<li><a class="reference internal" href="#l2-networks">L2 Networks</a></li>
<li><a class="reference internal" href="#evmchains-networks">evmchains Networks</a></li>
<li><a class="reference internal" href="#custom-network-connection">Custom Network Connection</a><ul>
<li><a class="reference internal" href="#custom-networks-by-config">Custom Networks By Config</a><ul>
<li><a class="reference internal" href="#rpc-url">RPC URL</a></li>
Expand Down Expand Up @@ -183,8 +184,9 @@
<section id="networks">
<h1>Networks<a class="headerlink" href="#networks" title="Link to this heading"></a></h1>
<p>When interacting with a blockchain, you will have to select an ecosystem (e.g. Ethereum, Arbitrum, or Fantom), a network (e.g. Mainnet or Sepolia) and a provider (e.g. Eth-Tester, Node (Geth), or Alchemy).
Networks are part of ecosystems and typically defined in plugins.
For example, the <code class="docutils literal notranslate"><span class="pre">ape-ethereum</span></code> plugin comes with Ape and can be used for handling EVM-like behavior.</p>
The <code class="docutils literal notranslate"><span class="pre">ape-ethereum</span></code> ecosystem and network(s) plugin comes with Ape and can be used for handling EVM-like behavior.
Networks are part of ecosystems and typically defined in plugins or custom-network configurations.
However, Ape works out-of-the-box (in a limited way) with any network defined in the <a class="reference external" href="https://github.com/ApeWorX/evmchains">evmchains</a> library.</p>
<section id="selecting-a-network">
<h2>Selecting a Network<a class="headerlink" href="#selecting-a-network" title="Link to this heading"></a></h2>
<p>Before discussing how to add custom networks or install L2 network plugins, you need to know how to specify the network choice.
Expand All @@ -201,7 +203,7 @@ <h2>Selecting a Network<a class="headerlink" href="#selecting-a-network" title="
</span><span data-line="2">ape<span class="w"> </span>console<span class="w"> </span>--network<span class="w"> </span>arbitrum:testnet:alchemy<span class="w"> </span><span class="c1"># NOTICE: All networks, even from other ecosystems, use this.</span>
</span></pre></div>
</div>
<p>To see all possible values for <code class="docutils literal notranslate"><span class="pre">--network</span></code>, run the command:</p>
<p>To see all networks that work with the <code class="docutils literal notranslate"><span class="pre">--network</span></code> flag (besides those <em>only</em> defined in <code class="docutils literal notranslate"><span class="pre">evmchains</span></code>), run the command:</p>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span><span data-line="1">ape<span class="w"> </span>networks<span class="w"> </span>list
</span></pre></div>
</div>
Expand Down Expand Up @@ -289,6 +291,18 @@ <h2>L2 Networks<a class="headerlink" href="#l2-networks" title="Link to this hea
</div>
<p>In the remainder of this guide, any example below using Ethereum, you can replace with an L2 ecosystem’s name and network combination.</p>
</section>
<section id="evmchains-networks">
<h2>evmchains Networks<a class="headerlink" href="#evmchains-networks" title="Link to this heading"></a></h2>
<p>If a network is in the <a class="reference external" href="https://github.com/ApeWorX/evmchains">evmchains</a> library, it will work in Ape automatically, even without a plugin or any custom configuration for that network.</p>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span><span data-line="1">ape<span class="w"> </span>console<span class="w"> </span>--network<span class="w"> </span>moonbeam
</span></pre></div>
</div>
<p>This works because the <code class="docutils literal notranslate"><span class="pre">moonbeam</span></code> network data is available in the <code class="docutils literal notranslate"><span class="pre">evmchains</span></code> library, and Ape is able to look it up.</p>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>Support for networks from evm-chains alone may be limited and require additional configuration to work in production use-cases.</p>
</div>
</section>
<section id="custom-network-connection">
<h2>Custom Network Connection<a class="headerlink" href="#custom-network-connection" title="Link to this heading"></a></h2>
<p>You can add custom networks to Ape without creating a plugin.
Expand Down

0 comments on commit c33aecb

Please sign in to comment.