From 447cd18ac82614995f626c75bd48f83b205497f7 Mon Sep 17 00:00:00 2001 From: BkChoy Date: Wed, 20 Mar 2024 10:06:38 +1300 Subject: [PATCH] fixed formatting --- contracts/metisStaking/SequencerVCS.sol | 60 +++++++++---------- contracts/metisStaking/SequencerVault.sol | 24 ++++---- .../ccip/SequencerRewardsCCIPSender.sol | 2 +- 3 files changed, 43 insertions(+), 43 deletions(-) diff --git a/contracts/metisStaking/SequencerVCS.sol b/contracts/metisStaking/SequencerVCS.sol index 0355494b..a15dc5af 100644 --- a/contracts/metisStaking/SequencerVCS.sol +++ b/contracts/metisStaking/SequencerVCS.sol @@ -55,7 +55,7 @@ contract SequencerVCS is Strategy { } /** - * @notice initializes contract + * @notice Initializes contract * @param _token address of METIS token * @param _stakingPool address of the staking pool that controls this strategy * @param _lockingInfo address of Metis locking info contract @@ -96,7 +96,7 @@ contract SequencerVCS is Strategy { } /** - * @notice reverts if sender is not deposit controller + * @notice Reverts if sender is not deposit controller **/ modifier onlyDepositController() { if (msg.sender != depositController) revert SenderNotAuthorized(); @@ -104,7 +104,7 @@ contract SequencerVCS is Strategy { } /** - * @notice reverts if sender is not CCIP controller + * @notice Reverts if sender is not CCIP controller **/ modifier onlyCCIPController() { if (msg.sender != ccipController) revert SenderNotAuthorized(); @@ -112,7 +112,7 @@ contract SequencerVCS is Strategy { } /** - * @notice deposits tokens into this strategy from the staking pool + * @notice Deposits tokens into this strategy from the staking pool * @param _amount amount to deposit */ function deposit(uint256 _amount) external onlyStakingPool { @@ -121,14 +121,14 @@ contract SequencerVCS is Strategy { } /** - * @notice withdrawals are not yet implemented + * @notice Withdrawals are not yet implemented */ function withdraw(uint256) external view onlyStakingPool { revert("withdrawals not yet implemented"); } /** - * @notice returns a list of all vaults controlled by this contract + * @notice Returns a list of all vaults controlled by this contract * @return list of vault addresses */ function getVaults() external view returns (ISequencerVault[] memory) { @@ -148,7 +148,7 @@ contract SequencerVCS is Strategy { } /** - * @notice returns the total unclaimed operator rewards across all vaults + * @notice Returns the total unclaimed operator rewards across all vaults * @return unclaimed operator rewards * @return rewards available to withdraw */ @@ -157,7 +157,7 @@ contract SequencerVCS is Strategy { } /** - * @notice used by vaults to withdraw operator rewards + * @notice Used by vaults to withdraw operator rewards * @param _receiver address to receive rewards * @param _amount amount to withdraw */ @@ -175,7 +175,7 @@ contract SequencerVCS is Strategy { } /** - * @notice returns the total amount of queued tokens + * @notice Returns the total amount of queued tokens * @return total queued tokens */ function getTotalQueuedTokens() external view returns (uint256) { @@ -183,7 +183,7 @@ contract SequencerVCS is Strategy { } /** - * @notice deposits queued tokens into vaults + * @notice Deposits queued tokens into vaults * @dev called by deposit controller bot once certain conditions are met as defined offchain * @param _vaults list of vaults to deposit into * @param _amounts amount to deposit into each vault @@ -195,7 +195,7 @@ contract SequencerVCS is Strategy { } /** - * @notice returns the deposit change since deposits were last updated + * @notice Returns the deposit change since deposits were last updated * @dev deposit change could be positive or negative depending on reward rate and whether * any slashing occurred * @return deposit change @@ -209,7 +209,7 @@ contract SequencerVCS is Strategy { } /** - * @notice returns the total amount of fees that will be paid on the next call to updateDeposits() + * @notice Returns the total amount of fees that will be paid on the next call to updateDeposits() * @return total fees */ function getPendingFees() external view override returns (uint256) { @@ -230,7 +230,7 @@ contract SequencerVCS is Strategy { } /** - * @notice updates deposit accounting and calculates fees on newly earned rewards + * @notice Updates deposit accounting and calculates fees on newly earned rewards * @param _data encoded minRewards (uint256) - min amount of rewards required to claim (set 0 to skip reward claiming) * and l2Gas (uint32) - gas limit for reward bridging * @return depositChange change in deposits since last update @@ -293,7 +293,7 @@ contract SequencerVCS is Strategy { } /** - * @notice handles an incoming CCIP transfer of rewards from l2 + * @notice Handles an incoming CCIP transfer of rewards from l2 * @param _amount amount received */ function handleIncomingL2Rewards(uint256 _amount) external onlyCCIPController { @@ -305,7 +305,7 @@ contract SequencerVCS is Strategy { } /** - * @notice returns the total amount of deposits as tracked in this strategy + * @notice Returns the total amount of deposits as tracked in this strategy * @return total deposits */ function getTotalDeposits() public view override returns (uint256) { @@ -313,7 +313,7 @@ contract SequencerVCS is Strategy { } /** - * @notice returns the maximum that can be deposited into this strategy + * @notice Returns the maximum that can be deposited into this strategy * @return maximum deposits */ function getMaxDeposits() public view override returns (uint256) { @@ -321,7 +321,7 @@ contract SequencerVCS is Strategy { } /** - * @notice returns the minimum that must remain this strategy + * @notice Returns the minimum that must remain this strategy * @return minimum deposits */ function getMinDeposits() public view virtual override returns (uint256) { @@ -329,7 +329,7 @@ contract SequencerVCS is Strategy { } /** - * @notice relocks sequencer rewards for a list of vaults + * @notice Relocks sequencer rewards for a list of vaults * @param _vaults list of vaults */ function relockRewards(uint256[] calldata _vaults) external { @@ -339,7 +339,7 @@ contract SequencerVCS is Strategy { } /** - * @notice deploys a new vault and adds it to this strategy + * @notice Deploys a new vault and adds it to this strategy * @param _pubkey public key of sequencer * @param _signer signer address of sequencer * @param _rewardsReceiver address authorized to claim rewards for the vault @@ -369,7 +369,7 @@ contract SequencerVCS is Strategy { } /** - * @notice upgrades vaults to a new implementation contract + * @notice Upgrades vaults to a new implementation contract * @param _startIndex index of first vault to upgrade * @param _numVaults number of vaults to upgrade starting at _startIndex * @param _data optional encoded function call to be executed after upgrade @@ -390,7 +390,7 @@ contract SequencerVCS is Strategy { } /** - * @notice returns a list of all fees and fee receivers + * @notice Returns a list of all fees and fee receivers * @return list of fees */ function getFees() external view returns (Fee[] memory) { @@ -398,7 +398,7 @@ contract SequencerVCS is Strategy { } /** - * @notice adds a new fee + * @notice Adds a new fee * @param _receiver receiver of fee * @param _feeBasisPoints fee in basis points **/ @@ -408,7 +408,7 @@ contract SequencerVCS is Strategy { } /** - * @notice updates an existing fee + * @notice Updates an existing fee * @param _index index of fee * @param _receiver receiver of fee * @param _feeBasisPoints fee in basis points @@ -430,7 +430,7 @@ contract SequencerVCS is Strategy { } /** - * @notice sets the basis point amount of an operator's earned rewards that they receive + * @notice Sets the basis point amount of an operator's earned rewards that they receive * @dev stakingPool.updateStrategyRewards is called to credit all past operator rewards at * the old rate before the reward percentage changes * @param _operatorRewardPercentage basis point amount @@ -445,7 +445,7 @@ contract SequencerVCS is Strategy { } /** - * @notice sets a new vault implementation contract to be used when deploying/upgrading vaults + * @notice Sets a new vault implementation contract to be used when deploying/upgrading vaults * @param _vaultImplementation address of implementation contract */ function setVaultImplementation(address _vaultImplementation) external onlyOwner { @@ -455,7 +455,7 @@ contract SequencerVCS is Strategy { } /** - * @notice sets the deposit controller + * @notice Sets the deposit controller * @dev this address is authorized to deposit queued tokens * @param _depositController address of deposit controller */ @@ -464,7 +464,7 @@ contract SequencerVCS is Strategy { } /** - * @notice sets the CCIP controller + * @notice Sets the CCIP controller * @param _ccipController address of CCIP controller */ function setCCIPController(address _ccipController) external onlyOwner { @@ -472,7 +472,7 @@ contract SequencerVCS is Strategy { } /** - * @notice updates rewards for all strategies controlled by the staking pool + * @notice Updates rewards for all strategies controlled by the staking pool * @dev called before operatorRewardPercentage is changed to * credit any past rewards at the old rate */ @@ -486,7 +486,7 @@ contract SequencerVCS is Strategy { } /** - * @notice returns the sum of all fees + * @notice Returns the sum of all fees * @return sum of fees in basis points **/ function _totalFeesBasisPoints() private view returns (uint256) { @@ -498,7 +498,7 @@ contract SequencerVCS is Strategy { } /** - * @notice returns whether an address belongs to a contract + * @notice Returns whether an address belongs to a contract * @param _address address to check * @return true if address is contract, false otherwise */ diff --git a/contracts/metisStaking/SequencerVault.sol b/contracts/metisStaking/SequencerVault.sol index 5d22bfd6..878c28c3 100644 --- a/contracts/metisStaking/SequencerVault.sol +++ b/contracts/metisStaking/SequencerVault.sol @@ -43,7 +43,7 @@ contract SequencerVault is Initializable, UUPSUpgradeable, OwnableUpgradeable { } /** - * @notice initializes contract + * @notice Initializes contract * @param _token address of METIS token * @param _vaultController address of the strategy that controls this vault * @param _lockingPool address of Metis locking pool contract @@ -73,7 +73,7 @@ contract SequencerVault is Initializable, UUPSUpgradeable, OwnableUpgradeable { } /** - * @notice reverts if sender is not vaultController + * @notice Reverts if sender is not vaultController **/ modifier onlyVaultController() { if (msg.sender != address(vaultController)) revert SenderNotAuthorized(); @@ -81,7 +81,7 @@ contract SequencerVault is Initializable, UUPSUpgradeable, OwnableUpgradeable { } /** - * @notice reverts if sender is not rewardsReceiver + * @notice Reverts if sender is not rewardsReceiver **/ modifier onlyRewardsReceiver() { if (msg.sender != rewardsReceiver) revert SenderNotAuthorized(); @@ -89,7 +89,7 @@ contract SequencerVault is Initializable, UUPSUpgradeable, OwnableUpgradeable { } /** - * @notice deposits tokens into the Metis locking pool + * @notice Deposits tokens into the Metis locking pool * @param _amount amount to deposit */ function deposit(uint256 _amount) external onlyVaultController { @@ -105,7 +105,7 @@ contract SequencerVault is Initializable, UUPSUpgradeable, OwnableUpgradeable { } /** - * @notice returns the total balance of this sequencer in the Metis locking pool + * @notice Returns the total balance of this sequencer in the Metis locking pool * @dev includes principal plus any rewards * @return total balance */ @@ -114,7 +114,7 @@ contract SequencerVault is Initializable, UUPSUpgradeable, OwnableUpgradeable { } /** - * @notice returns the principal balance of this sequencer in the Metis locking pool + * @notice Returns the principal balance of this sequencer in the Metis locking pool * @return principal balance */ function getPrincipalDeposits() public view returns (uint256) { @@ -123,7 +123,7 @@ contract SequencerVault is Initializable, UUPSUpgradeable, OwnableUpgradeable { } /** - * @notice returns the claimable rewards balance of this sequencer in the Metis locking pool + * @notice Returns the claimable rewards balance of this sequencer in the Metis locking pool * @return rewards balance */ function getRewards() public view returns (uint256) { @@ -132,7 +132,7 @@ contract SequencerVault is Initializable, UUPSUpgradeable, OwnableUpgradeable { } /** - * @notice withdraws the unclaimed operator rewards for this vault + * @notice Withdraws the unclaimed operator rewards for this vault */ function withdrawRewards() external onlyRewardsReceiver { uint256 amountWithdrawn = vaultController.withdrawOperatorRewards(rewardsReceiver, unclaimedRewards); @@ -142,7 +142,7 @@ contract SequencerVault is Initializable, UUPSUpgradeable, OwnableUpgradeable { } /** - * @notice returns the amount of operator rewards that will be earned by this vault on the next update + * @notice Returns the amount of operator rewards that will be earned by this vault on the next update * @return newly earned rewards */ function getPendingRewards() public view returns (uint256) { @@ -156,7 +156,7 @@ contract SequencerVault is Initializable, UUPSUpgradeable, OwnableUpgradeable { } /** - * @notice updates the deposit and reward accounting for this vault + * @notice Updates the deposit and reward accounting for this vault * @dev will only pay out rewards if the vault is net positive when accounting for lost deposits * @param _minRewards min amount of rewards to claim (set 0 to skip reward claiming) * @param _l2Gas bridge reward to L2 gasLimit @@ -197,7 +197,7 @@ contract SequencerVault is Initializable, UUPSUpgradeable, OwnableUpgradeable { } /** - * @notice relocks sequencer rewards + * @notice Relocks sequencer rewards * @dev will revert if there is insufficient space in sequencer to lock rewards */ function relockRewards() external { @@ -206,7 +206,7 @@ contract SequencerVault is Initializable, UUPSUpgradeable, OwnableUpgradeable { } /** - * @notice sets the rewards receiver + * @notice Sets the rewards receiver * @dev this address is authorized to withdraw rewards for this vault and/or change the rewardsReceiver * to a new a address * @param _rewardsReceiver rewards receiver address diff --git a/contracts/metisStaking/ccip/SequencerRewardsCCIPSender.sol b/contracts/metisStaking/ccip/SequencerRewardsCCIPSender.sol index 3014b1b0..2513086a 100644 --- a/contracts/metisStaking/ccip/SequencerRewardsCCIPSender.sol +++ b/contracts/metisStaking/ccip/SequencerRewardsCCIPSender.sol @@ -67,7 +67,7 @@ contract SequencerRewardsCCIPSender is UUPSUpgradeable, OwnableUpgradeable { } /** - * @notice reverts if sender is not transfer initiator + * @notice Reverts if sender is not transfer initiator **/ modifier onlyTransferInitiator() { if (msg.sender != transferInitiator) revert SenderNotAuthorized();