diff --git a/contracts/core/interfaces/IFeedRule.sol b/contracts/core/interfaces/IFeedRule.sol index 1b082c0f..a8dc219c 100644 --- a/contracts/core/interfaces/IFeedRule.sol +++ b/contracts/core/interfaces/IFeedRule.sol @@ -24,7 +24,7 @@ interface IFeedRule { KeyValue[] calldata ruleParams ) external; - function processRemovePost( + function processDeletePost( bytes32 configSalt, uint256 postId, KeyValue[] calldata primitiveParams, diff --git a/contracts/core/primitives/feed/Feed.sol b/contracts/core/primitives/feed/Feed.sol index 5827f8b9..cf2bc520 100644 --- a/contracts/core/primitives/feed/Feed.sol +++ b/contracts/core/primitives/feed/Feed.sol @@ -194,7 +194,7 @@ contract Feed is address author = Core.$storage().posts[postId].author; require(msg.sender == author || _hasAccess(msg.sender, PID__REMOVE_POST), Errors.InvalidMsgSender()); Core._removePost(postId); - _processPostRemoval(postId, customParams, feedRulesParams); + _processPostDeletion(postId, customParams, feedRulesParams); address source = _processSourceStamp(postId, customParams); emit Lens_Feed_PostDeleted(postId, author, customParams, source); } diff --git a/contracts/core/primitives/feed/RuleBasedFeed.sol b/contracts/core/primitives/feed/RuleBasedFeed.sol index 7b11cddd..06f0c3bb 100644 --- a/contracts/core/primitives/feed/RuleBasedFeed.sol +++ b/contracts/core/primitives/feed/RuleBasedFeed.sol @@ -64,7 +64,7 @@ abstract contract RuleBasedFeed is IFeed, RuleBasedPrimitive { bytes4[] memory selectors = new bytes4[](4); selectors[0] = IFeedRule.processCreatePost.selector; selectors[1] = IFeedRule.processEditPost.selector; - selectors[2] = IFeedRule.processRemovePost.selector; + selectors[2] = IFeedRule.processDeletePost.selector; selectors[3] = IFeedRule.processPostRuleChanges.selector; return selectors; } @@ -417,12 +417,12 @@ abstract contract RuleBasedFeed is IFeed, RuleBasedPrimitive { require(_rulesStorage.anyOfRules[processParams.ruleSelector].length == 0, Errors.AllAnyOfRulesReverted()); } - function _processPostRemoval( + function _processPostDeletion( uint256 postId, KeyValue[] calldata customParams, RuleProcessingParams[] calldata rulesProcessingParams ) internal { - bytes4 ruleSelector = IFeedRule.processRemovePost.selector; + bytes4 ruleSelector = IFeedRule.processDeletePost.selector; Rule memory rule; KeyValue[] memory ruleParams; // Check required rules (AND-combined rules) @@ -430,7 +430,7 @@ abstract contract RuleBasedFeed is IFeed, RuleBasedPrimitive { rule = $feedRulesStorage().requiredRules[ruleSelector][i]; ruleParams = _getRuleParamsOrEmptyArray(rule, rulesProcessingParams); (bool callSucceeded,) = rule.ruleAddress.safecall( - abi.encodeCall(IFeedRule.processRemovePost, (rule.configSalt, postId, customParams, ruleParams)) + abi.encodeCall(IFeedRule.processDeletePost, (rule.configSalt, postId, customParams, ruleParams)) ); require(callSucceeded, Errors.RequiredRuleReverted()); } @@ -439,7 +439,7 @@ abstract contract RuleBasedFeed is IFeed, RuleBasedPrimitive { rule = $feedRulesStorage().anyOfRules[ruleSelector][i]; ruleParams = _getRuleParamsOrEmptyArray(rule, rulesProcessingParams); (bool callSucceeded,) = rule.ruleAddress.safecall( - abi.encodeCall(IFeedRule.processRemovePost, (rule.configSalt, postId, customParams, ruleParams)) + abi.encodeCall(IFeedRule.processDeletePost, (rule.configSalt, postId, customParams, ruleParams)) ); if (callSucceeded) { return; // If any of the OR-combined rules passed, it means they succeed and we can return diff --git a/contracts/rules/base/AccountBlockingRule.sol b/contracts/rules/base/AccountBlockingRule.sol index 7c3a3280..530b8a17 100644 --- a/contracts/rules/base/AccountBlockingRule.sol +++ b/contracts/rules/base/AccountBlockingRule.sol @@ -97,7 +97,7 @@ contract AccountBlockingRule is IFeedRule, IGraphRule, MetadataBased { revert Errors.NotImplemented(); } - function processRemovePost( + function processDeletePost( bytes32, /* configSalt */ uint256, /* postId */ KeyValue[] calldata, /* primitiveCustomParams */ diff --git a/contracts/rules/feed/GroupGatedFeedRule.sol b/contracts/rules/feed/GroupGatedFeedRule.sol index 133842f7..fd15a001 100644 --- a/contracts/rules/feed/GroupGatedFeedRule.sol +++ b/contracts/rules/feed/GroupGatedFeedRule.sol @@ -56,7 +56,7 @@ contract GroupGatedFeedRule is IFeedRule, MetadataBased { revert Errors.NotImplemented(); } - function processRemovePost( + function processDeletePost( bytes32, /* configSalt */ uint256, /* postId */ KeyValue[] calldata, /* primitiveParams */ diff --git a/contracts/rules/feed/RestrictedSignersFeedRule.sol b/contracts/rules/feed/RestrictedSignersFeedRule.sol index 4bee003a..8d34faea 100644 --- a/contracts/rules/feed/RestrictedSignersFeedRule.sol +++ b/contracts/rules/feed/RestrictedSignersFeedRule.sol @@ -49,7 +49,7 @@ contract RestrictedSignersFeedRule is RestrictedSignersRule, IFeedRule { }); } - function processRemovePost( + function processDeletePost( bytes32 configSalt, uint256 postId, KeyValue[] calldata primitiveParams, @@ -57,7 +57,7 @@ contract RestrictedSignersFeedRule is RestrictedSignersRule, IFeedRule { ) external override { _validateRestrictedSignerMessage({ configSalt: configSalt, - functionSelector: IFeedRule.processRemovePost.selector, + functionSelector: IFeedRule.processDeletePost.selector, abiEncodedFunctionParams: abi.encode(postId, EIP712EncodingLib.encodeForEIP712(primitiveParams)), signature: abi.decode(ruleParams[0].value, (EIP712Signature)) }); diff --git a/contracts/rules/feed/SimplePaymentFeedRule.sol b/contracts/rules/feed/SimplePaymentFeedRule.sol index 029b9d9a..43eb925e 100644 --- a/contracts/rules/feed/SimplePaymentFeedRule.sol +++ b/contracts/rules/feed/SimplePaymentFeedRule.sol @@ -64,7 +64,7 @@ contract SimplePaymentFeedRule is SimplePaymentRule, IFeedRule { revert Errors.NotImplemented(); } - function processRemovePost( + function processDeletePost( bytes32, /* configSalt */ uint256, /* postId */ KeyValue[] calldata, /* primitiveParams */ diff --git a/contracts/rules/feed/TokenGatedFeedRule.sol b/contracts/rules/feed/TokenGatedFeedRule.sol index 3c1cdb32..e67543a8 100644 --- a/contracts/rules/feed/TokenGatedFeedRule.sol +++ b/contracts/rules/feed/TokenGatedFeedRule.sol @@ -63,7 +63,7 @@ contract TokenGatedFeedRule is TokenGatedRule, IFeedRule { revert Errors.NotImplemented(); } - function processRemovePost( + function processDeletePost( bytes32, /* configSalt */ uint256, /* postId */ KeyValue[] calldata, /* primitiveParams */