作者:林冠宏 / 指尖下的幽灵。转载者,请: 务必标明出处。
Author: Ghosts under the crown macro/ fingertips. Reproduced, please: place of origin.
Excavation: juejin.im/user/178526...
GitHub : github.com/af913337456…
出版的书籍:
Books published:
本文将使用介绍新版本的开发工具 的基础使用教程,阅读完本文,能使开发者使用 从编写完合约代码到调试、并发布的目的。
This paper will be read using the basics of the new version of the development tool and will enable developers to use it from the completion of the contract code to the purpose of debugging and publishing it.
自从 2018 年至今,Remix 已经发展了很多个版本,功能也越来越完善,官方的下载链接如下:
Since 2018, Remix has developed a number of versions and has become more functional. The official download links are as follows:
下载完后,可以直接双击打开,如果在界面需要进行更新,等待即可,过程有可能会出现缓慢的情况,科学上网可以加快速度。
Once downloads are completed, they can be opened by direct double-click, and if the interface needs to be updated and waiting is sufficient, the process may be slow and scientific access can be accelerated.
1. 工作目录的选择
2. 编译合约
上图中:
In the previous graph:
- 是 solidity 编译器版本的展示与选择;
- 选中要被编译的语言,选 solidity 即可;
- 选择以太坊的虚拟机版本,可选项列表对应的是以太坊的版本,比如、、,除非进行特定的版本调试,否则一般用 即可。
点击蓝色的 按钮即可编译合约,成功后,会在下面展示出编译相关信息,包含合约的 和 信息。如下所示:
Click on the blue button to compile the contract, and when it succeeds, the compilation information, including the contract and the information, will be displayed below. As follows:
其中, 按钮,点击后可以展示更详细的编译后信息,包含比如使用 部署该合约的示范代码。
button, click to display more detailed post-compilation information, including, for example, the use of the model code to deploy the contract.
3. 部署与非断点型调试合约
下面的图覆盖的点解析比较多,重点看。
The figure below covers a larger number of points and focuses on them.
查看并调试合约中的
View and debug contracts
查看方法被调用后的数据输出:
View data output after call method:
4. 丰富的插件安装选项
现在 Remix 支持插件安装,比如支持断点测试的插件。
Remix now supports the installation of plugins, such as those supporting breakpoint testing.
结语
Remix-IDE 整体还是比较容易上手的。对比于其他的合约编写工具,初学者建议使用这个。
Remix-IDE as a whole is easier to do. Compared to other contract writing tools, starters suggest using this.
注册有任何问题请添加 微信:MVIP619 拉你进入群
打开微信扫一扫
添加客服
进入交流群
发表评论