Skip to content

Releases: foundry-rs/forge-std

v1.7.4

15 Dec 16:13
155d547
Compare
Choose a tag to compare

Featured Changes

  • Update Vm.sol with changes to AccountAccessKind by @emo-eth in #483.
    • This adds Balance, Extcodesize, Extcodehash, Extcodecopy as account access kinds
  • feat: add new snapshot cheatcodes by @mattsse in #484.
    • The vm.revertTo(snapshotId) cheat does not automatically delete the snapshotId snapshot, which can lead to unbounded memory growth with lots of snapshots. Therefore, vm.revertToAndDelete(snapshotId), vm.deleteSnapshot(snapshotId), and vm.deleteSnapshots() were added as new cheats.

Other Changes

Full Changelog: v1.7.3...v1.7.4

v1.7.3

20 Nov 14:44
2f11269
Compare
Choose a tag to compare

Featured Changes

  • feat: add vm.startStateDiffRecording and vm.stopAndReturnStateDiff cheats to record all account accesses and storage accesses, by @Inphi in #481
  • feat: add vm.computeCreateAddress and vm.computeCreate2Address cheats, by @qiweiii in #479
    • These native cheats replace the need for the StdUtils methods of the same now, which will now give a deprecation warning when used.
  • feat: add mock contracts for ERC20 and ERC721, by @andreivladbrg in #470
    • Be aware that these use initializers instead of constructors for compatibility across Solidity versions. Therefore it's recommended to use the deployMockERC20 and deployMockERC721 methods in StdUtils to deploy them.

Other Changes

  • chore: bump version to v1.7.3 by @mds1 in #482

New Contributors

Full Changelog: v1.7.2...v1.7.3

v1.7.2

13 Nov 23:24
bdea49f
Compare
Choose a tag to compare

Featured Changes

  • feat: add vm.loadAllocs(string) cheatcode by @tynes in #474. This reads in a JSON file to directly set state for many accounts at once.
  • feat: add vm.eth_getLogs and vm.rpc cheats by @Evalir in #475. The vm.eth_getLogs cheat makes an eth_getLogs RPC call and returns the result, and the vm.rpc cheat allows arbitrary RPC calls to be made. These query the current fork URL.

Other Changes

New Contributors

Full Changelog: v1.7.1...v1.7.2

v1.7.1

05 Oct 20:35
f73c73d
Compare
Choose a tag to compare

What's Changed

This release contains no functional changes. It simply resolves #467 by ensuring the version in the package.json matches the release. The package.json file was updated in #468.

Full Changelog: v1.7.0...v1.7.1

v1.7.0

04 Oct 14:55
dcb0d52
Compare
Choose a tag to compare

Featured Changes

  • chore(BREAKING CHANGE): Change exit_code to exitCode by @PaulRBerg in #458
    • This is a breaking change for any users who use the exit_code variable in the FfiResult struct1
  • feat: add new vm.serializeJson cheatcode to the Vm and to StdJson by @vdrg in #453
  • feat: add vm.unixTime to VmSafe interface by @Tudmotu in #465
  • perf: mark vm.parseJsonKeys as pure by @PaulRBerg in #460

Other Changes

  • chore: reorder Vm for logical consistency by @mds1 in #464

Full Changelog: v1.6.1...v1.7.0

  1. exit_code was recently introduced, and a sourcegraph search did not reveal many existing users of it. Because this repo uses camelCase, it was determined this breaking change was acceptable to keep things consistent, even though this technically does not follow semver.

v1.6.1

05 Sep 16:08
1d9650e
Compare
Choose a tag to compare

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 to StdInvariant to allow targeting interfaces by @bernard-wagner in #445
  • New filesystem cheats:
  • New JSON parsing cheats:
  • New chains in StdChains:
    • feat: add base goerli and base chains to StdChains by @giuseppecrj in #437
    • feat: add moonbeam.network chains to StdChains by @klkvr in #426
  • feat:: add vm.createWallet, vm.sign, and vm.getNonce for Wallet struct by @trevorgjohnson in #435
  • feat: add vm.sleep(uint) to VmSafe interface by @Tudmotu in #438
  • feat: add vm.tryFfi by @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

Full Changelog: v1.6.0...v1.6.1

v1.6.0

11 Jul 18:04
74cfb77
Compare
Choose a tag to compare

Featured Changes

  • fix(tests): conform to upcoming expectRevert behavior by @Evalir in #379 — Read more about the upcoming forge v1 behavior here
  • feat: add CallerMode enum and vm.readCallers cheat by @xeno097 in #400
  • feat: add deployCodeTo StdCheat by @ZeroEkkusu in #401
  • feat: add vm.skip(bool) cheat by @Evalir in #410
  • feat: add checked_write_int for int256 to StdStorage by @0xb10ckdev in #415
  • feat: add assumeAddressIsNot StdCheats @Sabnock01 in #407

Other Changes

New Contributors

Full Changelog: v1.5.6...v1.6.0

v1.5.6

26 May 15:32
e8a047e
Compare
Choose a tag to compare

Featured Changes

  • feat(cheats): add vm.getLabel cheatcode by @Evalir in #370
  • feat(cheats): Add vm.prevrandao to Vm.sol by @Evalir in #377
  • feat(cheats/stdCheats): add destroyAccount stdCheat (used to mimic self-destruct) and vm.setNonceUnsafe and vm.resetNonce cheats by @joaquinlpereyra in #389
  • feat(stdCheats): add boundPrivateKey util by @PaulRBerg in #382
  • feat(stdCheats): add assumeNoBlacklisted cheat 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

New Contributors

Full Changelog: v1.5.5...v1.5.6

v1.5.5

30 Apr 14:02
73d44ec
Compare
Choose a tag to compare

Featured Changes

  • feat: add new filesystem cheatcodes and update existing ones, by @DaniPopes in #367

Other Changes

  • ci: automatically sync v1 release 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

Full Changelog: v1.5.4...v1.5.5

v1.5.4

27 Apr 21:09
97810eb
Compare
Choose a tag to compare

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:

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:

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