Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[VEN-1866] Add Reward Token in New Reward Distributor Event #296

Merged
merged 2 commits into from
Aug 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions contracts/Comptroller.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -977,7 +977,7 @@ contract Comptroller is
_rewardsDistributor.initializeMarket(address(allMarkets[i]));
}

emit NewRewardsDistributor(address(_rewardsDistributor));
emit NewRewardsDistributor(address(_rewardsDistributor), address(_rewardsDistributor.rewardToken()));
}

/**
Expand Down
4 changes: 2 additions & 2 deletions tests/hardhat/Rewards.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
const btcPrice = "21000.34";
const daiPrice = "1";

fakePriceOracle.getUnderlyingPrice.returns((args: any) => {

Check warning on line 63 in tests/hardhat/Rewards.ts

View workflow job for this annotation

GitHub Actions / Lint

Unexpected any. Specify a different type
if (vDAI && vWBTC) {
if (args[0] === vDAI.address) {
return convertToUnit(daiPrice, 18);
Expand Down Expand Up @@ -256,7 +256,7 @@

await expect(comptrollerProxy.addRewardsDistributor(rewardsDistributor.address))
.to.emit(comptrollerProxy, "NewRewardsDistributor")
.withArgs(rewardsDistributor.address);
.withArgs(rewardsDistributor.address, xvs.address);
});

it("Emits event correctly", async () => {
Expand All @@ -270,7 +270,7 @@

await expect(comptrollerProxy.addRewardsDistributor(rewardsDistributor.address))
.to.emit(comptrollerProxy, "NewRewardsDistributor")
.withArgs(rewardsDistributor.address);
.withArgs(rewardsDistributor.address, mockWBTC.address);
});

it("Claim XVS", async () => {
Expand Down
Loading