GithubHelp home page GithubHelp logo

boat's Introduction

Yachts in DAML

This is a tutorial example, mostly spelled out in daml/Main.daml, of how one might represent the manufacture, ownership, custody, and oversight of a yacht.

The participants on a Boat contract are:

  1. Manufacturer: the party which produced the boat.
  2. Owner: the party who owns the boat.
  3. Custodian: the party who currently has posession of the boat.
  4. Coast Guard: has access to all Boat contracts, but they have neither rights nor responsibilities.

All of these parties are signatories on the Boat contract, as they all have some sort of liability or responsibility for the boat.

The manufacturer of the boat may not change. The owner may, in case it is purchased or given away. The custodian may change as well, going from the manufacturer, to a shipping company, to the owner.

Deploying to the Sandbox

You'll need to have installed the daml sdk; instructions how to do so are here. In particular, make sure that the daml shell command is working as expected.

cd into the project directory (where the daml.yaml resides) and then

daml start

This will compile the code, and start up the daml navigator. You'll be able to log in as any of the four parties above.

To initiate the workflow, log in as the Manufacturer. Select Templates, and create a Boat contract. Specify "Feadship" as the manufacturer, the owner, and the custodian; "USCG" ought to be the coast-guard. This represents the fact the Feadship manufactured, owns, and has the boat. The US Coast guard is aware of the boat.

Once the contract is created, select Contracts on the left and select the Boat contract that was just created. You can exercise two choices on this contract; you can change the ownership, or change the custodian. You'll need to log in as either "Larry" or the "Shipper" to accept the responsibility for the boat.

To add more parties, modify the daml.yaml file, and restart the sandbox.

boat's People

Contributors

leventebarczyda avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.