Skip to content

Commit

Permalink
docs: fix example
Browse files Browse the repository at this point in the history
  • Loading branch information
antazoey committed Aug 27, 2024
1 parent 228ab19 commit 054d987
Showing 1 changed file with 3 additions and 3 deletions.
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

0 comments on commit 054d987

Please sign in to comment.