From f5077206496230d206a5dc4afa450e2a692b862d Mon Sep 17 00:00:00 2001 From: Schlagonia Date: Mon, 10 Jun 2024 23:07:29 -0600 Subject: [PATCH] feat: sweep --- contracts/splitter/Dumper.sol | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/contracts/splitter/Dumper.sol b/contracts/splitter/Dumper.sol index 3f6ea96..0698eac 100644 --- a/contracts/splitter/Dumper.sol +++ b/contracts/splitter/Dumper.sol @@ -67,12 +67,7 @@ contract Dumper is TradeFactorySwapper, Governance { ); } - function _claimRewards() internal override { - address[] memory localRewardTokens = rewardTokens(); - for (uint256 i; i < localRewardTokens.length; ++i) { - accountant.distribute(localRewardTokens[i]); - } - } + function _claimRewards() internal override {} // Claim the fees from the accountant function claim(address _token) external onlyGovernance { @@ -88,4 +83,12 @@ contract Dumper is TradeFactorySwapper, Governance { function claim(address _token, uint256 _amount) external onlyGovernance { accountant.distribute(_token, _amount); } + + function sweep(address _token) external onlyGovernance { + address daddy = accountant.feeManager(); + ERC20(_token).safeTransfer( + daddy, + ERC20(_token).balanceOf(address(this)) + ); + } }