etherspot / skandha

A modular typescript implementation of ERC4337 (Account Abstraction) bundler client.
https://etherspot.io
MIT License
561 stars 52 forks source link

[BUG] Cannot Access Associated Slot of Sender In Validation #65

Closed doublespending closed 1 year ago

doublespending commented 1 year ago

Describe the bug

Return Error when userOp uses ERC-20 as gas token in Paymaster. When I used alchemy or stackup bundler, the case can pass.

Paymaster: 0x07865c6e87b9f70255377e024ace6630c1eaa37f GasToken: 0x49040d242126f709b32623704e78bbe0991e6992

I suppose that it is not enough to just find onekeccak candidate: https://github.com/etherspot/skandha/blob/master/packages/executor/src/services/UserOpValidation.ts#L241

Ref other bundler implementations:

Error: 0x49040d242126f709b32623704e78bbe0991e6992 is the gas token address not a paymaster.

'{"jsonrpc":"2.0","id":44,"error":{"message":"unstaked paymaster entity 0x49040d242126f709b32623704e78bbe0991e6992 accessed slot","data":{"paymaster":"0x49040d242126f709b32623704e78bbe0991e6992"},"code":-32502}}'

Expected behavior

Success

Steps to reproduce

No response

Additional context

No response

Operating system

macOS

Skandha version or commit hash

b6e9c68

ch4r10t33r commented 1 year ago

Thanks for reporting this issue @doublespending . We are presently trying to reproduce this locally. We shall keep you posted.