Allow "Open in try-michelson" use-case
We want to add a feature in ide.ligolang.org that allows a user to open the Michelson code produced by the ligo compiler (in the webide) in the try-michelson ide.
This would allow the user to further explore/typecheck the Michelson that is produced from their ligo smart contract.
This feature could equally be useful for IDE features that allow the user to "Share this Michelson on the try-michelson IDE".
What we would need from try-michelson is a way to get our Michelson loaded into the try-micelson website.
Two ways to achieve this come to mind;
- base64 encode the Michelson, and stuff it in a get param
This solution is simple, but will run into problems if the michelson code is too big.
- Offer an endpoint that we can HTTP POST our Michelson source code to, and get a unique "share" url back. We would take the share url and present it to the user. An example of such a URL in the ligo web-ide looks like this: https://ide.ligolang.org/p/sWjf7_hrTZs4XcmVd8Gi7g