web3j icon indicating copy to clipboard operation
web3j copied to clipboard

EIP-4337, Account Abstraction support

Open gtebrean opened this issue 7 months ago • 2 comments

What does this PR do?

required

Where should the reviewer start?

required

Why is it needed?

required

Checklist

  • [ ] I've read the contribution guidelines.
  • [ ] I've added tests (if applicable).
  • [ ] I've added a changelog entry if necessary.

gtebrean avatar May 29 '25 20:05 gtebrean

it's in testing for receipt support

gtebrean avatar May 30 '25 07:05 gtebrean

Do we need to add it in https://github.com/LFDT-web3j/web3j/blob/main/crypto/src/main/java/org/web3j/crypto/transaction/type/TransactionType.java (TransactionType ) also?

And have encoding/decoding like in https://github.com/LFDT-web3j/web3j/blob/main/crypto/src/main/java/org/web3j/crypto/TransactionDecoder.java

NickSneo avatar Jun 11 '25 10:06 NickSneo

@gtebrean LGTM, lets merge it as an experiment feature

NickSneo avatar Jun 23 '25 13:06 NickSneo

I think EIP4337Transaction should be renamed to UserOperation or UserOperationStruct as this is not an actual transaction sent to the pool, but a user operation sent to a bundler. This is a term used across other account abstraction infra: https://www.alchemy.com/docs/wallets/infra/send-user-operations

The existing UserOperation can be either folded into the same class or renamed to UserOperationResult or something.

Additionally, the same class can then be used for EIP-7702 type of account abstraction, which makes specifying 4337 in its name unnecessary: https://www.alchemy.com/docs/wallets/smart-contracts/modular-account-v2/using-7702

Syn-McJ avatar Jul 03 '25 03:07 Syn-McJ