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(testing): adds hd path note [APE-1298] #1607

Merged
merged 4 commits into from
Aug 17, 2023
Merged
Changes from 2 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
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 generated accounts despite using the same mnemonic. In such a case, you are able to specify a custom derivation path in `ape-config.yaml`:
fubuloubu marked this conversation as resolved.
Show resolved Hide resolved

```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
Loading