Skip to content

Commit

Permalink
Update the License info (#194)
Browse files Browse the repository at this point in the history
* ♻️ Update the License info

* 💅 Edit the codes based on forge fmt
  • Loading branch information
hrmhatef authored Aug 13, 2024
1 parent 192ea50 commit ff1648a
Show file tree
Hide file tree
Showing 9 changed files with 40 additions and 14 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
8 changes: 6 additions & 2 deletions src/L2/L2Governor.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -99,7 +101,9 @@ contract L2Governor is
return super.state(proposalId);
}

function proposalNeedsQueuing(uint256 proposalId)
function proposalNeedsQueuing(
uint256 proposalId
)
public
view
virtual
Expand Down
12 changes: 9 additions & 3 deletions src/L2/L2LockingPosition.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
8 changes: 6 additions & 2 deletions src/L2/L2Staking.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
8 changes: 6 additions & 2 deletions src/L2/L2VestingWallet.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down
4 changes: 3 additions & 1 deletion src/interfaces/L2/IL2Governor.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 3 additions & 1 deletion src/interfaces/L2/IL2LockingPosition.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 3 additions & 1 deletion test/L2/L2LockingPosition.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 3 additions & 1 deletion test/L2/L2Staking.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ff1648a

Please sign in to comment.