Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add rescuable #14

Merged
merged 1 commit into from
Jul 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 {IRewardsController} from './IRewardsController.sol';
import {PercentageMath} from './lib/PercentageMath.sol';
import {DistributionTypes} from './lib/DistributionTypes.sol';

contract StakeToken is ERC20Permit, AaveDistributionManager, IStakeToken {
contract StakeToken is ERC20Permit, AaveDistributionManager, IStakeToken, Rescuable {
using SafeERC20 for IERC20;
using PercentageMath for uint256;
using SafeCast for uint256;
Expand Down Expand Up @@ -100,6 +101,10 @@ contract StakeToken is ERC20Permit, AaveDistributionManager, IStakeToken {
return totalSupply();
}

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

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