Could I use my wallet to pay gas fee for other wallet? #3586
Replies: 4 comments
-
@ricmoo Could you help me? |
Beta Was this translation helpful? Give feedback.
-
Note: I have the private keys of both of these wallets |
Beta Was this translation helpful? Give feedback.
-
No, you can't. But instead, you could do a simple transfer. |
Beta Was this translation helpful? Give feedback.
-
Depends on what kind of tx you wanna do. For ERC20 or ERC721 transfers, if the token contract supports permit function (2612), any address can pay gas for these transfers. You can refer to the article shared by mentasuave01 above. For ETH transfers (or any kind of general tx), there's no way until EIPS like 2938 which allows contract to pay gas after checks pass or 3074 which allows any address to pay for gas. These things are under discussion and it's uncertain if/when they'd make it to core ethereum protocol. However, you may explore using smart wallets, especially EIP-4337 which abstracts tx as a UserOp, which is submitted to an alternate mempool and a bundler includes it in their batch. Tx fees can be paid using ERC20 tokens or even sponsored by someone else or even your custom conditions can be coded into the paymaster smart contract. (I'm moving this thread into discussions) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the Feature
Pay gas fee
Code Example
No response
Beta Was this translation helpful? Give feedback.
All reactions