3

solidity | solidity 开发环境应该怎么选择

 2 years ago
source link: https://benpaodewoniu.github.io/2022/05/29/solidity38/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

solidity | solidity 开发环境应该怎么选择

这里致力于找到一个行之有效、简单的 solidity 编辑器。

truffle

truffle 是本地的编辑器,请参考

但是,truffle 有以下的问题

  • 创建环境非常困难
  • DEBUG 并不完善

基于上述问题,truffle 并不是一个好的选择。

remix

经过排查后,发现还是基于浏览器的官方 remix 好用。

remix 可以做到下面的功能

  • 连通本地存储
  • solidity 书写
  • debug
  • 连通本地 ganache

这里说一下怎么基于本地文件系统配合 remix。

安装本地连通器

这里直接安装

npm install @remix-project/remixd

很多教程会安装

npm install remixd

但是,上面的命令已经过时。

进行 remix 和 本地连通。

remixd -s ./contracts
[INFO] Sun May 29 2022 12:38:58 GMT+0800 (China Standard Time) remixd is listening on 127.0.0.1:65520
[INFO] Sun May 29 2022 12:38:58 GMT+0800 (China Standard Time) slither is listening on 127.0.0.1:65523

remix 进行本地连接。

38_0.png

无论是 remix 改变还是 本地改变两个地方都能同步。

请我喝杯咖啡吧~

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK