Skip to content

Conversation

@doublespending
Copy link
Contributor

No description provided.

src/MSABasic.sol Outdated
onlyEntryPointOrSelf
{

if (!IModule(module).isModuleType(moduleTypeId)) revert MismatchModuleTypeId(moduleTypeId);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we should check if module passed supports interfaceId for IModule?
@kopy-kat

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isModuleType should be sufficient right?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes it is sufficient. we should write more tests though

Copy link
Contributor

@kopy-kat kopy-kat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tysm @doublespending! left a couple of comments but this looks good

src/MSABasic.sol Outdated
onlyEntryPointOrSelf
{

if (!IModule(module).isModuleType(moduleTypeId)) revert MismatchModuleTypeId(moduleTypeId);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isModuleType should be sufficient right?

{
(address hook, bytes memory hookData) = _preCheck();

if (!IModule(module).isModuleType(moduleTypeId)) revert MismatchModuleTypeId(moduleTypeId);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

imo this is not needed since this check is already done on installation right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we can remove it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

which methods are these?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wdym? my point is that we already check moduletype onInstallation, but I dont think theres a need to check on uninstallation since it doesnt rly matter anyways (bc the module wont be used anymore)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be good imo, on uninstall if module address is wrong or if it doesn't match typeid it would revert with sentinel list or in module itself. will share if anything post writing more tests

src/MSABasic.sol Outdated
onlyEntryPointOrSelf
{

if (!IModule(module).isModuleType(moduleTypeId)) revert MismatchModuleTypeId(moduleTypeId);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we can remove it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

which methods are these?

@kopy-kat
Copy link
Contributor

kopy-kat commented May 2, 2024

lmk what you think of the comments and we can merge if it looks good

@kopy-kat
Copy link
Contributor

kopy-kat commented May 2, 2024

LGTM thanks ser

@kopy-kat kopy-kat merged commit 13c374a into erc7579:main May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants