From 8ca98d3ffad2dd75e0a705ffc0cd5e798acc8058 Mon Sep 17 00:00:00 2001 From: Andrei Vlad Birgaoanu <99738872+andreivladbrg@users.noreply.github.com> Date: Mon, 2 Oct 2023 15:08:28 +0300 Subject: [PATCH] refactor: capitalize immutable variables (#700) * refactor: capitalize immutable variables in NoDelegateCall build: remove "immutable-vars-naming" from solhint file * test: make asset and holder immutable in fork tests test: capitalize constans in fork tests --- .solhint.json | 1 - src/abstracts/NoDelegateCall.sol | 8 ++++---- test/fork/Fork.t.sol | 32 ++++++++++++++++---------------- test/fork/LockupDynamic.t.sol | 32 ++++++++++++++++---------------- test/fork/LockupLinear.t.sol | 32 ++++++++++++++++---------------- test/fork/assets/DAI.t.sol | 8 ++++---- test/fork/assets/EURS.t.sol | 8 ++++---- test/fork/assets/SHIB.t.sol | 8 ++++---- test/fork/assets/USDC.t.sol | 8 ++++---- test/fork/assets/USDT.t.sol | 8 ++++---- 10 files changed, 72 insertions(+), 73 deletions(-) diff --git a/.solhint.json b/.solhint.json index 0c9d1f4a6..31a4d5b8c 100644 --- a/.solhint.json +++ b/.solhint.json @@ -7,7 +7,6 @@ "contract-name-camelcase": "off", "const-name-snakecase": "off", "custom-errors": "off", - "immutable-vars-naming": "off", "func-name-mixedcase": "off", "func-visibility": ["error", { "ignoreConstructors": true }], "max-line-length": ["error", 123], diff --git a/src/abstracts/NoDelegateCall.sol b/src/abstracts/NoDelegateCall.sol index f0684aeb2..c01be8734 100644 --- a/src/abstracts/NoDelegateCall.sol +++ b/src/abstracts/NoDelegateCall.sol @@ -7,11 +7,11 @@ import { Errors } from "../libraries/Errors.sol"; /// @notice This contract implements logic to prevent delegate calls. abstract contract NoDelegateCall { /// @dev The address of the original contract that was deployed. - address private immutable _original; + address private immutable ORIGINAL; /// @dev Sets the original contract address. constructor() { - _original = address(this); + ORIGINAL = address(this); } /// @notice Prevents delegate calls. @@ -23,11 +23,11 @@ abstract contract NoDelegateCall { /// @dev This function checks whether the current call is a delegate call, and reverts if it is. /// /// - A private function is used instead of inlining this logic in a modifier because Solidity copies modifiers into - /// every function that uses them. The `_original` address would get copied in every place the modifier is used, + /// every function that uses them. The `ORIGINAL` address would get copied in every place the modifier is used, /// which would increase the contract size. By using a function instead, we can avoid this duplication of code /// and reduce the overall size of the contract. function _preventDelegateCall() private view { - if (address(this) != _original) { + if (address(this) != ORIGINAL) { revert Errors.DelegateCall(); } } diff --git a/test/fork/Fork.t.sol b/test/fork/Fork.t.sol index 455660636..257f93aaf 100644 --- a/test/fork/Fork.t.sol +++ b/test/fork/Fork.t.sol @@ -12,8 +12,8 @@ abstract contract Fork_Test is Base_Test { CONSTANTS //////////////////////////////////////////////////////////////////////////*/ - IERC20 internal immutable asset; - address internal immutable holder; + IERC20 internal immutable ASSET; + address internal immutable HOLDER; /*////////////////////////////////////////////////////////////////////////// VARIABLES @@ -25,9 +25,9 @@ abstract contract Fork_Test is Base_Test { CONSTRUCTOR //////////////////////////////////////////////////////////////////////////*/ - constructor(IERC20 asset_, address holder_) { - asset = asset_; - holder = holder_; + constructor(IERC20 asset, address holder) { + ASSET = asset; + HOLDER = holder; } /*////////////////////////////////////////////////////////////////////////// @@ -47,11 +47,11 @@ abstract contract Fork_Test is Base_Test { // Label the contracts. labelContracts(); - // Make the asset holder the caller in this test suite. - vm.startPrank({ msgSender: holder }); + // Make the ASSET HOLDER the caller in this test suite. + vm.startPrank({ msgSender: HOLDER }); - // Query the initial balance of the asset holder. - initialHolderBalance = asset.balanceOf(holder); + // Query the initial balance of the ASSET HOLDER. + initialHolderBalance = ASSET.balanceOf(HOLDER); } /*////////////////////////////////////////////////////////////////////////// @@ -63,20 +63,20 @@ abstract contract Fork_Test is Base_Test { // The protocol does not allow the zero address to interact with it. vm.assume(sender != address(0) && recipient != address(0) && broker != address(0)); - // The goal is to not have overlapping users because the asset balance tests would fail otherwise. + // The goal is to not have overlapping users because the ASSET balance tests would fail otherwise. vm.assume(sender != recipient && sender != broker && recipient != broker); - vm.assume(sender != holder && recipient != holder && broker != holder); + vm.assume(sender != HOLDER && recipient != HOLDER && broker != HOLDER); vm.assume(sender != sablierContract && recipient != sablierContract && broker != sablierContract); // Avoid users blacklisted by USDC or USDT. - assumeNoBlacklisted(address(asset), sender); - assumeNoBlacklisted(address(asset), recipient); - assumeNoBlacklisted(address(asset), broker); + assumeNoBlacklisted(address(ASSET), sender); + assumeNoBlacklisted(address(ASSET), recipient); + assumeNoBlacklisted(address(ASSET), broker); } /// @dev Labels the most relevant contracts. function labelContracts() internal { - vm.label({ account: address(asset), newLabel: IERC20Metadata(address(asset)).symbol() }); - vm.label({ account: holder, newLabel: "Holder" }); + vm.label({ account: address(ASSET), newLabel: IERC20Metadata(address(ASSET)).symbol() }); + vm.label({ account: HOLDER, newLabel: "HOLDER" }); } } diff --git a/test/fork/LockupDynamic.t.sol b/test/fork/LockupDynamic.t.sol index 1e35c87e4..5300f05e8 100644 --- a/test/fork/LockupDynamic.t.sol +++ b/test/fork/LockupDynamic.t.sol @@ -14,7 +14,7 @@ abstract contract LockupDynamic_Fork_Test is Fork_Test { CONSTRUCTOR //////////////////////////////////////////////////////////////////////////*/ - constructor(IERC20 asset_, address holder_) Fork_Test(asset_, holder_) { } + constructor(IERC20 asset, address holder) Fork_Test(asset, holder) { } /*////////////////////////////////////////////////////////////////////////// SET-UP FUNCTION @@ -25,7 +25,7 @@ abstract contract LockupDynamic_Fork_Test is Fork_Test { // Approve {SablierV2LockupDynamic} to transfer the holder's assets. // We use a low-level call to ignore reverts because the asset can have the missing return value bug. - (bool success,) = address(asset).call(abi.encodeCall(IERC20.approve, (address(lockupDynamic), MAX_UINT256))); + (bool success,) = address(ASSET).call(abi.encodeCall(IERC20.approve, (address(lockupDynamic), MAX_UINT256))); success; } @@ -136,21 +136,21 @@ abstract contract LockupDynamic_Fork_Test is Fork_Test { // Set the fuzzed protocol fee. changePrank({ msgSender: users.admin }); - comptroller.setProtocolFee({ asset: asset, newProtocolFee: params.protocolFee }); + comptroller.setProtocolFee({ asset: ASSET, newProtocolFee: params.protocolFee }); // Make the holder the caller. - changePrank(holder); + changePrank(HOLDER); /*////////////////////////////////////////////////////////////////////////// CREATE //////////////////////////////////////////////////////////////////////////*/ // Load the pre-create protocol revenues. - vars.initialProtocolRevenues = lockupDynamic.protocolRevenues(asset); + vars.initialProtocolRevenues = lockupDynamic.protocolRevenues(ASSET); // Load the pre-create asset balances. vars.balances = - getTokenBalances(address(asset), Solarray.addresses(address(lockupDynamic), params.broker.account)); + getTokenBalances(address(ASSET), Solarray.addresses(address(lockupDynamic), params.broker.account)); vars.initialLockupDynamicBalance = vars.balances[0]; vars.initialBrokerBalance = vars.balances[1]; @@ -164,11 +164,11 @@ abstract contract LockupDynamic_Fork_Test is Fork_Test { vm.expectEmit({ emitter: address(lockupDynamic) }); emit CreateLockupDynamicStream({ streamId: vars.streamId, - funder: holder, + funder: HOLDER, sender: params.sender, recipient: params.recipient, amounts: vars.createAmounts, - asset: asset, + asset: ASSET, cancelable: true, transferable: params.transferable, segments: params.segments, @@ -179,7 +179,7 @@ abstract contract LockupDynamic_Fork_Test is Fork_Test { // Create the stream. lockupDynamic.createWithMilestones( LockupDynamic.CreateWithMilestones({ - asset: asset, + asset: ASSET, broker: params.broker, cancelable: true, transferable: params.transferable, @@ -199,7 +199,7 @@ abstract contract LockupDynamic_Fork_Test is Fork_Test { // Assert that the stream has been created. LockupDynamic.Stream memory actualStream = lockupDynamic.getStream(vars.streamId); assertEq(actualStream.amounts, Lockup.Amounts(vars.createAmounts.deposit, 0, 0)); - assertEq(actualStream.asset, asset, "asset"); + assertEq(actualStream.asset, ASSET, "asset"); assertEq(actualStream.endTime, vars.range.end, "endTime"); assertEq(actualStream.isCancelable, vars.isCancelable, "isCancelable"); assertEq(actualStream.isDepleted, false, "isDepleted"); @@ -227,7 +227,7 @@ abstract contract LockupDynamic_Fork_Test is Fork_Test { assertEq(vars.actualNextStreamId, vars.expectedNextStreamId, "post-create nextStreamId"); // Assert that the protocol fee has been recorded. - vars.actualProtocolRevenues = lockupDynamic.protocolRevenues(asset); + vars.actualProtocolRevenues = lockupDynamic.protocolRevenues(ASSET); vars.expectedProtocolRevenues = vars.initialProtocolRevenues + vars.createAmounts.protocolFee; assertEq(vars.actualProtocolRevenues, vars.expectedProtocolRevenues, "post-create protocolRevenues"); @@ -238,7 +238,7 @@ abstract contract LockupDynamic_Fork_Test is Fork_Test { // Load the post-create asset balances. vars.balances = - getTokenBalances(address(asset), Solarray.addresses(address(lockupDynamic), holder, params.broker.account)); + getTokenBalances(address(ASSET), Solarray.addresses(address(lockupDynamic), HOLDER, params.broker.account)); vars.actualLockupDynamicBalance = vars.balances[0]; vars.actualHolderBalance = vars.balances[1]; vars.actualBrokerBalance = vars.balances[2]; @@ -281,7 +281,7 @@ abstract contract LockupDynamic_Fork_Test is Fork_Test { if (params.withdrawAmount > 0) { // Load the pre-withdraw asset balances. vars.initialLockupDynamicBalance = vars.actualLockupDynamicBalance; - vars.initialRecipientBalance = asset.balanceOf(params.recipient); + vars.initialRecipientBalance = ASSET.balanceOf(params.recipient); // Expect the relevant events to be emitted. vm.expectEmit({ emitter: address(lockupDynamic) }); @@ -315,7 +315,7 @@ abstract contract LockupDynamic_Fork_Test is Fork_Test { // Load the post-withdraw asset balances. vars.balances = - getTokenBalances(address(asset), Solarray.addresses(address(lockupDynamic), params.recipient)); + getTokenBalances(address(ASSET), Solarray.addresses(address(lockupDynamic), params.recipient)); vars.actualLockupDynamicBalance = vars.balances[0]; vars.actualRecipientBalance = vars.balances[1]; @@ -340,7 +340,7 @@ abstract contract LockupDynamic_Fork_Test is Fork_Test { if (!vars.isDepleted && !vars.isSettled) { // Load the pre-cancel asset balances. vars.balances = getTokenBalances( - address(asset), Solarray.addresses(address(lockupDynamic), params.sender, params.recipient) + address(ASSET), Solarray.addresses(address(lockupDynamic), params.sender, params.recipient) ); vars.initialLockupDynamicBalance = vars.balances[0]; vars.initialSenderBalance = vars.balances[1]; @@ -367,7 +367,7 @@ abstract contract LockupDynamic_Fork_Test is Fork_Test { // Load the post-cancel asset balances. vars.balances = getTokenBalances( - address(asset), Solarray.addresses(address(lockupDynamic), params.sender, params.recipient) + address(ASSET), Solarray.addresses(address(lockupDynamic), params.sender, params.recipient) ); vars.actualLockupDynamicBalance = vars.balances[0]; vars.actualSenderBalance = vars.balances[1]; diff --git a/test/fork/LockupLinear.t.sol b/test/fork/LockupLinear.t.sol index 63c85c972..e7962d1ba 100644 --- a/test/fork/LockupLinear.t.sol +++ b/test/fork/LockupLinear.t.sol @@ -14,7 +14,7 @@ abstract contract LockupLinear_Fork_Test is Fork_Test { CONSTRUCTOR //////////////////////////////////////////////////////////////////////////*/ - constructor(IERC20 asset_, address holder_) Fork_Test(asset_, holder_) { } + constructor(IERC20 asset, address holder) Fork_Test(asset, holder) { } /*////////////////////////////////////////////////////////////////////////// SET-UP FUNCTION @@ -25,7 +25,7 @@ abstract contract LockupLinear_Fork_Test is Fork_Test { // Approve {SablierV2LockupLinear} to transfer the asset holder's assets. // We use a low-level call to ignore reverts because the asset can have the missing return value bug. - (bool success,) = address(asset).call(abi.encodeCall(IERC20.approve, (address(lockupLinear), MAX_UINT256))); + (bool success,) = address(ASSET).call(abi.encodeCall(IERC20.approve, (address(lockupLinear), MAX_UINT256))); success; } @@ -135,10 +135,10 @@ abstract contract LockupLinear_Fork_Test is Fork_Test { // Set the fuzzed protocol fee. changePrank({ msgSender: users.admin }); - comptroller.setProtocolFee({ asset: asset, newProtocolFee: params.protocolFee }); + comptroller.setProtocolFee({ asset: ASSET, newProtocolFee: params.protocolFee }); // Make the holder the caller. - changePrank(holder); + changePrank(HOLDER); /*////////////////////////////////////////////////////////////////////////// CREATE @@ -146,11 +146,11 @@ abstract contract LockupLinear_Fork_Test is Fork_Test { // Load the pre-create protocol revenues. Vars memory vars; - vars.initialProtocolRevenues = lockupLinear.protocolRevenues(asset); + vars.initialProtocolRevenues = lockupLinear.protocolRevenues(ASSET); // Load the pre-create asset balances. vars.balances = - getTokenBalances(address(asset), Solarray.addresses(address(lockupLinear), params.broker.account)); + getTokenBalances(address(ASSET), Solarray.addresses(address(lockupLinear), params.broker.account)); vars.initialLockupLinearBalance = vars.balances[0]; vars.initialBrokerBalance = vars.balances[1]; @@ -167,11 +167,11 @@ abstract contract LockupLinear_Fork_Test is Fork_Test { vm.expectEmit({ emitter: address(lockupLinear) }); emit CreateLockupLinearStream({ streamId: vars.streamId, - funder: holder, + funder: HOLDER, sender: params.sender, recipient: params.recipient, amounts: vars.createAmounts, - asset: asset, + asset: ASSET, cancelable: true, transferable: params.transferable, range: params.range, @@ -181,7 +181,7 @@ abstract contract LockupLinear_Fork_Test is Fork_Test { // Create the stream. lockupLinear.createWithRange( LockupLinear.CreateWithRange({ - asset: asset, + asset: ASSET, broker: params.broker, cancelable: true, transferable: params.transferable, @@ -195,7 +195,7 @@ abstract contract LockupLinear_Fork_Test is Fork_Test { // Assert that the stream has been created. LockupLinear.Stream memory actualStream = lockupLinear.getStream(vars.streamId); assertEq(actualStream.amounts, Lockup.Amounts(vars.createAmounts.deposit, 0, 0)); - assertEq(actualStream.asset, asset, "asset"); + assertEq(actualStream.asset, ASSET, "asset"); assertEq(actualStream.cliffTime, params.range.cliff, "cliffTime"); assertEq(actualStream.endTime, params.range.end, "endTime"); assertEq(actualStream.isCancelable, true, "isCancelable"); @@ -217,7 +217,7 @@ abstract contract LockupLinear_Fork_Test is Fork_Test { assertEq(vars.actualNextStreamId, vars.expectedNextStreamId, "post-create nextStreamId"); // Assert that the protocol fee has been recorded. - vars.actualProtocolRevenues = lockupLinear.protocolRevenues(asset); + vars.actualProtocolRevenues = lockupLinear.protocolRevenues(ASSET); vars.expectedProtocolRevenues = vars.initialProtocolRevenues + vars.createAmounts.protocolFee; assertEq(vars.actualProtocolRevenues, vars.expectedProtocolRevenues, "post-create protocolRevenues"); @@ -228,7 +228,7 @@ abstract contract LockupLinear_Fork_Test is Fork_Test { // Load the post-create asset balances. vars.balances = - getTokenBalances(address(asset), Solarray.addresses(address(lockupLinear), holder, params.broker.account)); + getTokenBalances(address(ASSET), Solarray.addresses(address(lockupLinear), HOLDER, params.broker.account)); vars.actualLockupLinearBalance = vars.balances[0]; vars.actualHolderBalance = vars.balances[1]; vars.actualBrokerBalance = vars.balances[2]; @@ -267,7 +267,7 @@ abstract contract LockupLinear_Fork_Test is Fork_Test { if (params.withdrawAmount > 0) { // Load the pre-withdraw asset balances. vars.initialLockupLinearBalance = vars.actualLockupLinearBalance; - vars.initialRecipientBalance = asset.balanceOf(params.recipient); + vars.initialRecipientBalance = ASSET.balanceOf(params.recipient); // Expect the relevant events to be emitted. vm.expectEmit({ emitter: address(lockupLinear) }); @@ -301,7 +301,7 @@ abstract contract LockupLinear_Fork_Test is Fork_Test { // Load the post-withdraw asset balances. vars.balances = - getTokenBalances(address(asset), Solarray.addresses(address(lockupLinear), params.recipient)); + getTokenBalances(address(ASSET), Solarray.addresses(address(lockupLinear), params.recipient)); vars.actualLockupLinearBalance = vars.balances[0]; vars.actualRecipientBalance = vars.balances[1]; @@ -324,7 +324,7 @@ abstract contract LockupLinear_Fork_Test is Fork_Test { if (!vars.isDepleted && !vars.isSettled) { // Load the pre-cancel asset balances. vars.balances = getTokenBalances( - address(asset), Solarray.addresses(address(lockupLinear), params.sender, params.recipient) + address(ASSET), Solarray.addresses(address(lockupLinear), params.sender, params.recipient) ); vars.initialLockupLinearBalance = vars.balances[0]; vars.initialSenderBalance = vars.balances[1]; @@ -351,7 +351,7 @@ abstract contract LockupLinear_Fork_Test is Fork_Test { // Load the post-cancel asset balances. vars.balances = getTokenBalances( - address(asset), Solarray.addresses(address(lockupLinear), params.sender, params.recipient) + address(ASSET), Solarray.addresses(address(lockupLinear), params.sender, params.recipient) ); vars.actualLockupLinearBalance = vars.balances[0]; vars.actualSenderBalance = vars.balances[1]; diff --git a/test/fork/assets/DAI.t.sol b/test/fork/assets/DAI.t.sol index 063c2cd30..3fdb579c3 100644 --- a/test/fork/assets/DAI.t.sol +++ b/test/fork/assets/DAI.t.sol @@ -7,9 +7,9 @@ import { LockupDynamic_Fork_Test } from "../LockupDynamic.t.sol"; import { LockupLinear_Fork_Test } from "../LockupLinear.t.sol"; /// @dev A typical 18-decimal ERC-20 asset with a normal total supply. -IERC20 constant asset = IERC20(0x6B175474E89094C44Da98b954EedeAC495271d0F); -address constant holder = 0x66F62574ab04989737228D18C3624f7FC1edAe14; +IERC20 constant ASSET = IERC20(0x6B175474E89094C44Da98b954EedeAC495271d0F); +address constant HOLDER = 0x66F62574ab04989737228D18C3624f7FC1edAe14; -contract DAI_LockupDynamic_Fork_Test is LockupDynamic_Fork_Test(asset, holder) { } +contract DAI_LockupDynamic_Fork_Test is LockupDynamic_Fork_Test(ASSET, HOLDER) { } -contract DAI_LockupLinear_Fork_Test is LockupLinear_Fork_Test(asset, holder) { } +contract DAI_LockupLinear_Fork_Test is LockupLinear_Fork_Test(ASSET, HOLDER) { } diff --git a/test/fork/assets/EURS.t.sol b/test/fork/assets/EURS.t.sol index 2d100155c..969daa1bc 100644 --- a/test/fork/assets/EURS.t.sol +++ b/test/fork/assets/EURS.t.sol @@ -7,9 +7,9 @@ import { LockupDynamic_Fork_Test } from "../LockupDynamic.t.sol"; import { LockupLinear_Fork_Test } from "../LockupLinear.t.sol"; /// @dev An ERC-20 asset with 2 decimals. -IERC20 constant asset = IERC20(0xdB25f211AB05b1c97D595516F45794528a807ad8); -address constant holder = 0x9712c160925403A9458BfC6bBD7D8a1E694C984a; +IERC20 constant ASSET = IERC20(0xdB25f211AB05b1c97D595516F45794528a807ad8); +address constant HOLDER = 0x9712c160925403A9458BfC6bBD7D8a1E694C984a; -contract EURS_LockupDynamic_Fork_Test is LockupDynamic_Fork_Test(asset, holder) { } +contract EURS_LockupDynamic_Fork_Test is LockupDynamic_Fork_Test(ASSET, HOLDER) { } -contract EURS_LockupLinear_Fork_Test is LockupLinear_Fork_Test(asset, holder) { } +contract EURS_LockupLinear_Fork_Test is LockupLinear_Fork_Test(ASSET, HOLDER) { } diff --git a/test/fork/assets/SHIB.t.sol b/test/fork/assets/SHIB.t.sol index 0e755b45e..e8d321a03 100644 --- a/test/fork/assets/SHIB.t.sol +++ b/test/fork/assets/SHIB.t.sol @@ -7,9 +7,9 @@ import { LockupDynamic_Fork_Test } from "../LockupDynamic.t.sol"; import { LockupLinear_Fork_Test } from "../LockupLinear.t.sol"; /// @dev An ERC-20 asset with a large total supply. -IERC20 constant asset = IERC20(0x95aD61b0a150d79219dCF64E1E6Cc01f0B64C4cE); -address constant holder = 0x73AF3bcf944a6559933396c1577B257e2054D935; +IERC20 constant ASSET = IERC20(0x95aD61b0a150d79219dCF64E1E6Cc01f0B64C4cE); +address constant HOLDER = 0x73AF3bcf944a6559933396c1577B257e2054D935; -contract SHIB_LockupDynamic_Fork_Test is LockupDynamic_Fork_Test(asset, holder) { } +contract SHIB_LockupDynamic_Fork_Test is LockupDynamic_Fork_Test(ASSET, HOLDER) { } -contract SHIB_LockupLinear_Fork_Test is LockupLinear_Fork_Test(asset, holder) { } +contract SHIB_LockupLinear_Fork_Test is LockupLinear_Fork_Test(ASSET, HOLDER) { } diff --git a/test/fork/assets/USDC.t.sol b/test/fork/assets/USDC.t.sol index 5956d558f..ea79ae380 100644 --- a/test/fork/assets/USDC.t.sol +++ b/test/fork/assets/USDC.t.sol @@ -7,9 +7,9 @@ import { LockupDynamic_Fork_Test } from "../LockupDynamic.t.sol"; import { LockupLinear_Fork_Test } from "../LockupLinear.t.sol"; /// @dev An ERC-20 asset with 6 decimals. -IERC20 constant asset = IERC20(0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48); -address constant holder = 0x09528d637deb5857dc059dddE6316D465a8b3b69; +IERC20 constant ASSET = IERC20(0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48); +address constant HOLDER = 0x09528d637deb5857dc059dddE6316D465a8b3b69; -contract USDC_LockupDynamic_Fork_Test is LockupDynamic_Fork_Test(asset, holder) { } +contract USDC_LockupDynamic_Fork_Test is LockupDynamic_Fork_Test(ASSET, HOLDER) { } -contract USDC_LockupLinear_Fork_Test is LockupLinear_Fork_Test(asset, holder) { } +contract USDC_LockupLinear_Fork_Test is LockupLinear_Fork_Test(ASSET, HOLDER) { } diff --git a/test/fork/assets/USDT.t.sol b/test/fork/assets/USDT.t.sol index 93f78ae2d..421144ca1 100644 --- a/test/fork/assets/USDT.t.sol +++ b/test/fork/assets/USDT.t.sol @@ -7,9 +7,9 @@ import { LockupDynamic_Fork_Test } from "../LockupDynamic.t.sol"; import { LockupLinear_Fork_Test } from "../LockupLinear.t.sol"; /// @dev An ERC-20 asset that suffers from the missing return value bug. -IERC20 constant asset = IERC20(0xdAC17F958D2ee523a2206206994597C13D831ec7); -address constant holder = 0xee5B5B923fFcE93A870B3104b7CA09c3db80047A; +IERC20 constant ASSET = IERC20(0xdAC17F958D2ee523a2206206994597C13D831ec7); +address constant HOLDER = 0xee5B5B923fFcE93A870B3104b7CA09c3db80047A; -contract USDT_LockupDynamic_Fork_Test is LockupDynamic_Fork_Test(asset, holder) { } +contract USDT_LockupDynamic_Fork_Test is LockupDynamic_Fork_Test(ASSET, HOLDER) { } -contract USDT_LockupLinear_Fork_Test is LockupLinear_Fork_Test(asset, holder) { } +contract USDT_LockupLinear_Fork_Test is LockupLinear_Fork_Test(ASSET, HOLDER) { }