Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update foundry.md #425

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

wuzhong-papermoon
Copy link
Contributor

Copy link
Contributor

@eshaben eshaben left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job! The original PR here mentions that once we've completed translations, we need to delete the foundry images from the moonbeam-docs repo - so can you please open a PR that deletes them?

@@ -99,13 +99,17 @@ forge install OpenZeppelin/openzeppelin-contracts
forge build
```

![Foundry Contract Compile](/images/builders/build/eth-api/dev-env/foundry/foundry-1.webp)
--8<-- 'code/builders/build/eth-api/dev-env/foundry/terminal/compile.md'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Closest I could get to comment but line 88 Github repo should be changed to GitHub repository (note the capital H in GitHub)


恭喜您,您的合约已上线!保存地址,用于后续合约实例交互
这样就成了。有关使用Foundry进行Solidity脚本编写的更多信息,请查看[Foundry文档](https://book.getfoundry.sh/tutorials/solidity-scripting){target=_blank}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
这样就成了。有关使用Foundry进行Solidity脚本编写的更多信息,请查看[Foundry文档](https://book.getfoundry.sh/tutorials/solidity-scripting){target=_blank}。
这样就成了。有关使用Foundry进行Solidity脚本编写的更多信息,请查看[Foundry文档](https://book.getfoundry.sh/tutorials/solidity-scripting){target=\_blank}。

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Closest I could get, but on line 194, can you please change cast to Cast with a capital C

and also, please change all instances of YOUR_CONTRACT_ADDRESS to INSERT_YOUR_CONTRACT_ADDRESS to follow convention

您可以使用以下命令部署 `MyToken.sol` 合约。请记住它将按顺序执行所有相关步骤。对于此示例,Foundry将首先尝试本地模拟和利用提供的 RPC进行模拟,然后才部署合约。如果任何模拟失败,Foundry都不会继续部署。

```bash
forge script script/MyToken.s.sol --rpc-url https://rpc.api.moonbase.moonbeam.network --broadcast
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
forge script script/MyToken.s.sol --rpc-url https://rpc.api.moonbase.moonbeam.network --broadcast
forge script script/MyToken.s.sol --rpc-url {{ networks.moonbase.rpc_url }} --broadcast

@@ -185,7 +223,7 @@ Foundry包括cast,一个用于执行以太坊RPC调用的CLI。
0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000074d79546f6b656e00000000000000000000000000000000000000000000000000
```

此数据非可读,但您可以使用cast将其转换成您想要的格式。在这种情况下,数据是文本,因此您可以将其转换为ascii字符以查看“My Token”:
此数据非可读,但您可以使用cast将其转换成您想要的格式。在这种情况下,数据是文本,因此您可以将其转换为ASCII字符以查看“My Token”:

![Foundry Contract View](/images/builders/build/eth-api/dev-env/foundry/foundry-3.webp)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This image is removed and is replaced by:

--8<-- 'code/builders/build/eth-api/dev-env/foundry/terminal/cast.md'

@@ -185,7 +223,7 @@ Foundry包括cast,一个用于执行以太坊RPC调用的CLI。
0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000074d79546f6b656e00000000000000000000000000000000000000000000000000
```

此数据非可读,但您可以使用cast将其转换成您想要的格式。在这种情况下,数据是文本,因此您可以将其转换为ascii字符以查看“My Token”:
此数据非可读,但您可以使用cast将其转换成您想要的格式。在这种情况下,数据是文本,因此您可以将其转换为ASCII字符以查看“My Token”:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
此数据非可读,但您可以使用cast将其转换成您想要的格式。在这种情况下,数据是文本,因此您可以将其转换为ASCII字符以查看“My Token”:
此数据非可读,但您可以使用Cast将其转换成您想要的格式。在这种情况下,数据是文本,因此您可以将其转换为ASCII字符以查看“My Token”:

@@ -387,7 +425,7 @@ abi.encode(100, true, "Develop on Moonbeam")
2. 加载存储的状态

```bash
chisel load
chisel load 1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

on line 437, the image should be removed and replaced with:

--8<-- 'code/builders/build/eth-api/dev-env/foundry/terminal/save-state.md'

@eshaben
Copy link
Contributor

eshaben commented May 10, 2024

@wuzhong-papermoon more changes were made to the Foundry page in this PR

It might be good to just do a quick scan over the page to make sure we didn't forget anything/in case anything else needs to be updated

wuzhong-papermoon added a commit to moonbeam-foundation/moonbeam-docs that referenced this pull request May 10, 2024
Images in foundry tutorial should be removed after the PR for chinese version is merged. All images are replaced with terminal snippet. moonbeam-foundation/moonbeam-docs-cn#425
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants