Skip to content

Investigate if it possible to avoid passing ethers in Chai Matchers #8473

Description

@ChristopherDedominici

Link to comment that raised the issue (Lido core repo): NomicFoundation/lidofinance-core#1 (comment)

In Hardhat 2 the chai matchers providered asserts on revert with the following syntax:

await expect(vaultHub.obligationsShortfallValue(vault)).not.to.be.reverted

Implicit in this is that the revert was happening on the ambient network connection for that current HRE instanct.

In Hardhat 3 there can be many connections and network.ethers instances, hence the particular ethers instance has to be passed to the assert:

await expect(vaultHub.obligationsShortfallValue(vault)).not.to.revert(ethers);

This is annoying boilerplate. Can this be improved?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions