Meta transaction (a.k.a. Gasless transactions) using ethers.js
See original GitHub issueIs there a way to implement a meta transaction using ethers.js
library.
Consider a transaction to transfer 100 tokens from 0xAccountA
to 0xAccountB
. The transaction will be signed by 0xAccountA
but the gas would be payed by some other 0xAccountC
.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:11 (5 by maintainers)
Top Results From Across the Web
How to create gasless-transactions/meta ...
Lets initiate a contract: const abi = ['function transferFrom(address sender, address recipient, uint256 amount)']; const payer = new ethers.
Read more >How to create gasless-transactions/meta- ...
Consider a transaction to transfer 100 ERC20-tokens using a ERC20-contract from 0xAccountA to 0xAccountB . The transaction will be signed by ...
Read more >How to do Gasless Transactions on Ethereum
If you use Ethereum, you are most likely familiar with gas. However, in this article, we go through how to do gasless transactions...
Read more >How to re-send a transaction with higher gas price using ...
1. Sometimes, you submit a transaction on Ethereum without enough gas due to network congestion or too m... 2. We do a transaction...
Read more >ethers.js - A Complete, Simple and Tiny Ethereum Library in ...
Transaction abstraction (or meta transactions, if you prefer) isn't a new idea in Ethereum. The idea, roughly, is that users sometimes want a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@ricmoo just FYI I am working on extending ethers.js to add an intuitive way for Dapp devs to integrate meta transactions into their dapp with only a couple lines of code.
I am imagining something like this:
Basically allow dapp devs using ethers to set their relayer and
metaType
in a config object and initialize aMetaSigner
(extension ofSigner
) which instead of signing a transaction and POSTing to the Provider’s URL, it will sign a meta transaction (in the above example withsignTypedData_v4
) and send the signed meta transaction hex string to the relayerURL.To pilot this concept I extended ethers.js with my own
meta-ethers
library and used my own simplified meta transaction schema. My experiments have gone very well, so I am now working on forking ethers.js base code to build this functionality into the native ethers.js source code itself. Will post back here when I have anything worthy of review/beta testing.I have not actually used Meta-transactions yet, but all the necessary functions should certainly be available. I will be bugging the metatx cartel during DevCon5 to get caught up on the latest techniques. 😃