Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Add arithmetic dispatch errors. #8726

Merged
merged 7 commits into from
May 10, 2021

Conversation

shaunxw
Copy link
Contributor

@shaunxw shaunxw commented May 4, 2021

  • Introduce Arithmetic(ArithmeticError) variant.
  • Replace custom arithmetic errors in FRAME.
  • Replace overflow/underflow in TokenError.
  • Add token and arithmetic errors in DispatchError equality test.

Closes #8544

@cla-bot-2021
Copy link

cla-bot-2021 bot commented May 7, 2021

User @shaunxw, please sign the CLA here.

@shaunxw shaunxw changed the title WIP - Add arithmetic dispatch errors. Add arithmetic dispatch errors. May 9, 2021
@shaunxw shaunxw marked this pull request as ready for review May 9, 2021 08:12
@shawntabrizi
Copy link
Member

great :)

@shawntabrizi shawntabrizi added B7-runtimenoteworthy C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit labels May 9, 2021
@shawntabrizi
Copy link
Member

@jacogr I think this is a breaking change for you?

Copy link
Member

@shawntabrizi shawntabrizi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this makes sense to me

@jacogr
Copy link
Contributor

jacogr commented May 10, 2021

Not a breaking change, but does require an backwards-compatible adjustment.

@bkchr bkchr merged commit efd262f into paritytech:master May 10, 2021
@shaunxw shaunxw deleted the sw/dispatch-error-arithmetic branch May 10, 2021 23:14
nazar-pc pushed a commit to autonomys/substrate that referenced this pull request Aug 8, 2021
* Add arithmetic dispatch errors.

* Replace custom overflow errors.

* Replace custom underflow and division by zero errors.

* Replace overflow/underflow in token error.

* Add token and arithmetic errors in dispatch error equality test.

* Trigger CI.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Overflow to DispatchError
4 participants