我不能通过错误 - 无效发件人将合同通过Remix-Solidity签订合同

时间:2017-06-02 13:55:21

标签: ethereum solidity remix

我试图将以下合同运行到以太坊区块链上,但是, 我收到错误"回调包含无结果错误:发件人无效"。

pragma solidity ^0.4.0;
contract SingleNumRegister {
    uint storedData;
    function set(uint x) {
        storedData = x;
    }
    function get() constant returns (uint retVal) {
        return storedData;
    }
}

帐号[0]已经有足够的气体并且已解锁。

我不知道为什么会出现此消息。请给我一些解决问题的建议。

//////环境数据///////

IDE:

  Browser-Only Solidity IDE and Runtime Environment
 remix-4a2c813.zip.

Web3提供商

geth:

  

geth --datadir" / home / yuichi / ethe-prj / dprvnet" --port 30304 --networkid 1234 --rpc --rpcport" 8545" --nodiscover --rpccorsdomain" *" console 2> ./ console.log

     

实例:Geth / v1.6.1-stable-021c3c28 / linux-amd64 / go1.8.1   coinbase:0x91be0471171c5ddfe94cf5b3b81d1d1d5e9cab26   在街区:9466(星期五,2017年6月2日05:35:45 JST)    datadir:/ home / yuichi / ethe-prj / dprvnet    模块:admin:1.0 debug:1.0 eth:1.0 miner:1.0 net:1.0 personal:1.0 rpc:1.0 txpool:1.0 web3:1.0

1 个答案:

答案 0 :(得分:0)

我找到了发生这种情况的原因。 genesis.json不正确。 实际上配置部分是错误的。我这样纠正了:

"config": {
          "chainID": 10,
          "homesteadBlock": 0,
          "eip155Block": 0,
          "eip158Block": 0
  },

我再次使用“geth init”命令再次启动,如:

geth --datadir AAA init genesis.json

我创建了一个节点并开始挖掘。错误已得到修复!