create-canton-app
v1.6.0
Published
Scaffold Canton Network/Daml projects in seconds
Maintainers
Readme
create-canton-app
Scaffold Canton Network Daml projects in seconds. A CLI tool to quickly bootstrap Canton Network dApp.
Requirements
- Node.js v16+
- Java Runtime (for tests)
Quick Start
Create Your First Canton dApp
npx create-canton-appFollow the Instructions and select the desired template.
Build and Test
cd my-first-dapp
daml build
daml testThat's it! You now have a working Canton smart contract.
Contributing
Fork the repository
Create a feature branch (
git checkout -b feature/amazing-template)Commit your changes (
git commit -m 'Add amazing template')Push to the branch (
git push origin feature/amazing-template)Open a Pull Request
Adding Custom Templates
- Create Your Template folder with a 'daml' subdir (rename 'my-template' as your desired template name)
mkdir -p src/templates/my-template/daml- Add your Daml contract
Create src/templates/my-template/daml/MyContract.daml
- 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
]- Try it
daml build
daml testTemplate Checklist
- [ ] Compiles with
daml build - [ ] Tests pass with
daml test - [ ] Includes inline comments
- [ ] Has clear use case
- [ ] daml.yaml includes
daml-scriptdependency
Made with 💜 for Canton
