在本教程之后,我一直在尝试设置基于以太坊的演示 ICO ,但是每次我尝试将合约部署到 Ropsten 或 Rinkeby ir 时都会出现以下错误:
Running migration: 2_deploy_contracts.js
Deploying SuperHeroTokenThreeCrowdsale...
... 0x9d0da17f00192993720639abceecc2b33c5fbb9a29dd43fa6e1abd0ce6aecc5d
Error encountered, bailing. Network state unknown. Review successful transactions manually.
Error: The contract code couldn't be stored, please check your gas amount.
at Object.callback (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:314870:46)
at /usr/local/lib/node_modules/truffle/build/cli.bundled.js:35060:25
at /usr/local/lib/node_modules/truffle/build/cli.bundled.js:316808:9
at /usr/local/lib/node_modules/truffle/build/cli.bundled.js:164746:11
at /usr/local/lib/node_modules/truffle/build/cli.bundled.js:294942:9
at XMLHttpRequest.request.onreadystatechange (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:296367:13)
at XMLHttpRequestEventTarget.dispatchEvent (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:164934:18)
at XMLHttpRequest._setReadyState (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:165224:12)
at XMLHttpRequest._onHttpResponseEnd (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:165379:12)
at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:165339:24)
- 系统:Ubuntu 16.04
- 松露:v4.0.0-beta.2
- Geth:1.7.2-稳定
- OpenZeppelyn Solidity 1.3.0
松露.js:
module.exports = {
networks: {
development: {
host: "localhost",
port: 8545,
gas: 4700000,
from: '0x24182550B8630629501AC11f5568dbb7EE18dBd2',
network_id: "*" // Match any network id
},
}
};
另外我不得不说我的 Rinkeby 账户上有以太币。另一个注意事项 - 如果我部署到 TestRpc 它工作得很好,我可以购买我的自定义令牌并且一切正常。我试图调整气体量,但没有任何改变。
任何想法可能是问题所在?