|
| 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 | +} |
0 commit comments