@@ -163,7 +163,14 @@ contract Curation is CurationV1Storage, GraphUpgradeable {
163
163
emit ParameterUpdated ("curationTaxPercentage " );
164
164
}
165
165
166
- // TODO: add public version of this
166
+ /**
167
+ * @dev Set the master copy to use as clones for the curation token.
168
+ * @param _curationTokenMaster Address of implementation contract to use for curation tokens
169
+ */
170
+ function setCurationTokenMaster (address _curationTokenMaster ) external override onlyGovernor {
171
+ _setCurationTokenMaster (_curationTokenMaster);
172
+ }
173
+
167
174
/**
168
175
* @dev Internal: Set the master copy to use as clones for the curation token.
169
176
* @param _curationTokenMaster Address of implementation contract to use for curation tokens
@@ -226,11 +233,9 @@ contract Curation is CurationV1Storage, GraphUpgradeable {
226
233
227
234
// If it hasn't been curated before then initialize the curve
228
235
if (! isCurated (_subgraphDeploymentID)) {
229
- // Initialize
230
236
curationPool.reserveRatio = defaultReserveRatio;
231
237
232
238
// If no signal token for the pool - create one
233
- // TODO: review if we can avoid re-deploying if was previously created
234
239
if (address (curationPool.gcs) == address (0 )) {
235
240
// Use a minimal proxy to reduce gas cost
236
241
IGraphCurationToken gcs = IGraphCurationToken (Clones.clone (curationTokenMaster));
@@ -295,9 +300,11 @@ contract Curation is CurationV1Storage, GraphUpgradeable {
295
300
curationPool.tokens = curationPool.tokens.sub (tokensOut);
296
301
curationPool.gcs.burnFrom (curator, _signalIn);
297
302
298
- // If all signal burnt delete the curation pool
303
+ // If all signal burnt delete the curation pool except for the
304
+ // curation token contract to avoid recreating it on a new mint
299
305
if (getCurationPoolSignal (_subgraphDeploymentID) == 0 ) {
300
- delete pools[_subgraphDeploymentID];
306
+ curationPool.tokens = 0 ;
307
+ curationPool.reserveRatio = 0 ;
301
308
}
302
309
303
310
// Return the tokens to the curator
0 commit comments