Skip to content

Commit

Permalink
docs(testing): adds hd path note [APE-1298] (#1607)
Browse files Browse the repository at this point in the history
* docs(testing): adds a note about hd_path

* docs(testing): typo fix

* Update docs/userguides/testing.md

---------

Co-authored-by: El De-dog-lo <[email protected]>
  • Loading branch information
nazariyv and fubuloubu authored Aug 17, 2023
1 parent a7bd662 commit 218ef50
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions docs/userguides/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,15 @@ test:
number_of_accounts: 5
```
If you are running tests against `anvil`, your generated test accounts may not correspond to the `anvil`'s default generated accounts despite using the same mnemonic. In such a case, you are able to specify a custom derivation path in `ape-config.yaml`:

```yaml
test:
mnemonic: test test test test test test test test test test test junk
number_of_accounts: 5
hd_path: "m/44'/60'/0'/0/{}"
```

If you are using a fork-provider, such as [Hardhat](https://github.com/ApeWorX/ape-hardhat), you can use impersonated accounts by accessing random addresses off the fixture:

```python
Expand Down

0 comments on commit 218ef50

Please sign in to comment.