<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title>meisw's blog</title>
		<link>http://meisw.wdlinux.cn//</link>
		<description>工作,学习,生活,这里将会有一些记录.     备用域名:http://meisw.wdlinux.cn</description>
		<copyright>Copyright (C) 2004 Security Angel Team [S4T] All Rights Reserved.</copyright>
		<generator>SaBlog-X Version 1.6 Build 20080806</generator>
		<lastBuildDate>Sun, 20 Sep 2026 23:57:20 +0000</lastBuildDate>
		<ttl>30</ttl>
		<item>
			<guid>http://meisw.wdlinux.cn//show-1014-1.html</guid>
			<title>深入解析ABI</title>
			<author>admin</author>
			<description><![CDATA[<p>&nbsp;https://zhuanlan.zhihu.com/p/27574211</p>]]></description>
			<link>http://meisw.wdlinux.cn//show-1014-1.html</link>
			<category domain="http://meisw.wdlinux.cn//category-54-1.html">以太坊</category>
			<pubDate>2018-02-02 09:46</pubDate>
		</item>
		<item>
			<guid>http://meisw.wdlinux.cn//show-1013-1.html</guid>
			<title>Solidity 官方文档中文版</title>
			<author>admin</author>
			<description><![CDATA[<p>&nbsp;</p>
<h2 id="2af116473a062274a072ba7803219696" style="box-sizing: border-box; padding: 0px 0px 0.3em; margin: 5px 0px; font-family: Verdana, &quot;Lantinghei SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft Yahei&quot;, Helvetica, arial, 宋体, sans-serif; font-weight: 500; line-height: 1.225; color: rgb(51, 51, 51); font-size: 18px;">内部-优化器</h2>
<p style="box-sizing: border-box; margin-bottom: 10px; color: rgb(102, 102, 102); line-height: 26px; font-family: Verdana, &quot;Lantinghei SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft Yahei&quot;, Helvetica, arial, 宋体, sans-serif;">Solidity 优化器是在汇编级别上的操作，所以它也可以同时被其他语言所使用。它将指令的（执行）次序，在JUMP 和 JUMPDEST上分成基本的块。在这些块中，指令被解析 。 堆栈、内存或存储上的每一次修改，都将作为表达式被记录。该表达式包括一条指令以及指向其他表达式的一系列参数的一个指针。现在的主要意思是要找到相等的表达式（在每次输入），做成了表达式的类。优化器首先在已知的表达式列表里找，若找不到的话，就根据constant + constant = sum_of_constants&nbsp; 或 X * 1 = X&nbsp; 来简化。 因为这样做是递归的，如果第二个因子是一个更复杂的表达式，我们也可以应用latter规则来计算。存储和内存位置的修改，是不知道存储和内存的位置的区别。如果我们先写到的位置x，再写到位置y , x,y均是输入变量。第二个可以覆写第一个，所以我们不知道x是存放在y之后的。另一方面，如果一个简化的表达式 x-y 能计算出一个非零常数，我们就知道x存放的内容。</p>
<p style="box-sizing: border-box; margin-bottom: 10px; color: rgb(102, 102, 102); line-height: 26px; font-family: Verdana, &quot;Lantinghei SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft Yahei&quot;, Helvetica, arial, 宋体, sans-serif;">在这个过程结束时，我们知道，表达式必须在堆栈中结尾，并有一系列对内存和存储的修改。这些信息存储在block上，并链接这些block。此外，有关堆栈，存储和内存配置的信息会转发到下一个block。如果我们知道所有的 JUMP 和 JUMPI 指令，我们可以建立一个完整的程序控制流图。如果我们不知道目标块（原则上，跳转目标是从输入里得到的），我们必须清除所有输入状态的存储块上的信息，（因为它的目标块未知）。如果条件计算的结果为一个常量，它转化为一个无条件jump。</p>
<p style="box-sizing: border-box; margin-bottom: 10px; color: rgb(102, 102, 102); line-height: 26px; font-family: Verdana, &quot;Lantinghei SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft Yahei&quot;, Helvetica, arial, 宋体, sans-serif;">作为最后一步，在每个块中的代码完全可以重新生成。从堆栈里block的结尾表达式开始，创建一个依赖关系图。每个不是这个图上的操作将舍弃。现在能按照原来代码的顺序，生成对存储和内存修改的代码（舍弃不必要的修改）。最后，在正确位置的堆栈上，生成所有的值。</p>
<p style="box-sizing: border-box; margin-bottom: 10px; color: rgb(102, 102, 102); line-height: 26px; font-family: Verdana, &quot;Lantinghei SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft Yahei&quot;, Helvetica, arial, 宋体, sans-serif;">这些步骤适用于每一个基本块， 如果它是较小的，用新生成的代码来替换。如果一个基本块在JUMPI上进行分割，在分析过程中，条件表达式的结果计算为一个常数，JUMP就用常量值进行替换。代码如下</p>
<p style="box-sizing: border-box; margin-bottom: 10px; color: rgb(102, 102, 102); line-height: 26px; font-family: Verdana, &quot;Lantinghei SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft Yahei&quot;, Helvetica, arial, 宋体, sans-serif;">&nbsp;</p>
<h2 id="2c203d505ef0857ca729a1b3dc305f9c" style="box-sizing: border-box; padding: 0px 0px 0.3em; margin: 5px 0px; font-family: Verdana, &quot;Lantinghei SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft Yahei&quot;, Helvetica, arial, 宋体, sans-serif; font-weight: 500; line-height: 1.225; color: rgb(51, 51, 51); font-size: 18px;">使用命令行编译器</h2>
<p style="box-sizing: border-box; margin-bottom: 10px; color: rgb(102, 102, 102); line-height: 26px; font-family: Verdana, &quot;Lantinghei SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft Yahei&quot;, Helvetica, arial, 宋体, sans-serif;">一个 Solidity 库构建的目标是solc，&nbsp;Solidity命令行编译器。使用solc &ndash;help&nbsp; 为您提供所有选项的解释。编译器可以产生不同的输出，从简单的二进制文件，程序集的抽象语法树（解析树）到gas使用的估量。如果你只想编译一个文件，你运行solc &ndash;bin sourceFile.sol ， 将会打印出二进制。你部署你的合约之前，使用solc &ndash;optimize &ndash;bin sourceFile.sol 来激活优化器。如果你想获得一些solc更进一步的输出变量，可以使用solc -o outputDirectory &ndash;bin &ndash;ast &ndash;asm sourceFile.sol，（这条命令）将通知编译器输出结果到单独的文件中。</p>
<p style="box-sizing: border-box; margin-bottom: 10px; color: rgb(102, 102, 102); line-height: 26px; font-family: Verdana, &quot;Lantinghei SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft Yahei&quot;, Helvetica, arial, 宋体, sans-serif;">命令行编译器会自动从文件系统中读取输入文件，但也可以如下列方法，提供重定向路径prefix=path&nbsp;：</p>
<p style="box-sizing: border-box; margin-bottom: 10px; color: rgb(102, 102, 102); line-height: 26px; font-family: Verdana, &quot;Lantinghei SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft Yahei&quot;, Helvetica, arial, 宋体, sans-serif;">solc github.com/ethereum/dapp-bin/=/usr/local/lib/dapp-bin/ =/usr/local/lib/fallback file.sol</p>
<p style="box-sizing: border-box; margin-bottom: 10px; color: rgb(102, 102, 102); line-height: 26px; font-family: Verdana, &quot;Lantinghei SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft Yahei&quot;, Helvetica, arial, 宋体, sans-serif;">该命令告诉编译器在/usr/local/lib/dapp-bin目录下，寻找以github.com/ethereum/dapp-bin/&nbsp; 开头的文件，如果找不到的话，到usr/local/lib/fallback目录下找（空前缀总是匹配）。</p>
<p style="box-sizing: border-box; margin-bottom: 10px; color: rgb(102, 102, 102); line-height: 26px; font-family: Verdana, &quot;Lantinghei SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft Yahei&quot;, Helvetica, arial, 宋体, sans-serif;">solc不会从remapping目标的外部，或者显式定义的源文件的外部文件系统读取文件，所以要写成 import &ldquo;/etc/passwd&rdquo;;&nbsp;&nbsp;&nbsp;&nbsp; 只有增加 =/ 作为remapping,程序才能工作。</p>
<p style="box-sizing: border-box; margin-bottom: 10px; color: rgb(102, 102, 102); line-height: 26px; font-family: Verdana, &quot;Lantinghei SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft Yahei&quot;, Helvetica, arial, 宋体, sans-serif;">如果remapping里找到了多个匹配，则选择有共同的前缀最长的那个匹配。</p>
<p style="box-sizing: border-box; margin-bottom: 10px; color: rgb(102, 102, 102); line-height: 26px; font-family: Verdana, &quot;Lantinghei SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft Yahei&quot;, Helvetica, arial, 宋体, sans-serif;">如果你的合约使用了&nbsp; libraries ，你会注意到字节码中包含了&nbsp;form LibraryName 这样的子字符串。你可以在这些地方使用solc 作为链接器，来插入库地址 ：</p>
<p style="box-sizing: border-box; margin-bottom: 10px; color: rgb(102, 102, 102); line-height: 26px; font-family: Verdana, &quot;Lantinghei SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft Yahei&quot;, Helvetica, arial, 宋体, sans-serif;">Either add &ndash;libraries &ldquo;Math:0x12345678901234567890 Heap:0xabcdef0123456&rdquo;&nbsp;&nbsp;&nbsp; 提供每个库的地址， 或者在文件中存放字符串（每行一个库）</p>
<p style="box-sizing: border-box; margin-bottom: 10px; color: rgb(102, 102, 102); line-height: 26px; font-family: Verdana, &quot;Lantinghei SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft Yahei&quot;, Helvetica, arial, 宋体, sans-serif;">然后运行solc，后面写 &ndash;libraries fileName.</p>
<p style="box-sizing: border-box; margin-bottom: 10px; color: rgb(102, 102, 102); line-height: 26px; font-family: Verdana, &quot;Lantinghei SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft Yahei&quot;, Helvetica, arial, 宋体, sans-serif;">如果solc后面接着&nbsp;&ndash;link 选项，所有输入文件将被解释为未链接的二进制文件（十六进制编码）， LibraryName形式如前所述， 库此时被链接（从stdin读取输入，从stdout输出）。在这种情况下，除了&ndash;libraries,其他所有的选项都将被忽略（包括 -o)</p>
<h2 id="18564406af3bd57e6e3871eaf213593a" style="box-sizing: border-box; padding: 0px 0px 0.3em; margin: 5px 0px; font-family: Verdana, &quot;Lantinghei SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft Yahei&quot;, Helvetica, arial, 宋体, sans-serif; font-weight: 500; line-height: 1.225; color: rgb(51, 51, 51); font-size: 18px;">提示和技巧</h2>
<ul style="box-sizing: border-box; margin-right: 0px; margin-bottom: 10px; margin-left: 20px; font-size: 12px; font-family: Verdana, &quot;Lantinghei SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft Yahei&quot;, Helvetica, arial, 宋体, sans-serif; color: rgb(51, 51, 51);">
    <li style="box-sizing: border-box; padding: 0px; margin: 0px; font-size: 14px;">
    <p style="box-sizing: border-box; margin-bottom: 10px; color: rgb(102, 102, 102); line-height: 26px;">在数组中使用delete，就是删除数组中的所有元素。</p>
    </li>
    <li style="box-sizing: border-box; padding: 0px; margin: 0px; font-size: 14px;">
    <p style="box-sizing: border-box; margin-bottom: 10px; color: rgb(102, 102, 102); line-height: 26px;">使用较短的类型和结构元素，短类型分组在一起进行排序。sstore操作可能合并成一个单一的sstore，这可以降低gas的成本（sstore消耗5000或20000 gas，所以这是你必须优化的原因）。使用天gas的价格估算功能（优化器 enable）进行检查！</p>
    </li>
    <li style="box-sizing: border-box; padding: 0px; margin: 0px; font-size: 14px;">
    <p style="box-sizing: border-box; margin-bottom: 10px; color: rgb(102, 102, 102); line-height: 26px;">让你的状态变量公开，编译器会免费创建&nbsp;getters&nbsp;。</p>
    </li>
    <li style="box-sizing: border-box; padding: 0px; margin: 0px; font-size: 14px;">
    <p style="box-sizing: border-box; margin-bottom: 10px; color: rgb(102, 102, 102); line-height: 26px;">如果你结束了输入或状态的检查条件，请尝试使用函数修饰符。</p>
    </li>
    <li style="box-sizing: border-box; padding: 0px; margin: 0px; font-size: 14px;">
    <p style="box-sizing: border-box; margin-bottom: 10px; color: rgb(102, 102, 102); line-height: 26px;">如果你的合约有一个功能send， 但你想使用内置的send功能，请使用 address(contractVariable).send(amount)。</p>
    </li>
    <li style="box-sizing: border-box; padding: 0px; margin: 0px; font-size: 14px;">
    <p style="box-sizing: border-box; margin-bottom: 10px; color: rgb(102, 102, 102); line-height: 26px;">如果你不想你的合约通过send接收ether，您可以添加一个抛出回退函数 function() { throw; }.。</p>
    </li>
    <li style="box-sizing: border-box; padding: 0px; margin: 0px; font-size: 14px;">用单条赋值语句初始化存储结构：x = MyStruct({a: 1, b: 2});</li>
</ul>
<h2 id="02a0edc8cde6b62a4a62be69ea2d81e8" style="box-sizing: border-box; padding: 0px 0px 0.3em; margin: 5px 0px; font-family: Verdana, &quot;Lantinghei SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft Yahei&quot;, Helvetica, arial, 宋体, sans-serif; font-weight: 500; line-height: 1.225; color: rgb(51, 51, 51); font-size: 18px;">陷阱</h2>
<p style="box-sizing: border-box; margin-bottom: 10px; color: rgb(102, 102, 102); line-height: 26px; font-family: Verdana, &quot;Lantinghei SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft Yahei&quot;, Helvetica, arial, 宋体, sans-serif;">不幸的是，还有一些编译器微妙的情况还没有告诉你。</p>
<ul style="box-sizing: border-box; margin-right: 0px; margin-bottom: 10px; margin-left: 20px; font-size: 12px; font-family: Verdana, &quot;Lantinghei SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft Yahei&quot;, Helvetica, arial, 宋体, sans-serif; color: rgb(51, 51, 51);">
    <li style="box-sizing: border-box; padding: 0px; margin: 0px; font-size: 14px;">在for (var i = 0; i &lt; arrayName.length; i++) { ... },&nbsp; i的类型是uint8，因为这是存放值0最小的类型。如果数组元素超过255个，则循环将不会终止。</li>
</ul>
<h2 id="3712972d84adf48acbd6ad24b4d75ad0" style="box-sizing: border-box; padding: 0px 0px 0.3em; margin: 5px 0px; font-family: Verdana, &quot;Lantinghei SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft Yahei&quot;, Helvetica, arial, 宋体, sans-serif; font-weight: 500; line-height: 1.225; color: rgb(51, 51, 51); font-size: 18px;">列表</h2>
<div>&nbsp;</div>
<div>http://wiki.jikexueyuan.com/project/solidity-zh/miscellaneous.html</div>]]></description>
			<link>http://meisw.wdlinux.cn//show-1013-1.html</link>
			<category domain="http://meisw.wdlinux.cn//category-54-1.html">以太坊</category>
			<pubDate>2018-02-02 09:45</pubDate>
		</item>
		<item>
			<guid>http://meisw.wdlinux.cn//show-1012-1.html</guid>
			<title>以太坊的存储结构</title>
			<author>admin</author>
			<description><![CDATA[<p>&nbsp;<span style="background-color: rgb(254, 254, 242); font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px;">以太坊并不存在中心服务器，而是基于p2p协议连接起来的平等节点，在众多节点中存储了全部数据。当用户发起一笔交易，会通过广播通知每一个节点，矿工对此进行验证打包并进一步广播，在区块链确认以后，此操作即认为是不可更改的。</span></p>
<p style="margin: 10px auto; line-height: 1.5; font-size: 13px; font-family: Verdana, Arial, Helvetica, sans-serif; background-color: rgb(254, 254, 242);">在每个节点上，数据是以区块链来存储的。区块链由一个个块串起来而组成。以太坊被描述为一个交易驱动的状态机。它在某个状态下接收一些输入，会确定的转移到另一个状态。</p>
<blockquote style="margin: 10px 0px; padding: 5px 10px; background: none rgb(254, 254, 242); border: 2px solid rgb(239, 239, 239); line-height: 1.6em; color: rgb(51, 51, 51); font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px;">
<p style="margin: 10px auto; line-height: 1.5; color: rgb(0, 0, 0);">状态机，包含一组状态集（states）、一个起始状态（start state）、一组输入符号集（alphabet）、一个映射输入符号和当前状态到下一状态的转换函数（transition function）的计算模型。</p>
</blockquote>
<p style="margin: 10px auto; line-height: 1.5; font-size: 13px; font-family: Verdana, Arial, Helvetica, sans-serif; background-color: rgb(254, 254, 242);">在以太坊的一个状态下，每个账户都有确定的余额和状态信息，当他接收到新的交易以后就会进入一个新的状态，从创世块开始，不断的收到新的交易，由此能进入到一系列新的状态。</p>
<p style="margin: 10px auto; line-height: 1.5; font-size: 13px; font-family: Verdana, Arial, Helvetica, sans-serif; background-color: rgb(254, 254, 242);">以太坊每隔一段时间就会把一批交易信息打包存储到一个块里，这个块中包含的信息有：</p>
<ol style="margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 40px; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; background-color: rgb(254, 254, 242);">
    <li style="margin: 0px 0px 1em; padding: 0px; list-style: decimal;">ParentHash:父块的哈希值</li>
    <li style="margin: 0px 0px 1em; padding: 0px; list-style: decimal;">Number:块编号</li>
    <li style="margin: 0px 0px 1em; padding: 0px; list-style: decimal;">Timestamp:块产生的时间戳</li>
    <li style="margin: 0px 0px 1em; padding: 0px; list-style: decimal;">GasUsed:交易消耗的Gas</li>
    <li style="margin: 0px 0px 1em; padding: 0px; list-style: decimal;">GasLimit:Gas限制</li>
    <li style="margin: 0px 0px 1em; padding: 0px; list-style: decimal;">Difficulty:POW的难度值</li>
    <li style="margin: 0px 0px 1em; padding: 0px; list-style: decimal;">Beneficiary：块打包手续费的受益人，也称矿工</li>
    <li style="margin: 0px 0px 1em; padding: 0px; list-style: decimal;">Nonce：一个随机数，使得块头哈希满足POW需求</li>
</ol>
<p style="margin: 10px auto; line-height: 1.5; font-size: 13px; font-family: Verdana, Arial, Helvetica, sans-serif; background-color: rgb(254, 254, 242);">这些字段我们在上面的web3接口中都可以获取得到。</p>
<blockquote style="margin: 10px 0px; padding: 5px 10px; background: none rgb(254, 254, 242); border: 2px solid rgb(239, 239, 239); line-height: 1.6em; color: rgb(51, 51, 51); font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px;">
<p style="margin: 10px auto; line-height: 1.5; color: rgb(0, 0, 0);">nonce，整数类型，允许使用相同随机数覆盖自己发送的处于pending状态的交易。</p>
</blockquote>
<p style="margin: 10px auto; line-height: 1.5; font-size: 13px; font-family: Verdana, Arial, Helvetica, sans-serif; background-color: rgb(254, 254, 242);">为了防止交易的重播攻击，每笔交易必须有一个nonce随机数，针对每一个账户nonce都是从0开始，当nonce为0的交易处理完之后，才会处理nonce为1的交易，并依次加1的交易才会被处理。以下是nonce使用的几条规则：</p>
<ul style="margin-right: 0px; margin-bottom: 0px; margin-left: 30px; word-break: break-all; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; background-color: rgb(254, 254, 242);">
    <li style="margin: 0px 0px 1em; padding: 0px; list-style: disc;">当nonce太小，交易会被直接拒绝。</li>
    <li style="margin: 0px 0px 1em; padding: 0px; list-style: disc;">当nonce太大，交易会一直处于队列之中，这也就是导致我们上面描述的问题的原因；</li>
    <li style="margin: 0px 0px 1em; padding: 0px; list-style: disc;">当发送一个比较大的nonce值，然后补齐开始nonce到那个值之间的nonce，那么交易依旧可以被执行。</li>
    <li style="margin: 0px 0px 1em; padding: 0px; list-style: disc;">当交易处于queue中时停止geth客户端，那么交易queue中的交易会被清除掉。</li>
</ul>]]></description>
			<link>http://meisw.wdlinux.cn//show-1012-1.html</link>
			<category domain="http://meisw.wdlinux.cn//category-54-1.html">以太坊</category>
			<pubDate>2018-02-01 18:19</pubDate>
		</item>
		<item>
			<guid>http://meisw.wdlinux.cn//show-1010-1.html</guid>
			<title>以太坊客户端Geth命令用法-参数详解</title>
			<author>admin</author>
			<description><![CDATA[<h1 class="postTitle" style="margin: 10px 0px 0px; padding: 2px 5px 1px; font-size: 12px; font-weight: normal; background-color: rgb(216, 223, 234); font-family: verdana, &quot;ms song&quot;, 宋体, Arial, 微软雅黑, Helvetica, sans-serif;"><a id="cb_post_title_url" class="postTitle2" href="http://www.cnblogs.com/tinyxiong/p/7918706.html" style="margin: 0px; padding: 0px; color: rgb(51, 51, 51); text-decoration-line: none; font-size: 13px; font-weight: bold;">以太坊客户端Geth命令用法-参数详解</a></h1>
<div>&nbsp;</div>
<p>&nbsp;</p>
<div>https://www.cnblogs.com/tinyxiong/p/7918706.html</div>]]></description>
			<link>http://meisw.wdlinux.cn//show-1010-1.html</link>
			<category domain="http://meisw.wdlinux.cn//category-54-1.html">以太坊</category>
			<pubDate>2018-01-22 10:48</pubDate>
		</item>
		<item>
			<guid>http://meisw.wdlinux.cn//show-1009-1.html</guid>
			<title>以太坊开发框架truffle以及testrpc注意事项</title>
			<author>admin</author>
			<description><![CDATA[<p>&nbsp;<span style="font-weight: 700; color: rgb(51, 51, 51); font-family: PingFangSC, &quot;helvetica neue&quot;, &quot;hiragino sans gb&quot;, arial, &quot;microsoft yahei ui&quot;, &quot;microsoft yahei&quot;, simsun, sans-serif; font-size: 16px;">环境版本：</span></p>
<div style="box-sizing: border-box; margin: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: PingFangSC, &quot;helvetica neue&quot;, &quot;hiragino sans gb&quot;, arial, &quot;microsoft yahei ui&quot;, &quot;microsoft yahei&quot;, simsun, sans-serif; font-size: 16px;"><span style="box-sizing: border-box; font-weight: 700;">Truffle v3.4.9 (core: 3.4.8)</span></div>
<div style="box-sizing: border-box; margin: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: PingFangSC, &quot;helvetica neue&quot;, &quot;hiragino sans gb&quot;, arial, &quot;microsoft yahei ui&quot;, &quot;microsoft yahei&quot;, simsun, sans-serif; font-size: 16px;"><span style="box-sizing: border-box; font-weight: 700;">Solidity v0.4.15 (solc-js)</span></div>
<div style="box-sizing: border-box; margin: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: PingFangSC, &quot;helvetica neue&quot;, &quot;hiragino sans gb&quot;, arial, &quot;microsoft yahei ui&quot;, &quot;microsoft yahei&quot;, simsun, sans-serif; font-size: 16px;"><span style="box-sizing: border-box; font-weight: 700;">EthereumJS TestRPC v4.1.1 (ganache-core: 1.1.2)</span></div>
<div style="box-sizing: border-box; margin: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: PingFangSC, &quot;helvetica neue&quot;, &quot;hiragino sans gb&quot;, arial, &quot;microsoft yahei ui&quot;, &quot;microsoft yahei&quot;, simsun, sans-serif; font-size: 16px;">&nbsp;</div>
<div style="box-sizing: border-box; margin: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: PingFangSC, &quot;helvetica neue&quot;, &quot;hiragino sans gb&quot;, arial, &quot;microsoft yahei ui&quot;, &quot;microsoft yahei&quot;, simsun, sans-serif; font-size: 16px;"><font color="#cc0000" style="box-sizing: border-box;">问题：通过Truffle和TestRPC生成测试环境以后，无法通过IP地址访问环境，而只能在本机通过localhost访问</font></div>
<div style="box-sizing: border-box; margin: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: PingFangSC, &quot;helvetica neue&quot;, &quot;hiragino sans gb&quot;, arial, &quot;microsoft yahei ui&quot;, &quot;microsoft yahei&quot;, simsun, sans-serif; font-size: 16px;"><span style="box-sizing: border-box; font-weight: 700;">解决方案：修改testrpc和truffle环境的三个地方</span></div>
<div style="box-sizing: border-box; margin: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: PingFangSC, &quot;helvetica neue&quot;, &quot;hiragino sans gb&quot;, arial, &quot;microsoft yahei ui&quot;, &quot;microsoft yahei&quot;, simsun, sans-serif; font-size: 16px;"><span style="box-sizing: border-box; font-weight: 700;"><br style="box-sizing: border-box;" />
</span></div>
<div style="box-sizing: border-box; margin: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: PingFangSC, &quot;helvetica neue&quot;, &quot;hiragino sans gb&quot;, arial, &quot;microsoft yahei ui&quot;, &quot;microsoft yahei&quot;, simsun, sans-serif; font-size: 16px;">1.修改truffle生成的web框架文件里面的truffle.js文件</div>
<div style="box-sizing: border-box; margin: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: PingFangSC, &quot;helvetica neue&quot;, &quot;hiragino sans gb&quot;, arial, &quot;microsoft yahei ui&quot;, &quot;microsoft yahei&quot;, simsun, sans-serif; font-size: 16px;"><img src="https://yqfile.alicdn.com/a96921164cd81032b7e497aa66e24e992f79c652.png" width="300" alt="a96921164cd81032b7e497aa66e24e992f79c652" style="box-sizing: border-box; border: 0px; vertical-align: middle; max-width: 100%; cursor: pointer;" /></div>
<div style="box-sizing: border-box; margin: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: PingFangSC, &quot;helvetica neue&quot;, &quot;hiragino sans gb&quot;, arial, &quot;microsoft yahei ui&quot;, &quot;microsoft yahei&quot;, simsun, sans-serif; font-size: 16px;">2.使用###&gt;testrpc -h 0.0.0.0命令启动testrpc</div>
<div style="box-sizing: border-box; margin: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: PingFangSC, &quot;helvetica neue&quot;, &quot;hiragino sans gb&quot;, arial, &quot;microsoft yahei ui&quot;, &quot;microsoft yahei&quot;, simsun, sans-serif; font-size: 16px;">3.修改truffle文件的webpack.config.js文件</div>
<div style="box-sizing: border-box; margin: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: PingFangSC, &quot;helvetica neue&quot;, &quot;hiragino sans gb&quot;, arial, &quot;microsoft yahei ui&quot;, &quot;microsoft yahei&quot;, simsun, sans-serif; font-size: 16px;"><img src="https://yqfile.alicdn.com/c4a8a7a490ac82b3a6dac99d9ce6e1ca475b8f9f.png" width="300" alt="c4a8a7a490ac82b3a6dac99d9ce6e1ca475b8f9f" style="box-sizing: border-box; border: 0px; vertical-align: middle; max-width: 100%; cursor: pointer;" /></div>
<div style="box-sizing: border-box; margin: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: PingFangSC, &quot;helvetica neue&quot;, &quot;hiragino sans gb&quot;, arial, &quot;microsoft yahei ui&quot;, &quot;microsoft yahei&quot;, simsun, sans-serif; font-size: 16px;">具体全部命令</div>
<div style="box-sizing: border-box; margin: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: PingFangSC, &quot;helvetica neue&quot;, &quot;hiragino sans gb&quot;, arial, &quot;microsoft yahei ui&quot;, &quot;microsoft yahei&quot;, simsun, sans-serif; font-size: 16px;">
<p style="box-sizing: border-box; margin: 0pt 0pt 0pt 33.8pt; padding: 0pt 0pt 0pt 7pt; text-indent: -18pt; border-left: 2.25pt solid rgb(153, 153, 153); line-height: 13.5pt; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span style="box-sizing: border-box; font-family: 宋体; letter-spacing: 0pt; font-size: 12pt;">1.&nbsp;</span><span style="box-sizing: border-box; font-family: 宋体; letter-spacing: 0pt; font-size: 9pt;">&gt;</span><span style="box-sizing: border-box; font-family: Consolas; letter-spacing: 0pt; font-size: 9pt;">mkdir&nbsp;myproject&nbsp;&nbsp;</span></p>
<p style="box-sizing: border-box; margin: 0pt 0pt 0pt 33.8pt; padding: 0pt 0pt 0pt 7pt; text-indent: -18pt; border-left: 2.25pt solid rgb(153, 153, 153); line-height: 13.5pt; background: rgb(248, 248, 248);"><span style="box-sizing: border-box; font-family: 宋体; letter-spacing: 0pt; font-size: 12pt;">2.&nbsp;</span><span style="box-sizing: border-box; font-family: 宋体; letter-spacing: 0pt; font-size: 9pt;">&gt;</span><span style="box-sizing: border-box; font-family: Consolas; letter-spacing: 0pt; font-size: 9pt;">cd&nbsp;myproject&nbsp;&nbsp;</span></p>
<p style="box-sizing: border-box; margin: 0pt 0pt 0pt 33.8pt; padding: 0pt 0pt 0pt 7pt; text-indent: -18pt; border-left: 2.25pt solid rgb(153, 153, 153); line-height: 13.5pt; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span style="box-sizing: border-box; font-family: 宋体; letter-spacing: 0pt; font-size: 12pt;">3.&nbsp;</span><span style="box-sizing: border-box; font-family: 宋体; letter-spacing: 0pt; font-size: 9pt;">&gt;</span><span style="box-sizing: border-box; font-family: Consolas; letter-spacing: 0pt; font-size: 9pt;">truffle&nbsp;init&nbsp;webpack</span></p>
<p style="box-sizing: border-box; margin: 0pt 0pt 0pt 33.8pt; padding: 0pt 0pt 0pt 7pt; text-indent: -18pt; border-left: 2.25pt solid rgb(153, 153, 153); line-height: 13.5pt; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span style="box-sizing: border-box; font-family: Consolas; letter-spacing: 0pt; font-size: 9pt;"><br style="box-sizing: border-box;" />
</span></p>
<p style="box-sizing: border-box; margin: 0pt 0pt 0pt 33.8pt; padding: 0pt 0pt 0pt 7pt; text-indent: -18pt; border-left: 2.25pt solid rgb(153, 153, 153); line-height: 13.5pt; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><font style="box-sizing: border-box;"><span style="box-sizing: border-box; font-size: 12px;">修改完成，需要重新编译</span></font></p>
<p style="box-sizing: border-box; margin: 0pt 0pt 0pt 33.8pt; padding: 0pt 0pt 0pt 7pt; text-indent: -18pt; border-left: 2.25pt solid rgb(153, 153, 153); line-height: 13.5pt; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><font style="box-sizing: border-box;"><span style="box-sizing: border-box; font-size: 12px;">&nbsp; &nbsp; &nbsp;&gt;truffle compile -all</span></font></p>
<p style="box-sizing: border-box; margin: 0pt 0pt 0pt 33.8pt; padding: 0pt 0pt 0pt 7pt; text-indent: -18pt; border-left: 2.25pt solid rgb(153, 153, 153); line-height: 13.5pt; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span style="box-sizing: border-box; font-family: Consolas; letter-spacing: 0pt; font-size: 9pt;">4. &nbsp; &gt;truffle migrate</span></p>
<p style="box-sizing: border-box; margin: 0pt 0pt 0pt 33.8pt; padding: 0pt 0pt 0pt 7pt; text-indent: -18pt; border-left: 2.25pt solid rgb(153, 153, 153); line-height: 13.5pt; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span style="box-sizing: border-box; font-family: Consolas; letter-spacing: 0pt; font-size: 9pt;">5. &nbsp; &gt;testrpc -h 0.0.0.0（请在另一个终端下运行这个命令）</span></p>
<p data-spm-anchor-id="a2c4e.11153940.blogcont194002.i2.2ea02b6dXxirR0" style="box-sizing: border-box; margin: 0pt 0pt 0pt 33.8pt; padding: 0pt 0pt 0pt 7pt; text-indent: -18pt; border-left: 2.25pt solid rgb(153, 153, 153); line-height: 13.5pt; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><span style="box-sizing: border-box; font-family: Consolas; letter-spacing: 0pt; font-size: 9pt;">6. &nbsp; &gt;npm run dev</span></p>
</div>]]></description>
			<link>http://meisw.wdlinux.cn//show-1009-1.html</link>
			<category domain="http://meisw.wdlinux.cn//category-54-1.html">以太坊</category>
			<pubDate>2018-01-19 15:52</pubDate>
		</item>
		<item>
			<guid>http://meisw.wdlinux.cn//show-1008-1.html</guid>
			<title>来自ETH源码，手动生成以太坊钱包，ERC20标准钱包</title>
			<author>admin</author>
			<description><![CDATA[<p>&nbsp;<strong style="color: rgb(63, 63, 63); font-family: &quot;microsoft yahei&quot;; font-size: 16px; box-sizing: border-box;">安装完成后用node自带的npm（node package manger）下载两个依赖： 椭圆加密算法包，keccak哈希包</strong></p>
<blockquote style="box-sizing: border-box; padding: 15px 20px; margin: 0px 0px 16px; border-left: 10px solid rgba(128, 128, 128, 0.075); line-height: 16px; background-color: rgba(128, 128, 128, 0.05); border-radius: 0px 5px 5px 0px; color: rgb(63, 63, 63); font-family: &quot;microsoft yahei&quot;; font-size: 16px;">
<p style="box-sizing: border-box; margin-bottom: 0px; font-size: 1em; line-height: 28px; color: rgb(111, 111, 111); word-wrap: break-word; word-break: normal;">npm install secp256k1&nbsp;<br style="box-sizing: border-box;" />
npm install keccak</p>
</blockquote>
<p style="box-sizing: border-box; margin-bottom: 16px; line-height: 28px; word-wrap: break-word; word-break: normal; color: rgb(63, 63, 63); font-family: &quot;microsoft yahei&quot;; font-size: 16px;"><strong style="box-sizing: border-box;">进入node交互界面</strong></p>
<blockquote style="box-sizing: border-box; padding: 15px 20px; margin: 0px 0px 16px; border-left: 10px solid rgba(128, 128, 128, 0.075); line-height: 16px; background-color: rgba(128, 128, 128, 0.05); border-radius: 0px 5px 5px 0px; color: rgb(63, 63, 63); font-family: &quot;microsoft yahei&quot;; font-size: 16px;">
<p style="box-sizing: border-box; margin-bottom: 0px; font-size: 1em; line-height: 28px; color: rgb(111, 111, 111); word-wrap: break-word; word-break: normal;">node</p>
</blockquote>
<p style="box-sizing: border-box; margin-bottom: 16px; line-height: 28px; word-wrap: break-word; word-break: normal; color: rgb(63, 63, 63); font-family: &quot;microsoft yahei&quot;; font-size: 16px;"><strong style="box-sizing: border-box;">执行node脚本</strong></p>
<pre class="prettyprint" style="box-sizing: border-box; font-family: &quot;Source Code Pro&quot;, monospace; white-space: nowrap; padding: 5px 5px 5px 60px; margin-top: 0px; margin-bottom: 16px; line-height: 16px; color: rgb(51, 51, 51); word-break: break-all; word-wrap: break-word; background-color: rgba(128, 128, 128, 0.05); border: 1px solid rgba(128, 128, 128, 0.075); border-radius: 0px; position: relative; overflow-y: hidden; overflow-x: auto;"><code class="language-node hljs javascript has-numbering" style="box-sizing: border-box; font-family: &quot;Source Code Pro&quot;, monospace; font-size: 12.6px; padding: 0px; color: inherit; white-space: pre; background: transparent; border-radius: 0px; display: block; overflow-x: auto; word-wrap: normal;"> <span class="hljs-comment" style="box-sizing: border-box; margin: 0px; padding: 0px; color: rgb(136, 0, 0);">//引入包</span>  <span class="hljs-keyword" style="box-sizing: border-box; margin: 0px; padding: 0px; color: rgb(0, 0, 136);">const</span> secp256k1 = <span class="hljs-built_in" style="box-sizing: border-box; margin: 0px; padding: 0px; color: rgb(102, 0, 102);">require</span>(<span class="hljs-string" style="box-sizing: border-box; margin: 0px; padding: 0px; color: rgb(0, 136, 0);">&quot;secp256k1/elliptic&quot;</span>)  <span class="hljs-keyword" style="box-sizing: border-box; margin: 0px; padding: 0px; color: rgb(0, 0, 136);">const</span> createKeccakHash =  <span class="hljs-built_in" style="box-sizing: border-box; margin: 0px; padding: 0px; color: rgb(102, 0, 102);">require</span>(<span class="hljs-string" style="box-sizing: border-box; margin: 0px; padding: 0px; color: rgb(0, 136, 0);">&quot;keccak&quot;</span>)  <span class="hljs-keyword" style="box-sizing: border-box; margin: 0px; padding: 0px; color: rgb(0, 0, 136);">const</span> crypto = <span class="hljs-built_in" style="box-sizing: border-box; margin: 0px; padding: 0px; color: rgb(102, 0, 102);">require</span>(<span class="hljs-string" style="box-sizing: border-box; margin: 0px; padding: 0px; color: rgb(0, 136, 0);">'crypto'</span>)   <span class="hljs-comment" style="box-sizing: border-box; margin: 0px; padding: 0px; color: rgb(136, 0, 0);">// 生成私钥</span>  <span class="hljs-keyword" style="box-sizing: border-box; margin: 0px; padding: 0px; color: rgb(0, 0, 136);">const</span> privateKey = crypto.randomBytes(<span class="hljs-number" style="box-sizing: border-box; margin: 0px; padding: 0px; color: rgb(0, 102, 102);">32</span>)  <span class="hljs-comment" style="box-sizing: border-box; margin: 0px; padding: 0px; color: rgb(136, 0, 0);">// 生成公钥</span>  <span class="hljs-keyword" style="box-sizing: border-box; margin: 0px; padding: 0px; color: rgb(0, 0, 136);">const</span> publicKey = secp256k1.publicKeyCreate(privateKey, <span class="hljs-literal" style="box-sizing: border-box; margin: 0px; padding: 0px; color: rgb(0, 102, 102);">false</span>).slice(<span class="hljs-number" style="box-sizing: border-box; margin: 0px; padding: 0px; color: rgb(0, 102, 102);">1</span>)  <span class="hljs-comment" style="box-sizing: border-box; margin: 0px; padding: 0px; color: rgb(136, 0, 0);">// 生成地址</span>  <span class="hljs-keyword" style="box-sizing: border-box; margin: 0px; padding: 0px; color: rgb(0, 0, 136);">const</span> address = createKeccakHash(<span class="hljs-string" style="box-sizing: border-box; margin: 0px; padding: 0px; color: rgb(0, 136, 0);">&quot;keccak256&quot;</span>).update(publicKey).digest().slice(-<span class="hljs-number" style="box-sizing: border-box; margin: 0px; padding: 0px; color: rgb(0, 102, 102);">20</span>)   <span class="hljs-comment" style="box-sizing: border-box; margin: 0px; padding: 0px; color: rgb(136, 0, 0);">// 查看结果</span>  privateKey.toString(<span class="hljs-string" style="box-sizing: border-box; margin: 0px; padding: 0px; color: rgb(0, 136, 0);">'hex'</span>)  address.toString(<span class="hljs-string" style="box-sizing: border-box; margin: 0px; padding: 0px; color: rgb(0, 136, 0);">'hex'</span>)</code><ul class="pre-numbering" style="box-sizing: border-box; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 6px; padding-bottom: 40px; list-style: none; line-height: 23.8px; position: absolute; width: 50px; background-color: rgb(238, 238, 238); top: 0px; left: 0px; border-right: 1px solid rgb(221, 221, 221); text-align: right;"><li style="box-sizing: border-box; margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);">1</li><li style="box-sizing: border-box; margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);">2</li><li style="box-sizing: border-box; margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);">3</li><li style="box-sizing: border-box; margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);">4</li><li style="box-sizing: border-box; margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);">5</li><li style="box-sizing: border-box; margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);">6</li><li style="box-sizing: border-box; margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);">7</li><li style="box-sizing: border-box; margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);">8</li><li style="box-sizing: border-box; margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);">9</li><li style="box-sizing: border-box; margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);">10</li><li style="box-sizing: border-box; margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);">11</li><li style="box-sizing: border-box; margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);">12</li><li style="box-sizing: border-box; margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);">13</li><li style="box-sizing: border-box; margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);">14</li><li style="box-sizing: border-box; margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);">15</li></ul></pre>
<p style="box-sizing: border-box; margin-bottom: 16px; line-height: 28px; word-wrap: break-word; word-break: normal; color: rgb(63, 63, 63); font-family: &quot;microsoft yahei&quot;; font-size: 16px;"><strong style="box-sizing: border-box;">以上代码在 Imtoken钱包 导入成功， 并能够正常使用，即 核对导入后的钱包address与 脚本生成的address一致</strong></p>]]></description>
			<link>http://meisw.wdlinux.cn//show-1008-1.html</link>
			<category domain="http://meisw.wdlinux.cn//category-54-1.html">以太坊</category>
			<pubDate>2018-01-18 00:45</pubDate>
		</item>
		<item>
			<guid>http://meisw.wdlinux.cn//show-1007-1.html</guid>
			<title>ERC20 Token标准接口</title>
			<author>admin</author>
			<description><![CDATA[<p>下是一个接口合同，声明所需的功能和事件以符合ERC20标准：</p>
<p>&nbsp;</p>
<p>// https://github.com/ethereum/EIPs/issues/20</p>
<p>&nbsp; contract ERC20 {</p>
<p>&nbsp; &nbsp; &nbsp; function totalSupply() constant returns (uint totalSupply);</p>
<p>&nbsp; &nbsp; &nbsp; function balanceOf(address _owner) constant returns (uint balance);</p>
<p>&nbsp; &nbsp; &nbsp; function transfer(address _to, uint _value) returns (bool success);</p>
<p>&nbsp; &nbsp; &nbsp; function transferFrom(address _from, address _to, uint _value) returns (bool success);</p>
<p>&nbsp; &nbsp; &nbsp; function approve(address _spender, uint _value) returns (bool success);</p>
<p>&nbsp; &nbsp; &nbsp; function allowance(address _owner, address _spender) constant returns (uint remaining);</p>
<p>&nbsp; &nbsp; &nbsp; event Transfer(address indexed _from, address indexed _to, uint _value);</p>
<p>&nbsp; &nbsp; &nbsp; event Approval(address indexed _owner, address indexed _spender, uint _value);</p>
<p>&nbsp; &nbsp; }</p>
<p>大部分Ethereum主要标记符合ERC20标准。</p>
<p>&nbsp;</p>
<p>一些令牌包括描述令牌合同的进一步信息：</p>
<p>&nbsp;</p>
<p>string public constant name = &quot;Token Name&quot;;</p>
<p>string public constant symbol = &quot;SYM&quot;;</p>
<p>uint8 public constant decimals = 18;&nbsp; // 大部分都是18</p>
<p>如何工作？</p>
<p>&nbsp;</p>
<p>以下是令牌合约的一个片段，用于演示令牌合约如何维护Ethereum帐户的令牌余额</p>
<p>&nbsp;</p>
<p>contract TokenContractFragment {</p>
<p>&nbsp;</p>
<p>&nbsp; &nbsp; &nbsp;// Balances 保存地址的余额</p>
<p>&nbsp; &nbsp; &nbsp;mapping(address =&gt; uint256) balances;</p>
<p>&nbsp;</p>
<p>&nbsp; &nbsp; &nbsp;// 帐户的所有者批准将金额转入另一个帐户</p>
<p>&nbsp; &nbsp; &nbsp;mapping(address =&gt; mapping (address =&gt; uint256)) allowed;</p>
<p>&nbsp;</p>
<p>&nbsp; &nbsp; &nbsp; // 特定帐户的余额是多少？</p>
<p>&nbsp; &nbsp; &nbsp; function balanceOf(address _owner) constant returns (uint256 balance) {</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return balances[_owner]; //从数组中取值</p>
<p>&nbsp; &nbsp; &nbsp; }</p>
<p>&nbsp;</p>
<p>&nbsp; &nbsp; &nbsp; // 将余额从所有者帐户转移到另一个帐户</p>
<p>&nbsp; &nbsp; &nbsp; function transfer(address _to, uint256 _amount) returns (bool success) {</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //判断条件 发送者余额&gt;=要发送的值&nbsp; 发送的值&gt;0&nbsp; 接收者余额+发送的值&gt;接收者的余额</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (balances[msg.sender] &gt;= _amount&nbsp;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &amp;&amp; _amount &gt; 0</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &amp;&amp; balances[_to] + _amount &gt; balances[_to]) {</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; balances[msg.sender] -= _amount;&nbsp; &nbsp;//发送者的余额减少</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; balances[_to] += _amount;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//接收者的余额增加</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return true;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;} else {</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return false;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</p>
<p>&nbsp; &nbsp; &nbsp; }</p>
<p>&nbsp;</p>
<p>&nbsp; &nbsp; &nbsp; // 发送 _value 数量的token从地址 _from 到 地址 _to</p>
<p>&nbsp; &nbsp; &nbsp; // transferFrom方法用于提取工作流程，允许合同以您的名义发送令牌，例如&ldquo;存入&rdquo;到合同地址和/或以子货币收取费用; 该命令应该失败，除非_from帐户通过某种机制故意地授权消息的发送者; 我们提出这些标准化的API来批准：</p>
<p>&nbsp; &nbsp; &nbsp; function transferFrom(</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; address _from,</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; address _to,</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; uint256 _amount</p>
<p>&nbsp; &nbsp; &nbsp;) returns (bool success) {</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //和上面一样的校验规则</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (balances[_from] &gt;= _amount</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &amp;&amp; allowed[_from][msg.sender] &gt;= _amount</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &amp;&amp; _amount &gt; 0</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &amp;&amp; balances[_to] + _amount &gt; balances[_to]) {</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; balances[_from] -= _amount;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; allowed[_from][msg.sender] -= _amount; //减少发送者的批准量</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; balances[_to] += _amount;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return true;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;} else {</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return false;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</p>
<p>&nbsp; &nbsp; &nbsp; }</p>
<p>&nbsp;</p>
<p>&nbsp; &nbsp; &nbsp; // 允许_spender多次退出您的帐户，直到_value金额。 如果再次调用此函数，它将以_value覆盖当前的余量。</p>
<p>&nbsp; &nbsp; &nbsp; function approve(address _spender, uint256 _amount) returns (bool success) {</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; allowed[msg.sender][_spender] = _amount; //覆盖当前余量</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return true;</p>
<p>&nbsp; &nbsp; &nbsp; }</p>
<p>&nbsp; }</p>
<p>&nbsp;</p>
<p>http://blog.csdn.net/diandianxiyu_geek/article/details/78082551?utm_source=gold_browser_extension</p>]]></description>
			<link>http://meisw.wdlinux.cn//show-1007-1.html</link>
			<category domain="http://meisw.wdlinux.cn//category-54-1.html">以太坊</category>
			<pubDate>2018-01-09 22:21</pubDate>
		</item>
		<item>
			<guid>http://meisw.wdlinux.cn//show-1003-1.html</guid>
			<title>如何分叉以太坊并变成私链？</title>
			<author>admin</author>
			<description><![CDATA[<p>&nbsp;http://blog.csdn.net/fidelhl/article/details/50654813</p>
<p>&nbsp;</p>
<p>http://blog.csdn.net/yooliee/article/details/72818932</p>
<p>&nbsp;</p>
<p>http://www.jianshu.com/p/c53ede8fab36</p>]]></description>
			<link>http://meisw.wdlinux.cn//show-1003-1.html</link>
			<category domain="http://meisw.wdlinux.cn//category-54-1.html">以太坊</category>
			<pubDate>2017-12-13 20:32</pubDate>
		</item>
		<item>
			<guid>http://meisw.wdlinux.cn//show-1001-1.html</guid>
			<title>教练，我“只”想学`solidity`</title>
			<author>admin</author>
			<description><![CDATA[<h1 class="post-title" style="margin: 0px 0px 0.5em; padding: 0px; border: 0px; font-variant-numeric: inherit; font-weight: lighter; font-stretch: inherit; line-height: 1.2em; font-family: ff-tisa-web-pro-1, ff-tisa-web-pro-2, &quot;Lucida Grande&quot;, &quot;Hiragino Sans GB&quot;, &quot;Hiragino Sans GB W3&quot;, &quot;Microsoft YaHei&quot;, &quot;WenQuanYi Micro Hei&quot;, sans-serif; vertical-align: baseline; color: rgb(51, 51, 51); -webkit-font-smoothing: antialiased; letter-spacing: 0.05em;">教练，我&ldquo;只&rdquo;想学`solidity`</h1>
<p>&nbsp;</p>
<div>http://liyuechun.org/2017/09/03/solidity-MetaMask/</div>
<div>&nbsp;</div>]]></description>
			<link>http://meisw.wdlinux.cn//show-1001-1.html</link>
			<category domain="http://meisw.wdlinux.cn//category-54-1.html">以太坊</category>
			<pubDate>2017-12-11 15:20</pubDate>
		</item>
		<item>
			<guid>http://meisw.wdlinux.cn//show-918-1.html</guid>
			<title>智能合约初体验</title>
			<author>admin</author>
			<description><![CDATA[<p>&nbsp;</p>
<h1 style="margin: 10px 0px; padding: 0px; font-size: 28px; line-height: 1.5; font-family: Helvetica, Verdana, Arial, sans-serif;">什么是智能合约</h1>
<p style="margin: 10px auto; font-family: Helvetica, Verdana, Arial, sans-serif; line-height: 22.4px;">&nbsp;&nbsp;&nbsp; 智能合约是代码和数据的集合，寄存与Blockchain的具体的地址。智能合约更想是在Blockchain中的一个<span style="margin: 0px; padding: 0px; color: rgb(255, 0, 0);">自动化的代理(或者说是机器人or NPC)</span>，智能合约有自己的账户，在时间或事件的驱动下能自动执行一些功能，如可以在相互之间传递信息，修改区块链的状态(账户信息等)，以及图灵完备计算(可以用图灵机做到的所有事情，通俗来说就是一般编程语言可以做的所有事情)。以太坊的智能合约是以太坊特定的字节码，被叫做EVM字节码。</p>
<h2 style="margin: 10px 0px; padding: 0px; font-size: 21px; line-height: 1.5; font-family: Helvetica, Verdana, Arial, sans-serif;">智能合约高级语言</h2>
<p style="margin: 10px auto; font-family: Helvetica, Verdana, Arial, sans-serif; line-height: 22.4px;">&nbsp;&nbsp;&nbsp; 用户不可能直接编写EVM字节码，所以以太坊提供了几种编写智能合约的高级语言。</p>
<p style="margin: 10px auto; font-family: Helvetica, Verdana, Arial, sans-serif; line-height: 22.4px;">&nbsp;&nbsp;&nbsp; Solidity：类JavaScript，这是以太坊推荐的旗舰语言，也是最流行的智能合约语言。具体用法参加<a href="http://solidity.readthedocs.io/en/latest/" style="margin: 0px; padding: 0px; color: rgb(0, 0, 0);">Solidity文档</a>。</p>
<p style="margin: 10px auto; font-family: Helvetica, Verdana, Arial, sans-serif; line-height: 22.4px;">&nbsp;&nbsp;&nbsp; Serpent：类Python</p>
<p style="margin: 10px auto; font-family: Helvetica, Verdana, Arial, sans-serif; line-height: 22.4px;">&nbsp;&nbsp;&nbsp; LLL：类Lisp</p>
<p style="margin: 10px auto; font-family: Helvetica, Verdana, Arial, sans-serif; line-height: 22.4px;">&nbsp;&nbsp;&nbsp; 可以根据不同的习惯选择不同的高级语言。这里选用最流行的Solidity</p>
<h2 style="margin: 10px 0px; padding: 0px; font-size: 21px; line-height: 1.5; font-family: Helvetica, Verdana, Arial, sans-serif;">相关概念</h2>
<p style="margin: 10px auto; font-family: Helvetica, Verdana, Arial, sans-serif; line-height: 22.4px;">&nbsp;&nbsp;&nbsp; 以下的概念是智能合约可能用到的，这里不做详细介绍，想了解的可以参考&nbsp;<a href="http://ethfans.org/posts/101-noob-intro" style="margin: 0px; padding: 0px; color: rgb(0, 0, 0);">智能合约菜鸟教程</a></p>
<p style="margin: 10px auto; font-family: Helvetica, Verdana, Arial, sans-serif; line-height: 22.4px;"><strong style="margin: 0px; padding: 0px;">&nbsp;&nbsp;&nbsp; 公钥加密系统：</strong></p>
<p style="margin: 10px auto; font-family: Helvetica, Verdana, Arial, sans-serif; line-height: 22.4px;"><strong style="margin: 0px; padding: 0px;">&nbsp;&nbsp;&nbsp; 点对点网络：</strong></p>
<p style="margin: 10px auto; font-family: Helvetica, Verdana, Arial, sans-serif; line-height: 22.4px;"><strong style="margin: 0px; padding: 0px;">&nbsp;&nbsp;&nbsp; 区块链：</strong>区块链可以看做是智能合约的基础设施</p>
<p style="margin: 10px auto; font-family: Helvetica, Verdana, Arial, sans-serif; line-height: 22.4px;"><strong style="margin: 0px; padding: 0px;">&nbsp;&nbsp;&nbsp; 以太坊虚拟机：</strong>解释执行智能合约字节码的东西，功能类似于Java虚拟机</p>
<p style="margin: 10px auto; font-family: Helvetica, Verdana, Arial, sans-serif; line-height: 22.4px;">&nbsp;&nbsp;&nbsp;&nbsp;<strong style="margin: 0px; padding: 0px;">节点：</strong></p>
<p style="margin: 10px auto; font-family: Helvetica, Verdana, Arial, sans-serif; line-height: 22.4px;"><strong style="margin: 0px; padding: 0px;">&nbsp;&nbsp;&nbsp; 矿工：</strong>区块链中参与处理区块的节点叫做矿工。当前以太坊活跃的矿工：<a href="https://ethstats.net/" style="margin: 0px; padding: 0px; color: rgb(0, 0, 0);">https://ethstats.net/</a></p>
<p style="margin: 10px auto; font-family: Helvetica, Verdana, Arial, sans-serif; line-height: 22.4px;">&nbsp;&nbsp;&nbsp;&nbsp;<strong style="margin: 0px; padding: 0px;">工作量证明：</strong>矿工们总是在竞争解决一些数学问题。第一个解出答案的(算出下一个区块)将获得以太币作为奖励。然后所有节点都更新自己的区块链。所有想要算出下一个区块的矿工都有与其他节点保持同步，并且维护同一个区块链的动力，因此整个网络总是能达成共识。</p>
<p style="margin: 10px auto; font-family: Helvetica, Verdana, Arial, sans-serif; line-height: 22.4px;">&nbsp;&nbsp;&nbsp;&nbsp;<strong style="margin: 0px; padding: 0px;">以太币：</strong>ETH，以太坊中的虚拟货币，可以购买和使用，也可以与真实货币交易。<a href="https://poloniex.com/exchange#usdt_eth" style="margin: 0px; padding: 0px; color: rgb(0, 0, 0);">以太币的走势图</a></p>
<p style="margin: 10px auto; font-family: Helvetica, Verdana, Arial, sans-serif; line-height: 22.4px;">&nbsp;&nbsp;&nbsp;&nbsp;<strong style="margin: 0px; padding: 0px;">Gas：</strong>相当于手续费。在以太坊执行程序以保存数据都要消耗一定量的以太币。这个机制可以控制区块链中计算的数量，保证效率。</p>
<h2 style="margin: 10px 0px; padding: 0px; font-size: 21px; line-height: 1.5; font-family: Helvetica, Verdana, Arial, sans-serif;">智能合约与DApp</h2>
<p style="margin: 10px auto; font-family: Helvetica, Verdana, Arial, sans-serif; line-height: 22.4px;">&nbsp;&nbsp;&nbsp; 以太坊社区把基于智能合约的应用称为去中心化的应用程序(Decentralized App)。DApp的目标是(或者应该是)让你的智能合约有一个友好的界面，外加一些额外的东西，例如IPFS（可以存储和读取数据的去中心化网络，不是出自以太坊团队但有类似的精神)。DApp可以跑在一台能与以太坊节点交互的中心化服务器上，也可以跑在任意一个以太坊平等节点上。(花一分钟思考一下：与一般的网站不同，DApp不能跑在普通的服务器上。他们需要提交交易到<strong style="margin: 0px; padding: 0px;">区块链</strong>并且从<strong style="margin: 0px; padding: 0px;">区块链</strong>而不是中心化数据库读取<strong style="margin: 0px; padding: 0px;">重要</strong>数据。相对于典型的用户登录系统，用户有可能被表示成一个钱包地址而其它用户数据保存在本地。许多事情都会与目前的web应用有不同架构。)</p>
<p style="margin: 10px auto; font-family: Helvetica, Verdana, Arial, sans-serif; line-height: 22.4px;">&nbsp;&nbsp;&nbsp; DApp流程：</p>
<ol style="margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 40px; font-family: Helvetica, Verdana, Arial, sans-serif; line-height: 22.4px;">
    <li style="margin: 0px 0px 1em; padding: 0px; list-style: decimal;">用Solidity(或其他语言)编写智能合约(后缀为.sol)</li>
    <li style="margin: 0px 0px 1em; padding: 0px; list-style: decimal;">用solc编译器将.sol合约编译成EVM字节码</li>
    <li style="margin: 0px 0px 1em; padding: 0px; list-style: decimal;">编译好的字节码回送给dapp前端</li>
    <li style="margin: 0px 0px 1em; padding: 0px; list-style: decimal;">前端将编译好的智能合约部署到区块链中</li>
    <li style="margin: 0px 0px 1em; padding: 0px; list-style: decimal;">区块链返回智能合约地址+ABI(合约接口的二进制表示。合约接口用JSON表示，包括变量，事件和可以调用的方法)</li>
    <li style="margin: 0px 0px 1em; padding: 0px; list-style: decimal;">前端通过Address+ABI+nonce，调用智能合约。智能合约开始处理。</li>
</ol>
<p style="margin: 10px auto; font-family: Helvetica, Verdana, Arial, sans-serif; line-height: 22.4px;"><iframe id="iframe_0.15957884583622217" src="data:text/html;charset=utf8,%3Cimg%20id=%22img%22%20src=%22http://ethfans.org/uploads/photo/2015/1fc96327c8a1d60c8dc16f8ec1a2fe5d.png?_=5629468%22%20style=%22border:none;max-width:733px%22%3E%3Cscript%3Ewindow.onload%20=%20function%20()%20%7Bvar%20img%20=%20document.getElementById('img');%20window.parent.postMessage(%7BiframeId:'iframe_0.15957884583622217',width:img.width,height:img.height%7D,%20'http://www.cnblogs.com');%7D%3C/script%3E" frameborder="0" scrolling="no" style="margin: 0px; padding: 0px; border-style: none; border-width: initial; width: 733px; height: 528px;"></iframe></p>
<p style="margin: 10px auto; font-family: Helvetica, Verdana, Arial, sans-serif; line-height: 22.4px;">&nbsp;</p>
<h1 style="margin: 10px 0px; padding: 0px; font-size: 28px; line-height: 1.5; font-family: Helvetica, Verdana, Arial, sans-serif;">智能合约编译器</h1>
<p style="margin: 10px auto; font-family: Helvetica, Verdana, Arial, sans-serif; line-height: 22.4px;">&nbsp;&nbsp;&nbsp; Solidity智能合约可以通过多种方式进行编译</p>
<ul style="margin-right: 0px; margin-bottom: 0px; margin-left: 30px; font-family: Helvetica, Verdana, Arial, sans-serif; line-height: 22.4px;">
    <li style="margin: 0px 0px 1em; padding: 0px; list-style: disc;">通过在线Solidity实时编译器来编译。<a href="https://ethereum.github.io/browser-solidity/" style="margin: 0px; padding: 0px; color: rgb(0, 0, 0);">online Solidity realtime compiler</a></li>
    <li style="margin: 0px 0px 1em; padding: 0px; list-style: disc;">安装solc编译器编译</li>
    <li style="margin: 0px 0px 1em; padding: 0px; list-style: disc;">在客户端javascript console中，通过web3.eth.compile.solidity编译。不过这个需要环境中安装solc编译器。</li>
    <li style="margin: 0px 0px 1em; padding: 0px; list-style: disc;">The&nbsp;<a href="https://github.com/SilentCicero/meteor-dapp-cosmo" style="margin: 0px; padding: 0px; color: rgb(0, 0, 0);">Meteor dapp Cosmo for building solidity contracts</a></li>
    <li style="margin: 0px 0px 1em; padding: 0px; list-style: disc;">The&nbsp;<a href="https://github.com/ethereum/wiki/wiki/Mix:-The-DApp-IDE" style="margin: 0px; padding: 0px; color: rgb(0, 0, 0);">Mix IDE</a></li>
    <li style="margin: 0px 0px 1em; padding: 0px; list-style: disc;">The&nbsp;<a href="https://github.com/ethereum/mist/releases" style="margin: 0px; padding: 0px; color: rgb(0, 0, 0);">Ethereum Wallet</a></li>
</ul>
<p style="margin: 10px auto; font-family: Helvetica, Verdana, Arial, sans-serif; line-height: 22.4px;">&nbsp;&nbsp;&nbsp; 在这里选择solc和web3.eth.compile.solidity方式</p>
<h2 style="margin: 10px 0px; padding: 0px; font-size: 21px; line-height: 1.5; font-family: Helvetica, Verdana, Arial, sans-serif;">geth安装</h2>
<p style="margin: 10px auto; font-family: Helvetica, Verdana, Arial, sans-serif; line-height: 22.4px;">&nbsp;&nbsp;&nbsp; 参考：<a href="http://ethereum.github.io/go-ethereum/" style="margin: 0px; padding: 0px; color: rgb(0, 0, 0);">go Ethereum client</a>。安装不比较简单，这里详细说了</p>
<h2 style="margin: 10px 0px; padding: 0px; font-size: 21px; line-height: 1.5; font-family: Helvetica, Verdana, Arial, sans-serif;">solc安装</h2>
<p style="margin: 10px auto; font-family: Helvetica, Verdana, Arial, sans-serif; line-height: 22.4px;">1. 作为cpp-ethereum的一部分安装&nbsp;&nbsp;</p>
<p style="margin: 10px auto; font-family: Helvetica, Verdana, Arial, sans-serif; line-height: 22.4px;">&nbsp;&nbsp;&nbsp; 如果通过编译的方式安装了cpp-ethereum(参考：<a title="http://www.cnblogs.com/fengzhiwu/p/5547911.html" href="http://www.cnblogs.com/fengzhiwu/p/5547911.html" style="margin: 0px; padding: 0px; color: rgb(0, 0, 0);">http://www.cnblogs.com/fengzhiwu/p/5547911.html</a>)，那么solc编译器就会作为cpp-ethereum的一个子项目也被编译安装，在webthree-umbrella/build/solidity/solc目录下找到solc编译器的可执行文件。</p>
<p style="margin: 10px auto; font-family: Helvetica, Verdana, Arial, sans-serif; line-height: 22.4px;"><a href="http://images2015.cnblogs.com/blog/834896/201606/834896-20160630113719281-1413481855.png" style="margin: 0px; padding: 0px; color: rgb(0, 0, 0);"><img title="image" src="http://images2015.cnblogs.com/blog/834896/201606/834896-20160630113720468-927970088.png" alt="image" width="535" height="90" border="0" style="margin: 0px; padding: 0px; border: 0px; max-width: 900px; display: inline; background-image: none;" /></a></p>
<p style="margin: 10px auto; font-family: Helvetica, Verdana, Arial, sans-serif; line-height: 22.4px;">&nbsp;&nbsp;&nbsp; 然后，在/bin或/usr/bin目录下创建软链接就行了</p>
<blockquote style="margin: 10px 0px; padding: 5px 10px; border: 2px solid rgb(239, 239, 239); font-family: Helvetica, Verdana, Arial, sans-serif; line-height: 22.4px; background: none;">
<p style="margin: 10px auto;">ln -s /home/vagrant/Code/workspace/webthree-umbrella/build/solidity/solc/solc /bin/solc</p>
</blockquote>
<p style="margin: 10px auto; font-family: Helvetica, Verdana, Arial, sans-serif; line-height: 22.4px;">2. 单独安装solc</p>
<p style="margin: 10px auto; font-family: Helvetica, Verdana, Arial, sans-serif; line-height: 22.4px;">参考：<a title="http://solidity.readthedocs.io/en/latest/installing-solidity.html" href="http://solidity.readthedocs.io/en/latest/installing-solidity.html" style="margin: 0px; padding: 0px; color: rgb(0, 0, 0);">http://solidity.readthedocs.io/en/latest/installing-solidity.html</a></p>
<ul style="margin-right: 0px; margin-bottom: 0px; margin-left: 30px; font-family: Helvetica, Verdana, Arial, sans-serif; line-height: 22.4px;">
    <li style="margin: 0px 0px 1em; padding: 0px; list-style: disc;">通过npm安装：这种比较简单，运行npm install solc就行了，不过我没有在console中找到solc</li>
    <li style="margin: 0px 0px 1em; padding: 0px; list-style: disc;">通过apt-get安装：</li>
</ul>
<blockquote style="margin: 10px 0px; padding: 5px 10px; border: 2px solid rgb(239, 239, 239); font-family: Helvetica, Verdana, Arial, sans-serif; line-height: 22.4px; background: none;">
<p style="margin: 10px auto;">sudo add-apt-repository ppa:ethereum/ethereum</p>
<p style="margin: 10px auto;">sudo apt-get update</p>
<p style="margin: 10px auto;">sudo apt-get install solc</p>
<p style="margin: 10px auto;">which solc</p>
</blockquote>
<p style="margin: 10px auto; font-family: Helvetica, Verdana, Arial, sans-serif; line-height: 22.4px;">&nbsp;&nbsp;&nbsp; 把solc添加入geth中直接使用（在geth中输入）</p>
<blockquote style="margin: 10px 0px; padding: 5px 10px; border: 2px solid rgb(239, 239, 239); font-family: Helvetica, Verdana, Arial, sans-serif; line-height: 22.4px; background: none;">
<pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word;">admin.setSolc(&quot;path/to/solc&quot;)</pre>
</blockquote>
<ul style="margin-right: 0px; margin-bottom: 0px; margin-left: 30px; font-family: Helvetica, Verdana, Arial, sans-serif; line-height: 22.4px;">
    <li style="margin: 0px 0px 1em; padding: 0px; list-style: disc;">从源码编译安装</li>
</ul>
<p style="margin: 10px auto; font-family: Helvetica, Verdana, Arial, sans-serif; line-height: 22.4px;">&nbsp;&nbsp;&nbsp; 这种方法和安装cpp-etheruemle类似，不过最后的编译步骤改为：</p>
<blockquote style="margin: 10px 0px; padding: 5px 10px; border: 2px solid rgb(239, 239, 239); font-family: Helvetica, Verdana, Arial, sans-serif; line-height: 22.4px; background: none;">
<pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word;">cd webthree-umbrella</pre>
<pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word;">./webthree-helpers/scripts/ethupdate.sh --no-push --simple-pull --project solidity # update Solidity repo ./webthree-helpers/scripts/ethbuild.sh --no-git --project solidity --cores 4 -DEVMJIT=0 -DETHASHCL=0 # build Solidity only</pre>
</blockquote>
<h2 style="margin: 10px 0px; padding: 0px; font-size: 21px; line-height: 1.5; font-family: Helvetica, Verdana, Arial, sans-serif;">测试</h2>
<p style="margin: 10px auto; font-family: Helvetica, Verdana, Arial, sans-serif; line-height: 22.4px;">&nbsp;&nbsp;&nbsp; 打开一个geth console，输入：web3.eth.getCompilers()，就会打印</p>
<p style="margin: 10px auto; font-family: Helvetica, Verdana, Arial, sans-serif; line-height: 22.4px;"><a href="http://images2015.cnblogs.com/blog/834896/201606/834896-20160630113722015-396259509.png" style="margin: 0px; padding: 0px; color: rgb(0, 0, 0);"><img title="image" src="http://images2015.cnblogs.com/blog/834896/201606/834896-20160630113723374-2103189073.png" alt="image" width="682" height="92" border="0" style="margin: 0px; padding: 0px; border: 0px; max-width: 900px; display: inline; background-image: none;" /></a></p>
<p style="margin: 10px auto; font-family: Helvetica, Verdana, Arial, sans-serif; line-height: 22.4px;">&nbsp;</p>
<h1 style="margin: 10px 0px; padding: 0px; font-size: 28px; line-height: 1.5; font-family: Helvetica, Verdana, Arial, sans-serif;">智能合约体验</h1>
<h2 style="margin: 10px 0px; padding: 0px; font-size: 21px; line-height: 1.5; font-family: Helvetica, Verdana, Arial, sans-serif;">编译一个简单的合约</h2>
<p style="margin: 10px auto; font-family: Helvetica, Verdana, Arial, sans-serif; line-height: 22.4px;">&nbsp;&nbsp;&nbsp; 直接在console中编译一个简单的合约代码</p>
<blockquote style="margin: 10px 0px; padding: 5px 10px; border: 2px solid rgb(239, 239, 239); font-family: Helvetica, Verdana, Arial, sans-serif; line-height: 22.4px; background: none;">
<pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word;">&gt; source = &quot;contract test { function multiply(uint a) returns(uint d) { return a * 7; } }&quot;</pre>
<pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word;">&gt; clientContract = eth.compile.solidity(source).test</pre>
</blockquote>
<p style="margin: 10px auto; font-family: Helvetica, Verdana, Arial, sans-serif; line-height: 22.4px;"><span style="margin: 0px; padding: 0px; font-family: Arial;">编译返回的结果的JSON格式如下</span></p>
<pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word; line-height: 22.4px;"><a href="http://images2015.cnblogs.com/blog/834896/201607/834896-20160701110353046-598428016.png" style="margin: 0px; padding: 0px; color: rgb(0, 0, 0);"><img title="image" src="http://images2015.cnblogs.com/blog/834896/201607/834896-20160701110354124-1511260889.png" alt="image" width="792" height="304" border="0" style="margin: 0px; padding: 0px; border: 0px; max-width: 900px; display: inline; width: 733px; background-image: none;" /></a></pre>
<pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word; line-height: 22.4px;">&nbsp;</pre>
<pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word; line-height: 22.4px;">其中，</pre>
<pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word; line-height: 22.4px;">code：编译后的EVM字节码</pre>
<pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word; line-height: 22.4px;">info：编译器返回的metadata</pre>
<pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word; line-height: 22.4px;">abiDefination:Application Binary Interface定义。具体接口规则参见<a href="https://github.com/ethereum/wiki/wiki/Ethereum-Contract-ABI" style="margin: 0px; padding: 0px; color: rgb(0, 0, 0);">这里</a></pre>
<pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word; line-height: 22.4px;">compilerVersion：编译此代码的solidity编译器版本</pre>
<pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word; line-height: 22.4px;">developerDoc：针对开发者的Natural Specification Format，类似于Doxygen。具体规则参见<a href="https://github.com/ethereum/wiki/wiki/Ethereum-Natural-Specification-Format" style="margin: 0px; padding: 0px; color: rgb(0, 0, 0);">这里</a></pre>
<pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word; line-height: 22.4px;">language：合约语言</pre>
<pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word; line-height: 22.4px;">languageVersion：合约语言版本</pre>
<pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word; line-height: 22.4px;">source：源代码</pre>
<pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word; line-height: 22.4px;">userDoc：针对用户的Ethereum的Natural Specification Format，类似于Doxygen。</pre>
<pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word; line-height: 22.4px;">&nbsp;</pre>
<pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word; line-height: 22.4px;">编译器返回的JSON结构反映了合约部署的两种不同的路径。info信息真实的存在于区中心化的云中，作为metadata信息来公开验证Blockchain中合约代码的实现。而code信息通过创建交易的方式部署到区块链中。</pre>
<pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word; line-height: 22.4px;">&nbsp;</pre>
<h2 style="margin: 10px 0px; padding: 0px; font-size: 21px; line-height: 1.5; font-family: Helvetica, Verdana, Arial, sans-serif;">创建和部署合约</h2>
<pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word; line-height: 22.4px;">在进行此步骤前，确保你有一个解锁的账户并且账户中有余额。（可以创建自己独立的测试网络，即自己的区块链，初始化的时候就可以初始化一些有余额的账户）。参考：<a href="http://www.ethdocs.org/en/latest/network/test-networks.html" style="margin: 0px; padding: 0px; color: rgb(0, 0, 0);">Test Networks</a></pre>
<pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word; line-height: 22.4px;"><a href="http://images2015.cnblogs.com/blog/834896/201607/834896-20160701110355077-1438906995.png" style="margin: 0px; padding: 0px; color: rgb(0, 0, 0);"><img title="image" src="http://images2015.cnblogs.com/blog/834896/201607/834896-20160701110355874-1698545132.png" alt="image" width="741" height="158" border="0" style="margin: 0px; padding: 0px; border: 0px; max-width: 900px; display: inline; width: 733px; background-image: none;" /></a></pre>
<pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word; line-height: 22.4px;">&nbsp;</pre>
<pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word; line-height: 22.4px;">现在就可以在区块链中创建一个合约了。创建合约的方式是发送一个交易，交易的目的地址是空地址，数据是前面JSON结构中的code字段。</pre>
<pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word; line-height: 22.4px;">创建合约的流程如下</pre>
<blockquote style="margin: 10px 0px; padding: 5px 10px; border: 2px solid rgb(239, 239, 239); font-family: Helvetica, Verdana, Arial, sans-serif; line-height: 22.4px; background: none;">
<pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word;">var primaryAddress = eth.accounts[0] var abi = [{ constant: false, inputs: [{ name: 'a', type: 'uint256' } ]}] var MyContract = eth.contract(abi) var contract = MyContract.new(arg1, arg2, ..., {from: primaryAddress, data: <em style="margin: 0px; padding: 0px;"><span style="margin: 0px; padding: 0px; color: rgb(255, 0, 0);">evmByteCodeFromPreviousSection</span></em>}) //arg1,arg2,...是构造参数，这里没有，需要去掉。红色部分用前面生成的code代替</pre>
</blockquote>
<pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word; line-height: 22.4px;">i. 获得账户</pre>
<pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word; line-height: 22.4px;"><a href="http://images2015.cnblogs.com/blog/834896/201607/834896-20160701110356452-569857802.png" style="margin: 0px; padding: 0px; color: rgb(0, 0, 0);"><img title="image" src="http://images2015.cnblogs.com/blog/834896/201607/834896-20160701110357749-452542430.png" alt="image" width="462" height="46" border="0" style="margin: 0px; padding: 0px; border: 0px; max-width: 900px; display: inline; background-image: none;" /></a></pre>
<pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word; line-height: 22.4px;">ii. 定义一个abi （abi是个js的数组，否则不成功）</pre>
<pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word; line-height: 22.4px;"><a href="http://images2015.cnblogs.com/blog/834896/201607/834896-20160701110358421-1678857672.png" style="margin: 0px; padding: 0px; color: rgb(0, 0, 0);"><img title="image" src="http://images2015.cnblogs.com/blog/834896/201607/834896-20160701110359062-1782386999.png" alt="image" width="582" height="139" border="0" style="margin: 0px; padding: 0px; border: 0px; max-width: 900px; display: inline; background-image: none;" /></a></pre>
<pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word; line-height: 22.4px;">iii. 创建智能合约</pre>
<pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word; line-height: 22.4px;"><a href="http://images2015.cnblogs.com/blog/834896/201607/834896-20160701110359999-60907560.png" style="margin: 0px; padding: 0px; color: rgb(0, 0, 0);"><img title="image" src="http://images2015.cnblogs.com/blog/834896/201607/834896-20160701110400890-1763841539.png" alt="image" width="665" height="287" border="0" style="margin: 0px; padding: 0px; border: 0px; max-width: 900px; display: inline; background-image: none;" /></a></pre>
<pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word; line-height: 22.4px;">iv. 发送交易部署合约</pre>
<pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word; line-height: 22.4px;"><a href="http://images2015.cnblogs.com/blog/834896/201607/834896-20160701110401656-376763329.png" style="margin: 0px; padding: 0px; color: rgb(0, 0, 0);"><img title="image" src="http://images2015.cnblogs.com/blog/834896/201607/834896-20160701110402624-2064690533.png" alt="image" width="799" height="143" border="0" style="margin: 0px; padding: 0px; border: 0px; max-width: 900px; display: inline; width: 733px; background-image: none;" /></a></pre>
<pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word; line-height: 22.4px;">&nbsp;</pre>
<pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word; line-height: 22.4px;">如果交易被pending，如图说明你的miner没有在挖矿，</pre>
<pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word; line-height: 22.4px;"><a href="http://images2015.cnblogs.com/blog/834896/201607/834896-20160701110403484-1044344762.png" style="margin: 0px; padding: 0px; color: rgb(0, 0, 0);"><img title="image" src="http://images2015.cnblogs.com/blog/834896/201607/834896-20160701110404484-874221743.png" alt="image" width="507" height="128" border="0" style="margin: 0px; padding: 0px; border: 0px; max-width: 900px; display: inline; background-image: none;" /></a></pre>
<pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word; line-height: 22.4px;">&nbsp;</pre>
<pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word; line-height: 22.4px;">启动一个矿工</pre>
<blockquote style="margin: 10px 0px; padding: 5px 10px; border: 2px solid rgb(239, 239, 239); font-family: Helvetica, Verdana, Arial, sans-serif; line-height: 22.4px; background: none;">
<pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word;">miner.setEtherbase(eth.primaryAddress)    //设定开采账户</pre>
<pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word;">miner.start(8)</pre>
</blockquote><blockquote style="margin: 10px 0px; padding: 5px 10px; border: 2px solid rgb(239, 239, 239); font-family: Helvetica, Verdana, Arial, sans-serif; line-height: 22.4px; background: none;">
<pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word;">eth.getBlock(&quot;pending&quot;, true).transactions</pre>
</blockquote>
<pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word; line-height: 22.4px;">这时候发现交易已经在区块中</pre>
<pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word; line-height: 22.4px;"><a href="http://images2015.cnblogs.com/blog/834896/201607/834896-20160701110405249-1255926151.png" style="margin: 0px; padding: 0px; color: rgb(0, 0, 0);"><img title="image" src="http://images2015.cnblogs.com/blog/834896/201607/834896-20160701110406171-1417083310.png" alt="image" width="707" height="165" border="0" style="margin: 0px; padding: 0px; border: 0px; max-width: 900px; display: inline; background-image: none;" /></a></pre>
<pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word; line-height: 22.4px;">不过会发现，交易还是pending，这是因为该交易区块没有人协助进行运算验证，这时候只需要再启动一个矿工就行了</pre>
<blockquote style="margin: 10px 0px; padding: 5px 10px; border: 2px solid rgb(239, 239, 239); font-family: Helvetica, Verdana, Arial, sans-serif; line-height: 22.4px; background: none;">
<pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word;">miner.start(8)</pre>
</blockquote>
<pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word; line-height: 22.4px;">参考：<a href="https://github.com/imac-cloud/blockchain-tutorial/blob/master/ethereum/ubuntu-geth-private-testnet.md" style="margin: 0px; padding: 0px; color: rgb(0, 0, 0);">Private Testnet</a></pre>
<pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word; line-height: 22.4px;">发现区块1部署了交易</pre>
<pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word; line-height: 22.4px;"><a href="http://images2015.cnblogs.com/blog/834896/201607/834896-20160701110407327-1386682073.png" style="margin: 0px; padding: 0px; color: rgb(0, 0, 0);"><img title="image" src="http://images2015.cnblogs.com/blog/834896/201607/834896-20160701110408609-3305623.png" alt="image" width="716" height="268" border="0" style="margin: 0px; padding: 0px; border: 0px; max-width: 900px; display: inline; background-image: none;" /></a></pre>
<pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word; line-height: 22.4px;"><a href="http://images2015.cnblogs.com/blog/834896/201607/834896-20160701110409874-148322228.png" style="margin: 0px; padding: 0px; color: rgb(0, 0, 0);"><img title="image" src="http://images2015.cnblogs.com/blog/834896/201607/834896-20160701110410906-647536260.png" alt="image" width="725" height="163" border="0" style="margin: 0px; padding: 0px; border: 0px; max-width: 900px; display: inline; background-image: none;" /></a></pre>
<pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word; line-height: 22.4px;">&nbsp;</pre>
<h2 style="margin: 10px 0px; padding: 0px; font-size: 21px; line-height: 1.5; font-family: Helvetica, Verdana, Arial, sans-serif;">与合约进行交互</h2>
<pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word; line-height: 22.4px;">可以通过eth.contract()定义一个合约对象，这个对象包含变数合约接口的abi</pre>
<blockquote style="margin: 10px 0px; padding: 5px 10px; border: 2px solid rgb(239, 239, 239); font-family: Helvetica, Verdana, Arial, sans-serif; line-height: 22.4px; background: none;">
<pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word;"><code style="margin: 0px; padding: 0px;">Multiply7 = eth.contract(clientContract.info.abiDefinition); var myMultiply7 = Multiply7.at(contract.address);</code></pre>
</blockquote>
<pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word; line-height: 22.4px;"><a href="http://images2015.cnblogs.com/blog/834896/201607/834896-20160701110412015-415708057.png" style="margin: 0px; padding: 0px; color: rgb(0, 0, 0);"><img title="image" src="http://images2015.cnblogs.com/blog/834896/201607/834896-20160701110413312-1658749937.png" alt="image" width="742" height="413" border="0" style="margin: 0px; padding: 0px; border: 0px; max-width: 900px; display: inline; width: 733px; background-image: none;" /></a></pre>
<pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word; line-height: 22.4px;"><a href="http://images2015.cnblogs.com/blog/834896/201607/834896-20160701110414156-284638829.png" style="margin: 0px; padding: 0px; color: rgb(0, 0, 0);"><img title="image" src="http://images2015.cnblogs.com/blog/834896/201607/834896-20160701110414827-812685358.png" alt="image" width="486" height="219" border="0" style="margin: 0px; padding: 0px; border: 0px; max-width: 900px; display: inline; background-image: none;" /></a></pre>
<pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word; line-height: 22.4px;">到这儿，就可以调用智能合约的函数了。</pre>
<blockquote style="margin: 10px 0px; padding: 5px 10px; border: 2px solid rgb(239, 239, 239); font-family: Helvetica, Verdana, Arial, sans-serif; line-height: 22.4px; background: none;">
<pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word;">myMultiply7.multiply.call(3)</pre>
<pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word;">或</pre>
<pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word;">myMultiply7.multiply.sendTransaction(3, {from: contract.address})</pre>
</blockquote>
<pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word; line-height: 22.4px;"><a href="http://images2015.cnblogs.com/blog/834896/201607/834896-20160701110415327-1518447670.png" style="margin: 0px; padding: 0px; color: rgb(0, 0, 0);"><img title="image" src="http://images2015.cnblogs.com/blog/834896/201607/834896-20160701110415921-1070970226.png" alt="image" width="283" height="41" border="0" style="margin: 0px; padding: 0px; border: 0px; max-width: 900px; display: inline; background-image: none;" /></a></pre>
<p style="margin: 10px auto; font-family: Helvetica, Verdana, Arial, sans-serif; line-height: 22.4px;">&nbsp;</p>
<h1 style="margin: 10px 0px; padding: 0px; font-size: 28px; line-height: 1.5; font-family: Helvetica, Verdana, Arial, sans-serif;">结束</h1>
<p style="margin: 10px auto; font-family: Helvetica, Verdana, Arial, sans-serif; line-height: 22.4px;">&nbsp;&nbsp;&nbsp; 到此，对智能合约的初次体验就结束了。另外智能合约以及DApp还可以干很多NB的事情。以后会进一步讨论。</p>]]></description>
			<link>http://meisw.wdlinux.cn//show-918-1.html</link>
			<category domain="http://meisw.wdlinux.cn//category-54-1.html">以太坊</category>
			<pubDate>2016-12-28 12:17</pubDate>
		</item>
		<item>
			<guid>http://meisw.wdlinux.cn//show-916-1.html</guid>
			<title>基于以太坊的区块链浏览器搭建</title>
			<author>admin</author>
			<description><![CDATA[<p style="margin-bottom: 0px; color: rgb(85, 85, 85); font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px;">区块链目前发展很火，有很大发展前景，本文主要是在本地私有链搭建成功后，利用web3.js、AngularJS和servlet对搭建的私有链上区块信息包括地址、区块信息、交易信息等信息的展示。</p>
<p style="margin-bottom: 0px; color: rgb(85, 85, 85); font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px;">效果展示：</p>
<p style="margin-bottom: 0px; color: rgb(85, 85, 85); font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px;"><img src="http://img.blog.csdn.net/20160824180401775?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="" style="border: none; max-width: 602px; height: auto;" /></p>
<p style="margin-bottom: 0px; color: rgb(85, 85, 85); font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px;"><img src="http://img.blog.csdn.net/20160824180433072?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="" style="border: none; max-width: 602px; height: auto;" /></p>
<p style="margin-bottom: 0px; color: rgb(85, 85, 85); font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px;">相关链接：web3.js api:https://github.com/ethereum/wiki/wiki/JavaScript-API#web3versionnetwork</p>
<p style="margin-bottom: 0px; color: rgb(85, 85, 85); font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px;">&nbsp; &nbsp;AngularJS api:http://www.runoob.com/angularjs/angularjs-http.html</p>
<p style="margin-bottom: 0px; color: rgb(85, 85, 85); font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px;">&nbsp; &nbsp;源代码链接:&nbsp;<a target="_blank" href="https://pan.baidu.com/s/1gfpxXkR" style="text-decoration: none; color: rgb(12, 137, 207);">https://pan.baidu.com/s/1gfpxXkR</a>&nbsp;密码:&nbsp;5jai&nbsp;</p>
<p style="margin-bottom: 0px; color: rgb(85, 85, 85); font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px;">代码是包含一些后端java代码，explorer为前端代码，可直接在webstorm运行，需要注意的地方如下：</p>
<p style="margin-bottom: 0px; color: rgb(85, 85, 85); font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px;">index.html需要讲Ip地址改为你自己的私有链地址：</p>
<p style="margin-bottom: 0px; color: rgb(85, 85, 85); font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px;">&nbsp;</p>
<div class="dp-highlighter bg_html" style="font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; width: 940.5px; overflow: hidden; padding-top: 1px; position: relative; border-color: rgb(204, 204, 204); color: rgb(85, 85, 85); line-height: 35px; margin: 18px 0px !important; background-color: rgb(231, 229, 220);">
<div class="bar" style="padding-left: 45px;">
<div class="tools" style="padding: 3px 8px 10px 10px; font-stretch: normal; font-size: 9px; line-height: normal; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; color: silver; border-left-width: 3px; border-left-style: solid; border-left-color: rgb(153, 153, 153); background-color: rgb(248, 248, 248);"><strong>[html]</strong>&nbsp;<a href="http://blog.csdn.net/super_wu1992/article/details/52302672#" class="ViewSource" title="view plain" style="text-decoration: none; border: none; padding: 0px; margin: 0px 10px 0px 0px; font-size: 9px; color: rgb(12, 137, 207); background-image: none; background-attachment: initial; background-color: inherit; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;">view plain</a><span data-mod="popu_168">&nbsp;<a href="http://blog.csdn.net/super_wu1992/article/details/52302672#" class="CopyToClipboard" title="copy" style="text-decoration: none; border: none; padding: 0px; margin: 0px 10px 0px 0px; font-size: 9px; color: rgb(12, 137, 207); background-image: none; background-attachment: initial; background-color: inherit; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;">copy</a>
<div style="position: absolute; left: 516px; top: 1393px; width: 27px; height: 15px; z-index: 99;">&nbsp;</div>
</span><span data-mod="popu_169">&nbsp;<a href="http://blog.csdn.net/super_wu1992/article/details/52302672#" class="PrintSource" title="print" style="text-decoration: none; border: none; padding: 0px; margin: 0px 10px 0px 0px; font-size: 9px; color: rgb(12, 137, 207); background-image: none; background-attachment: initial; background-color: inherit; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;">print</a></span><a href="http://blog.csdn.net/super_wu1992/article/details/52302672#" class="About" title="?" style="text-decoration: none; border: none; padding: 0px; margin: 0px 10px 0px 0px; font-size: 9px; color: rgb(12, 137, 207); background-image: none; background-attachment: initial; background-color: inherit; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;">?</a></div>
</div>
<ol start="1" class="dp-xml" style="border: none; color: rgb(92, 92, 92); margin-right: 0px !important; margin-bottom: 1px !important; margin-left: 45px !important; background-color: rgb(255, 255, 255);">
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;"><span class="tag" style="margin: 0px; padding: 0px; border: none; color: green; background-color: inherit;">&lt;</span><span class="tag-name" style="margin: 0px; padding: 0px; border: none; color: green; background-color: inherit;">script</span><span class="tag" style="margin: 0px; padding: 0px; border: none; color: green; background-color: inherit;">&gt;</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">&nbsp;&nbsp;</span></span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">$(&quot;#modaltext&quot;).text(&nbsp;'geth&nbsp;--rpc&nbsp;--rpccorsdomain&nbsp;&quot;'+&nbsp;window.location.protocol&nbsp;+&nbsp;'//'&nbsp;+&quot;10.132.97.27:8545&quot;&nbsp;+&nbsp;'&quot;'&nbsp;);//IP地址改为你启动私有链的地址&nbsp;&nbsp;</span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">var&nbsp;<span class="attribute" style="margin: 0px; padding: 0px; border: none; background-color: inherit;">Web3</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">&nbsp;=&nbsp;</span><span class="attribute-value" style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">require</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">('web3');&nbsp;&nbsp;</span></span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">var&nbsp;<span class="attribute" style="margin: 0px; padding: 0px; border: none; background-color: inherit;">web3</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">&nbsp;=&nbsp;</span><span class="attribute-value" style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">new</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">&nbsp;Web3();&nbsp;&nbsp;</span></span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">web3.setProvider(new&nbsp;web3.providers.HttpProvider('http://10.132.97.27:8545'));&nbsp;&nbsp;</span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">var&nbsp;<span class="attribute" style="margin: 0px; padding: 0px; border: none; background-color: inherit;">number</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">=</span><span class="attribute-value" style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">web3</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">.eth.blockNumber;&nbsp;&nbsp;</span></span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">console.log(number);&nbsp;&nbsp;</span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;"><span class="tag" style="margin: 0px; padding: 0px; border: none; color: green; background-color: inherit;">&lt;/</span><span class="tag-name" style="margin: 0px; padding: 0px; border: none; color: green; background-color: inherit;">script</span><span class="tag" style="margin: 0px; padding: 0px; border: none; color: green; background-color: inherit;">&gt;</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">&nbsp;&nbsp;</span></span></li>
</ol>
</div>
<p><span style="color: rgb(85, 85, 85); font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px;">app.js</span></p>
<p style="margin-bottom: 0px; color: rgb(85, 85, 85); font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px;">&nbsp;</p>
<p style="margin-bottom: 0px; color: rgb(85, 85, 85); font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px;">&nbsp;</p>
<div class="dp-highlighter bg_html" style="font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; width: 940.5px; overflow: hidden; padding-top: 1px; position: relative; border-color: rgb(204, 204, 204); color: rgb(85, 85, 85); line-height: 35px; margin: 18px 0px !important; background-color: rgb(231, 229, 220);">
<div class="bar" style="padding-left: 45px;">
<div class="tools" style="padding: 3px 8px 10px 10px; font-stretch: normal; font-size: 9px; line-height: normal; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; color: silver; border-left-width: 3px; border-left-style: solid; border-left-color: rgb(153, 153, 153); background-color: rgb(248, 248, 248);"><strong>[html]</strong>&nbsp;<a href="http://blog.csdn.net/super_wu1992/article/details/52302672#" class="ViewSource" title="view plain" style="text-decoration: none; border: none; padding: 0px; margin: 0px 10px 0px 0px; font-size: 9px; color: rgb(12, 137, 207); background-image: none; background-attachment: initial; background-color: inherit; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;">view plain</a><span data-mod="popu_168">&nbsp;<a href="http://blog.csdn.net/super_wu1992/article/details/52302672#" class="CopyToClipboard" title="copy" style="text-decoration: none; border: none; padding: 0px; margin: 0px 10px 0px 0px; font-size: 9px; color: rgb(12, 137, 207); background-image: none; background-attachment: initial; background-color: inherit; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;">copy</a>
<div style="position: absolute; left: 516px; top: 1656px; width: 27px; height: 15px; z-index: 99;">&nbsp;</div>
</span><span data-mod="popu_169">&nbsp;<a href="http://blog.csdn.net/super_wu1992/article/details/52302672#" class="PrintSource" title="print" style="text-decoration: none; border: none; padding: 0px; margin: 0px 10px 0px 0px; font-size: 9px; color: rgb(12, 137, 207); background-image: none; background-attachment: initial; background-color: inherit; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;">print</a></span><a href="http://blog.csdn.net/super_wu1992/article/details/52302672#" class="About" title="?" style="text-decoration: none; border: none; padding: 0px; margin: 0px 10px 0px 0px; font-size: 9px; color: rgb(12, 137, 207); background-image: none; background-attachment: initial; background-color: inherit; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;">?</a></div>
</div>
<ol start="1" class="dp-xml" style="border: none; color: rgb(92, 92, 92); margin-right: 0px !important; margin-bottom: 1px !important; margin-left: 45px !important; background-color: rgb(255, 255, 255);">
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;"><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">.run(function($rootScope,$interval)&nbsp;{&nbsp;&nbsp;</span></span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;<span class="attribute" style="margin: 0px; padding: 0px; border: none; background-color: inherit;">Web3</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">&nbsp;=&nbsp;</span><span class="attribute-value" style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">require</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">('web3');&nbsp;&nbsp;</span></span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;<span class="attribute" style="margin: 0px; padding: 0px; border: none; background-color: inherit;">web3</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">&nbsp;=&nbsp;</span><span class="attribute-value" style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">new</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">&nbsp;Web3();&nbsp;&nbsp;</span></span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;web3.setProvider(new&nbsp;web3.providers.HttpProvider('http://10.132.97.27:8545'));<span class="tag" style="margin: 0px; padding: 0px; border: none; color: green; background-color: inherit;">&lt;</span><span class="tag-name" style="margin: 0px; padding: 0px; border: none; color: green; background-color: inherit;">span</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">&nbsp;</span><span class="attribute" style="margin: 0px; padding: 0px; border: none; background-color: inherit;">style</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">=</span><span class="attribute-value" style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&quot;font-family:&nbsp;Arial,&nbsp;Helvetica,&nbsp;sans-serif;&quot;</span><span class="tag" style="margin: 0px; padding: 0px; border: none; color: green; background-color: inherit;">&gt;</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">//IP地址改为你启动私有链的地址</span><span class="tag" style="margin: 0px; padding: 0px; border: none; color: green; background-color: inherit;">&lt;/</span><span class="tag-name" style="margin: 0px; padding: 0px; border: none; color: green; background-color: inherit;">span</span><span class="tag" style="margin: 0px; padding: 0px; border: none; color: green; background-color: inherit;">&gt;</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">&nbsp;&nbsp;</span></span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$<span class="attribute" style="margin: 0px; padding: 0px; border: none; background-color: inherit;">rootScope.web3</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">=</span><span class="attribute-value" style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">web3</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">;&nbsp;&nbsp;</span></span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;sleepFor(&nbsp;sleepDuration&nbsp;){&nbsp;&nbsp;</span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;<span class="attribute" style="margin: 0px; padding: 0px; border: none; background-color: inherit;">now</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">&nbsp;=&nbsp;</span><span class="attribute-value" style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">new</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">&nbsp;Date().getTime();&nbsp;&nbsp;</span></span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;while(new&nbsp;Date().getTime()&nbsp;<span class="tag" style="margin: 0px; padding: 0px; border: none; color: green; background-color: inherit;">&lt;</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">&nbsp;</span><span class="tag-name" style="margin: 0px; padding: 0px; border: none; color: green; background-color: inherit;">now</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">&nbsp;+&nbsp;sleepDuration){&nbsp;/*&nbsp;do&nbsp;nothing&nbsp;*/&nbsp;}&nbsp;&nbsp;&nbsp;</span></span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;</span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;<span class="attribute" style="margin: 0px; padding: 0px; border: none; background-color: inherit;">connected</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">&nbsp;=&nbsp;</span><span class="attribute-value" style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">false</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">;&nbsp;&nbsp;</span></span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if(!web3.isConnected())&nbsp;{&nbsp;&nbsp;</span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$('#connectwarning').modal({keyboard:&nbsp;false,&nbsp;backdrop:&nbsp;'static'})&nbsp;&nbsp;</span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$('#connectwarning').modal('show')&nbsp;&nbsp;</span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;</span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;});&nbsp;&nbsp;</span></li>
</ol>
</div>
<p><span style="color: rgb(85, 85, 85); font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px;">mainController.js这个对后台数据处理已经对区块的实时刷新将区块数据存入数据库，便于前台读取查看：</span></p>
<p style="margin-bottom: 0px; color: rgb(85, 85, 85); font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px;">&nbsp;</p>
<p style="margin-bottom: 0px; color: rgb(85, 85, 85); font-family: 'microsoft yahei'; font-size: 15px; line-height: 35px;">&nbsp;</p>
<div class="dp-highlighter bg_html" style="font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; width: 940.5px; overflow: hidden; padding-top: 1px; position: relative; border-color: rgb(204, 204, 204); color: rgb(85, 85, 85); line-height: 35px; margin: 18px 0px !important; background-color: rgb(231, 229, 220);">
<div class="bar" style="padding-left: 45px;">
<div class="tools" style="padding: 3px 8px 10px 10px; font-stretch: normal; font-size: 9px; line-height: normal; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; color: silver; border-left-width: 3px; border-left-style: solid; border-left-color: rgb(153, 153, 153); background-color: rgb(248, 248, 248);"><strong>[html]</strong>&nbsp;<a href="http://blog.csdn.net/super_wu1992/article/details/52302672#" class="ViewSource" title="view plain" style="text-decoration: none; border: none; padding: 0px; margin: 0px 10px 0px 0px; font-size: 9px; color: rgb(12, 137, 207); background-image: none; background-attachment: initial; background-color: inherit; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;">view plain</a><span data-mod="popu_168">&nbsp;<a href="http://blog.csdn.net/super_wu1992/article/details/52302672#" class="CopyToClipboard" title="copy" style="text-decoration: none; border: none; padding: 0px; margin: 0px 10px 0px 0px; font-size: 9px; color: rgb(12, 137, 207); background-image: none; background-attachment: initial; background-color: inherit; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;">copy</a>
<div style="position: absolute; left: 516px; top: 2045px; width: 27px; height: 15px; z-index: 99;">&nbsp;</div>
</span><span data-mod="popu_169">&nbsp;<a href="http://blog.csdn.net/super_wu1992/article/details/52302672#" class="PrintSource" title="print" style="text-decoration: none; border: none; padding: 0px; margin: 0px 10px 0px 0px; font-size: 9px; color: rgb(12, 137, 207); background-image: none; background-attachment: initial; background-color: inherit; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;">print</a></span><a href="http://blog.csdn.net/super_wu1992/article/details/52302672#" class="About" title="?" style="text-decoration: none; border: none; padding: 0px; margin: 0px 10px 0px 0px; font-size: 9px; color: rgb(12, 137, 207); background-image: none; background-attachment: initial; background-color: inherit; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;">?</a></div>
</div>
<ol start="1" class="dp-xml" style="border: none; color: rgb(92, 92, 92); margin-right: 0px !important; margin-bottom: 1px !important; margin-left: 45px !important; background-color: rgb(255, 255, 255);">
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;"><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">.controller('mainCtrlInit',function($rootScope,&nbsp;$scope,&nbsp;$location,$http,$q,$interval){&nbsp;&nbsp;</span></span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//$<span class="attribute" style="margin: 0px; padding: 0px; border: none; background-color: inherit;">scope.menuState</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">={show:&nbsp;false};&nbsp;&nbsp;</span></span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$<span class="attribute" style="margin: 0px; padding: 0px; border: none; background-color: inherit;">scope.toggleMenu</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">=</span><span class="attribute-value" style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">function</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">(index)&nbsp;{&nbsp;&nbsp;</span></span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//console.log(index);&nbsp;&nbsp;</span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//$<span class="attribute" style="margin: 0px; padding: 0px; border: none; background-color: inherit;">scope.menuState.index</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">=!$scope.menuState.index;&nbsp;&nbsp;</span></span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$(&quot;.closediv&quot;).removeClass(&quot;opendiv&quot;);&nbsp;&nbsp;</span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$(&quot;.div&quot;+index).addClass(&quot;opendiv&quot;).slideToggle(&quot;slow&quot;);&nbsp;&nbsp;</span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;};&nbsp;&nbsp;</span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$<span class="attribute" style="margin: 0px; padding: 0px; border: none; background-color: inherit;">scope.blockNum</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">&nbsp;=&nbsp;</span><span class="attribute-value" style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">web3</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">.eth.blockNumber;&nbsp;&nbsp;</span></span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//获取全部accounts&nbsp;&nbsp;</span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;datainit();&nbsp;&nbsp;</span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/**&nbsp;&nbsp;</span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;getAllAddress().then(function(result){&nbsp;&nbsp;</span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;<span class="attribute" style="margin: 0px; padding: 0px; border: none; background-color: inherit;">address_data</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">=</span><span class="attribute-value" style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">result</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">;&nbsp;&nbsp;</span></span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;accountinit(address_data);&nbsp;&nbsp;</span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});&nbsp;&nbsp;</span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;**/&nbsp;&nbsp;</span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;getAllTrancation().then(function(result){&nbsp;&nbsp;</span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$<span class="attribute" style="margin: 0px; padding: 0px; border: none; background-color: inherit;">scope.transactions</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">=</span><span class="attribute-value" style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">result</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">;&nbsp;&nbsp;</span></span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});&nbsp;&nbsp;</span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;getAllTrancation(){&nbsp;&nbsp;</span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;<span class="attribute" style="margin: 0px; padding: 0px; border: none; background-color: inherit;">deferred</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">&nbsp;=&nbsp;$q.defer();//声明承诺&nbsp;&nbsp;</span></span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$http.get('http://10.132.97.27:8080/ethereum/servlet/AddressAction?<span class="attribute" style="margin: 0px; padding: 0px; border: none; background-color: inherit;">action</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">=</span><span class="attribute-value" style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">getTransaction</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">')&nbsp;&nbsp;</span></span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.success(function(data){&nbsp;&nbsp;</span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;deferred.resolve(data.allAddress);//请求成功&nbsp;&nbsp;</span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}).error(function(data){&nbsp;&nbsp;</span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(data);&nbsp;&nbsp;</span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});&nbsp;&nbsp;</span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;deferred.promise;&nbsp;&nbsp;&nbsp;//&nbsp;返回承诺，这里返回的不是数据，而是API&nbsp;&nbsp;</span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;</span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;getAllAddress(){&nbsp;&nbsp;</span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;<span class="attribute" style="margin: 0px; padding: 0px; border: none; background-color: inherit;">deferred</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">&nbsp;=&nbsp;$q.defer();//声明承诺&nbsp;&nbsp;</span></span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$http.get('http://10.132.97.27:8080/ethereum/servlet/AddressAction?<span class="attribute" style="margin: 0px; padding: 0px; border: none; background-color: inherit;">action</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">=</span><span class="attribute-value" style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">getAddress</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">')&nbsp;&nbsp;</span></span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.success(function(data){&nbsp;&nbsp;</span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;deferred.resolve(data.allAddress);//请求成功&nbsp;&nbsp;</span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}).error(function(data){&nbsp;&nbsp;</span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(data);&nbsp;&nbsp;</span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});&nbsp;&nbsp;</span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;deferred.promise;&nbsp;&nbsp;&nbsp;//&nbsp;返回承诺，这里返回的不是数据，而是API&nbsp;&nbsp;</span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;</span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;accountinit(address_data){&nbsp;&nbsp;</span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;<span class="attribute" style="margin: 0px; padding: 0px; border: none; background-color: inherit;">result</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">=</span><span class="attribute-value" style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">address_data</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">;//web3.eth.accounts;&nbsp;&nbsp;</span></span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;<span class="attribute" style="margin: 0px; padding: 0px; border: none; background-color: inherit;">accounts</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">=</span><span class="attribute-value" style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">new</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">&nbsp;Array();&nbsp;&nbsp;</span></span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for(i&nbsp;in&nbsp;result){&nbsp;&nbsp;</span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;<span class="attribute" style="margin: 0px; padding: 0px; border: none; background-color: inherit;">balance</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">&nbsp;=&nbsp;</span><span class="attribute-value" style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">web3</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">.eth.getBalance(result[i]);&nbsp;&nbsp;</span></span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;<span class="attribute" style="margin: 0px; padding: 0px; border: none; background-color: inherit;">balanceInEther</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">=</span><span class="attribute-value" style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">web3</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">.fromWei(balance,&nbsp;'ether');&nbsp;&nbsp;</span></span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;<span class="attribute" style="margin: 0px; padding: 0px; border: none; background-color: inherit;">account</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">=</span><span class="attribute-value" style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">new</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">&nbsp;Object();&nbsp;&nbsp;</span></span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="attribute" style="margin: 0px; padding: 0px; border: none; background-color: inherit;">account.addressId</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">=</span><span class="attribute-value" style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">result</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">[i];&nbsp;&nbsp;</span></span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="attribute" style="margin: 0px; padding: 0px; border: none; background-color: inherit;">account.balance</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">=</span><span class="attribute-value" style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">balance</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">.toNumber();&nbsp;&nbsp;</span></span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="attribute" style="margin: 0px; padding: 0px; border: none; background-color: inherit;">account.balanceInEther</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">=</span><span class="attribute-value" style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">balanceInEther</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">.toNumber();&nbsp;&nbsp;</span></span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;accounts.push(account);&nbsp;&nbsp;</span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;</span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$<span class="attribute" style="margin: 0px; padding: 0px; border: none; background-color: inherit;">scope.accounts</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">=</span><span class="attribute-value" style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">accounts</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">;&nbsp;&nbsp;</span></span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;</span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//实时刷新区块数据&nbsp;&nbsp;</span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$interval(function&nbsp;()&nbsp;{&nbsp;&nbsp;</span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;<span class="attribute" style="margin: 0px; padding: 0px; border: none; background-color: inherit;">deferred</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">&nbsp;=&nbsp;$q.defer();//声明承诺&nbsp;&nbsp;</span></span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$http.get('http://10.132.97.27:8080/ethereum/servlet/AddressAction?<span class="attribute" style="margin: 0px; padding: 0px; border: none; background-color: inherit;">action</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">=</span><span class="attribute-value" style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">getBlockCount</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">')&nbsp;&nbsp;</span></span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.success(function(data){&nbsp;&nbsp;</span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(&quot;获取区块数据请求成功&quot;+data.blockNumber);&nbsp;&nbsp;</span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//deferred.resolve(data.blockNumber);//请求成功&nbsp;&nbsp;</span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;<span class="attribute" style="margin: 0px; padding: 0px; border: none; background-color: inherit;">blockstart</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">=</span><span class="attribute-value" style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">Number</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">(data.blockNumber);&nbsp;&nbsp;</span></span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;datainit(blockstart);&nbsp;&nbsp;</span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}).error(function(data){&nbsp;&nbsp;</span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(data);&nbsp;&nbsp;</span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(&quot;获取区块数据请求失败&quot;);&nbsp;&nbsp;</span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});&nbsp;&nbsp;</span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;},&nbsp;120000);&nbsp;&nbsp;</span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//添加address&nbsp;&nbsp;</span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;datainit(1);&nbsp;&nbsp;</span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;&nbsp;datainit(blockstart){&nbsp;&nbsp;</span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;<span class="attribute" style="margin: 0px; padding: 0px; border: none; background-color: inherit;">data</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">=</span><span class="attribute-value" style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">new</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">&nbsp;Array();&nbsp;&nbsp;</span></span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;<span class="attribute" style="margin: 0px; padding: 0px; border: none; background-color: inherit;">transactions</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">=</span><span class="attribute-value" style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">new</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">&nbsp;Array();&nbsp;&nbsp;</span></span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;<span class="attribute" style="margin: 0px; padding: 0px; border: none; background-color: inherit;">blockend</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">=</span><span class="attribute-value" style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">web3</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">.eth.blockNumber;&nbsp;&nbsp;</span></span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(&quot;-----&quot;+blockstart+&quot;========&quot;+blockend);&nbsp;&nbsp;</span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for(var&nbsp;<span class="attribute" style="margin: 0px; padding: 0px; border: none; background-color: inherit;">i</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">=</span><span class="attribute-value" style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">blockstart</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">;i</span><span class="tag" style="margin: 0px; padding: 0px; border: none; color: green; background-color: inherit;">&lt;</span><span class="tag-name" style="margin: 0px; padding: 0px; border: none; color: green; background-color: inherit;">blockend</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">;i++){&nbsp;&nbsp;</span></span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;<span class="attribute" style="margin: 0px; padding: 0px; border: none; background-color: inherit;">blockinfo</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">=&nbsp;</span><span class="attribute-value" style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">web3</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">.eth.getBlock(i);&nbsp;&nbsp;</span></span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//console.log(i+&quot;----&quot;+blockinfo.miner);&nbsp;&nbsp;</span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;accountinit(blockinfo.miner);&nbsp;&nbsp;</span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;&nbsp;<span class="attribute" style="margin: 0px; padding: 0px; border: none; background-color: inherit;">block</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">={&nbsp;&nbsp;</span></span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;blockId:blockinfo.number,&nbsp;&nbsp;</span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;address:blockinfo.miner,//地址信息&nbsp;&nbsp;</span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;transactionArr:blockinfo.transactions.join()//交易地址&nbsp;&nbsp;</span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;};&nbsp;&nbsp;</span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;data.push(blockinfo.miner);&nbsp;&nbsp;</span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if(block.transactionArr.length<span class="tag" style="margin: 0px; padding: 0px; border: none; color: green; background-color: inherit;">&gt;</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">0){&nbsp;&nbsp;</span></span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;console.log(block.transactionArr);&nbsp;&nbsp;</span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;transactions.push(block);&nbsp;&nbsp;</span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;</span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;</span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;<span class="attribute" style="margin: 0px; padding: 0px; border: none; background-color: inherit;">address_data</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">=</span><span class="attribute-value" style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">unique</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">(data);&nbsp;&nbsp;</span></span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//console.log(address_data);&nbsp;&nbsp;</span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if(blockend<span class="tag" style="margin: 0px; padding: 0px; border: none; color: green; background-color: inherit;">&gt;</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">blockstart){&nbsp;&nbsp;</span></span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;addAddressJSON(address_data,transactions,blockend);&nbsp;&nbsp;</span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;</span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;</span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;replaceTrans(transactionArr){&nbsp;&nbsp;</span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;</span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;</span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//数组去重&nbsp;&nbsp;</span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;unique(arr)&nbsp;{&nbsp;&nbsp;</span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;<span class="attribute" style="margin: 0px; padding: 0px; border: none; background-color: inherit;">result</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">&nbsp;=&nbsp;[],&nbsp;</span><span class="attribute" style="margin: 0px; padding: 0px; border: none; background-color: inherit;">hash</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">&nbsp;=&nbsp;{};&nbsp;&nbsp;</span></span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for&nbsp;(var&nbsp;<span class="attribute" style="margin: 0px; padding: 0px; border: none; background-color: inherit;">i</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">&nbsp;=&nbsp;</span><span class="attribute-value" style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">0</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">,&nbsp;elem;&nbsp;(</span><span class="attribute" style="margin: 0px; padding: 0px; border: none; background-color: inherit;">elem</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">&nbsp;=&nbsp;</span><span class="attribute-value" style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">arr</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">[i])&nbsp;!=&nbsp;null;&nbsp;i++)&nbsp;{&nbsp;&nbsp;</span></span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(!hash[elem])&nbsp;{&nbsp;&nbsp;</span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;result.push(elem);&nbsp;&nbsp;</span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hash[elem]&nbsp;=&nbsp;true;&nbsp;&nbsp;</span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;</span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;</span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;result;&nbsp;&nbsp;</span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;</span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//将查询到的地址存入数据库&nbsp;&nbsp;</span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;addAddressJSON(address_data,transactions,blockend){&nbsp;&nbsp;</span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if(address_data.length<span class="tag" style="margin: 0px; padding: 0px; border: none; color: green; background-color: inherit;">&gt;</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">0){&nbsp;&nbsp;</span></span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;<span class="attribute" style="margin: 0px; padding: 0px; border: none; background-color: inherit;">transactionsstr</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">=</span><span class="attribute-value" style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&quot;&quot;</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">;&nbsp;&nbsp;</span></span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;<span class="attribute" style="margin: 0px; padding: 0px; border: none; background-color: inherit;">url</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">=</span><span class="attribute-value" style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&quot;&quot;</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">;&nbsp;&nbsp;</span></span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if(transactions.length<span class="tag" style="margin: 0px; padding: 0px; border: none; color: green; background-color: inherit;">&gt;</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">0&nbsp;&amp;&amp;&nbsp;transactions.length</span><span class="tag" style="margin: 0px; padding: 0px; border: none; color: green; background-color: inherit;">&gt;</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">12){&nbsp;&nbsp;</span></span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;<span class="attribute" style="margin: 0px; padding: 0px; border: none; background-color: inherit;">n</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">=</span><span class="attribute-value" style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">transactions</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">.length/12;&nbsp;&nbsp;</span></span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;<span class="attribute" style="margin: 0px; padding: 0px; border: none; background-color: inherit;">m</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">=</span><span class="attribute-value" style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">transactions</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">.length%12;&nbsp;&nbsp;</span></span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;console.log(n+&quot;===&quot;+m);&nbsp;&nbsp;</span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;<span class="attribute" style="margin: 0px; padding: 0px; border: none; background-color: inherit;">h</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">=</span><span class="attribute-value" style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">1</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">;&nbsp;&nbsp;</span></span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for(var&nbsp;<span class="attribute" style="margin: 0px; padding: 0px; border: none; background-color: inherit;">i</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">=</span><span class="attribute-value" style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">0</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">;i</span><span class="tag" style="margin: 0px; padding: 0px; border: none; color: green; background-color: inherit;">&lt;</span><span class="tag-name" style="margin: 0px; padding: 0px; border: none; color: green; background-color: inherit;">n</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">;i++){&nbsp;&nbsp;</span></span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;<span class="attribute" style="margin: 0px; padding: 0px; border: none; background-color: inherit;">transactionsstr01</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">=</span><span class="attribute-value" style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">JSON</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">.stringify(transactions.slice(12*i,12*(i+1)));&nbsp;&nbsp;</span></span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;<span class="attribute" style="margin: 0px; padding: 0px; border: none; background-color: inherit;">uri</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">=</span><span class="attribute-value" style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">'http://10.132.97.27:8080/ethereum/servlet/AddressAction?action=addTransaction&amp;transactionsstr='</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">+transactionsstr01;&nbsp;&nbsp;</span></span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$http.post(uri).success(function(){&nbsp;&nbsp;</span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(&quot;transactionsstr保存成功===整除&quot;);&nbsp;&nbsp;</span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;})&nbsp;&nbsp;</span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;</span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if(m<span class="tag" style="margin: 0px; padding: 0px; border: none; color: green; background-color: inherit;">&gt;</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">0){&nbsp;&nbsp;</span></span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;<span class="attribute" style="margin: 0px; padding: 0px; border: none; background-color: inherit;">transactionsstr02</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">=</span><span class="attribute-value" style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">JSON</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">.stringify(transactions.slice(12*n,transactions.length));&nbsp;&nbsp;</span></span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;<span class="attribute" style="margin: 0px; padding: 0px; border: none; background-color: inherit;">uri</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">=</span><span class="attribute-value" style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">'http://10.132.97.27:8080/ethereum/servlet/AddressAction?action=addTransaction&amp;transactionsstr='</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">+transactionsstr02;&nbsp;&nbsp;</span></span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$http.post(uri).success(function(){&nbsp;&nbsp;</span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(&quot;transactionsstr保存成功==除余&quot;);&nbsp;&nbsp;</span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;})&nbsp;&nbsp;</span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;</span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}else&nbsp;if(transactions.length<span class="tag" style="margin: 0px; padding: 0px; border: none; color: green; background-color: inherit;">&gt;</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">0&nbsp;&amp;&amp;&nbsp;transactions.length</span><span class="tag" style="margin: 0px; padding: 0px; border: none; color: green; background-color: inherit;">&lt;</span><span class="tag-name" style="margin: 0px; padding: 0px; border: none; color: green; background-color: inherit;">12</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">){&nbsp;&nbsp;</span></span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="attribute" style="margin: 0px; padding: 0px; border: none; background-color: inherit;">transactionsstr</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">=</span><span class="attribute-value" style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">JSON</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">.stringify(transactions);&nbsp;&nbsp;</span></span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;<span class="attribute" style="margin: 0px; padding: 0px; border: none; background-color: inherit;">url</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">=</span><span class="attribute-value" style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">'http://10.132.97.27:8080/ethereum/servlet/AddressAction?action=addAddress&amp;address_data='</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">+address_data+'&amp;</span><span class="attribute" style="margin: 0px; padding: 0px; border: none; background-color: inherit;">blockend</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">=</span><span class="attribute-value" style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">'+blockend+'</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">&amp;</span><span class="attribute" style="margin: 0px; padding: 0px; border: none; background-color: inherit;">transactionsstr</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">='+transactionsstr;&nbsp;&nbsp;</span></span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$http.post(url).success(function(){&nbsp;&nbsp;</span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(&quot;address保存成功&quot;);&nbsp;&nbsp;</span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}).error(function(data)&nbsp;{&nbsp;&nbsp;</span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(&quot;address保存失败&quot;);&nbsp;&nbsp;</span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});&nbsp;&nbsp;</span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;</span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;&nbsp;<span class="attribute" style="margin: 0px; padding: 0px; border: none; background-color: inherit;">url</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">=</span><span class="attribute-value" style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">'http://10.132.97.27:8080/ethereum/servlet/AddressAction?action=addAddress&amp;address_data='</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">+address_data+'&amp;</span><span class="attribute" style="margin: 0px; padding: 0px; border: none; background-color: inherit;">blockend</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">='+blockend;&nbsp;&nbsp;</span></span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$http.post(url).success(function(){&nbsp;&nbsp;</span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(&quot;address保存成功&quot;);&nbsp;&nbsp;</span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}).error(function(data)&nbsp;{&nbsp;&nbsp;</span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(&quot;address保存失败&quot;);&nbsp;&nbsp;</span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});&nbsp;&nbsp;</span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;</span></li>
    <li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;</span></li>
    <li class="" style="margin: 0px !important; padding: 0px 3px 0px 10px !important; border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(153, 153, 153); list-style: decimal-leading-zero outside; color: rgb(119, 119, 119); line-height: 18px; background-color: rgb(249, 249, 249);"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;});&nbsp;&nbsp;</span></li>
</ol>
</div>
<p>&nbsp;</p>]]></description>
			<link>http://meisw.wdlinux.cn//show-916-1.html</link>
			<category domain="http://meisw.wdlinux.cn//category-54-1.html">以太坊</category>
			<pubDate>2016-12-22 00:07</pubDate>
		</item>
		<item>
			<guid>http://meisw.wdlinux.cn//show-914-1.html</guid>
			<title>如何部署、调用智能合约</title>
			<author>admin</author>
			<description><![CDATA[<p>&nbsp;</p>
<h2 style="margin: 0px 0px 1em; padding: 0.8em 0px 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background: none rgb(248, 248, 248);">RPC</h2>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">之前的章节中我们看到了怎么写、部署合约以及与合约互动。现在该讲讲与以太坊网络和智能合约沟通的细节了。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">一个以太坊节点提供一个RPC界面。这个界面给&ETH;app访问以太坊区块链的权限和节点提供的功能，比如编译智能合约代码，它用JSON-RPC 2.0规范(不支持提醒和命名的参数) 的子集作为序列化协议，在HTTP和IPC (linux/OSX上的unix域接口，在Windows上叫pipe&rsquo;s)上可用。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">如果你对细节不感兴趣，正在寻找使用javascript库的简便方法，你可以略过下面的章节，从Using Web3继续。</p>
<h2 style="margin: 0px 0px 1em; padding: 0.8em 0px 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background: url(&quot;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAABCAYAAACsXeyTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAFUlEQVQIHWNIS0sr/v//PwMMDzY+ADqMahlW4J91AAAAAElFTkSuQmCC&quot;) 0% 0% repeat-x rgb(248, 248, 248);">惯例</h2>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">RPC界面使用一些惯例，它们不是JSON-RPC 2.0规范的一部分：</p>
<ul style="margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">数字是十六进制编码。做这个决定是因为有些语言对运行极大的数字没有或有很少的限制。为了防止这些错误数字类型是十六进制编码，由开发者来分析这些数字并正确处理它们。在维基页百科查看十六进制编码章节查看案例。</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">默认区块数字，几个RPC 方法接受区块数字。在一些情况下，给出区块数字是不可能的或者不太方便。 在那样的情况下，默认区块数字可以是以下字符串中的一个[&rdquo;earliest&rdquo;, &ldquo;latest&rdquo;, &ldquo;pending&rdquo;]。在维基页面查看使用默认区块参数的RPC方法列表。</li>
</ul>
<h2 style="margin: 0px 0px 1em; padding: 0.8em 0px 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background: url(&quot;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAABCAYAAACsXeyTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAFUlEQVQIHWNIS0sr/v//PwMMDzY+ADqMahlW4J91AAAAAElFTkSuQmCC&quot;) 0% 0% repeat-x rgb(248, 248, 248);">部署合约</h2>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">我们会通过不同的步骤来部署下面的合约，只用到RPC界面。</p>
<p><figure class="code" style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; box-shadow: rgba(0, 0, 0, 0.0588235) 0px 0px 10px; color: rgb(34, 34, 34); background: none rgb(248, 248, 248);">
<div class="highlight" style="margin: 0px; padding: 0px; border: 1px solid rgb(5, 35, 43) !important; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; overflow-y: hidden; overflow-x: auto; background: rgb(0, 43, 54);">
<table style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; border-collapse: collapse; border-spacing: 0px;">
    <tbody style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
        <tr style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
            <td class="gutter" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle;">
            <pre class="line-numbers" style="margin-top: 0px; margin-bottom: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; text-align: right; text-shadow: rgb(2, 16, 20) 0px -1px; padding: 0.8em !important; border-right-width: 1px !important; border-right-style: solid !important; border-right-color: rgb(0, 35, 44) !important; background-image: url(&quot;/images/noise.png?1457420710&quot;) !important; background-attachment: initial !important; background-color: rgb(7, 54, 66) !important; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: 0% 0%; background-repeat: initial !important;"><span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">1</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">2</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">3</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">4</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">5</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">6</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">7</span></pre>
            </td>
            <td class="code" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle; width: 757px;">
            <pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; border: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; background: none;"><code class="" style="margin: 0px; padding: 0.8em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; vertical-align: baseline; overflow-y: hidden; display: block; overflow-x: auto; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace !important; background: rgb(0, 0, 0);"><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">contract Multiply7 { </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">   event Print(uint); </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">   function multiply(uint input) returns (uint) { </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">      Print(input * 7); </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">      return input * 7; </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">   } </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">}</span></code></pre>
            </td>
        </tr>
    </tbody>
</table>
</div>
</figure></p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">要做的第一件事是确保HTTP RPC界面可用。这意味着我们在开始为geth供应&mdash;rpc标志，为eth提供-j标志。在这个例子中我们用私有开发链上的geth节点。通过这种方法，我们就不需要真实网络上的以太币了。</p>
<p><figure class="code" style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; box-shadow: rgba(0, 0, 0, 0.0588235) 0px 0px 10px; color: rgb(34, 34, 34); background: none rgb(248, 248, 248);">
<div class="highlight" style="margin: 0px; padding: 0px; border: 1px solid rgb(5, 35, 43) !important; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; overflow-y: hidden; overflow-x: auto; background: rgb(0, 43, 54);">
<table style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; border-collapse: collapse; border-spacing: 0px;">
    <tbody style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
        <tr style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
            <td class="gutter" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle;">
            <pre class="line-numbers" style="margin-top: 0px; margin-bottom: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; text-align: right; text-shadow: rgb(2, 16, 20) 0px -1px; padding: 0.8em !important; border-right-width: 1px !important; border-right-style: solid !important; border-right-color: rgb(0, 35, 44) !important; background-image: url(&quot;/images/noise.png?1457420710&quot;) !important; background-attachment: initial !important; background-color: rgb(7, 54, 66) !important; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: 0% 0%; background-repeat: initial !important;"><span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">1</span></pre>
            </td>
            <td class="code" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle; width: 757px;">
            <pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; border: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; background: none;"><code class="" style="margin: 0px; padding: 0.8em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; vertical-align: baseline; overflow-y: hidden; display: block; overflow-x: auto; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace !important; background: rgb(0, 0, 0);"><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">&gt; geth --rpc --dev --mine --minerthreads 1 --unlock 0 console 2&gt;&gt;geth.log</span></code></pre>
            </td>
        </tr>
    </tbody>
</table>
</div>
</figure></p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">这会在<a href="http://localhost:8545/" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; color: rgb(117, 21, 144); transition: color 0.3s; white-space: pre-wrap; word-wrap: break-word;">http://localhost:8545</a>&nbsp;上启动HTTP RPC界面。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">注意：geth支持CORS查看&mdash;rpccorsdomain标志了解更多。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">我们可以通过用curl检索coinbase地址和余额来证明界面正在运行。请注意这些例子中的数据在你本地的节点上会有所不同。如果你想要试试这些参数，视情况替换需要的参数。</p>
<p><figure class="code" style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; box-shadow: rgba(0, 0, 0, 0.0588235) 0px 0px 10px; color: rgb(34, 34, 34); background: none rgb(248, 248, 248);">
<div class="highlight" style="margin: 0px; padding: 0px; border: 1px solid rgb(5, 35, 43) !important; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; overflow-y: hidden; overflow-x: auto; background: rgb(0, 43, 54);">
<table style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; border-collapse: collapse; border-spacing: 0px;">
    <tbody style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
        <tr style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
            <td class="gutter" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle;">
            <pre class="line-numbers" style="margin-top: 0px; margin-bottom: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; text-align: right; text-shadow: rgb(2, 16, 20) 0px -1px; padding: 0.8em !important; border-right-width: 1px !important; border-right-style: solid !important; border-right-color: rgb(0, 35, 44) !important; background-image: url(&quot;/images/noise.png?1457420710&quot;) !important; background-attachment: initial !important; background-color: rgb(7, 54, 66) !important; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: 0% 0%; background-repeat: initial !important;"><span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">1</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">2</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">3</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">4</span></pre>
            </td>
            <td class="code" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle; width: 1141px;">
            <pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; border: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; background: none;"><code class="" style="margin: 0px; padding: 0.8em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; vertical-align: baseline; overflow-y: hidden; display: block; overflow-x: auto; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace !important; background: rgb(0, 0, 0);"><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">&gt; curl --data '{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;method&quot;:&quot;eth_coinbase&quot;, &quot;id&quot;:1}' localhost:8545 </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">{&quot;id&quot;:1,&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;result&quot;:[&quot;0xeb85a5557e5bdc18ee1934a89d8bb402398ee26a&quot;]} </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">&gt; curl --data '{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;method&quot;:&quot;eth_getBalance&quot;, &quot;params&quot;: [&quot;0xeb85a5557e5bdc18ee1934a89d8bb402398ee26a&quot;], &quot;id&quot;:2}' localhost:8545 </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">{&quot;id&quot;:2,&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;result&quot;:&quot;0x1639e49bba16280000&quot;}</span></code></pre>
            </td>
        </tr>
    </tbody>
</table>
</div>
</figure></p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">记不记得我们说过数字是十六进制编码？在这个情况下，余额作为十六进制字符串以Wei的形式返还。如果我们希望余额作为数字以太币为单位，我们可以从控制台用web3。</p>
<p><figure class="code" style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; box-shadow: rgba(0, 0, 0, 0.0588235) 0px 0px 10px; color: rgb(34, 34, 34); background: none rgb(248, 248, 248);">
<div class="highlight" style="margin: 0px; padding: 0px; border: 1px solid rgb(5, 35, 43) !important; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; overflow-y: hidden; overflow-x: auto; background: rgb(0, 43, 54);">
<table style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; border-collapse: collapse; border-spacing: 0px;">
    <tbody style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
        <tr style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
            <td class="gutter" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle;">
            <pre class="line-numbers" style="margin-top: 0px; margin-bottom: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; text-align: right; text-shadow: rgb(2, 16, 20) 0px -1px; padding: 0.8em !important; border-right-width: 1px !important; border-right-style: solid !important; border-right-color: rgb(0, 35, 44) !important; background-image: url(&quot;/images/noise.png?1457420710&quot;) !important; background-attachment: initial !important; background-color: rgb(7, 54, 66) !important; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: 0% 0%; background-repeat: initial !important;"><span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">1</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">2</span></pre>
            </td>
            <td class="code" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle; width: 757px;">
            <pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; border: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; background: none;"><code class="" style="margin: 0px; padding: 0.8em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; vertical-align: baseline; overflow-y: hidden; display: block; overflow-x: auto; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace !important; background: rgb(0, 0, 0);"><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">&gt; web3.fromWei(&quot;0x1639e49bba16280000&quot;, &quot;ether&quot;) </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">&quot;410&quot;</span></code></pre>
            </td>
        </tr>
    </tbody>
</table>
</div>
</figure></p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">现在我们在私有开发链上有一些以太币，我们就可以部署合约了。第一步是验证solidity编译器可用。我们可以用eth_getCompilers RPC method方法来检索可用的编译器。</p>
<p><figure class="code" style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; box-shadow: rgba(0, 0, 0, 0.0588235) 0px 0px 10px; color: rgb(34, 34, 34); background: none rgb(248, 248, 248);">
<div class="highlight" style="margin: 0px; padding: 0px; border: 1px solid rgb(5, 35, 43) !important; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; overflow-y: hidden; overflow-x: auto; background: rgb(0, 43, 54);">
<table style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; border-collapse: collapse; border-spacing: 0px;">
    <tbody style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
        <tr style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
            <td class="gutter" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle;">
            <pre class="line-numbers" style="margin-top: 0px; margin-bottom: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; text-align: right; text-shadow: rgb(2, 16, 20) 0px -1px; padding: 0.8em !important; border-right-width: 1px !important; border-right-style: solid !important; border-right-color: rgb(0, 35, 44) !important; background-image: url(&quot;/images/noise.png?1457420710&quot;) !important; background-attachment: initial !important; background-color: rgb(7, 54, 66) !important; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: 0% 0%; background-repeat: initial !important;"><span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">1</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">2</span></pre>
            </td>
            <td class="code" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle; width: 757px;">
            <pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; border: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; background: none;"><code class="" style="margin: 0px; padding: 0.8em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; vertical-align: baseline; overflow-y: hidden; display: block; overflow-x: auto; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace !important; background: rgb(0, 0, 0);"><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">&gt; curl --data '{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;method&quot;: &quot;eth_getCompilers&quot;, &quot;id&quot;: 3}' localhost:8545 </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">{&quot;id&quot;:3,&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;result&quot;:[&quot;Solidity&quot;]}</span></code></pre>
            </td>
        </tr>
    </tbody>
</table>
</div>
</figure></p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">我们可以看到solidity编译器可用。如果不可用，按照这些说明操作。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">下一步是把Multiply7合约编译到可以发送给以太坊虚拟机的字节代码。</p>
<p><figure class="code" style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; box-shadow: rgba(0, 0, 0, 0.0588235) 0px 0px 10px; color: rgb(34, 34, 34); background: none rgb(248, 248, 248);">
<div class="highlight" style="margin: 0px; padding: 0px; border: 1px solid rgb(5, 35, 43) !important; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; overflow-y: hidden; overflow-x: auto; background: rgb(0, 43, 54);">
<table style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; border-collapse: collapse; border-spacing: 0px;">
    <tbody style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
        <tr style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
            <td class="gutter" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle;">
            <pre class="line-numbers" style="margin-top: 0px; margin-bottom: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; text-align: right; text-shadow: rgb(2, 16, 20) 0px -1px; padding: 0.8em !important; border-right-width: 1px !important; border-right-style: solid !important; border-right-color: rgb(0, 35, 44) !important; background-image: url(&quot;/images/noise.png?1457420710&quot;) !important; background-attachment: initial !important; background-color: rgb(7, 54, 66) !important; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: 0% 0%; background-repeat: initial !important;"><span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">1</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">2</span></pre>
            </td>
            <td class="code" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle; width: 1421px;">
            <pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; border: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; background: none;"><code class="" style="margin: 0px; padding: 0.8em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; vertical-align: baseline; overflow-y: hidden; display: block; overflow-x: auto; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace !important; background: rgb(0, 0, 0);"><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">&gt; curl --data '{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;method&quot;: &quot;eth_compileSolidity&quot;, &quot;params&quot;: [&quot;contract Multiply7 { event Print(uint); function multiply(uint input) returns (uint) { Print(input </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">{&quot;id&quot;:4,&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;result&quot;:{&quot;Multiply7&quot;:{&quot;code&quot;:&quot;0x6060604052605f8060106000396000f360606040</span></code></pre>
            </td>
        </tr>
    </tbody>
</table>
</div>
</figure></p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">现在我们有了编译代码，需要决定花多少gas去部署它。RPC界面有eth_estimateGas方法，会给我们一个预估数量。</p>
<p><figure class="code" style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; box-shadow: rgba(0, 0, 0, 0.0588235) 0px 0px 10px; color: rgb(34, 34, 34); background: none rgb(248, 248, 248);">
<div class="highlight" style="margin: 0px; padding: 0px; border: 1px solid rgb(5, 35, 43) !important; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; overflow-y: hidden; overflow-x: auto; background: rgb(0, 43, 54);">
<table style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; border-collapse: collapse; border-spacing: 0px;">
    <tbody style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
        <tr style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
            <td class="gutter" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle;">
            <pre class="line-numbers" style="margin-top: 0px; margin-bottom: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; text-align: right; text-shadow: rgb(2, 16, 20) 0px -1px; padding: 0.8em !important; border-right-width: 1px !important; border-right-style: solid !important; border-right-color: rgb(0, 35, 44) !important; background-image: url(&quot;/images/noise.png?1457420710&quot;) !important; background-attachment: initial !important; background-color: rgb(7, 54, 66) !important; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: 0% 0%; background-repeat: initial !important;"><span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">1</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">2</span></pre>
            </td>
            <td class="code" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle; width: 3133px;">
            <pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; border: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; background: none;"><code class="" style="margin: 0px; padding: 0.8em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; vertical-align: baseline; overflow-y: hidden; display: block; overflow-x: auto; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace !important; background: rgb(0, 0, 0);"><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">&gt; curl --data '{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;method&quot;: &quot;eth_estimateGas&quot;, &quot;params&quot;: [{&quot;from&quot;: &quot;0xeb85a5557e5bdc18ee1934a89d8bb402398ee26a&quot;, &quot;data&quot;: &quot;0x6060604052605f8060106000396000f3606060405260e060020a6000350463c6888fa18114601a575b005b60586004356007810260609081526000907f24abdb5865df5079dcc5ac590ff6f01d5c16edbc5fab4e195d9febd1114503da90602090a15060070290565b5060206060f3&quot;}], &quot;id&quot;: 5}' localhost:8545 </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">{&quot;id&quot;:5,&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;result&quot;:&quot;0xb8a9&quot;}</span></code></pre>
            </td>
        </tr>
    </tbody>
</table>
</div>
</figure></p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">最后部署合约。</p>
<p><figure class="code" style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; box-shadow: rgba(0, 0, 0, 0.0588235) 0px 0px 10px; color: rgb(34, 34, 34); background: none rgb(248, 248, 248);">
<div class="highlight" style="margin: 0px; padding: 0px; border: 1px solid rgb(5, 35, 43) !important; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; overflow-y: hidden; overflow-x: auto; background: rgb(0, 43, 54);">
<table style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; border-collapse: collapse; border-spacing: 0px;">
    <tbody style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
        <tr style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
            <td class="gutter" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle;">
            <pre class="line-numbers" style="margin-top: 0px; margin-bottom: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; text-align: right; text-shadow: rgb(2, 16, 20) 0px -1px; padding: 0.8em !important; border-right-width: 1px !important; border-right-style: solid !important; border-right-color: rgb(0, 35, 44) !important; background-image: url(&quot;/images/noise.png?1457420710&quot;) !important; background-attachment: initial !important; background-color: rgb(7, 54, 66) !important; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: 0% 0%; background-repeat: initial !important;"><span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">1</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">2</span></pre>
            </td>
            <td class="code" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle; width: 3301px;">
            <pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; border: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; background: none;"><code class="" style="margin: 0px; padding: 0.8em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; vertical-align: baseline; overflow-y: hidden; display: block; overflow-x: auto; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace !important; background: rgb(0, 0, 0);"><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">&gt; curl --data '{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;method&quot;: &quot;eth_sendTransaction&quot;, &quot;params&quot;: [{&quot;from&quot;: &quot;0xeb85a5557e5bdc18ee1934a89d8bb402398ee26a&quot;, &quot;gas&quot;: &quot;0xb8a9&quot;, &quot;data&quot;: &quot;0x6060604052605f8060106000396000f3606060405260e060020a6000350463c6888fa18114601a575b005b60586004356007810260609081526000907f24abdb5865df5079dcc5ac590ff6f01d5c16edbc5fab4e195d9febd1114503da90602090a15060070290565b5060206060f3&quot;}], &quot;id&quot;: 6}' localhost:8545 </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">{&quot;id&quot;:6,&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;result&quot;:&quot;0x3a90b5face52c4c5f30d507ccf51b0209ca628c6824d0532bcd6283df7c08</span></code></pre>
            </td>
        </tr>
    </tbody>
</table>
</div>
</figure></p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">交易由节点接受，交易散表被返还。我们可以用这个散表来跟踪交易。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">下一步是决定部署合约的地址。每个执行的交易都会创建一个接收。这个接收包含交易的各种信息，比如交易被包含在哪个区块，以太坊虚拟机用掉多少gas。如果交易创建了一个合约，它也会包含合约地址。我们可以用eth_getTransactionReceipt RPC方法检索接收。</p>
<p><figure class="code" style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; box-shadow: rgba(0, 0, 0, 0.0588235) 0px 0px 10px; color: rgb(34, 34, 34); background: none rgb(248, 248, 248);">
<div class="highlight" style="margin: 0px; padding: 0px; border: 1px solid rgb(5, 35, 43) !important; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; overflow-y: hidden; overflow-x: auto; background: rgb(0, 43, 54);">
<table style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; border-collapse: collapse; border-spacing: 0px;">
    <tbody style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
        <tr style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
            <td class="gutter" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle;">
            <pre class="line-numbers" style="margin-top: 0px; margin-bottom: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; text-align: right; text-shadow: rgb(2, 16, 20) 0px -1px; padding: 0.8em !important; border-right-width: 1px !important; border-right-style: solid !important; border-right-color: rgb(0, 35, 44) !important; background-image: url(&quot;/images/noise.png?1457420710&quot;) !important; background-attachment: initial !important; background-color: rgb(7, 54, 66) !important; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: 0% 0%; background-repeat: initial !important;"><span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">1</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">2</span></pre>
            </td>
            <td class="code" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle; width: 1437px;">
            <pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; border: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; background: none;"><code class="" style="margin: 0px; padding: 0.8em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; vertical-align: baseline; overflow-y: hidden; display: block; overflow-x: auto; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace !important; background: rgb(0, 0, 0);"><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">&gt; curl --data '{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;method&quot;: &quot;eth_getTransactionReceipt&quot;, &quot;params&quot;: [&quot;0x3a90b5face52c4c5f30d507ccf51b0209ca628c6824d0532bcd6283df7c08a7c&quot;], &quot;id&quot;: 7}' localhost:8545 </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">{&quot;id&quot;:7,&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;result&quot;:{&quot;transactionHash&quot;:&quot;0x3a90b5face52c4c5f30d507ccf51b0209ca628c682</span></code></pre>
            </td>
        </tr>
    </tbody>
</table>
</div>
</figure></p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">我们可以看到合约在0x6ff93b4b46b41c0c3c9baee01c255d3b4675963d上被创建。如果你得到了零而不是接收，说明还没有被纳入区块。等一下，检查看看你的矿工是否在运行，重新试一遍。</p>
<h2 style="margin: 0px 0px 1em; padding: 0.8em 0px 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background: url(&quot;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAABCAYAAACsXeyTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAFUlEQVQIHWNIS0sr/v//PwMMDzY+ADqMahlW4J91AAAAAElFTkSuQmCC&quot;) 0% 0% repeat-x rgb(248, 248, 248);">和智能合约互动</h2>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">现在已经部署了合约，我们可以和它互动了。有两种方法，发送交易或像之前所介绍的那样使用调用。在这个例子中，我们会发送交易到合约的multiply方法。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">如果我们看eth_sendTransaction 的档案，可以发现我们需要提供几个参数。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">在我们的实例中，需要具体说明from, to 和data参数。From是我们账户的公共地址，to是合约地址。Data参数有一点困难。它包括了规定调用哪个方法和哪个参数的负载量。这就需要ABI发挥作用了。ABI规定了如何为以太坊虚拟机规定和编码数据。你可以在这儿阅读ABI的所有具体信息。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">负载量的字节是功能选择符，规定了调用哪个方法。它取Keccak散表的头4个字节，涵盖功能名称参数类型，并进行十六进制编码。multiply功能接受一个单元，也就是uint256的别名。这就让我们进行：</p>
<p><figure class="code" style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; box-shadow: rgba(0, 0, 0, 0.0588235) 0px 0px 10px; color: rgb(34, 34, 34); background: none rgb(248, 248, 248);">
<div class="highlight" style="margin: 0px; padding: 0px; border: 1px solid rgb(5, 35, 43) !important; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; overflow-y: hidden; overflow-x: auto; background: rgb(0, 43, 54);">
<table style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; border-collapse: collapse; border-spacing: 0px;">
    <tbody style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
        <tr style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
            <td class="gutter" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle;">
            <pre class="line-numbers" style="margin-top: 0px; margin-bottom: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; text-align: right; text-shadow: rgb(2, 16, 20) 0px -1px; padding: 0.8em !important; border-right-width: 1px !important; border-right-style: solid !important; border-right-color: rgb(0, 35, 44) !important; background-image: url(&quot;/images/noise.png?1457420710&quot;) !important; background-attachment: initial !important; background-color: rgb(7, 54, 66) !important; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: 0% 0%; background-repeat: initial !important;"><span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">1</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">2</span></pre>
            </td>
            <td class="code" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle; width: 757px;">
            <pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; border: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; background: none;"><code class="" style="margin: 0px; padding: 0.8em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; vertical-align: baseline; overflow-y: hidden; display: block; overflow-x: auto; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace !important; background: rgb(0, 0, 0);"><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">&gt; web3.sha3(&quot;multiply(uint256)&quot;).substring(0, 8) </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">&quot;c6888fa1&quot;</span></code></pre>
            </td>
        </tr>
    </tbody>
</table>
</div>
</figure></p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">在此页查看细节。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">下一步是编码参数。我们只有一个unit256，让我们假定提供了值6。ABI有一个章节规定了怎么编码uint字节。</p>
<blockquote style="margin: 0px 0px 1.5em; padding: 0px 0px 0px 1.5em; border-width: 0px 0px 0px 4px; border-left-style: solid; border-left-color: rgba(170, 170, 170, 0.498039); font-style: italic; font-stretch: inherit; line-height: 1.5em; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 1.2em; vertical-align: baseline; quotes: none; position: relative; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">
<p style="margin-bottom: 1.5em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 22.08px; vertical-align: baseline;">int<m>: enc(X) is the big-endian two&rsquo;s complement encoding of X, padded on the higher-oder (left) side with 0xff for negative X and with zero 字节s for positive X such that the length is a multiple of 32 bytes.</m></p>
</blockquote>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">它编码到0000000000000000000000000000000000000000000000000000000000000006. 将功能选择符和编码参数结合起来，数据就会变成0xc6888fa10000000000000000000000000000000000000000000000000000000000000006.</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">我们来试一下：</p>
<p><figure class="code" style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; box-shadow: rgba(0, 0, 0, 0.0588235) 0px 0px 10px; color: rgb(34, 34, 34); background: none rgb(248, 248, 248);">
<div class="highlight" style="margin: 0px; padding: 0px; border: 1px solid rgb(5, 35, 43) !important; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; overflow-y: hidden; overflow-x: auto; background: rgb(0, 43, 54);">
<table style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; border-collapse: collapse; border-spacing: 0px;">
    <tbody style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
        <tr style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
            <td class="gutter" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle;">
            <pre class="line-numbers" style="margin-top: 0px; margin-bottom: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; text-align: right; text-shadow: rgb(2, 16, 20) 0px -1px; padding: 0.8em !important; border-right-width: 1px !important; border-right-style: solid !important; border-right-color: rgb(0, 35, 44) !important; background-image: url(&quot;/images/noise.png?1457420710&quot;) !important; background-attachment: initial !important; background-color: rgb(7, 54, 66) !important; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: 0% 0%; background-repeat: initial !important;"><span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">1</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">2</span></pre>
            </td>
            <td class="code" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle; width: 2381px;">
            <pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; border: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; background: none;"><code class="" style="margin: 0px; padding: 0.8em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; vertical-align: baseline; overflow-y: hidden; display: block; overflow-x: auto; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace !important; background: rgb(0, 0, 0);"><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">&gt; curl --data '{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;method&quot;: &quot;eth_sendTransaction&quot;, &quot;params&quot;: [{&quot;from&quot;: &quot;0xeb85a5557e5bdc18ee1934a89d8bb402398ee26a&quot;, &quot;to&quot;: &quot;0x6ff93b4b46b41c0c3c9baee01c255d3b4675963d&quot;, &quot;data&quot;: &quot;0xc6888fa10000000000000000000000000000000000000000000000000000000000000006&quot;}], &quot;id&quot;: 8}' localhost:8545 </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">{&quot;id&quot;:8,&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;result&quot;:&quot;0x759cf065cbc22e9d779748dc53763854e5376eea07409e590c990eafc0869</span></code></pre>
            </td>
        </tr>
    </tbody>
</table>
</div>
</figure></p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">由于我们发送了交易，于是有交易散表返回。如果我们检索接收，可以看到一些新内容：</p>
<p><figure class="code" style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; box-shadow: rgba(0, 0, 0, 0.0588235) 0px 0px 10px; color: rgb(34, 34, 34); background: none rgb(248, 248, 248);">
<div class="highlight" style="margin: 0px; padding: 0px; border: 1px solid rgb(5, 35, 43) !important; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; overflow-y: hidden; overflow-x: auto; background: rgb(0, 43, 54);">
<table style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; border-collapse: collapse; border-spacing: 0px;">
    <tbody style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
        <tr style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
            <td class="gutter" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle;">
            <pre class="line-numbers" style="margin-top: 0px; margin-bottom: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; text-align: right; text-shadow: rgb(2, 16, 20) 0px -1px; padding: 0.8em !important; border-right-width: 1px !important; border-right-style: solid !important; border-right-color: rgb(0, 35, 44) !important; background-image: url(&quot;/images/noise.png?1457420710&quot;) !important; background-attachment: initial !important; background-color: rgb(7, 54, 66) !important; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: 0% 0%; background-repeat: initial !important;"><span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">1</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">2</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">3</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">4</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">5</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">6</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">7</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">8</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">9</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">10</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">11</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">12</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">13</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">14</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">15</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">16</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">17</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">18</span></pre>
            </td>
            <td class="code" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle; width: 805px;">
            <pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; border: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; background: none;"><code class="" style="margin: 0px; padding: 0.8em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; vertical-align: baseline; overflow-y: hidden; display: block; overflow-x: auto; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace !important; background: rgb(0, 0, 0);"><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">{ </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">blockHash: &quot;0xbf0a347307b8c63dd8c1d3d7cbdc0b463e6e7c9bf0a35be40393588242f01d55&quot;, blockNumber: 268, </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">contractAddress: null, </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">cumulativeGasUsed: 22631, </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">gasUsed: 22631, </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">logs: [{ </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">      address: &quot;0x6ff93b4b46b41c0c3c9baee01c255d3b4675963d&quot;, </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">      blockHash: &quot;0xbf0a347307b8c63dd8c1d3d7cbdc0b463e6e7c9bf0a35be40393588242f01d55&quot;, </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">      blockNumber: 268, </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">      data: &quot;0x000000000000000000000000000000000000000000000000000000000000002a&quot;, </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">      logIndex: 0, </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">      topics: [&quot;0x24abdb5865df5079dcc5ac590ff6f01d5c16edbc5fab4e195d9febd1114503da&quot;], </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">      transactionHash: &quot;0x759cf065cbc22e9d779748dc53763854e5376eea07409e590c990eafc0869d74&quot;, </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">      transactionIndex: 0 </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">  }], </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">  transactionHash: &quot;0x759cf065cbc22e9d779748dc53763854e5376eea07409e590c990eafc0869d74&quot;, </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">  transactionIndex: 0 </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">}</span></code></pre>
            </td>
        </tr>
    </tbody>
</table>
</div>
</figure></p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">接收包含一个日志。日志由以太坊虚拟机在交易执行时生成，包含接收。如果我们看Multiply功能，可以看到打印事件和输入次数7一起被提出。由于打印事件的参数是uint256，我们可以根据ABI规则对它进行编码，这样我们就会得到预期的十进制42.。除数据外，主题用于决定什么事件来创建日志，是毫无意义的：</p>
<p><figure class="code" style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; box-shadow: rgba(0, 0, 0, 0.0588235) 0px 0px 10px; color: rgb(34, 34, 34); background: none rgb(248, 248, 248);">
<div class="highlight" style="margin: 0px; padding: 0px; border: 1px solid rgb(5, 35, 43) !important; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; overflow-y: hidden; overflow-x: auto; background: rgb(0, 43, 54);">
<table style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; border-collapse: collapse; border-spacing: 0px;">
    <tbody style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
        <tr style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
            <td class="gutter" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle;">
            <pre class="line-numbers" style="margin-top: 0px; margin-bottom: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; text-align: right; text-shadow: rgb(2, 16, 20) 0px -1px; padding: 0.8em !important; border-right-width: 1px !important; border-right-style: solid !important; border-right-color: rgb(0, 35, 44) !important; background-image: url(&quot;/images/noise.png?1457420710&quot;) !important; background-attachment: initial !important; background-color: rgb(7, 54, 66) !important; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: 0% 0%; background-repeat: initial !important;"><span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">1</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">2</span></pre>
            </td>
            <td class="code" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle; width: 757px;">
            <pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; border: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; background: none;"><code class="" style="margin: 0px; padding: 0.8em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; vertical-align: baseline; overflow-y: hidden; display: block; overflow-x: auto; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace !important; background: rgb(0, 0, 0);"><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">&gt; web3.sha3(&quot;Print(uint256)&quot;) </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">&quot;24abdb5865df5079dcc5ac590ff6f01d5c16edbc5fab4e195d9febd1114503da&quot;</span></code></pre>
            </td>
        </tr>
    </tbody>
</table>
</div>
</figure></p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">你可以在Solidity教程中阅读更多关于事件，主题和索引的内容。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">这只是对一些最常见任务的简单介绍。在RPC维基页面查看可用RPC方法的完整列表。</p>
<h2 style="margin: 0px 0px 1em; padding: 0.8em 0px 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background: url(&quot;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAABCAYAAACsXeyTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAFUlEQVQIHWNIS0sr/v//PwMMDzY+ADqMahlW4J91AAAAAElFTkSuQmCC&quot;) 0% 0% repeat-x rgb(248, 248, 248);">Web3.js</h2>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">正如我们在之前的案例所见，使用JSON-RPC界面相当单调乏味且容易出错，尤其是在处理ABI的时候。Web3.js是javascript库，在以太坊RPC界面顶端。它的目标是提供更友好的界面，减少出错机会。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">用web3部署Multiply7合约看起来是这样：</p>
<p><figure class="code" style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; box-shadow: rgba(0, 0, 0, 0.0588235) 0px 0px 10px; color: rgb(34, 34, 34); background: none rgb(248, 248, 248);">
<div class="highlight" style="margin: 0px; padding: 0px; border: 1px solid rgb(5, 35, 43) !important; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; overflow-y: hidden; overflow-x: auto; background: rgb(0, 43, 54);">
<table style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; border-collapse: collapse; border-spacing: 0px;">
    <tbody style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
        <tr style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
            <td class="gutter" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle;">
            <pre class="line-numbers" style="margin-top: 0px; margin-bottom: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; text-align: right; text-shadow: rgb(2, 16, 20) 0px -1px; padding: 0.8em !important; border-right-width: 1px !important; border-right-style: solid !important; border-right-color: rgb(0, 35, 44) !important; background-image: url(&quot;/images/noise.png?1457420710&quot;) !important; background-attachment: initial !important; background-color: rgb(7, 54, 66) !important; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: 0% 0%; background-repeat: initial !important;"><span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">1</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">2</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">3</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">4</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">5</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">6</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">7</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">8</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">9</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">10</span></pre>
            </td>
            <td class="code" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle; width: 797px;">
            <pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; border: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; background: none;"><code class="" style="margin: 0px; padding: 0.8em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; vertical-align: baseline; overflow-y: hidden; display: block; overflow-x: auto; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace !important; background: rgb(0, 0, 0);"><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">var source = 'contract Multiply7 { event Print(uint); function multiply(uint input) returns (uint </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">var compiled = web3.eth.compile.solidity(source); </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">var code = compiled.Multiply7.code; </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">var abi = compiled.Multiply7.info.abiDefinition; </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">web3.eth.contract(abi).new({from: &quot;0xeb85a5557e5bdc18ee1934a89d8bb402398ee26a&quot;, data: code}, func </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">   if (!err &amp;&amp; contract.address) </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">      console.log(&quot;deployed on:&quot;, contract.address); </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">   } </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">); </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">deployed on: 0x0ab60714033847ad7f0677cc7514db48313976e2</span></code></pre>
            </td>
        </tr>
    </tbody>
</table>
</div>
</figure></p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">装载一个部署的合约，发送交易：</p>
<p><figure class="code" style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; box-shadow: rgba(0, 0, 0, 0.0588235) 0px 0px 10px; color: rgb(34, 34, 34); background: none rgb(248, 248, 248);">
<div class="highlight" style="margin: 0px; padding: 0px; border: 1px solid rgb(5, 35, 43) !important; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; overflow-y: hidden; overflow-x: auto; background: rgb(0, 43, 54);">
<table style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; border-collapse: collapse; border-spacing: 0px;">
    <tbody style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
        <tr style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
            <td class="gutter" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle;">
            <pre class="line-numbers" style="margin-top: 0px; margin-bottom: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; text-align: right; text-shadow: rgb(2, 16, 20) 0px -1px; padding: 0.8em !important; border-right-width: 1px !important; border-right-style: solid !important; border-right-color: rgb(0, 35, 44) !important; background-image: url(&quot;/images/noise.png?1457420710&quot;) !important; background-attachment: initial !important; background-color: rgb(7, 54, 66) !important; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: 0% 0%; background-repeat: initial !important;"><span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">1</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">2</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">3</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">4</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">5</span></pre>
            </td>
            <td class="code" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle; width: 917px;">
            <pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; border: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; background: none;"><code class="" style="margin: 0px; padding: 0.8em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; vertical-align: baseline; overflow-y: hidden; display: block; overflow-x: auto; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace !important; background: rgb(0, 0, 0);"><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">var source = 'contract Multiply7 { event Print(uint); function multiply(uint input) returns (uint) { Print(input </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">var compiled = web3.eth.compile.solidity(source); </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">var Multiply7 = web3.eth.contract(compiled.Multiply7.info.abiDefinition); </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">var multi = Multiply7.at(&quot;0x0ab60714033847ad7f0677cc7514db48313976e2&quot;) </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">multi.multiply.sendTransaction(6, {from: &quot;0xeb85a5557e5bdc18ee1934a89d8bb402398ee26a&quot;})</span></code></pre>
            </td>
        </tr>
    </tbody>
</table>
</div>
</figure></p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">注册一个回调，打印事件创建日志的时候会被调用。</p>
<p><figure class="code" style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; box-shadow: rgba(0, 0, 0, 0.0588235) 0px 0px 10px; color: rgb(34, 34, 34); background: none rgb(248, 248, 248);">
<div class="highlight" style="margin: 0px; padding: 0px; border: 1px solid rgb(5, 35, 43) !important; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; overflow-y: hidden; overflow-x: auto; background: rgb(0, 43, 54);">
<table style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; border-collapse: collapse; border-spacing: 0px;">
    <tbody style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
        <tr style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
            <td class="gutter" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle;">
            <pre class="line-numbers" style="margin-top: 0px; margin-bottom: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; text-align: right; text-shadow: rgb(2, 16, 20) 0px -1px; padding: 0.8em !important; border-right-width: 1px !important; border-right-style: solid !important; border-right-color: rgb(0, 35, 44) !important; background-image: url(&quot;/images/noise.png?1457420710&quot;) !important; background-attachment: initial !important; background-color: rgb(7, 54, 66) !important; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: 0% 0%; background-repeat: initial !important;"><span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">1</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">2</span></pre>
            </td>
            <td class="code" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle; width: 797px;">
            <pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; border: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; background: none;"><code class="" style="margin: 0px; padding: 0.8em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; vertical-align: baseline; overflow-y: hidden; display: block; overflow-x: auto; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace !important; background: rgb(0, 0, 0);"><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">multi.Print(function(err, data) { console.log(JSON.stringify(data)) }) </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">{&quot;address&quot;:&quot;0x0ab60714033847ad7f0677cc7514db48313976e2&quot;,&quot;args&quot;: {&quot;&quot;:&quot;21&quot;},&quot;blockHash&quot;:&quot;0x259c7dc0</span></code></pre>
            </td>
        </tr>
    </tbody>
</table>
</div>
</figure></p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">在web3.js维基页面查看更多信息。</p>
<h2 style="margin: 0px 0px 1em; padding: 0.8em 0px 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background: url(&quot;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAABCAYAAACsXeyTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAFUlEQVQIHWNIS0sr/v//PwMMDzY+ADqMahlW4J91AAAAAElFTkSuQmCC&quot;) 0% 0% repeat-x rgb(248, 248, 248);">控制台</h2>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">geth控制台提供命令行界面和javascript执行时间。它可以连接到本地或远程的geth或eth节点。它会装载用户能使用的web3.js库。这会允许用户从控制台用web3.js部署智能合约并和智能合约互动。实际上Web3.js章节的例子可以被复制进控制台。</p>
<h2 style="margin: 0px 0px 1em; padding: 0.8em 0px 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background: url(&quot;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAABCAYAAACsXeyTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAFUlEQVQIHWNIS0sr/v//PwMMDzY+ADqMahlW4J91AAAAAElFTkSuQmCC&quot;) 0% 0% repeat-x rgb(248, 248, 248);">查看合约与交易</h2>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">有几个可用的在线区块链浏览器，能让你查询以太坊区块链。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">查看列表：区块链浏览器。</p>
<h4 style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; font-size: 18.4px; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">在线区块链浏览器</h4>
<ul style="margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">EtherChain</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">EtherCamp</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">EtherScan （为测试网）</li>
</ul>
<h4 style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; font-size: 18.4px; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">其他资源</h4>
<ul style="margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">EtherNodes &ndash; 节点的地理分配，由客户端区分</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">EtherListen &ndash; 实时以太坊交易可视器和可听器</li>
</ul>]]></description>
			<link>http://meisw.wdlinux.cn//show-914-1.html</link>
			<category domain="http://meisw.wdlinux.cn//category-54-1.html">以太坊</category>
			<pubDate>2016-12-21 23:42</pubDate>
		</item>
		<item>
			<guid>http://meisw.wdlinux.cn//show-913-1.html</guid>
			<title>集成开发环境(IDE) Mix介绍</title>
			<author>admin</author>
			<description><![CDATA[<p>&nbsp;</p>
<h2 style="margin: 0px 0px 1em; padding: 0.8em 0px 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background: none rgb(248, 248, 248);">Mix</h2>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">IDE Mix旨在作为开发者帮你创建，排错和部署合约及去中心化应用(后端和前端的合约)</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">警告 &ndash; 有很多OS X上关于Mix的crash-at-boot 事件报告。这个事件是Heisenbug，我们已经跟踪了一两个月。我们现有的最佳变通方案是用排错配置，像这样：</p>
<p><figure class="code" style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; box-shadow: rgba(0, 0, 0, 0.0588235) 0px 0px 10px; color: rgb(34, 34, 34); background: none rgb(248, 248, 248);">
<div class="highlight" style="margin: 0px; padding: 0px; border: 1px solid rgb(5, 35, 43) !important; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; overflow-y: hidden; overflow-x: auto; background: rgb(0, 43, 54);">
<table style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; border-collapse: collapse; border-spacing: 0px;">
    <tbody style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
        <tr style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
            <td class="gutter" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle;">
            <pre class="line-numbers" style="margin-top: 0px; margin-bottom: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; text-align: right; text-shadow: rgb(2, 16, 20) 0px -1px; padding: 0.8em !important; border-right-width: 1px !important; border-right-style: solid !important; border-right-color: rgb(0, 35, 44) !important; background-image: url(&quot;/images/noise.png?1457420710&quot;) !important; background-attachment: initial !important; background-color: rgb(7, 54, 66) !important; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: 0% 0%; background-repeat: initial !important;"><span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">1</span></pre>
            </td>
            <td class="code" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle; width: 757px;">
            <pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; border: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; background: none;"><code class="" style="margin: 0px; padding: 0.8em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; vertical-align: baseline; overflow-y: hidden; display: block; overflow-x: auto; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace !important; background: rgb(0, 0, 0);"><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">cmake -DCMAKE_BUILD_TYPE=Debug ..</span></code></pre>
            </td>
        </tr>
    </tbody>
</table>
</div>
</figure></p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">警告 &ndash; 正在研究一个Mix的替代物，叫做Remix。如果你在Mix经历了事件，在Remix更成熟之前，你最好寻找替代方案。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">从创建一个新项目开始，它包括</p>
<ul style="margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">合约</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">html 文件</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">JavaScript 文件</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">style 文件</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">image 文件</li>
</ul>
<h2 style="margin: 0px 0px 1em; padding: 0.8em 0px 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background: url(&quot;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAABCAYAAACsXeyTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAFUlEQVQIHWNIS0sr/v//PwMMDzY+ADqMahlW4J91AAAAAElFTkSuQmCC&quot;) 0% 0% repeat-x rgb(248, 248, 248);">项目编辑器</h2>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">你可以用项目来管理去中心化应用的创建和测试。项目会包括与后端和前端相关的数据以及和你的场景（区块链互动）相关的数据，用来排错和测试。相关文件 会被创建并自动保存到项目目录中。</p>
<h3 style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; font-size: 1.3em; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">创建一个新项目</h3>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">去中心化应用的开发始于新项目的创建。在&ldquo;编辑&rdquo;菜单创建一个新项目。进入项目名称，比如 &ldquo;等级&rdquo;，选择项目文件路径。</p>
<h3 style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; font-size: 1.3em; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">编辑后端合约文件</h3>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">一个新项目默认包含一个合约，&ldquo;Contract&rdquo;用于使用Solidity语言在区块链后端开发，&ldquo;index.html&rdquo;用于前端。查看Solidity教程或参考。 编辑空的默认合约&ldquo;Contract&rdquo;,比如</p>
<p><figure class="code" style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; box-shadow: rgba(0, 0, 0, 0.0588235) 0px 0px 10px; color: rgb(34, 34, 34); background: none rgb(248, 248, 248);">
<div class="highlight" style="margin: 0px; padding: 0px; border: 1px solid rgb(5, 35, 43) !important; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; overflow-y: hidden; overflow-x: auto; background: rgb(0, 43, 54);">
<table style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; border-collapse: collapse; border-spacing: 0px;">
    <tbody style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
        <tr style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
            <td class="gutter" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle;">
            <pre class="line-numbers" style="margin-top: 0px; margin-bottom: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; text-align: right; text-shadow: rgb(2, 16, 20) 0px -1px; padding: 0.8em !important; border-right-width: 1px !important; border-right-style: solid !important; border-right-color: rgb(0, 35, 44) !important; background-image: url(&quot;/images/noise.png?1457420710&quot;) !important; background-attachment: initial !important; background-color: rgb(7, 54, 66) !important; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: 0% 0%; background-repeat: initial !important;"><span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">1</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">2</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">3</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">4</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">5</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">6</span></pre>
            </td>
            <td class="code" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle; width: 757px;">
            <pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; border: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; background: none;"><code class="" style="margin: 0px; padding: 0.8em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; vertical-align: baseline; overflow-y: hidden; display: block; overflow-x: auto; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace !important; background: rgb(0, 0, 0);"><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">contract Rating { </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">  function setRating(bytes32 _key, uint256 _value) { </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">    ratings[_key] = _value; </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">    mapping (bytes32 =&gt; uint256) public ratings; </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">  } </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">}</span></code></pre>
            </td>
        </tr>
    </tbody>
</table>
</div>
</figure></p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">查看Solidity教程寻求帮助，以solidity编程语言开始。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">保存变动</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">编辑前端html文件 选择默认index.html文件并输入以下代码</p>
<p><figure class="code" style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; box-shadow: rgba(0, 0, 0, 0.0588235) 0px 0px 10px; color: rgb(34, 34, 34); background: none rgb(248, 248, 248);"><figcaption style="margin: 0px; padding: 0px; border-width: 1px 1px 0px; border-top-style: solid; border-right-style: solid; border-left-style: solid; border-top-color: rgb(203, 203, 203); border-right-color: rgb(165, 165, 165); border-left-color: rgb(165, 165, 165); font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: 2em; font-family: 'Helvetica Neue', Arial, 'Lucida Grande', 'Lucida Sans Unicode', Lucida, sans-serif; font-size: 13px; vertical-align: baseline; position: relative; text-align: center; text-shadow: rgb(203, 204, 204) 0px 1px 0px; color: rgb(71, 71, 71); border-top-left-radius: 5px; border-top-right-radius: 5px; background: url(&quot;/images/code_bg.png?1457420710&quot;) 50% 0% repeat-x rgb(170, 170, 170);"></figcaption>
<div class="highlight" style="margin: 0px; padding: 0px; border: 1px solid rgb(5, 35, 43) !important; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; overflow-y: hidden; overflow-x: auto; background: rgb(0, 43, 54);">
<table style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; border-collapse: collapse; border-spacing: 0px;">
    <tbody style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
        <tr style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
            <td class="gutter" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle;">
            <pre class="line-numbers" style="margin-top: 0px; margin-bottom: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; text-align: right; text-shadow: rgb(2, 16, 20) 0px -1px; padding: 0.8em !important; border-right-width: 1px !important; border-right-style: solid !important; border-right-color: rgb(0, 35, 44) !important; background-image: url(&quot;/images/noise.png?1457420710&quot;) !important; background-attachment: initial !important; background-color: rgb(7, 54, 66) !important; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: 0% 0%; background-repeat: initial !important;"><span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">1</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">2</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">3</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">4</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">5</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">6</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">7</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">8</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">9</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">10</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">11</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">12</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">13</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">14</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">15</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">16</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">17</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">18</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">19</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">20</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">21</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">22</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">23</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">24</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">25</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">26</span></pre>
            </td>
            <td class="code" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle; width: 749px;">
            <pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; border: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; background: none;"><code class="html" style="margin: 0px; padding: 0.8em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; vertical-align: baseline; overflow-y: hidden; display: block; overflow-x: auto; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace !important; background: rgb(0, 0, 0);"><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;"> .... <span class="nt" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; font-weight: bold !important; color: rgb(38, 139, 210) !important;">&lt;script&gt;</span> </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;"><span class="kd" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(38, 139, 210) !important;">function</span> <span class="nx" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(181, 137, 0) !important;">getRating</span><span class="p" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">()</span> <span class="p" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">{</span> </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">  <span class="kd" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(38, 139, 210) !important;">var</span> <span class="nx" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(181, 137, 0) !important;">param</span> <span class="o" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; font-weight: bold !important;">=</span> <span class="nb" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(133, 153, 0) !important;">document</span><span class="p" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">.</span><span class="nx" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(181, 137, 0) !important;">getElementById</span><span class="p" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">(</span><span class="err" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(220, 50, 47) !important; background: none !important;">&ldquo;</span><span class="nx" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(181, 137, 0) !important;">query</span><span class="err" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(220, 50, 47) !important; background: none !important;">&rdquo;</span><span class="p" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">).</span><span class="nx" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(181, 137, 0) !important;">value</span><span class="p" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">;</span> </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">  <span class="kd" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(38, 139, 210) !important;">var</span> <span class="nx" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(181, 137, 0) !important;">res</span> <span class="o" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; font-weight: bold !important;">=</span> <span class="nx" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(181, 137, 0) !important;">contracts</span><span class="p" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">[</span><span class="err" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(220, 50, 47) !important; background: none !important;">&ldquo;</span><span class="nx" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(181, 137, 0) !important;">Rating</span><span class="err" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(220, 50, 47) !important; background: none !important;">&rdquo;</span><span class="p" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">].</span><span class="nx" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(181, 137, 0) !important;">contract</span><span class="p" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">.</span><span class="nx" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(181, 137, 0) !important;">ratings</span><span class="p" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">(</span><span class="nx" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(181, 137, 0) !important;">param</span><span class="p" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">);</span> </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">  <span class="nb" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(133, 153, 0) !important;">document</span><span class="p" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">.</span><span class="nx" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(181, 137, 0) !important;">getElementById</span><span class="p" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">(</span><span class="err" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(220, 50, 47) !important; background: none !important;">&ldquo;</span><span class="nx" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(181, 137, 0) !important;">queryres</span><span class="err" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(220, 50, 47) !important; background: none !important;">&rdquo;</span><span class="p" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">).</span><span class="nx" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(181, 137, 0) !important;">innerText</span> <span class="o" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; font-weight: bold !important;">=</span> <span class="nx" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(181, 137, 0) !important;">res</span><span class="p" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">;</span> </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;"><span class="p" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">}</span> </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;"><span class="kd" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(38, 139, 210) !important;">function</span> <span class="nx" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(181, 137, 0) !important;">setRating</span><span class="p" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">()</span> <span class="p" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">{</span> </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">        <span class="kd" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(38, 139, 210) !important;">var</span> <span class="nx" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(181, 137, 0) !important;">key</span> <span class="o" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; font-weight: bold !important;">=</span> <span class="nb" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(133, 153, 0) !important;">document</span><span class="p" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">.</span><span class="nx" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(181, 137, 0) !important;">getElementById</span><span class="p" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">(</span><span class="s2" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(42, 161, 152) !important;">&quot;key&quot;</span><span class="p" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">).</span><span class="nx" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(181, 137, 0) !important;">value</span><span class="p" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">;</span> </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">        <span class="kd" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(38, 139, 210) !important;">var</span> <span class="nx" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(181, 137, 0) !important;">value</span> <span class="o" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; font-weight: bold !important;">=</span> <span class="nb" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(133, 153, 0) !important;">parseInt</span><span class="p" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">(</span><span class="nb" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(133, 153, 0) !important;">document</span><span class="p" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">.</span><span class="nx" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(181, 137, 0) !important;">getElementById</span><span class="p" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">(</span><span class="s2" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(42, 161, 152) !important;">&quot;value&quot;</span><span class="p" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">).</span><span class="nx" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(181, 137, 0) !important;">value</span><span class="p" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">);</span> </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">        <span class="kd" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(38, 139, 210) !important;">var</span> <span class="nx" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(181, 137, 0) !important;">res</span> <span class="o" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; font-weight: bold !important;">=</span> <span class="nx" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(181, 137, 0) !important;">contracts</span><span class="p" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">[</span><span class="s2" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(42, 161, 152) !important;">&quot;Rating&quot;</span><span class="p" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">].</span><span class="nx" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(181, 137, 0) !important;">contract</span><span class="p" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">.</span><span class="nx" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(181, 137, 0) !important;">setRating</span><span class="p" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">(</span><span class="nx" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(181, 137, 0) !important;">key</span><span class="p" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">,</span> <span class="nx" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(181, 137, 0) !important;">value</span><span class="p" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">);</span> </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;"><span class="p" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">}</span> </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;"><span class="nt" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; font-weight: bold !important; color: rgb(38, 139, 210) !important;">&lt;/script&gt;</span> </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">    <span class="nt" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; font-weight: bold !important; color: rgb(38, 139, 210) !important;">&lt;/head&gt;</span> </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">    <span class="nt" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; font-weight: bold !important; color: rgb(38, 139, 210) !important;">&lt;body</span> <span class="na" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(38, 139, 210) !important;">bgcolor=</span><span class="s" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(42, 161, 152) !important;">&quot;#E6E6FA&quot;</span><span class="nt" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; font-weight: bold !important; color: rgb(38, 139, 210) !important;">&gt;</span> </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">        <span class="nt" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; font-weight: bold !important; color: rgb(38, 139, 210) !important;">&lt;h1&gt;</span>Ratings<span class="nt" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; font-weight: bold !important; color: rgb(38, 139, 210) !important;">&lt;/h1&gt;</span> </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;"><span class="nt" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; font-weight: bold !important; color: rgb(38, 139, 210) !important;">&lt;div&gt;</span> Store: </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">            <span class="nt" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; font-weight: bold !important; color: rgb(38, 139, 210) !important;">&lt;input</span> <span class="na" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(38, 139, 210) !important;">type=</span><span class="s" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(42, 161, 152) !important;">&quot;string&quot;</span> <span class="na" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(38, 139, 210) !important;">id=</span><span class="s" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(42, 161, 152) !important;">&quot;key&quot;</span><span class="nt" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; font-weight: bold !important; color: rgb(38, 139, 210) !important;">&gt;</span> </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">            <span class="nt" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; font-weight: bold !important; color: rgb(38, 139, 210) !important;">&lt;input</span> <span class="na" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(38, 139, 210) !important;">type=</span><span class="s" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(42, 161, 152) !important;">&quot;number&quot;</span> <span class="na" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(38, 139, 210) !important;">id=</span><span class="s" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(42, 161, 152) !important;">&quot;value&quot;</span><span class="nt" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; font-weight: bold !important; color: rgb(38, 139, 210) !important;">&gt;</span> </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">            <span class="nt" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; font-weight: bold !important; color: rgb(38, 139, 210) !important;">&lt;button</span> <span class="na" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(38, 139, 210) !important;">onclick=</span><span class="s" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(42, 161, 152) !important;">&quot;setRating()&quot;</span><span class="nt" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; font-weight: bold !important; color: rgb(38, 139, 210) !important;">&gt;</span>Save<span class="nt" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; font-weight: bold !important; color: rgb(38, 139, 210) !important;">&lt;/button&gt;</span> </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;"><span class="nt" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; font-weight: bold !important; color: rgb(38, 139, 210) !important;">&lt;/div&gt;</span> <span class="nt" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; font-weight: bold !important; color: rgb(38, 139, 210) !important;">&lt;div&gt;</span> </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">            Query: </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">            <span class="nt" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; font-weight: bold !important; color: rgb(38, 139, 210) !important;">&lt;input</span> <span class="na" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(38, 139, 210) !important;">type=</span><span class="s" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(42, 161, 152) !important;">&quot;string&quot;</span> <span class="na" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(38, 139, 210) !important;">id=</span><span class="s" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(42, 161, 152) !important;">&quot;query&quot;</span> <span class="na" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(38, 139, 210) !important;">onkeyup=</span><span class="s" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(42, 161, 152) !important;">'getRating()'</span><span class="nt" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; font-weight: bold !important; color: rgb(38, 139, 210) !important;">&gt;</span> </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">            <span class="nt" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; font-weight: bold !important; color: rgb(38, 139, 210) !important;">&lt;div</span> <span class="na" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(38, 139, 210) !important;">id=</span><span class="s" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(42, 161, 152) !important;">&quot;queryres&quot;</span><span class="nt" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; font-weight: bold !important; color: rgb(38, 139, 210) !important;">&gt;&lt;/div&gt;</span> </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">        <span class="nt" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; font-weight: bold !important; color: rgb(38, 139, 210) !important;">&lt;/div&gt;</span> </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">    <span class="nt" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; font-weight: bold !important; color: rgb(38, 139, 210) !important;">&lt;/body&gt;</span> </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;"><span class="nt" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; font-weight: bold !important; color: rgb(38, 139, 210) !important;">&lt;/html&gt;</span> </span></code></pre>
            </td>
        </tr>
    </tbody>
</table>
</div>
</figure></p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">有可能添加很多合约文件和HTML, JavaScript, css文件</p>
<h2 style="margin: 0px 0px 1em; padding: 0.8em 0px 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background: url(&quot;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAABCAYAAACsXeyTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAFUlEQVQIHWNIS0sr/v//PwMMDzY+ADqMahlW4J91AAAAAElFTkSuQmCC&quot;) 0% 0% repeat-x rgb(248, 248, 248);">场景编辑器</h2>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">场景可以用于检测合约和为合约排错。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">一个场景就是一个本地区块链，区块可以在这里被挖矿而不需要工作量证明 &ndash;否则测试会很慢 ;)</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">一个场景包含一系列交易。通常，一个场景以去中心化应用的合约创建场景开始。 此外，进一步的交易会被添加测试并对去中心化应用排错。场景可以修正，例如，移除交易。注意如果要修正一个场景使之有效，需要进行重建。可以通过JS API用JS进行进一步测试。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">万一打不开，可以点击F7或Windows &gt; 展示右侧或主界面右上方的排错按钮来进入场景和排错器窗格。</p>
<h3 style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; font-size: 1.3em; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">创建和设置新场景</h3>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">第一次启动Mix的时候，会创建一个空场景，比如，不包含任何交易。添加账户并命名为&ldquo;MyAccount&rdquo;，设置初始余额为1以太币。点击确认。将场景重命名为&ldquo;Deploy&rdquo;。</p>
<h3 style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; font-size: 1.3em; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">修正账户的初始以太币余额</h3>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">实际上我们想做很多测试。编辑初始区块参数，将初始账户余额设置为1000 以太币。重建场景使它变得高效。</p>
<h3 style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; font-size: 1.3em; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">重建场景</h3>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">每次交易被修正或账户被添加的时候，场景必须重建以修正使之高效。注意如果一个场景重建，网络前端(本地存储)可能也需要重置(Mix不会自动操作)。</p>
<h3 style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; font-size: 1.3em; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">创建交易</h3>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">我们发送一些以太币给Bob。创建另一个名为&ldquo;Bob&rdquo;的账户，余额为0。在场景窗格创建一个新交易。点击&ldquo;Add Tx&hellip;&rdquo;，发送300以太币给Bob。添加一个区块。</p>
<h3 style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; font-size: 1.3em; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">改变和重新使用场景</h3>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">创建一个新场景或从一个场景开始，和几个你先复制的交易</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">重命名场景</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">通过指定要被移除的交易来修正场景</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">重建场景</p>
<h3 style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; font-size: 1.3em; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">展示调用</h3>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">一个合约调用就是一个功能调用。这不是交易， 因为合约调用不会改变状态。合约调用不是区块链的一部分，但是出于实用和用户体验设计的原因，在交易的同一功能层次展示调用很方便。JS图标提醒你这不是个交易而是个调用。要展示/隐藏调用，点击菜单里的场景 &ndash;&gt; 展示调用。</p>
<h2 style="margin: 0px 0px 1em; padding: 0.8em 0px 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background: url(&quot;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAABCAYAAACsXeyTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAFUlEQVQIHWNIS0sr/v//PwMMDzY+ADqMahlW4J91AAAAAElFTkSuQmCC&quot;) 0% 0% repeat-x rgb(248, 248, 248);">状态查看器</h2>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">这个面板区块在区块链面板下面，场景视图中。一旦区块链被运行，这个面板会展示区块链状态。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">说到状态，我们意味着所有账户余额(包括合约和正常账户)，存储(所有部署合约的全局变量)。这个面板的内容不是动态的，它取决于在区块链面板上选择的交易。这里展示的状态是执行所选择交易的状态结果。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);"><img src="http://assets.wangxiaoming.com/image/24-1.png" alt="" style="margin: 0px; padding: 0px; border: 0.5em solid rgb(255, 255, 255); font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; max-width: 100%; height: auto; border-radius: 0.3em; box-shadow: rgba(0, 0, 0, 0.14902) 0px 1px 4px; box-sizing: border-box;" /></p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">在那种情况下，部署了2个合约，选择的(testCtr的部署)是最后一个。状态视图展示了TestCtr和BasicContract的存储。</p>
<h2 style="margin: 0px 0px 1em; padding: 0.8em 0px 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background: url(&quot;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAABCAYAAACsXeyTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAFUlEQVQIHWNIS0sr/v//PwMMDzY+ADqMahlW4J91AAAAAElFTkSuQmCC&quot;) 0% 0% repeat-x rgb(248, 248, 248);">交易浏览器</h2>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">使用交易窗格</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">交易窗格使你能够探索交易接收，包括</p>
<ul style="margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">输入参数</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">返回参数</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">事件日志</li>
</ul>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">要显示交易浏览器，点击每个交易右侧的倒三角图标，会扩展出交易详情：&nbsp;<img src="http://assets.wangxiaoming.com/image/24-2.png" alt="" style="margin: 0px; padding: 0px; border: 0.5em solid rgb(255, 255, 255); font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; max-width: 100%; height: auto; border-radius: 0.3em; box-shadow: rgba(0, 0, 0, 0.14902) 0px 1px 4px; box-sizing: border-box;" /></p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">然后你可以复制剪贴板上的交易内容，编辑当前交易(然后你要重新运行区块链)， 或为交易排错。</p>
<h2 style="margin: 0px 0px 1em; padding: 0.8em 0px 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background: url(&quot;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAABCAYAAACsXeyTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAFUlEQVQIHWNIS0sr/v//PwMMDzY+ADqMahlW4J91AAAAAElFTkSuQmCC&quot;) 0% 0% repeat-x rgb(248, 248, 248);">JavaScript console</h2>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">Mix将以下对象暴露在全局窗口的语境下</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">web3 &ndash; 以太坊JavaScript API</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">合约：合约对象集合。钥匙代表合约名称。值是包含以下属性的对象：</p>
<ul style="margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">合约： 合约对象实例 (像在web3.eth.contract里一样创建)</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">地址： 上一个部署状态的合约地址(查看下面)</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">界面： 合约ABI</li>
</ul>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">查看JavaScript API 参考了解更多信息。</p>
<h3 style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; font-size: 1.3em; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">用JS控制台添加交易和本地调用</h3>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">如果合约名字是&ldquo;Sample&rdquo;，功能名字是&ldquo;set&rdquo;,有可能进行一个交易来调用 &ldquo;set&rdquo;，方法是写：</p>
<p><figure class="code" style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; box-shadow: rgba(0, 0, 0, 0.0588235) 0px 0px 10px; color: rgb(34, 34, 34); background: none rgb(248, 248, 248);"><figcaption style="margin: 0px; padding: 0px; border-width: 1px 1px 0px; border-top-style: solid; border-right-style: solid; border-left-style: solid; border-top-color: rgb(203, 203, 203); border-right-color: rgb(165, 165, 165); border-left-color: rgb(165, 165, 165); font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: 2em; font-family: 'Helvetica Neue', Arial, 'Lucida Grande', 'Lucida Sans Unicode', Lucida, sans-serif; font-size: 13px; vertical-align: baseline; position: relative; text-align: center; text-shadow: rgb(203, 204, 204) 0px 1px 0px; color: rgb(71, 71, 71); border-top-left-radius: 5px; border-top-right-radius: 5px; background: url(&quot;/images/code_bg.png?1457420710&quot;) 50% 0% repeat-x rgb(170, 170, 170);"></figcaption>
<div class="highlight" style="margin: 0px; padding: 0px; border: 1px solid rgb(5, 35, 43) !important; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; overflow-y: hidden; overflow-x: auto; background: rgb(0, 43, 54);">
<table style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; border-collapse: collapse; border-spacing: 0px;">
    <tbody style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
        <tr style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
            <td class="gutter" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle;">
            <pre class="line-numbers" style="margin-top: 0px; margin-bottom: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; text-align: right; text-shadow: rgb(2, 16, 20) 0px -1px; padding: 0.8em !important; border-right-width: 1px !important; border-right-style: solid !important; border-right-color: rgb(0, 35, 44) !important; background-image: url(&quot;/images/noise.png?1457420710&quot;) !important; background-attachment: initial !important; background-color: rgb(7, 54, 66) !important; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: 0% 0%; background-repeat: initial !important;"><span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">1</span></pre>
            </td>
            <td class="code" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle; width: 757px;">
            <pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; border: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; background: none;"><code class="html" style="margin: 0px; padding: 0.8em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; vertical-align: baseline; overflow-y: hidden; display: block; overflow-x: auto; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace !important; background: rgb(0, 0, 0);"><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">contracts[&quot;Sample&quot;].contract.set(14) </span></code></pre>
            </td>
        </tr>
    </tbody>
</table>
</div>
</figure></p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">如果调用可以进行，可以通过写以下命令完成：</p>
<p><figure class="code" style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; box-shadow: rgba(0, 0, 0, 0.0588235) 0px 0px 10px; color: rgb(34, 34, 34); background: none rgb(248, 248, 248);"><figcaption style="margin: 0px; padding: 0px; border-width: 1px 1px 0px; border-top-style: solid; border-right-style: solid; border-left-style: solid; border-top-color: rgb(203, 203, 203); border-right-color: rgb(165, 165, 165); border-left-color: rgb(165, 165, 165); font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: 2em; font-family: 'Helvetica Neue', Arial, 'Lucida Grande', 'Lucida Sans Unicode', Lucida, sans-serif; font-size: 13px; vertical-align: baseline; position: relative; text-align: center; text-shadow: rgb(203, 204, 204) 0px 1px 0px; color: rgb(71, 71, 71); border-top-left-radius: 5px; border-top-right-radius: 5px; background: url(&quot;/images/code_bg.png?1457420710&quot;) 50% 0% repeat-x rgb(170, 170, 170);"></figcaption>
<div class="highlight" style="margin: 0px; padding: 0px; border: 1px solid rgb(5, 35, 43) !important; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; overflow-y: hidden; overflow-x: auto; background: rgb(0, 43, 54);">
<table style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; border-collapse: collapse; border-spacing: 0px;">
    <tbody style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
        <tr style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
            <td class="gutter" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle;">
            <pre class="line-numbers" style="margin-top: 0px; margin-bottom: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; text-align: right; text-shadow: rgb(2, 16, 20) 0px -1px; padding: 0.8em !important; border-right-width: 1px !important; border-right-style: solid !important; border-right-color: rgb(0, 35, 44) !important; background-image: url(&quot;/images/noise.png?1457420710&quot;) !important; background-attachment: initial !important; background-color: rgb(7, 54, 66) !important; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: 0% 0%; background-repeat: initial !important;"><span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">1</span></pre>
            </td>
            <td class="code" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle; width: 757px;">
            <pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; border: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; background: none;"><code class="html" style="margin: 0px; padding: 0.8em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; vertical-align: baseline; overflow-y: hidden; display: block; overflow-x: auto; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace !important; background: rgb(0, 0, 0);"><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">contracts[&quot;Sample&quot;].contract.get.call() </span></code></pre>
            </td>
        </tr>
    </tbody>
</table>
</div>
</figure></p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">也有可能用web3对象的所有属性和功能： https：//github.com/以太坊/wiki/wiki/JavaScript-API</p>
<h2 style="margin: 0px 0px 1em; padding: 0.8em 0px 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background: url(&quot;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAABCAYAAACsXeyTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAFUlEQVQIHWNIS0sr/v//PwMMDzY+ADqMahlW4J91AAAAAElFTkSuQmCC&quot;) 0% 0% repeat-x rgb(248, 248, 248);">交易排错器</h2>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">Mix支持Solidity和组件级别合约代码排错。你可以在两个模式中切换，检索你所需要的相关信息。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">在任何执行阶段，以下信息都可用：</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">虚拟机堆栈 &ndash; 查看黄皮书获取虚拟机操作指南描述 调用堆栈 &ndash; 合约调用到另一个合约时会生长。双击堆栈框架来查看机器在框架里的状态。 存储 &ndash; 与合约相关的存储数据 内存 &ndash; 分配到这个执行点的机器内存 调用数据&ndash; 交易或调用参数</p>
<h3 style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; font-size: 1.3em; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">进入排错模式</h3>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">交易详情扩展后，你可以转换到排错视图，点击&ldquo;交易排错&rdquo;按钮。</p>
<h3 style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; font-size: 1.3em; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">在排错模式和单步调试交易之间切换</h3>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">这里打开了Solidity排错模式。用菜单按钮(排错 &ndash;&gt; 显示虚拟机代码)在Solidity和以太坊虚拟机排错模式之前转换</p>
<ul style="margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">在solidity排错模式下单步调试交易</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">在以太坊虚拟机排错模式下单步调试交易</li>
</ul>
<h2 style="margin: 0px 0px 1em; padding: 0.8em 0px 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background: url(&quot;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAABCAYAAACsXeyTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAFUlEQVQIHWNIS0sr/v//PwMMDzY+ADqMahlW4J91AAAAAElFTkSuQmCC&quot;) 0% 0% repeat-x rgb(248, 248, 248);">Dapps部署</h2>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">这个功能能够让用户在主区块链将当前的项目作为去中心化应用部署。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">这会部署合约和登记前端资源。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">部署过程包括3步：</p>
<ul style="margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">部署合约： 这一步会在主区块链部署合约。</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">打包Dapp： 这一步用于打包和上传前端资源。</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">注册： 要变成去中心化应用，以太坊浏览器(Mist或AlethZero)需要进入这个包裹。这一步会在资源存储的地方注册URL。</li>
</ul>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">要部署去中心化应用，请遵守以下指令：</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">点击Deploy, Deploy to Network</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">这个模式对话框会显示三部分(参见以上)：</p>
<ul style="margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">部署合约</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">选择场景</li>
</ul>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">&ldquo;以太坊节点URL&rdquo;是节点运行的位置，为了发起部署，一定会有一个节点在运行。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">&ldquo;选择部署场景&rdquo;是强制步骤。Mix会执行选定场景里的交易(除与合约创建或合约调用不相关的所有交易)。Mix会在下面的面板上展示所有的交易和所有相关参数。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">&ldquo;使用的Gas&rdquo;：取决于所选定的场景，Mix会展示使用的gas总量。</p>
<ul style="margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">部署场景</li>
</ul>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">&ldquo;部署账户&rdquo;允许选择Mix会用于执行交易的账户。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">&ldquo;Gas价格&rdquo;显示网络默认的gas价格。你也可以指定一个不同的值。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">&ldquo;部署成本&rdquo;：取决于你想使用的以及选定场景的gas价格的值。这会显示部署所需的以太币数量。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">&ldquo;部署的合约&rdquo;：没发生部署之前，这部分是空的。部署一完成，这部分就会被所有创建的合约地址填满。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">&ldquo;验证&rdquo;：这会显示验证数量(在最后一个区块顶部生成的区块数量，最后一个区块包含最近的部署交易)。Mix跟踪所有的交易。如果有一个丢失(无效)，它会展示在面板上。</p>
<ul style="margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">打包去中心化应用</li>
</ul>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">&ldquo;生成包裹&rdquo;这一行为会创建一个新的文件夹并命名为&ldquo;www&rdquo;,这个文件夹会包含所有被映射到当前部署合约上的资源和脚本。为了发布去中心化应用,你需要把www文件夹托管在一个网络服务器(很快会被IPFS和SWARM代替)。库中默认是不存在web3.js的。如果你想要在网络浏览器使用去中心化应用，就需要把这个库加进来。</p>
<h2 style="margin: 0px 0px 1em; padding: 0.8em 0px 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background: url(&quot;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAABCAYAAACsXeyTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAFUlEQVQIHWNIS0sr/v//PwMMDzY+ADqMahlW4J91AAAAAElFTkSuQmCC&quot;) 0% 0% repeat-x rgb(248, 248, 248);">代码编辑器</h2>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">这个编辑器提供代码编辑器的基本功能。</p>
<ul style="margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">在Solidity或JavaScript模式下，可以用自动补全插件(Ctrl + Space).</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">增大/减小字体 (Ctrl +, Ctrl &ndash;)</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">在Solidity模式下，可以显示gas预估值(工具-&gt; 显示Gas预估值)。这会把所有需要最小量gas的所有状态都加亮显示。如果需要的gas变得很重要，颜色会变红。它也会显示最大的交易执行费用(每个功能)。</li>
</ul>]]></description>
			<link>http://meisw.wdlinux.cn//show-913-1.html</link>
			<category domain="http://meisw.wdlinux.cn//category-54-1.html">以太坊</category>
			<pubDate>2016-12-21 23:42</pubDate>
		</item>
		<item>
			<guid>http://meisw.wdlinux.cn//show-912-1.html</guid>
			<title>Dapp及相关开发工具介绍</title>
			<author>admin</author>
			<description><![CDATA[<h2 style="margin: 0px 0px 1em; padding: 0.8em 0px 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background: none rgb(248, 248, 248);">去中心化应用</h2>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">去中心化应用是可以使用户和供应商之间直接互动的服务(例如，连接某些市场上的买方和卖方，文件存储里的持有者和储存者)。以太坊去中心化应用典型地通过HTML/Javascript网络应用与用户互动，使用Javascript API与区块链通信。去中心化应用典型地在区块链上有自己的相关合约套件，用来编码商业逻辑，允许持久存储对共识要求严格的状态。记住由于以太坊网络上的运算天生冗余，执行的gas成本会比离链的私人执行成本更高。这就激励着去中心化应用开发者限制执行的代码数量和储存在区块链上的代码数量。</p>
<h3 style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; font-size: 1.3em; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">去中心化应用目录</h3>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">使用以太坊的去中心化应用被编译到以下列表，在开发的不同阶段列出(概念，工作原型，实时/部署的)。如果你在开发去中心化应用， 考虑向这些列表添加入口：</p>
<ul style="margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">&ETH;apps 的Ethercasts状态</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">Dappslist</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">Dappcentral &ndash; 去中心化应用的分类页面，带说明，代码验证和网络数据。</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">Dapps邮件列表 &ndash; 以太坊上的开发者邮件列表(停止使用)。</li>
</ul>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">列表中提供的去中心化服务覆盖大范围的领域，包括金融，保险，预测市场，社交网络，运算和存储分配，赌博，市场，物联网，管理，合作，开发和游戏。</p>
<ul style="margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">我们最终会预期什么应用?&nbsp;<a href="https://www.reddit.com/r/ethereum/comments/2mnl7f/the_top_10_ether_dapps_of_201" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; color: rgb(117, 21, 144); transition: color 0.3s; white-space: pre-wrap; word-wrap: break-word;">https://www.reddit.com/r/ethereum/comments/2mnl7f/the_top_10_ether_dapps_of_201</a></li>
</ul>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">将来，去中心化应用可能会在去中心化应用浏览器里集成的dappstores中列出和分配。</p>
<h3 style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; font-size: 1.3em; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">去中心化应用浏览器</h3>
<ul style="margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">Mist &ndash; 由基金会开发的官方GUI去中心化应用浏览器，开发阶段。 Mist as Wallet dapp在试用中。</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">Syng &ndash; Jarrad Hope开发的移动以太坊浏览器(开发阶段) &ndash; 由DEVgrants支持</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">MetaMask &ndash; Aaron Kumavis Davis的浏览器内GUI。Github上的Epicenter Bitcoin访谈 &ndash; 由DEVgrants支持</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">AlethZero &ndash; C++ eth客户端GUI(停止使用)。</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">Supernova &ndash; (停止使用)。</li>
</ul>
<h2 style="margin: 0px 0px 1em; padding: 0.8em 0px 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background: url(&quot;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAABCAYAAACsXeyTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAFUlEQVQIHWNIS0sr/v//PwMMDzY+ADqMahlW4J91AAAAAElFTkSuQmCC&quot;) 0% 0% repeat-x rgb(248, 248, 248);">开发者工具</h2>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">去中心化应用开发需要理解Web3 Javascript API， the JSON RPC API和Solidity编程语言。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">注意：有开发者工具帮助你开发、测试和部署去中心化应用，自动使用以下列出的资源。</p>
<ul style="margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">Web3 JavaScript API &ndash; 想要和以太坊节点交互的时候，主要用到的JavaScript SDK。</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">JSON RPC API &ndash; 与节点交互的低级JSON RPC 2.0界面。这个API被Web3 JavaScript API使用。</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">Solidity Docs &ndash; Solidity是以太坊开发的智能合约语言，编译到以太坊虚拟机操作码。</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">测试网络 &ndash; 测试网络帮助开发者开发和测试以太坊代码及网络互动，不需花费主网络上自己的以太币。测试网络选项在下面列出。</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">去中心化应用开发资源。这会帮助你开发，排错和部署以太坊应用。</li>
</ul>
<h3 style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; font-size: 1.3em; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">去中心化应用开发资源</h3>
<ul style="margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">智能合约 ELI5 &bull;<a href="https://blog.slock.it/a-primer-to-the-decentralized-autonomous-organization-dao-69fb125bd3cd" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; color: rgb(117, 21, 144); transition: color 0.3s; white-space: pre-wrap; word-wrap: break-word;">https://blog.slock.it/a-primer-to-the-decentralized-autonomous-organization-dao-69fb125bd3cd</a></li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">向101小白介绍编程智能合约</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">标准化合约API列表</li>
</ul>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">示例</p>
<ul style="margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">pricefeed使用实例 &ndash; web3脚本打印所有的账户余额</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
    <p style="margin-bottom: 1.5em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">以太坊合约实例</p>
    <p style="margin-bottom: 1.5em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;"><a href="https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; color: rgb(117, 21, 144); transition: color 0.3s; white-space: pre-wrap; word-wrap: break-word;">https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/</a>&nbsp;<a href="https://github.com/ethereum/wiki/wiki/Dapp-Developer-Resources" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; color: rgb(117, 21, 144); transition: color 0.3s; white-space: pre-wrap; word-wrap: break-word;">https://github.com/ethereum/wiki/wiki/Dapp-Developer-Resources</a></p>
    </li>
</ul>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">教程</p>
<ul style="margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">ethereum.org上的去中心化应用教程</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">去中心化应用初学者教程系列</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">Eris的Solidity教程系列</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">高级Solidity教程</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;"><a href="http://ethereumj.io/blog/2015/09/09/friendly-ether-bot/" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; color: rgb(117, 21, 144); transition: color 0.3s; white-space: pre-wrap; word-wrap: break-word;">http://ethereumj.io/blog/2015/09/09/friendly-ether-bot/</a></li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;"><a href="https://github.com/ConsenSys/ether-pudding" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; color: rgb(117, 21, 144); transition: color 0.3s; white-space: pre-wrap; word-wrap: break-word;">https://github.com/ConsenSys/ether-pudding</a></li>
</ul>
<h3 style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; font-size: 1.3em; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">Mix-IDE</h3>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">Mix是官方以太坊IDE，它允许开发者在以太坊区块链创建和部署合约及去中心化应用。它包含一个Solidity源代码排错器。Mix</p>
<h3 style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; font-size: 1.3em; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">IDEs/Frameworks</h3>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">下面是用于写以太坊去中心化应用的开发者框架和IDE。</p>
<ul style="margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">Truffle &ndash; Truffle是以太坊的开发环境，测试框架和资产管道。</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">Dapple &ndash; Dapple是Solidity开发者工具以帮助建立和管理以太坊类似的区块链上复杂的合约体系。</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">Populus &ndash; Populus是用Python语言写的智能合约开发框架。</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">Eris-PM &ndash; Eris Package Manager部署并测试私有和公共链上的智能合约体系。</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">Embark &ndash; Embark是用JavaScript写的去中心化应用开发框架。</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">EtherScripter (已淘汰，停用)</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">韧性原始交易广播</li>
</ul>
<h3 style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; font-size: 1.3em; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">以太坊控制台</h3>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">以太坊节点的命令行控制台。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">以太坊控制台通过IPC连接到在背景运行的以太坊节点(用eth和geth测试)并提供一个交互的javascript控制台，包括web3对象和管理员附件。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">这里可以找到可用管理列表 以太坊节点控制指令</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">要使用这个控制台，你需要启动一个本地以太坊节点和可用的ipc沟通插口(数据目录中的geth.ipc文件)。开启一个节点后，ipc插口默认位于你的以太坊本地主目录。你也可以设置&mdash;test选项来使用特定节点测试指令。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">然后你可以在控制台输入</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">这是&mdash;test模式节点指令的释义：</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">关于节点配置文件的更多信息。</p>
<h3 style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; font-size: 1.3em; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">底层服务</h3>
<h4 style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; font-size: 18.4px; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">Whisper</h4>
<ul style="margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">什么是Whisper，用途是什么 &ndash; stackexchange问答</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">Gavin Wood: 嘘！Whisper &ndash; youtube上的DEVCON-1演讲视频</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">Whisper概览和dream API用途 &ndash;</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">ELI5</li>
</ul>
<h4 style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; font-size: 18.4px; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">Swarm</h4>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">Swarm是分布式存储平台以及内容分发服务，以太坊web 3堆栈自带的基层服务。Swarm的首要目标是提供足够去中心化和冗余的以太坊公共记录储存，尤其是储存和分配去中心化应用代码和数据，以及区块链数据。从经济观点看，它允许参与者有效集中储存和带宽资源，用以为所有参与者提供之前提到的服务。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">从终端用户的观点看，Swarm和WWW并没有很大不同，除了上载并不是针对一个特定的服务商。目标是点对点存储，并提供抗DDOS、零故障、容错、抗审查的解决方案以及自我维护，这归功于一个使用点对点记账体系并允许以付款交换资源的内置激励体系。Swarm被设计为与以太坊devp2p多协议网络层次，为了域名解决方案的以太坊区块链，服务支付和内容可用性保险结合。</p>
<h4 style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; font-size: 18.4px; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">swarm 上的&ETH;&Xi;Vcon演讲</h4>
<ul style="margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">Viktor Tr&oacute;n, Daniel A. Nagy：Swarm &ndash; YouTube上的以太坊 &ETH;&Xi;Vcon-1演讲</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">Daniel A. Nagy：保持公共记录安全可用 &ndash; YouTube上的以太坊&ETH;&Xi;Vcon-0演讲</li>
</ul>
<h4 style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; font-size: 18.4px; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">Code and status</h4>
<ul style="margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;"><a href="https://github.com/ethereum/go-ethereum/tree/swarm" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; color: rgb(117, 21, 144); transition: color 0.3s; white-space: pre-wrap; word-wrap: break-word;">资源</a></li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;"><a href="https://github.com/ethereum/go-ethereum/labels/swarm" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; color: rgb(117, 21, 144); transition: color 0.3s; white-space: pre-wrap; word-wrap: break-word;">github上的发布</a></li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;"><a href="http://wangxiaoming.com/blog/2016/08/01/e25/" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; color: rgb(117, 21, 144); transition: color 0.3s; white-space: pre-wrap; word-wrap: break-word;">开发路径图</a></li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">twitter上的ethersphere</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">swarm gitter room</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">swarm subreddit</li>
</ul>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">在线和离线存储</p>
<ul style="margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;"><a href="https://www.reddit.com/r/ethereum/comments/3hkv2f/eli5_storage_in_the_ethereum_blockchain/" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; color: rgb(117, 21, 144); transition: color 0.3s; white-space: pre-wrap; word-wrap: break-word;">https://www.reddit.com/r/ethereum/comments/3hkv2f/eli5_storage_in_the_ethereum_blockchain/</a></li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;"><a href="https://www.reddit.com/r/ethereum/comments/3npsoz/ethereum_ipfs_and_filecoin/" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; color: rgb(117, 21, 144); transition: color 0.3s; white-space: pre-wrap; word-wrap: break-word;">https://www.reddit.com/r/ethereum/comments/3npsoz/ethereum_ipfs_and_filecoin/</a></li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">什么是swarm，用途是什么？ &ndash; stackexchange问答</li>
</ul>
<h4 style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; font-size: 18.4px; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">以太坊定时器</h4>
<ul style="margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">作者： Piper Merriam</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">网站： alarm_main_website。</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">文档： alarm_documentation。</li>
</ul>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">促使安排交易稍后发生的市场。提供unix中crontab或javascript 中的setTimeout类似的角色。 &bull;以太坊提案中的去中心化cron服务 &ndash; 作者Peter Szilagyi</p>
<h4 style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; font-size: 18.4px; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">Ethereum Computation Market</h4>
<ul style="margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">作者： Piper Merriam</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">网站： computation_market_main_website。</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">文档： computation_market_main_website。</li>
</ul>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">促使离线运算可验证执行的市场。允许每个昂贵的运算在以太坊虚拟机内使用，不必实际支付在链上执行它们的高额gas成本。</p>
<h4 style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; font-size: 18.4px; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">BTCRelay</h4>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">BTCrelay</p>
<ul style="margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">更多信息 (关于ETH/BTC双向peg，不需修正比特币代码)。</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">BTCrelay 审查</li>
</ul>
<h4 style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; font-size: 18.4px; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">RANDAO</h4>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">随机数:&nbsp;<a href="https://www.reddit.com/r/ethereum/comments/49yld7/eli5_how_does_a_service_like_szabodice_grab_a/" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; color: rgb(117, 21, 144); transition: color 0.3s; white-space: pre-wrap; word-wrap: break-word;">https://www.reddit.com/r/ethereum/comments/49yld7/eli5_how_does_a_service_like_szabodice_grab_a/</a></p>
<h3 style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; font-size: 1.3em; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">The EVM</h3>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">以太坊虚拟机(EVM)是以太坊智能合约的执行环境。它不仅被沙箱化，而且实际上是完全隔离的，这意味着以太坊虚拟机内部运行的代码不可以访问网络，文件系统或其他进程。智能合约甚至对其他智能合约的访问权限都是有限的。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">合约存在于区块链上，区块链是以太坊特定的二进制格式(以太坊虚拟机字节代码)。然而，合约典型地是用以太坊高级语言写成，用以太坊编译器编译成字节代码，最终用以太坊客户端上传到区块链。</p>
<h3 style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; font-size: 1.3em; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">参考资料：</h3>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">文章中的列表对应的链接可以参考《Ethereum Homestead Documentation》第94页1.7.5 Dapps</p>]]></description>
			<link>http://meisw.wdlinux.cn//show-912-1.html</link>
			<category domain="http://meisw.wdlinux.cn//category-54-1.html">以太坊</category>
			<pubDate>2016-12-21 23:41</pubDate>
		</item>
		<item>
			<guid>http://meisw.wdlinux.cn//show-911-1.html</guid>
			<title>深入浅出智能合约</title>
			<author>admin</author>
			<description><![CDATA[<h2 style="margin: 0px 0px 1em; padding: 0.8em 0px 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background: none rgb(248, 248, 248);">什么是合约?</h2>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">合约是代码（它的功能）和数据（它的状态）的集合，存在于以太坊区块链的特定地址。 合约账户能够在彼此之间传递信息，进行图灵完备的运算。合约依靠被称作以太坊虚拟机(EVM) 字节代码（以太坊特有的二进制格式）上的区块链运行。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">合约很典型地用诸如Solidity等高级语言写成，然后编译成字节代码上传到区块链上。</p>
<h4 style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; font-size: 18.4px; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">另请参阅：</h4>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">也存在其他语言， 尤其是Serpent和LLL，在此文本的以太坊高级语言章节会进一步阐述。去中心化应用开发资源列出了综合的开发环境，帮助你用这些语言开发的开发者工具，提供测试，和部署支持等功能。</p>
<h2 style="margin: 0px 0px 1em; padding: 0.8em 0px 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background: url(&quot;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAABCAYAAACsXeyTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAFUlEQVQIHWNIS0sr/v//PwMMDzY+ADqMahlW4J91AAAAAElFTkSuQmCC&quot;) 0% 0% repeat-x rgb(248, 248, 248);">以太坊高级语言</h2>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">合约依靠被称作以太坊虚拟机(EVM) 字节代码（以太坊特有的二进制格式）上的区块链运行。然而，合约很典型地用诸如Solidity等高级语言写成，然后用以太坊虚拟机编译器编译成字节代码上传到区块链。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">下面是开发者可以用来为以太坊写智能合约的高级语言。</p>
<h3 style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; font-size: 1.3em; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">Solidity</h3>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">Solidity是和JavaScript相似的语言，你可以用它来开发合约并编译成以太坊虚拟机字节代码。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">它目前是以太坊最受欢迎的语言。</p>
<ul style="margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">Solidity文本 &ndash; Solidity是以太坊的旗舰高级语言，用于写合约。</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">Solidity在线实时编译器</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">标准合约API</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">有用的去中心化模式 &ndash; 用于去中心化应用开发的代码片段。</li>
</ul>
<h3 style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; font-size: 1.3em; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">Serpent</h3>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">Serpent是和Python类似的语言，可以用于开发合约编译成以太坊虚拟机字节代码。它力求简洁， 将低级语言在效率方面的优点和编程风格的操作简易相结合，同时合约编程增加了独特的领域特定功能。Serpent用LLL编译。</p>
<ul style="margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">以太坊维基百科上的Serpent</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">Serpent以太坊虚拟机编译器</li>
</ul>
<h3 style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; font-size: 1.3em; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">LLL</h3>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">Lisp Like Language (LLL)是和Assembly类似的低级语言。它追求极简；本质上只是直接对以太坊虚拟机的一点包装。</p>
<ul style="margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">GitHub上的LIBLLL</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">LLL实例</li>
</ul>
<h3 style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; font-size: 1.3em; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">Mutan (弃用)</h3>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">Mutan是个静态类型，由Jeffrey Wilcke 开发设计的C类语言。它已经不再受到维护。</p>
<h2 style="margin: 0px 0px 1em; padding: 0.8em 0px 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background: url(&quot;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAABCAYAAACsXeyTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAFUlEQVQIHWNIS0sr/v//PwMMDzY+ADqMahlW4J91AAAAAElFTkSuQmCC&quot;) 0% 0% repeat-x rgb(248, 248, 248);">写合约</h2>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">没有Hello World程序，语言就不完整。Solidity在以太坊环境内操作，没有明显的&ldquo;输出&rdquo;字符串的方式。我们能做的最接近的事就是用日志记录事件来把字符串放进区块链：</p>
<p><figure class="code" style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; box-shadow: rgba(0, 0, 0, 0.0588235) 0px 0px 10px; color: rgb(34, 34, 34); background: none rgb(248, 248, 248);">
<div class="highlight" style="margin: 0px; padding: 0px; border: 1px solid rgb(5, 35, 43) !important; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; overflow-y: hidden; overflow-x: auto; background: rgb(0, 43, 54);">
<table style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; border-collapse: collapse; border-spacing: 0px;">
    <tbody style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
        <tr style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
            <td class="gutter" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle;">
            <pre class="line-numbers" style="margin-top: 0px; margin-bottom: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; text-align: right; text-shadow: rgb(2, 16, 20) 0px -1px; padding: 0.8em !important; border-right-width: 1px !important; border-right-style: solid !important; border-right-color: rgb(0, 35, 44) !important; background-image: url(&quot;/images/noise.png?1457420710&quot;) !important; background-attachment: initial !important; background-color: rgb(7, 54, 66) !important; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: 0% 0%; background-repeat: initial !important;"><span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">1</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">2</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">3</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">4</span></pre>
            </td>
            <td class="code" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle; width: 757px;">
            <pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; border: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; background: none;"><code class="" style="margin: 0px; padding: 0.8em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; vertical-align: baseline; overflow-y: hidden; display: block; overflow-x: auto; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace !important; background: rgb(0, 0, 0);"><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">contract HelloWorld { </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">  event Print(string out); </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">  function() { Print(&quot;Hello, World!&quot;); }  </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">}</span></code></pre>
            </td>
        </tr>
    </tbody>
</table>
</div>
</figure></p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">每次执行时，这个合约都会在区块链创建一个日志入口，印着&ldquo;Hello,World!&rdquo;参数。</p>
<h4 style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; font-size: 18.4px; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">另请参阅：</h4>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">Solidity docs里有更多写Solidity代码的示例和指导。</p>
<h2 style="margin: 0px 0px 1em; padding: 0.8em 0px 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background: url(&quot;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAABCAYAAACsXeyTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAFUlEQVQIHWNIS0sr/v//PwMMDzY+ADqMahlW4J91AAAAAElFTkSuQmCC&quot;) 0% 0% repeat-x rgb(248, 248, 248);">编译合约</h2>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">solidity合约的编译可以通过很多机制完成。</p>
<ul style="margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">通过命令行使用solc编译器。</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">在geth或eth提供的javascript控制台使用web3.eth.compile.solidity (这仍然需要安装solc 编译器)。</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">在线Solidity实时编译器。</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">建立solidity合约的Meteor dapp Cosmo。</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">Mix IDE。</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">以太坊钱包。</li>
</ul>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">注意：关于solc和编译Solidity合约代码的更多信息可在此查看。</p>
<h3 style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; font-size: 1.3em; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">在geth设置solidity编译器</h3>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">如果你启动了geth节点，就可以查看哪个编译器可用。</p>
<p><figure class="code" style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; box-shadow: rgba(0, 0, 0, 0.0588235) 0px 0px 10px; color: rgb(34, 34, 34); background: none rgb(248, 248, 248);">
<div class="highlight" style="margin: 0px; padding: 0px; border: 1px solid rgb(5, 35, 43) !important; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; overflow-y: hidden; overflow-x: auto; background: rgb(0, 43, 54);">
<table style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; border-collapse: collapse; border-spacing: 0px;">
    <tbody style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
        <tr style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
            <td class="gutter" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle;">
            <pre class="line-numbers" style="margin-top: 0px; margin-bottom: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; text-align: right; text-shadow: rgb(2, 16, 20) 0px -1px; padding: 0.8em !important; border-right-width: 1px !important; border-right-style: solid !important; border-right-color: rgb(0, 35, 44) !important; background-image: url(&quot;/images/noise.png?1457420710&quot;) !important; background-attachment: initial !important; background-color: rgb(7, 54, 66) !important; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: 0% 0%; background-repeat: initial !important;"><span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">1</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">2</span></pre>
            </td>
            <td class="code" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle; width: 757px;">
            <pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; border: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; background: none;"><code class="" style="margin: 0px; padding: 0.8em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; vertical-align: baseline; overflow-y: hidden; display: block; overflow-x: auto; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace !important; background: rgb(0, 0, 0);"><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">&gt; web3.eth.getCompilers(); </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">[&quot;lll&quot;, &quot;solidity&quot;, &quot;serpent&quot;]</span></code></pre>
            </td>
        </tr>
    </tbody>
</table>
</div>
</figure></p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">这一指令会返回到显示当前哪个编译器可用的字符串。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">注意：solc编译器和cpp- ethereum一起安装。或者，你可以自己创建。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">如果你的solc可执行文件不在标准位置，可以用&mdash;solc标志为solc可执行文件指定一个定制路线。</p>
<p><figure class="code" style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; box-shadow: rgba(0, 0, 0, 0.0588235) 0px 0px 10px; color: rgb(34, 34, 34); background: none rgb(248, 248, 248);">
<div class="highlight" style="margin: 0px; padding: 0px; border: 1px solid rgb(5, 35, 43) !important; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; overflow-y: hidden; overflow-x: auto; background: rgb(0, 43, 54);">
<table style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; border-collapse: collapse; border-spacing: 0px;">
    <tbody style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
        <tr style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
            <td class="gutter" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle;">
            <pre class="line-numbers" style="margin-top: 0px; margin-bottom: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; text-align: right; text-shadow: rgb(2, 16, 20) 0px -1px; padding: 0.8em !important; border-right-width: 1px !important; border-right-style: solid !important; border-right-color: rgb(0, 35, 44) !important; background-image: url(&quot;/images/noise.png?1457420710&quot;) !important; background-attachment: initial !important; background-color: rgb(7, 54, 66) !important; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: 0% 0%; background-repeat: initial !important;"><span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">1</span></pre>
            </td>
            <td class="code" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle; width: 757px;">
            <pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; border: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; background: none;"><code class="" style="margin: 0px; padding: 0.8em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; vertical-align: baseline; overflow-y: hidden; display: block; overflow-x: auto; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace !important; background: rgb(0, 0, 0);"><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">$ geth --solc /usr/local/bin/solc</span></code></pre>
            </td>
        </tr>
    </tbody>
</table>
</div>
</figure></p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">或者你可以通过控制台在执行期间设置这个选项：</p>
<p><figure class="code" style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; box-shadow: rgba(0, 0, 0, 0.0588235) 0px 0px 10px; color: rgb(34, 34, 34); background: none rgb(248, 248, 248);">
<div class="highlight" style="margin: 0px; padding: 0px; border: 1px solid rgb(5, 35, 43) !important; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; overflow-y: hidden; overflow-x: auto; background: rgb(0, 43, 54);">
<table style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; border-collapse: collapse; border-spacing: 0px;">
    <tbody style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
        <tr style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
            <td class="gutter" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle;">
            <pre class="line-numbers" style="margin-top: 0px; margin-bottom: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; text-align: right; text-shadow: rgb(2, 16, 20) 0px -1px; padding: 0.8em !important; border-right-width: 1px !important; border-right-style: solid !important; border-right-color: rgb(0, 35, 44) !important; background-image: url(&quot;/images/noise.png?1457420710&quot;) !important; background-attachment: initial !important; background-color: rgb(7, 54, 66) !important; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: 0% 0%; background-repeat: initial !important;"><span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">1</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">2</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">3</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">4</span></pre>
            </td>
            <td class="code" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle; width: 885px;">
            <pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; border: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; background: none;"><code class="" style="margin: 0px; padding: 0.8em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; vertical-align: baseline; overflow-y: hidden; display: block; overflow-x: auto; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace !important; background: rgb(0, 0, 0);"><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">&gt; admin.setSolc(&quot;/usr/local/bin/solc&quot;) </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">solc, the solidity compiler commandline interface </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">Version: 0.2.2-02bb315d/.-Darwin/appleclang/JIT linked to libethereum-1.2.0-8007cef0/.-Darwin/appleclang/JIT </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">path: /usr/local/bin/solc</span></code></pre>
            </td>
        </tr>
    </tbody>
</table>
</div>
</figure></p>
<h3 style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; font-size: 1.3em; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">编译一个简单合约</h3>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">让我们编译一个简单的合约源：</p>
<p><figure class="code" style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; box-shadow: rgba(0, 0, 0, 0.0588235) 0px 0px 10px; color: rgb(34, 34, 34); background: none rgb(248, 248, 248);">
<div class="highlight" style="margin: 0px; padding: 0px; border: 1px solid rgb(5, 35, 43) !important; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; overflow-y: hidden; overflow-x: auto; background: rgb(0, 43, 54);">
<table style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; border-collapse: collapse; border-spacing: 0px;">
    <tbody style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
        <tr style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
            <td class="gutter" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle;">
            <pre class="line-numbers" style="margin-top: 0px; margin-bottom: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; text-align: right; text-shadow: rgb(2, 16, 20) 0px -1px; padding: 0.8em !important; border-right-width: 1px !important; border-right-style: solid !important; border-right-color: rgb(0, 35, 44) !important; background-image: url(&quot;/images/noise.png?1457420710&quot;) !important; background-attachment: initial !important; background-color: rgb(7, 54, 66) !important; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: 0% 0%; background-repeat: initial !important;"><span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">1</span></pre>
            </td>
            <td class="code" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle; width: 757px;">
            <pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; border: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; background: none;"><code class="" style="margin: 0px; padding: 0.8em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; vertical-align: baseline; overflow-y: hidden; display: block; overflow-x: auto; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace !important; background: rgb(0, 0, 0);"><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">&gt; source = &quot;contract test { function multiply(uint a) returns(uint d) { return a * 7; } }&quot;</span></code></pre>
            </td>
        </tr>
    </tbody>
</table>
</div>
</figure></p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">这个合约提供了一个单一方法multiply，它和一个正整数a调用并返回到a * 7 。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">你准备在geth JS控制台用eth.compile.solidity()编译solidity代码：</p>
<p><figure class="code" style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; box-shadow: rgba(0, 0, 0, 0.0588235) 0px 0px 10px; color: rgb(34, 34, 34); background: none rgb(248, 248, 248);">
<div class="highlight" style="margin: 0px; padding: 0px; border: 1px solid rgb(5, 35, 43) !important; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; overflow-y: hidden; overflow-x: auto; background: rgb(0, 43, 54);">
<table style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; border-collapse: collapse; border-spacing: 0px;">
    <tbody style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
        <tr style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
            <td class="gutter" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle;">
            <pre class="line-numbers" style="margin-top: 0px; margin-bottom: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; text-align: right; text-shadow: rgb(2, 16, 20) 0px -1px; padding: 0.8em !important; border-right-width: 1px !important; border-right-style: solid !important; border-right-color: rgb(0, 35, 44) !important; background-image: url(&quot;/images/noise.png?1457420710&quot;) !important; background-attachment: initial !important; background-color: rgb(7, 54, 66) !important; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: 0% 0%; background-repeat: initial !important;"><span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">1</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">2</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">3</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">4</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">5</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">6</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">7</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">8</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">9</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">10</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">11</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">12</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">13</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">14</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">15</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">16</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">17</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">18</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">19</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">20</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">21</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">22</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">23</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">24</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">25</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">26</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">27</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">28</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">29</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">30</span></pre>
            </td>
            <td class="code" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle; width: 797px;">
            <pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; border: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; background: none;"><code class="" style="margin: 0px; padding: 0.8em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; vertical-align: baseline; overflow-y: hidden; display: block; overflow-x: auto; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace !important; background: rgb(0, 0, 0);"><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">￼&gt; contract = eth.compile.solidity(source).test </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">{ </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">  code: '605280600c6000396000f3006000357c01000000000000000000000000000000000000000000000000000000 </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">  info: { </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">    language: 'Solidity', </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">    languageVersion: '0', </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">    compilerVersion: '0.9.13', </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">    abiDefinition: [{ </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">      constant: false, </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">      inputs: [{ </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">name: 'a', </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">        type: 'uint256' </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">      } ], </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">      name: 'multiply', </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">      outputs: [{ </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">name: 'd', </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">        type: 'uint256' </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">      } ], </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">      type: 'function' </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">    } ], </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">    userDoc: { </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">      methods: { </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">      } </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">    }, </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">    developerDoc: { </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">methods: { </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">} }, </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">    source: 'contract test { function multiply(uint a) returns(uint d) { return a * 7; } }' </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">  } </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">}</span></code></pre>
            </td>
        </tr>
    </tbody>
</table>
</div>
</figure></p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">注意：编译器通过RPC因此也能通过web3.js，对浏览器内任何通过RPC/IPC连接到geth的&ETH;app可用。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">下面的例子会向你展示如何通过JSON-RPC接合geth来使用编译器。</p>
<p><figure class="code" style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; box-shadow: rgba(0, 0, 0, 0.0588235) 0px 0px 10px; color: rgb(34, 34, 34); background: none rgb(248, 248, 248);">
<div class="highlight" style="margin: 0px; padding: 0px; border: 1px solid rgb(5, 35, 43) !important; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; overflow-y: hidden; overflow-x: auto; background: rgb(0, 43, 54);">
<table style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; border-collapse: collapse; border-spacing: 0px;">
    <tbody style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
        <tr style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
            <td class="gutter" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle;">
            <pre class="line-numbers" style="margin-top: 0px; margin-bottom: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; text-align: right; text-shadow: rgb(2, 16, 20) 0px -1px; padding: 0.8em !important; border-right-width: 1px !important; border-right-style: solid !important; border-right-color: rgb(0, 35, 44) !important; background-image: url(&quot;/images/noise.png?1457420710&quot;) !important; background-attachment: initial !important; background-color: rgb(7, 54, 66) !important; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: 0% 0%; background-repeat: initial !important;"><span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">1</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">2</span></pre>
            </td>
            <td class="code" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle; width: 1069px;">
            <pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; border: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; background: none;"><code class="" style="margin: 0px; padding: 0.8em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; vertical-align: baseline; overflow-y: hidden; display: block; overflow-x: auto; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace !important; background: rgb(0, 0, 0);"><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">$ geth --datadir ~/eth/ --loglevel 6 --logtostderr=true --rpc --rpcport 8100 --rpccorsdomain ' * ' --mine console 2&gt;&gt; ~/eth/eth.log </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">$ curl -X POST --data '{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;method&quot;:&quot;eth_compileSolidity&quot;,&quot;params&quot;:[&quot;contract test {</span></code></pre>
            </td>
        </tr>
    </tbody>
</table>
</div>
</figure></p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">单源编译器输出会给出你合约对象，每个都代表一个单独的合约。eth.compile.solidity 的实际返还值是合约名字到合约对象的映射。由于合约名字是test，eth.compile.solidity(source).test会给出包含下列领域的测试合约对：</p>
<ul style="margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">Code 编译的以太坊虚拟机字节代码</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">Info 从编译器输出的额外元数据</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">Source 源代码</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">Language 合约语言 (Solidity，Serpent，LLL)</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">LanguageVersion 合约语言版本</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">compilerVersion 用于编译这个合约的solidity编译器版本。</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">abiDefinition 应用的二进制界面定义</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">userDoc 用户的NatSpec Doc。</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">developerDoc 开发者的NatSpec Doc。</li>
</ul>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">编译器输出的直接结构化(到code和info)反映了两种非常不同的部署路径。编译的以太坊虚拟机代码和一个合约创建交易被发送到区块，剩下的(info)在理想状态下会存活在去中心化云上，公开验证的元数据则执行区块链上的代码。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">如果你的源包含多个合约，输出会包括每个合约一个入口，对应的合约信息对象可以用作为属性名称的合约名字检索到。你可以通过检测当前的GlobalRegistrar代码来试一下：</p>
<p><figure class="code" style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; box-shadow: rgba(0, 0, 0, 0.0588235) 0px 0px 10px; color: rgb(34, 34, 34); background: none rgb(248, 248, 248);">
<div class="highlight" style="margin: 0px; padding: 0px; border: 1px solid rgb(5, 35, 43) !important; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; overflow-y: hidden; overflow-x: auto; background: rgb(0, 43, 54);">
<table style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; border-collapse: collapse; border-spacing: 0px;">
    <tbody style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
        <tr style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
            <td class="gutter" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle;">
            <pre class="line-numbers" style="margin-top: 0px; margin-bottom: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; text-align: right; text-shadow: rgb(2, 16, 20) 0px -1px; padding: 0.8em !important; border-right-width: 1px !important; border-right-style: solid !important; border-right-color: rgb(0, 35, 44) !important; background-image: url(&quot;/images/noise.png?1457420710&quot;) !important; background-attachment: initial !important; background-color: rgb(7, 54, 66) !important; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: 0% 0%; background-repeat: initial !important;"><span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">1</span></pre>
            </td>
            <td class="code" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle; width: 757px;">
            <pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; border: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; background: none;"><code class="" style="margin: 0px; padding: 0.8em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; vertical-align: baseline; overflow-y: hidden; display: block; overflow-x: auto; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace !important; background: rgb(0, 0, 0);"><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">contracts = eth.compile.solidity(globalRegistrarSrc)</span></code></pre>
            </td>
        </tr>
    </tbody>
</table>
</div>
</figure></p>
<h2 style="margin: 0px 0px 1em; padding: 0.8em 0px 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background: url(&quot;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAABCAYAAACsXeyTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAFUlEQVQIHWNIS0sr/v//PwMMDzY+ADqMahlW4J91AAAAAElFTkSuQmCC&quot;) 0% 0% repeat-x rgb(248, 248, 248);">创建和部署合约</h2>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">开始这一章节之前，确保你有解锁的账户和一些资金。 你现在会在区块链上创建一个合约，方法是用上一章节的以太坊虚拟机代码作为数据给空地址发送交易。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">注意：用在线Solidity实时编译器或Mix IDE程序会更容易完成。</p>
<p><figure class="code" style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; box-shadow: rgba(0, 0, 0, 0.0588235) 0px 0px 10px; color: rgb(34, 34, 34); background: none rgb(248, 248, 248);">
<div class="highlight" style="margin: 0px; padding: 0px; border: 1px solid rgb(5, 35, 43) !important; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; overflow-y: hidden; overflow-x: auto; background: rgb(0, 43, 54);">
<table style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; border-collapse: collapse; border-spacing: 0px;">
    <tbody style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
        <tr style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
            <td class="gutter" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle;">
            <pre class="line-numbers" style="margin-top: 0px; margin-bottom: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; text-align: right; text-shadow: rgb(2, 16, 20) 0px -1px; padding: 0.8em !important; border-right-width: 1px !important; border-right-style: solid !important; border-right-color: rgb(0, 35, 44) !important; background-image: url(&quot;/images/noise.png?1457420710&quot;) !important; background-attachment: initial !important; background-color: rgb(7, 54, 66) !important; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: 0% 0%; background-repeat: initial !important;"><span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">1</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">2</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">3</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">4</span></pre>
            </td>
            <td class="code" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle; width: 797px;">
            <pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; border: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; background: none;"><code class="" style="margin: 0px; padding: 0.8em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; vertical-align: baseline; overflow-y: hidden; display: block; overflow-x: auto; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace !important; background: rgb(0, 0, 0);"><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">var primaryAddress = eth.accounts[0] </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">var abi = [{ constant: false, inputs: [{ name: 'a', type: 'uint256' } ] </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">var MyContract = eth.contract(abi) </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">var contract = MyContract.new(arg1, arg2, ..., {from: primaryAddress, data: evmByteCodeFromPrevio</span></code></pre>
            </td>
        </tr>
    </tbody>
</table>
</div>
</figure></p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">所有的二进制数据都以十六进制的格式序列化。十六进制字符串总会有一个十六进制前缀0x。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">注意：注意arg1, arg2, &hellip;是合约构造函数参数，以备它要接受参数。如果合约不需要构造函数参数，就可以忽略这些参数。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">值得指出的是，这一步骤需要你支付执行。一旦交易成功进入到区块，你的账户余额(你作为发送方放在from领域)会根据以太坊虚拟机的gas规则被扣减。一段时间以后，你的交易会在一个区块中出现，确认它带来的状态是共识。你的合约现在存在于区块链上。 以不同步的方式做同样的事看起来是这样：</p>
<p><figure class="code" style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; box-shadow: rgba(0, 0, 0, 0.0588235) 0px 0px 10px; color: rgb(34, 34, 34); background: none rgb(248, 248, 248);">
<div class="highlight" style="margin: 0px; padding: 0px; border: 1px solid rgb(5, 35, 43) !important; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; overflow-y: hidden; overflow-x: auto; background: rgb(0, 43, 54);">
<table style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; border-collapse: collapse; border-spacing: 0px;">
    <tbody style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
        <tr style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
            <td class="gutter" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle;">
            <pre class="line-numbers" style="margin-top: 0px; margin-bottom: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; text-align: right; text-shadow: rgb(2, 16, 20) 0px -1px; padding: 0.8em !important; border-right-width: 1px !important; border-right-style: solid !important; border-right-color: rgb(0, 35, 44) !important; background-image: url(&quot;/images/noise.png?1457420710&quot;) !important; background-attachment: initial !important; background-color: rgb(7, 54, 66) !important; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: 0% 0%; background-repeat: initial !important;"><span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">1</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">2</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">3</span></pre>
            </td>
            <td class="code" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle; width: 1037px;">
            <pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; border: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; background: none;"><code class="" style="margin: 0px; padding: 0.8em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; vertical-align: baseline; overflow-y: hidden; display: block; overflow-x: auto; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace !important; background: rgb(0, 0, 0);"><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">MyContract.new([arg1, arg2, ...,]{from: primaryAccount, data: evmCode}, function(err, contract) { if (!err &amp;&amp; contract.address) </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">    console.log(contract.address); </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">});</span></code></pre>
            </td>
        </tr>
    </tbody>
</table>
</div>
</figure></p>
<h2 style="margin: 0px 0px 1em; padding: 0.8em 0px 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background: url(&quot;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAABCAYAAACsXeyTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAFUlEQVQIHWNIS0sr/v//PwMMDzY+ADqMahlW4J91AAAAAElFTkSuQmCC&quot;) 0% 0% repeat-x rgb(248, 248, 248);">与合约交互</h2>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">与合约交互典型的做法是用诸如eth.contract()功能的抽象层，它会返回到javascript对象，和所有可用的合约功能一起，作为可调用的javascript功能。 描述合约可用功能的标准方式是ABI定义。这个对象是一个字符串，它描述了调用签名和每个可用合约功能的返回值。</p>
<p><figure class="code" style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; box-shadow: rgba(0, 0, 0, 0.0588235) 0px 0px 10px; color: rgb(34, 34, 34); background: none rgb(248, 248, 248);">
<div class="highlight" style="margin: 0px; padding: 0px; border: 1px solid rgb(5, 35, 43) !important; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; overflow-y: hidden; overflow-x: auto; background: rgb(0, 43, 54);">
<table style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; border-collapse: collapse; border-spacing: 0px;">
    <tbody style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
        <tr style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
            <td class="gutter" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle;">
            <pre class="line-numbers" style="margin-top: 0px; margin-bottom: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; text-align: right; text-shadow: rgb(2, 16, 20) 0px -1px; padding: 0.8em !important; border-right-width: 1px !important; border-right-style: solid !important; border-right-color: rgb(0, 35, 44) !important; background-image: url(&quot;/images/noise.png?1457420710&quot;) !important; background-attachment: initial !important; background-color: rgb(7, 54, 66) !important; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: 0% 0%; background-repeat: initial !important;"><span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">1</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">2</span></pre>
            </td>
            <td class="code" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle; width: 757px;">
            <pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; border: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; background: none;"><code class="" style="margin: 0px; padding: 0.8em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; vertical-align: baseline; overflow-y: hidden; display: block; overflow-x: auto; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace !important; background: rgb(0, 0, 0);"><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">var Multiply7 = eth.contract(contract.info.abiDefinition); </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">var myMultiply7 = Multiply7.at(address);</span></code></pre>
            </td>
        </tr>
    </tbody>
</table>
</div>
</figure></p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">现在ABI中具体说明的所有功能调用都在合约实例中可用。你可以用两种方法中的一种来调用这些合约实例上的方法。</p>
<p><figure class="code" style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; box-shadow: rgba(0, 0, 0, 0.0588235) 0px 0px 10px; color: rgb(34, 34, 34); background: none rgb(248, 248, 248);">
<div class="highlight" style="margin: 0px; padding: 0px; border: 1px solid rgb(5, 35, 43) !important; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; overflow-y: hidden; overflow-x: auto; background: rgb(0, 43, 54);">
<table style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; border-collapse: collapse; border-spacing: 0px;">
    <tbody style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
        <tr style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
            <td class="gutter" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle;">
            <pre class="line-numbers" style="margin-top: 0px; margin-bottom: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; text-align: right; text-shadow: rgb(2, 16, 20) 0px -1px; padding: 0.8em !important; border-right-width: 1px !important; border-right-style: solid !important; border-right-color: rgb(0, 35, 44) !important; background-image: url(&quot;/images/noise.png?1457420710&quot;) !important; background-attachment: initial !important; background-color: rgb(7, 54, 66) !important; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: 0% 0%; background-repeat: initial !important;"><span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">1</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">2</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">3</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">4</span></pre>
            </td>
            <td class="code" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle; width: 757px;">
            <pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; border: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; background: none;"><code class="" style="margin: 0px; padding: 0.8em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; vertical-align: baseline; overflow-y: hidden; display: block; overflow-x: auto; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace !important; background: rgb(0, 0, 0);"><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">&gt; myMultiply7.multiply.sendTransaction(3, {from: address}) </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">&quot;0x12345&quot; </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">&gt; myMultiply7.multiply.call(3) </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">21</span></code></pre>
            </td>
        </tr>
    </tbody>
</table>
</div>
</figure></p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">当用sendTransaction被调用的时候，功能调用通过发送交易来执行。需要花费以太币来发送，调用会永久记录在区块链上。用这种方式进行的调用返回值是交易散表。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">当用call被调用的时候，功能在以太坊虚拟机被本地执行，功能返回值和功能一起返回。用这种方式进行的调用不会记录在区块链上，因此也不会改变合约内部状态。这种调用方式被称为恒定功能调用。以这种方式进行的调用不花费以太币。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">如果你只对返回值感兴趣，那么你应该用call 。如果你只关心合约状态的副作用，就应该用sendTransaction。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">在上面的例子中，不会产生副作用，因此sendTransaction只会烧gas，增加宇宙的熵。</p>
<h2 style="margin: 0px 0px 1em; padding: 0.8em 0px 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background: url(&quot;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAABCAYAAACsXeyTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAFUlEQVQIHWNIS0sr/v//PwMMDzY+ADqMahlW4J91AAAAAElFTkSuQmCC&quot;) 0% 0% repeat-x rgb(248, 248, 248);">合约元数据</h2>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">在之前的章节，我们揭示了怎样在区块链上创建合约。现在我们来处理剩下的编译器输出，合约元数据或者说合约信息。 当与不是你创建的合约交互时，你可能会想要文档或者查看源代码。合约作者被鼓励提供这样的可见信息，他们可以在区块链上登记或者借助第三方服务，比如说EtherChain。管理员API为所有选择登记的合约提供便利的方法来获取这个捆绑。</p>
<p><figure class="code" style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; box-shadow: rgba(0, 0, 0, 0.0588235) 0px 0px 10px; color: rgb(34, 34, 34); background: none rgb(248, 248, 248);">
<div class="highlight" style="margin: 0px; padding: 0px; border: 1px solid rgb(5, 35, 43) !important; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; overflow-y: hidden; overflow-x: auto; background: rgb(0, 43, 54);">
<table style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; border-collapse: collapse; border-spacing: 0px;">
    <tbody style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
        <tr style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
            <td class="gutter" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle;">
            <pre class="line-numbers" style="margin-top: 0px; margin-bottom: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; text-align: right; text-shadow: rgb(2, 16, 20) 0px -1px; padding: 0.8em !important; border-right-width: 1px !important; border-right-style: solid !important; border-right-color: rgb(0, 35, 44) !important; background-image: url(&quot;/images/noise.png?1457420710&quot;) !important; background-attachment: initial !important; background-color: rgb(7, 54, 66) !important; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: 0% 0%; background-repeat: initial !important;"><span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">1</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">2</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">3</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">4</span></pre>
            </td>
            <td class="code" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle; width: 757px;">
            <pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; border: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; background: none;"><code class="" style="margin: 0px; padding: 0.8em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; vertical-align: baseline; overflow-y: hidden; display: block; overflow-x: auto; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace !important; background: rgb(0, 0, 0);"><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">// get the contract info for contract address to do manual verification </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">var info = admin.getContractInfo(address) // lookup, fetch, decode </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">var source = info.source; </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">var abiDef = info.abiDefinition</span></code></pre>
            </td>
        </tr>
    </tbody>
</table>
</div>
</figure></p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">这项工作的潜在机制是：</p>
<ul style="margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">合约信息被可以公开访问的URI上传到可辨认的地方</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">任何人都可以只知道合约地址就找到是什么URI</li>
</ul>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">仅通过2个步骤的区块链注册就可以实现这些要求。第一步是在被称作HashReg的合约中用内容散表注册合约代码（散表）。第二步是在UrlHint合约用内容散表注册一个url。这些注册合约是Frontier版本的一部分，已经参与到Homestead中。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">要知道合约地址来查询url，获取实际合约元数据信息包，使用这一机制就足够了。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">如果你是个尽职的合约创建者，请遵循以下步骤：</p>
<ol style="margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">将合约本身部署到区块链</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">获取合约信息json文件</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">将合约信息json文件部署到你选择的任意url</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">注册代码散表 &ndash;&gt;内容散表 &ndash;&gt; url</li>
</ol>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">JS API通过提供助手把这个过程变得非常容易。 调用admin.register从合约中提取信息，在指定文件中写出json序列，运算文件的内容散表，最终将这个内容散表注册到合约代码散表。一旦将那个文件部署到任意url，你就能用admin.registerUrl来注册url 和你区块链上的内容散表(注意一旦固定的内容选址模式被用作文件商店，url-hint不再必要了。)</p>
<p><figure class="code" style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; box-shadow: rgba(0, 0, 0, 0.0588235) 0px 0px 10px; color: rgb(34, 34, 34); background: none rgb(248, 248, 248);">
<div class="highlight" style="margin: 0px; padding: 0px; border: 1px solid rgb(5, 35, 43) !important; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; overflow-y: hidden; overflow-x: auto; background: rgb(0, 43, 54);">
<table style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; border-collapse: collapse; border-spacing: 0px;">
    <tbody style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
        <tr style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
            <td class="gutter" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle;">
            <pre class="line-numbers" style="margin-top: 0px; margin-bottom: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; text-align: right; text-shadow: rgb(2, 16, 20) 0px -1px; padding: 0.8em !important; border-right-width: 1px !important; border-right-style: solid !important; border-right-color: rgb(0, 35, 44) !important; background-image: url(&quot;/images/noise.png?1457420710&quot;) !important; background-attachment: initial !important; background-color: rgb(7, 54, 66) !important; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: 0% 0%; background-repeat: initial !important;"><span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">1</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">2</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">3</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">4</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">5</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">6</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">7</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">8</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">9</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">10</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">11</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">12</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">13</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">14</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">15</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">16</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">17</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">18</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">19</span></pre>
            </td>
            <td class="code" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle; width: 749px;">
            <pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; border: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; background: none;"><code class="" style="margin: 0px; padding: 0.8em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; vertical-align: baseline; overflow-y: hidden; display: block; overflow-x: auto; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace !important; background: rgb(0, 0, 0);"><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">source = &quot;contract test { function multiply(uint a) returns(uint d) { return a * 7; } }&quot;  </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">// compile with solc </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">contract = eth.compile.solidity(source).test </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">// create contract object </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">var MyContract = eth.contract(contract.info.abiDefinition) </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">// extracts info from contract, save the json serialisation in the given file,  </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">contenthash = admin.saveInfo(contract.info, &quot;~/dapps/shared/contracts/test/info.json&quot;) </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;"> </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">// send off the contract to the blockchain </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">MyContract.new({from: primaryAccount, data: contract.code}, function(error, contract){  </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">  if(!error &amp;&amp; contract.address) { </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">    // calculates the content hash and registers it with the code hash in `HashReg`  </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">    // it uses address to send the transaction. </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">    // returns the content hash that we use to register a url  </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">    admin.register(primaryAccount, contract.address, contenthash) </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">    // here you deploy ~/dapps/shared/contracts/test/info.json to a url </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">    admin.registerUrl(primaryAccount, hash, url) </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">  } </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">});</span></code></pre>
            </td>
        </tr>
    </tbody>
</table>
</div>
</figure></p>
<h2 style="margin: 0px 0px 1em; padding: 0.8em 0px 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background: url(&quot;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAABCAYAAACsXeyTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAFUlEQVQIHWNIS0sr/v//PwMMDzY+ADqMahlW4J91AAAAAElFTkSuQmCC&quot;) 0% 0% repeat-x rgb(248, 248, 248);">测试合约和交易</h2>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">你通常需要低级的测试策略，为交易和合约排除故障。这一章节介绍了一些你可以用到的排错工作和做法。为了测试合约和交易而不产生实际的后果，你最好在私有区块链上测试。这可以通过配置一个替代网络ID (选择一个特别的数字)和/或不能用的端点来实现。推荐做法是，为了测试你用一个替代数据目录和端口 ，这样就不会意外地和实时运行的节点冲突(假定用默认运行。在虚拟机排错模式开启geth，推荐性能分析和最高的日志冗余级别 ：</p>
<p><figure class="code" style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; box-shadow: rgba(0, 0, 0, 0.0588235) 0px 0px 10px; color: rgb(34, 34, 34); background: none rgb(248, 248, 248);">
<div class="highlight" style="margin: 0px; padding: 0px; border: 1px solid rgb(5, 35, 43) !important; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; overflow-y: hidden; overflow-x: auto; background: rgb(0, 43, 54);">
<table style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; border-collapse: collapse; border-spacing: 0px;">
    <tbody style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
        <tr style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
            <td class="gutter" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle;">
            <pre class="line-numbers" style="margin-top: 0px; margin-bottom: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; text-align: right; text-shadow: rgb(2, 16, 20) 0px -1px; padding: 0.8em !important; border-right-width: 1px !important; border-right-style: solid !important; border-right-color: rgb(0, 35, 44) !important; background-image: url(&quot;/images/noise.png?1457420710&quot;) !important; background-attachment: initial !important; background-color: rgb(7, 54, 66) !important; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: 0% 0%; background-repeat: initial !important;"><span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">1</span></pre>
            </td>
            <td class="code" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle; width: 797px;">
            <pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; border: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; background: none;"><code class="" style="margin: 0px; padding: 0.8em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; vertical-align: baseline; overflow-y: hidden; display: block; overflow-x: auto; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace !important; background: rgb(0, 0, 0);"><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">geth --datadir ~/dapps/testing/00/ --port 30310 --rpcport 8110 --networkid 4567890 --nodiscover -</span></code></pre>
            </td>
        </tr>
    </tbody>
</table>
</div>
</figure></p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">提交交易之前，你需要创建私有测试链。参阅测试网络。</p>
<p><figure class="code" style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; box-shadow: rgba(0, 0, 0, 0.0588235) 0px 0px 10px; color: rgb(34, 34, 34); background: none rgb(248, 248, 248);">
<div class="highlight" style="margin: 0px; padding: 0px; border: 1px solid rgb(5, 35, 43) !important; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; overflow-y: hidden; overflow-x: auto; background: rgb(0, 43, 54);">
<table style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; border-collapse: collapse; border-spacing: 0px;">
    <tbody style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
        <tr style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
            <td class="gutter" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle;">
            <pre class="line-numbers" style="margin-top: 0px; margin-bottom: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; text-align: right; text-shadow: rgb(2, 16, 20) 0px -1px; padding: 0.8em !important; border-right-width: 1px !important; border-right-style: solid !important; border-right-color: rgb(0, 35, 44) !important; background-image: url(&quot;/images/noise.png?1457420710&quot;) !important; background-attachment: initial !important; background-color: rgb(7, 54, 66) !important; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: 0% 0%; background-repeat: initial !important;"><span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">1</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">2</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">3</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">4</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">5</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">6</span></pre>
            </td>
            <td class="code" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle; width: 757px;">
            <pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; border: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; background: none;"><code class="" style="margin: 0px; padding: 0.8em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; vertical-align: baseline; overflow-y: hidden; display: block; overflow-x: auto; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace !important; background: rgb(0, 0, 0);"><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">// create account. will prompt for password </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">personal.newAccount(); </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">// name your primary account, will often use it </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">primary = eth.accounts[0]; </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">// check your balance (denominated in ether) </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">balance = web3.fromWei(eth.getBalance(primary), &quot;ether&quot;);</span></code></pre>
            </td>
        </tr>
    </tbody>
</table>
</div>
</figure><figure class="code" style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; box-shadow: rgba(0, 0, 0, 0.0588235) 0px 0px 10px; color: rgb(34, 34, 34); background: none rgb(248, 248, 248);">
<div class="highlight" style="margin: 0px; padding: 0px; border: 1px solid rgb(5, 35, 43) !important; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; overflow-y: hidden; overflow-x: auto; background: rgb(0, 43, 54);">
<table style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; border-collapse: collapse; border-spacing: 0px;">
    <tbody style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
        <tr style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
            <td class="gutter" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle;">
            <pre class="line-numbers" style="margin-top: 0px; margin-bottom: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; text-align: right; text-shadow: rgb(2, 16, 20) 0px -1px; padding: 0.8em !important; border-right-width: 1px !important; border-right-style: solid !important; border-right-color: rgb(0, 35, 44) !important; background-image: url(&quot;/images/noise.png?1457420710&quot;) !important; background-attachment: initial !important; background-color: rgb(7, 54, 66) !important; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: 0% 0%; background-repeat: initial !important;"><span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">1</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">2</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">3</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">4</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">5</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">6</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">7</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">8</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">9</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">10</span></pre>
            </td>
            <td class="code" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle; width: 749px;">
            <pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; border: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; background: none;"><code class="" style="margin: 0px; padding: 0.8em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; vertical-align: baseline; overflow-y: hidden; display: block; overflow-x: auto; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace !important; background: rgb(0, 0, 0);"><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">// assume an existing unlocked primary account </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">primary = eth.accounts[0]; </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">// mine 10 blocks to generate ether </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">// starting miner </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">miner.start(4); </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">// sleep for 10 blocks (this can take quite some time). </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">admin.sleepBlocks(10); </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">// then stop mining (just not to burn heat in vain) </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">miner.stop(); </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">balance = web3.fromWei(eth.getBalance(primary), &quot;ether&quot;);</span></code></pre>
            </td>
        </tr>
    </tbody>
</table>
</div>
</figure></p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">创建交易之后，你可以用下面的命令来强制运行：</p>
<p><figure class="code" style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; box-shadow: rgba(0, 0, 0, 0.0588235) 0px 0px 10px; color: rgb(34, 34, 34); background: none rgb(248, 248, 248);">
<div class="highlight" style="margin: 0px; padding: 0px; border: 1px solid rgb(5, 35, 43) !important; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; overflow-y: hidden; overflow-x: auto; background: rgb(0, 43, 54);">
<table style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; border-collapse: collapse; border-spacing: 0px;">
    <tbody style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
        <tr style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
            <td class="gutter" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle;">
            <pre class="line-numbers" style="margin-top: 0px; margin-bottom: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; text-align: right; text-shadow: rgb(2, 16, 20) 0px -1px; padding: 0.8em !important; border-right-width: 1px !important; border-right-style: solid !important; border-right-color: rgb(0, 35, 44) !important; background-image: url(&quot;/images/noise.png?1457420710&quot;) !important; background-attachment: initial !important; background-color: rgb(7, 54, 66) !important; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: 0% 0%; background-repeat: initial !important;"><span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">1</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">2</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">3</span></pre>
            </td>
            <td class="code" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle; width: 757px;">
            <pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; border: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; background: none;"><code class="" style="margin: 0px; padding: 0.8em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; vertical-align: baseline; overflow-y: hidden; display: block; overflow-x: auto; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace !important; background: rgb(0, 0, 0);"><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">miner.start(1); </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">admin.sleepBlocks(1); </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">miner.stop();</span></code></pre>
            </td>
        </tr>
    </tbody>
</table>
</div>
</figure></p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">你可以用以下命令查看即将发生的交易：</p>
<p><figure class="code" style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; box-shadow: rgba(0, 0, 0, 0.0588235) 0px 0px 10px; color: rgb(34, 34, 34); background: none rgb(248, 248, 248);">
<div class="highlight" style="margin: 0px; padding: 0px; border: 1px solid rgb(5, 35, 43) !important; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; overflow-y: hidden; overflow-x: auto; background: rgb(0, 43, 54);">
<table style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; border-collapse: collapse; border-spacing: 0px;">
    <tbody style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
        <tr style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
            <td class="gutter" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle;">
            <pre class="line-numbers" style="margin-top: 0px; margin-bottom: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; text-align: right; text-shadow: rgb(2, 16, 20) 0px -1px; padding: 0.8em !important; border-right-width: 1px !important; border-right-style: solid !important; border-right-color: rgb(0, 35, 44) !important; background-image: url(&quot;/images/noise.png?1457420710&quot;) !important; background-attachment: initial !important; background-color: rgb(7, 54, 66) !important; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: 0% 0%; background-repeat: initial !important;"><span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">1</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">2</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">3</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">4</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">5</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">6</span></pre>
            </td>
            <td class="code" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle; width: 757px;">
            <pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; border: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; background: none;"><code class="" style="margin: 0px; padding: 0.8em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; vertical-align: baseline; overflow-y: hidden; display: block; overflow-x: auto; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace !important; background: rgb(0, 0, 0);"><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">// shows transaction pool </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">txpool.status </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">// number of pending txs </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">eth.getBlockTransactionCount(&quot;pending&quot;); </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">// print all pending txs </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">eth.getBlock(&quot;pending&quot;, true).transactions</span></code></pre>
            </td>
        </tr>
    </tbody>
</table>
</div>
</figure></p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">如果你提交合约创建交易，可以检查想要的代码是否实际上嵌入到当前的区块链：</p>
<p><figure class="code" style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; box-shadow: rgba(0, 0, 0, 0.0588235) 0px 0px 10px; color: rgb(34, 34, 34); background: none rgb(248, 248, 248);">
<div class="highlight" style="margin: 0px; padding: 0px; border: 1px solid rgb(5, 35, 43) !important; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; overflow-y: hidden; overflow-x: auto; background: rgb(0, 43, 54);">
<table style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; border-collapse: collapse; border-spacing: 0px;">
    <tbody style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
        <tr style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
            <td class="gutter" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle;">
            <pre class="line-numbers" style="margin-top: 0px; margin-bottom: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; text-align: right; text-shadow: rgb(2, 16, 20) 0px -1px; padding: 0.8em !important; border-right-width: 1px !important; border-right-style: solid !important; border-right-color: rgb(0, 35, 44) !important; background-image: url(&quot;/images/noise.png?1457420710&quot;) !important; background-attachment: initial !important; background-color: rgb(7, 54, 66) !important; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: 0% 0%; background-repeat: initial !important;"><span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">1</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">2</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">3</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">4</span></pre>
            </td>
            <td class="code" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle; width: 757px;">
            <pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; border: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; background: none;"><code class="" style="margin: 0px; padding: 0.8em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; vertical-align: baseline; overflow-y: hidden; display: block; overflow-x: auto; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace !important; background: rgb(0, 0, 0);"><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">txhash = eth.sendTansaction({from:primary, data: code}) </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">//... mining </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">contractaddress = eth.getTransactionReceipt(txhash); </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">eth.getCode(contractaddress)</span></code></pre>
            </td>
        </tr>
    </tbody>
</table>
</div>
</figure></p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">下一篇文章我们将会介绍《以太坊连载(23)：如何部署、调用智能合约》</p>]]></description>
			<link>http://meisw.wdlinux.cn//show-911-1.html</link>
			<category domain="http://meisw.wdlinux.cn//category-54-1.html">以太坊</category>
			<pubDate>2016-12-21 23:40</pubDate>
		</item>
		<item>
			<guid>http://meisw.wdlinux.cn//show-910-1.html</guid>
			<title>账户、交易核心概念及投注合约解析</title>
			<author>admin</author>
			<description><![CDATA[<p>&nbsp;</p>
<h2 style="margin: 0px 0px 1em; padding: 0.8em 0px 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background: none rgb(248, 248, 248);">外部账户 vs 合约账户</h2>
<h3 style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; font-size: 1.3em; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">以太坊中有两种类型的账户</h3>
<ul style="margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">外部账户</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">合约账户</li>
</ul>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">它们的区别在Serenity版本中可能会消失。</p>
<h3 style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; font-size: 1.3em; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">外部账户（EOA）</h3>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">外部账户</p>
<ul style="margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">有以太币余额，</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">可以发送交易（以太币交易或引发合约代码），</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">由私钥控制，</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">没有相关代码。</li>
</ul>
<h3 style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; font-size: 1.3em; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">合约账户</h3>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">合约</p>
<ul style="margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">有以太币余额，</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">有相关代码，</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">代码执行由从其他合约接收的交易或消息（调用）触发，</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">执行的时候&mdash;执行任意复杂的操作（图灵完备的）&mdash;操控它自己的永久存储，例如，可以有自己的持久状态&mdash;可以调用其他合约</li>
</ul>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">以太坊区块链上的所有行为都由外部账户引发的交易调动。每次合约账户接收到交易时，它的代码都按照输入参数的指示执行，作为交易的一部分发送。合约代码由参与到网络的每个节点上的以太坊虚拟机执行，作为验证新区块的一部分。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">这个执行需要是完全确定性的，它唯一的语境是区块链上区块的位置和所有可见的数据。区块链上的区块代表时间单位，区块链本身是时间维度，代表在链上区块指定的离散的时间点上状态的整个历史。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">所有的以太币余额和价值都以wei为单位命名：1个以太币是1e18 wei。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">注意：以太坊中的&ldquo;合约&rdquo;不应该被看做是要&ldquo;实现&rdquo;或&ldquo;遵守&rdquo;的事物；它更像是在以太坊执行环境中生存的&ldquo;自治代理&rdquo;，被消息或交易&ldquo;戳到&rdquo;的时候，总会执行特定的代码片段，并且对自己的以太币余额和钥匙/价值商店有直接的控制，以储存永久状态。</p>
<h2 style="margin: 0px 0px 1em; padding: 0.8em 0px 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background: url(&quot;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAABCAYAAACsXeyTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAFUlEQVQIHWNIS0sr/v//PwMMDzY+ADqMahlW4J91AAAAAElFTkSuQmCC&quot;) 0% 0% repeat-x rgb(248, 248, 248);">什么是交易？</h2>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">&ldquo;交易&rdquo;这个术语用在以太坊中来指代签署的数据包，数据包存储着要从外部账户发送到区块链上另一账户的消息。</p>
<h4 style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; font-size: 18.4px; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">交易包括：</h4>
<ul style="margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">消息接收人，</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">一个签字，用以确认发送方身份，证明通过区块链向接收者发送消息的意图，</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">VALUE域&mdash;从发送方向接收方转移的wei的数量，</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">可选数据域，包括发送到合约的消息，</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">一个STARTGAS值，代表交易执行允许采取的运算步骤的最大数量，</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">一个GASPRICE值，代表发送人愿意支付的gas费用。一个gas单位对应着一个原子指令执行，比如运算步骤。</li>
</ul>
<h2 style="margin: 0px 0px 1em; padding: 0.8em 0px 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background: url(&quot;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAABCAYAAACsXeyTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAFUlEQVQIHWNIS0sr/v//PwMMDzY+ADqMahlW4J91AAAAAElFTkSuQmCC&quot;) 0% 0% repeat-x rgb(248, 248, 248);">什么是消息？</h2>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">合约能够向其他合约发送&ldquo;消息&rdquo;。消息是虚拟的事物，永远不能序列化，只存在于以太坊执行环境中。他们可以被想象为功能调用。</p>
<h4 style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; font-size: 18.4px; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">消息包括：</h4>
<ul style="margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">消息发送方（内含的）</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">消息接收方</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">VALUE域&mdash;和发送到合约地址的消息一起转移的wei数量，</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">可选数据域，即发送到合约的实际数据</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">一个STARTGAS值，限制了消息可以触发的代码执行的gas最大值。</li>
</ul>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">本质上来说，一个消息就像一个交易，只不过消息是由合约而不是由外在因素创造的。当正在执行代码的合约执行CALL或DELEGATECALL 操作码时，消息就产生了。和交易一样，消息可能会导致接收方账户运行代码。因此，就像和外在因素建立关系一样，合约也能以同样的方式和其他合约建立关系。</p>
<h2 style="margin: 0px 0px 1em; padding: 0.8em 0px 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background: url(&quot;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAABCAYAAACsXeyTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAFUlEQVQIHWNIS0sr/v//PwMMDzY+ADqMahlW4J91AAAAAElFTkSuQmCC&quot;) 0% 0% repeat-x rgb(248, 248, 248);">什么是gas?</h2>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">以太坊虚拟机(EVM)是以太坊区块链上的可执行环境。 每个参与到网络的节点运行EVM，作为区块验证协议的一部分。他们检查列在区块上的、他们验证的交易，运行EVM内部交易触发的代码。每个网络上的完整节点进行同样的运算，储存相同的值。很明显以太坊并不是关于运算效率的优化。它类似的进程是多余的。它的目的是提供一个有效的方式，在系统状态上不需要信任的第三方、准则或暴力垄断就能达成共识。但重要的是他们不是为了优化运算而存在。事实上，合约执行在节点之间被多余地重复，自然使之更昂贵，通常会鼓励人们如果能在链外操作运算，就不在区块链里进行。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">运行去中心化应用(dapp)时，它和区块链互动来阅读和修正状态，但是去中心化应用会很典型地只把业务逻辑和对共识至关重要的状态放在区块链上。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">当消息或交易触发结果执行时，每个指令在每个网络节点被执行。这有一个代价：每个执行的操作都有特定的成本，以一定量的gas单元表现。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">Gas是交易发送方需要为每个以太坊区块链上发生的操作所支付的执行花费。这个名字gas的灵感来自这样一个观点，这笔花费就像加密燃料，驱使智能合约产生。Gas从执行代码的矿工处购买以获得以太币。Gas和以太币被故意分开，因为gas单位与具备自然成本的运算单位一致，而以太币的价格通常会由于市场力量产生波动。二者由自由市场调和：gas价格实际上由矿工决定，矿工可以拒绝以低于最低限度的gas价格进行交易。为了获得gas，你只需要向账户中添加以太币。以太坊客户端会自动为你的以太币购买gas，数量是你指定的交易最大支出。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">在合约或交易执行的每个运算步骤，以太坊协议都要收费，以防止以太坊网络上发生蓄意攻击或滥用。每个交易都必须包含一个gas限度和每gas愿意支付的花费。矿工可以选择是否将交易包括在内和收集花费。如果交易产生的、用于运算步骤的gas总量，包括原始消息和可能引发的子消息，少于或等于gas限额，那么交易就会进行。如果gas总量超过gas限额，那么所有的变化都复原，但是交易仍然有效，矿工仍然可以收集花费。未用于交易执行的、所有多余的gas都会以以太币的形式偿还给发送方。不必担心超支，因为只会对你消费的gas收费。这意味着以高于预估的gas限额发送交易也是有效和安全的。</p>
<h2 style="margin: 0px 0px 1em; padding: 0.8em 0px 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background: url(&quot;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAABCAYAAACsXeyTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAFUlEQVQIHWNIS0sr/v//PwMMDzY+ADqMahlW4J91AAAAAElFTkSuQmCC&quot;) 0% 0% repeat-x rgb(248, 248, 248);">估算交易成本</h2>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">交易花费的以太币总量基于两个因素：</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">gasUsed 是交易消费的gas总量</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">gasPrice 交易中指定的一个gas单元的价格(换算成以太币)</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">总成本= gasUsed * gasPrice</p>
<h4 style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; font-size: 18.4px; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">gasUsed</h4>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">以太坊虚拟机上的每个操作都会被指派消费的gas数量。gasUsed是所有执行的操作所需的gas总额。有个电子表格可以看到背后的一些统计。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">对于估算gasUsed，可以用estimate Gas API但是有些警告说明。</p>
<h4 style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; font-size: 18.4px; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">gasPrice</h4>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">用户建构并签署交易，每个用户可以说明自己想要的gasPrice，可以是零。然而Frontier发布的以太坊客户端默认gasPrice是0.05e12 wei。由于矿工会使收入最优化，如果大部分交易都以0.05e12 wei 的gasPrice提交，就很难说服矿工接受价格更低或为0的交易。</p>
<h4 style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; font-size: 18.4px; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">示例交易成本</h4>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">我们来做一个只添加2个数字的合约。EVM OPCODE ADD消费3 gas。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">大概的成本，以默认gas价格计算 (2016年1月)是：</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">3 * 0.05e12 = 1.5e11 wei</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">1以太币是1e18 wei，总成本就是0.00000015以太币。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">这是个简化的计算，因为忽略了一些成本，比如将2个数字转移给合约的成本，在他们可以被添加之前。</p>
<ul style="margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">question</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">gas费用</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">gas成本计算器</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">以太坊Gas价格</li>
</ul>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);"><img src="http://assets.wangxiaoming.com/image/21-1.jpg" alt="" style="margin: 0px; padding: 0px; border: 0.5em solid rgb(255, 255, 255); font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; max-width: 100%; height: auto; border-radius: 0.3em; box-shadow: rgba(0, 0, 0, 0.14902) 0px 1px 4px; box-sizing: border-box;" /></p>
<h2 style="margin: 0px 0px 1em; padding: 0.8em 0px 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background: url(&quot;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAABCAYAAACsXeyTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAFUlEQVQIHWNIS0sr/v//PwMMDzY+ADqMahlW4J91AAAAAElFTkSuQmCC&quot;) 0% 0% repeat-x rgb(248, 248, 248);">账户交互示例 &mdash; 投注合约</h2>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">之前提到过，有两种类型的账户：</p>
<ul style="margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">外部账户 (EOA)：由私钥控制的账户，如果你有和外部账户相关的私钥，就能从账户发送以太币和消息。</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">合约： 有自己代码的账户，受代码控制。</li>
</ul>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">以太坊默认的执行环境是没有生命的，什么都不会发生，每个账户的状态保持相同。但是，每个用户都可以通过从外部账户发送交易来触发行动，启动以太坊。如果交易的目的地是其他外部账户，交易可能会转移一些以太币，否则什么也不会做。但如果目的地是个合约， 反之合约会激活，自动运行代码。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">代码有能力读/写自己的内部存储(一个将32字节钥匙映射到32字节价值的数据库)，阅读存储的接收消息，给其他合约发送消息，转而触发执行。一旦执行停止，合约发送的消息所触发的所有的子执行都会停止(这些都以决定好的同步的顺序发生，比如，子调用在父调用进一步之前完全完成)，执行环境立即再次停止，直到被下一个交易唤醒。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">合约通常服务于四个目的：</p>
<ul style="margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">保持数据库代表着对其他合约或外部世界有用的东西；一个例子是合约激励货币，另一个例子是合约在特定的组织里记录会员。</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">作为某种具有更复杂访问政策的外部账户，被称为&ldquo;前向合约&rdquo;，典型地只在特定条件下，把进来的消息转发给到指定目的地；例如，前向合约可能会等到指定3个私钥中的2个都确认了特定的消息之后才会进行转发(例如，多重签名)。更复杂的前向合约基于要发送的消息会有不同的条件。最简单的一个功能使用案例就是撤回限制，在一些更复杂的访问政策中难以驾驭。钱包合约就是个很好的例子。</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">在多个用户之间管理一个正在进行的合约或关系。例子包括金融合约，有特定中介的第三方保管合约，或一些保险。也可以是开放合约，一方对其他方的随时参与保持开放；一个例子是自动给提交数学问题有效解决方案或是证明提供了一些运算资源的人发奖金的合约。</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">给其他合约提供功能，本质上作为软件库。 合约通过被交替叫做&ldquo;调用&rdquo;或&ldquo;发送消息&rdquo;的活动进行互动。&ldquo;消息&rdquo;是包含一定量以太币，任何大小的数据字节串，发送方和接收方地址的事物。合约接收消息时，可以选择返还一些数据，消息本来的发送方可以立即使用。 这样发送消息就和调用一个功能一样。</li>
</ul>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">因为合约有这样的作用，我们期望合约可以彼此互动。举个例子，设想一个情景，Alice和Bob赌100 Gav币，明年旧金山的温度不会超过35&ordm;C。但是Alice非常有安全意识，她的第一个账户使用的前向合约，只有在3个私钥中的2个都批准的情况下才可以发送消息。Bob偏执于量子加密图形，他使用的前向合约，只传递有Lamport签名和传统ECDSA的消息(但是因为他很老派，所以更偏向于用基于SHA256的Lamport签名版本，以太坊不直接支持)。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">投注合约本身需要从一些合约中取得旧金山天气的数据，当它想要实际发送Gav币给Alice或Bob时，也需要和Gav币合约交谈(或者，更准确地说，Alice或Bob的前向合约)。因次我们可以这样表示账户之间的关系：</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);"><img src="http://assets.wangxiaoming.com/image/21-2.png" alt="" style="margin: 0px; padding: 0px; border: 0.5em solid rgb(255, 255, 255); font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; max-width: 100%; height: auto; border-radius: 0.3em; box-shadow: rgba(0, 0, 0, 0.14902) 0px 1px 4px; box-sizing: border-box;" /></p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">Bob 想最终决定赌注的时候，就会发生以下的步骤：</p>
<ol style="margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">交易被发出，触发消息从Bob的外部账户发送到他的前向合约。</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">Bob的前向合约给合约发送消息散表和Lamport签名，发挥Lamport签名确认库的作用。</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">Lamport签名确认库看到Bob想要基于SHA256的Lamport签名，于是给SHA256库多次发调用来确认签名。</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">Lamport签名确认库一旦回到1，表明签名已确认，他就会给代表赌注的合约发送消息。</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">赌注合约检查提供旧金山天气的合约，查看天气如何。</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">赌注合约看到对消息的回应显示天气高于35&ordm;C，就会给Gav币合约发送消息，将Gav币从它的账户转移到Bob的前向合约。</li>
</ol>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">注意Gav币在Gav币合约的数据库中作为一个整体&ldquo;储存&rdquo;；第6步语境中&ldquo;账户&rdquo;的意思只是说在Gav币合约储存中有数据入口，有钥匙可以进入赌注合约的地址和余额值。接收到消息后，Gav币合约值上减少，与Bob前向账户对应的入口值增加。 我们可以在下表看到这些步骤：</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);"><img src="http://assets.wangxiaoming.com/image/21-3.png" alt="" style="margin: 0px; padding: 0px; border: 0.5em solid rgb(255, 255, 255); font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; max-width: 100%; height: auto; border-radius: 0.3em; box-shadow: rgba(0, 0, 0, 0.14902) 0px 1px 4px; box-sizing: border-box;" /></p>
<h2 style="margin: 0px 0px 1em; padding: 0.8em 0px 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background: url(&quot;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAABCAYAAACsXeyTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAFUlEQVQIHWNIS0sr/v//PwMMDzY+ADqMahlW4J91AAAAAElFTkSuQmCC&quot;) 0% 0% repeat-x rgb(248, 248, 248);">离线签署交易</h2>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">[可以把这一部分加到常见问题，指向turb以太坊向导的ethkey章节]</p>
<ul style="margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">Resilience Raw Transaction Broadcaster</li>
</ul>]]></description>
			<link>http://meisw.wdlinux.cn//show-910-1.html</link>
			<category domain="http://meisw.wdlinux.cn//category-54-1.html">以太坊</category>
			<pubDate>2016-12-21 23:40</pubDate>
		</item>
		<item>
			<guid>http://meisw.wdlinux.cn//show-909-1.html</guid>
			<title>如何使用CPU挖矿？</title>
			<author>admin</author>
			<description><![CDATA[<p>&nbsp;</p>
<h2 style="margin: 0px 0px 1em; padding: 0.8em 0px 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background: none rgb(248, 248, 248);">CPU挖掘</h2>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">你可以用电脑的中央处理器（CPU）挖以太币。自从GPU矿工的效率高出两个数量级，它就不再盈利了。然而你可以用CPU挖掘在Morden测试网或私有链上挖矿，以便创建你测试合约和交易所需要的以太币， 而无需花费实时网络上的真实以太币。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">注意：测试网以太币除了用于测试目的外没有其他价值（查看测试网络）。</p>
<h3 style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; font-size: 1.3em; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">使用geth</h3>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">用geth启动以太坊节点时，并不是默认挖掘。在CPU挖掘模式开启，你会用&mdash;mine命令行选项。-minerthreads参数可以用于设置平行于挖掘线程的数量（默认为处理器核心的总数）。</p>
<p><figure class="code" style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; box-shadow: rgba(0, 0, 0, 0.0588235) 0px 0px 10px; color: rgb(34, 34, 34); background: none rgb(248, 248, 248);">
<div class="highlight" style="margin: 0px; padding: 0px; border: 1px solid rgb(5, 35, 43) !important; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; overflow-y: hidden; overflow-x: auto; background: rgb(0, 43, 54);">
<table style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; border-collapse: collapse; border-spacing: 0px;">
    <tbody style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
        <tr style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
            <td class="gutter" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle;">
            <pre class="line-numbers" style="margin-top: 0px; margin-bottom: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; text-align: right; text-shadow: rgb(2, 16, 20) 0px -1px; padding: 0.8em !important; border-right-width: 1px !important; border-right-style: solid !important; border-right-color: rgb(0, 35, 44) !important; background-image: url(&quot;/images/noise.png?1457420710&quot;) !important; background-attachment: initial !important; background-color: rgb(7, 54, 66) !important; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: 0% 0%; background-repeat: initial !important;"><span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">1</span></pre>
            </td>
            <td class="code" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle; width: 757px;">
            <pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; border: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; background: none;"><code class="" style="margin: 0px; padding: 0.8em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; vertical-align: baseline; overflow-y: hidden; display: block; overflow-x: auto; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace !important; background: rgb(0, 0, 0);"><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">geth --mine --minerthreads=4</span></code></pre>
            </td>
        </tr>
    </tbody>
</table>
</div>
</figure></p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">你也可以在执行期间用控制台开启或停止CPU挖掘。miner.start取一个矿工线程数量的可选参数。</p>
<p><figure class="code" style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; box-shadow: rgba(0, 0, 0, 0.0588235) 0px 0px 10px; color: rgb(34, 34, 34); background: none rgb(248, 248, 248);">
<div class="highlight" style="margin: 0px; padding: 0px; border: 1px solid rgb(5, 35, 43) !important; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; overflow-y: hidden; overflow-x: auto; background: rgb(0, 43, 54);">
<table style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; border-collapse: collapse; border-spacing: 0px;">
    <tbody style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
        <tr style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
            <td class="gutter" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle;">
            <pre class="line-numbers" style="margin-top: 0px; margin-bottom: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; text-align: right; text-shadow: rgb(2, 16, 20) 0px -1px; padding: 0.8em !important; border-right-width: 1px !important; border-right-style: solid !important; border-right-color: rgb(0, 35, 44) !important; background-image: url(&quot;/images/noise.png?1457420710&quot;) !important; background-attachment: initial !important; background-color: rgb(7, 54, 66) !important; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: 0% 0%; background-repeat: initial !important;"><span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">1</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">2</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">3</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">4</span></pre>
            </td>
            <td class="code" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle; width: 757px;">
            <pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; border: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; background: none;"><code class="" style="margin: 0px; padding: 0.8em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; vertical-align: baseline; overflow-y: hidden; display: block; overflow-x: auto; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace !important; background: rgb(0, 0, 0);"><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">&gt; miner.start(8) </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">true </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">&gt; miner.stop() </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">true</span></code></pre>
            </td>
        </tr>
    </tbody>
</table>
</div>
</figure></p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">&nbsp;</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">注意挖掘真实以太币只有在你与网络同步时才有意义（由于你是在共识区块顶部挖矿）。因此以太区块链下载器/同步器会延迟挖掘直到同步完成，此后挖掘自动开始，除非你用miner.stop()取消挖矿。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">为了赚取以太币，你必须有etherbase（或coinbase）地址集。这个etherbase默认为你的第一个账户。如果你没有etherbase地址，geth &ndash;mine就不会开启。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">你可以在命令行重新设置etherbase：</p>
<p><figure class="code" style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; box-shadow: rgba(0, 0, 0, 0.0588235) 0px 0px 10px; color: rgb(34, 34, 34); background: none rgb(248, 248, 248);">
<div class="highlight" style="margin: 0px; padding: 0px; border: 1px solid rgb(5, 35, 43) !important; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; overflow-y: hidden; overflow-x: auto; background: rgb(0, 43, 54);">
<table style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; border-collapse: collapse; border-spacing: 0px;">
    <tbody style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
        <tr style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
            <td class="gutter" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle;">
            <pre class="line-numbers" style="margin-top: 0px; margin-bottom: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; text-align: right; text-shadow: rgb(2, 16, 20) 0px -1px; padding: 0.8em !important; border-right-width: 1px !important; border-right-style: solid !important; border-right-color: rgb(0, 35, 44) !important; background-image: url(&quot;/images/noise.png?1457420710&quot;) !important; background-attachment: initial !important; background-color: rgb(7, 54, 66) !important; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: 0% 0%; background-repeat: initial !important;"><span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">1</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">2</span></pre>
            </td>
            <td class="code" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle; width: 757px;">
            <pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; border: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; background: none;"><code class="" style="margin: 0px; padding: 0.8em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; vertical-align: baseline; overflow-y: hidden; display: block; overflow-x: auto; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace !important; background: rgb(0, 0, 0);"><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">geth --etherbase 1 --mine 2&gt;&gt; geth.log // 1 is index: second account by creation order OR </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">geth --etherbase '0xa4d8e9cae4d04b093aac82e6cd355b6b963fb7ff' --mine 2&gt;&gt; geth.log</span></code></pre>
            </td>
        </tr>
    </tbody>
</table>
</div>
</figure></p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">你也可以在控制台重新设置etherbase：</p>
<p><figure class="code" style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; box-shadow: rgba(0, 0, 0, 0.0588235) 0px 0px 10px; color: rgb(34, 34, 34); background: none rgb(248, 248, 248);">
<div class="highlight" style="margin: 0px; padding: 0px; border: 1px solid rgb(5, 35, 43) !important; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; overflow-y: hidden; overflow-x: auto; background: rgb(0, 43, 54);">
<table style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; border-collapse: collapse; border-spacing: 0px;">
    <tbody style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
        <tr style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
            <td class="gutter" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle;">
            <pre class="line-numbers" style="margin-top: 0px; margin-bottom: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; text-align: right; text-shadow: rgb(2, 16, 20) 0px -1px; padding: 0.8em !important; border-right-width: 1px !important; border-right-style: solid !important; border-right-color: rgb(0, 35, 44) !important; background-image: url(&quot;/images/noise.png?1457420710&quot;) !important; background-attachment: initial !important; background-color: rgb(7, 54, 66) !important; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: 0% 0%; background-repeat: initial !important;"><span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">1</span></pre>
            </td>
            <td class="code" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle; width: 757px;">
            <pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; border: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; background: none;"><code class="" style="margin: 0px; padding: 0.8em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; vertical-align: baseline; overflow-y: hidden; display: block; overflow-x: auto; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace !important; background: rgb(0, 0, 0);"><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">miner.setEtherbase(eth.accounts[2])</span></code></pre>
            </td>
        </tr>
    </tbody>
</table>
</div>
</figure></p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">注意你的etherbase不必是本地账户地址，只要是现存的就可以。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">有一个给你挖掘过的区块添加额外数据的选项（只有32字节）。按照惯例，它被解释为统一码字符串，你可以设置短期虚荣标签。</p>
<p><figure class="code" style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; box-shadow: rgba(0, 0, 0, 0.0588235) 0px 0px 10px; color: rgb(34, 34, 34); background: none rgb(248, 248, 248);">
<div class="highlight" style="margin: 0px; padding: 0px; border: 1px solid rgb(5, 35, 43) !important; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; overflow-y: hidden; overflow-x: auto; background: rgb(0, 43, 54);">
<table style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; border-collapse: collapse; border-spacing: 0px;">
    <tbody style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
        <tr style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
            <td class="gutter" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle;">
            <pre class="line-numbers" style="margin-top: 0px; margin-bottom: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; text-align: right; text-shadow: rgb(2, 16, 20) 0px -1px; padding: 0.8em !important; border-right-width: 1px !important; border-right-style: solid !important; border-right-color: rgb(0, 35, 44) !important; background-image: url(&quot;/images/noise.png?1457420710&quot;) !important; background-attachment: initial !important; background-color: rgb(7, 54, 66) !important; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: 0% 0%; background-repeat: initial !important;"><span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">1</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">2</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">3</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">4</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">5</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">6</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">7</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">8</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">9</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">10</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">11</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">12</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">13</span></pre>
            </td>
            <td class="code" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle; width: 869px;">
            <pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; border: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; background: none;"><code class="" style="margin: 0px; padding: 0.8em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; vertical-align: baseline; overflow-y: hidden; display: block; overflow-x: auto; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace !important; background: rgb(0, 0, 0);"><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">miner.setExtra(&quot;&Xi;TH&Xi;SPH&Xi;&Xi;&quot;) </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">... </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">debug.printBlock(131805) </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">BLOCK(be465b020fdbedc4063756f0912b5a89bbb4735bd1d1df84363e05ade0195cb1): Size: 531.00 B TD: 643485290485 { </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">NoNonce: ee48752c3a0bfe3d85339451a5f3f411c21c8170353e450985e1faab0a9ac4cc </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">Header: </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">[ </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">... </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">  Coinbase: a4d8e9cae4d04b093aac82e6cd355b6b963fb7ff </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">  Number: 131805 </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">  Extra: &Xi;TH&Xi;SPH&Xi;&Xi; </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">... </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">}</span></code></pre>
            </td>
        </tr>
    </tbody>
</table>
</div>
</figure></p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">你可以用miner.hashrate检查散表率，结果用H/s表示（每秒散表操作）。</p>
<p><figure class="code" style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; box-shadow: rgba(0, 0, 0, 0.0588235) 0px 0px 10px; color: rgb(34, 34, 34); background: none rgb(248, 248, 248);">
<div class="highlight" style="margin: 0px; padding: 0px; border: 1px solid rgb(5, 35, 43) !important; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; overflow-y: hidden; overflow-x: auto; background: rgb(0, 43, 54);">
<table style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; border-collapse: collapse; border-spacing: 0px;">
    <tbody style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
        <tr style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
            <td class="gutter" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle;">
            <pre class="line-numbers" style="margin-top: 0px; margin-bottom: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; text-align: right; text-shadow: rgb(2, 16, 20) 0px -1px; padding: 0.8em !important; border-right-width: 1px !important; border-right-style: solid !important; border-right-color: rgb(0, 35, 44) !important; background-image: url(&quot;/images/noise.png?1457420710&quot;) !important; background-attachment: initial !important; background-color: rgb(7, 54, 66) !important; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: 0% 0%; background-repeat: initial !important;"><span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">1</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">2</span></pre>
            </td>
            <td class="code" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle; width: 757px;">
            <pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; border: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; background: none;"><code class="" style="margin: 0px; padding: 0.8em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; vertical-align: baseline; overflow-y: hidden; display: block; overflow-x: auto; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace !important; background: rgb(0, 0, 0);"><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">&gt; miner.hashrate </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">712000</span></code></pre>
            </td>
        </tr>
    </tbody>
</table>
</div>
</figure></p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">成功挖掘一些区块以后，你可以检查etherbase账户中的以太币余额。现在假定你的etherbase是个本地账户：</p>
<p><figure class="code" style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; box-shadow: rgba(0, 0, 0, 0.0588235) 0px 0px 10px; color: rgb(34, 34, 34); background: none rgb(248, 248, 248);">
<div class="highlight" style="margin: 0px; padding: 0px; border: 1px solid rgb(5, 35, 43) !important; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; overflow-y: hidden; overflow-x: auto; background: rgb(0, 43, 54);">
<table style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; border-collapse: collapse; border-spacing: 0px;">
    <tbody style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
        <tr style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
            <td class="gutter" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle;">
            <pre class="line-numbers" style="margin-top: 0px; margin-bottom: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; text-align: right; text-shadow: rgb(2, 16, 20) 0px -1px; padding: 0.8em !important; border-right-width: 1px !important; border-right-style: solid !important; border-right-color: rgb(0, 35, 44) !important; background-image: url(&quot;/images/noise.png?1457420710&quot;) !important; background-attachment: initial !important; background-color: rgb(7, 54, 66) !important; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: 0% 0%; background-repeat: initial !important;"><span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">1</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">2</span></pre>
            </td>
            <td class="code" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle; width: 757px;">
            <pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; border: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; background: none;"><code class="" style="margin: 0px; padding: 0.8em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; vertical-align: baseline; overflow-y: hidden; display: block; overflow-x: auto; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace !important; background: rgb(0, 0, 0);"><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">&gt; eth.getBalance(eth.coinbase).toNumber(); </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">'34698870000000'</span></code></pre>
            </td>
        </tr>
    </tbody>
</table>
</div>
</figure></p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">为了花费你赚的gas来交易，你需要解锁账户。</p>
<p><figure class="code" style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; box-shadow: rgba(0, 0, 0, 0.0588235) 0px 0px 10px; color: rgb(34, 34, 34); background: none rgb(248, 248, 248);">
<div class="highlight" style="margin: 0px; padding: 0px; border: 1px solid rgb(5, 35, 43) !important; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; overflow-y: hidden; overflow-x: auto; background: rgb(0, 43, 54);">
<table style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; border-collapse: collapse; border-spacing: 0px;">
    <tbody style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
        <tr style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
            <td class="gutter" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle;">
            <pre class="line-numbers" style="margin-top: 0px; margin-bottom: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; text-align: right; text-shadow: rgb(2, 16, 20) 0px -1px; padding: 0.8em !important; border-right-width: 1px !important; border-right-style: solid !important; border-right-color: rgb(0, 35, 44) !important; background-image: url(&quot;/images/noise.png?1457420710&quot;) !important; background-attachment: initial !important; background-color: rgb(7, 54, 66) !important; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: 0% 0%; background-repeat: initial !important;"><span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">1</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">2</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">3</span></pre>
            </td>
            <td class="code" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle; width: 757px;">
            <pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; border: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; background: none;"><code class="" style="margin: 0px; padding: 0.8em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; vertical-align: baseline; overflow-y: hidden; display: block; overflow-x: auto; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace !important; background: rgb(0, 0, 0);"><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">&gt; personal.unlockAccount(eth.coinbase) </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">Password </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">true</span></code></pre>
            </td>
        </tr>
    </tbody>
</table>
</div>
</figure></p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">你可以在控制台上用以下代码片段，检查哪个区块被特殊的矿工（地址）挖掘过：</p>
<p><figure class="code" style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; box-shadow: rgba(0, 0, 0, 0.0588235) 0px 0px 10px; color: rgb(34, 34, 34); background: none rgb(248, 248, 248);">
<div class="highlight" style="margin: 0px; padding: 0px; border: 1px solid rgb(5, 35, 43) !important; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; overflow-y: hidden; overflow-x: auto; background: rgb(0, 43, 54);">
<table style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; border-collapse: collapse; border-spacing: 0px;">
    <tbody style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
        <tr style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
            <td class="gutter" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle;">
            <pre class="line-numbers" style="margin-top: 0px; margin-bottom: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; text-align: right; text-shadow: rgb(2, 16, 20) 0px -1px; padding: 0.8em !important; border-right-width: 1px !important; border-right-style: solid !important; border-right-color: rgb(0, 35, 44) !important; background-image: url(&quot;/images/noise.png?1457420710&quot;) !important; background-attachment: initial !important; background-color: rgb(7, 54, 66) !important; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: 0% 0%; background-repeat: initial !important;"><span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">1</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">2</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">3</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">4</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">5</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">6</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">7</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">8</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">9</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">10</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">11</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">12</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">13</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">14</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">15</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">16</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">17</span></pre>
            </td>
            <td class="code" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle; width: 749px;">
            <pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; border: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; background: none;"><code class="" style="margin: 0px; padding: 0.8em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; vertical-align: baseline; overflow-y: hidden; display: block; overflow-x: auto; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace !important; background: rgb(0, 0, 0);"><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">function minedBlocks(lastn, addr) { </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">  addrs = []; </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">  if (!addr) { </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">    addr = eth.coinbase </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">  } </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">  limit = eth.blockNumber - lastn </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">  for (i = eth.blockNumber; i &gt;= limit; i--) { </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">    if (eth.getBlock(i).miner == addr) { </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">    addrs.push(i) </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">    } </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">  } </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">  return addrs </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">} </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">// scans the last 1000 blocks and returns the blocknumbers of blocks mined by your coinbase </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">// (more precisely blocks the mining reward for which is sent to your coinbase). </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">minedBlocks(1000, eth.coinbase); </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">//[352708, 352655, 352559]</span></code></pre>
            </td>
        </tr>
    </tbody>
</table>
</div>
</figure></p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">请注意，发现一个区块但是不能把它变成典型链会经常发生。这意味着你在当地把挖过的区块包括在内，当前的状态会显示归于你账户的挖矿奖励，然而不久后，会发现更好的链，我们转换到不包含你区块的链，因而不会记入任何挖矿奖励。因此很有可能矿工监控coinbase余额的时候会发现，它发生了相当程度的浮动。</p>]]></description>
			<link>http://meisw.wdlinux.cn//show-909-1.html</link>
			<category domain="http://meisw.wdlinux.cn//category-54-1.html">以太坊</category>
			<pubDate>2016-12-21 23:39</pubDate>
		</item>
		<item>
			<guid>http://meisw.wdlinux.cn//show-905-1.html</guid>
			<title>以太坊挖矿教程之以太坊Linux系统挖矿教程</title>
			<author>admin</author>
			<description><![CDATA[<p>&nbsp;<span style="color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">Geth客户端的CPU挖矿效率非常低，纯属鸡肋。如对CPU挖矿感兴趣，请参照</span><a href="http://ethereum.gitbooks.io/frontier-guide/content/mining_with_geth.html" style="font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px; padding: 0px; margin: 0px; color: rgb(79, 184, 27); text-decoration: none;">此帖</a><span style="color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">。下面介绍GPU挖矿。</span></p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;"><strong style="padding: 0px; margin: 0px;">　　硬件</strong></p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">　　GPU挖矿需要1-2GB显存(译者注：1GB显存不可以)，显存不够会一直报错。GPU矿机是基于OpenCL的，所以AMD显卡比NVIDI显卡更有效率。</p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">　　ASIC和FPGA(即专业矿机)是无效的。</p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">　　根据自己的显卡类型和系统，选择openCL:</p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">　　AMD SDK openCL</p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">　　NVIDIA CUDA openCL</p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">　　Ubuntu系统</p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">　　<strong style="padding: 0px; margin: 0px; box-sizing: border-box; max-width: 100%;">AMD显卡</strong></p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">　　&bull;&nbsp;<a href="http://developer.amd.com/tools-and-sdks/opencl-zone/amd-accelerated-parallel-processing-app-sdk/" style="padding: 0px; margin: 0px; color: rgb(79, 184, 27); text-decoration: none;">地址1</a></p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">　　&bull;&nbsp;<a href="http://developer.amd.com/tools-and-sdks/graphics-development/display-library-adl-sdk/" style="padding: 0px; margin: 0px; color: rgb(79, 184, 27); text-decoration: none;">地址2</a></p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">　　下载: ADL_SDK8.zip 和 AMD-APP-SDK-v2.9-1.599.381-GA-linux64.sh</p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">　　./AMD-APP-SDK-v2.9-1.599.381-GA-linux64.sh</p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">　　ln -s /opt/AMDAPPSDK-2.9-1 /opt/AMDAPP</p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">　　ln -s /opt/AMDAPP/include/CL /usr/include</p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">　　ln -s /opt/AMDAPP/lib/x86_64/* /usr/lib/</p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">　　ldconfig</p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">　　reboot</p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">　　apt-get install fglrx-updates</p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">　　// wget, tar, opencl</p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">　　sudo aticonfig &ndash;adapter=all &ndash;initial</p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">　　sudo aticonfig &ndash;list-adapters</p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">　　* 0. 01:00.0 AMD Radeon R9 200 Series</p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">　　* &ndash; Default adapter</p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">　　Nvidia显卡</p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">　　使用Ubuntu 14.04和Nvidia显卡的用户请看<a href="https://forum.ethereum.org/discussion/comment/8889/#Comment_8889" style="padding: 0px; margin: 0px; color: rgb(79, 184, 27); text-decoration: none;">此帖</a></p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">　　MacOSx系统</p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">　　wget http://developer.download.nvidia.com/compute/cuda/7_0/Prod/local_installers/cuda_7.0.29_mac.pkg</p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">　　sudo installer -pkg ~/Desktop/cuda_7.0.29_mac.pkg -target /</p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">　　brew update</p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">　　brew tap ethereum/ethereum</p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">　　brew reinstall cpp-ethereum --with-gpu-mining --devel --headless --build-from-source</p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">　　检查你的冷却状态:</p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">　　aticonfig &ndash;adapter=0 &ndash;od-gettemperature</p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;"><strong style="padding: 0px; margin: 0px;">　　挖矿软件</strong></p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">　　Frontier阶段默认的客户端Geth只支持CPU挖矿。我们正在开发Geth客户端的GPU挖矿功能，但是在Frontier阶段完成不了。但是，Geth可以和Ethminer配合进行GPU挖矿。</p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">　　C++客户端可以进行GPU挖矿。C++客户端包括eth(命令行用户界面)、AlethZero(图形用户界面)和ethMiner(独立的挖矿软件)。</p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">　　在Linux上可以用ppa安装，在MacOS上可以用brew tap安装，或者从源代码安装。</p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">　　MacOS系统:</p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">　　brew install cpp-ethereum &ndash;with-gpu-mining &ndash;devel &ndash;build-from-source</p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">　　Linux系统:</p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">　　apt-get install cpp-ethereum</p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">　　Windows系统上查看</p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;"><strong style="padding: 0px; margin: 0px;">　　利用ethminer进行GPU挖矿</strong></p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">　　用eth挖矿：</p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">　　eth -m on -G -a -i -v 8 //</p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">　　从源代码安装ethminer:</p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">　　cd cpp-ethereum</p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">　　cmake -DETHASHCL=1 -DGUI=0</p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">　　make -j4</p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">　　make install</p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">　　进行GPU挖矿，你需要一个coinbase账户。你可以本地或者远程设置此账户。</p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;"><strong style="padding: 0px; margin: 0px;">　　配合使用ethminer和geth</strong></p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">　　geth account new</p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">　　geth &ndash;rpccorsdomain localhost 2&gt;&gt; geth.log &amp;</p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">　　ethminer -G // -G for GPU, -M for benchmark</p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">　　tail -f geth.log</p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">　　ethminer与geth通过8545端口通信。你可以使用geth &ndash;rpcport optoin改变这一默认端口。Ethminer将发现Geth的任何端口。注意，你需要使用&ndash;rpccorsdomain localhost色环指CORS数据头。你也可以使用-F http://127.0.0.1:3301为ethminer设置端口。如果你打算在同一台电脑上设置多个挖矿实例，设置端口是必要的。如果你正在一个私有群(cluster)上进行测试，我们推荐你进行CPU挖矿。</p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">　　注意，你不许为geth设置&ndash;mine参数或者在控制台中开启矿机，除非你想在GPU挖矿之上进行CPU挖矿。</p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">　　如果ethminer的默认设置不能工作，请用以下命令指定OpenCL设备：&ndash;opencl-device X ，X为0，1，2等。如果运行ethminer -M时，你应该看到类似于如下的信息：</p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">　　Benchmarking on platform: { &quot;platform&quot;: &quot;NVIDIA CUDA&quot;, &quot;device&quot;: &quot;GeForce GTX 750 Ti&quot;, &quot;version&quot;: &quot;OpenCL 1.1 CUDA&quot; }</p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">　　Benchmarking on platform: { &quot;platform&quot;: &quot;Apple&quot;, &quot;device&quot;: &quot;Intel(R) Xeon(R) CPU E5-1620 v2 @ 3.70GHz&quot;, &quot;version&quot;: &quot;OpenCL 1.2 &quot; }</p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">　　调试geth:</p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">　　geth &ndash;rpccorsdomain &ldquo;localhost&rdquo; &ndash;verbosity 6 2&gt;&gt; geth.log</p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">　　调试矿机：</p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">　　make -DCMAKE_BUILD_TYPE=Debug -DETHASHCL=1 -DGUI=0</p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">　　gdb &ndash;args ethminer -G -M</p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">　　注意，当进行GPU挖矿时，在geth中hashrate是不可用的。查看ethminer的hashrate，miner.hashrate将一直报告0.</p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;"><strong style="padding: 0px; margin: 0px;">　　ethminer和eth</strong></p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">　　通过rpc，ethminer也可以和eth配合使用</p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">　　eth -i -v 8 -j // -j for rpc</p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">　　ethminer -G -M // -G for GPU, -M for benchmark</p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">　　tail -f geth.log</p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">　　或者你可以单独使用eth进行GPU挖矿：</p>
<p style="margin-bottom: 10px; color: rgb(85, 85, 85); font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif, 宋体; font-size: 16px; line-height: 28px;">　　eth -m on -G -a -i -v 8 //</p>]]></description>
			<link>http://meisw.wdlinux.cn//show-905-1.html</link>
			<category domain="http://meisw.wdlinux.cn//category-54-1.html">以太坊</category>
			<pubDate>2016-12-21 00:15</pubDate>
		</item>
		<item>
			<guid>http://meisw.wdlinux.cn//show-904-1.html</guid>
			<title>Go、Java、Python、Ruby、JS客户端介绍</title>
			<author>admin</author>
			<description><![CDATA[<p>&nbsp;</p>
<h3 style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; font-size: 1.3em; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">go-ethereum</h3>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">go-ethereum客户端通常被称为geth，它是个命令行界面，执行在Go上实现的完整以太坊节点。通过安装和运行geth，可以参与到以太坊前台实时网络并进行以下操作：</p>
<ul style="margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">挖掘真的以太币</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">在不同地址间转移资金</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">创建合约，发送交易</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">探索区块历史</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">及很多其他</li>
</ul>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">链接：</p>
<ul style="margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">网站:&nbsp;<a href="http://ethereum.github.io/go-ethereum/" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; color: rgb(117, 21, 144); transition: color 0.3s; white-space: pre-wrap; word-wrap: break-word;">http://ethereum.github.io/go-ethereum/</a></li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">Github:&nbsp;<a href="https://github.com/ethereum/go-ethereum" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; color: rgb(117, 21, 144); transition: color 0.3s; white-space: pre-wrap; word-wrap: break-word;">https://github.com/ethereum/go-ethereum</a></li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">维基百科:&nbsp;<a href="https://github.com/ethereum/go-ethereum/wiki/geth" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; color: rgb(117, 21, 144); transition: color 0.3s; white-space: pre-wrap; word-wrap: break-word;">https://github.com/ethereum/go-ethereum/wiki/geth</a></li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">Gitter:&nbsp;<a href="https://gitter.im/ethereum/go-ethereum" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; color: rgb(117, 21, 144); transition: color 0.3s; white-space: pre-wrap; word-wrap: break-word;">https://gitter.im/ethereum/go-ethereum</a></li>
</ul>
<h3 style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; font-size: 1.3em; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">pyethapp</h3>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">Pyethapp是以python为基础的客户端，实现以太坊加密经济状态机。python实现旨在提供一个更容易删节和扩展的代码库。Pyethapp利用两个以太坊核心组成部分来实现客户端：</p>
<ul style="margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">pyethereum &mdash;&mdash; 核心库，以区块链、以太坊模拟机和挖矿为特征</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">pydevp2p &mdash;&mdash; 点对点网络库，以节点发现和运输多码复用和加密连接为特征</li>
</ul>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">链接：</p>
<ul style="margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">Github:&nbsp;<a href="https://github.com/ethereum/pyethapp" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; color: rgb(117, 21, 144); transition: color 0.3s; white-space: pre-wrap; word-wrap: break-word;">https://github.com/ethereum/pyethapp</a></li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">维基百科:&nbsp;<a href="https://github.com/ethereum/pyethapp/wiki/Getting-Started" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; color: rgb(117, 21, 144); transition: color 0.3s; white-space: pre-wrap; word-wrap: break-word;">https://github.com/ethereum/pyethapp/wiki/Getting-Started</a></li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">Gitter聊天:&nbsp;<a href="https://gitter.im/ethereum/pyethapp" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; color: rgb(117, 21, 144); transition: color 0.3s; white-space: pre-wrap; word-wrap: break-word;">https://gitter.im/ethereum/pyethapp</a></li>
</ul>
<h3 style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; font-size: 1.3em; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">ethereumjs-lib</h3>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">正如黄皮书中所说，ethereumjs-lib是核心以太坊功能的javascript库。这是个简单的元模块，提供以下模块。大部分JS模块都在ethereumjs上有跟踪。</p>
<ul style="margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">虚拟机 &ndash; 以太坊虚拟机和状态处理功能</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">区块链 &ndash; 区块链管理</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">区块 &ndash; 区块模式定义和验证</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">交易 &ndash; 交易模式定义和验证</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">账户 &ndash; 账户模式定义和验证</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">rlp &ndash; 循环长度前缀序列化</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">Trie &ndash; 改良的Merkle Patricia树</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">Ethash &ndash; 以太坊工作量证明算法</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">utils &ndash; 多样辅助功能</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">devp2p &ndash; 网络协议</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">devp2p-dpt &ndash; 有争议的对等端表</li>
</ul>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">链接：</p>
<ul style="margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">Github:&nbsp;<a href="https://github.com/ethereumjs/ethereumjs-lib" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; color: rgb(117, 21, 144); transition: color 0.3s; white-space: pre-wrap; word-wrap: break-word;">https://github.com/ethereumjs/ethereumjs-lib</a></li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">加入Gitter聊天:&nbsp;<a href="https://gitter.im/ethereum/ethereumjs-lib" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; color: rgb(117, 21, 144); transition: color 0.3s; white-space: pre-wrap; word-wrap: break-word;">https://gitter.im/ethereum/ethereumjs-lib</a></li>
</ul>
<h3 style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; font-size: 1.3em; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">Ethereum(J)</h3>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">Ethereum(J) 是以太坊协议的纯Java实现。它作为可以嵌入任何Java/Scala项目的库提供，并为以太坊协议及附属服务提供完全支持。Ethereum(J)最开始由Roman Mandeleil开发，现在受 &lt;ether.camp&gt;资助。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">Ethereum(J)支持CPU挖矿。目前它由纯Java实现，可用于私人和测试网络。你甚至可以在实时以太坊网络上挖矿，但是这样从经济角度来说不划算。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">链接：</p>
<ul style="margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">博客:&nbsp;<a href="http://ethereumj.io/" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; color: rgb(117, 21, 144); transition: color 0.3s; white-space: pre-wrap; word-wrap: break-word;">http://ethereumj.io/</a></li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">Github:&nbsp;<a href="https://github.com/ethereum/ethereumj" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; color: rgb(117, 21, 144); transition: color 0.3s; white-space: pre-wrap; word-wrap: break-word;">https://github.com/ethereum/ethereumj</a></li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">Gitter聊天:&nbsp;<a href="https://gitter.im/ethereum/ethereumj" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; color: rgb(117, 21, 144); transition: color 0.3s; white-space: pre-wrap; word-wrap: break-word;">https://gitter.im/ethereum/ethereumj</a></li>
</ul>
<h3 style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; font-size: 1.3em; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">ethereumH</h3>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">这个程序包提供了写在Haskell上的工具，能使你连接到以太坊区块链。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">链接：</p>
<ul style="margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">Github:&nbsp;<a href="https://github.com/blockapps/ethereumH" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; color: rgb(117, 21, 144); transition: color 0.3s; white-space: pre-wrap; word-wrap: break-word;">https://github.com/blockapps/ethereumH</a></li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">BlockApps:&nbsp;<a href="http://www.blockapps.net/" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; color: rgb(117, 21, 144); transition: color 0.3s; white-space: pre-wrap; word-wrap: break-word;">http://www.blockapps.net/</a></li>
</ul>
<h3 style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; font-size: 1.3em; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">Parity</h3>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">Parity 声称是世界上最快速最轻便的客户端。它用Rust语言写成，可靠性、性能和代码清晰度都有所增强。Parity由Ethcore开发。Ethcore由以太坊基金会的几个会员创建。</p>
<ul style="margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">网站:&nbsp;<a href="https://ethcore.io/parity.html" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; color: rgb(117, 21, 144); transition: color 0.3s; white-space: pre-wrap; word-wrap: break-word;">https://ethcore.io/parity.html</a></li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">Github:&nbsp;<a href="https://github.com/ethcore/parity" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; color: rgb(117, 21, 144); transition: color 0.3s; white-space: pre-wrap; word-wrap: break-word;">https://github.com/ethcore/parity</a></li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">Gitter聊天:&nbsp;<a href="https://gitter.im/ethcore/parity" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; color: rgb(117, 21, 144); transition: color 0.3s; white-space: pre-wrap; word-wrap: break-word;">https://gitter.im/ethcore/parity</a></li>
</ul>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">Arch Linux 程序包由Afri Schoedon和quininer进行社群维护。</p>
<ul style="margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;"><a href="https://aur.archlinux.org/packages/parity/" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; color: rgb(117, 21, 144); transition: color 0.3s; white-space: pre-wrap; word-wrap: break-word;">https://aur.archlinux.org/packages/parity/</a>&nbsp;（稳定，最新版本）</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;"><a href="https://aur.archlinux.org/packages/parity-git/" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; color: rgb(117, 21, 144); transition: color 0.3s; white-space: pre-wrap; word-wrap: break-word;">https://aur.archlinux.org/packages/parity-git/</a>&nbsp;（不稳定，最新开发）</li>
</ul>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">已经有人报告在树莓派2上成功运行了Parity。</p>
<h3 style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; font-size: 1.3em; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">ruby-ethereum</h3>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">ruby-ethereum是以太坊虚拟机上的一个实现，用Ruby语言写成。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">链接：</p>
<ul style="margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">Github:&nbsp;<a href="https://github.com/janx/ruby-ethereum" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; color: rgb(117, 21, 144); transition: color 0.3s; white-space: pre-wrap; word-wrap: break-word;">https://github.com/janx/ruby-ethereum</a></li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">Gem:&nbsp;<a href="https://rubygems.org/gems/ruby-ethereum" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; color: rgb(117, 21, 144); transition: color 0.3s; white-space: pre-wrap; word-wrap: break-word;">https://rubygems.org/gems/ruby-ethereum</a></li>
</ul>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">相关：</p>
<ul style="margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">ruby-serpent: 捆绑在以太坊 Serpent编译器上的Ruby语言.</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">ethereum-ruby: 一个pure-Ruby JSON-RPC包装，用于和以太坊节点交流。要使用这个库，你需要有运行的以太坊节点和可行的IPC支持（默认）。目前支持go-ethereum 客户端。</li>
</ul>
<h3 style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; font-size: 1.3em; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">参考资料：</h3>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">文章中的列表对应的链接可以参考《Ethereum Homestead Documentation》第41页1.2.4 go-ethereum</p>]]></description>
			<link>http://meisw.wdlinux.cn//show-904-1.html</link>
			<category domain="http://meisw.wdlinux.cn//category-54-1.html">以太坊</category>
			<pubDate>2016-12-20 23:53</pubDate>
		</item>
		<item>
			<guid>http://meisw.wdlinux.cn//show-903-1.html</guid>
			<title>以太坊账户管理</title>
			<author>admin</author>
			<description><![CDATA[<p>&nbsp;</p>
<h3 style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; font-size: 1.3em; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">账户</h3>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">账户在以太坊中发挥着中心作用。共有两种账户类型：外部账户（EOAs）和合约账户。我们这里重点讲一下外部账户，以下会简称为账户。合约账户简称为合约， 在合约章节具体讨论。把外部账户和合约账户都归入到帐户的一般概念是合理的，因为这些实体都是所谓的状态对象。这些实体都有状态：账户有余额，合约既有余额也有合约储存。所有账户的状态正是以太坊网络的状态，以太坊网络和每个区块一起更新，网络需要达成关于以太坊的共识。对于用户通过交易和以太坊区块链互动来说，账户是必不可少的。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">如果我们把以太坊限制为只有外部账户，只允许外部账户之间进行交易，我们就会进入到&ldquo;代币&rdquo;系统，&ldquo;代币&rdquo;系统不如比特币本身有力，只能用于转移以太币。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">账户代表着外部代理人（例如人物角色，挖矿节点 ，或是自动代理人）的身份。账户运用公钥加密图像来签署交易以便以太坊虚拟机可以安全地验证交易发送者身份。</p>
<h3 style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; font-size: 1.3em; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">钥匙文件</h3>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">每个账户都由一对钥匙定义，一个私钥和一个公钥。 账户以地址为索引，地址由公钥衍生而来，取公钥的最后 20个字节。每对私钥 /地址都编码在一个钥匙文件里。钥匙文件是JSON文本文件，可以用任何文本编辑器打开和浏览。钥匙文件的关键部分，账户私钥，通常用你创建帐户时设置的密码进行加密。钥匙文件可以在以太坊节点数据目录的keystore子目录下找到。确保经常给钥匙文件备份！查看备份和恢复账号章节了解更多。创建钥匙和创建帐户是一样的。</p>
<ul style="margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">不必告诉任何人你的操作。</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">不必和区块链同步。</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">不必运行客户端。</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">甚至不必连接到网络。</li>
</ul>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">当然新账户不包含任何以太币。但它将会是你的，你大可放心，没有你的钥匙和密码，没有人能进入。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">转换整个目录或任何以太坊节点之间的个人钥匙文件都是安全的。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">警告：请注意万一你从一个不同的节点向另一个节点添加钥匙文件， 账户的顺序可能发生改变。确保不要回复或改变手稿中的索引或代码片段。</p>
<h3 style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; font-size: 1.3em; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">创建账号</h3>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">警告：记住密码并&ldquo;备份钥匙文件&lt;backup-and-restore-accounts&gt;&rdquo;。为了从账号发送交易，包括发送以太币，你必须同时有钥匙文件和密码。确保钥匙文件有个备份并牢记密码，尽可能安全地存储它们。这里没有逃亡路径，如果钥匙文件丢失或忘记密码，就会丢失所有的以太币。没有密码不可能进入账号，也没有忘记密码选项。所以一定不要忘记密码。</p>
<h4 style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; font-size: 18.4px; vertical-align: baseline; text-rendering: optimizeLegibility; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">使用geth account new</h4>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">一旦安装了geth客户端，创建账号就只是在终端执行 geth account new指令的问题了。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">注意不必运行geth客户端或者和区块链同步来使用geth account指令。</p>
<p><figure class="code" style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; box-shadow: rgba(0, 0, 0, 0.0588235) 0px 0px 10px; color: rgb(34, 34, 34); background: none rgb(248, 248, 248);">
<div class="highlight" style="margin: 0px; padding: 0px; border: 1px solid rgb(5, 35, 43) !important; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; overflow-y: hidden; overflow-x: auto; background: rgb(0, 43, 54);">
<table style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; border-collapse: collapse; border-spacing: 0px;">
    <tbody style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
        <tr style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
            <td class="gutter" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle;">
            <pre class="line-numbers" style="margin-top: 0px; margin-bottom: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; text-align: right; text-shadow: rgb(2, 16, 20) 0px -1px; padding: 0.8em !important; border-right-width: 1px !important; border-right-style: solid !important; border-right-color: rgb(0, 35, 44) !important; background-image: url(&quot;/images/noise.png?1457420710&quot;) !important; background-attachment: initial !important; background-color: rgb(7, 54, 66) !important; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: 0% 0%; background-repeat: initial !important;"><span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">1</span></pre>
            </td>
            <td class="code" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle; width: 757px;">
            <pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; border: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; background: none;"><code class="" style="margin: 0px; padding: 0.8em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; vertical-align: baseline; overflow-y: hidden; display: block; overflow-x: auto; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace !important; background: rgb(0, 0, 0);"><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">$ geth account new</span></code></pre>
            </td>
        </tr>
    </tbody>
</table>
</div>
</figure><figure class="code" style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; box-shadow: rgba(0, 0, 0, 0.0588235) 0px 0px 10px; color: rgb(34, 34, 34); background: none rgb(248, 248, 248);">
<div class="highlight" style="margin: 0px; padding: 0px; border: 1px solid rgb(5, 35, 43) !important; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; overflow-y: hidden; overflow-x: auto; background: rgb(0, 43, 54);">
<table style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; border-collapse: collapse; border-spacing: 0px;">
    <tbody style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
        <tr style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
            <td class="gutter" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle;">
            <pre class="line-numbers" style="margin-top: 0px; margin-bottom: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; text-align: right; text-shadow: rgb(2, 16, 20) 0px -1px; padding: 0.8em !important; border-right-width: 1px !important; border-right-style: solid !important; border-right-color: rgb(0, 35, 44) !important; background-image: url(&quot;/images/noise.png?1457420710&quot;) !important; background-attachment: initial !important; background-color: rgb(7, 54, 66) !important; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: 0% 0%; background-repeat: initial !important;"><span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">1</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">2</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">3</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">4</span></pre>
            </td>
            <td class="code" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle; width: 789px;">
            <pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; border: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; background: none;"><code class="" style="margin: 0px; padding: 0.8em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; vertical-align: baseline; overflow-y: hidden; display: block; overflow-x: auto; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace !important; background: rgb(0, 0, 0);"><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">Your new account is locked with a password. Please give a password. Do not forget this password. </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">Passphrase: </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">Repeat Passphrase: </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">Address: {168bc315a2ee09042d83d7c5811b533620531f67}</span></code></pre>
            </td>
        </tr>
    </tbody>
</table>
</div>
</figure></p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">对于非交互式使用，你可以提供纯文本密码文件作为&mdash;password标志的变元。文件中的数据包含密码的原始字节，后面可选择单独跟着新的一行。</p>
<p><figure class="code" style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; box-shadow: rgba(0, 0, 0, 0.0588235) 0px 0px 10px; color: rgb(34, 34, 34); background: none rgb(248, 248, 248);">
<div class="highlight" style="margin: 0px; padding: 0px; border: 1px solid rgb(5, 35, 43) !important; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; overflow-y: hidden; overflow-x: auto; background: rgb(0, 43, 54);">
<table style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; border-collapse: collapse; border-spacing: 0px;">
    <tbody style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
        <tr style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
            <td class="gutter" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle;">
            <pre class="line-numbers" style="margin-top: 0px; margin-bottom: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; text-align: right; text-shadow: rgb(2, 16, 20) 0px -1px; padding: 0.8em !important; border-right-width: 1px !important; border-right-style: solid !important; border-right-color: rgb(0, 35, 44) !important; background-image: url(&quot;/images/noise.png?1457420710&quot;) !important; background-attachment: initial !important; background-color: rgb(7, 54, 66) !important; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: 0% 0%; background-repeat: initial !important;"><span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">1</span></pre>
            </td>
            <td class="code" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle; width: 757px;">
            <pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; border: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; background: none;"><code class="" style="margin: 0px; padding: 0.8em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; vertical-align: baseline; overflow-y: hidden; display: block; overflow-x: auto; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace !important; background: rgb(0, 0, 0);"><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">$ geth --password /path/to/password account new</span></code></pre>
            </td>
        </tr>
    </tbody>
</table>
</div>
</figure></p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">警告：用&mdash;password标志只是为了测试或在信任的环境中自动操作。不建议将密码保存在文件中或以任何其他方式暴露。如果你用密码文件来使用&mdash;password标志，要确保文件只对你自己可阅读和列表。你可以在 Mac/Linux系统中通过以下指令实现：</p>
<p><figure class="code" style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; box-shadow: rgba(0, 0, 0, 0.0588235) 0px 0px 10px; color: rgb(34, 34, 34); background: none rgb(248, 248, 248);">
<div class="highlight" style="margin: 0px; padding: 0px; border: 1px solid rgb(5, 35, 43) !important; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; overflow-y: hidden; overflow-x: auto; background: rgb(0, 43, 54);">
<table style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; border-collapse: collapse; border-spacing: 0px;">
    <tbody style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
        <tr style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
            <td class="gutter" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle;">
            <pre class="line-numbers" style="margin-top: 0px; margin-bottom: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; text-align: right; text-shadow: rgb(2, 16, 20) 0px -1px; padding: 0.8em !important; border-right-width: 1px !important; border-right-style: solid !important; border-right-color: rgb(0, 35, 44) !important; background-image: url(&quot;/images/noise.png?1457420710&quot;) !important; background-attachment: initial !important; background-color: rgb(7, 54, 66) !important; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: 0% 0%; background-repeat: initial !important;"><span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">1</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">2</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">3</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">4</span></pre>
            </td>
            <td class="code" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle; width: 757px;">
            <pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; border: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; background: none;"><code class="" style="margin: 0px; padding: 0.8em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; vertical-align: baseline; overflow-y: hidden; display: block; overflow-x: auto; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace !important; background: rgb(0, 0, 0);"><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">touch /path/to/password </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">chmod 600 /path/to/password </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">cat &gt; /path/to/password </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">&gt;I type my pass</span></code></pre>
            </td>
        </tr>
    </tbody>
</table>
</div>
</figure></p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">要列出目前在你的keystore文件夹中的钥匙文件的所有账号，使用 geth account指令的list子指令：</p>
<p><figure class="code" style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; box-shadow: rgba(0, 0, 0, 0.0588235) 0px 0px 10px; color: rgb(34, 34, 34); background: none rgb(248, 248, 248);">
<div class="highlight" style="margin: 0px; padding: 0px; border: 1px solid rgb(5, 35, 43) !important; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; overflow-y: hidden; overflow-x: auto; background: rgb(0, 43, 54);">
<table style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; border-collapse: collapse; border-spacing: 0px;">
    <tbody style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
        <tr style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
            <td class="gutter" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle;">
            <pre class="line-numbers" style="margin-top: 0px; margin-bottom: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; text-align: right; text-shadow: rgb(2, 16, 20) 0px -1px; padding: 0.8em !important; border-right-width: 1px !important; border-right-style: solid !important; border-right-color: rgb(0, 35, 44) !important; background-image: url(&quot;/images/noise.png?1457420710&quot;) !important; background-attachment: initial !important; background-color: rgb(7, 54, 66) !important; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: 0% 0%; background-repeat: initial !important;"><span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">1</span></pre>
            </td>
            <td class="code" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle; width: 757px;">
            <pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; border: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; background: none;"><code class="" style="margin: 0px; padding: 0.8em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; vertical-align: baseline; overflow-y: hidden; display: block; overflow-x: auto; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace !important; background: rgb(0, 0, 0);"><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">$ geth account list</span></code></pre>
            </td>
        </tr>
    </tbody>
</table>
</div>
</figure><figure class="code" style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; box-shadow: rgba(0, 0, 0, 0.0588235) 0px 0px 10px; color: rgb(34, 34, 34); background: none rgb(248, 248, 248);">
<div class="highlight" style="margin: 0px; padding: 0px; border: 1px solid rgb(5, 35, 43) !important; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; overflow-y: hidden; overflow-x: auto; background: rgb(0, 43, 54);">
<table style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; border-collapse: collapse; border-spacing: 0px;">
    <tbody style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
        <tr style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
            <td class="gutter" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle;">
            <pre class="line-numbers" style="margin-top: 0px; margin-bottom: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; text-align: right; text-shadow: rgb(2, 16, 20) 0px -1px; padding: 0.8em !important; border-right-width: 1px !important; border-right-style: solid !important; border-right-color: rgb(0, 35, 44) !important; background-image: url(&quot;/images/noise.png?1457420710&quot;) !important; background-attachment: initial !important; background-color: rgb(7, 54, 66) !important; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: 0% 0%; background-repeat: initial !important;"><span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">1</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">2</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">3</span></pre>
            </td>
            <td class="code" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle; width: 757px;">
            <pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; border: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; background: none;"><code class="" style="margin: 0px; padding: 0.8em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; vertical-align: baseline; overflow-y: hidden; display: block; overflow-x: auto; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace !important; background: rgb(0, 0, 0);"><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">account #0: {a94f5374fce5edbc8e2a8697c15331677e6ebf0b} </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">account #1: {c385233b188811c9f355d4caec14df86d6248235} </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">account #2: {7f444580bfef4b9bc7e14eb7fb2a029336b07c9d}</span></code></pre>
            </td>
        </tr>
    </tbody>
</table>
</div>
</figure></p>
<p style="margin-bottom: 1.5em; border: 0px; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">钥匙文件的文件名格式为UTC&mdash;&lt;created_at UTC ISO8601&gt;&ndash;</p>
<address hex="" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-stretch: inherit; line-height: 27.6px; font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif; font-size: 18.4px; vertical-align: baseline; color: rgb(34, 34, 34); background-color: rgb(248, 248, 248);">。账号列出时是按字母顺序排列，但是由于时间戳格式，实际上它是按创建顺序排列。
<p style="margin-bottom: 1.5em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">&nbsp;</p>
<h4 style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; font-size: 1em; vertical-align: baseline; text-rendering: optimizeLegibility;">使用geth控制台</h4>
<p style="margin-bottom: 1.5em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">为了用geth创建新账号，我们必须先在控制台模式开启geth（或者可以用 geth attach将控制台依附在已经运行着的事例上）：</p>
<figure class="code" style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; box-shadow: rgba(0, 0, 0, 0.0588235) 0px 0px 10px; background: none;">
<div class="highlight" style="margin: 0px; padding: 0px; border: 1px solid rgb(5, 35, 43) !important; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; overflow-y: hidden; overflow-x: auto; background: rgb(0, 43, 54);">
<table style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; border-collapse: collapse; border-spacing: 0px;">
    <tbody style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
        <tr style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
            <td class="gutter" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle;">
            <pre class="line-numbers" style="margin-top: 0px; margin-bottom: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; text-align: right; text-shadow: rgb(2, 16, 20) 0px -1px; padding: 0.8em !important; border-right-width: 1px !important; border-right-style: solid !important; border-right-color: rgb(0, 35, 44) !important; background-image: url(&quot;/images/noise.png?1457420710&quot;) !important; background-attachment: initial !important; background-color: rgb(7, 54, 66) !important; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: 0% 0%; background-repeat: initial !important;"><span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">1</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">2</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">3</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">4</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">5</span></pre>
            </td>
            <td class="code" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle; width: 757px;">
            <pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; border: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; background: none;"><code class="" style="margin: 0px; padding: 0.8em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; vertical-align: baseline; overflow-y: hidden; display: block; overflow-x: auto; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace !important; background: rgb(0, 0, 0);"><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">&gt; geth console 2&gt;&gt; file_to_log_output </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">instance: Geth/v1.4.0-unstable/linux/go1.5.1 </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">coinbase: coinbase: [object Object] </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">at block: 865174 (Mon, 18 Jan 2016 02:58:53 GMT) </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">datadir: /home/USERNAME/.ethereum</span></code></pre>
            </td>
        </tr>
    </tbody>
</table>
</div>
</figure>
<p style="margin-bottom: 1.5em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">控制台使你能够通过发出指令与本地节点互相作用。比如，试一下这个列出账号的指令：</p>
<figure class="code" style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; box-shadow: rgba(0, 0, 0, 0.0588235) 0px 0px 10px; background: none;">
<div class="highlight" style="margin: 0px; padding: 0px; border: 1px solid rgb(5, 35, 43) !important; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; overflow-y: hidden; overflow-x: auto; background: rgb(0, 43, 54);">
<table style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; border-collapse: collapse; border-spacing: 0px;">
    <tbody style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
        <tr style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
            <td class="gutter" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle;">
            <pre class="line-numbers" style="margin-top: 0px; margin-bottom: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; text-align: right; text-shadow: rgb(2, 16, 20) 0px -1px; padding: 0.8em !important; border-right-width: 1px !important; border-right-style: solid !important; border-right-color: rgb(0, 35, 44) !important; background-image: url(&quot;/images/noise.png?1457420710&quot;) !important; background-attachment: initial !important; background-color: rgb(7, 54, 66) !important; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: 0% 0%; background-repeat: initial !important;"><span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">1</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">2</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">3</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">4</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">5</span></pre>
            </td>
            <td class="code" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle; width: 757px;">
            <pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; border: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; background: none;"><code class="" style="margin: 0px; padding: 0.8em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; vertical-align: baseline; overflow-y: hidden; display: block; overflow-x: auto; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace !important; background: rgb(0, 0, 0);"><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">&gt; eth.accounts </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">{ </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">code: -32000, </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">message: &quot;no keys in store&quot; </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">}</span></code></pre>
            </td>
        </tr>
    </tbody>
</table>
</div>
</figure>
<p style="margin-bottom: 1.5em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">这就表明你没有账号。你也可以从控制台创建一个账号：</p>
<figure class="code" style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; box-shadow: rgba(0, 0, 0, 0.0588235) 0px 0px 10px; background: none;">
<div class="highlight" style="margin: 0px; padding: 0px; border: 1px solid rgb(5, 35, 43) !important; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; overflow-y: hidden; overflow-x: auto; background: rgb(0, 43, 54);">
<table style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; border-collapse: collapse; border-spacing: 0px;">
    <tbody style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
        <tr style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
            <td class="gutter" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle;">
            <pre class="line-numbers" style="margin-top: 0px; margin-bottom: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; text-align: right; text-shadow: rgb(2, 16, 20) 0px -1px; padding: 0.8em !important; border-right-width: 1px !important; border-right-style: solid !important; border-right-color: rgb(0, 35, 44) !important; background-image: url(&quot;/images/noise.png?1457420710&quot;) !important; background-attachment: initial !important; background-color: rgb(7, 54, 66) !important; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: 0% 0%; background-repeat: initial !important;"><span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">1</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">2</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">3</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">4</span></pre>
            </td>
            <td class="code" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle; width: 757px;">
            <pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; border: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; background: none;"><code class="" style="margin: 0px; padding: 0.8em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; vertical-align: baseline; overflow-y: hidden; display: block; overflow-x: auto; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace !important; background: rgb(0, 0, 0);"><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">&gt; personal.newAccount() </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">Passphrase: </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">Repeat passphrase: </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">&quot;0xb2f69ddf70297958e582a0cc98bce43294f1007d&quot;</span></code></pre>
            </td>
        </tr>
    </tbody>
</table>
</div>
</figure>
<p style="margin-bottom: 1.5em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">注意：记得用一个安全性强、随机生成的密码。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">我们刚刚创建了第一个账号。如果我们再次试着列出账号，就可以看到新创建的账号了。</p>
<figure class="code" style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; box-shadow: rgba(0, 0, 0, 0.0588235) 0px 0px 10px; background: none;">
<div class="highlight" style="margin: 0px; padding: 0px; border: 1px solid rgb(5, 35, 43) !important; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; overflow-y: hidden; overflow-x: auto; background: rgb(0, 43, 54);">
<table style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline; border-collapse: collapse; border-spacing: 0px;">
    <tbody style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
        <tr style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
            <td class="gutter" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle;">
            <pre class="line-numbers" style="margin-top: 0px; margin-bottom: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; text-align: right; text-shadow: rgb(2, 16, 20) 0px -1px; padding: 0.8em !important; border-right-width: 1px !important; border-right-style: solid !important; border-right-color: rgb(0, 35, 44) !important; background-image: url(&quot;/images/noise.png?1457420710&quot;) !important; background-attachment: initial !important; background-color: rgb(7, 54, 66) !important; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: 0% 0%; background-repeat: initial !important;"><span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">1</span> <span class="line-number" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(88, 110, 117) !important;">2</span></pre>
            </td>
            <td class="code" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: middle; width: 757px;">
            <pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; border: none; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: none; border-radius: 0px; color: rgb(147, 161, 161); overflow: auto; background: none;"><code class="" style="margin: 0px; padding: 0.8em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 1.45em; vertical-align: baseline; overflow-y: hidden; display: block; overflow-x: auto; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace !important; background: rgb(0, 0, 0);"><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">&gt; eth.accounts </span><span class="line" style="margin: 0px; padding: 0px; border: 0px; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">[&quot;0xb2f69ddf70297958e582a0cc98bce43294f1007d&quot;]</span></code></pre>
            </td>
        </tr>
    </tbody>
</table>
</div>
</figure>
<h4 style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: 'PT Serif', Georgia, 'Helvetica Neue', Arial, sans-serif; font-size: 1em; vertical-align: baseline; text-rendering: optimizeLegibility;">使用 Mist 以太坊钱包</h4>
<p style="margin-bottom: 1.5em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">对于相反的命令行，现在有一个基于GUI的选项可以用来创建账号：&ldquo;官方&rdquo;Mist以太坊钱包。 Mist以太坊钱包，和它的父项目Mist, 是在以太坊基金会的赞助下开发，因此是&ldquo;官方&rdquo;地位。钱包应用有Linux, Mac OS X和Windows可用的版本。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">警告：Mist钱包是试用软件，使用需风险自担。</p>
<p style="margin-bottom: 1.5em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">用GUI Mist以太坊钱包创建账号再容易不过了。事实上，第一个账号在应用安装期间就创建出来了。</p>
<ul style="margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">一、根据你的操作程序下载钱包应用最新版本。由于你实际上会运行一个完整的geth节点，打开钱包应用就会开始同步复制你电脑上的整个以太坊区块链。</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">二、 解锁下载的文件夹，运行以太坊钱包可执行文件。</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">三、 等待区块链完全同步，按照屏幕上的说明操作，第一个账号就创建出来了。</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">四、第一次登录Mist 以太坊钱包，你会看到自己在安装过程中创建的账号。它会被默认命名为主账号（以太库）</li>
    <li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">五、再另外创建账号很容易；只需点击应用主界面上的添加账号，输入所需的密码即可。</li>
</ul>
<p style="margin-bottom: 1.5em; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 18.4px; vertical-align: baseline;">注意： Mist钱包仍在开发中，以上列出的具体步骤可能会随着更新有所变更。</p>
</address>]]></description>
			<link>http://meisw.wdlinux.cn//show-903-1.html</link>
			<category domain="http://meisw.wdlinux.cn//category-54-1.html">以太坊</category>
			<pubDate>2016-12-20 23:46</pubDate>
		</item>
	</channel>
</rss>
