Skip to content

assertion error #901

Answered by letallan
chrismogab asked this question in Q&A
Jul 12, 2022 · 4 comments · 11 replies
Discussion options

You must be logged in to vote

I use Hardhat 2.10.1 and came across the same error. Here's the solution:

await expect(
    attackerConnectedContract.withdraw()
).to.be.revertedWithCustomError(fundMe, "FundMe__NotOwner");

Replies: 4 comments 11 replies

Comment options

You must be logged in to vote
3 replies
@mattjaf
Comment options

@chrismogab
Comment options

@Darlington02
Comment options

Comment options

You must be logged in to vote
2 replies
@chrismogab
Comment options

@alymurtazamemon
Comment options

Comment options

You must be logged in to vote
5 replies
@alymurtazamemon
Comment options

@alymurtazamemon
Comment options

@alymurtazamemon
Comment options

@adamluvshotsauce
Comment options

@chrismogab
Comment options

Comment options

You must be logged in to vote
1 reply
@leiw5173
Comment options

Answer selected by alymurtazamemon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
7 participants