From ff1648a3ca61ecc502600fe0f6389cb4f24d61ac Mon Sep 17 00:00:00 2001 From: hatef Date: Tue, 13 Aug 2024 10:48:31 +0300 Subject: [PATCH] Update the License info (#194) * :recycle: Update the License info * :nail_care: Edit the codes based on forge fmt --- LICENSE | 2 +- src/L2/L2Governor.sol | 8 ++++++-- src/L2/L2LockingPosition.sol | 12 +++++++++--- src/L2/L2Staking.sol | 8 ++++++-- src/L2/L2VestingWallet.sol | 8 ++++++-- src/interfaces/L2/IL2Governor.sol | 4 +++- src/interfaces/L2/IL2LockingPosition.sol | 4 +++- test/L2/L2LockingPosition.t.sol | 4 +++- test/L2/L2Staking.t.sol | 4 +++- 9 files changed, 40 insertions(+), 14 deletions(-) diff --git a/LICENSE b/LICENSE index 261eeb9e..69d69122 100644 --- a/LICENSE +++ b/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [yyyy] [name of copyright owner] + Copyright 2024 Nofork Technologies Ltd Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/src/L2/L2Governor.sol b/src/L2/L2Governor.sol index 56a38752..03f7ff2d 100644 --- a/src/L2/L2Governor.sol +++ b/src/L2/L2Governor.sol @@ -89,7 +89,9 @@ contract L2Governor is // The below functions are overrides required by Solidity. - function state(uint256 proposalId) + function state( + uint256 proposalId + ) public view virtual @@ -99,7 +101,9 @@ contract L2Governor is return super.state(proposalId); } - function proposalNeedsQueuing(uint256 proposalId) + function proposalNeedsQueuing( + uint256 proposalId + ) public view virtual diff --git a/src/L2/L2LockingPosition.sol b/src/L2/L2LockingPosition.sol index 24780ba8..3288ffcd 100644 --- a/src/L2/L2LockingPosition.sol +++ b/src/L2/L2LockingPosition.sol @@ -93,7 +93,9 @@ contract L2LockingPosition is Initializable, Ownable2StepUpgradeable, UUPSUpgrad /// initialized to 0 or address(0). /// @param position Locking position to be checked. /// @return Whether the given locking position is null. - function isLockingPositionNull(IL2LockingPosition.LockingPosition memory position) + function isLockingPositionNull( + IL2LockingPosition.LockingPosition memory position + ) internal view virtual @@ -264,7 +266,9 @@ contract L2LockingPosition is Initializable, Ownable2StepUpgradeable, UUPSUpgrad /// @notice Returns the locking position for the given position ID. /// @param positionId ID of the locking position. /// @return Locking position for the given position ID. - function getLockingPosition(uint256 positionId) + function getLockingPosition( + uint256 positionId + ) public view virtual @@ -276,7 +280,9 @@ contract L2LockingPosition is Initializable, Ownable2StepUpgradeable, UUPSUpgrad /// @notice Returns all locking positions for the given owner. /// @param lockOwner Owner address. /// @return All locking positions for the given owner. - function getAllLockingPositionsByOwner(address lockOwner) + function getAllLockingPositionsByOwner( + address lockOwner + ) public view virtual diff --git a/src/L2/L2Staking.sol b/src/L2/L2Staking.sol index 45d534d2..f413da8a 100644 --- a/src/L2/L2Staking.sol +++ b/src/L2/L2Staking.sol @@ -119,7 +119,9 @@ contract L2Staking is Initializable, Ownable2StepUpgradeable, UUPSUpgradeable, I /// initialized to 0 or address(0). /// @param position Locking position to be checked. /// @return Whether the given locking position is null. - function isLockingPositionNull(IL2LockingPosition.LockingPosition memory position) + function isLockingPositionNull( + IL2LockingPosition.LockingPosition memory position + ) internal view virtual @@ -185,7 +187,9 @@ contract L2Staking is Initializable, Ownable2StepUpgradeable, UUPSUpgradeable, I /// @notice Returns the remaining locking duration for the given locking position. /// @param lock The locking position for which the remaining locking duration is returned. /// @return The remaining locking duration for the given locking position. - function remainingLockingDuration(IL2LockingPosition.LockingPosition memory lock) + function remainingLockingDuration( + IL2LockingPosition.LockingPosition memory lock + ) internal view virtual diff --git a/src/L2/L2VestingWallet.sol b/src/L2/L2VestingWallet.sol index dbf8a7be..ac429faf 100644 --- a/src/L2/L2VestingWallet.sol +++ b/src/L2/L2VestingWallet.sol @@ -65,7 +65,9 @@ contract L2VestingWallet is /// @notice Since `Ownable2StepUpgradeable` is enforced on top of `OwnableUpgradeable`. Overriding is required. /// @param _newOwner New proposed owner. - function transferOwnership(address _newOwner) + function transferOwnership( + address _newOwner + ) public virtual override(Ownable2StepUpgradeable, OwnableUpgradeable) @@ -76,7 +78,9 @@ contract L2VestingWallet is // Overriding _transferOwnership and solely uses `Ownable2StepUpgradeable`. /// @param _newOwner New proposed owner. - function _transferOwnership(address _newOwner) + function _transferOwnership( + address _newOwner + ) internal virtual override(Ownable2StepUpgradeable, OwnableUpgradeable) diff --git a/src/interfaces/L2/IL2Governor.sol b/src/interfaces/L2/IL2Governor.sol index b122a1a7..9d14f2d2 100644 --- a/src/interfaces/L2/IL2Governor.sol +++ b/src/interfaces/L2/IL2Governor.sol @@ -174,7 +174,9 @@ interface IL2Governor { function proposalProposer(uint256 proposalId) external view returns (address); function proposalSnapshot(uint256 proposalId) external view returns (uint256); function proposalThreshold() external view returns (uint256); - function proposalVotes(uint256 proposalId) + function proposalVotes( + uint256 proposalId + ) external view returns (uint256 againstVotes, uint256 forVotes, uint256 abstainVotes); diff --git a/src/interfaces/L2/IL2LockingPosition.sol b/src/interfaces/L2/IL2LockingPosition.sol index be51ff9b..00ba5ce7 100644 --- a/src/interfaces/L2/IL2LockingPosition.sol +++ b/src/interfaces/L2/IL2LockingPosition.sol @@ -67,7 +67,9 @@ interface IL2LockingPosition { function initialize(address _stakingContract) external; function initializeVotingPower(address _votingPowerContract) external; function isApprovedForAll(address owner, address operator) external view returns (bool); - function lockingPositions(uint256) + function lockingPositions( + uint256 + ) external view returns (address creator, uint256 amount, uint256 expDate, uint256 pausedLockingDuration); diff --git a/test/L2/L2LockingPosition.t.sol b/test/L2/L2LockingPosition.t.sol index aa7168f4..120ce720 100644 --- a/test/L2/L2LockingPosition.t.sol +++ b/test/L2/L2LockingPosition.t.sol @@ -27,7 +27,9 @@ contract L2LockingPositionV2 is L2LockingPosition { } contract L2LockingPositionHarness is L2LockingPosition { - function exposedIsLockingPositionNull(IL2LockingPosition.LockingPosition memory position) + function exposedIsLockingPositionNull( + IL2LockingPosition.LockingPosition memory position + ) public view returns (bool) diff --git a/test/L2/L2Staking.t.sol b/test/L2/L2Staking.t.sol index 63bb3462..fa99e381 100644 --- a/test/L2/L2Staking.t.sol +++ b/test/L2/L2Staking.t.sol @@ -41,7 +41,9 @@ contract L2StakingHarness is L2Staking { return canLockingPositionBeModified(lockId, lock); } - function exposedRemainingLockingDuration(IL2LockingPosition.LockingPosition memory lock) + function exposedRemainingLockingDuration( + IL2LockingPosition.LockingPosition memory lock + ) public view returns (uint256)