Skip to content

Commit 010277e

Browse files
authored
Merge pull request #1106 from graphprotocol/tmigone/graph-tally
2 parents d0060b1 + 94d541a commit 010277e

File tree

31 files changed

+399
-394
lines changed

31 files changed

+399
-394
lines changed

packages/hardhat-graph-protocol/src/sdk/deployments/horizon/contracts.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ import type {
1010
} from '@graphprotocol/contracts'
1111
import type {
1212
GraphPayments,
13+
GraphTallyCollector,
1314
HorizonStaking,
1415
PaymentsEscrow,
15-
TAPCollector,
1616
} from '@graphprotocol/horizon'
1717
import type { ContractList } from '../../lib/contract'
1818

@@ -29,7 +29,7 @@ export const GraphHorizonContractNameList = [
2929
'HorizonStaking',
3030
'GraphPayments',
3131
'PaymentsEscrow',
32-
'TAPCollector',
32+
'GraphTallyCollector',
3333
] as const
3434

3535
const root = path.resolve(__dirname, '../../../../..') // hardhat-graph-protocol root
@@ -49,7 +49,7 @@ export const GraphHorizonArtifactsMap = {
4949
HorizonStaking: HORIZON_ARTIFACTS_PATH,
5050
GraphPayments: HORIZON_ARTIFACTS_PATH,
5151
PaymentsEscrow: HORIZON_ARTIFACTS_PATH,
52-
TAPCollector: HORIZON_ARTIFACTS_PATH,
52+
GraphTallyCollector: HORIZON_ARTIFACTS_PATH,
5353
} as const
5454

