Interface
IdleToken
The following one is the interface for the IdleToken contract. Note that IdleTokens are ERC20 so they will also support methods from the ERC20 standard like approve , transfer, balanceOf
1
interface IIdleToken {
2
function token() external view returns (address underlying);
3
function govTokens(uint256) external view returns (address govToken);
4
function userAvgPrices(address) external view returns (uint256 avgPrice);
5
function mintIdleToken(uint256 _amount, bool _skipWholeRebalance, address _referral) external returns (uint256 mintedTokens);
6
function redeemIdleToken(uint256 _amount) external returns (uint256 redeemedTokens);
7
function redeemInterestBearingTokens(uint256 _amount) external;
8
function rebalance() external returns (bool);
9
function tokenPrice() external view returns (uint256 price);
10
function getAPRs() external view returns (address[] memory addresses, uint256[] memory aprs);
11
function getAvgAPR() external view returns (uint256 avgApr);
12
function getGovTokensAmounts(address _usr) external view returns (uint256[] memory _amounts);
13
function flashLoanFee() external view returns (uint256 fee);
14
function flashFee(address _token, uint256 _amount) external view returns (uint256);
15
function maxFlashLoan(address _token) external view returns (uint256);
16
function flashLoan(IERC3156FlashBorrower _receiver, address _token, uint256 _amount, bytes calldata _params) external returns (bool);
17
function getAllocations() external view returns (uint256[] memory);
18
function getGovTokens() external view returns (address[] memory);
19
function getAllAvailableTokens() external view returns (address[] memory);
20
function getProtocolTokenToGov(address _protocolToken) external view returns (address);
21
function tokenPriceWithFee(address user) external view returns (uint256 priceWFee);
22
}
Copied!
*IERC3156FlashBorrower interface can be found here​
Last modified 4mo ago
Copy link