Skip to content

Commit

Permalink
refactor website and recover the some docs (#1825)
Browse files Browse the repository at this point in the history
* remove archive dir

* remove rooch doc

* recover the decentralized validator

* recover the DSTP

* recover the security

* recover the roadmap

* recover the overview

* split portal doc to the get gas coin doc

* update first account doc

* change quick star to counter doc

* change first contract location

* rename blog-system as blog-demo

* change the example guides dir

* update sidebar

* Revert "remove archive dir"

This reverts commit f70dcd4.

* hidden zh archive dir

* update sidebar

* fix broken links
  • Loading branch information
geometryolife authored Jun 6, 2024
1 parent 41cef59 commit ba01ab1
Show file tree
Hide file tree
Showing 31 changed files with 187 additions and 174 deletions.
10 changes: 10 additions & 0 deletions docs/website/pages/_meta.zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,15 @@
"timestamp": false,
"typesetting": "article"
}
},
"archives": {
"type": "page",
"display": "hidden",
"theme": {
"sidebar": false,
"timestamp": false,
"typesetting": "article"
},
"title":"Archives"
}
}
2 changes: 1 addition & 1 deletion docs/website/pages/build/_meta.en-US.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"getting-started": "Getting Started",
"tutorial": "Tutorial",
"bitcoin": "Extending Bitcoin",
"rooch-framework": "Rooch Framework",
"sdk": "SDK",
"example-guides": "Example guides",
"reference": "Reference"
}
2 changes: 1 addition & 1 deletion docs/website/pages/build/_meta.zh-CN.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"getting-started": "开始入门",
"tutorial": "教程",
"bitcoin": "扩展 Bitcoin",
"rooch-framework": "Rooch Framework",
"sdk": "SDK",
"example-guides": "示例指南",
"reference": "参考指南"
}
4 changes: 2 additions & 2 deletions docs/website/pages/build/getting-started/_meta.en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"installation": "Installation",
"connect-to-rooch": "Connect to Rooch",
"first-account": "First account",
"get-gas-coin": "Get Rooch Gas Coin",
"first-contract": "First contract",
"first-dapp": "First DApp",
"first-token": "First token",
"first-blog-system": "First blog system"
"first-token": "First token"
}
4 changes: 2 additions & 2 deletions docs/website/pages/build/getting-started/_meta.zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"installation": "安装",
"connect-to-rooch": "连接 Rooch",
"first-account": "第一个账户",
"get-gas-coin": "获取 Rooch Gas Coin",
"first-contract": "第一个合约",
"first-dapp": "第一个 DApp",
"first-token": "第一个代币",
"first-blog-system": "第一个博客系统"
"first-token": "第一个代币"
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ A new account is manually created here, `0xaecf8918b5ffc84a4bf4a8710220e70d1ec47

This account address is derived from the same set of mnemonic words, so it can also be recovered using the same mnemonic word.

## Use DashBoard to link a Rooch account
## Create an account with Rooch Portal

When logging in using UniSat or Metamask, a Rooch account address is automatically associated.
When connecting to the Rooch Portal using UniSat, a Rooch account is automatically created and linked to the Bitcoin account.

TODO: The display function need to implement!
Please refer to [Rooch Portal](../../learn/miscellaneous/portal.en-US.mdx) for detailed usage.
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ Secret Recovery Phrase : [trust please grit chief ankle brick bean level infant

这个账户地址属于同一套助记词派生而来,因此也可以使用相同的助记词来恢复。

## 使用 DashBoard 关联 Rooch 账户
## 使用 Rooch Portal 创建账户

使用 UniSat 或 Metamask 登陆时,自动关联一个 Rooch 账户地址
使用 UniSat 连接 Rooch Portal 时,会自动创建一个 Rooch 账户并与 Bitcoin 账户关联

TODO: The display function need to implement!
详细使用请参考[Rooch Portal](../../learn/miscellaneous/portal.zh-CN.mdx)
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Create Rooch Move contract
# First contract

This section introduces how to use Rooch CLI to create a Move contract.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 创建 Rooch Move 合约
# 第一个合约

本小节介绍如何使用 Rooch CLI 创建 Move 合约。

Expand Down

This file was deleted.

This file was deleted.

22 changes: 22 additions & 0 deletions docs/website/pages/build/getting-started/get-gas-coin.en-US.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Get Rooch Gas Coin

Gas is required to interact with Rooch. Currently, we can receive `Rooch Gas Coin` through the Faucet channel of Rooch Discord.

Rooch’s Discord address: https://discord.gg/rooch

![](/docs/portal/discord-gas-channel.png)

Enter `/faucet` in the input box and the command to receive `Rooch Gas Coin` will be displayed:

![](/docs/portal/discord-gas-command.png)

The address needs to be a Taproot type Bitcoin address, for example:

```command
/faucet tb1p8e5wrjksara963wm27lppr9z8wcfsj2htzdjgutp3rsx2lt0gd4smrdnn5
```

When the Faucet robot displays the following information, it means that you have successfully received the `Rooch Gas Coin`.

![](/docs/portal/discord-gas-obtain.png)

21 changes: 21 additions & 0 deletions docs/website/pages/build/getting-started/get-gas-coin.zh-CN.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# 获取 Rooch Gas Coin

与 Rooch 交互时需要使用 Gas,目前我们可以通过 Rooch Discord 的 Faucet 频道领取 `Rooch Gas Coin`

Rooch 的 Discord 地址:https://discord.gg/rooch

![](/docs/portal/discord-gas-channel.png)

在输入框输入 `/faucet` 就会显示领取 `Rooch Gas Coin` 的命令了:

![](/docs/portal/discord-gas-command.png)

地址需要使用 Taproot 类型的比特币地址,例如:

```command
/faucet tb1p8e5wrjksara963wm27lppr9z8wcfsj2htzdjgutp3rsx2lt0gd4smrdnn5
```

当 Faucet 机器人显示如下信息,说明你已经成功领取 `Rooch Gas Coin` 了。

![](/docs/portal/discord-gas-obtain.png)
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
5 changes: 5 additions & 0 deletions docs/website/pages/build/tutorial/_meta.en-US.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"counter": "Counter",
"blog-demo": "Blog Demo",
"move-examples": "Move examples"
}
5 changes: 5 additions & 0 deletions docs/website/pages/build/tutorial/_meta.zh-CN.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"counter": "计数器",
"blog-demo": "博客 Demo",
"move-examples": "Move 示例"
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# First blog system
# Blog Demo

## 1. What is Rooch

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 第一个博客系统
# 博客 Demo

## 1. 什么是 Rooch

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Quick start
# Counter

This section will quickly introduce the development of Rooch through a counter example.

Expand All @@ -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).
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 快速入门
# 计数器

本小节将通过一个计数器例子来快速介绍 Rooch 的开发入门。

Expand All @@ -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)。
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,18 @@ The initial design idea is as follows.

## Sequencer Rotation Mechanism based on Bitcoin Timestamp

To do
import { Callout } from 'nextra/components'

<Callout>
TODO: This section of the document needs improvement

1. Explaination of the sequencer rotation mechanism.
</Callout>

## Sharded Application Subnet

To do
<Callout>
TODO: This section of the document needs improvement

1. Explaination of the sharded application subnet.
</Callout>
9 changes: 8 additions & 1 deletion docs/website/pages/learn/in-depth-tech/dstp.en-US.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Distributed State Tree protocol (DSTP)

to do
import { Callout } from 'nextra/components'

<Callout>
TODO: This section of the document needs improvement

1. Explaination of DSTP and its importance.
2. Specifications of DSTP.
</Callout>
12 changes: 11 additions & 1 deletion docs/website/pages/learn/in-depth-tech/security.en-US.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ At this point, the challenger and defender have already agreed on the intermedia

The side that provides the fault state will be slashed with economics mechanisms.

> Tokenomics will be published in [2023 Q4](/docs/miscellaneous/roadmap#2023-q4---mainnet-ready-testnet)
> Tokenomics will be published in [2024 Q4](/learn/miscellaneous/roadmap)
### flexEmu Advantages

Expand Down Expand Up @@ -73,3 +73,13 @@ With ZK Proof generated by ZK Prover using zkMove, the challenge period can be o
- The proposer keeps committing blocks of state to Layer1 at its maxmium speed
- ZK Prover generate ZK Proofs for the state blocks that have been committed to the Layer1, at a relatively slower pace, due to the considerably long proof generation time
- For the withdraw transaction submitted at `BlockT`, it can be considered finalized when the ZK Proof of `BlockT` has been generated and verified on Layer1, instead of waiting to reach the end of the whole challenge period

## Proof-of-Stake based Security from Bitcoin

import { Callout } from 'nextra/components'

<Callout>
TODO: This section of the document needs improvement

1. Explaination of getting security from Babylon system.
</Callout>
20 changes: 1 addition & 19 deletions docs/website/pages/learn/miscellaneous/portal.en-US.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,28 +32,10 @@ In the upper right corner is the button to connect to the wallet.

### How to receive Gas

Rooch Portal requires the use of Gas when interacting with Rooch. Currently, we can receive `Rooch Gas Coin` through the Faucet channel of Rooch Discord.
Please refer to [Get Rooch Gas Coin](../../build/getting-started/get-gas-coin.en-US.mdx).

> When using Portal for the first time, you need to send a transaction to generate a session key, otherwise Portal cannot be used normally.
Rooch’s Discord address: https://discord.gg/rooch

![](/docs/portal/discord-gas-channel.png)

Enter `/faucet` in the input box and the command to receive `Rooch Gas Coin` will be displayed:

![](/docs/portal/discord-gas-command.png)

The address needs to be a Taproot type Bitcoin address, for example:

```command
/faucet tb1p8e5wrjksara963wm27lppr9z8wcfsj2htzdjgutp3rsx2lt0gd4smrdnn5
```

When the Faucet robot displays the following information, it means that you have successfully received the `Rooch Gas Coin`.

![](/docs/portal/discord-gas-obtain.png)

### How to connect wallet

Click the `Connect Wallet` button in the upper right corner. You will be prompted to connect the wallet. Click to connect Unisat Wallet. If it has not been installed yet, please refer to the [UniSat official documentatio](https://unisat.io/download).
20 changes: 1 addition & 19 deletions docs/website/pages/learn/miscellaneous/portal.zh-CN.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,28 +32,10 @@ Rooch Portal 是一个综合仪表板,旨在简化 Unisat 等比特币钱包

### 如何领取 Gas

Rooch Portal 与 Rooch 交互时需要使用 Gas,目前我们可以通过 Rooch Discord 的 Faucet 频道领取 `Rooch Gas Coin`
请参考[获取 Rooch Gas Coin](../../build/getting-started/get-gas-coin.zh-CN.mdx)

> 首次使用 Portal,需要发送一个交易来生成会话密钥,否则无法正常使用 Portal。
Rooch 的 Discord 地址:https://discord.gg/rooch

![](/docs/portal/discord-gas-channel.png)

在输入框输入 `/faucet` 就会显示领取 `Rooch Gas Coin` 的命令了:

![](/docs/portal/discord-gas-command.png)

地址需要使用 Taproot 类型的比特币地址,例如:

```command
/faucet tb1p8e5wrjksara963wm27lppr9z8wcfsj2htzdjgutp3rsx2lt0gd4smrdnn5
```

当 Faucet 机器人显示如下信息,说明你已经成功领取 `Rooch Gas Coin` 了。

![](/docs/portal/discord-gas-obtain.png)

### 如何连接钱包

点击右上角的 `Connect Wallet` 按钮,将提示连接钱包,点击连接 Unisat Wallet,如果还没有安装,请参阅 [UniSat 官方文档](https://unisat.io/download)
Loading

0 comments on commit ba01ab1

Please sign in to comment.