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

docs: console guide fixes #2250

Merged
merged 2 commits into from
Aug 27, 2024
Merged
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
6 changes: 3 additions & 3 deletions docs/userguides/console.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Ape Console
# Console

Ape provides an [IPython](https://ipython.readthedocs.io/) interactive console with useful pre-defined locals to interact with your project.

Expand Down Expand Up @@ -56,14 +56,14 @@ You can also create scripts to be included in the console namespace by adding a
An example file might look something like this:

```python
from ape import networks
from eth_utils import encode_hex, decode_hex


def latest(key):
return getattr(networks.active_provider.get_block("latest"), key)
```

Then both imported util functions and `WETH_ADDRESS` will be available when you launch the console.
Then both imported util functions and `latest()` will be available when you launch the console.

```python
In [1]: latest('number')
Expand Down
Loading