Pay for gas of another account

I have ETH account A that wants to send (let’s say 1 ETH) to ETH account B.
I want to use ETH account C to pay for the gas (so that A doesn’t pay any gas and any refund comes back to C)

For the sake of the example, let’s assume I have the private keys for A & C and am able to sign everything in one code block.

I think that eth_createAccessList is the way to do this, but I’m unable to find an actual example of this.

Maybe that’s not the correct function, or way to do this. If I’m wrong, please help me understand.

I also don’t fully understand the “data” in regular transactions. Maybe this is the place? Like A creates and signs a request to send 1 ETH to B with 0 gas, and then C adds a value=0 transaction paying the gas of the signed transaction in “data”? If this is the way, then is “data” just a signed transaction? Or is it built some different way?

I’ve seen terminology of meta transactions, paymasters, ERC-4337, gas stations, and the like… But no clear explanation (and hopefully an actual example, possibly in python or some actual language that would build the transaction).

I found this article but I don’t really understand the inputA, inputB, inputC and where I put the gas and build the transaction.

I understand that adding complexity to a simple transfer will increase the gas price, but I want to make sure that A is able to send without paying for gas (regardless of the cost to C).

Any help/knowledge would be greatly appreciated.

1 Like

Hi @jamesters, welcome!

it seems like our ITX would have served you but unfortunately Infura removed that service a little while ago. There are alternatives though, and I would start looking there.

I’m sorry I can’t be more explicit but I hope that you or someone else can add to this thread.

Warm regards,
Chris | ConsenSys

1 Like

This topic was automatically closed after 30 days. New replies are no longer allowed.