Skip to content

Commit

Permalink
[docs] Minor fixes and additions to Move docs (MystenLabs#885)
Browse files Browse the repository at this point in the history
  • Loading branch information
awelc authored Mar 17, 2022
1 parent fa4d043 commit ad18189
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions doc/src/build/move.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,11 @@ See
[Package Layout and Manifest Syntax](https://github.com/diem/move/blob/main/language/documentation/book/src/packages.md#package-layout-and-manifest-syntax)
for more information on package layout.

We are now ready to look at some Move code!
We are now ready to look at some Move code! You can either keep
following the tutorial for an introductory description of the main
Move language constructs and instructions on how to write and test
your first Move package, or you can dive straight into various Move
code [examples](../explore/examples.md).

## First look at Move source code

Expand Down Expand Up @@ -149,7 +153,7 @@ type, such as an integer type, or of a struct type.

You can read more about
Move [primitive types](https://github.com/diem/move/blob/main/language/documentation/book/src/SUMMARY.md#primitive-types)
and [structs](https://github.com/diem/move/blob/main/language/documentation/book/src/structs-and-resources.md))
and [structs](https://github.com/diem/move/blob/main/language/documentation/book/src/structs-and-resources.md)
in the Move book.

In order for a Move struct type to define a Sui object type such as
Expand Down Expand Up @@ -220,8 +224,8 @@ enforces an invariant that struct instance arguments passed by
read-only references (as opposed to mutable references) cannot be
modified in the body of a function.

Read more about Move
[references](https://github.com/diem/move/blob/main/language/documentation/book/src/references.md#references)).
You can read more about Move
[references](https://github.com/diem/move/blob/main/language/documentation/book/src/references.md#references) in the Move book.

We will show how to call Move functions from other functions and how
to define the new ones in the section describing how to
Expand Down Expand Up @@ -261,8 +265,7 @@ In general, an entry function, must satisfy the following properties:
- one or more Sui objects (or vectors of objects)
- one or more primitive types (or vectors of such types)
- a mutable reference to an instance of the `TxContext` struct
defined in the
[TxContext module](https://github.com/MystenLabs/sui/tree/main/sui_programmability/framework/sources/TxContext.move)
defined in the [TxContext module](https://github.com/MystenLabs/sui/tree/main/sui_programmability/framework/sources/TxContext.move)

More, concretely, the `transfer` function is public, has no return
value, and has three parameters:
Expand Down Expand Up @@ -377,7 +380,7 @@ definition):
In order to build a package containing this simple module, we need to
put some required metadata into the `Move.toml` file, including package
name, package version, local dependency path to locate Sui framework
code, and package numeric ID, which must be 0x0 for user-defined modules
code, and package numeric ID, which must be `0x0` for user-defined modules
to facilitate [package publishing](wallet.md#publish-packages).

```
Expand Down Expand Up @@ -556,9 +559,9 @@ Test result: OK. Total tests: 1; passed: 1; failed: 0
**TIPS**
If you only want to run a subset of the unittests, you can filter by test name using the `--filter` option. Example:
```
sui-move test --filter hero
sui-move test --filter sword
```
The above command will run all tests whose name contains "hero".
The above command will run all tests whose name contains "sword".
You can discover more testing options through:
```
sui-move test -h
Expand Down Expand Up @@ -974,10 +977,6 @@ To obtain the current transaction sender's account address:
TxContext::sender(ctx)
```
### Collection
### NFT
## Next steps
Now that you are familiar with the Move language, as well as with how
Expand Down

0 comments on commit ad18189

Please sign in to comment.