5555
export interface GraphHorizonContracts extends ContractList<GraphHorizonContractName> {
@@ -65,7 +65,7 @@ export interface GraphHorizonContracts extends ContractList<GraphHorizonContract
6565
HorizonStaking: HorizonStaking
6666
GraphPayments: GraphPayments
6767
PaymentsEscrow: PaymentsEscrow
68-
TAPCollector: TAPCollector
68+
GraphTallyCollector: GraphTallyCollector
6969

7070
// Aliases
7171
GraphToken: L2GraphToken

packages/hardhat-graph-protocol/test/fixtures/files/addresses-arbsep.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"PaymentsEscrow": {
1010
"address": "0x09B985a2042848A08bA59060EaF0f07c6F5D4d54"
1111
},
12-
"TAPCollector": {
12+
"GraphTallyCollector": {
1313
"address": "0xacC71844EF6beEF70106ABe6E51013189A1f3738"
1414
},
1515
"GraphProxyAdmin": {

packages/horizon/contracts/interfaces/ITAPCollector.sol renamed to packages/horizon/contracts/interfaces/IGraphTallyCollector.sol

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ import { IPaymentsCollector } from "./IPaymentsCollector.sol";
55
import { IGraphPayments } from "./IGraphPayments.sol";
66

77
/**
8-
* @title Interface for the {TAPCollector} contract
8+
* @title Interface for the {GraphTallyCollector} contract
99
* @dev Implements the {IPaymentCollector} interface as defined by the Graph
1010
* Horizon payments protocol.
1111
* @notice Implements a payments collector contract that can be used to collect
12-
* payments using a TAP RAV (Receipt Aggregate Voucher).
12+
* payments using a GraphTally RAV (Receipt Aggregate Voucher).
1313
*/
14-
interface ITAPCollector is IPaymentsCollector {
14+
interface IGraphTallyCollector is IPaymentsCollector {
1515
/// @notice Details for a payer-signer pair
1616
/// @dev Signers can be removed only after a thawing period
1717
struct PayerAuthorization {
@@ -33,7 +33,7 @@ interface ITAPCollector is IPaymentsCollector {
3333
address serviceProvider;
3434
// The address of the data service the RAV was issued to
3535
address dataService;
36-
// The RAV timestamp, indicating the latest TAP Receipt in the RAV
36+
// The RAV timestamp, indicating the latest GraphTally Receipt in the RAV
3737
uint64 timestampNs;
3838
// Total amount owed to the service provider since the beginning of the
3939
// payer-service provider relationship, including all debt that is already paid for.
@@ -107,92 +107,92 @@ interface ITAPCollector is IPaymentsCollector {
107107
* @param authorizingPayer The address of the payer authorizing the signer
108108
* @param signer The address of the signer
109109
*/
110-
error TAPCollectorSignerAlreadyAuthorized(address authorizingPayer, address signer);
110+
error GraphTallyCollectorSignerAlreadyAuthorized(address authorizingPayer, address signer);
111111

112112
/**
113113
* Thrown when the signer proof deadline is invalid
114114
* @param proofDeadline The deadline for the proof provided by the signer
115115
* @param currentTimestamp The current timestamp
116116
*/
117-
error TAPCollectorInvalidSignerProofDeadline(uint256 proofDeadline, uint256 currentTimestamp);
117+
error GraphTallyCollectorInvalidSignerProofDeadline(uint256 proofDeadline, uint256 currentTimestamp);
118118

119119
/**
120120
* Thrown when the signer proof is invalid
121121
*/
122-
error TAPCollectorInvalidSignerProof();
122+
error GraphTallyCollectorInvalidSignerProof();
123123

124124
/**
125125
* Thrown when the signer is not authorized by the payer
126126
* @param payer The address of the payer
127127
* @param signer The address of the signer
128128
*/
129-
error TAPCollectorSignerNotAuthorizedByPayer(address payer, address signer);
129+
error GraphTallyCollectorSignerNotAuthorizedByPayer(address payer, address signer);
130130

131131
/**
132132
* Thrown when the attempting to revoke a signer that was already revoked
133133
* @param signer The address of the signer
134134
*/
135-
error TAPCollectorAuthorizationAlreadyRevoked(address payer, address signer);
135+
error GraphTallyCollectorAuthorizationAlreadyRevoked(address payer, address signer);
136136

137137
/**
138138
* Thrown when attempting to thaw a signer that is already thawing
139139
* @param signer The address of the signer
140140
* @param thawEndTimestamp The timestamp at which the thawing period ends
141141
*/
142-
error TAPCollectorSignerAlreadyThawing(address signer, uint256 thawEndTimestamp);
142+
error GraphTallyCollectorSignerAlreadyThawing(address signer, uint256 thawEndTimestamp);
143143

144144
/**
145145
* Thrown when the signer is not thawing
146146
* @param signer The address of the signer
147147
*/
148-
error TAPCollectorSignerNotThawing(address signer);
148+
error GraphTallyCollectorSignerNotThawing(address signer);
149149

150150
/**
151151
* Thrown when the signer is still thawing
152152
* @param currentTimestamp The current timestamp
153153
* @param thawEndTimestamp The timestamp at which the thawing period ends
154154
*/
155-
error TAPCollectorSignerStillThawing(uint256 currentTimestamp, uint256 thawEndTimestamp);
155+
error GraphTallyCollectorSignerStillThawing(uint256 currentTimestamp, uint256 thawEndTimestamp);
156156

157157
/**
158158
* Thrown when the RAV signer is invalid
159159
*/
160-
error TAPCollectorInvalidRAVSigner();
160+
error GraphTallyCollectorInvalidRAVSigner();
161161

162162
/**
163163
* Thrown when the RAV payer does not match the signers authorized payer
164164
* @param authorizedPayer The address of the authorized payer
165165
* @param ravPayer The address of the RAV payer
166166
*/
167-
error TAPCollectorInvalidRAVPayer(address authorizedPayer, address ravPayer);
167+
error GraphTallyCollectorInvalidRAVPayer(address authorizedPayer, address ravPayer);
168168

169169
/**
170170
* Thrown when the RAV is for a data service the service provider has no provision for
171171
* @param dataService The address of the data service
172172
*/
173-
error TAPCollectorUnauthorizedDataService(address dataService);
173+
error GraphTallyCollectorUnauthorizedDataService(address dataService);
174174

175175
/**
176176
* Thrown when the caller is not the data service the RAV was issued to
177177
* @param caller The address of the caller
178178
* @param dataService The address of the data service
179179
*/
180-
error TAPCollectorCallerNotDataService(address caller, address dataService);
180+
error GraphTallyCollectorCallerNotDataService(address caller, address dataService);
181181

182182
/**
183183
* @notice Thrown when the tokens collected are inconsistent with the collection history
184184
* Each RAV should have a value greater than the previous one
185185
* @param tokens The amount of tokens in the RAV
186186
* @param tokensCollected The amount of tokens already collected
187187
*/
188-
error TAPCollectorInconsistentRAVTokens(uint256 tokens, uint256 tokensCollected);
188+
error GraphTallyCollectorInconsistentRAVTokens(uint256 tokens, uint256 tokensCollected);
189189

190190
/**
191191
* Thrown when the attempting to collect more tokens than what it's owed
192192
* @param tokensToCollect The amount of tokens to collect
193193
* @param maxTokensToCollect The maximum amount of tokens to collect
194194
*/
195-
error TAPCollectorInvalidTokensToCollectAmount(uint256 tokensToCollect, uint256 maxTokensToCollect);
195+
error GraphTallyCollectorInvalidTokensToCollectAmount(uint256 tokensToCollect, uint256 maxTokensToCollect);
196196

197197
/**
198198
* @notice Authorize a signer to sign on behalf of the payer.

0 commit comments

Comments
 (0)