-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Upgraded recipient to support BAL tokens and batched deposits * Add tests for gov fee collection * Add fork tests for recipient upgrade sequence
- Loading branch information
Showing
51 changed files
with
1,967 additions
and
653 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// SPDX-License-Identifier: AGPL-3.0-or-later | ||
pragma solidity 0.8.2; | ||
|
||
import { ISavingsManager } from "../interfaces/ISavingsManager.sol"; | ||
import { ImmutableModule } from "../shared/ImmutableModule.sol"; | ||
|
||
/** | ||
* @title Collector | ||
* @dev Distributes unallocated interest across multiple mAssets via savingsManager | ||
*/ | ||
contract Collector is ImmutableModule { | ||
constructor(address _nexus) ImmutableModule(_nexus) {} | ||
|
||
/** | ||
* @dev Distributes the interest accrued across multiple mAssets, optionally | ||
* calling collectAndDistribute beforehand. | ||
*/ | ||
function distributeInterest(address[] calldata _mAssets, bool _collectFirst) external { | ||
ISavingsManager savingsManager = ISavingsManager(_savingsManager()); | ||
uint256 len = _mAssets.length; | ||
require(len > 0, "Invalid inputs"); | ||
for (uint256 i = 0; i < len; i++) { | ||
if (_collectFirst) savingsManager.collectAndDistributeInterest(_mAssets[i]); | ||
|
||
savingsManager.distributeUnallocatedInterest(_mAssets[i]); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// SPDX-License-Identifier: AGPL-3.0-or-later | ||
pragma solidity 0.8.2; | ||
|
||
interface IBPool { | ||
function joinswapExternAmountIn( | ||
address tokenIn, | ||
uint256 tokenAmountIn, | ||
uint256 minPoolAmountOut | ||
) external returns (uint256 poolAmountOut); | ||
|
||
function swapExactAmountIn( | ||
address tokenIn, | ||
uint256 tokenAmountIn, | ||
address tokenOut, | ||
uint256 minAmountOut, | ||
uint256 maxPrice | ||
) external returns (uint256 tokenAmountOut, uint256 spotPriceAfter); | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,4 +11,4 @@ interface IBoostDirector { | |
) external; | ||
|
||
function whitelistVaults(address[] calldata _vaults) external; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.