safe-global / safe-core-sdk

The Safe{Core} SDK allows builders to add account abstraction functionality into their apps.
https://docs.safe.global/sdk/overview
MIT License
243 stars 179 forks source link

[4337] Add update paymaster options function #733

Closed dasanra closed 3 months ago

dasanra commented 3 months ago

Context / issue

Currently is only possible to set paymaster configuration when initializing the 4337Pack. It would be nice if possible to update the paymaster configuration without sending all parameters again creating a new instance.

Proposed solution

Create a setPaymaster function that allows changin the paymaster configuration without reloading the whole pack.

DaniSomoza commented 3 months ago

After reviewing the implementation effort required to regenerate the initCode outside if the init() function and considering that the use case would be somewhat anecdotal, we will not implement this ticket.

Developers can have the same functionality by simply calling the init() function again with the new paymaster options.