From 39be966a77c95f5f1dbe0ff92659f27403373aad Mon Sep 17 00:00:00 2001 From: Akshat Mittal Date: Tue, 23 Apr 2024 00:02:28 +0530 Subject: [PATCH] nit --- contracts/rewards/GenericMultiRewardsVault.sol | 4 +--- contracts/rewards/definitions.sol | 3 +++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/contracts/rewards/GenericMultiRewardsVault.sol b/contracts/rewards/GenericMultiRewardsVault.sol index 47f53c7..f3ef524 100644 --- a/contracts/rewards/GenericMultiRewardsVault.sol +++ b/contracts/rewards/GenericMultiRewardsVault.sol @@ -46,11 +46,9 @@ contract GenericMultiRewardsVault is ERC4626, Ownable { super._withdraw(caller, receiver, owner_, assets, shares); } - error NotAllowed(); - function _update(address from, address to, uint256 amount) internal virtual override { if (from != address(0) && to != address(0)) { - revert NotAllowed(); + revert Errors.NotAllowed(); } super._update(from, to, amount); diff --git a/contracts/rewards/definitions.sol b/contracts/rewards/definitions.sol index bb52beb..5dd51b5 100644 --- a/contracts/rewards/definitions.sol +++ b/contracts/rewards/definitions.sol @@ -25,6 +25,9 @@ abstract contract Errors { error RewardsAreDynamic(IERC20 rewardToken); error ZeroRewardsSpeed(); error InvalidConfig(); + + // Transfers + error NotAllowed(); } abstract contract Events {