Questions tagged [modifiers]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
64
votes
2answers
22k views

Solidity: What is the difference between `view` and `constant`?

Solidity 0.4.16 introduced the view and constant function modifiers. The documentation says: constant for functions: Same as view. Does this mean view is just an alias for constant? If so, why do ...
41
votes
1answer
10k views

Are underscores `_` in modifiers code or are they just meant to look cool?

I often see _ in modifiers modifier onlyOwner() { if (msg.sender != owner) throw; _ } Does it execute any code or is it meant to make the code easier to read ?
14
votes
1answer
1k views

Bad Jump Destination error

I wrote what I thought was a dead simple contract - a saving jar... you add value ("save") into the jar and when the balance of the contract reaches a certain amount ("target"), then I am able to ...
0
votes
0answers
40 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. ...