github NomicFoundation/hardhat @nomicfoundation/hardhat-viem-assertions@3.1.0

latest release: hardhat@3.6.0
5 hours ago

Changes

  • #8329 02fc7fb Thanks @alcuadrado! - The assertions balancesHaveChanged, emit, and emitWithArgs now accept either a promise or its already-awaited value, so await contract.write.foo() can be passed directly.

    emit and emitWithArgs now 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 contractFn parameter of emit and emitWithArgs has been narrowed accordingly: it no longer accepts ReadContractReturnType (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 f1663f7 Thanks @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.


Don't miss a new hardhat release

NewReleases is sending notifications on new releases.