From 57af3de231b3677c32986dcf28be289aaf1f56dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Migone?= Date: Fri, 19 Sep 2025 11:36:59 -0300 Subject: [PATCH] feat: add LegacyRewardsManager to interfaces and horizon contracts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tomás Migone --- .../contracts/rewards/ILegacyRewardsManager.sol | 8 ++++++++ packages/interfaces/src/types/horizon.ts | 2 ++ .../toolshed/src/deployments/horizon/address-book.ts | 10 +++++++++- packages/toolshed/src/deployments/horizon/contracts.ts | 2 ++ 4 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 packages/interfaces/contracts/contracts/rewards/ILegacyRewardsManager.sol diff --git a/packages/interfaces/contracts/contracts/rewards/ILegacyRewardsManager.sol b/packages/interfaces/contracts/contracts/rewards/ILegacyRewardsManager.sol new file mode 100644 index 000000000..aae740095 --- /dev/null +++ b/packages/interfaces/contracts/contracts/rewards/ILegacyRewardsManager.sol @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0-or-later + +pragma solidity ^0.7.6 || 0.8.27; + +interface ILegacyRewardsManager { + function getRewards(address allocationID) external view returns (uint256); +} + diff --git a/packages/interfaces/src/types/horizon.ts b/packages/interfaces/src/types/horizon.ts index 52946154a..1e78414c9 100644 --- a/packages/interfaces/src/types/horizon.ts +++ b/packages/interfaces/src/types/horizon.ts @@ -12,6 +12,7 @@ import type { IRewardsManagerToolshed, IStaking, ISubgraphNFT, + ILegacyRewardsManager, } from '../../types' export { @@ -28,4 +29,5 @@ export { IPaymentsEscrowToolshed as PaymentsEscrow, IRewardsManagerToolshed as RewardsManager, ISubgraphNFT as SubgraphNFT, + ILegacyRewardsManager as LegacyRewardsManager, } diff --git a/packages/toolshed/src/deployments/horizon/address-book.ts b/packages/toolshed/src/deployments/horizon/address-book.ts index fbf72aa98..8a3db914e 100644 --- a/packages/toolshed/src/deployments/horizon/address-book.ts +++ b/packages/toolshed/src/deployments/horizon/address-book.ts @@ -1,4 +1,4 @@ -import type { LegacyStaking } from '@graphprotocol/interfaces' +import type { LegacyRewardsManager, LegacyStaking } from '@graphprotocol/interfaces' import { getInterface } from '@graphprotocol/interfaces' import { Provider, Signer } from 'ethers' import { Contract } from 'ethers' @@ -35,6 +35,14 @@ export class GraphHorizonAddressBook extends AddressBook