3

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"});

1 Answer 1

2

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

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.