From d93a72fb2731d4c1d897084f2b7b43cb000e17f0 Mon Sep 17 00:00:00 2001 From: vicnaum Date: Sat, 18 Jan 2025 20:41:18 +0100 Subject: [PATCH] misc: Renames Self() error to ActionOnSelf() to prevent clashing with Rust reserved keyword --- contracts/core/primitives/graph/GraphCore.sol | 2 +- contracts/core/types/Errors.sol | 2 +- contracts/migration/MigrationGraph.sol | 2 +- contracts/rules/base/AccountBlockingRule.sol | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/contracts/core/primitives/graph/GraphCore.sol b/contracts/core/primitives/graph/GraphCore.sol index 3185474..104e165 100644 --- a/contracts/core/primitives/graph/GraphCore.sol +++ b/contracts/core/primitives/graph/GraphCore.sol @@ -33,7 +33,7 @@ library GraphCore { { require(followerAccount != address(0), Errors.InvalidParameter()); require(accountToFollow != address(0), Errors.InvalidParameter()); - require(followerAccount != accountToFollow, Errors.Self()); + require(followerAccount != accountToFollow, Errors.ActionOnSelf()); require($storage().follows[followerAccount][accountToFollow].id == 0, Errors.CannotFollowAgain()); if (followId == 0) { followId = ++$storage().lastFollowIdAssigned[accountToFollow]; diff --git a/contracts/core/types/Errors.sol b/contracts/core/types/Errors.sol index 1c60ac6..08b4fef 100644 --- a/contracts/core/types/Errors.sol +++ b/contracts/core/types/Errors.sol @@ -37,7 +37,7 @@ library Errors { error RequiredRuleReverted(); error RuleNotConfigured(); error SelectorEnabledForDifferentRuleType(); - error Self(); + error ActionOnSelf(); error SingleAnyOfRule(); error UnexpectedContractImpl(); error UnsupportedSelector(); diff --git a/contracts/migration/MigrationGraph.sol b/contracts/migration/MigrationGraph.sol index 0067c3e..acaadd9 100644 --- a/contracts/migration/MigrationGraph.sol +++ b/contracts/migration/MigrationGraph.sol @@ -39,7 +39,7 @@ contract MigrationGraph is Graph { function _followWithoutChecks(address followerAccount, address accountToFollow, uint256 followId, uint256 timestamp) internal { - require(followerAccount != accountToFollow, Errors.Self()); + require(followerAccount != accountToFollow, Errors.ActionOnSelf()); require(followId != 0, Errors.InvalidParameter()); require(followerAccount != address(0), Errors.InvalidParameter()); require(accountToFollow != address(0), Errors.InvalidParameter()); diff --git a/contracts/rules/base/AccountBlockingRule.sol b/contracts/rules/base/AccountBlockingRule.sol index 530b8a1..6a53a1d 100644 --- a/contracts/rules/base/AccountBlockingRule.sol +++ b/contracts/rules/base/AccountBlockingRule.sol @@ -34,7 +34,7 @@ contract AccountBlockingRule is IFeedRule, IGraphRule, MetadataBased { function blockUser(address source, address target) external { require(msg.sender == source, Errors.InvalidMsgSender()); - require(source != target, Errors.Self()); + require(source != target, Errors.ActionOnSelf()); accountBlocks[source][target] = block.timestamp; }