Skip to content

Metadata TZIP-16: add warning on metadata URI/JSON when compiling storage (Michelson)

E. Rivas requested to merge metadata-compile-storage-michelson into dev

Motivation and Context

Related Issue: #1788 (closed).

Description

This MR adds warnings checking the following:

  • Checks that %metadata has a key "".
  • That the value corresponding to the key "" above is a sha256, http, https, ipfs or tezos-storage URI.
  • In case the above is a tezos-storage without 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 @fmt to 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 ## Changelog section 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

Merge request reports