From dffb422254eddcbc2ea46e260e4b937eb39ba5e8 Mon Sep 17 00:00:00 2001 From: Marco Walz Date: Tue, 26 May 2026 14:10:40 +0200 Subject: [PATCH 1/2] feat(motoko): migrate templates to @dfinity/motoko@v5.0.0 mops-build recipe Move canister definitions (main, candid) from icp.yaml/canister.yaml into mops.toml [canisters] sections and replace main/candid recipe params with a single `name` param, as required by the new mops build-based recipe. Bumps moc toolchain to 1.8.2 across all three Motoko templates. Closes #27 Co-Authored-By: Claude Sonnet 4.6 --- bitcoin-starter/motoko-backend/canister.yaml | 5 ++--- bitcoin-starter/motoko-backend/mops.toml | 6 +++++- hello-world/motoko-backend/canister.yaml | 6 ++---- hello-world/motoko-backend/mops.toml | 6 +++++- motoko/icp.yaml | 6 ++---- motoko/mops.toml | 5 ++++- 6 files changed, 20 insertions(+), 14 deletions(-) diff --git a/bitcoin-starter/motoko-backend/canister.yaml b/bitcoin-starter/motoko-backend/canister.yaml index 3876983..3a83670 100644 --- a/bitcoin-starter/motoko-backend/canister.yaml +++ b/bitcoin-starter/motoko-backend/canister.yaml @@ -2,7 +2,6 @@ name: backend recipe: - type: "@dfinity/motoko@v4.1.0" + type: "@dfinity/motoko@v5.0.0" configuration: - main: src/main.mo - candid: backend.did + name: backend diff --git a/bitcoin-starter/motoko-backend/mops.toml b/bitcoin-starter/motoko-backend/mops.toml index 04fb997..2dba107 100644 --- a/bitcoin-starter/motoko-backend/mops.toml +++ b/bitcoin-starter/motoko-backend/mops.toml @@ -2,4 +2,8 @@ core = "2.3.1" [toolchain] -moc = "1.3.0" +moc = "1.8.2" + +[canisters.backend] +main = "src/main.mo" +candid = "backend.did" diff --git a/hello-world/motoko-backend/canister.yaml b/hello-world/motoko-backend/canister.yaml index b3adbd0..57d41af 100644 --- a/hello-world/motoko-backend/canister.yaml +++ b/hello-world/motoko-backend/canister.yaml @@ -2,9 +2,7 @@ name: backend recipe: - type: "@dfinity/motoko@v4.1.0" + type: "@dfinity/motoko@v5.0.0" configuration: - main: src/main.mo - # optional - candid: backend.did + name: backend diff --git a/hello-world/motoko-backend/mops.toml b/hello-world/motoko-backend/mops.toml index 4363270..b1bfd43 100644 --- a/hello-world/motoko-backend/mops.toml +++ b/hello-world/motoko-backend/mops.toml @@ -1,2 +1,6 @@ [toolchain] -moc = "1.3.0" +moc = "1.8.2" + +[canisters.backend] +main = "src/main.mo" +candid = "backend.did" diff --git a/motoko/icp.yaml b/motoko/icp.yaml index 7a0f651..5817f2a 100644 --- a/motoko/icp.yaml +++ b/motoko/icp.yaml @@ -3,11 +3,9 @@ canisters: - name: {{project-name}} recipe: - type: "@dfinity/motoko@v4.1.0" + type: "@dfinity/motoko@v5.0.0" configuration: - main: src/main.mo - # optional - candid: {{project-name}}.did + name: {{project-name}} {% if network_type == "Docker" -%} networks: diff --git a/motoko/mops.toml b/motoko/mops.toml index 4363270..a34a6c0 100644 --- a/motoko/mops.toml +++ b/motoko/mops.toml @@ -1,2 +1,5 @@ [toolchain] -moc = "1.3.0" +moc = "1.8.2" + +[canisters] +{{project-name}} = "src/main.mo" From 3d34acf6d5cf63290c5f60bff1c62c4826dfba62 Mon Sep 17 00:00:00 2001 From: Marco Walz Date: Tue, 26 May 2026 18:51:47 +0200 Subject: [PATCH 2/2] feat: drop explicit name param, use canister name from icp.yaml With _.canister.name now injected automatically by icp-cli (see dfinity/icp-cli#567), the `name` configuration param is no longer needed in recipe configs. Co-Authored-By: Claude Sonnet 4.6 --- bitcoin-starter/motoko-backend/canister.yaml | 2 -- hello-world/motoko-backend/canister.yaml | 2 -- motoko/icp.yaml | 2 -- 3 files changed, 6 deletions(-) diff --git a/bitcoin-starter/motoko-backend/canister.yaml b/bitcoin-starter/motoko-backend/canister.yaml index 3a83670..1c71596 100644 --- a/bitcoin-starter/motoko-backend/canister.yaml +++ b/bitcoin-starter/motoko-backend/canister.yaml @@ -3,5 +3,3 @@ name: backend recipe: type: "@dfinity/motoko@v5.0.0" - configuration: - name: backend diff --git a/hello-world/motoko-backend/canister.yaml b/hello-world/motoko-backend/canister.yaml index 57d41af..77270d6 100644 --- a/hello-world/motoko-backend/canister.yaml +++ b/hello-world/motoko-backend/canister.yaml @@ -3,6 +3,4 @@ name: backend recipe: type: "@dfinity/motoko@v5.0.0" - configuration: - name: backend diff --git a/motoko/icp.yaml b/motoko/icp.yaml index 5817f2a..6ae9416 100644 --- a/motoko/icp.yaml +++ b/motoko/icp.yaml @@ -4,8 +4,6 @@ canisters: - name: {{project-name}} recipe: type: "@dfinity/motoko@v5.0.0" - configuration: - name: {{project-name}} {% if network_type == "Docker" -%} networks: