Skip to content

Commit

Permalink
feat: add rescuable
Browse files Browse the repository at this point in the history
  • Loading branch information
sakulstra committed Jul 2, 2024
1 parent 6830af7 commit 74dedeb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/contracts/StakeToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {IERC20} from 'openzeppelin-contracts/contracts/token/ERC20/IERC20.sol';
import {SafeCast} from 'openzeppelin-contracts/contracts/utils/math/SafeCast.sol';
import {IERC20Metadata} from 'openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Metadata.sol';
import {IERC20Permit} from 'openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Permit.sol';
import {Rescuable} from 'solidity-utils/contracts/utils/Rescuable.sol';

import {ERC20Permit} from './ERC20Permit.sol';
import {AaveDistributionManager} from './AaveDistributionManager.sol';
Expand All @@ -17,7 +18,7 @@ import {IAaveDistributionManager} from './IAaveDistributionManager.sol';
import {PercentageMath} from './lib/PercentageMath.sol';
import {DistributionTypes} from './lib/DistributionTypes.sol';

contract StakeToken is ERC20Permit, AaveDistributionManager, RoleManager, IStakeToken {
contract StakeToken is ERC20Permit, AaveDistributionManager, RoleManager, IStakeToken, Rescuable {
using SafeERC20 for IERC20;
using PercentageMath for uint256;
using SafeCast for uint256;
Expand Down Expand Up @@ -108,6 +109,10 @@ contract StakeToken is ERC20Permit, AaveDistributionManager, RoleManager, IStake
_updateExchangeRate(INITIAL_EXCHANGE_RATE);
}

function whoCanRescue() public view override returns (address) {
return getAdmin(SLASH_ADMIN_ROLE);
}

/// @inheritdoc IAaveDistributionManager
function configureAssets(
DistributionTypes.AssetConfigInput[] memory assetsConfigInput
Expand Down

0 comments on commit 74dedeb

Please sign in to comment.