The people want cheatcodes for testing!
Testing can be a bit of a pain in the neck if insufficient access to data or manipulation is available. Therefore we want to support some of the cheatcodes that Hardhat and Foundry supplies on the L2 as well. Some of the differs a bit from what is seen at https://book.getfoundry.sh/cheatcodes/ as it needs a extra functions for the distinction between private and public data.
I suggest that we create a CheatCode class that implements those functions to make it easily accessible to devs without having to stroll through 10 different classes. Similar to how you can use vm in foundry tests.
Consider:
- adding a cheatcode to skip the constraints in the rollup on global variables.
- having an
l1 and an l2 sub class as many of these can be useful for either, for the l1 cheatcodes we should call the anvil cheatcodes directly.
### Cheatcodes: Non-intrusive
- [ ] https://github.com/AztecProtocol/aztec-packages/issues/1275
- [ ] https://github.com/AztecProtocol/aztec-packages/issues/1276
- [ ] https://github.com/AztecProtocol/aztec-packages/issues/1281
- [ ] https://github.com/AztecProtocol/aztec-packages/issues/1285
- [ ] https://github.com/AztecProtocol/aztec-packages/issues/1288
### Cheatcodes: Intrusive
- [ ] https://github.com/AztecProtocol/aztec-packages/issues/1279
- [ ] https://github.com/AztecProtocol/aztec-packages/issues/1280
- [ ] https://github.com/AztecProtocol/aztec-packages/issues/1282
- [ ] https://github.com/AztecProtocol/aztec-packages/issues/1286
- [ ] https://github.com/AztecProtocol/aztec-packages/issues/1277
- [ ] https://github.com/AztecProtocol/aztec-packages/issues/1278
- [ ] https://github.com/AztecProtocol/aztec-packages/issues/1283
- [ ] https://github.com/AztecProtocol/aztec-packages/issues/1284
### Misc
- [ ] https://github.com/AztecProtocol/aztec-packages/issues/1458
The people want cheatcodes for testing!
Testing can be a bit of a pain in the neck if insufficient access to data or manipulation is available. Therefore we want to support some of the cheatcodes that Hardhat and Foundry supplies on the L2 as well. Some of the differs a bit from what is seen at https://book.getfoundry.sh/cheatcodes/ as it needs a extra functions for the distinction between private and public data.
I suggest that we create a
CheatCodeclass that implements those functions to make it easily accessible to devs without having to stroll through 10 different classes. Similar to how you can usevmin foundry tests.Consider:
l1and anl2sub class as many of these can be useful for either, for thel1cheatcodes we should call theanvilcheatcodes directly.