Skip to content

Add dynamic errors to metadata #139

@dcastro

Description

@dcastro

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions