diff --git a/contracts/Comptroller.sol b/contracts/Comptroller.sol index 5a61268fd..89b1632cf 100644 --- a/contracts/Comptroller.sol +++ b/contracts/Comptroller.sol @@ -86,7 +86,7 @@ contract Comptroller is event NewSupplyCap(VToken indexed vToken, uint256 newSupplyCap); /// @notice Emitted when a rewards distributor is added - event NewRewardsDistributor(address indexed rewardsDistributor); + event NewRewardsDistributor(address indexed rewardsDistributor, address indexed rewardToken); /// @notice Emitted when a market is supported event MarketSupported(VToken vToken); @@ -977,7 +977,7 @@ contract Comptroller is _rewardsDistributor.initializeMarket(address(allMarkets[i])); } - emit NewRewardsDistributor(address(_rewardsDistributor)); + emit NewRewardsDistributor(address(_rewardsDistributor), address(_rewardsDistributor.rewardToken())); } /** diff --git a/tests/hardhat/Rewards.ts b/tests/hardhat/Rewards.ts index a2a55118a..bf4e9b218 100644 --- a/tests/hardhat/Rewards.ts +++ b/tests/hardhat/Rewards.ts @@ -256,7 +256,7 @@ describe("Rewards: Tests", async function () { await expect(comptrollerProxy.addRewardsDistributor(rewardsDistributor.address)) .to.emit(comptrollerProxy, "NewRewardsDistributor") - .withArgs(rewardsDistributor.address); + .withArgs(rewardsDistributor.address, xvs.address); }); it("Emits event correctly", async () => { @@ -270,7 +270,7 @@ describe("Rewards: Tests", async function () { await expect(comptrollerProxy.addRewardsDistributor(rewardsDistributor.address)) .to.emit(comptrollerProxy, "NewRewardsDistributor") - .withArgs(rewardsDistributor.address); + .withArgs(rewardsDistributor.address, mockWBTC.address); }); it("Claim XVS", async () => {