When calling an external contract function from within a contract, does the gas come from the originating transaction? If so, is there a way to use gas from the contract's balance?

example call:

someReturnValue = someContract.somePayableFunction.value(10).gas(10000)({someParam: "some value"});

In the current implementation sender always pays for gas. It's not possible to draw gas from another source such as a contract balance. There is discussion of allowing a contract to pay for gas but it's at the EIP discussion stage. I found a more details answer that might help over here: Can contracts pay the gas instead of the message sender?

Hope it helps.

Your Answer

