Skip to content

Commit 6f27360

Browse files
committed
fix: standardize on format for deprecated variables
1 parent 190e625 commit 6f27360

File tree

11 files changed

+20
-20
lines changed

11 files changed

+20
-20
lines changed

contracts/discovery/GNS.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ abstract contract GNS is GNSV3Storage, GraphUpgradeable, IGNS, Multicall {
257257
uint256 subgraphID = _nextSubgraphID(subgraphOwner);
258258
SubgraphData storage subgraphData = _getSubgraphData(subgraphID);
259259
subgraphData.subgraphDeploymentID = _subgraphDeploymentID;
260-
subgraphData.reserveRatioDeprecated = fixedReserveRatio;
260+
subgraphData.__DEPRECATED_reserveRatio = fixedReserveRatio;
261261

262262
// Mint the NFT. Use the subgraphID as tokenID.
263263
// This function will check the if tokenID already exists.
@@ -371,7 +371,7 @@ abstract contract GNS is GNSV3Storage, GraphUpgradeable, IGNS, Multicall {
371371
// Deprecate the subgraph and do cleanup
372372
subgraphData.disabled = true;
373373
subgraphData.vSignal = 0;
374-
subgraphData.reserveRatioDeprecated = 0;
374+
subgraphData.__DEPRECATED_reserveRatio = 0;
375375
// NOTE: We don't reset the following variable as we use it to test if the Subgraph was ever created
376376
// subgraphData.subgraphDeploymentID = 0;
377377

contracts/discovery/IGNS.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ interface IGNS {
1818
uint256 nSignal; // The token of the subgraph bonding curve
1919
mapping(address => uint256) curatorNSignal;
2020
bytes32 subgraphDeploymentID;
21-
uint32 reserveRatioDeprecated; // Ratio for the bonding curve, always 1 in PPM, deprecated.
21+
uint32 __DEPRECATED_reserveRatio; // solhint-disable-line var-name-mixedcase
2222
bool disabled;
2323
uint256 withdrawableGRT;
2424
}

contracts/discovery/L1GNS.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ contract L1GNS is GNS, L1GNSV1Storage {
107107
extraData
108108
);
109109

110-
subgraphData.reserveRatioDeprecated = 0;
110+
subgraphData.__DEPRECATED_reserveRatio = 0;
111111
_burnNFT(_subgraphID);
112112
emit SubgraphSentToL2(_subgraphID, msg.sender, _l2Owner, tokensForL2);
113113
}

contracts/l2/discovery/L2GNS.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ contract L2GNS is GNS, L2GNSV1Storage, IL2GNS {
244244
SubgraphData storage subgraphData = _getSubgraphData(l2SubgraphID);
245245
IL2GNS.SubgraphL2TransferData storage transferData = subgraphL2TransferData[l2SubgraphID];
246246

247-
subgraphData.reserveRatioDeprecated = fixedReserveRatio;
247+
subgraphData.__DEPRECATED_reserveRatio = fixedReserveRatio;
248248
// The subgraph will be disabled until finishSubgraphTransferFromL1 is called
249249
subgraphData.disabled = true;
250250

contracts/rewards/RewardsManagerStorage.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import "../governance/Managed.sol";
88
contract RewardsManagerV1Storage is Managed {
99
// -- State --
1010

11-
uint256 private issuanceRateDeprecated;
11+
uint256 private __DEPRECATED_issuanceRate; // solhint-disable-line var-name-mixedcase
1212
uint256 public accRewardsPerSignal;
1313
uint256 public accRewardsPerSignalLastBlockUpdated;
1414

@@ -29,7 +29,7 @@ contract RewardsManagerV2Storage is RewardsManagerV1Storage {
2929

3030
contract RewardsManagerV3Storage is RewardsManagerV2Storage {
3131
// Snapshot of the total supply of GRT when accRewardsPerSignal was last updated
32-
uint256 private tokenSupplySnapshotDeprecated;
32+
uint256 private __DEPRECATED_tokenSupplySnapshot; // solhint-disable-line var-name-mixedcase
3333
}
3434

3535
contract RewardsManagerV4Storage is RewardsManagerV3Storage {

contracts/staking/IStakingBase.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ interface IStakingBase is IStakingData {
9090
address indexed indexer,
9191
uint32 indexingRewardCut,
9292
uint32 queryFeeCut,
93-
uint32 cooldownBlocksDeprecated
93+
uint32 __DEPRECATED_cooldownBlocks // solhint-disable-line var-name-mixedcase
9494
);
9595

9696
/**

contracts/staking/IStakingData.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ interface IStakingData {
1818
uint256 createdAtEpoch; // Epoch when it was created
1919
uint256 closedAtEpoch; // Epoch when it was closed
2020
uint256 collectedFees; // Collected fees for the allocation
21-
uint256 __DEPRECATED_effectiveAllocation; // Effective allocation when closed
21+
uint256 __DEPRECATED_effectiveAllocation; // solhint-disable-line var-name-mixedcase
2222
uint256 accRewardsPerAllocatedToken; // Snapshot used for reward calc
2323
uint256 distributedRebates; // Collected rebates that have been rebated
2424
}
@@ -29,7 +29,7 @@ interface IStakingData {
2929
* @dev Delegation pool information. One per indexer.
3030
*/
3131
struct DelegationPool {
32-
uint32 cooldownBlocksDeprecated; // Blocks to wait before updating parameters (deprecated)
32+
uint32 __DEPRECATED_cooldownBlocks; // solhint-disable-line var-name-mixedcase
3333
uint32 indexingRewardCut; // in PPM
3434
uint32 queryFeeCut; // in PPM
3535
uint256 updatedAtBlock; // Block when the pool was last updated

contracts/staking/IStakingExtension.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ interface IStakingExtension is IStakingData {
2020
* the original DelegationPool in IStakingData.sol contains a nested mapping.
2121
*/
2222
struct DelegationPoolReturn {
23-
uint32 cooldownBlocksDeprecated; // Blocks to wait before updating parameters (deprecated)
23+
uint32 __DEPRECATED_cooldownBlocks; // solhint-disable-line var-name-mixedcase
2424
uint32 indexingRewardCut; // in PPM
2525
uint32 queryFeeCut; // in PPM
2626
uint256 updatedAtBlock; // Block when the pool was last updated

contracts/staking/StakingStorage.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ contract StakingV1Storage is Managed {
3232
uint32 internal __protocolPercentage;
3333

3434
/// @dev Period for allocation to be finalized
35-
uint32 private __DEPRECATED_channelDisputeEpochs;
35+
uint32 private __DEPRECATED_channelDisputeEpochs; // solhint-disable-line var-name-mixedcase
3636

3737
/// @dev Maximum allocation time
3838
uint32 internal __maxAllocationEpochs;
@@ -55,7 +55,7 @@ contract StakingV1Storage is Managed {
5555
mapping(bytes32 => uint256) internal __subgraphAllocations;
5656

5757
// Rebate pools : epoch => Pool
58-
mapping(uint256 => uint256) private __DEPRECATED_rebates;
58+
mapping(uint256 => uint256) private __DEPRECATED_rebates; // solhint-disable-line var-name-mixedcase
5959

6060
// -- Slashing --
6161

@@ -70,7 +70,7 @@ contract StakingV1Storage is Managed {
7070
uint32 internal __delegationRatio;
7171

7272
/// @dev Time in blocks an indexer needs to wait to change delegation parameters (deprecated)
73-
uint32 internal __DEPRECATED_delegationParametersCooldown;
73+
uint32 internal __DEPRECATED_delegationParametersCooldown; // solhint-disable-line var-name-mixedcase
7474

7575
/// @dev Time in epochs a delegator needs to wait to withdraw delegated stake
7676
uint32 internal __delegationUnbondingPeriod; // in epochs

test/l2/l2GNS.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ describe('L2GNS', () => {
294294
expect(subgraphData.vSignal).eq(0)
295295
expect(subgraphData.nSignal).eq(0)
296296
expect(subgraphData.subgraphDeploymentID).eq(HashZero)
297-
expect(subgraphData.reserveRatioDeprecated).eq(DEFAULT_RESERVE_RATIO)
297+
expect(subgraphData.__DEPRECATED_reserveRatio).eq(DEFAULT_RESERVE_RATIO)
298298
expect(subgraphData.disabled).eq(true)
299299
expect(subgraphData.withdrawableGRT).eq(0) // Important so that it's not the same as a deprecated subgraph!
300300

@@ -334,7 +334,7 @@ describe('L2GNS', () => {
334334
expect(subgraphData.vSignal).eq(0)
335335
expect(subgraphData.nSignal).eq(0)
336336
expect(subgraphData.subgraphDeploymentID).eq(HashZero)
337-
expect(subgraphData.reserveRatioDeprecated).eq(DEFAULT_RESERVE_RATIO)
337+
expect(subgraphData.__DEPRECATED_reserveRatio).eq(DEFAULT_RESERVE_RATIO)
338338
expect(subgraphData.disabled).eq(true)
339339
expect(subgraphData.withdrawableGRT).eq(0) // Important so that it's not the same as a deprecated subgraph!
340340

@@ -345,7 +345,7 @@ describe('L2GNS', () => {
345345
expect(l2SubgraphData.vSignal).eq(0)
346346
expect(l2SubgraphData.nSignal).eq(0)
347347
expect(l2SubgraphData.subgraphDeploymentID).eq(l2Subgraph.subgraphDeploymentID)
348-
expect(l2SubgraphData.reserveRatioDeprecated).eq(DEFAULT_RESERVE_RATIO)
348+
expect(l2SubgraphData.__DEPRECATED_reserveRatio).eq(DEFAULT_RESERVE_RATIO)
349349
expect(l2SubgraphData.disabled).eq(false)
350350
expect(l2SubgraphData.withdrawableGRT).eq(0)
351351
})

0 commit comments

Comments
 (0)