A minimal working example of CAP in Motoko.
Deploy locally:
- Start a local version of the cap router canister.
- dfx deploy --no-wallet --argument "(opt "<LOCALNET_CAP_ROUTER_CANISTER_PRINCIPAL>")"
- dfx canister call minimalcap init
(variant { ok })
This doesn't work on mainnet! Steps to reproduce:
- dfx deploy --network ic --argument "(null)"
- dfx canister --network ic call minimalcap init
The Replica returned an error: code 4, message: "Error installing code: IC0502: Canister lj532-6iaaa-aaaah-qcc7a-cai trapped: unreachable"