Ongoing discussion about improvement for the Michelson-Encoder package #840
Replies: 2 comments 1 reply
-
Issue: When calling a complex smart contract entry point, even with the abstraction over the Michelson syntax provided by Taquito, it might be hard for the user to figure out how to write the parameters correctly. Current implementation:The Suggested changes:We want to provide a way for the user of Taquito to pass an object when calling a contract entry point, like it is the case for deploying a contract using the Changes to the Michelson-encoder package:Add an Changes to the taquito package
|
Beta Was this translation helpful? Give feedback.
-
I'm leaning to Solution 1 because it allows existing projects to start using the new way incrementally. Whereas, with Solution 2, I think when a user sets the optional |
Beta Was this translation helpful? Give feedback.
-
What is the Michelson-Encoder?
The main feature of the Michelson-Encoder is to transform Michelson data to javascript and javascript data to Michelson. We use this feature to provide an easy way for the users to write the storage when deploying a contract, the parameters when calling an entry point of a contract or a “lambda” view, the key when fetching the value of a big map, and the parameter when calling an off-chain view (tzip16). This feature is also used to create a friendly representation when fetching the storage value of a contract.
What are the problems we want to solve?
union
looks likemethods.entrypoint("annotation", value)
whilelist of unions
looks likemethods.entrypoint({ or_annot: { field_annot: value }})
Beta Was this translation helpful? Give feedback.
All reactions