Skip to content

Commit 1e43543

Browse files
authored
docs(guides/hello/add system): update for the app namespace 🚗 (#2859)
1 parent 46874e4 commit 1e43543

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

‎docs/pages/guides/hello-world/add-system.mdx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ In this tutorial you add a system to decrement the counter and update the applic
99
[Create a new MUD application from the template](../../templates/typescript/getting-started).
1010
Use the vanilla template.
1111

12+
```sh copy
13+
pnpm create mud@latest tutorial --template vanilla
14+
cd tutorial
15+
```
16+
1217
## Add a contract for the new system
1318

1419
Create a file `packages/contracts/src/systems/DecrementSystem.sol`.
@@ -109,13 +114,13 @@ In this case, the vanilla getting started front end.
109114
* is in the root namespace, `.increment` can be called directly
110115
* on the World contract.
111116
*/
112-
const tx = await worldContract.write.increment();
117+
const tx = await worldContract.write.app__increment();
113118
await waitForTransaction(tx);
114119
return getComponentValue(Counter, singletonEntity);
115120
};
116121

117122
const decrement = async () => {
118-
const tx = await worldContract.write.decrement();
123+
const tx = await worldContract.write.app__decrement();
119124
await waitForTransaction(tx);
120125
return getComponentValue(Counter, singletonEntity);
121126
};

0 commit comments

Comments
 (0)