Skip to content

digital-asset/boat

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published