Skip to content

Commit

Permalink
Adding the DAO parameter to more events
Browse files Browse the repository at this point in the history
  • Loading branch information
brickpop committed May 8, 2024
1 parent e1a3010 commit 96b0132
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
8 changes: 4 additions & 4 deletions packages/contracts/src/governance/MainVotingPlugin.sol
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ contract MainVotingPlugin is Addresslist, MajorityVotingBase, IEditors, IMembers
_editors[0] = _account;

_addAddresses(_editors);
emit EditorAdded(_account);
emit EditorAdded(address(dao()), _account);
}

/// @notice Removes existing editors from the address list.
Expand All @@ -120,7 +120,7 @@ contract MainVotingPlugin is Addresslist, MajorityVotingBase, IEditors, IMembers
_editors[0] = _account;

_removeAddresses(_editors);
emit EditorRemoved(_account);
emit EditorRemoved(address(dao()), _account);
}

/// @notice Defines the given address as a new space member that can create proposals.
Expand All @@ -129,7 +129,7 @@ contract MainVotingPlugin is Addresslist, MajorityVotingBase, IEditors, IMembers
if (members[_account]) return;

members[_account] = true;
emit MemberAdded(_account);
emit MemberAdded(address(dao()), _account);
}

/// @notice Removes the given address as a proposal creator.
Expand All @@ -138,7 +138,7 @@ contract MainVotingPlugin is Addresslist, MajorityVotingBase, IEditors, IMembers
if (!members[_account]) return;

members[_account] = false;
emit MemberRemoved(_account);
emit MemberRemoved(address(dao()), _account);
}

/// @notice Returns whether the given address is currently listed as an editor
Expand Down
6 changes: 4 additions & 2 deletions packages/contracts/src/governance/base/IEditors.sol
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@ interface IEditors {
event EditorsAdded(address[] editors);

/// @notice Emitted when an editor is added to the DAO plugin.
/// @param dao The address of the DAO whose plugin has added an editor.
/// @param editor The address of the new editor.
event EditorAdded(address editor);
event EditorAdded(address dao, address editor);

/// @notice Emitted when an editor is removed from the DAO plugin.
/// @param dao The address of the DAO whose plugin has removed an editor.
/// @param editor The address of the editor being removed.
event EditorRemoved(address editor);
event EditorRemoved(address dao, address editor);

/// @notice Checks if an account is an editor on the DAO.
/// @param _account The address of the account to be checked.
Expand Down
6 changes: 4 additions & 2 deletions packages/contracts/src/governance/base/IMembers.sol
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ pragma solidity ^0.8.8;
/// @notice An interface to be implemented by DAO plugins that define membership.
interface IMembers {
/// @notice Emitted when a member is added to the DAO plugin.
/// @param dao The address of the DAO whose plugin has added a member.
/// @param member The address of the new member being added.
event MemberAdded(address member);
event MemberAdded(address dao, address member);

/// @notice Emitted when member is removed from the DAO plugin.
/// @param dao The address of the DAO whose plugin has removed a member.
/// @param member The address of the existing member being removed.
event MemberRemoved(address member);
event MemberRemoved(address dao, address member);

/// @notice Checks if an account is a member.
/// @param _account The address of the account to be checked.
Expand Down

0 comments on commit 96b0132

Please sign in to comment.