This guide covers the steps to run the Canton Middleware locally and connect it to the dApp and MetaMask Snap for end-to-end testing.
Full testing guide: Complete setup instructions for the Snap and dApp side are maintained in the Canton Snap repository: github.com/ChainSafe/canton-snap — Testing with Middleware
make docker-upThis builds and starts the full local stack: Canton node, API server, indexer, relayer, Anvil, and all supporting services. Wait for all containers to report healthy before proceeding.
The API server requires addresses to be whitelisted before registration. Run the interactive utility and enter the EVM address you want to allow:
go run scripts/utils/whitelist.goTo whitelist non-interactively:
go run scripts/utils/whitelist.go -address 0xYourAddress -note "tester"Once the address is registered through the dApp (or Snap), mint DEMO and PROMPT tokens to it:
go run scripts/utils/fund-wallet.goThe script connects to the running stack automatically, prompts for the EVM address and amount, and mints to the corresponding Canton party.
With tokens minted, open the dApp and connect MetaMask using the local network:
| Setting | Value |
|---|---|
| RPC URL | http://localhost:8081/eth |
| Chain ID | 31337 |
Balances and transfers should be visible immediately. Use the Snap to sign Canton transfers and confirm the balance updates reflect on both the dApp and the indexer.
| Network Name | RPC URL | Chain ID | Currency Symbol |
|---|---|---|---|
| Canton Local | http://localhost:8081/eth |
31337 | ETH |