0

I am wondering if feedback to wallet-users from Michelson contracts has been considered previously in the development of Tezos, and where is it / why is it not being considered ?

I am thinking it would be useful to embed in Michelson a way to provide human-readable feedback in the form of strings. (The main purpose would be to produce feedback in a wallet app; but maybe it could be used for debug/test as well. There is a mechanism for error messages, but there I can't see anything that seems to support information and warning messages.)

Just to clarify a few points of what I'm thinking:

Contract feedback does not offer any security per se, but it could allow users to check if they input their parameters correctly, and it could provide some warnings e.g. an underlying contract could notify if entry-points are accessed by intermediary contracts rather than directly.

The contract output messages could be solely for simulation as it is not really necessary to put the results in storage, therefore it can also be omitted during block production and it should consume a very minimal amount of gas.

1 Answer 1

1

In case of errors, the FAILWITH instruction accepts almost any value (any value of a packable type to be precise) so it can be used directly to produce informative and structured errors.

Regarding feedback on successful calls, this is what events are about. There is currently no builtin support for events in Tezos but they are easy to simulate (as contract calls toward some dummy contract, see this discussion).

1
  • The 'noop dummy contract' method is very interesting, though it could have side-effects affecting gas/storage it seems. Is that avoidable in any way? FAILWITH can perhaps be used sometimes but requires the callee to know it is simulated and then extra effort to build up a comprehensive 'reply' (especially from multiple contracts). Events sounds like what I was looking for even though I don't fully understand the discussion. Do you think the 9 months without any update is a sign that this proposal is going stale? Thanks!
    – HKOB
    Dec 29, 2021 at 11:45

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.