Issue with deploying a contract using web3js

Viewed 12

Please I'm trying to deploy a contract using web3js but it is throwing with this error data:

  data: {
'0x3b5c29a194ca6c649a23fb81c0740188197269d29e48298c8fe6d3142cf84ebe': { error: 'revert', program_counter: 89, return: '0x' },
stack: 'RuntimeError: VM Exception while processing transaction: revert\n' +
  '    at Function.RuntimeError.fromResults (/Applications/Ganache.app/Contents/Resources/static/node/node_modules/ganache-core/lib/utils/runtimeserror.js:94:13)\n' +
  '    at BlockchainDouble.processBlock (/Applications/Ganache.app/Contents/Resources/static/node/node_modules/ganache-core/lib/blockchain_double.js:627:24)\n' +
  '    at processTicksAndRejections (internal/process/task_queues.js:93:5)',
name: 'RuntimeError'

}

See the code below:

const FR = new eth.Contract(FundRaising.abi, contractAddr, {
    from: addresses[0],
    gas: 5000000,
    gasPrice: '20000000000000'
});

FR.deploy({
    data: ServiceSubscription.bytecode,
    arguments: [Web3Utils.toWei("5")]
})
.send({
    from: addresses[0],
    gas: 1500000,
    gasPrice: '2000000000000'
}, (err, transactionHash) => {
    if(err) console.log("Send Error: ", err)
    else console.log("Trx Hash: ", transactionHash)
})
.then(newContract => {
    console.log("New Contract Address: ", newContract.options.address);
})

Please I need help in understanding the error message. Especially this:

{ error: 'revert', program_counter: 89, return: '0x' }
0 Answers
Related