Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: ambire wallet batch transaction skipping swap gas estimation #777

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

0xdex18
Copy link

@0xdex18 0xdex18 commented Apr 29, 2022

This PR implements batching for ERC20 approvals with Ambire, which is a smart wallet that allows for transaction batching, smart recovery, gas abstractions and others. Rather than having to sign & send the ERC20 approval transaction separately, with this PR, it will be batched together with the specific action when the wallet used is Ambire.

The UX impact is immense, as the approval step is essentially permanently eliminated, without compromising security (the same calls are being done, just in one tx).

While this PR implements some logic custom to Ambire, this logic can be easily modified into an implementation of the batching EIP that’s currently being worked on by Gnosis Safe and Ambire, turning the code into a general implementation of txn batching.

This implementation uses altered SwapCall structure to skip the swap gas estimation, therefore no error is thrown. It can also be future proof, for smart wallets that calculate the gas independently from the dapp.

This PR is similar to the custom logic for Argent with wc_multiCall

Ambire Wallet transaction batching implementation skipping the swag gas estimation
@vercel
Copy link

vercel bot commented Apr 29, 2022

@0xdex18 is attempting to deploy a commit to the Sushi Team on Vercel.

A member of the Team first needs to authorize it.

@Ivshti
Copy link

Ivshti commented Jul 18, 2022

@matthewlilley any chance we can get this merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants