【Solidity】本地安装Solidity并运行开发环境

本地环境

xiaoyu@LIXIAOYUdeMBP.com npm -v
5.3.0
  ~ [17:45:03]
xiaoyu@LIXIAOYUdeMBP.com node -v
v8.4.0

安装

我们选择最简单的npm安装的方式,在这里加上-g进行全局安装。

xiaoyu@LIXIAOYUdeMBP.com npm install -g solc
npm ERR! code EINTEGRITY
npm ERR! sha1-gJpbElfHwgDhGoQbN36uwnRphTk= integrity checksum failed when using sha1: wanted sha1-gJpbElfHwgDhGoQbN36uwnRphTk= but got sha1-p9IJ5VtXbNZJAi3mbGYWX3srvTg=. (685522 bytes)

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/xiaoyu/.npm/_logs/2017-08-28T09_51_14_676Z-debug.log

报错了。。。。

再来一次。。。。

xiaoyu@LIXIAOYUdeMBP.com npm install -g solc
/usr/local/bin/solcjs -> /usr/local/lib/node_modules/solc/solcjs
+ solc@0.4.16
added 65 packages in 39.97s

成功了,并且得到当前的版本号为0.4.16

xiaoyu@LIXIAOYUdeMBP.com solcjs --help
Usage: /usr/local/bin/solcjs [options] [input_file...]

选项:
  --version         显示版本号                                            [布尔]
  --optimize        Enable bytecode optimizer.                            [布尔]
  --bin             Binary of the contracts in hex.                       [布尔]
  --abi             ABI of the contracts.                                 [布尔]
  --standard-json   Turn on Standard JSON Input / Output mode.            [布尔]
  --output-dir, -o  Output directory for the contracts.                 [字符串]
  --help            显示帮助信息                                          [布尔]

IDE

Remix是一个在线的IDE,来实现对Solidity的代码编写和运行。

访问 https://remix.ethereum.org/ 来进行项目的编写和运行

关联到本地环境

点击左上角的第三个图标,将IDE连接到本地的运行环境。

此功能允许与Remix的文件系统进行交互。 连接完成后,共享文件夹将在本地主机下的文件浏览器中可用
Remixd必须首先在本地计算机上运行。 有关详细信息,请参阅http://remix.readthedocs.io/en/latest/tutorial_remixd_filesystem.html
接受此对话框将启动https://remix.ethereum.org/和本地文件系统之间的会话ws://127.0.0.1:65520
请确保您的系统足够安全(端口65520既不打开也不转发)。
将更新连接状态。
此功能仍然是alpha,我们建议保留共享文件夹的副本。

下面安装remixd

xiaoyu@LIXIAOYUdeMBP.com npm install -g remixd
/usr/local/bin/remixd -> /usr/local/lib/node_modules/remixd/src/main.js

> websocket@1.0.24 install /usr/local/lib/node_modules/remixd/node_modules/websocket
> (node-gyp rebuild 2> builderror.log) || (exit 0)

  CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
  SOLINK_MODULE(target) Release/bufferutil.node
  CXX(target) Release/obj.target/validation/src/validation.o
  SOLINK_MODULE(target) Release/validation.node
+ remixd@0.1.2
added 18 packages in 18.37s

如何使用

然后remixd -S <项目的绝对路径>将启动Remixd并共享给定的文件夹。
使用Remix IDE和Remixd之间的Websocket连接来共享该文件夹。
确保执行Remix的用户对该文件夹具有读/写权限。

Remixd可以为可以访问本地主机上的TCP端口65520的任何应用程序提供对给定文件夹的完全读写访问权限

下载demo运行

xiaoyu@LIXIAOYUdeMBP.com git  clone https://github.com/ethereum/browser-solidity
Cloning into 'browser-solidity'...
remote: Counting objects: 118711, done.
remote: Compressing objects: 100% (85/85), done.
remote: Total 118711 (delta 86), reused 95 (delta 59), pack-reused 118565
Receiving objects: 100% (118711/118711), 49.53 MiB | 119.00 KiB/s, done.
Resolving deltas: 100% (76111/76111), done.
  ~/solidity [18:33:27]
xiaoyu@LIXIAOYUdeMBP.com cd browser-solidity
  ~/solidity/browser-solidity git:(master) [18:34:48]

  ~/solidity/browser-solidity git:(master) [18:34:48]
xiaoyu@LIXIAOYUdeMBP.com npm install
npm WARN prepublish-on-install As of npm@5, `prepublish` scripts are deprecated.
npm WARN prepublish-on-install Use `prepare` for build steps and `prepublishOnly` for upload-only.
npm WARN prepublish-on-install See the deprecation note in `npm help scripts` for more information.

> browser-solidity@0.0.0 prepublish /Users/xiaoyu/solidity/browser-solidity
> mkdirp build; npm-run-all -ls downloadsolc build

