Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

When generating contract metadata with `sp.init_metadata` do you include or exclude on-chain views in the `views` array in the metadata?

When I perform self.init_metadata("metadata", some_metadata) on contract metadata inside SmartPy, should the list of views inside the TZIP-16 (https://tzip.tezosagora.org/proposal/tzip-16/) metadata only contain off-chain views, or must on-chain views also be included in this information?

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Internally, the compiler interprets on-chain views the same way as off-chain views when it comes to metadata (not included in the contract code).

If the off-chain view has the same logic as the on-chain view, you can remove the off-chain entirely and just use the on-chain view.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading