daml-on-sawtooth
is an integration of the DAML smart contract runtime engine, created and open sourced by Digital Asset, with Hyperledger Sawtooth blockchain as the backing DLT.
This is an open source project. Anyone is welcome to contribute to the project.
If you wish to contribute, please refer to the guidelines mentioned in CONTRIBUTING.md
This project uses docker based technologies to build and run daml-on-sawtooth.
Please follow these steps to get a running daml-on-sawtooth
- Linux/macOS only
- Docker version 19.03.2
- OpenJDK version 12.0.1
- NodeJS version 10.16.2
- daml sdk
You must first ensure you have installed the necessary docker tools and build the daml-on-sawtooth source code.
Please refer to BUILD.md for further instructions.
-
Open a terminal and
cd
into the project folder (i.e. location where yougit clone the daml-on-sawtooth
project) described in step 2. -
To run up a development copy of daml-on-sawtooth, and at the top level ot the project, run this command
./docker/run.sh start
. This will start-up single node sawtooth environment, running the devmode consensus and a DAML environment. -
To shutdown the application by running the following command
./docker/run.sh stop
.
NOTE: By default, it will start daml-on-sawtooth
with AuthService
switched off.
-
Open a terminal (one where you are not hosting a running daml-on-sawtooth see STEP 3).
-
If you do not already have one, create a sample daml project.
-
Start
daml-on-sawtooth
(see STEP 3). -
Allocate a party by running the cli
daml ledger allocate-parties PARTY --host localhost --port 9000
-
Upload dar file by running the cli
daml ledger upload-dar --host localhost --port 9000 <location of darfile>
-
Open a terminal (one where you are not hosting a running daml-on-sawtooth see STEP 3).
-
Run the command
daml ledger navigator --host localhost --port 9000
ordaml ledger navigator --host <url of your daml-on-sawtooth deployment> --port 9000
. When you run this command successfully, you will see the following message
Opening navigator at localhost:9000
_ __ _ __
/ |/ /__ __ __(_)__ ____ _/ /____ ____
/ / _ `/ |/ / / _ `/ _ `/ __/ _ \/ __/
/_/|_/\_,_/|___/_/\_, /\_,_/\__/\___/_/
/___/
Version 100.13.41
Frontend running at http://localhost:4000.
Note: Port 9000 is the port where daml-on-sawtooth is opened for communications with the outside world. If you have a custom daml application, you can connect to it via this port.
- Open the browser
http://localhost:4000
(see above) and you will be presented with daml navigator interface. NOTE: Port 4000 is the default entry point for daml navigator.
This project provides you with a browser based interface to inspect inspect transactions on daml-on-sawtooth
.
To inspect transactions, open your browser with this url http://localhost
.
NOTE:
daml-on-sawtooth
transaction inspector uses port 80 by default. If you have mission critical local app using port 80, edit this file ./docker/compose/daml-local.yaml
modify the "port" key values in this section:
router:
image: binocarlos/noxy
ports:
- <port of your choice>:80 # change the left value to a port to avoid clashing
depends_on:
- daml-rpc
- tracer-ui
environment:
- NOXY_DEFAULT_HOST=tracer-ui
- NOXY_DEFAULT_PORT=8080
- NOXY_DEFAULT_WS=1
- NOXY_API_FRONT=/transactions
- NOXY_API_HOST=sawtooth-daml-rpc
- NOXY_API_PORT=50511
You will now need to start your browser with this url http://localhost:{port-of-your-choice}
.
daml-on-sawtooth
offers a number of option to activate authentication service.
Please refer to AUTH.md for more instructions.
daml-on-sawtooth
is open source under Apache Software License 2.0
Copyright @2019 Blockchain Technology Partners