From 1e43543db8e37152938ba4f4b27995f784245285 Mon Sep 17 00:00:00 2001 From: Ori Pomerantz Date: Thu, 23 May 2024 04:14:46 -0500 Subject: [PATCH] =?UTF-8?q?docs(guides/hello/add=20system):=20update=20for?= =?UTF-8?q?=20the=20`app`=20namespace=20=F0=9F=9A=97=20=20(#2859)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/pages/guides/hello-world/add-system.mdx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/pages/guides/hello-world/add-system.mdx b/docs/pages/guides/hello-world/add-system.mdx index f6d566d59d..332290097c 100644 --- a/docs/pages/guides/hello-world/add-system.mdx +++ b/docs/pages/guides/hello-world/add-system.mdx @@ -9,6 +9,11 @@ In this tutorial you add a system to decrement the counter and update the applic [Create a new MUD application from the template](../../templates/typescript/getting-started). Use the vanilla template. +```sh copy +pnpm create mud@latest tutorial --template vanilla +cd tutorial +``` + ## Add a contract for the new system Create a file `packages/contracts/src/systems/DecrementSystem.sol`. @@ -109,13 +114,13 @@ In this case, the vanilla getting started front end. * is in the root namespace, `.increment` can be called directly * on the World contract. */ - const tx = await worldContract.write.increment(); + const tx = await worldContract.write.app__increment(); await waitForTransaction(tx); return getComponentValue(Counter, singletonEntity); }; const decrement = async () => { - const tx = await worldContract.write.decrement(); + const tx = await worldContract.write.app__decrement(); await waitForTransaction(tx); return getComponentValue(Counter, singletonEntity); };