I know this issue was discussed before several times, but I cant get the solution to my problem.
I'm trying to deploy a contract with Truffle on Ganache.
During the deployment in 2_deploy_contracts.js
I deploy some contracts and libraries which ones are deployed.
Then when I try to deploy the contract that has the libraries and the address of the contracts in the constructor I got the following Error stack :
at Object.callback
(/usr/local/lib/node_modules/truffle/build/webpack:/~/web3/lib/web3/contract.js:147:1)
at /usr/local/lib/node_modules/truffle/build/webpack:/~/web3/lib/web3/method.js:142:1
at /usr/local/lib/node_modules/truffle/build/webpack:/~/web3/lib/web3/requestmanager.js:89:1
at /usr/local/lib/node_modules/truffle/build/webpack:/~/truffle-migrate/index.js:225:1
at /usr/local/lib/node_modules/truffle/build/webpack:/~/truffle-provider/wrapper.js:134:1
at XMLHttpRequest.request.onreadystatechange (/usr/local/lib/node_modules/truffle/build/webpack:/~/web3/lib/web3/httpprovider.js:128:1)
at XMLHttpRequestEventTarget.dispatchEvent (/usr/local/lib/node_modules/truffle/build/webpack:/~/xhr2/lib/xhr2.js:64:1)
at XMLHttpRequest._setReadyState (/usr/local/lib/node_modules/truffle/build/webpack:/~/xhr2/lib/xhr2.js:354:1)
at XMLHttpRequest._onHttpResponseEnd (/usr/local/lib/node_modules/truffle/build/webpack:/~/xhr2/lib/xhr2.js:509:1)
at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/truffle/build/webpack:/~/xhr2/lib/xhr2.js:469:1)
Here is 2_deploy_contracts.js :
deployer.deploy(A).then(function () {
console.log("A deployed");
deployer.deploy(B, A.address, accounts[0],accounts[1]).then(function() {
console.log("B deployed");
}).catch(err=>console.log("error B",err));
}).catch(err=>console.log("error A",e));
The problem occured on error B.
Anyone knows what can be the problem? I tried to add more gas but it didn't work.
Thanks in advance!