When I call the CONTRACT opcode in Michelson, say I have a command like:


Does the contract I'm calling this on have to have int as a param or could it be something like:

parameter Or(Or(string, bool), Or((pair nat int), int));

1 Answer 1


It does need to be exactly an int.

Something close to what you describe is probably how multiple entry points for contracts would be supported, though there would be an additional tag to indicate the position of the type in the disjunction.

The technique is known as "sum-type polymorphism".

  • 1
    great, so this is a feature in the works?
    – Rob
    Commented Jan 31, 2019 at 17:20
  • 1
    I haven't heard of anyone working on this, but it's a fun project for an amendment
    – Arthur B
    Commented Feb 1, 2019 at 0:01

Your Answer

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

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