查询上链结果
<h3>应用场景</h3>
<p>> 商户通过该接口,查询铸造、转移、销毁的交易结果(可配合<code>回调通知服务</code>一起使用)</p>
<hr />
<h3>接口定义</h3>
<h4>接口URL</h4>
<p>请求方法:<code>GET</code></p>
<p>URI: <code>/chain/query/txReceipt/{txHash}</code></p>
<hr />
<h3>请求参数</h3>
<table>
<thead>
<tr>
<th>参数</th>
<th>是否必填</th>
<th>类型</th>
<th>说明</th>
<th>示例值</th>
</tr>
</thead>
<tbody>
<tr>
<td>txHash</td>
<td>是</td>
<td>String</td>
<td>上链接口返回的 txHash 字段</td>
<td>"0xb4d8fb18e2b34b0e99db84e3d9977eae2812948ea02c32eff4b0a6e71acc6f76"</td>
</tr>
</tbody>
</table>
<h3>请求参数示例</h3>
<pre><code class="language-text">http://localhost:8888/chain/query/txReceipt/0xb4d8fb18e2b34b0e99db84e3d9977eae2812948ea02c32eff4b0a6e71acc6f76</code></pre>
<hr />
<h3>响应参数</h3>
<table>
<thead>
<tr>
<th>参数</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>code</td>
<td>响应码</td>
</tr>
<tr>
<td>message</td>
<td>成功</td>
</tr>
<tr>
<td>data</td>
<td></td>
</tr>
<tr>
<td>&ensp;&ensp; result</td>
<td>交易结果</td>
</tr>
<tr>
<td>&ensp;&ensp; rawResponse</td>
<td>忽略</td>
</tr>
<tr>
<td>&ensp;&ensp; id</td>
<td>忽略</td>
</tr>
<tr>
<td>&ensp;&ensp; jsonrpc</td>
<td>忽略</td>
</tr>
<tr>
<td>&ensp;&ensp; error</td>
<td>忽略</td>
</tr>
</tbody>
</table>
<h3>响应参数示例</h3>
<p>> 查询成功的 code 码都为 <code>EC000000</code>,只有<code>result -&gt; status</code>为 <code>0</code>,或<code>result -&gt; statusOK</code>为<code>true</code>才是上链成功,失败参考下一章节 <strong>上链失败梳理</strong></p>
<pre><code class="language-json">{
&quot;code&quot;: &quot;EC000000&quot;,
&quot;message&quot;: &quot;成功&quot;,
&quot;data&quot;: {
&quot;result&quot;: {
&quot;transactionProof&quot;: null,
&quot;extraData&quot;: &quot;&quot;,
&quot;txReceiptProof&quot;: null,
&quot;contractAddress&quot;: &quot;&quot;,
&quot;message&quot;: &quot;&quot;,
&quot;version&quot;: 0,
&quot;receiptProof&quot;: null,
&quot;transactionHash&quot;: &quot;0xb4d8fb18e2b34b0e99db84e3d9977eae2812948ea02c32eff4b0a6e71acc6f76&quot;,
&quot;output&quot;: &quot;0x&quot;,
&quot;logEntries&quot;: [
{
&quot;address&quot;: &quot;93644794acfe95135a9df2db6ca6bf301886e817&quot;,
&quot;data&quot;: &quot;0x&quot;,
&quot;topics&quot;: [
&quot;0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef&quot;,
&quot;0x0000000000000000000000000000000000000000000000000000000000000000&quot;,
&quot;0x00000000000000000000000021dbb10c42c5caed715edf976396e1cdf7973a63&quot;,
&quot;0x0000000000000000000000000000000000000000000000000000000000000007&quot;
],
&quot;blockNumber&quot;: null
}
],
&quot;input&quot;: &quot;0x40c10f1900000000000000000000000021dbb10c42c5caed715edf976396e1cdf7973a630000000000000000000000000000000000000000000000000000000000000007&quot;,
&quot;gasUsed&quot;: &quot;23432&quot;,
&quot;checksumContractAddress&quot;: &quot;&quot;,
&quot;txProof&quot;: null,
&quot;blockNumber&quot;: 898030,
&quot;statusOK&quot;: true,
&quot;from&quot;: &quot;0x75ac45d3f9c5532dff97350954449fc47c03250b&quot;,
&quot;to&quot;: &quot;0x93644794acfe95135a9df2db6ca6bf301886e817&quot;,
&quot;hash&quot;: &quot;0x3efff4c632b3adf6722f58c6f012a349c698fbd4c0351f230d4fc3f48ab2d2c4&quot;,
&quot;status&quot;: 0
},
&quot;rawResponse&quot;: null,
&quot;id&quot;: 694154,
&quot;jsonrpc&quot;: &quot;2.0&quot;,
&quot;error&quot;: null
}
}</code></pre>