Skip to content

Smart-Contract-Modelling-uOttawa/Symboleo-web

Repository files navigation

SymboleoWeb

A web based IDE created for the symboleo language using monaco-languageclient. Read the prerequisites if this is your first time using this. If you want to contribute, first have a look at the developer documentation.

Try the tool online!

Open the link below after whitelisting and wait for your code editor to pop-up. To learn about the Symboleo specification language itself, click here

Open in Gitpod

Features of SymboleoWeb

A Symboleo specification as seen in SymboleoWeb.

SymboleoWeb-Editor (1)

In the above example, the contract specification contains an error in line 18, which is correctly highlighted as such. Furthermore, hovering over an error gives useful insights into how the error might be resolved. For example, in line 6, the editor suggests how to properly auto-complete a parameter type that starts with B (user-defined types are also suggested)

SymboleoWeb-JS

Finally, as shown in above screenshot, once the server recognizes an error-free Symboleo specification, it automatically invokes Symboleo2SC to generate the corresponding smart contract code in JavaScript, including the different assets, roles, obligations, events, etc. The user can view (and even edit, although this is not recommended) the generated files directly in SymboleoWeb or (more likely) download them for direct deployment over the Hyperledger Fabric platform. Instructions to download generated code are given below.

Prerequisites - Whitelist Gitpod for popups

  1. Chrome

    A. Settings -> Privacy and Security

    B. Click on Site Settings

    image C. Scroll down to pop-ups and redirects

    image D. Scroll down to allowed to send pop-ups and use redirects

    image E. Add [*.]gitpod.io as your whitelist to allow popups from gitpod

    image
  2. Microsoft Edge

    A. Settings -> Cookies and Site Permissions

    B. Scroll down and click on Pop-ups and redirects

    image C. Click on Add next to Allow

    image D. Add [*.]gitpod.io in the website tab as shown below and click Add

    image

If you do not/cannot whitelist gitpod, after launching gitpod wait for terminal to pop - look for ports as shown below

image Once BOTH Ports are green as shown in picture, Click on the link next to PORT 3000

Download generated JS files

  1. When you enter error free code in Symboleo-Web IDE, a new src-gen folder is created in gitpod as shown below

    image-22

  2. Right click and download

    image-23

  3. File Explorer opens. Point to an EMPTY FOLDER. Pointing to a folder with files will not download the code. Click on select folder

  4. Allow to view files image-24

  5. Save changes to your folder image-25

  6. You have successfully downloaded the code generated by Symboleo-web

About

A web based IDE created for the symboleo language using monaco-languageclient

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published