我知道这个问题已经讨论过好几次了,但我无法解决我的问题。
我正试着和特弗莱公司签订一份关于加纳奇的合同。
在2_deploy_contracts.js的部署过程中,我部署了一些契约和库,这些契约和库都是部署的。
然后,当我试图在构造函数中部署具有库和契约地址的契约时,我得到了以下错误堆栈:
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)以下是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));
这个问题是由错误B引起的。
有人知道问题出在哪里吗?我试着多加些汽油,但没有用。
提前感谢!
发布于 2018-02-23 12:48:47
以下是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));
https://ethereum.stackexchange.com/questions/40654
复制相似问题