From 7a07217a5624698b2548903055d28dbcc5e9c42e Mon Sep 17 00:00:00 2001 From: Van0k Date: Thu, 23 Jan 2025 14:18:40 +0400 Subject: [PATCH] fix: add RewardsCompressor type and version --- contracts/compressors/RewardsCompressor.sol | 3 +++ contracts/interfaces/IRewardsCompressor.sol | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/contracts/compressors/RewardsCompressor.sol b/contracts/compressors/RewardsCompressor.sol index a9b17cd..70a6a47 100644 --- a/contracts/compressors/RewardsCompressor.sol +++ b/contracts/compressors/RewardsCompressor.sol @@ -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 diff --git a/contracts/interfaces/IRewardsCompressor.sol b/contracts/interfaces/IRewardsCompressor.sol index 416f955..ab7f1b6 100644 --- a/contracts/interfaces/IRewardsCompressor.sol +++ b/contracts/interfaces/IRewardsCompressor.sol @@ -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; @@ -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