Skip to content

Commit

Permalink
Merge pull request #194 from aave/feat/193-IAaveIncentivesController_…
Browse files Browse the repository at this point in the history
…legacy_methods

feat: Added missing legacy methods
  • Loading branch information
kartojal authored Nov 9, 2021
2 parents f97fd7b + 3a2fc3f commit 80c62ab
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
20 changes: 20 additions & 0 deletions contracts/interfaces/IAaveIncentivesController.sol
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,21 @@ interface IAaveIncentivesController {
uint256
);

/**
* LEGACY **************************
* @dev Returns the configuration of the distribution for a certain asset
* @param asset The address of the reference asset of the distribution
* @return The asset index, the emission per second and the last updated timestamp
**/
function assets(address asset)
external
view
returns (
uint128,
uint128,
uint256
);

/**
* @notice Whitelists an address to claim the rewards on behalf of another address
* @param user The address of the user
Expand Down Expand Up @@ -153,4 +168,9 @@ interface IAaveIncentivesController {
* @return The precision used in the incentives controller
*/
function PRECISION() external view returns (uint8);

/**
* @dev Gets the distribution end timestamp of the emissions
*/
function DISTRIBUTION_END() external view returns (uint256);
}
17 changes: 17 additions & 0 deletions contracts/mocks/helpers/MockIncentivesController.sol
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,19 @@ contract MockIncentivesController is IAaveIncentivesController {
return (0, 0, 0);
}

function assets(address)
external
pure
override
returns (
uint128,
uint128,
uint256
)
{
return (0, 0, 0);
}

function setClaimer(address, address) external override {}

function getClaimer(address) external pure override returns (address) {
Expand Down Expand Up @@ -67,4 +80,8 @@ contract MockIncentivesController is IAaveIncentivesController {
function PRECISION() external pure override returns (uint8) {
return 0;
}

function DISTRIBUTION_END() external pure override returns (uint256) {
return 0;
}
}

0 comments on commit 80c62ab

Please sign in to comment.