dsa-connectors/contracts/mainnet/connectors/crvusd/helpers.sol

24 lines
836 B
Solidity
Raw Normal View History

2023-07-30 17:00:04 +00:00
//SPDX-License-Identifier: MIT
pragma solidity ^0.7.0;
import { DSMath } from "../../common/math.sol";
import { Basic } from "../../common/basic.sol";
import { TokenInterface } from "../../common/interfaces.sol";
import "./interface.sol";
abstract contract Helpers is DSMath, Basic {
address internal constant CRV_USD = 0xf939E0A03FB07F59A73314E73794Be0E57ac1b4E;
/**
* @dev ControllerFactory Interface
*/
2023-09-09 15:16:54 +00:00
IControllerFactory internal constant CONTROLLER_FACTORY =
IControllerFactory(0xC9332fdCB1C491Dcc683bAe86Fe3cb70360738BC);
2023-07-30 17:00:04 +00:00
/**
* @dev Get controller address by given collateral asset
*/
2023-09-07 20:29:30 +00:00
function getController(address collateral, uint256 i) internal view returns(IController controller) {
2023-09-09 15:16:54 +00:00
controller = IController(CONTROLLER_FACTORY.get_controller(collateral, i));
2023-07-30 17:00:04 +00:00
}
}