Skip to content

Commit

Permalink
enable some direct code to copy (#3256)
Browse files Browse the repository at this point in the history
  • Loading branch information
geometryolife authored Feb 4, 2025
1 parent bb595bc commit 0f10ba1
Show file tree
Hide file tree
Showing 12 changed files with 48 additions and 48 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ After initializing with `rooch init`, the `dev` environment is activated by defa

You can use the command `rooch env list` to view the list of environments in the configuration:

```bash
```bash copy
rooch env list
```
```text
Expand All @@ -28,15 +28,15 @@ Note: The Developer Testnet automatically updates to the `main` branch of the [R

Currently, the Developer Testnet automatically assigns `RGas` to developers, allowing them to deploy contracts directly through commands.

```bash
```bash copy
git clone https://github.com/rooch-network/rooch.git
cd rooch
rooch move publish -p ./examples/counter --sender-account default --named-addresses rooch_examples=default
```

## Calling RPC with curl

```bash
```bash copy
curl -H "Content-Type: application/json" -X POST --data '{"jsonrpc":"2.0","method":"rooch_getChainID","params":[],"id":1}' https://dev-seed.rooch.network
```
```json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

通过命令 `rooch env list` 可以查看配置中的环境列表:

```bash
```bash copy
rooch env list
```
```text
Expand All @@ -28,15 +28,15 @@ rooch env list

当前,开发者测试网会自动给开发者分配 `RGas`,开发者可直接通过命令部署合约。

```bash
```bash copy
git clone https://github.com/rooch-network/rooch.git
cd rooch
rooch move publish -p ./examples/counter --sender-account default --named-addresses rooch_examples=default
```

## 通过 curl 调用 RPC

```bash
```bash copy
curl -H "Content-Type: application/json" -X POST --data '{"jsonrpc":"2.0","method":"rooch_getChainID","params":[],"id":1}' https://dev-seed.rooch.network
```
```json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This section introduces how to use Rooch CLI to create a Move contract.

## Create project

```shell
```shell copy
rooch move new hello_rooch
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## 创建项目

```shell
```shell copy
rooch move new hello_rooch
```

Expand Down
8 changes: 4 additions & 4 deletions docs/website/pages/build/getting-started/first-dapp.en-US.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,23 @@ This tutorial primarily introduces how to use the front-end template provided by

## Clone the source code of the template.

```bash
```bash copy
git clone https://github.com/rooch-network/my-first-rooch-dapp.git
```

## Initialize the project.

Install the dependencies required for the dApp:

```bash
```bash copy
cd my-first-rooch-dapp
bun install
## if you are using yarn
yarn install
```

Run dApp:
```bash
```bash copy
bun dev
```

Expand Down Expand Up @@ -66,7 +66,7 @@ rooch account balance

After confirming that there is enough Gas Fee, you can publish the contract using the following command.

```bash
```bash copy
## in counter_contract directory
rooch move publish --named-addresses quick_start_counter=default
```
Expand Down
8 changes: 4 additions & 4 deletions docs/website/pages/build/getting-started/first-dapp.zh-CN.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,23 @@

## 克隆模板源码

```bash
```bash copy
git clone https://github.com/rooch-network/my-first-rooch-dapp
```

## 初始化项目

安装 dApp 所需依赖:

```bash
```bash copy
cd my-first-rooch-dapp
bun install
## if you are using yarn
yarn install
```

运行 dApp:
```bash
```bash copy
bun dev
```

Expand Down Expand Up @@ -65,7 +65,7 @@ rooch account balance

确认有足够的 Gas Fee 后,就可以使用下面的命令来部署合约了。

```bash
```bash copy
## in counter_contract directory
rooch move publish --named-addresses quick_start_counter=default
```
Expand Down
26 changes: 13 additions & 13 deletions docs/website/pages/build/getting-started/installation.en-US.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,25 @@

#### Install dependencies

```shell
```shell copy
sudo apt install git curl cmake make gcc lld pkg-config libssl-dev libclang-dev libsqlite3-dev g++ protobuf-compiler
```

#### Install Rust

```shell
```shell copy
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
```

#### Clone source code

```shell
```shell copy
git clone https://github.com/rooch-network/rooch.git
```

#### Compile and install Rooch

```shell
```shell copy
cd rooch && cargo build && cp target/debug/rooch ~/.cargo/bin/
```

Expand All @@ -48,41 +48,41 @@ Download the Rust toolchain by clicking [here](https://static.rust-lang.org/rust

Use the following command to clone the Rooch source code repository:

```shell
```shell copy
git clone https://github.com/rooch-network/rooch.git
```

#### Compiling and Installing Rooch

Navigate to the Rooch project directory:

```shell
```shell copy
cd rooch
```

Build Rooch using the following command:

```shell
```shell copy
cargo build
```

Finally, copy the compiled Rooch binary to your Cargo bin directory:

```shell
```shell copy
cp target/debug/rooch.exe ~/.cargo/bin/
```

### macOS

Firstly, create a binary file directory

```shell
```shell copy
mkdir ~/.local/bin/
```

Secondly, add the binary file directory path into `~/.zshrc`

```shell
```shell copy
export PATH="$PATH:$HOME/.local/bin"
```

Expand All @@ -96,18 +96,18 @@ Fourthly, open a new terminal window and run `rooch` to check if it works

#### Download

```shell
```shell copy
wget https://github.com/rooch-network/rooch/releases/latest/download/rooch-ubuntu-latest.zip
```

#### Decompress

```shell
```shell copy
unzip rooch-ubuntu-latest.zip
```

#### Install

```shell
```shell copy
sudo cp rooch /usr/local/bin
```
26 changes: 13 additions & 13 deletions docs/website/pages/build/getting-started/installation.zh-CN.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,25 @@

#### 安装依赖

```shell
```shell copy
sudo apt install git curl cmake make gcc lld pkg-config libssl-dev libclang-dev libsqlite3-dev g++ protobuf-compiler
```

#### 安装 Rust

```shell
```shell copy
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
```

#### 克隆源码

```shell
```shell copy
git clone https://github.com/rooch-network/rooch.git
```

#### 编译并安装 Rooch

```shell
```shell copy
cd rooch && cargo build && cp target/debug/rooch ~/.cargo/bin/
```

Expand All @@ -46,35 +46,35 @@ cd rooch && cargo build && cp target/debug/rooch ~/.cargo/bin/

#### 克隆源码

```shell
```shell copy
git clone https://github.com/rooch-network/rooch.git
```

#### 编译并安装 Rooch

```shell
```shell copy
cd rooch
```

```shell
```shell copy
cargo build
```

```shell
```shell copy
cp target/debug/rooch.exe ~/.cargo/bin/
```

### macOS

首先,创建一个二进制文件目录

```shell
```shell copy
mkdir ~/.local/bin/
```

第二步,将二进制文件目录添加到 `~/.zshrc`

```shell
```shell copy
export PATH="$PATH:$HOME/.local/bin"
```

Expand All @@ -88,18 +88,18 @@ export PATH="$PATH:$HOME/.local/bin"

#### 下载

```shell
```shell copy
wget https://github.com/rooch-network/rooch/releases/latest/download/rooch-ubuntu-latest.zip
```

#### 解压

```shell
```shell copy
unzip rooch-ubuntu-latest.zip
```

#### 安装

```shell
```shell copy
sudo cp rooch /usr/local/bin
```
2 changes: 1 addition & 1 deletion docs/website/pages/build/tutorial/counter.en-US.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ We can use any programming language to implement this small program. This tutori

Before we create the counter contract program, we can use the CLI command provided by Rooch to initialize an empty project:

```shell
```shell copy
rooch move new quick_start_counter
```

Expand Down
2 changes: 1 addition & 1 deletion docs/website/pages/build/tutorial/counter.zh-CN.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

在我们创建计数器合约程序前,我们可以使用 Rooch 提供的 CLI 命令来初始化一个空项目:

```shell
```shell copy
rooch move new quick_start_counter
```

Expand Down
4 changes: 2 additions & 2 deletions docs/website/pages/build/tutorial/move-examples.en-US.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ We can use any legal character as the project name, including `-`, but when we u

For example:

```shell
```shell copy
rooch move new hello-world
```

Expand All @@ -22,7 +22,7 @@ Another way is to directly use `_` as the hyphen for the project name word when

For example:

```shell
```shell copy
rooch move new hello_world
```

Expand Down
4 changes: 2 additions & 2 deletions docs/website/pages/build/tutorial/move-examples.zh-CN.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Rooch 提供自动创建并初始化项目的命令 `rooch move new`,当我们

例如:

```shell
```shell copy
rooch move new hello-world
```

Expand All @@ -22,7 +22,7 @@ rooch move new hello-world

例如:

```shell
```shell copy
rooch move new hello_world
```

Expand Down

0 comments on commit 0f10ba1

Please sign in to comment.