-
Notifications
You must be signed in to change notification settings - Fork 2
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
add translation #1
base: master
Are you sure you want to change the base?
Conversation
…nge creating-upgradeable-from-solidity.adoc
|
||
The xref:cli::index.adoc[*OpenZeppelin CLI*] lets you create upgradable contracts from the command line, and you can also use Upgrades directly from JavaScript, but there is a third use case: creating an upgradable contract directly from another contract. | ||
*OpenZeppelin CLI* 允许你用命令行的方式升级智能合约,你也可以直接使用JavaScript来升级,但还有第三种用法:直接从其他合约创建一个新的可升级合约。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
xref:cli::index.adoc[OpenZeppelin CLI] 这是一个文档格式的链接,最好保留。
|
||
For a refresher on the topics, head to xref:learn::deploying-and-interacting.adoc[Deploying and Interacting With Smart Contracts]. | ||
如果想要复习这个主题,可以参考智能合约的部署和交互。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
refresher 是 新手的意思 。
@@ -149,9 +149,9 @@ Recall that `Product` has an `initialize` method: when creating a new one, we ne | |||
... | |||
---- | |||
|
|||
OpenZeppelin Upgrades provides a JavaScript utility function just for this sort of thing: `encodeCall`. It receives a method name, an array of argument types and an array of argument values, and outputs the call data that corresponds to that method invocation. | |||
OpenZeppelin升级提供了JavaScript功能函数用于: `encodeCall` 。它接收一个方法名,一个存放参数类型的数组和一个存放参数的数组,并根据方法的调用输出相关的数据。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OpenZeppelin Upgrades 提供了JavaScript功能函数 encodeCall
来做这件事情。
|
||
Let's generate the call data for an initialization with the number 42: | ||
让我们使用42这个数字来进行初始化并得到调用数据: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
让我们使用42这个数字来产生初始化的调用数据: (call data 是solidity中的一个术语, 这里并没有进行初始化,动作是 generate)
the translation of "creating upgradeable from solidity"