当我尝试从合同余额中发送eth以在“注入的web3”中使用帐户时,显示错误,但是javascript vm做得很好,为什么?
mbstring
ALERT:与有效载荷[ethjs-RPC] RPC错误{ “ID”:833979018102, “jsonrpc”: “2.0”, “PARAMS”:[ “0xf86905843b9aca0082746d94c9614e67d02c00d487cb2b3781262b0652f838638084a9d76588822d46a0f102044db47b2df3646ccbf9a36b67b04a27fca6123788bdc99faf9c0792e7a4a00f06491913073755576f07e8256b4ed29b17f013f560599971a59b3e4e5055b8”], “方法”: “eth_sendRawTransaction”}错误:VM处理交易时发生异常:没钱
答案 0 :(得分:0)
我喜欢这样:
App.contracts.MyToken.deployed().then(function(instance) {
adoptionInstance = instance;
return adoptionInstance.transETH();
}).then(function(result) {
console.log(result);
}).catch(function(err) {
console.log(err.message);
});
做得好;