I am new to all this, spent over 15hrs in the past 24 hrs to deploy based on directions here : https://blog.zeppelin.solutions/how-to-create-token-and-initial-coin-offering-contracts-using-truffle-openzeppelin-1b7a5dae99b6
I made simple changes changes because I want to deploy to ropsten and then mainnet. Initial migration works, but get an error at 2_deploy_contracts. I tried the fix the author mentioned in comments, it wont change anything.
I've googled and looked everything, BUT still get the same error for both networks. Error:
Error: Web3ProviderEngine does not support synchronous requests. at ProviderError.ExtendableError (C:\Users\g\AppData\Roaming\npm\node_modules\truffle\build\cli.bundled.js:9401:17) at new ProviderError (C:\Users\g\AppData\Roaming\npm\node_modules\truffle\build\cli.bundled.js:325054:24) at C:\Users\g\AppData\Roaming\npm\node_modules\truffle\build\cli.bundled.js:325137:17 at HDWalletProvider.send (C:\Users\g\AppData\Roaming\npm\node_modules\truffle\build\cli.bundled.js:325175:22) at Object.send (C:\Users\g\AppData\Roaming\npm\node_modules\truffle\build\cli.bundled.js:176170:31) at RequestManager.send (C:\Users\g\AppData\Roaming\npm\node_modules\truffle\build\cli.bundled.js:329502:32) at Eth.get [as blockNumber] (C:\Users\g\AppData\Roaming\npm\node_modules\truffle\build\cli.bundled.js:41602:62) at module.exports (C:\Users\g\Documents\bootstrap-3.3.7\bootstrap-3.3.7\docs\examples\carousel\my-ico\migrations\2_deploy_contracts.js:3:48) at C:\Users\g\AppData\Roaming\npm\node_modules\truffle\build\cli.bundled.js:176043:7 at C:\Users\g\AppData\Roaming\npm\node_modules\truffle\build\cli.bundled.js:203731:7 at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:511:3)
Here is my 2_deploy_contracts:
const MyCoinCrowdsale = artifacts.require("MyCoinCrowdsale") module.exports = function(deployer, network, accounts) {
web3.eth.getBlock(web3.eth.blockNumber, (e, block) => { if(!e) { const startTime = block.timestamp + 1 //one second in the future const endTime = startTime + (86400 * 20) // 20 days const rate = new web3.BigNumber(1000) const wallet = accounts[0] deployer.deploy(MyCoinCrowdsale, startTime, endTime, rate, wallet) } }) };