When trying to check the transferred value is positive I get an error that TMutez is not TIntOrNat.:

sp.verify(sp.amount > 0, "Amount should be positive")

1 Answer 1


It seems like SmartPy type inference doesn't auto-cast 0 to mutez. We need to do the following:

sp.amount > sp.mutez(0)
  • 1
    It's perfectly exact.
    – FFF
    Dec 4, 2020 at 19:04

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.