question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add checks for revert reason strings

See original GitHub issue

Everywhere we are using reverting function replace with our function which will check if revert message is correct. This will help us be confident that our test are correct and our contracts are working as expected.

Depends on #17

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
lazovicffcommented, Dec 7, 2018

So it will be similar to Simple revert you mentioned, but with a check for revert message. I didn’t planed this to be done via events. I forgot to mention this feature is available with truffle 5.0.0. See https://github.com/trufflesuite/truffle/releases/tag/v5.0.0-beta.0 I can create separate issue for upgrading to truffle 5

0reactions
CPerezzcommented, Dec 7, 2018

It’s not necessary, with previous truffle versions it’s possible to change the injected Web3 Object by Truffle.

You can search about it. But if you think it’ll be good and you know the tool, let’s do it!! We can make an issue to re-write the tests usin Web3 1.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

Web3 1.2.5: Revert reason strings - Solidity developer
With the latest version 1.2. 5, you can now see the the revert reason if you use the new handleRevert option. You can...
Read more >
Add rules for revert reason strings · Issue #108 · protofire/solhint
We'll be working on revert reasons in OpenZeppelin, and it'd be great to have ... of are: a) check that every require statement...
Read more >
Is there a way to add all revert error strings to an ethers js ...
I managed to get it working by first checking if it's a standard revert string and if not attempting to parse it as...
Read more >
Include revert reason - GoQuorum - latest - ConsenSys
Revert reason ¶. In smart contracts, the revert operation triggers an exception to flag an error and revert the current call.
Read more >
How to properly use revert reason in web3.js to show ...
So a transaction calling the foo() function should revert with the message This is error message . try { await myContract.methods.foo().send(); } ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found