Skip to content

Commit

Permalink
fix broken links
Browse files Browse the repository at this point in the history
  • Loading branch information
geometryolife committed Jun 5, 2024
1 parent d71ea9a commit 1eb1942
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ module unit_test::unit_test {
}
```

We use the counter example in the [Quick start](../getting-started/first-contract/quick-start.en-US.mdx) to demonstrate. In the quick start, we have written a counter program, but after we finish writing, there is no guarantee that all functions will work as we expected. Therefore, we write a unit test to check whether the function of the current module can achieve the expected effect.
We use [the counter example in the Quick start](../tutorial/counter.en-US.mdx) to demonstrate. In the quick start, we have written a counter program, but after we finish writing, there is no guarantee that all functions will work as we expected. Therefore, we write a unit test to check whether the function of the current module can achieve the expected effect.

The function `test_counter` is the unit test function of the current program. The `#[test]` annotation is used and an `account` parameter is passed.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ module unit_test::unit_test {
}
```

我们使用[快速入门](../getting-started/first-contract/quick-start.zh-CN.mdx)中的计数器例子来演示。在快速入门中,我们已经编写了一个计数器程序,但是我们编写完成后,并不能保证所有的功能都如我们预期的那样工作。因此我们编写一个单测来检查当前模块的函数是否能达到预期效果。
我们使用[快速入门中的计数器例子](../tutorial/counter.zh-CN.mdx)来演示。在快速入门中,我们已经编写了一个计数器程序,但是我们编写完成后,并不能保证所有的功能都如我们预期的那样工作。因此我们编写一个单测来检查当前模块的函数是否能达到预期效果。

函数 `test_counter` 就是当前这个程序的单元测试函数。使用了 `#[test]` 标注,并传递了一个 `account` 参数。

Expand Down
6 changes: 3 additions & 3 deletions docs/website/pages/build/tutorial/counter.en-US.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Before we create the counter contract program, we can use the CLI command provid
rooch move new quick_start_counter
```

For detailed methods, please refer to [Creating a Rooch Move Contract](./create-rooch-move-contract.en-US.mdx).
For detailed methods, please refer to [Creating a Rooch Move Contract](../getting-started/first-contract.en-US.mdx).

Next, create a `counter.move` file in the `sources` directory to write our contract code.

Expand Down Expand Up @@ -599,8 +599,8 @@ Transaction error: RPC call failed: ErrorObject { code: ServerError(-32000), mes
As you can see, when we execute the `increase` function with another account, an error message will be returned, telling us that the owner of the object does not match, that is, other accounts cannot own objects owned by another account.
At this point, I believe you already have a certain understanding of Rooch's object storage. During the development process, you can reasonably use resource storage and object storage solutions according to your needs. In the [`simple_blog` example](../first-blog-system.en-US.mdx), the two are combined.
At this point, I believe you already have a certain understanding of Rooch's object storage. During the development process, you can reasonably use resource storage and object storage solutions according to your needs. In the [`simple_blog` example](./blog-demo.en-US.mdx), the two are combined.
## Summarize
At this point you have learned step by step how to use Rooch to develop, deploy and call smart contracts. In Rooch, the object-oriented programming model is a very important content. To learn more about how to use it, please refer to [Objects](../../../learn/core-concepts/objects/object.en-US.mdx).
At this point you have learned step by step how to use Rooch to develop, deploy and call smart contracts. In Rooch, the object-oriented programming model is a very important content. To learn more about how to use it, please refer to [Objects](../../learn/core-concepts/objects/object.en-US.mdx).
6 changes: 3 additions & 3 deletions docs/website/pages/build/tutorial/counter.zh-CN.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
rooch move new quick_start_counter
```

详细的方法请参考[创建 Rooch Move 合约](./create-rooch-move-contract.zh-CN.mdx)
详细的方法请参考[创建 Rooch Move 合约](../getting-started/first-contract.zh-CN.mdx)

接下来在 `sources` 目录里创建一个 `counter.move` 文件来编写我们的合约代码。

Expand Down Expand Up @@ -600,8 +600,8 @@ Transaction error: RPC call failed: ErrorObject { code: ServerError(-32000), mes
可以看到,当我们用其他账户执行 `increase` 函数时,会返回错误信息,告诉我们对象的拥有者不匹配,即其他账户无法另一个账户所拥有的对象。
到这里,相信你已经对 Rooch 的对象存储有了一定的了解,在开发过程中可以根据需求合理运用资源存储和对象存储方案,在 [`simple_blog` 例子](../first-blog-system.zh-CN.mdx)中,就结合了两者。
到这里,相信你已经对 Rooch 的对象存储有了一定的了解,在开发过程中可以根据需求合理运用资源存储和对象存储方案,在 [`simple_blog` 例子](./blog-demo.zh-CN.mdx)中,就结合了两者。
## 总结
到这里你已经一步步了解了如何使用 Rooch 进行开发,部署和调用智能合约了。在 Rooch 中,面向对象的编程模型是十分重要的一个内容,想了解更多使用方法,请参阅[对象](../../../learn/core-concepts/objects/object.zh-CN.mdx)。
到这里你已经一步步了解了如何使用 Rooch 进行开发,部署和调用智能合约了。在 Rooch 中,面向对象的编程模型是十分重要的一个内容,想了解更多使用方法,请参阅[对象](../../learn/core-concepts/objects/object.zh-CN.mdx)。

0 comments on commit 1eb1942

Please sign in to comment.