3个月前,我部署了一个以太坊智能合约,我保留了原始源代码,并试图在今天进行验证,但未能成功。它一直告诉我“对不起! “ hahaCoin”的已编译合同字节码与“合同创建码”不匹配。
我还在ropsten testnet上部署了一个具有相同代码的新代码,可以在下一分钟进行验证。在这个阶段,我猜测是因为编译器版本不匹配,所以最终我会一一尝试列表中的编译器,然后复制源字节码以与正确的代码进行比较。我不记得自己使用的编译器版本,因为我使用的是在线混音稳定性IDE来发布合同。
这些是我复制的一些字节码:
correct:
608060405234801561001057600080fd5b50604051604080611d2d8339810180604052810190808051906020019092919080519060200190929190505050336000806101000a81548173ffff
0.4.23
608060405234801561001057600080fd5b5060048054600160a060020a033316600160a060020a031990911681179091556b204fce5e3e250261100000006000818155918252600160205260
608060405234801561001057600080fd5b5060048054600160a060020a033316600160a060020a031990911681179091556b204fce5e3e250261100000006000818155918252600160205260
608060405234801561001057600080fd5b5060048054600160a060020a033316600160a060020a031990911681179091556b204fce5e3e250261100000006000818155918252600160205260
608060405234801561001057600080fd5b5033600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffff
608060405234801561001057600080fd5b5033600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffff
0.4.24
608060405234801561001057600080fd5b5033600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffff
608060405234801561001057600080fd5b5060048054600160a060020a033316600160a060020a031990911681179091556b204fce5e3e250261100000006000818155918252600160205260
0.4.25
608060405234801561001057600080fd5b5060048054600160a060020a031916339081179091556b204fce5e3e250261100000006000818155918252600160205260409091205561092480610
608060405234801561001057600080fd5b5033600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373fffffffffffffffffffffffffffffffffffffff
0.4.22
6060604052341561000f57600080fd5b33600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160
0.4.21
6060604052341561000f57600080fd5b33600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff
我在这里尝试并浪费时间没有运气。有人有类似的问题吗,我该如何解决?
答案 0 :(得分:1)
好的,我找到了解决方案。 我选择了错误的编译器版本,正确的版本是0.4.25-nightly.2018.5.16 + commit.3897c367。
这是有史以来最糟糕的调试体验之一,我只是一个接一个地选择编译器版本进行测试。