Skip to content

Commit

Permalink
fix: add RewardsCompressor type and version
Browse files Browse the repository at this point in the history
  • Loading branch information
Van0k committed Jan 23, 2025
1 parent 2783514 commit 7a07217
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions contracts/compressors/RewardsCompressor.sol
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ import {IStakingRewards} from "@gearbox-protocol/integrations-v3/contracts/integ
contract RewardsCompressor is IRewardsCompressor {
using RewardInfoLib for RewardInfo[];

uint256 public constant override version = 3_10;
bytes32 public constant override contractType = "REWARDS_COMPRESSOR";

/// @notice Returns array of earned rewards for a credit account across all adapters
/// @param creditAccount Address of the credit account to check
/// @return rewards Array of RewardInfo structs containing reward information
Expand Down
4 changes: 3 additions & 1 deletion contracts/interfaces/IRewardsCompressor.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
// (c) Gearbox Foundation, 2024.
pragma solidity ^0.8.23;

import {IVersion} from "@gearbox-protocol/core-v3/contracts/interfaces/base/IVersion.sol";

/// @title Reward info struct
struct RewardInfo {
uint256 amount;
Expand Down Expand Up @@ -70,7 +72,7 @@ interface IConvexToken {

/// @title Rewards compressor interface
/// @notice Compresses information about earned rewards for various staking adapters
interface IRewardsCompressor {
interface IRewardsCompressor is IVersion {
/// @notice Returns array of earned rewards for a credit account across all adapters
/// @param creditAccount Address of the credit account to check
/// @return rewards Array of RewardInfo structs containing reward information
Expand Down

0 comments on commit 7a07217

Please sign in to comment.