[downloadsolc]
[downloadsolc] > browser-solidity@0.0.0 downloadsolc /Users/xiaoyu/solidity/browser-solidity
[downloadsolc] > rimraf soljson.js; wget https://ethereum.github.io/solc-bin/soljson.js
[downloadsolc]
[downloadsolc] --2017-08-29 10:38:24--  https://ethereum.github.io/solc-bin/soljson.js
[downloadsolc] Resolving ethereum.github.io... 151.101.73.147, 2a04:4e42:11::403
[downloadsolc] Connecting to ethereum.github.io|151.101.73.147|:443... connected.
[downloadsolc] HTTP request sent, awaiting response... 200 OK
[downloadsolc] Length: 6990024 (6.7M) [application/javascript]
[downloadsolc] Saving to: ‘soljson.js’
[downloadsolc]
[downloadsolc]      0K .......... .......... .......... .......... ..........  0%  180K 38s
[downloadsolc]     50K .......... .......... .......... .......... ..........  1%  295K 30s
[downloadsolc]    100K .......... .......... .......... .......... ..........  2%  332K 27s
[downloadsolc]    150K .......... .......... .......... .......... ..........  2%  238K 27s
[downloadsolc]    200K .......... .......... .......... .......... ..........  3%  399K 25s
[downloadsolc]    250K .......... .......... .......... .......... ..........  4%  407K 23s
[downloadsolc]    300K .......... .......... .......... .......... ..........  5%  190K 24s
[downloadsolc]    350K .......... .......... .......... .......... ..........  5%  308K 24s
[downloadsolc]    400K .......... .......... .......... .......... ..........  6%  376K 23s
[downloadsolc]    450K .......... .......... .......... .......... ..........  7%  338K 22s
[downloadsolc]    500K .......... .......... .......... .......... ..........  8%  402K 22s
[downloadsolc]    550K .......... .......... .......... .......... ..........  8%  401K 21s
[downloadsolc]    600K .......... .......... .......... .......... ..........  9%  234K 21s
[downloadsolc]    650K .......... .......... .......... .......... .......... 10%  334K 21s
[downloadsolc]    700K .......... .......... .......... .......... .......... 10%  320K 20s
[downloadsolc]    750K .......... .......... .......... .......... .......... 11%  362K 20s
[downloadsolc]    800K .......... .......... .......... .......... .......... 12%  365K 20s
[downloadsolc]    850K .......... .......... .......... .......... .......... 13%  391K 19s
[downloadsolc]    900K .......... .......... .......... .......... .......... 13%  390K 19s
[downloadsolc]    950K .......... .......... .......... .......... .......... 14%  408K 19s
[downloadsolc]   1000K .......... .......... .......... .......... .......... 15%  372K 18s
[downloadsolc]   1050K .......... .......... .......... .......... .......... 16%  419K 18s
[downloadsolc]   1100K .......... .......... .......... .......... .......... 16%  286K 18s
[downloadsolc]   1150K .......... .......... .......... .......... .......... 17%  178K 18s
[downloadsolc]   1200K .......... .......... .......... .......... .......... 18%  303K 18s
[downloadsolc]   1250K .......... .......... .......... .......... .......... 19%  354K 18s
[downloadsolc]   1300K .......... .......... .......... .......... .......... 19%  309K 18s
[downloadsolc]   1350K .......... .......... .......... .......... .......... 20%  359K 17s
[downloadsolc]   1400K .......... .......... .......... .......... .......... 21%  331K 17s
[downloadsolc]   1450K .......... .......... .......... .......... .......... 21%  399K 17s
[downloadsolc]   1500K .......... .......... .......... .......... .......... 22%  263K 17s
[downloadsolc]   1550K .......... .......... .......... .......... .......... 23%  291K 17s
[downloadsolc]   1600K .......... .......... .......... .......... .......... 24%  358K 17s
[downloadsolc]   1650K .......... .......... .......... .......... .......... 24%  531K 16s
[downloadsolc]   1700K .......... .......... .......... .......... .......... 25%  339K 16s
[downloadsolc]   1750K .......... .......... .......... .......... .......... 26%  366K 16s
[downloadsolc]   1800K .......... .......... .......... .......... .......... 27%  356K 16s
[downloadsolc]   1850K .......... .......... .......... .......... .......... 27%  457K 15s
[downloadsolc]   1900K .......... .......... .......... .......... .......... 28%  333K 15s
[downloadsolc]   1950K .......... .......... .......... .......... .......... 29%  323K 15s
[downloadsolc]   2000K .......... .......... .......... .......... .......... 30%  439K 15s
[downloadsolc]   2050K .......... .......... .......... .......... .......... 30%  450K 14s
[downloadsolc]   2100K .......... .......... .......... .......... .......... 31%  149K 15s
[downloadsolc]   2150K .......... .......... .......... .......... .......... 32%  217K 15s
[downloadsolc]   2200K .......... .......... .......... .......... .......... 32%  207K 15s
[downloadsolc]   2250K .......... .......... .......... .......... .......... 33%  156K 15s
[downloadsolc]   2300K .......... .......... .......... .......... .......... 34%  295K 15s
[downloadsolc]   2350K .......... .......... .......... .......... .......... 35%  302K 15s
[downloadsolc]   2400K .......... .......... .......... .......... .......... 35%  267K 14s
[downloadsolc]   2450K .......... .......... .......... .......... .......... 36%  309K 14s
[downloadsolc]   2500K .......... .......... .......... .......... .......... 37%  258K 14s
[downloadsolc]   2550K .......... .......... .......... .......... .......... 38%  316K 14s
[downloadsolc]   2600K .......... .......... .......... .......... .......... 38%  210K 14s
[downloadsolc]   2650K .......... .......... .......... .......... .......... 39% 1.04K 87s
[downloadsolc]   2700K .......... .......... .......... .......... .......... 40% 16.8K 89s
[downloadsolc]   2750K .......... .......... .......... .......... .......... 41%  109K 87s
[downloadsolc]   2800K .......... .......... .......... .......... .......... 41%  156K 85s
[downloadsolc]   2850K .......... .......... .......... .......... .......... 42%  124K 83s
[downloadsolc]   2900K .......... .......... .......... .......... .......... 43%  125K 81s
[downloadsolc]   2950K .......... .......... .......... .......... .......... 43% 90.3K 79s
[downloadsolc]   3000K .......... .......... .......... .......... .......... 44%  117K 78s
[downloadsolc]   3050K .......... .......... .......... .......... .......... 45%  147K 76s
[downloadsolc]   3100K .......... .......... .......... .......... .......... 46% 83.0K 74s
[downloadsolc]   3150K .......... .......... .......... .......... .......... 46%  149K 72s
[downloadsolc]   3200K .......... .......... .......... .......... .......... 47%  179K 71s
[downloadsolc]   3250K .......... .......... .......... .......... .......... 48%  163K 69s
[downloadsolc]   3300K .......... .......... .......... .......... .......... 49%  113K 67s
[downloadsolc]   3350K .......... .......... .......... .......... .......... 49%  239K 66s
[downloadsolc]   3400K .......... .......... .......... .......... .......... 50%  125K 64s
[downloadsolc]   3450K .......... .......... .......... .......... .......... 51%  260K 62s
[downloadsolc]   3500K .......... .......... .......... .......... .......... 52%  184K 61s
[downloadsolc]   3550K .......... .......... .......... .......... .......... 52%  227K 59s
[downloadsolc]   3600K .......... .......... .......... .......... .......... 53%  276K 58s
[downloadsolc]   3650K .......... .......... .......... .......... .......... 54%  229K 56s
[downloadsolc]   3700K .......... .......... .......... .......... .......... 54%  386K 55s
[downloadsolc]   3750K .......... .......... .......... .......... .......... 55%  675K 53s
[downloadsolc]   3800K .......... .......... .......... .......... .......... 56%  457K 52s
[downloadsolc]   3850K .......... .......... .......... .......... .......... 57%  268K 50s
[downloadsolc]   3900K .......... .......... .......... .......... .......... 57%  339K 49s
[downloadsolc]   3950K .......... .......... .......... .......... .......... 58%  604K 48s
[downloadsolc]   4000K .......... .......... .......... .......... .......... 59%  565K 46s
[downloadsolc]   4050K .......... .......... .......... .......... .......... 60%  192K 45s
[downloadsolc]   4100K .......... .......... .......... .......... .......... 60% 1.49M 44s
[downloadsolc]   4150K .......... .......... .......... .......... .......... 61%  525K 42s
[downloadsolc]   4200K .......... .......... .......... .......... .......... 62%  646K 41s
[downloadsolc]   4250K .......... .......... .......... .......... .......... 62%  223K 40s
[downloadsolc]   4300K .......... .......... .......... .......... .......... 63% 1.15M 39s
[downloadsolc]   4350K .......... .......... .......... .......... .......... 64% 1.59M 38s
[downloadsolc]   4400K .......... .......... .......... .......... .......... 65%  253K 37s
[downloadsolc]   4450K .......... .......... .......... .......... .......... 65% 1.70M 35s
[downloadsolc]   4500K .......... .......... .......... .......... .......... 66% 1.01M 34s
[downloadsolc]   4550K .......... .......... .......... .......... .......... 67% 1.13M 33s
[downloadsolc]   4600K .......... .......... .......... .......... .......... 68%  392K 32s
[downloadsolc]   4650K .......... .......... .......... .......... .......... 68%  788K 31s
[downloadsolc]   4700K .......... .......... .......... .......... .......... 69%  700K 30s
[downloadsolc]   4750K .......... .......... .......... .......... .......... 70% 2.58M 29s
[downloadsolc]   4800K .......... .......... .......... .......... .......... 71%  565K 28s
[downloadsolc]   4850K .......... .......... .......... .......... .......... 71% 5.22M 27s
[downloadsolc]   4900K .......... .......... .......... .......... .......... 72%  825K 26s
[downloadsolc]   4950K .......... .......... .......... .......... .......... 73% 1.33M 25s
[downloadsolc]   5000K .......... .......... .......... .......... .......... 73%  453K 24s
[downloadsolc]   5050K .......... .......... .......... .......... .......... 74% 1.79M 23s
[downloadsolc]   5100K .......... .......... .......... .......... .......... 75% 1.21M 23s
[downloadsolc]   5150K .......... .......... .......... .......... .......... 76% 1.27M 22s
[downloadsolc]   5200K .......... .......... .......... .......... .......... 76%  244K 21s
[downloadsolc]   5250K .......... .......... .......... .......... .......... 77% 1.05M 20s
[downloadsolc]   5300K .......... .......... .......... .......... .......... 78% 1.00M 19s
[downloadsolc]   5350K .......... .......... .......... .......... .......... 79% 1.23M 18s
[downloadsolc]   5400K .......... .......... .......... .......... .......... 79%  395K 18s
[downloadsolc]   5450K .......... .......... .......... .......... .......... 80% 4.38M 17s
[downloadsolc]   5500K .......... .......... .......... .......... .......... 81%  299K 16s
[downloadsolc]   5550K .......... .......... .......... .......... .......... 82%  609K 15s
[downloadsolc]   5600K .......... .......... .......... .......... .......... 82%  229K 15s
[downloadsolc]   5650K .......... .......... .......... .......... .......... 83%  247K 14s
[downloadsolc]   5700K .......... .......... .......... .......... .......... 84% 48.6M 13s
[downloadsolc]   5750K .......... .......... .......... .......... .......... 84% 62.4M 12s
[downloadsolc]   5800K .......... .......... .......... .......... .......... 85% 53.2M 12s
[downloadsolc]   5850K .......... .......... .......... .......... .......... 86% 53.1M 11s
[downloadsolc]   5900K .......... .......... .......... .......... .......... 87% 44.5M 10s
[downloadsolc]   5950K .......... .......... .......... .......... .......... 87% 1.62M 10s
[downloadsolc]   6000K .......... .......... .......... .......... .......... 88%  904K 9s
[downloadsolc]   6050K .......... .......... .......... .......... .......... 89% 1.69M 8s
[downloadsolc]   6100K .......... .......... .......... .......... .......... 90% 1.21M 8s
[downloadsolc]   6150K .......... .......... .......... .......... .......... 90% 1.65M 7s
[downloadsolc]   6200K .......... .......... .......... .......... .......... 91% 4.34M 7s
[downloadsolc]   6250K .......... .......... .......... .......... .......... 92%  279K 6s
[downloadsolc]   6300K .......... .......... .......... .......... .......... 93% 6.26M 5s
[downloadsolc]   6350K .......... .......... .......... .......... .......... 93% 5.80M 5s
[downloadsolc]   6400K .......... .......... .......... .......... .......... 94% 3.99M 4s
[downloadsolc]   6450K .......... .......... .......... .......... .......... 95%  412K 4s
[downloadsolc]   6500K .......... .......... .......... .......... .......... 95%  813K 3s
[downloadsolc]   6550K .......... .......... .......... .......... .......... 96% 1017K 2s
[downloadsolc]   6600K .......... .......... .......... .......... .......... 97% 1.39M 2s
[downloadsolc]   6650K .......... .......... .......... .......... .......... 98% 7.24M 1s
[downloadsolc]   6700K .......... .......... .......... .......... .......... 98%  753K 1s
[downloadsolc]   6750K .......... .......... .......... .......... .......... 99% 4.73M 0s
[downloadsolc]   6800K .......... .......... ......                          100% 1.03M=71s
[downloadsolc]
[downloadsolc] 2017-08-29 10:39:37 (96.0 KB/s) - ‘soljson.js’ saved [6990024/6990024]
[downloadsolc]
[build       ]
[build       ] > browser-solidity@0.0.0 build /Users/xiaoyu/solidity/browser-solidity
[build       ] > browserify src/index.js -o build/app.js
[build       ]
npm notice created a lockfile as package-lock.json. You should commit this file.
up to date in 97.274s

