Interface
Developers > Best Yield strategy > Interface

IdleToken

The interface for the IdleToken contract is the following:
1
interface IdleToken {
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 getAllocations() external view returns (uint256[] memory);
14
function getGovTokens() external view returns (address[] memory);
15
function getAllAvailableTokens() external view returns (address[] memory);
16
function getProtocolTokenToGov(address _protocolToken) external view returns (address);
17
function tokenPriceWithFee(address user) external view returns (uint256 priceWFee);
18
}
Copied!
Note that IdleTokens are ERC20 compliant, so they will also support methods from the ERC20 standard like approve, transfer, balanceOf.
Copy link