1

Error: Web3ProviderEngine does not support synchronous requests. I have an error when deploying contract to rinkeby

 provider const HDWalletProvider = require('truffle-hdwallet-provider')

 module.exports = async(deployer) => {
    await deployer.deploy(WETH);
    await deployer.deploy(BNB, admin, 100000e18);
    await deployer.deploy(OMG, admin, 100000e18);
    await deployer.deploy(BAT, admin, 100000e18);     
 };
  • It is no clear which file do you have problems with, is it the migration or the configuration? It is better if you put both here, which version of truffle are you using? – Ismael Oct 7 '18 at 16:28
  • 1
    thx for response, it was an error in the deploy script, i forgot to add the contract, but the error anyway very strange for this case – Andrei Vaulin Oct 8 '18 at 3:28
0

Try something like this:

module.exports = function(deployer) => {
    deployer.deploy(WETH).then(function() {
        return deployer.deploy(BNB, admin, 100000e18);
    }).then(function() {
        return deployer.deploy(OMG, admin, 100000e18);
    }).then(function() {
        return deployer.deploy(BAT, admin, 100000e18);     
    })
 };
  • thx for response, it didn't help me, but the problem was that i forgot to add the contract reference, but the error anyway very strange for this case – Andrei Vaulin Oct 8 '18 at 3:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.