//运行demo
xiaoyu@LIXIAOYUdeMacBook-Pro.com npm run prepublish

> browser-solidity@0.0.0 prepublish /Users/xiaoyu/solidity/browser-solidity
> mkdirp build; npm-run-all -ls downloadsolc build

[downloadsolc]
[downloadsolc] > browser-solidity@0.0.0 downloadsolc /Users/xiaoyu/solidity/browser-solidity
[downloadsolc] > rimraf soljson.js; wget https://ethereum.github.io/solc-bin/soljson.js
[downloadsolc]
[downloadsolc] --2017-08-29 10:41:42--  https://ethereum.github.io/solc-bin/soljson.js
[downloadsolc] Resolving ethereum.github.io... 151.101.9.147, 2a04:4e42:2::403
[downloadsolc] Connecting to ethereum.github.io|151.101.9.147|:443... connected.
[downloadsolc] Unable to establish SSL connection.
[downloadsolc] npm ERR! code ELIFECYCLE
[downloadsolc] npm ERR! errno 4
[downloadsolc] npm ERR! browser-solidity@0.0.0 downloadsolc: `rimraf soljson.js; wget https://ethereum.github.io/solc-bin/soljson.js`
[downloadsolc] npm ERR! Exit status 4
[downloadsolc] npm ERR!
[downloadsolc] npm ERR! Failed at the browser-solidity@0.0.0 downloadsolc script.
[downloadsolc] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
[downloadsolc]
[downloadsolc] npm ERR! A complete log of this run can be found in:
[downloadsolc] npm ERR!     /Users/xiaoyu/.npm/_logs/2017-08-29T02_44_51_298Z-debug.log
ERROR: "downloadsolc" exited with 4.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! browser-solidity@0.0.0 prepublish: `mkdirp build; npm-run-all -ls downloadsolc build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the browser-solidity@0.0.0 prepublish script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/xiaoyu/.npm/_logs/2017-08-29T02_44_51_335Z-debug.log

报错了

[downloadsolc]连接到ethereum.github.io | 151.101.9.147 |:443 …已连接。
[downloadsolc]无法建立SSL连接。

问题不大,属于网络问题。

再试一次

xiaoyu@LIXIAOYUdeMacBook-Pro.com npm run prepublish

> browser-solidity@0.0.0 prepublish /Users/xiaoyu/solidity/browser-solidity
> mkdirp build; npm-run-all -ls downloadsolc build

[downloadsolc]
[downloadsolc] > browser-solidity@0.0.0 downloadsolc /Users/xiaoyu/solidity/browser-solidity
[downloadsolc] > rimraf soljson.js; wget https://ethereum.github.io/solc-bin/soljson.js
[downloadsolc]
[downloadsolc] --2017-08-29 11:05:51--  https://ethereum.github.io/solc-bin/soljson.js
[downloadsolc] Resolving ethereum.github.io... 151.101.73.147, 2a04:4e42:11::403
[downloadsolc] Connecting to ethereum.github.io|151.101.73.147|:443... connected.
[downloadsolc] HTTP request sent, awaiting response... 200 OK
[downloadsolc] Length: 6990024 (6.7M) [application/javascript]
[downloadsolc] Saving to: ‘soljson.js’
[downloadsolc]
[downloadsolc]      0K .......... .......... .......... .......... ..........  0%  103K 66s
[downloadsolc]     50K .......... .......... .......... .......... ..........  1% 4.65M 33s
[downloadsolc]    100K .......... .......... .......... .......... ..........  2%  306K 29s
[downloadsolc]    150K .......... .......... .......... .......... ..........  2%  286K 28s
[downloadsolc]    200K .......... .......... .......... .......... ..........  3%  177K 29s
[downloadsolc]    250K .......... .......... .......... .......... ..........  4%  103K 35s
[downloadsolc]    300K .......... .......... .......... .......... ..........  5% 36.2M 30s
[downloadsolc]    350K .......... .......... .......... .......... ..........  5%  292K 28s
[downloadsolc]    400K .......... .......... .......... .......... ..........  6% 8.31M 25s
[downloadsolc]    450K .......... .......... .......... .......... ..........  7%  242K 25s
[downloadsolc]    500K .......... .......... .......... .......... ..........  8% 85.7K 29s
[downloadsolc]    550K .......... .......... .......... .......... ..........  8% 34.7M 27s
[downloadsolc]    600K .......... .......... .......... .......... ..........  9%  184K 27s
[downloadsolc]    650K .......... .......... .......... .......... .......... 10%  303K 26s
[downloadsolc]    700K .......... .......... .......... .......... .......... 10%  171K 27s
[downloadsolc]    750K .......... .......... .......... .......... .......... 11%  147K 27s
[downloadsolc]    800K .......... .......... .......... .......... .......... 12%  161K 28s
[downloadsolc]    850K .......... .......... .......... .......... .......... 13%  278K 27s
[downloadsolc]    900K .......... .......... .......... .......... .......... 13%  157K 28s
[downloadsolc]    950K .......... .......... .......... .......... .......... 14%  163K 28s
[downloadsolc]   1000K .......... .......... .......... .......... .......... 15%  286K 27s
[downloadsolc]   1050K .......... .......... .......... .......... .......... 16% 7.41M 26s
[downloadsolc]   1100K .......... .......... .......... .......... .......... 16%  140K 26s
[downloadsolc]   1150K .......... .......... .......... .......... .......... 17% 80.7K 28s
[downloadsolc]   1200K .......... .......... .......... .......... .......... 18%  340K 27s
[downloadsolc]   1250K .......... .......... .......... .......... .......... 19%  349K 26s
[downloadsolc]   1300K .......... .......... .......... .......... .......... 19%  391K 26s
[downloadsolc]   1350K .......... .......... .......... .......... .......... 20%  260K 25s
[downloadsolc]   1400K .......... .......... .......... .......... .......... 21%  419K 25s
[downloadsolc]   1450K .......... .......... .......... .......... .......... 21%  444K 24s
[downloadsolc]   1500K .......... .......... .......... .......... .......... 22%  613K 23s
[downloadsolc]   1550K .......... .......... .......... .......... .......... 23%  248K 23s
[downloadsolc]   1600K .......... .......... .......... .......... .......... 24% 1.24M 22s
[downloadsolc]   1650K .......... .......... .......... .......... .......... 24%  422K 22s
[downloadsolc]   1700K .......... .......... .......... .......... .......... 25%  552K 21s
[downloadsolc]   1750K .......... .......... .......... .......... .......... 26%  426K 21s
[downloadsolc]   1800K .......... .......... .......... .......... .......... 27%  330K 20s
[downloadsolc]   1850K .......... .......... .......... .......... .......... 27%  393K 20s
[downloadsolc]   1900K .......... .......... .......... .......... .......... 28%  588K 19s
[downloadsolc]   1950K .......... .......... .......... .......... .......... 29%  322K 19s
[downloadsolc]   2000K .......... .......... .......... .......... .......... 30%  712K 19s
[downloadsolc]   2050K .......... .......... .......... .......... .......... 30%  506K 18s
[downloadsolc]   2100K .......... .......... .......... .......... .......... 31%  260K 18s
[downloadsolc]   2150K .......... .......... .......... .......... .......... 32%  399K 18s
[downloadsolc]   2200K .......... .......... .......... .......... .......... 32%  437K 17s
[downloadsolc]   2250K .......... .......... .......... .......... .......... 33%  377K 17s
[downloadsolc]   2300K .......... .......... .......... .......... .......... 34%  426K 17s
[downloadsolc]   2350K .......... .......... .......... .......... .......... 35%  352K 16s
[downloadsolc]   2400K .......... .......... .......... .......... .......... 35%  427K 16s
[downloadsolc]   2450K .......... .......... .......... .......... .......... 36%  600K 16s
[downloadsolc]   2500K .......... .......... .......... .......... .......... 37%  534K 15s
[downloadsolc]   2550K .......... .......... .......... .......... .......... 38%  345K 15s
[downloadsolc]   2600K .......... .......... .......... .......... .......... 38%  309K 15s
[downloadsolc]   2650K .......... .......... .......... .......... .......... 39%  208K 15s
[downloadsolc]   2700K .......... .......... .......... .......... .......... 40%  301K 15s
[downloadsolc]   2750K .......... .......... .......... .......... .......... 41%  309K 15s
[downloadsolc]   2800K .......... .......... .......... .......... .......... 41% 1.03M 14s
[downloadsolc]   2850K .......... .......... .......... .......... .......... 42%  441K 14s
[downloadsolc]   2900K .......... .......... .......... .......... .......... 43%  422K 14s
[downloadsolc]   2950K .......... .......... .......... .......... .......... 43%  444K 13s
[downloadsolc]   3000K .......... .......... .......... .......... .......... 44%  277K 13s
[downloadsolc]   3050K .......... .......... .......... .......... .......... 45%  675K 13s
[downloadsolc]   3100K .......... .......... .......... .......... .......... 46%  636K 13s
[downloadsolc]   3150K .......... .......... .......... .......... .......... 46%  456K 12s
[downloadsolc]   3200K .......... .......... .......... .......... .......... 47%  311K 12s
[downloadsolc]   3250K .......... .......... .......... .......... .......... 48% 1.16M 12s
[downloadsolc]   3300K .......... .......... .......... .......... .......... 49%  324K 12s
[downloadsolc]   3350K .......... .......... .......... .......... .......... 49%  608K 11s
[downloadsolc]   3400K .......... .......... .......... .......... .......... 50%  429K 11s
[downloadsolc]   3450K .......... .......... .......... .......... .......... 51%  890K 11s
[downloadsolc]   3500K .......... .......... .......... .......... .......... 52%  428K 11s
[downloadsolc]   3550K .......... .......... .......... .......... .......... 52%  401K 11s
[downloadsolc]   3600K .......... .......... .......... .......... .......... 53%  446K 10s
[downloadsolc]   3650K .......... .......... .......... .......... .......... 54%  451K 10s
[downloadsolc]   3700K .......... .......... .......... .......... .......... 54%  576K 10s
[downloadsolc]   3750K .......... .......... .......... .......... .......... 55% 1014K 10s
[downloadsolc]   3800K .......... .......... .......... .......... .......... 56%  344K 9s
[downloadsolc]   3850K .......... .......... .......... .......... .......... 57%  260K 9s
[downloadsolc]   3900K .......... .......... .......... .......... .......... 57%  347K 9s
[downloadsolc]   3950K .......... .......... .......... .......... .......... 58%  618K 9s
[downloadsolc]   4000K .......... .......... .......... .......... .......... 59%  507K 9s
[downloadsolc]   4050K .......... .......... .......... .......... .......... 60%  292K 9s
[downloadsolc]   4100K .......... .......... .......... .......... .......... 60% 2.11M 8s
[downloadsolc]   4150K .......... .......... .......... .......... .......... 61%  325K 8s
[downloadsolc]   4200K .......... .......... .......... .......... .......... 62%  577K 8s
[downloadsolc]   4250K .......... .......... .......... .......... .......... 62%  326K 8s
[downloadsolc]   4300K .......... .......... .......... .......... .......... 63% 1.69M 8s
[downloadsolc]   4350K .......... .......... .......... .......... .......... 64%  227K 8s
[downloadsolc]   4400K .......... .......... .......... .......... .......... 65%  514K 7s
[downloadsolc]   4450K .......... .......... .......... .......... .......... 65%  616K 7s
[downloadsolc]   4500K .......... .......... .......... .......... .......... 66%  467K 7s
[downloadsolc]   4550K .......... .......... .......... .......... .......... 67% 1.03M 7s
[downloadsolc]   4600K .......... .......... .......... .......... .......... 68%  352K 7s
[downloadsolc]   4650K .......... .......... .......... .......... .......... 68% 1.26M 6s
[downloadsolc]   4700K .......... .......... .......... .......... .......... 69%  202K 6s
[downloadsolc]   4750K .......... .......... .......... .......... .......... 70%  378K 6s
[downloadsolc]   4800K .......... .......... .......... .......... .......... 71%  474K 6s
[downloadsolc]   4850K .......... .......... .......... .......... .......... 71%  994K 6s
[downloadsolc]   4900K .......... .......... .......... .......... .......... 72%  811K 6s
[downloadsolc]   4950K .......... .......... .......... .......... .......... 73%  364K 5s
[downloadsolc]   5000K .......... .......... .......... .......... .......... 73%  192K 5s
[downloadsolc]   5050K .......... .......... .......... .......... .......... 74%  672K 5s
[downloadsolc]   5100K .......... .......... .......... .......... .......... 75%  264K 5s
[downloadsolc]   5150K .......... .......... .......... .......... .......... 76%  103K 5s
[downloadsolc]   5200K .......... .......... .......... .......... .......... 76%  151K 5s
[downloadsolc]   5250K .......... .......... .......... .......... .......... 77%  197K 5s
[downloadsolc]   5300K .......... .......... .......... .......... .......... 78%  168K 5s
[downloadsolc]   5350K .......... .......... .......... .......... .......... 79%  102K 5s
[downloadsolc]   5400K .......... .......... .......... .......... .......... 79%  265K 4s
[downloadsolc]   5450K .......... .......... .......... .......... .......... 80%  163K 4s
[downloadsolc]   5500K .......... .......... .......... .......... .......... 81% 97.4K 4s
[downloadsolc]   5550K .......... .......... .......... .......... .......... 82% 37.2K 4s
[downloadsolc]   5600K .......... .......... .......... .......... .......... 82% 26.1M 4s
[downloadsolc]   5650K .......... .......... .......... .......... .......... 83% 2.16M 4s
[downloadsolc]   5700K .......... .......... .......... .......... .......... 84% 32.9M 4s
[downloadsolc]   5750K .......... .......... .......... .......... .......... 84% 38.1M 3s
[downloadsolc]   5800K .......... .......... .......... .......... .......... 85%  140K 3s
[downloadsolc]   5850K .......... .......... .......... .......... .......... 86%  313K 3s
[downloadsolc]   5900K .......... .......... .......... .......... .......... 87%  301K 3s
[downloadsolc]   5950K .......... .......... .......... .......... .......... 87%  389K 3s
[downloadsolc]   6000K .......... .......... .......... .......... .......... 88%  238K 3s
[downloadsolc]   6050K .......... .......... .......... .......... .......... 89%  347K 2s
[downloadsolc]   6100K .......... .......... .......... .......... .......... 90%  198K 2s
[downloadsolc]   6150K .......... .......... .......... .......... .......... 90% 36.1K 2s
[downloadsolc]   6200K .......... .......... .......... .......... .......... 91% 40.3M 2s
[downloadsolc]   6250K .......... .......... .......... .......... .......... 92% 40.6M 2s
[downloadsolc]   6300K .......... .......... .......... .......... .......... 93%  202K 2s
[downloadsolc]   6350K .......... .......... .......... .......... .......... 93% 7.69M 2s
[downloadsolc]   6400K .......... .......... .......... .......... .......... 94% 58.3M 1s
[downloadsolc]   6450K .......... .......... .......... .......... .......... 95%  338K 1s
[downloadsolc]   6500K .......... .......... .......... .......... .......... 95%  863K 1s
[downloadsolc]   6550K .......... .......... .......... .......... .......... 96% 1.22M 1s
[downloadsolc]   6600K .......... .......... .......... .......... .......... 97% 1.70M 1s
[downloadsolc]   6650K .......... .......... .......... .......... .......... 98%  220K 0s
[downloadsolc]   6700K .......... .......... .......... .......... .......... 98% 1.16M 0s
[downloadsolc]   6750K .......... .......... .......... .......... .......... 99%  577K 0s
[downloadsolc]   6800K .......... .......... ......                          100% 4.63M=23s
[downloadsolc]
[downloadsolc] 2017-08-29 11:06:16 (293 KB/s) - ‘soljson.js’ saved [6990024/6990024]
[downloadsolc]
[build       ]
[build       ] > browser-solidity@0.0.0 build /Users/xiaoyu/solidity/browser-solidity
[build       ] > browserify src/index.js -o build/app.js
[build       ] 

正式运行

xiaoyu@LIXIAOYUdeMacBook-Pro.com npm start

> browser-solidity@0.0.0 start /Users/xiaoyu/solidity/browser-solidity
> npm-run-all -lpr serve watch onchange

[watch   ]
[watch   ] > browser-solidity@0.0.0 watch /Users/xiaoyu/solidity/browser-solidity
[watch   ] > watchify src/index.js -dv -p browserify-reload -o build/app.js
[watch   ]
[onchange]
[onchange] > browser-solidity@0.0.0 onchange /Users/xiaoyu/solidity/browser-solidity
[onchange] > onchange build/app.js -- npm-run-all lint
[onchange]
[serve   ]
[serve   ] > browser-solidity@0.0.0 serve /Users/xiaoyu/solidity/browser-solidity
[serve   ] > execr --silent http-server .
[serve   ]
[watch   ] WS server listening on  54663
[watch   ] NOW ASKING FOR CLIENT TO RELOAD
[watch   ] 13146095 bytes written to build/app.js (15.25 seconds) at 11:07:55
[onchange]
[onchange] > browser-solidity@0.0.0 lint /Users/xiaoyu/solidity/browser-solidity
[onchange] > standard | notify-error
[onchange]

访问http://127.0.0.1:8080/进入编辑页面

进入编辑和运行模式,搞定。

至此可以进行Solidity的编辑和运行了。

参考资料

时间: 2024-10-31 12:04:44

【Solidity】本地安装Solidity并运行开发环境的相关文章

KVM下用DevStack快速安装和配置OpenStack开发环境教程

  OpenStack是一个开源的云计算管理平台项目,支持几乎所有类型的云环境,项目目标是提供实施简单.可大规模扩展.丰富.标准统一的云计算管理平台.本文我们来谈谈DevStack安装和配置OpenStack开发环境. OpenStack的安装和配置有一点复杂,特别对于初学者来,第一次安装OpenStack时经常会碰到很多的问题.不过在Openstack社区中,一些开发者开发了一些自动化脚本来方便搭建OpenStack的开发环境,其中,DevStack是其中相对比较完善的,也是OpenStack

Linux下安装IPython配置python开发环境教程_Linux

一.IPython简介 IPython 是一个交互式的shell,比默认终端好用,支持自动缩进,并且内置了很多有用的功能和函数.可以在任何操作系统上使用. 二.安装方法 1.pip 在线安装 pip install ipython pip install "ipython[notebook]" 2.下载安装 可以到GitHub 下载安装包,切换到目录下然后运行下面的脚本 Python setup.py install 三.简单使用 打开Linux终端,在命令行中输入 root@Linu

在Windows系统中安装集成的PHP开发环境

原文:在Windows系统中安装集成的PHP开发环境 刚想学php的,又不会配置复杂php的环境,可以使用集成的,目前网上提供常用的PHP集成环境主要有AppServ.phpStudy.WAMP和XAMPP等软件,这些软件之间的差别不大.每种集成包都有多个不同的版本,可以下载版本比较高的任意一个集成软件安装使用.  我用的是appserv-win32-2.5.10.exe下载地址:http://www.appservnetwork.com/index.php?newlang=chinese Ap

苹果MAC中安装并搭建Android开发环境的详细步骤

Android的开发平台搭建主要需要的工具有:Java虚拟机JDK.Eclipse.Eclipse插件ADT(Android Developer Tool)和Android开发包SDK,以下是具体的安装方法. A.JDK 在MAC中已经为我们预装了JDK并默认配置了Java系统变量,因此JDK对我们来说直接使用即可,查看MAC中的JDK版本方法是在命令行(硬盘/应用程序/实用工具/终端)中输入"java -version"并回车即可. B.Android SDK Android开发包同

win7安装ruby on rails开发环境_ruby专题

前言 看到很多文章都说ruby环境在windows上是非常难搭建,会出现各种各样的怪问题,所以都推荐到linux和mac上安装开发.但是我按照教程搭了下,问题也不算太多.总过大概花费了2个半小时左右就完成了.所以大家不要被吓尿了,下面就把安装的步骤及具体的版本记录了一下供大家参考. 安装步骤:    开发机环境:我使用的开发机:win7 旗舰版 - 64位 (cpu是i5). 1 安装 rubyinstaller-2.0.0-p481.exe    1 选择安装目录:(如:D:\server\R

Vista安装.NET 2.0开发环境注意事项

首先目前Windows Vista & Office 2007都只有英文版,这对于需要中文环境的使用者而言是很不方便的,并且对于需要开发公司或项目内的中文应用系统的人,也是会有困扰. 而祭司目前工作上用的是宏碁NB 法拉利4005,配备2G RAM+100G硬盘,在Windows XP 64位上,主要是VS 2005 + SQL Server 2005的开发环境,但在我把我正式开发用环境换掉前,我必须先做一些测试,以免Windows Vista新环境无法执行.NET + VS 2005 + SQ

在Mac OS上编译安装Nginx+PHP+MariaDB开发环境的教程_php实例

因为甲骨文的尿性.mariadb应该要顶替mysql了.所以抛弃mysql 1,编译nginx分别下载nginx,openssl,pcre 编译openssl的时候会提示 WARNING! If you wish to build 64-bit library, then you have to invoke './Configure darwin64-x86_64-cc' *manually*. 如果你不停止编译就会出错.这个问题应该是 openssl/config脚本猜对你的系统是64位,但

debian7.5安装apache2搭建PHP开发环境的教程

使用以下命令,需要SSH登录服务器,然后依次执行以下命令. 第一步:更新系统组件 apt-get update apt-get upgrade –show-upgraded 第二步:安装apache2 apt-get install apache2 启动apache2的rewrite支持 a2enmod rewrite 第三步:新建站点,配置虚拟主机 新建站点的配置文件路径在:/etc/apache2/sites-available/ 使用 vim www_jicker_cn.conf 命令新建

Ubuntu 安装 Eclipse C/C++开发环境

所需软件清单:   1.eclipse-linuxtools-indigo-SR1-incubation-linux-gtk.tar.gz 2.jre-7u2-linux-i586.tar.gz   先将上述2个软件压缩包 下载 到 /home/tools 里,如图   第2步 解压缩 #cd /home/tools/ 将eclipse-linuxtools-indigo-SR1-incubation-linux-gtk.tar.gz 解压缩到 /opt下 # cp eclipse-linuxt