Parity

Parity Kovan 在智能合約中顯示 TX id 但餘額為 0

  • February 23, 2018

我製作了這個 tx:0x6d5c2CC2e1454B493E4090fA3995226245c8b744,它顯示了原始 tx:

{
 "blockHash": "0xc101da80e396878a572dc3024c5423479e5e45a9c622af5621ad521fe86cd8af",
 "blockNumber": "6007464",
 "chainId": "0x2a",
 "condition": null,
 "creates": "",
 "from": "0x33dbe8478805cf734184aeD8737607656252D804",
 "gas": "2649987",
 "gasPrice": "1000000000",
 "hash": "0xf85549de4c283f2f5b216c692beaab7faf09eb3386d98cad9cbada99b232802a",
 "input": "0x3eb76b9c0000000000000000000000000000000000000000000000000000000000000001",
 "nonce": "66",
 "publicKey": "0x014b1e4d717170123a4cdcac04cb3bb93783cc8dc207bb63f00e3c78b0cf83a61363010f1c720f6e26d1b71ebd5192e739539531f7ced81066ed71e2dbe1f780",
 "r": "0xd88c98848910ac44da9abccc38eadf38b47d4b1a190388b2b8d523276e625f7",
 "raw": "0xf88f42843b9aca0083286f83946d5c2cc2e1454b493e4090fa3995226245c8b74487038d7ea4c68000a43eb76b9c000000000000000000000000000000000000000000000000000000000000000177a00d88c98848910ac44da9abccc38eadf38b47d4b1a190388b2b8d523276e625f7a072dfc82735aeb8703d6fdb872f519418e1f3258380e5417ca52aab8cb6f48327",
 "s": "0x72dfc82735aeb8703d6fdb872f519418e1f3258380e5417ca52aab8cb6f48327",
 "standardV": "0x0",
 "to": "0x6d5c2CC2e1454B493E4090fA3995226245c8b744",
 "transactionIndex": "0",
 "v": "0x77",
 "value": "1000000000000000"
}

塊 # 6,007,464 (0xc1..af)

所以我期望智能合約地址

"0x6d5c2CC2e1454B493E4090fA3995226245c8b744"有 0.001

但它沒有,它有 0.000 餘額。我嘗試發送 tx 幾次,每次都以交易 ID 完成但不顯示。

為什麼會這樣?

編輯:我在契約執行中發現了一個警告,錯誤。我很驚訝 tx 在 Metamask 中仍然通過而沒有錯誤?除了查看程式碼之外,還有更好的調試方法嗎?

這是因為您的主要備份功能不支付,我認為:

function () payable { main.handlePayment.value(msg.value)(msg.sender); }

最好的調試方法是使用truffle debug這個http://truffleframework.com/docs/getting_started/debuggingremix debug https://remix.readthedocs.io/en/latest/tutorial_mist.html

引用自:https://ethereum.stackexchange.com/questions/40702