Skip to content

Commit ed51926

Browse files
committed
fix: add more stuff missing from interfaces
Signed-off-by: Tomás Migone <[email protected]>
1 parent fbe38f9 commit ed51926

File tree

12 files changed

+109
-10
lines changed

12 files changed

+109
-10
lines changed

.changeset/huge-guests-say.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

packages/hardhat-graph-protocol/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# hardhat-graph-protocol
22

3+
## 0.2.5
4+
5+
### Patch Changes
6+
7+
- @graphprotocol/toolshed@0.6.5
8+
39
## 0.2.4
410

511
### Patch Changes

packages/hardhat-graph-protocol/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "hardhat-graph-protocol",
3-
"version": "0.2.4",
3+
"version": "0.2.5",
44
"publishConfig": {
55
"access": "public"
66
},

packages/horizon/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
"hardhat": "^2.22.18",
6464
"hardhat-contract-sizer": "^2.10.0",
6565
"hardhat-gas-reporter": "^1.0.8",
66-
"hardhat-graph-protocol": "workspace:^0.2.4",
66+
"hardhat-graph-protocol": "workspace:^0.2.5",
6767
"hardhat-secure-accounts": "^1.0.5",
6868
"lint-staged": "^15.2.2",
6969
"prettier": "^3.2.5",

packages/interfaces/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# @graphprotocol/interfaces
22

3+
## 0.2.5
4+
5+
### Patch Changes
6+
7+
- fbe38f9: Add ICuration to L2Curation interface
8+
- Add missing events to SubgraphService and RewardsManager interfaces
9+
310
## 0.2.4
411

512
### Patch Changes

packages/interfaces/contracts/toolshed/IRewardsManagerToolshed.sol

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,31 @@ pragma solidity ^0.7.6 || 0.8.27;
44
import { IRewardsManager } from "../contracts/rewards/IRewardsManager.sol";
55

66
interface IRewardsManagerToolshed is IRewardsManager {
7+
/**
8+
* @dev Emitted when rewards are assigned to an indexer.
9+
*/
10+
event RewardsAssigned(address indexed indexer, address indexed allocationID, uint256 amount);
11+
12+
/**
13+
* @dev Emitted when rewards are assigned to an indexer.
14+
* @dev We use the Horizon prefix to change the event signature which makes network subgraph development much easier
15+
*/
16+
event HorizonRewardsAssigned(address indexed indexer, address indexed allocationID, uint256 amount);
17+
18+
/**
19+
* @dev Emitted when rewards are denied to an indexer.
20+
*/
21+
event RewardsDenied(address indexed indexer, address indexed allocationID);
22+
23+
/**
24+
* @dev Emitted when a subgraph is denied for claiming rewards.
25+
*/
26+
event RewardsDenylistUpdated(bytes32 indexed subgraphDeploymentID, uint256 sinceBlock);
27+
28+
/**
29+
* @dev Emitted when the subgraph service is set
30+
*/
31+
event SubgraphServiceSet(address indexed oldSubgraphService, address indexed newSubgraphService);
32+
733
function subgraphService() external view returns (address);
834
}

packages/interfaces/contracts/toolshed/ISubgraphServiceToolshed.sol

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@ import { IProvisionManager } from "./internal/IProvisionManager.sol";
99
import { IProvisionTracker } from "./internal/IProvisionTracker.sol";
1010
import { IDataServicePausable } from "../data-service/IDataServicePausable.sol";
1111
import { IMulticall } from "../contracts/base/IMulticall.sol";
12+
import { IAllocationManager } from "./internal/IAllocationManager.sol";
1213

1314
interface ISubgraphServiceToolshed is
1415
ISubgraphService,
16+
IAllocationManager,
1517
IOwnable,
1618
IPausable,
1719
IDataServicePausable,
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
// SPDX-License-Identifier: GPL-3.0-or-later
2+
pragma solidity 0.8.27;
3+
4+
interface IAllocationManager {
5+
// Events
6+
event AllocationCreated(
7+
address indexed indexer,
8+
address indexed allocationId,
9+
bytes32 indexed subgraphDeploymentId,
10+
uint256 tokens,
11+
uint256 currentEpoch
12+
);
13+
14+
event IndexingRewardsCollected(
15+
address indexed indexer,
16+
address indexed allocationId,
17+
bytes32 indexed subgraphDeploymentId,
18+
uint256 tokensRewards,
19+
uint256 tokensIndexerRewards,
20+
uint256 tokensDelegationRewards,
21+
bytes32 poi,
22+
bytes poiMetadata,
23+
uint256 currentEpoch
24+
);
25+
26+
event AllocationResized(
27+
address indexed indexer,
28+
address indexed allocationId,
29+
bytes32 indexed subgraphDeploymentId,
30+
uint256 newTokens,
31+
uint256 oldTokens
32+
);
33+
34+
event AllocationClosed(
35+
address indexed indexer,
36+
address indexed allocationId,
37+
bytes32 indexed subgraphDeploymentId,
38+
uint256 tokens,
39+
bool forceClosed
40+
);
41+
42+
event LegacyAllocationMigrated(
43+
address indexed indexer,
44+
address indexed allocationId,
45+
bytes32 indexed subgraphDeploymentId
46+
);
47+
48+
event MaxPOIStalenessSet(uint256 maxPOIStaleness);
49+
50+
// Errors
51+
error AllocationManagerInvalidAllocationProof(address signer, address allocationId);
52+
error AllocationManagerInvalidZeroAllocationId();
53+
error AllocationManagerAllocationClosed(address allocationId);
54+
error AllocationManagerAllocationSameSize(address allocationId, uint256 tokens);
55+
}

packages/interfaces/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@graphprotocol/interfaces",
3-
"version": "0.2.4",
3+
"version": "0.2.5",
44
"publishConfig": {
55
"access": "public"
66
},

packages/subgraph-service/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
"hardhat": "^2.22.18",
6363
"hardhat-contract-sizer": "^2.10.0",
6464
"hardhat-gas-reporter": "^1.0.8",
65-
"hardhat-graph-protocol": "workspace:^0.2.4",
65+
"hardhat-graph-protocol": "workspace:^0.2.5",
6666
"hardhat-secure-accounts": "^1.0.5",
6767
"json5": "^2.2.3",
6868
"lint-staged": "^15.2.2",

packages/toolshed/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# @graphprotocol/toolshed
22

3+
## 0.6.5
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [fbe38f9]
8+
- Updated dependencies
9+
- @graphprotocol/interfaces@0.2.5
10+
311
## 0.6.4
412

513
### Patch Changes

packages/toolshed/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@graphprotocol/toolshed",
3-
"version": "0.6.4",
3+
"version": "0.6.5",
44
"publishConfig": {
55
"access": "public"
66
},

0 commit comments

Comments
 (0)