Contract-Development

Truffle sendTransaction 向合約地址發送 eth 返回 revert

  • January 22, 2018

我有一個合約地址,而不是我想向其中發送 ETH 的已部署合約實例,但它未能提供Error: VM Exception while processing transaction: revert

MyContract.deployed()
 .then(async instance => {
...
var send = await web3.eth.sendTransaction({
   from: account[0],
   to: contract_addr, 
   value: weiSpend
 });
});

測試RPC

Transaction: 0xfe824090f7cc99d85041d4ad7dde7bf91f36587871546faf97ca33641ad08e73
 Gas usage: 21046
 Block Number: 27
 Block Time: Mon Jan 22 2018 11:49:03 GMT-0600 (CST)
 Runtime Error: revert

備份應付功能缺失

function() payable{
}

引用自:https://ethereum.stackexchange.com/questions/37129