在testrpc上"truffle migrate"以太坊合约期间出错



在尝试教程中提到的以太坊合约:https://medium.com/@ConsenSys/a-101- noobo -intro-to-programming-smart-contracts-on-ethereum-695d15c1dab4#.ilmaiavg0(教程的源代码:https://github.com/eshon/conference)时,我在进行松露迁移时得到以下错误:

test@test-ubuntu:~/Blockchain/Ethereum/conference$ truffle migrate
Running migration: 1_initial_migration.js
  Deploying Migrations...
Error encountered, bailing. Network state unknown. Review successful transactions manually.
Error: Server error
    at Object.module.exports.InvalidResponse (/usr/local/lib/node_modules/truffle/node_modules/ether-pudding/node_modules/web3/lib/web3/errors.js:35:16)
    at /usr/local/lib/node_modules/truffle/node_modules/ether-pudding/node_modules/web3/lib/web3/requestmanager.js:86:36
    at [object Object].request.onreadystatechange (/usr/local/lib/node_modules/truffle/node_modules/web3/lib/web3/httpprovider.js:114:13)
    at [object Object].dispatchEvent (/usr/local/lib/node_modules/truffle/node_modules/xmlhttprequest/lib/XMLHttpRequest.js:591:25)
    at setState (/usr/local/lib/node_modules/truffle/node_modules/xmlhttprequest/lib/XMLHttpRequest.js:610:14)
    at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/truffle/node_modules/xmlhttprequest/lib/XMLHttpRequest.js:447:13)
    at emitNone (events.js:72:20)
    at IncomingMessage.emit (events.js:166:7)
    at endReadableNT (_stream_readable.js:905:12)
    at nextTickCallbackWith2Args (node.js:441:9)
    at process._tickDomainCallback (node.js:396:17)

testrpc已经启动并运行,当我运行truffle migrate时,我在testrpc终端中看到以下两行:

127.0.0.1 - - [2016-10-21 09:38:17] "POST / HTTP/1.1" 200 718 0.001741
127.0.0.1 - - [2016-10-21 09:38:17] "POST / HTTP/1.1" 200 493 0.042596

我在配置中遗漏了什么吗?我的源代码在https://github.com/manindra23/conference-contract/tree/develop

你能不能试着在truffle.js文件中给出网络设置

,

networks: {
    development: {
      host: 'localhost',
      port: 8545,
      network_id: '*' // Match any network id
    }
  }

最新更新