eth/pol: Gasless redemptions using account abstraction #3175
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview:
Changes in
dex/networks/eth
:IAccount
interface.validateUserOp
: Validates user operations and prepays gas for redemption.redeemAA
: Executes the redemption.Changes in
client/asset/eth
:ReserveNRedemptions
updated to return 0 without error if there is insufficient funds for redemption, but a bundler is configured.GaslessRedeem
function for bundler-based redemptions whenReserveNRedemptions
returns 0.txDB
to order transactions by timestampinstead of nonce, now using lexi instead of raw badgerDB.
Changes in
client/core
:GaslessRedeem
instead ofRedeem
ifReserveNRedemptions
returns 0.Redeem
, immediately sends a redeem message to the server.GaslessRedeem
, waits forConfirmRedemption
to ensure submission before messaging the server with the updated coin ID (now includes both user op ID and tx hash).Changes in
server/asset/eth
:Changes in
server/market
:I have tested using Alchemy on testnet, and it works well. I have also tested with Pimlico, but there are some issues. I'm in contact with their support to resolve them. I will keep testing other bundler providers.