Skip to content

Jatinp26/create-canton-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

create-canton-app

Scaffold Canton Network Daml projects in seconds. A CLI tool to quickly bootstrap Canton Network dApp.

npm version License: MIT PRs Welcome

Requirements

  • Node.js v16+
  • Java Runtime (for tests)

Quick Start

Create Your First Canton dApp

npx create-canton-app

Follow the Instructions and select the desired template.

Build and Test

cd my-first-dapp
dpm build
dpm test

That's it! You now have a working Canton smart contract.

Contributing

  1. Fork the repository

  2. Create a feature branch (git checkout -b feature/amazing-template)

  3. Commit your changes (git commit -m 'Add amazing template')

  4. Push to the branch (git push origin feature/amazing-template)

  5. Open a Pull Request

Adding Custom Templates

  1. Create Your Template folder with a 'daml' subdir (rename 'my-template' as your desired template name)
mkdir -p src/templates/my-template/daml
  1. Add your Daml contract

Create src/templates/my-template/daml/MyContract.daml

  1. Update CLI choices

Edit src/commands/create.js line 43:

choices: [
  { name: 'Token Transfer System Template', value: 'TokenTransfer' },

  { name: 'Multi-Party Agreement System Template', value: 'Multiparty' },

  { name: 'Asset Holding System Template', value: 'AssetOwner' }

  { name: 'My Template', value: 'my-template' }, // ADD THIS
]
  1. Try it
dpm build
dpm test

Template Checklist

  • Compiles with dpm build
  • Tests pass with dpm test
  • Includes inline comments
  • Has clear use case

⬆ back to top

Made with 💜 for Canton

About

Scaffold Canton Network/Daml projects in seconds

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors