Skip to content

Commit 1afac1b

Browse files
committed
document new --from flag of vm.py
1 parent c3dcd89 commit 1afac1b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

CONTRIBUTING.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,13 @@ forge test -vvv
9191

9292
Please follow the guide outlined in the [cheatcodes](https://github.com/foundry-rs/foundry/blob/master/docs/dev/cheatcodes.md#adding-a-new-cheatcode) documentation of Foundry.
9393

94-
When making modifications to the native cheatcodes or adding new ones, please make sure to run [`./scripts/vm.py`](./scripts/vm.py) to update the cheatcodes in the [`src/Vm.sol`](./src/Vm.sol) file. This script will automatically generate the cheatcodes from the [`cheatcodes.json`](https://raw.githubusercontent.com/foundry-rs/foundry/master/crates/cheatcodes/assets/cheatcodes.json) file.
94+
When making modifications to the native cheatcodes or adding new ones, please make sure to run [`./scripts/vm.py`](./scripts/vm.py) to update the cheatcodes in the [`src/Vm.sol`](./src/Vm.sol) file.
95+
96+
By default the script will automatically generate the cheatcodes from the [`cheatcodes.json`](https://raw.githubusercontent.com/foundry-rs/foundry/master/crates/cheatcodes/assets/cheatcodes.json) file, alternatively you can provide a path to a JSON file containing the Vm interface, as generated by Foundry, with the `--from` flag.
97+
98+
```sh
99+
./scripts/vm.py --from path/to/cheatcodes.json
100+
```
95101

96102
It is possible that the resulting [`src/Vm.sol`](./src/Vm.sol) file will have some changes that are not directly related to your changes, this is not a problem.
97103

0 commit comments

Comments
 (0)