Repository navigation
feat: add a token vesting example over canton-token-forge - #246
Merged
Merged
Conversation
build: vendor the canton-token-forge and vesting DARs
build: add the canton-token-forge registry service as a dev dependency
…E.md's bootstrap bullet
…vesting operator and factory
feat(scripts): seed the DBT instrument admin and config in bootstrap
…real process on down
…t URL and hide the bearer
feat(scripts): deploy the vendored DARs and run the token registry on 3013
…start to its port
feat: add the token-forge side alongside the Canton Coin one
…e vesting factory
…he deployment seam
feat(frontend): learn the instrument from the registry and move to the vesting factory
feat(frontend): move the vesting choices onto the instrument config
…ole-holding pledges
feat(frontend): select token holdings instead of splitting, and add the faucet tap
feat: forward the registry routes from the deployed origin
…migration main moved dapp/frontend to example-dapps/amulet-vesting and the stack scripts into canton-create/scaffold. The token-forge dApp now gets its own folder instead of replacing the Canton Coin one: - example-dapps/token-vesting holds this branch's dApp, as @bootnodedev/canton-example-token-vesting - example-dapps/amulet-vesting stays as it is on main - vendor/ moves into the new example, and bootstrap-vesting.mjs uploads both DARs itself, since the app has no daml/daml.yaml - the registry start and stop move out of dev-stack.sh into the example's scripts/registry.sh, run through new optional stack:up and stack:down scripts - dev-stack.sh saves bootstrap's output to .dev-stack/bootstrap.log - biome.json lets an example's scripts/ use relative imports, as the repo rules already say - kit/, the mint-token guard and the build-dar removal give way to main
- add token-vesting to EXAMPLES in src/apps.ts, so the dApp list and --example token-vesting offer it - list it in the README beside amulet-vesting - record demo.svg again, since the dApp list gained a line
- add dev:token-vesting, which runs dev-stack.sh on example-dapps/token-vesting - mint-token, build-dar and deploy-dar keep a CANTON_APP_DIR the caller already set, so the token stack mints into its own .env instead of amulet-vesting's
- rewrite example-dapps/token-vesting/README.md for DBT, the vendored DARs and the token registry; it still described Amulet - point the example's CLAUDE.md, PROVENANCE.md and architecture.md at its own folder - list the example, its registry port 3013 and dev:token-vesting in the root CLAUDE.md, architecture.md and CONTRIBUTING.md - describe the stack:up and stack:down scripts dev-stack.sh runs, in canton-create's docs and the localnet README section
In the monorepo both examples share .dev-stack/, so running one stack overwrote the bootstrap.log the other's stack:up and stack:down read. - bootstrap.log and DEV_STACK_RUN_DIR now sit in a folder per app, .dev-stack/example-dapps/<name>/ in the monorepo - a generated project keeps plain .dev-stack/
registry.sh started the registry through `pnpm exec`, so the pid on file was pnpm's and `stop` relied on the port scan to reach the registry. It now runs the bin from node_modules/.bin, whose shim execs node, so the pid on file is the registry.
- .lintstagedrc.mjs runs an example's tests when its api/ or scripts/ change, not only src/, which the token example's suites cover - knip.json goes back to one-line arrays, with the token-vesting block added in the same style
bootstrap printed the registry's settings, dev-stack.sh saved its output to a log, and registry.sh read the keys back out of it. Now: - bootstrap-vesting.mjs writes the settings to the gitignored .env.registry, which the registry loads through DOTENV_CONFIG_PATH - dev-stack.sh drops the bootstrap log and the per-app run folder, and keeps only the stack:up and stack:down calls - registry.sh loses its key list and log parsing, stops the registry by its port, waits with one loop, and defaults DEV_STACK_RUN_DIR, so `pnpm stack:up` also works without the local network - the bootstrap test checks the file parses as dotenv reads it, and runs in the node environment instead of jsdom
The token example has no daml/, so dev-stack.sh never runs build-dar or deploy-dar for it. Only mint-token needs to keep a CANTON_APP_DIR the caller set, so the other two go back to always naming amulet-vesting.
A change under an example's api/ or scripts/ ran its whole vitest suite. It now runs `vitest run api scripts` there, and src/ keeps the full run.
- biome.json turns noRestrictedImports off in one last override for **/scripts/**, as the repo rules say, instead of excluding scripts/ from the example-dapps override alone - the allowBuilds comments in both pnpm-workspace files fit one line
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
No related issue. Replaces #199: its token-forge dApp no longer replaces the Canton Coin one, and becomes a second example users can pick in the installer.
Changes
token-vesting, a vesting dApp over a canton-token-forgeDBTtoken--example token-vesting.env.registrydev-stack.shruns an app's optionalstack:upandstack:downscripts, which start and stop the token registrypnpm dev:token-vestingruns the example's stack from the repo rootDeviations
amulet-vestingstays as onmain; feat: vest a canton-token-forge instrument instead of canton coin #199's Canton Coin removal is droppeddev-stack.shinto the example, so the scaffold stays app-agnosticscripts/folder is now exempt from the import alias rule, as the repo rules already saidAcceptance criteria
--example token-vesting --localnetinstalls and runspnpm stack upDBTgrant is created, accepted, claimed and cancelled end to endamulet-vestingbehaves as onmaindpmTest plan
Automated tests
pnpm installpnpm lint,pnpm typecheck,pnpm test,pnpm knipandpnpm docs:checkexample-dapps/token-vestingManual verification
pnpm -C canton-create trycanton-create/.try, runnpm create canton-dappbooster my-app -- --example token-vesting --localnetmy-app, runpnpm installandpnpm stack upunsafeBreaking changes
None.
Checklist
Screenshots
token-vesting-1-fund-a-grant.mp4
token-vesting-2-accept-and-claim.mp4
token-vesting-3-cancel.mp4