Closed YannSuissa closed 1 week ago
Hi there, you should try like this:
await expect(nft_contract.connect(addrs[2]).set_sale_step(1)).to.be.revertedWithCustomError(nft_contract, "OwnableUnauthorizedAccount").withArgs("0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC");
Your await is most likely not at the right place.
Thanks all my test were wrong because of the await ...
Hi,
I can't catch a reverter error for the Onlyowner modifier from Openzepplin :
ProviderError: Error: VM Exception while processing transaction: reverted with custom error 'OwnableUnauthorizedAccount("0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC")'
I tried without success:
In openzepplin it's this kind of error :
here are my versions :