Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in Michelson Smart Contract Code: Ill-Formed Type and Unexpected Annotation #196

Open
eilseq opened this issue Apr 23, 2024 · 3 comments

Comments

@eilseq
Copy link

eilseq commented Apr 23, 2024

Description

Encountered issues with an ill-formed type and an unexpected annotation in a Tezos smart contract, which is causing a server error (500) when attempting to deploy or interact with the contract.

Error Details

  • Ill-Formed Type Error: The structure of the storage section in the smart contract does not comply with Michelson language standards. The usage of set, pair, and big_map appears to be incorrectly nested or combined.

  • Unexpected Annotation Error: Annotations such as %claims and %contract_type are either misused or placed incorrectly within the code structure.

Log

Http error response: (500) [{"kind":"permanent","id":"proto.018-Proxford.michelson_v1.ill_formed_type","identifier":"storage","ill_formed_expression":[{"prim":"parameter","args":[{"prim":"pair","args":[{"prim":"unit"},{"prim":"pair","args":[{"prim":"pair","args":[{"prim":"set","args":[{"prim":"pair","args":[{"prim":"pair","args":[{"prim":"string"},{"prim":"bytes"}]},{"prim":"string"}]}],"annots":["%claims"]},{"prim":"string","annots":["%contract_type"]}]},{"prim":"pair","args":[{"prim":"big_map","args":[{"prim":"string"},{"prim":"bytes"}],"annots":["%metadata"]},{"prim":"address","annots":["%owner"]}]}]}]}]},{"prim":"storage","args":[{"prim":"option","args":[{"prim":"set","args":[{"prim":"pair","args":[{"prim":"pair","args":[{"prim":"string"},{"prim":"bytes"}]},{"prim":"string"}]}],"annots":["%claims"]}]}]},{"prim":"code","args":[[{"prim":"CAR"},[{"prim":"CDR"},{"prim":"CAR"},{"prim":"CAR"}],{"prim":"SOME"},{"prim":"NIL","args":[{"prim":"operation"}]},{"prim":"PAIR"}]]}],"location":19},{"kind":"permanent","id":"proto.018-Proxford.michelson_v1.unexpected_annotation","location":20}]

@sbihel
Copy link
Member

sbihel commented Apr 29, 2024

Unfortunately I don't know if this is a Tezos issue at the Michelson level (maybe a major version of the language was released?) or if it's a node-specific issue. If someone has time to test tzprofiles with a different node from the one configured by default that would help.

@eilseq
Copy link
Author

eilseq commented Apr 30, 2024

What brought you to this conclusion? What action exactly would you need to be performed, and how?

@sbihel
Copy link
Member

sbihel commented Apr 30, 2024

What brought you to this conclusion?

This smart contract has been deployed successfully for ~2 years before we started getting 500s.

What action exactly would you need to be performed, and how?

If your wallet allows it, you can select a different node from what's set by default by the web app (or "dApp"). And then you can try the deployment again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants