简体   繁体   English

载气限制出了什么问题?

[英]What's wrong with embark gas limit?

I have a problem using Embark to deploy a contract. 使用Embark部署合同时遇到问题。

I have successfully use it before with smaller contracts. 我已经在较小的合同上成功使用过它。

Here is the problem hint: 这是问题提示:

contract was deployed at 0xc9f10a4696f4102d0ef3ec4ce5eb5426828a1b06 but doesn't seem to be working try adjusting your gas values 合同已部署在0xc9f10a4696f4102d0ef3ec4ce5eb5426828a1b06,但似乎无法正常工作,请尝试调整燃气值

The contract is deployed, but all functions in it can not be called? 合同已部署,但其中的所有功能都无法调用?

How to solve this problem? 如何解决这个问题呢?

Sometimes, when the contract have a problem (with constructor, for instance), the transaction to create it consumes all the available gas (gas limit) and then, you end up with no contract and all gas spent. 有时,当合同出现问题时(例如,对于构造函数而言),创建合同的事务将消耗所有可用的气体(气体限制),然后,最终您将没有合同,并且所有气体都将花费。

Check if the contract has no errors (not only compile-time, but runtime too). 检查合同是否没有错误(不仅是编译时,还包括运行时)。 See if it runs fine on a javascriptVM (try use this guy: https://github.com/ethereum/browser-solidity ). 查看它是否可以在javascriptVM上正常运行(请尝试使用此工具: https : //github.com/ethereum/browser-solidity )。

Try using a parameterless constructor, or even a constructorless contract. 尝试使用无参数构造函数,甚至使用无构造函数合同。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM