@@ -339,7 +339,7 @@ contract GNS is Managed {
339
339
delete subgraphs[_graphAccount][_subgraphNumber];
340
340
emit SubgraphDeprecated (_graphAccount, _subgraphNumber);
341
341
342
- _disableNameSignal (_graphAccount, _subgraphNumber, subgraphDeploymentID );
342
+ _disableNameSignal (_graphAccount, _subgraphNumber);
343
343
}
344
344
345
345
/**
@@ -396,14 +396,13 @@ contract GNS is Managed {
396
396
namePool.vSignal = namePool.vSignal.sub (vSignalOld);
397
397
// Update name signals deployment ID to match the subgraphs deployment ID
398
398
namePool.subgraphDeploymentID = _newSubgraphDeploymentID;
399
-
400
399
// nSignal stays constant, but vSignal can change here
401
- uint256 vSignalNew = curation.mint (namePool.subgraphDeploymentID, (tokens + ownerFee));
402
- namePool.vSignal = vSignalNew;
400
+ namePool.vSignal = curation.mint (namePool.subgraphDeploymentID, (tokens + ownerFee));
401
+
403
402
emit NameSignalUpgrade (
404
403
_graphAccount,
405
404
_subgraphNumber,
406
- vSignalNew ,
405
+ namePool.vSignal ,
407
406
tokens + ownerFee,
408
407
_newSubgraphDeploymentID
409
408
);
@@ -457,23 +456,20 @@ contract GNS is Managed {
457
456
* contract holds the GRT from burning the vSignal, which all curators can withdraw manually.
458
457
* @param _graphAccount Account that is deprecating their name curation
459
458
* @param _subgraphNumber Subgraph number
460
- * @param _subgraphDeploymentID Subgraph deployment ID of the deprecating subgraph
461
459
*/
462
460
function _disableNameSignal (
463
461
address _graphAccount ,
464
- uint256 _subgraphNumber ,
465
- bytes32 _subgraphDeploymentID
462
+ uint256 _subgraphNumber
466
463
) private {
467
464
NameCurationPool storage namePool = nameSignals[_graphAccount][_subgraphNumber];
468
- uint256 vSignal = namePool.vSignal;
469
- namePool.vSignal = 0 ;
470
465
// If no nSignal, then no need to burn vSignal
471
466
if (namePool.nSignal != 0 ) {
472
467
(uint256 tokens , , uint256 ownerFee ) = _burnVSignal (
473
468
_graphAccount,
474
469
namePool.subgraphDeploymentID,
475
- vSignal
470
+ namePool. vSignal
476
471
);
472
+ namePool.vSignal = 0 ;
477
473
namePool.withdrawableGRT = tokens + ownerFee;
478
474
}
479
475
// Set the NameCurationPool fields to make it disabled
@@ -580,7 +576,7 @@ contract GNS is Managed {
580
576
)
581
577
{
582
578
(uint256 tokens , uint256 withdrawalFees ) = curation ().burn (_subgraphDeploymentID, _vSignal);
583
- uint256 ownerFee = _ownerFee (withdrawalFees, _graphAccount);
579
+ uint256 ownerFee = _chargeOwnerFee (withdrawalFees, _graphAccount);
584
580
return (tokens, withdrawalFees, ownerFee);
585
581
}
586
582
@@ -590,7 +586,7 @@ contract GNS is Managed {
590
586
* @param _withdrawalFees Total withdrawal fee for changing subgraphs
591
587
* @return Amount the owner must pay by transferring GRT to the GNS
592
588
*/
593
- function _ownerFee (uint256 _withdrawalFees , address _owner ) private returns (uint256 ) {
589
+ function _chargeOwnerFee (uint256 _withdrawalFees , address _owner ) private returns (uint256 ) {
594
590
if (ownerFeePercentage == 0 ) {
595
591
return 0 ;
596
592
}
0 commit comments