松露测试-施工合同恢复

时间:2019-03-03 15:11:36

标签: blockchain ethereum smartcontracts truffle

问题

使用extension MutableCollection where Self: BidirectionalCollection, Element: Equatable { mutating func moveRight(_ value: Element) { for i in indices where self[i] == value { swapAt(startIndex, index(startIndex, offsetBy: 5)) } } } 时,我发现合同意外恢复了。

我跑步时

truffle debug

我知道

$ truffle debug <my transaction hash>

如果只是键入

Gathering transaction data...

Addresses affected:
 0x9f308fb36b159f53607b5f1c6fbff957648caf6b - SNM

Commands:
......


SNM.sol:

113: }
114:
115: contract SNM  is StandardToken {
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

debug(privateLive:0x25fe2b0a...)>

事务因运行时错误而中止。

debug(privateLive:0x25fe2b0a...)> i

我越来越近了

Transaction halted with a RUNTIME ERROR.

This is likely due to an intentional halting expression, like assert(), require() or revert(). It can also be due to out-of-gas exceptions. Please inspect your transaction parameters and contract code to determine the meaning of this error.

经过一连串的编码,我发现

debug(privateLive:0x25fe2b0a...)> ;

我不知道是什么原因导致SNM.sol: (77) REVERT 00000000000000000000000000000000000000000000000000000000d73dd623 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 (top) 113: } 114: 115: contract SNM is StandardToken { ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ,因为REVERT正在运行其第一个代码。

我不知道如何调试它,因为似乎无法通过命令contract SNM来理解字节码。

有人可以帮助我吗?随时要求我提供更多信息。

版本

;

0 个答案:

没有答案
相关问题