首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >错误:合同代码无法存储,请在部署时检查您的气量。

错误:合同代码无法存储,请在部署时检查您的气量。
EN

Ethereum用户
提问于 2018-02-23 09:33:15
回答 1查看 332关注 0票数 0

我知道这个问题已经讨论过好几次了,但我无法解决我的问题。

我正试着和特弗莱公司签订一份关于加纳奇的合同。

2_deploy_contracts.js的部署过程中,我部署了一些契约和库,这些契约和库都是部署的。

然后,当我试图在构造函数中部署具有库和契约地址的契约时,我得到了以下错误堆栈:

代码语言:javascript
复制
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引起的。

有人知道问题出在哪里吗?我试着多加些汽油,但没有用。

提前感谢!

EN

回答 1

Ethereum用户

发布于 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));

票数 0
EN
页面原文内容由Ethereum提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://ethereum.stackexchange.com/questions/40654

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档