Releases: foundry-rs/forge-std
v1.6.1
Featured Changes
- feat: add cheatcodes and standard cheats to get keys of a mapping, by @clouds56, @Evalir, and @mds1 in #448 and #449
- feat: add
targetInterface()helpers toStdInvariantto allow targeting interfaces by @bernard-wagner in #445 - New filesystem cheats:
- feat: add
vm.copyFilecheatcode by @DaniPopes in #431 - feat: add
vm.exists,vm.isFileandvm.isDirby @ruvaag in #441
- feat: add
- New JSON parsing cheats:
- New chains in
StdChains:- feat: add base goerli and base chains to
StdChainsby @giuseppecrj in #437 - feat: add moonbeam.network chains to
StdChainsby @klkvr in #426
- feat: add base goerli and base chains to
- feat:: add
vm.createWallet,vm.sign, andvm.getNonceforWalletstruct by @trevorgjohnson in #435 - feat: add
vm.sleep(uint)toVmSafeinterface by @Tudmotu in #438 - feat: add
vm.tryFfiby @jrcarlos2000 in #443
Other Changes
- fix: restore inheritance order by @ZeroEkkusu in #425
- chore(
StdCheats): deprecate changePrank by @Evalir in #434 - fix: assumeNotForgeAddress in StdCheats.sol by @ashhanai in #430
- chore: conform test naming to style guide by @Sabnock01 in #433
- chore: make json parse cheatcodes pure by @vdrg in #447
- fix(stdStorage): wrong slot id may returned by
find()when slot value == 1337 by @paco0x in #446
New Contributors
- @klkvr made their first contribution in #426
- @trevorgjohnson made their first contribution in #435
- @ashhanai made their first contribution in #430
- @Tudmotu made their first contribution in #438
- @giuseppecrj made their first contribution in #437
- @ruvaag made their first contribution in #441
- @jrcarlos2000 made their first contribution in #443
- @vdrg made their first contribution in #447
- @bernard-wagner made their first contribution in #445
Full Changelog: v1.6.0...v1.6.1
v1.6.0
Featured Changes
- fix(tests): conform to upcoming
expectRevertbehavior by @Evalir in #379 — Read more about the upcoming forge v1 behavior here - feat: add
CallerModeenum andvm.readCallerscheat by @xeno097 in #400 - feat: add
deployCodeToStdCheat by @ZeroEkkusu in #401 - feat: add
vm.skip(bool)cheat by @Evalir in #410 - feat: add
checked_write_intforint256toStdStorageby @0xb10ckdev in #415 - feat: add
assumeAddressIsNotStdCheats @Sabnock01 in #407
Other Changes
- chore: remove unused import by @paco0x in #392
- fix: improve DX by @ZeroEkkusu in #398
- ci: check for warnings by @ZeroEkkusu in #403
- ci: fix indentation by @mds1 in #408
- ci: remove dup step by @ZeroEkkusu in #413
- chore: bump to v1.6.0 by @mds1 in #417
New Contributors
- @paco0x made their first contribution in #392
- @xeno097 made their first contribution in #400
- @0xb10ckdev made their first contribution in #415
Full Changelog: v1.5.6...v1.6.0
v1.5.6
Featured Changes
- feat(cheats): add
vm.getLabelcheatcode by @Evalir in #370 - feat(cheats): Add
vm.prevrandaotoVm.solby @Evalir in #377 - feat(cheats/stdCheats): add
destroyAccountstdCheat (used to mimic self-destruct) andvm.setNonceUnsafeandvm.resetNoncecheats by @joaquinlpereyra in #389 - feat(stdCheats): add
boundPrivateKeyutil by @PaulRBerg in #382 - feat(stdCheats): add
assumeNoBlacklistedcheat by @PaulRBerg in #384 - feat(logs): pure
console.logs by @0xdapper in #374 - feat(logs): add memory safe logging by @Philogy in #375
Other Changes
- perf: use staticcall instead of call by @PaulRBerg in #383
- chore(constants): add
Create2FactorytoCommonBaseby @Sabnock01 in #388 - feat(constants): add
SECP256K1_ORDERconstant by @PaulRBerg in #381 - chore: bump version to v1.5.6 by @mds1 in #391
New Contributors
- @Evalir made their first contribution in #370
- @Philogy made their first contribution in #375
- @joaquinlpereyra made their first contribution in #389
Full Changelog: v1.5.5...v1.5.6
v1.5.5
Featured Changes
- feat: add new filesystem cheatcodes and update existing ones, by @DaniPopes in #367
Other Changes
- ci: automatically sync
v1release branch on new releases, by @PaulRBerg in #366 - test: comment out flaky test by @mds1 in #364
- chore: update infura keys by @mds1 in #368
- chore: bump to v1.5.5 by @mds1 in #369
New Contributors
- @DaniPopes made their first contribution in #367
Full Changelog: v1.5.4...v1.5.5
v1.5.4
Featured Changes
Breakpoints
Use vm.breakpoint(string calldata char) and vm.breakpoint(string calldata char, bool value) to set breakpoints when using the debugger. Jump to those breakpoints using '<char>. The bool overload lets you set conditional breakpoints.
More info:
- Find the cheats here.
- The two forge-std PRs by @iFrostizz: #357 and #358
Expect Zero or Many Calls
The vm.expectCall cheats have a new overload that takes a count, which is the number of times you expect that call to be made in the next call. Use a value of zero if you want to test that a call does not occur.
More info:
- Find the cheats here
- The forge-std PR by @reubenr0d in #360
Other Changes
- refactor: provide pure bound int that has no console.logs by @PaulRBerg in #350
- fix: removed unnecessary todo comment by @dd0sxx in #354
- docs: improve writing in StdChains comments by @PaulRBerg in #355
- chore: bump to v1.5.4 by @mds1 in #362
New Contributors
Full Changelog: v1.5.3...v1.5.4
v1.5.3
Featured Changes
- feat: Add new
vm.expectSafeMemorycheats by @clabby in #327 - feat: add
Accounthelper struct to StdCheats by @jameswenzel in #331 - fix(StdAssertions): % is not displayed as % by @0xdapper in #336
- feat: add
vm.mockCallRevertcheatcode by @reubenr0d in #337 - feat: add
vm.txGasPricecheat by @mds1 in #341 - chore: bump DS Test version to add
assertNotEqassertion helpers by @0xGuybrush in #339
Other Changes
- feat: name emitter in "expectEmit" by @PaulRBerg in #329
- ♻️ Remove Unused Function Parameters in
StdAssertions.t.solby @pcaversaccio in #328 - fix: initialize function collision by @brotherlymite in #333
- Fixed a typo in StdUtils.sol by @Iaroslav-Mazur in #340
- chore: bump to v1.5.3 by @mds1 in #342
New Contributors
- @brotherlymite made their first contribution in #333
- @0xdapper made their first contribution in #336
- @reubenr0d made their first contribution in #337
- @Iaroslav-Mazur made their first contribution in #340
- @0xGuybrush made their first contribution in #339
Full Changelog: v1.5.2...v1.5.3
v1.5.2
What's Changed
- fix:
src/and all subdirectories now included when installing this package with yarn directly from GitHub. by @EdouardBougon in #324
New Contributors
- @EdouardBougon made their first contribution in #324
Full Changelog: v1.5.1...v1.5.2
v1.5.1
What's Changed
- feat: add "changePrank" variant by @PaulRBerg in #319
- feat: add simple "expectEmit" by @PaulRBerg in #320
Full Changelog: v1.5.0...v1.5.1
v1.5.0
Featured Changes
- feat: add
StdStylelibrary to print logs with different colors and styles,by @wirew0lf in #313- Example usage:
console2.log(StdStyle.red("my red string")) - Available method names are
red,green,yellow,blue,magenta,cyan,bold,italic,underline,dim, andinverse
- Example usage:
- Rename
StdAssertions.sollogs fromactualandexpectedtoleftandright, to make it easier to read failed assertions, by @Sabnock01 in #290 - feat(StdCheats): add
dealERC721anddealERC1155cheats by @wirew0lf in #305 - feat(StdAssertions): add
assertEqCallassertion helpers by @0xPhaze in #311 - feat(Vm): Add new
expectCallvariants to assert on the amount of gas passed to a call, by @clabby in #310
Other Changes
- Bump ds-test and complete assertion log renaming by @Sabnock01 in #307
New Contributors
- @Sabnock01 made their first contribution in #290
- @clabby made their first contribution in #310
- @wirew0lf made their first contribution in #313
- @0xPhaze made their first contribution in #311
Full Changelog: v1.4.0...v1.5.0
v1.4.0
Featured Changes
- refactor(BREAKING CHANGE): rename InvariantTest to StdInvariant and have Test inherit from it by default by @mds1 in #292
- Add create2 helper methods
computeCreate2AddressandhashInitCodeby @karmacoma-eth in #276 - Add flag disable default rpc with
setFallbackToDefaultRpcUrls(bool)by @hexonaut in #291
Other Changes
- refactor: rename "who" arg to "msgSender" by @PaulRBerg in #277
- Just a minor change to stay consistent with the helpful comment by @FredCoen in #278
- ci: remove key that doesn't work by @mds1 in #284
- chore: use coercion cheatcodes with stdJson helpers by @odyslam in #294
- chore: bump to v1.4.0 by @mds1 in #300
Full Changelog: v1.3.0...v1.4.0