Elytro-eth / soul-wallet-contract

core contract of eip 4337 implementation
275 stars 87 forks source link

wallet initialization #85

Closed lienhage closed 1 year ago

lienhage commented 1 year ago

The soul_wallet enables plugins and modules when initializing, this may access account associate storage as they will call walletInit. But as ERC4337 specified: If the UserOp creates a new account (that is initCode is non-empty), then the entity cannot use storage associated with the sender. So I guess if plugins or modules are added during initialization, the bundler will fail this UserOp, do you have any test on this?

lienhage commented 1 year ago

@jayden-sudo

jayden-sudo commented 1 year ago

Yes, it will fail. Entities in initialization need to stake(and we haven't added it yet,we're working on a way to implement the change for consistent multi-chain addresses).

and, your PR is welcome, thank you very much!

lienhage commented 1 year ago

Yes, it will fail. Entities in initialization need to stake(and we haven't added it yet,we're working on a way to implement the change for consistent multi-chain addresses).

and, your PR is welcome, thank you very much!

Do you have idea about the rationale of this restriction? Actually I haven't come up with a good work around to this issue yet, adding stake during initialization doesn't seem to work