Skip to content

Commit

Permalink
hyperledger
Browse files Browse the repository at this point in the history
  • Loading branch information
netkiller committed Feb 17, 2018
1 parent f909c90 commit 046d7a8
Show file tree
Hide file tree
Showing 70 changed files with 15,573 additions and 4,762 deletions.
157 changes: 157 additions & 0 deletions blockchain/author.html

Large diffs are not rendered by default.

743 changes: 743 additions & 0 deletions blockchain/docbook.css

Large diffs are not rendered by default.

105 changes: 105 additions & 0 deletions blockchain/ethereum/browser-solidity.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>2.2. browser-solidity</title><link rel="stylesheet" type="text/css" href="..//docbook.css" /><meta name="generator" content="DocBook XSL Stylesheets V1.79.1" /><meta name="keywords" content="ethereum, geth, browser-solidity, solidity" /><link rel="home" href="../index.html" title="Netkiller Blockchain 手札" /><link rel="up" href="solidity.html" title="第 2 章 以太坊智能合约开发入门" /><link rel="prev" href="solidity.html" title="第 2 章 以太坊智能合约开发入门" /><link rel="next" href="solc.html" title="2.3. 使用 solc 编译 *.sol 代码" /></head><body><a xmlns="" href="//www.netkiller.cn/">Home</a> |
<a xmlns="" href="//netkiller.github.io/">简体中文</a> |
<a xmlns="" href="http://netkiller.sourceforge.net/">繁体中文</a> |
<a xmlns="" href="/journal/index.html">杂文</a> |
<a xmlns="" href="//www.netkiller.cn/home/donations.html">打赏(Donations)</a> |
<a xmlns="" href="https://yq.aliyun.com/u/netkiller/">云栖社区</a> |
<a xmlns="" href="http://my.oschina.net/neochen/">OSChina 博客</a> |
<a xmlns="" href="https://www.facebook.com/bg7nyt">Facebook</a> |
<a xmlns="" href="http://cn.linkedin.com/in/netkiller/">Linkedin</a> |
<a xmlns="" href="https://zhuanlan.zhihu.com/netkiller">知乎专栏</a> |
<a xmlns="" href="https://github.com/netkiller">Github</a> |
<a xmlns="" href="/search.html">Search</a> |
<a xmlns="" href="//www.netkiller.cn/home/about.html">About</a><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">2.2. browser-solidity</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="solidity.html">上一页</a> </td><th width="60%" align="center">第 2 章 以太坊智能合约开发入门</th><td width="20%" align="right"> <a accesskey="n" href="solc.html">下一页</a></td></tr></table><hr /></div><table xmlns=""><tr><td><iframe src="//ghbtns.com/github-btn.html?user=netkiller&amp;repo=netkiller.github.io&amp;type=watch&amp;count=true&amp;size=large" height="30" width="170" frameborder="0" scrolling="0" style="width:170px; height: 30px;" allowTransparency="true"></iframe></td><td><iframe src="//ghbtns.com/github-btn.html?user=netkiller&amp;repo=netkiller.github.io&amp;type=fork&amp;count=true&amp;size=large" height="30" width="170" frameborder="0" scrolling="0" style="width:170px; height: 30px;" allowTransparency="true"></iframe></td><td><iframe src="//ghbtns.com/github-btn.html?user=netkiller&amp;type=follow&amp;count=true&amp;size=large" height="30" width="240" frameborder="0" scrolling="0" style="width:240px; height: 30px;" allowTransparency="true"></iframe></td></tr></table><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="browser-solidity"></a>2.2. browser-solidity</h2></div></div></div>

<p>在线使用 browser-solidity</p>
<a class="ulink" href="https://ethereum.github.io/browser-solidity/" target="_top">https://ethereum.github.io/browser-solidity/</a>
<a class="ulink" href="https://remix.ethereum.org/" target="_top">https://remix.ethereum.org/</a>
<p>国内网络有时不给力,建议将 Remix 安装到本地目录。</p>
<div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="remix"></a>2.2.1. 将 Remix(browser-solidity) 安装到本地</h3></div></div></div>

<p>共享合约目录</p>
<pre class="screen">

npm install -g remixd
remixd -S "/home/ethereum/codebase/blocks/contracts"

</pre>
<p>安装 browser-solidity </p>
<pre class="screen">

git clone https://github.com/ethereum/browser-solidity
cd browser-solidity
npm install
npm run prepublish

sudo chown -R $USER:$(id -gn $USER) /home/neo/.config

npm start

</pre>
<p>
启动后浏览器中输入
<a class="ulink" href="http://localhost:8080" target="_top">http://localhost:8080</a>
可以看到 Remix 界面
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note: Web3 Provider"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[注意]" src="/graphics/note.png" /></td><th align="left">Web3 Provider</th></tr><tr><td align="left" valign="top">

<p>Remix 提供三种运行环境,常用的有 JavaScript VM 和 Web3 Provider (连接到 --rpc
--rpcaddr="0.0.0.0" --rpccorsdomain "*" --rpcport 8545)</p>
<p>Web3 Provider 方式需要解锁账号和启动挖矿</p>
<pre class="screen">

&gt; personal.unlockAccount(eth.accounts[0],"");
&gt; miner.start(2); admin.sleepBlocks(1); miner.stop();

</pre>
</td></tr></table></div>


</div>
</div><div xmlns="" id="disqus_thread"></div><script xmlns="">

var disqus_config = function () {
this.page.url = "http://www.netkiller.cn"; // Replace PAGE_URL with your page's canonical URL variable
this.page.identifier = 'netkiller'; // Replace PAGE_IDENTIFIER with your page's unique identifier variable
};

(function() { // DON'T EDIT BELOW THIS LINE
var d = document, s = d.createElement('script');
s.src = '//netkiller.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();
</script><noscript xmlns="">Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript><br xmlns="" /><script xmlns="" type="text/javascript" id="clustrmaps" src="//cdn.clustrmaps.com/map_v2.js?u=r5HG&amp;d=9mi5r_kkDC8uxG8HuY3p4-2qgeeVypAK9vMD-2P6BYM"></script><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="solidity.html">上一页</a> </td><td width="20%" align="center"><a accesskey="u" href="solidity.html">上一级</a></td><td width="40%" align="right"> <a accesskey="n" href="solc.html">下一页</a></td></tr><tr><td width="40%" align="left" valign="top">第 2 章 以太坊智能合约开发入门 </td><td width="20%" align="center"><a accesskey="h" href="../index.html">起始页</a></td><td width="40%" align="right" valign="top"> 2.3. 使用 solc 编译 *.sol 代码</td></tr></table></div><script xmlns="">
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-11694057-1', 'auto');
ga('send', 'pageview');

</script><script xmlns="" async="async">
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?93967759a51cda79e49bf4e34d0b0f2c";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script><script xmlns="" async="async">
(function(){
var bp = document.createElement('script');
var curProtocol = window.location.protocol.split(':')[0];
if (curProtocol === 'https') {
bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
}
else {
bp.src = 'http://push.zhanzhang.baidu.com/push.js';
}
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(bp, s);
})();
</script><script xmlns="" type="text/javascript" src="/js/q.js" async="async"></script></body></html>
Loading

0 comments on commit 046d7a8

Please sign in to comment.