Skip to content
CCPEDIAby Unity Nodes
Outreach

DAML Studio in the web

7 posts213 views2 likesLast activity Jul 2024

  1. A_PDOP

    Hello everyone, there was a time where DAML smart contracts could be written in a web browser… I want to find out if this is still supported. Kind regards

  2. WallaceKelly 1

    You are correct. For a while, there was a browser-based environment at https://webide.daml.com/. DA prioritized other work over continuing to operate and maintain that.

    For what it is worth, I just did the following to setup Daml in a blank GitHub Codespace:

    1. On the GitHub website, create a new, Blank codespace.
    2. In the terminal run the following commands:
      a. curl -sSL https://get.daml.com/ | sh
      b. export PATH="$HOME/.daml/bin:$PATH"
      c. daml new first
    3. On the Extensions page, search for and install the Daml extension.
    4. From the hamburger menu, change the open folder using File → Open Folder → /workspaces/codespaces-blank/first
    5. Open the file daml/Main.daml.
    6. Click on the Script results link.

    Note that GitHub Codespaces does eventually charge you.

  3. A_PD

    Thank you so much. Everything works but the Scripts results link

  4. WallaceKelly 1

    @A_PD, I find that the “Script results” link only appears if you set the VS Code folder to the folder with the daml.yaml file. In this case, that would be /workspaces/codespaces-blank/first. The “Script results” link will not appear if VS Code is open to /workspaces/codespaces-blank, for example.

    Does that work for you? Or is something else going on?

  5. A_PD

    Thank you very much. I just tried a fresh setup and everything works fine

  6. A_PD

    Hi @WallaceKelly, I managed to get this far (Still a WIP), find details of the transactions below - Is there a way I could get daml start running from the codespace?

    Financial Asset Management System

  7. WallaceKelly

    Is there a way I could get daml start running from the codespace

    It works for me. I did this:

    1. Opened a terminal.
    2. export PATH="$HOME/.daml/bin:$PATH"
    3. daml start

    I don’t know enough about GitHub Codespaces to know how to avoid having to set the path on every new terminal. :man_shrugging:

    @A_PD, sorry for the slow response. Not sure how I missed this follow-up question.