-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(protocol): tighten up solhint (#16192)
- Loading branch information
Showing
8 changed files
with
35 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,9 @@ import "./EssentialContract.sol"; | |
/// @notice See the documentation in {IAddressManager}. | ||
/// @custom:security-contact [email protected] | ||
contract AddressManager is EssentialContract, IAddressManager { | ||
/// @dev Mapping of chainId to mapping of name to address. | ||
mapping(uint256 chainId => mapping(bytes32 name => address addr)) private __addresses; | ||
|
||
uint256[49] private __gap; | ||
|
||
/// @notice Emitted when an address is set. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,15 +9,19 @@ import "./AddressResolver.sol"; | |
/// @custom:security-contact [email protected] | ||
abstract contract EssentialContract is UUPSUpgradeable, Ownable2StepUpgradeable, AddressResolver { | ||
uint8 private constant _FALSE = 1; | ||
|
||
uint8 private constant _TRUE = 2; | ||
|
||
// The slot in transient storage of the reentry lock | ||
// This is the keccak256 hash of "ownerUUPS.reentry_slot" | ||
/// @dev The slot in transient storage of the reentry lock. This is the keccak256 hash | ||
/// of "ownerUUPS.reentry_slot" | ||
bytes32 private constant _REENTRY_SLOT = | ||
0xa5054f728453d3dbe953bdc43e4d0cb97e662ea32d7958190f3dc2da31d9721a; | ||
|
||
uint8 private __reentry; // slot 1 | ||
/// @dev Slot 1. | ||
uint8 private __reentry; | ||
|
||
uint8 private __paused; | ||
|
||
uint256[49] private __gap; | ||
|
||
/// @notice Emitted when the contract is paused. | ||
|
@@ -88,7 +92,6 @@ abstract contract EssentialContract is UUPSUpgradeable, Ownable2StepUpgradeable, | |
/// @notice Initializes the contract. | ||
/// @param _owner The owner of this contract. msg.sender will be used if this value is zero. | ||
/// @param _addressManager The address of the {AddressManager} contract. | ||
// solhint-disable-next-line func-name-mixedcase | ||
function __Essential_init( | ||
address _owner, | ||
address _addressManager | ||
|
@@ -103,13 +106,13 @@ abstract contract EssentialContract is UUPSUpgradeable, Ownable2StepUpgradeable, | |
__AddressResolver_init(_addressManager); | ||
} | ||
|
||
// solhint-disable-next-line func-name-mixedcase | ||
function __Essential_init(address _owner) internal virtual { | ||
_transferOwnership(_owner == address(0) ? msg.sender : _owner); | ||
__paused = _FALSE; | ||
} | ||
|
||
function _authorizeUpgrade(address) internal virtual override onlyOwner { } | ||
|
||
function _authorizePause(address) internal virtual onlyOwner { } | ||
|
||
// Stores the reentry lock | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters