Skip to content

Commit

Permalink
Merge pull request #118 from aave/fix/117-rewards-distributor-constru…
Browse files Browse the repository at this point in the history
…ctor

Fix/117 Remove constructor of RewardsDistributor and RewardsController
  • Loading branch information
kartojal authored Nov 18, 2022
2 parents d8d853f + 1c01600 commit 133d29e
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 16 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## [1.20.2](https://github.com/aave/aave-v3-periphery/compare/v1.20.1...v1.20.2) (2022-11-17)


### Miscellaneous Chores

* release 1.20.2 ([28ec2ad](https://github.com/aave/aave-v3-periphery/commit/28ec2adb46d0230265192b3dc86e64c62cea935f))

## [1.20.1](https://github.com/aave/aave-v3-periphery/compare/v1.20.0...v1.20.1) (2022-11-09)


Expand Down
2 changes: 0 additions & 2 deletions contracts/rewards/RewardsController.sol
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ contract RewardsController is RewardsDistributor, VersionedInitializable, IRewar
_;
}

constructor(address emissionManager) RewardsDistributor(emissionManager) {}

/**
* @dev Initialize for RewardsController
* @param emissionManager address of the EmissionManager
Expand Down
4 changes: 0 additions & 4 deletions contracts/rewards/RewardsDistributor.sol
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ abstract contract RewardsDistributor is IRewardsDistributor {
_;
}

constructor(address emissionManager) {
_setEmissionManager(emissionManager);
}

/// @inheritdoc IRewardsDistributor
function getRewardsData(address asset, address reward)
public
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aave/periphery-v3",
"version": "1.20.0-beta.1",
"version": "1.20.2",
"description": "Aave Protocol V3 periphery smart contracts",
"files": [
"contracts",
Expand Down Expand Up @@ -32,7 +32,7 @@
},
"license": "AGPLv3",
"devDependencies": {
"@aave/deploy-v3": "1.27.0-beta.9",
"@aave/deploy-v3": "1.30.0-beta-rewards.1",
"@ethersproject/abi": "^5.1.0",
"@nomicfoundation/hardhat-chai-matchers": "^1.0.2",
"@nomiclabs/hardhat-ethers": "^2.1.0",
Expand Down
8 changes: 4 additions & 4 deletions test/rewards/misc.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import { makeSuite } from '../helpers/make-suite';
import { RANDOM_ADDRESSES } from '../helpers/constants';
import hre from 'hardhat';

makeSuite('AaveIncentivesController misc tests', (testEnv) => {
it('constructor should assign correct params', async () => {
makeSuite('RewardsController misc tests', (testEnv) => {
it('Deployment should pass', async () => {
const peiEmissionManager = RANDOM_ADDRESSES[1];
const { deployer } = await hre.getNamedAccounts();

Expand All @@ -21,14 +21,14 @@ makeSuite('AaveIncentivesController misc tests', (testEnv) => {
}
const artifact = await hre.deployments.deploy('RewardsController', {
from: deployer,
args: [peiEmissionManager],
args: [],
});
const rewardsController = (await hre.ethers.getContractAt(
artifact.abi,
artifact.address
)) as RewardsController;
await expect((await rewardsController.getEmissionManager()).toString()).to.be.equal(
peiEmissionManager
ZERO_ADDRESS
);
});

Expand Down

0 comments on commit 133d29e

Please sign in to comment.