Releases: foundry-rs/forge-std
Releases · foundry-rs/forge-std
v1.7.5
Featured Changes
vm.envOr
andvm.getLabel
are nowview
@anikaraghu in #491
Other Changes
- feat: automatically generate Vm.sol from cheatcodes.json by @DaniPopes in #487
- chore: bump to v1.7.5 by @mds1 in #492
New Contributors
- @anikaraghu made their first contribution in #491
Full Changelog: v1.7.4...v1.7.5
v1.7.4
Featured Changes
- Update
Vm.sol
with changes toAccountAccessKind
by @emo-eth in #483.- This adds
Balance
,Extcodesize
,Extcodehash
,Extcodecopy
as account access kinds
- This adds
- feat: add new snapshot cheatcodes by @mattsse in #484.
- The
vm.revertTo(snapshotId)
cheat does not automatically delete thesnapshotId
snapshot, which can lead to unbounded memory growth with lots of snapshots. Therefore,vm.revertToAndDelete(snapshotId)
,vm.deleteSnapshot(snapshotId)
, andvm.deleteSnapshots()
were added as new cheats.
- The
Other Changes
Full Changelog: v1.7.3...v1.7.4
v1.7.3
Featured Changes
- feat: add
vm.startStateDiffRecording
andvm.stopAndReturnStateDiff
cheats to record all account accesses and storage accesses, by @Inphi in #481 - feat: add
vm.computeCreateAddress
andvm.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.
- These native cheats replace the need for the
- 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
anddeployMockERC721
methods inStdUtils
to deploy them.
- Be aware that these use initializers instead of constructors for compatibility across Solidity versions. Therefore it's recommended to use the
Other Changes
New Contributors
- @Inphi made their first contribution in #481
- @qiweiii made their first contribution in #479
- @andreivladbrg made their first contribution in #470
Full Changelog: v1.7.2...v1.7.3
v1.7.2
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
andvm.rpc
cheats by @Evalir in #475. Thevm.eth_getLogs
cheat makes aneth_getLogs
RPC call and returns the result, and thevm.rpc
cheat allows arbitrary RPC calls to be made. These query the current fork URL.
Other Changes
- fix: rely less on foundry internals by @DaniPopes in #473
- fix: test naming by @totomanov in #472
- chore: bump to v1.7.2 by @mds1 in #478
New Contributors
- @totomanov made their first contribution in #472
- @tynes made their first contribution in #474
Full Changelog: v1.7.1...v1.7.2
v1.7.1
v1.7.0
Featured Changes
- chore(BREAKING CHANGE): Change
exit_code
toexitCode
by @PaulRBerg in #458- This is a breaking change for any users who use the
exit_code
variable in theFfiResult
struct1
- This is a breaking change for any users who use the
- feat: add new
vm.serializeJson
cheatcode to the Vm and to StdJson by @vdrg in #453 - feat: add
vm.unixTime
toVmSafe
interface by @Tudmotu in #465 - perf: mark
vm.parseJsonKeys
as pure by @PaulRBerg in #460
Other Changes
Full Changelog: v1.6.1...v1.7.0
-
exit_code
was recently introduced, and a sourcegraph search did not reveal many existing users of it. Because this repo usescamelCase
, it was determined this breaking change was acceptable to keep things consistent, even though this technically does not follow semver. ↩
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 toStdInvariant
to allow targeting interfaces by @bernard-wagner in #445 - New filesystem cheats:
- feat: add
vm.copyFile
cheatcode by @DaniPopes in #431 - feat: add
vm.exists
,vm.isFile
andvm.isDir
by @ruvaag in #441
- feat: add
- 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 base goerli and base chains to
- feat:: add
vm.createWallet
,vm.sign
, andvm.getNonce
forWallet
struct by @trevorgjohnson in #435 - feat: add
vm.sleep(uint)
toVmSafe
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
- @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
expectRevert
behavior by @Evalir in #379 — Read more about the upcoming forge v1 behavior here - feat: add
CallerMode
enum andvm.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
forint256
toStdStorage
by @0xb10ckdev in #415 - feat: add
assumeAddressIsNot
StdCheats @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.getLabel
cheatcode by @Evalir in #370 - feat(cheats): Add
vm.prevrandao
toVm.sol
by @Evalir in #377 - feat(cheats/stdCheats): add
destroyAccount
stdCheat (used to mimic self-destruct) andvm.setNonceUnsafe
andvm.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.log
s 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
Create2Factory
toCommonBase
by @Sabnock01 in #388 - feat(constants): add
SECP256K1_ORDER
constant 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
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
- @DaniPopes made their first contribution in #367
Full Changelog: v1.5.4...v1.5.5