stablecoin
stablecoin copied to clipboard
Add dynamic errors to metadata
Clarification and motivation
In #124, we added support for TZIP-16. However, we don't yet support dynamic errors.
TZIP-16 distinguishes between:
- Static errors: errors that contain only an hardcoded value, like
"NOT_CONTRACT_OWNER" - 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