0

I would love it if there was a way for me to pay the gas costs for a signed transaction I receive and then relay to a node. So I am the submitting the transaction, but its data contains a signed raw transaction (ethereumjs-tx) of a different user.

simonDos
  • 366
  • 1
  • 2
  • 9
  • looking at https://ethereum.stackexchange.com/questions/1452/who-pays-gas-when-a-contract-function-that-creates-calls-another-contract-is-cal?rq=1, I suspect that tx.origin will be the one paying the gas :( – simonDos May 28 '17 at 09:28
  • Why would you want to pay for another one's transaction anyway? But if you really want to do this, you can just send gasLimit * gasPrice to tx.origin. – jeff May 28 '17 at 10:17
  • if i do this in the smart contract though, the tx.origin address would need some ether to call the fct in the first place, right? I was hoping to work around any distribution scheme – simonDos May 28 '17 at 10:58
  • Exactly. This issue is already being discussed here: https://ethereum.stackexchange.com/questions/144/can-contracts-pay-the-gas-instead-of-the-message-sender – jeff May 28 '17 at 11:40

0 Answers0