What will happen if I use assert() inside the function inside() which is called from the function main() ?
If condition is true then control returns to function main() . What if condition is false? Do it return back to function main() or exit from the contract execution ?
As far as I know if the condition is false then It throws. This throws exit the function or exit the contract execution ?

function inside(){  

  function main(){  

  • Sharing some code would help us understand the issue better.
    – Sanchit
    Commented Jul 20, 2017 at 7:19

1 Answer 1


in short : the function assert(bool condition) : throws if the condition is not met.thus in your code if the condition is false the inside function will throw and stop the contract execution.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.