In a SmartPy smart contract, is there 'continue' or 'break' for loop?

When I use 'continue' for loop, an error occurred. 'Error: invalid syntax'

  • Could you share the contract? Oct 20 '20 at 7:25
  • Which language are you using?
    – arvidj
    Oct 20 '20 at 7:49
  • I'm using smartpy
    – MS.J
    Oct 20 '20 at 8:10

There is no sp.continue or sp.break inside a sp.for at the moment. We may add that in the future.

Please keep in mind that iterating on non trivially small lists is usually a bad idea inside a smart contract.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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