[Ethereum] Contract transaction ran out of gas, but the gas limit is much higher than the required amount

contract-invocationout-of-gastransactions

We have a smart contract which sends ETH to some address', but everytime we call that function, the function fails..

https://etherscan.io/tx/0xe430a3f57c01f4a1ea26dc94d4d16f0748d8d7a03e05187830c5bdf15826bdce

As you can see in the link we do however specify a much higher GAS limit that needed, but still it runs out of gas…

What is going wrong?

Best Answer

It seems to be a problem with one of the addresses you are forwarding ether.

If you look at the internal transactions you will see the following:

enter image description here

call_49 is failing due to "out of gas". If you inspect the target address, you will see it is a contract.

Inspecting the code the contract has, it has a fallback function that has the following code:

function() payable {
    if (!parentAddress.call.value(msg.value)(msg.data))
      throw;
    // Fire off the deposited event if we can forward it  
    ForwarderDeposited(msg.sender, msg.value, msg.data);
  }

This suggests the problem is that the contract is receiving ether and trying to send it back its parent address and this call is either throwing or actually running out of gas, making the whole transaction fail.