Skip to content

Commit

Permalink
Revert immutable variable name case
Browse files Browse the repository at this point in the history
  • Loading branch information
boyuanx committed Nov 7, 2023
1 parent 61b4da4 commit 72fb88e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 18 deletions.
3 changes: 2 additions & 1 deletion .solhint.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"not-rely-on-time": "off",
"compiler-version": "off",
"no-empty-blocks": "off",
"func-name-mixedcase": "off"
"func-name-mixedcase": "off",
"immutable-vars-naming": "off"
}
}
14 changes: 6 additions & 8 deletions contracts/proxy/TTUDeployerLite.sol
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,11 @@ contract TTUDeployerLite is ITTUDeployer, Ownable {
ITTTrackerTokenV2 trackerToken;
if (disableAutoUpgrade) {
futureToken = ITTFutureTokenV2(
Clones.clone(
beaconManager.FUTURETOKEN_BEACON().implementation()
)
Clones.clone(beaconManager.futureTokenBeacon().implementation())
);
futureToken.initialize(projectToken, allowTransferableFT);
unlocker = ITokenTableUnlockerV2(
Clones.clone(beaconManager.UNLOCKER_BEACON().implementation())
Clones.clone(beaconManager.unlockerBeacon().implementation())
);
unlocker.initialize(
projectToken,
Expand All @@ -62,15 +60,15 @@ contract TTUDeployerLite is ITTUDeployer, Ownable {
);
trackerToken = ITTTrackerTokenV2(
Clones.clone(
beaconManager.TRACKERTOKEN_BEACON().implementation()
beaconManager.trackerTokenBeacon().implementation()
)
);
trackerToken.initialize(address(unlocker));
} else {
futureToken = ITTFutureTokenV2(
address(
new BeaconProxy(
address(beaconManager.FUTURETOKEN_BEACON()),
address(beaconManager.futureTokenBeacon()),
abi.encodeWithSelector(
ITTFutureTokenV2.initialize.selector,
projectToken,
Expand All @@ -82,7 +80,7 @@ contract TTUDeployerLite is ITTUDeployer, Ownable {
unlocker = ITokenTableUnlockerV2(
address(
new BeaconProxy(
address(beaconManager.UNLOCKER_BEACON()),
address(beaconManager.unlockerBeacon()),
abi.encodeWithSelector(
ITokenTableUnlockerV2.initialize.selector,
projectToken,
Expand All @@ -95,7 +93,7 @@ contract TTUDeployerLite is ITTUDeployer, Ownable {
trackerToken = ITTTrackerTokenV2(
address(
new BeaconProxy(
address(beaconManager.TRACKERTOKEN_BEACON()),
address(beaconManager.trackerTokenBeacon()),
abi.encodeWithSelector(
ITTTrackerTokenV2.initialize.selector,
address(unlocker)
Expand Down
18 changes: 9 additions & 9 deletions contracts/proxy/TTUV2BeaconManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,29 @@ import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
* This contract should be deployed using TTUDeployer.
*/
contract TTUV2BeaconManager is Ownable {
UpgradeableBeacon public immutable UNLOCKER_BEACON;
UpgradeableBeacon public immutable FUTURETOKEN_BEACON;
UpgradeableBeacon public immutable TRACKERTOKEN_BEACON;
UpgradeableBeacon public immutable unlockerBeacon;
UpgradeableBeacon public immutable futureTokenBeacon;
UpgradeableBeacon public immutable trackerTokenBeacon;

constructor(
address unlockerImpl,
address futureTokenImpl,
address trackerTokenImpl
) {
UNLOCKER_BEACON = new UpgradeableBeacon(unlockerImpl);
FUTURETOKEN_BEACON = new UpgradeableBeacon(futureTokenImpl);
TRACKERTOKEN_BEACON = new UpgradeableBeacon(trackerTokenImpl);
unlockerBeacon = new UpgradeableBeacon(unlockerImpl);
futureTokenBeacon = new UpgradeableBeacon(futureTokenImpl);
trackerTokenBeacon = new UpgradeableBeacon(trackerTokenImpl);
}

function upgradeUnlocker(address newImpl) external onlyOwner {
UNLOCKER_BEACON.upgradeTo(newImpl);
unlockerBeacon.upgradeTo(newImpl);
}

function upgradeFutureToken(address newImpl) external onlyOwner {
FUTURETOKEN_BEACON.upgradeTo(newImpl);
futureTokenBeacon.upgradeTo(newImpl);
}

function upgradePreviewToken(address newImpl) external onlyOwner {
TRACKERTOKEN_BEACON.upgradeTo(newImpl);
trackerTokenBeacon.upgradeTo(newImpl);
}
}

0 comments on commit 72fb88e

Please sign in to comment.