Questions tagged [require]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2
votes
1answer
426 views

VM Exception while processing transaction: revert message

When a solidity smart contract reverts with a message due to a failure on a require statement, the browser calling the smart contract returns "Error: VM Exception while processing transaction: revert"....
2
votes
1answer
1k views

Custom error message in require() not showing up?

I've got Solidity v0.4.24 And I'm doing this: require(false,"this is a test"); When I run truffle test I get the revert, but I cant see the error message. Any ideas what could be wrong?
3
votes
2answers
515 views

Read message of require / revert statement in app.js

In my App.js I have called the smart contract function and the require statement in the function is not satisfied, so how do I get the message of that require statement in my App.js?
1
vote
0answers
279 views

Catch a "require()" in frontend

I was trying to validate a transaction with some conditions on contract level and was wondering if it was possible in any way to give user feedback in the frontend if a require() fails - aka if it ...
1
vote
1answer
421 views

Handling require/assert failure errors correctly from a Node.JS app?

I have a getter function in my smart contract that returns one of the string values in statically defined string array. Upon entry to the function, it does a bounds check on the incoming index using ...
0
votes
0answers
48 views

Are function modifiers added to the stack in solidity? [duplicate]

I've got a function with a decent number of modifiers and I hit the CompilerError: Stack too deep, try removing local variables error. If I remove one of the modifiers though, everything's all right. ...