Skip to content

Call ERC transfer with ETH from another account (i.e. meta-transactions) #1279

Answered by zemse
richwednesday asked this question in Q&A
Discussion options

You must be logged in to vote

ATM, tx fee is debited from the balance of the one who signs a transaction.

but send the transaction to the network with accountC

Sending doesn't require a wallet, just a URL of node (RPC URL). Ethers js has a handy way to to that.

const provider = ethers.providers.JsonRpcProvider('rpc-url-of-the-node');
await provider.sendTransaction('0xSerializedTransaction');

Just wanted to make it clear that there is no role of accountC in the process of sending the transaction to the network.

Possible solutions

You can extend ERC20 contract, by adding a method called transferBySig that takes receiver, amount and signature. Recently there was interest about the same idea in ethereum/EIPs#3055. But t…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by richwednesday
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #1131 on February 05, 2021 01:32.