The ModuleKit has some helpers to automatically test for ERC-7579 compliance. Currently, we have the following checks:
When you write your tests, ensure that you call uninstall on the module at the end of each test.
withModuleStorageClearValidation
modifierTo do this, add the modifier to all the tests.
COMPLIANCE=true
flagTo run the tests with the compliance flag, run:
Note: running the compliance tests at the same time as the simulation tests can lead to issues so it is discouraged.
If your tests are successful, you are compliant with the ERC-7579 rules. Otherwise, your tests will revert.