rhinestonewtf / modulekit

Development Kit for building Smart Account Modules
https://docs.rhinestone.wtf/modulekit/
45 stars 26 forks source link

Store installed modules for account using events and enable querying #116

Open kopy-kat opened 1 month ago

kopy-kat commented 1 month ago

Problem

ERC-7579 does not specify a way to get all installed modules from an account. Instead, it specifies that accounts need to emit events for installing and uninstalling modules. However, it might be useful for a module developer to be able to get all installed modules from the account.

Solution

Listen to events emitted and store installed modules with their type on the RhinestoneModuleKit or separate contract. Also expose a function to enable querying of these installed modules.