You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for bringing this up. Good point. I'll check with Ethan, who originally created the Underflow error case to find a way tht is consistent.
Panics in smart contracts are a bit problematic because they are very hard to debug. Your code is terminated but there is no error message or stack trace available.
I guess adding the explicit methods like checked_*/wrapping_*/saturating_* is less controversial,
then we need to decide on the default behavior of the operators.
Add
use default+
operator under the hood, whileSub
usechecked_sub
.I think it would be better to keep is consistent with rust std's behaviour:
+/-
, panic when wrapping.checked_*
/wrapping_*
/saturating_*
operations.The text was updated successfully, but these errors were encountered: