Skip to content

Commit

Permalink
fix(daoRegistry): extension removal (#525)
Browse files Browse the repository at this point in the history
If an extension is removed from the registry, it does not need to delete it from the inverseExtensions mapping. Otherwise the register won't know that the extension was already added once. The idea is that extensions can't be re-added.
  • Loading branch information
fforbeck authored Mar 17, 2022
1 parent 7dd3471 commit cf45c6f
Show file tree
Hide file tree
Showing 4 changed files with 624 additions and 141 deletions.
5 changes: 2 additions & 3 deletions contracts/core/DaoRegistry.sol
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ contract DaoRegistry is MemberGuard, AdapterGuard {
require(extensionId != bytes32(0), "extension id must not be empty");
require(
extensions[extensionId] == address(0x0),
"extension Id already in use"
"extensionId already in use"
);
require(
!inverseExtensions[address(extension)].deleted,
Expand All @@ -441,7 +441,6 @@ contract DaoRegistry is MemberGuard, AdapterGuard {
ExtensionEntry storage extEntry = inverseExtensions[extensionAddress];
extEntry.deleted = true;
//slither-disable-next-line mapping-deletion
delete inverseExtensions[extensionAddress];
delete extensions[extensionId];
emit ExtensionRemoved(extensionId);
}
Expand Down Expand Up @@ -564,7 +563,7 @@ contract DaoRegistry is MemberGuard, AdapterGuard {

require(
proposal.adapterAddress == msg.sender,
"only the adapter that submitted the proposal can process it"
"only the adapter that submitted the proposal can sponsor it"
);

require(
Expand Down
File renamed without changes.
Loading

0 comments on commit cf45c6f

Please sign in to comment.