Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dynamic errors to metadata #139

Open
dcastro opened this issue Nov 27, 2020 · 0 comments
Open

Add dynamic errors to metadata #139

dcastro opened this issue Nov 27, 2020 · 0 comments

Comments

@dcastro
Copy link
Contributor

dcastro commented Nov 27, 2020

Clarification and motivation

In #124, we added support for TZIP-16. However, we don't yet support dynamic errors.

TZIP-16 distinguishes between:

  1. Static errors: errors that contain only an hardcoded value, like "NOT_CONTRACT_OWNER"
  2. Dynamic errors: errors that contain non-hardcoded values, like ("MISSIGNED", <bytes>)"

We should add support for these:

  • MISSIGNED
  • NotEnoughBalance (in the fa1.2 version of the contract)
  • UnsafeAllowanceChange (in the fa1.2 version of the contract)

Because the metadata is already too big to fit in stablecoin's storage, we should wait for #138 before doing this.

It would also be nice to do morley-metadata/#2 first, but that's not strictly necessary.

Acceptance criteria

The stablecoin contract's metadata contains 1 dynamic error for 'MISSIGNED', and the FA1.2 stablecoin's metadata contains 3 dynamic errors for MISSIGNED/NotEnoughBalance/UnsafeAllowanceChange

@dcastro dcastro changed the title Add dynamic errors Add dynamic errors to metadata Nov 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant