Loading
Metadata TZIP-16: add warning on metadata URI/JSON when compiling storage (Michelson)
Motivation and Context
Related Issue: #1788 (closed).
Description
This MR adds warnings checking the following:
- Checks that
%metadatahas a key"". - That the value corresponding to the key
""above is asha256,http,https,ipfsortezos-storageURI. - In case the above is a
tezos-storagewithout host, then the key pointed by the path also exists in%metadata. - In case the above is an URL, the file could be downloaded using
--allow-json-download. - The pointed document/value is valid JSON (including well typed views).
This is an alternative to !2703 (closed) , in which we do not have to modify testing framework and analyze directly the storage as Michelson.
Component
- compiler
- website
- webide
- vscode-plugin
- debugger
Types of changes
- Bug fix (non-breaking change which fixes an issue)
- New feature (non-breaking change which adds functionality)
- Breaking change (fix or feature that would cause existing functionality to not work as expected)
- Performance improvement (non-breaking change that improves performance)
- None (change with no changelog)
Changelog
New checks for metadata TZIP-16 are included.
This is a breaking change, as now metadata type compliance is disabled by default and --no-metadata-check flag no longer exists.
To verify TZIP-16 compliance, pass the flag --verify-tzip16 to compilation sub-commands (particularly compile storage).
Checklist:
- If a new syntax has been introduced, put a message on slack ligo-lsp
- Changes follow the existing coding style (use
dune @fmtto check). - Tests for the changes have been added (for bug fixes / feature).
- Documentation has been updated.
- Changelog description has been added (if appropriate).
- Start titles under
## Changelogsection with #### (if appropriate). - There is no image or uploaded file in changelog
- Examples in changed behaviour have been added to the changelog (for breaking change / feature).
Edited by E. Rivas