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

Upload JSON From Local Drive To Marlowe Playground #72

Open
johnshearing opened this issue Jun 9, 2022 · 2 comments
Open

Upload JSON From Local Drive To Marlowe Playground #72

johnshearing opened this issue Jun 9, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@johnshearing
Copy link

Describe the feature you'd like

I noticed that if I cut and paste Marlowe code into the Marlowe Playground it will not load unless there is metadata from an example already loaded. Of course the metadata will not match the smart contract that I just pasted in. I understand that I would not be having this issue if I were loading and saving from gists on my github account. I am guessing that when saving to or loading from gists then the json data is what is saved and loaded which likely has the Marlowe code and the metadata for the smart contract. For those of us who can not or will not give write access to their github account, it would be nice if the json file that we can save to our downloads folder could later be uploaded again. Maybe it can and I am just not seeing how. Thanks

Describe alternatives you've considered

There could be a place to paste in the json as can be done with the Marlowe code.

Additional context / screenshots

image

@johnshearing johnshearing added the enhancement New feature or request label Jun 9, 2022
@hrajchert
Copy link
Collaborator

Thanks for the feature request! We can definitely add a Load/Save to local disk, and it is a feature I wanted to do for some time. The current Download as JSON has a different purpose, so the implementation it's not trivial.

The idea behind this button is to obtain the Marlowe Core Json representation of a contract, ready to be used by the marlowe-cli to instantiate a contract in the blockchain. The feature you are requesting requires us to save the Extended Marlowe Json bundled with the source instead. Currently the only difference between the Marlowe Core JSON and Marlowe Extended JSON is the contract template parameters, but eventually this representation is the one that can include comments, metadata, functions, etc.

We already have a way to serialize the Extended Marlowe in its gist format, but we need to modify that so that it can be saved in a single tar file. I created the following ticket to capture that work. Also, if this means that we remove the current "Download as JSON", then we need to keep issue 157 in mind.

@johnshearing
Copy link
Author

johnshearing commented Jun 15, 2022 via email

@nhenin nhenin transferred this issue from input-output-hk/marlowe-cardano Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants