Changes
-
#8329
02fc7fbThanks @alcuadrado! - The assertionsbalancesHaveChanged,emit, andemitWithArgsnow accept either a promise or its already-awaited value, soawait contract.write.foo()can be passed directly.emitandemitWithArgsnow only look at logs produced by the specific transaction passed in (via its receipt) instead of every log ever emitted by the contract address. Tests that previously passed by matching events from other transactions on the same contract will now correctly fail.The
contractFnparameter ofemitandemitWithArgshas been narrowed accordingly: it no longer acceptsReadContractReturnType(reads don't produce a receipt). Existing code passing a read result was already a no-op against the contract's logs and would not have produced a meaningful assertion. -
#8313
f1663f7Thanks @0xAxiom! - Compare addresses case-insensitively in withArgs / revertWithCustomErrorWithArgs -
Updated dependencies:
- @nomicfoundation/hardhat-utils@4.1.3
- @nomicfoundation/hardhat-errors@3.0.14
💡 The Nomic Foundation is hiring! Check our open positions.