1

When performing

self.init_metadata("metadata", some_metadata)

on contract metadata inside smartpy, should the list of views inside the TZIP-16 metadata only contain off-chain views, or must on-chain views also be included in this information?

2 Answers 2

1

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.

0

You do not include the on-chain views there. Here, an image from the docs:

on-chain views

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.