Commit c354d9d
authored
Update create-wallet.md (#1338)
The guidance provided by the foundry book informs us to setup our tests via
```
contract MyTest is Test {
...
}
```
However, given the inheritance and import structures of `forge-std/Test.sol`, the documentation to create a wallet produces the following error:
```
Compiler run failed:
Error (7920): Identifier not found or not unique.
--> test/MyTest.t.sol:86:5:
|
86 | Wallet memory _w = vm.createWallet(100);
| ^^^^^^
Error:
```
Instead, in order to store the result returned by `vm.createWallet`, I had to reference the `Wallet` type through the `Vm` interface, like so:
```
Vm.Wallet memory _w = vm.createWallet(100);
```1 parent 4317603 commit c354d9d
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
| 83 | + | |
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| |||
0 commit comments