Skip to content

Commit 7aebfad

Browse files
authored
Update HelloMove.md
1 parent 4633bf8 commit 7aebfad

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

docs/HelloMove.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ You should get the following output if everything works right.
2222

2323
![](assets/20250103_235709_image.png)
2424

25-
As one can see the unit test `0x2::thoughts::test_basic_flow` has passed and we are ready for deployment.
25+
As one can see the unit test `0x2::thoughts::test_basic_flow` has passed printing `"Hello Move"` thought and are ready for deployment.
2626

2727
# Understanding your Code
2828

@@ -242,7 +242,7 @@ Within the test function we have added a `signer` called `aaron` whose address i
242242
Well first create aaron's thought.
243243

244244
```Move
245-
let thought = b"Hello World";
245+
let thought = b"Hello Move";
246246
```
247247

248248
Now, once thought as been created we need to add to the global storage. Since the thought is in bytes format we need to convert it to string using `string::utf8` function. Using aaron's signer we store his thought to the blockchain at aaron's address.
@@ -257,13 +257,13 @@ Now, we need to fetch aaron's address from his signer using `signer::address_of`
257257
let aaron_address = signer::address_of(aaron);
258258
```
259259

260-
Once we have fetched the address we need to check that the thought stored at the address actually matches with `"Hello World"`.
260+
Once we have fetched the address we need to check that the thought stored at the address actually matches with `"Hello Move"`.
261261

262262
```Move
263-
assert!(aaron_thought == string::utf8(b"Hello World"), 1);
263+
assert!(aaron_thought == string::utf8(b"Hello Move"), 1);
264264
```
265265

266-
We call `assert!` function with the condition `aaron_thought == string::utf8(b"Hello World")` if the equality fails then the unit test will abort alerting something is wrong with our code.
266+
We call `assert!` function with the condition `aaron_thought == string::utf8(b"Hello Move")` if the equality fails then the unit test will abort alerting something is wrong with our code.
267267

268268
```Move
269269
module HelloMove::thoughts {
@@ -291,7 +291,7 @@ module HelloMove::thoughts {
291291
#[test(aaron = @0xcafe)]
292292
fun test_basic_flow(aaron: &signer) acquires MyResource {
293293
// Create a thought for aaron.
294-
let thought = b"Hello World";
294+
let thought = b"Hello Move";
295295
296296
// Store it to the blockchain.
297297
create_thoughts(aaron, string::utf8(thought));
@@ -302,8 +302,8 @@ module HelloMove::thoughts {
302302
// Get the thought at his address.
303303
let aaron_thought = get_thoughts(aaron_address);
304304
305-
// Check if the thought present at that address is actually "Hello World"
306-
assert!(aaron_thought == string::utf8(b"Hello World"), 1);
305+
// Check if the thought present at that address is actually "Hello Move"
306+
assert!(aaron_thought == string::utf8(b"Hello Move"), 1);
307307
}
308308
}
309309
```

0 commit comments

Comments
 (0)