taquito icon indicating copy to clipboard operation
taquito copied to clipboard

USER STORY: Validate entrypoint params and storage based on Michelson types

Open Innkst opened this issue 3 years ago • 1 comments

As Taquito user, I want to validate smart contract calls, so that I can have improved error handling through catch errors earlier and with more context

Background The Taquito smart contract abstractions do not validate data based on the Michelson Types and defer this validation to the RPC. By incorporating this validation into Taquito directly, we can provide better error handling and a superior developer experience to developers building on Taquito.

Use cases: Example of a failing validation where incorrect data is passed to a smart contract entrypoint

Acceptance criteria:

  • Enforce data validation of parameters based on the Michelson types of the entrypoint and storage, at runtime
  • Return clear and detailed errors when data arguments do not match (type miss-match or missing required arguments)

Non-functional:

  • should have no to very minimal impact on performance

OUT OF SCOPE: N/A

Additional context This work can be done separately from #784

Innkst avatar Aug 13 '21 18:08 Innkst

MIght be valuable to address that currently some types in the michelson-encoder package does not have validation in its member functions (i.e. string.ts , timestamp.ts and some others)

dsawali avatar Dec 03 '21 21:12 dsawali