Skip to content

Commit

Permalink
Add operator !=
Browse files Browse the repository at this point in the history
  • Loading branch information
DimaStebaev committed Oct 7, 2024
1 parent 7850f50 commit 5cddebf
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion contracts/DomainTypes.sol
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ pragma solidity >=0.8.19 <0.9.0;
type SchainHash is bytes32;

using {
_schainHashEquals as ==
_schainHashEquals as ==,
_schainHashNotEquals as !=
} for SchainHash global;

// Operators are used by the library users
Expand All @@ -34,4 +35,8 @@ function _schainHashEquals(SchainHash left, SchainHash right) pure returns (bool
return SchainHash.unwrap(left) == SchainHash.unwrap(right);
}

function _schainHashNotEquals(SchainHash left, SchainHash right) pure returns (bool result) {
return SchainHash.unwrap(left) != SchainHash.unwrap(right);
}

// slither-disable-end dead-code

0 comments on commit 5cddebf

Please sign in to comment.