Skip to content

Commit

Permalink
feat: New features LP26 - private mode, remove follower, block/unblock
Browse files Browse the repository at this point in the history
  • Loading branch information
Heisenburgirs committed Oct 2, 2024
1 parent 1eadb24 commit 4d5928a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions packages/lsp26-contracts/contracts/ILSP26FollowerSystem.sol
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ interface ILSP26FollowerSystem {
/// @notice Emitted when a follower is removed.
/// @param followee The address that removed the follower.
/// @param follower The address that was removed.
event RemoveFollower(address indexed followee, address indexed follower);
event RemovedFollower(address indexed followee, address indexed follower);

/// @notice Emitted when an address is blocked.
/// @param initiator The address that blocked the other address.
Expand Down Expand Up @@ -89,12 +89,12 @@ interface ILSP26FollowerSystem {
/// @notice Removes specific follower from follower's list.
/// @param follower The address to be removed.
/// @custom:events {RemoveFollower} event when removing a follower.
function remove(address follower) external;
function removeFollower(address follower) external;

/// @notice Removes an array of followers from follower's list.
/// @param followers The addresses to be removed.
/// @custom:events {RemoveFollower} event when removing a follower in the list.
function removeBatch(address[] memory followers) external;
function removeFollowerBatch(address[] memory followers) external;

/// @notice Block a specific address. If the address is a follower, remove first, then block.
/// @param addr The address to block.
Expand Down
6 changes: 3 additions & 3 deletions packages/lsp26-contracts/contracts/LSP26FollowerSystem.sol
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,12 @@ contract LSP26FollowerSystem is ILSP26FollowerSystem {
}

// @inheritdoc ILSP26FollowerSystem
function remove(address follower) external {
function removeFollower(address follower) external {
_removeFollower(follower);
}

// @inheritdoc ILSP26FollowerSystem
function removeBatch(address[] memory followers) external {
function removeFollowerBatch(address[] memory followers) external {
for (uint256 i = 0; i < followers.length; i++) {
_removeFollower(followers[i]);
}
Expand Down Expand Up @@ -360,7 +360,7 @@ contract LSP26FollowerSystem is ILSP26FollowerSystem {

_followingsOf[follower].remove(msg.sender);

emit RemoveFollower(msg.sender, follower);
emit RemovedFollower(msg.sender, follower);
}

function _unfollow(address addr) internal {
Expand Down

0 comments on commit 4d5928a

Please sign in to comment.