您的位置:首页 > 其它

【区块链】TestRPC Runtime Error: out of gas

2017-09-23 13:14 477 查看

TestRPC Runtime Error: out of gas

转载自:here

一、 问题描述

Transaction: 0x089d31b5316e7076268ea09dd86000dfa4316d72d98318440eb5684b619497f9
Gas usage: 0x015f90
Block Number: 0x0b
Block Time: Sat Sep 23 2017 13:08:40 GMT+0800 (CST)
Runtime Error: out of gas


二、TestRPC新特性

参考:here

三、解决方法

修改JavaScript文件

web3.eth.sendTransaction({..., gas: 3141592})//选择合适的Gas限制


例如:我修改了app.js文件,调用合约的代码

var meta;
UserManagement.deployed().then(function(instance) {
meta = instance;
meta.userRgister.sendTransaction(phone, {from: account, gas: 3141592});
}).catch(function(e){
console.log(e);
});
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  区块链 testrpc