diff --git a/.gas-snapshot b/.gas-snapshot index d44f0f21..97828581 100644 --- a/.gas-snapshot +++ b/.gas-snapshot @@ -1,33 +1,33 @@ -Claim_Integration_Test:test_Claim() (gas: 278831) -Claim_Integration_Test:test_RevertGiven_AlreadyClaimed() (gas: 266771) -Claim_Integration_Test:test_RevertGiven_CampaignExpired() (gas: 17765) -Claim_Integration_Test:test_RevertGiven_ProtocolFeeNotZero() (gas: 84689) -Clawback_Integration_Test:testFuzz_Clawback(address) (runs: 20, μ: 316927, ~: 316927) -Clawback_Integration_Test:testFuzz_Clawback_CampaignNotExpired(address) (runs: 20, μ: 88771, ~: 88771) -Clawback_Integration_Test:test_Clawback() (gas: 272109) -Clawback_Integration_Test:test_RevertGiven_CampaignNotExpired() (gas: 30440) -Constructor_MerkleStreamerLL_Integration_Test:test_Constructor() (gas: 1219550) -CreateMerkleStreamerLL_Integration_Test:testFuzz_CreateMerkleStreamerLL(address,uint40) (runs: 20, μ: 1139893, ~: 1139893) -CreateMerkleStreamerLL_Integration_Test:test_RevertGiven_AlreadyDeployed() (gas: 8937393460516730625) -CreateWithDeltas_Integration_Test:test_BatchCreateWithDeltas() (gas: 2070549) -CreateWithDurations_Integration_Test:test_BatchCreateWithDurations() (gas: 1334021) -CreateWithMilestones_Integration_Test:test_BatchCreateWithMilestones() (gas: 2063959) -CreateWithRange_Integration_Test:test_CreateWithRange() (gas: 1336190) -HasClaimed_Integration_Test:test_HasClaimed() (gas: 251894) -HasClaimed_Integration_Test:test_HasClaimed_IndexNotInTree() (gas: 8011) -HasClaimed_Integration_Test:test_HasClaimed_NotClaimed() (gas: 13268) -HasExpired_Integration_Test:test_HasExpired_ExpirationEqualToCurrentTime() (gas: 13971) -HasExpired_Integration_Test:test_HasExpired_ExpirationGreaterThanCurrentTime() (gas: 14065) -HasExpired_Integration_Test:test_HasExpired_ExpirationLessThanCurrentTime() (gas: 5760) -HasExpired_Integration_Test:test_HasExpired_ExpirationZero() (gas: 1081876) +Claim_Integration_Test:test_Claim() (gas: 278641) +Claim_Integration_Test:test_RevertGiven_AlreadyClaimed() (gas: 266327) +Claim_Integration_Test:test_RevertGiven_CampaignExpired() (gas: 17745) +Claim_Integration_Test:test_RevertGiven_ProtocolFeeNotZero() (gas: 84510) +Clawback_Integration_Test:testFuzz_Clawback(address) (runs: 20, μ: 316725, ~: 316725) +Clawback_Integration_Test:testFuzz_Clawback_CampaignNotExpired(address) (runs: 20, μ: 88746, ~: 88746) +Clawback_Integration_Test:test_Clawback() (gas: 271907) +Clawback_Integration_Test:test_RevertGiven_CampaignNotExpired() (gas: 30429) +Constructor_MerkleStreamerLL_Integration_Test:test_Constructor() (gas: 1198502) +CreateMerkleStreamerLL_Integration_Test:testFuzz_CreateMerkleStreamerLL(address,uint40) (runs: 20, μ: 1126334, ~: 1126334) +CreateMerkleStreamerLL_Integration_Test:test_RevertGiven_AlreadyDeployed() (gas: 8937393460516730624) +CreateWithDeltas_Integration_Test:test_BatchCreateWithDeltas() (gas: 2070068) +CreateWithDurations_Integration_Test:test_BatchCreateWithDurations() (gas: 1333914) +CreateWithMilestones_Integration_Test:test_BatchCreateWithMilestones() (gas: 2063258) +CreateWithRange_Integration_Test:test_CreateWithRange() (gas: 1336083) +HasClaimed_Integration_Test:test_HasClaimed() (gas: 251704) +HasClaimed_Integration_Test:test_HasClaimed_IndexNotInTree() (gas: 7997) +HasClaimed_Integration_Test:test_HasClaimed_NotClaimed() (gas: 13254) +HasExpired_Integration_Test:test_HasExpired_ExpirationEqualToCurrentTime() (gas: 13957) +HasExpired_Integration_Test:test_HasExpired_ExpirationGreaterThanCurrentTime() (gas: 14051) +HasExpired_Integration_Test:test_HasExpired_ExpirationLessThanCurrentTime() (gas: 5746) +HasExpired_Integration_Test:test_HasExpired_ExpirationZero() (gas: 1068623) MerkleBuilder_Test:testFuzz_ComputeLeaf(uint256,address,uint128) (runs: 20, μ: 1176, ~: 1176) -MerkleBuilder_Test:testFuzz_ComputeLeaves((uint256,address,uint128)[]) (runs: 20, μ: 353773, ~: 397124) -Precompiles_Test:test_DeployBatch() (gas: 2794484) -Precompiles_Test:test_DeployMerkleStreamerFactory() (gas: 3124723) -Precompiles_Test:test_DeployPeriphery() (gas: 5913539) -USDC_CreateWithMilestones_Batch_Fork_Test:testForkFuzz_CreateWithMilestones((uint128,address,address,uint128,uint40,(uint128,uint64,uint40)[])) (runs: 20, μ: 34894028, ~: 21953046) -USDC_CreateWithRange_Batch_Fork_Test:testForkFuzz_CreateWithRange((uint128,(uint40,uint40,uint40),address,address,uint128)) (runs: 20, μ: 1223264, ~: 1038250) -USDC_MerkleStreamerLL_Fork_Test:testForkFuzz_MerkleStreamerLL((address,uint40,(uint256,uint256,uint128)[],uint256)) (runs: 20, μ: 4359652, ~: 3909187) -USDT_CreateWithMilestones_Batch_Fork_Test:testForkFuzz_CreateWithMilestones((uint128,address,address,uint128,uint40,(uint128,uint64,uint40)[])) (runs: 20, μ: 34894028, ~: 21953046) -USDT_CreateWithRange_Batch_Fork_Test:testForkFuzz_CreateWithRange((uint128,(uint40,uint40,uint40),address,address,uint128)) (runs: 20, μ: 1223264, ~: 1038250) -USDT_MerkleStreamerLL_Fork_Test:testForkFuzz_MerkleStreamerLL((address,uint40,(uint256,uint256,uint128)[],uint256)) (runs: 20, μ: 4359652, ~: 3909187) \ No newline at end of file +MerkleBuilder_Test:testFuzz_ComputeLeaves((uint256,address,uint128)[]) (runs: 20, μ: 328702, ~: 368679) +Precompiles_Test:test_DeployBatch() (gas: 2794084) +Precompiles_Test:test_DeployMerkleStreamerFactory() (gas: 3098051) +Precompiles_Test:test_DeployPeriphery() (gas: 5886439) +USDC_CreateWithMilestones_Batch_Fork_Test:testForkFuzz_CreateWithMilestones((uint128,address,address,uint128,uint40,(uint128,uint64,uint40)[])) (runs: 20, μ: 35758280, ~: 21718385) +USDC_CreateWithRange_Batch_Fork_Test:testForkFuzz_CreateWithRange((uint128,(uint40,uint40,uint40),address,address,uint128)) (runs: 20, μ: 1353143, ~: 1508161) +USDC_MerkleStreamerLL_Fork_Test:testForkFuzz_MerkleStreamerLL((address,uint40,(uint256,uint256,uint128)[],uint256)) (runs: 20, μ: 4504409, ~: 3860802) +USDT_CreateWithMilestones_Batch_Fork_Test:testForkFuzz_CreateWithMilestones((uint128,address,address,uint128,uint40,(uint128,uint64,uint40)[])) (runs: 20, μ: 35758280, ~: 21718385) +USDT_CreateWithRange_Batch_Fork_Test:testForkFuzz_CreateWithRange((uint128,(uint40,uint40,uint40),address,address,uint128)) (runs: 20, μ: 1353143, ~: 1508161) +USDT_MerkleStreamerLL_Fork_Test:testForkFuzz_MerkleStreamerLL((address,uint40,(uint256,uint256,uint128)[],uint256)) (runs: 20, μ: 4504409, ~: 3860802) \ No newline at end of file diff --git a/.github/workflows/multibuild.yml b/.github/workflows/multibuild.yml index 43d2a1e6..2fb76465 100644 --- a/.github/workflows/multibuild.yml +++ b/.github/workflows/multibuild.yml @@ -21,6 +21,6 @@ jobs: - name: "Check that V2 Periphery can be built with multiple Solidity versions" uses: "PaulRBerg/foundry-multibuild@v1" with: - min: "0.8.19" + min: "0.8.22" max: "0.8.23" skip-test: "true" diff --git a/.solhint.json b/.solhint.json index 35ba4419..c73668ef 100644 --- a/.solhint.json +++ b/.solhint.json @@ -3,7 +3,7 @@ "rules": { "avoid-low-level-calls": "off", "code-complexity": ["error", 8], - "compiler-version": ["error", ">=0.8.19"], + "compiler-version": ["error", ">=0.8.22"], "contract-name-camelcase": "off", "const-name-snakecase": "off", "custom-errors": "off", diff --git a/script/Base.s.sol b/script/Base.s.sol index e9f18740..5eb8191e 100644 --- a/script/Base.s.sol +++ b/script/Base.s.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-or-later -pragma solidity >=0.8.19 <0.9.0; +pragma solidity >=0.8.22 <0.9.0; import { Script } from "forge-std/src/Script.sol"; diff --git a/script/CreateMerkleStreamerLL.s.sol b/script/CreateMerkleStreamerLL.s.sol index 860807b4..fb8612c0 100644 --- a/script/CreateMerkleStreamerLL.s.sol +++ b/script/CreateMerkleStreamerLL.s.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-or-later -pragma solidity >=0.8.19 <0.9.0; +pragma solidity >=0.8.22 <0.9.0; import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import { ISablierV2LockupLinear } from "@sablier/v2-core/src/interfaces/ISablierV2LockupLinear.sol"; diff --git a/script/DeployBatch.t.sol b/script/DeployBatch.t.sol index 12d1c07f..bbf92056 100644 --- a/script/DeployBatch.t.sol +++ b/script/DeployBatch.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-or-later -pragma solidity >=0.8.19 <0.9.0; +pragma solidity >=0.8.22 <0.9.0; import { BaseScript } from "./Base.s.sol"; diff --git a/script/DeployDeterministicBatch.s.sol b/script/DeployDeterministicBatch.s.sol index df6a9362..b3652754 100644 --- a/script/DeployDeterministicBatch.s.sol +++ b/script/DeployDeterministicBatch.s.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-or-later -pragma solidity >=0.8.19 <0.9.0; +pragma solidity >=0.8.22 <0.9.0; import { BaseScript } from "./Base.s.sol"; diff --git a/script/DeployDeterministicPeriphery.s.sol b/script/DeployDeterministicPeriphery.s.sol index 01fdb7d3..71285181 100644 --- a/script/DeployDeterministicPeriphery.s.sol +++ b/script/DeployDeterministicPeriphery.s.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-or-later -pragma solidity >=0.8.19 <0.9.0; +pragma solidity >=0.8.22 <0.9.0; import { BaseScript } from "./Base.s.sol"; diff --git a/script/DeployMerkleStreamerFactory.s.sol b/script/DeployMerkleStreamerFactory.s.sol index 7fa01b27..ded39d4e 100644 --- a/script/DeployMerkleStreamerFactory.s.sol +++ b/script/DeployMerkleStreamerFactory.s.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-or-later -pragma solidity >=0.8.19 <0.9.0; +pragma solidity >=0.8.22 <0.9.0; import { BaseScript } from "./Base.s.sol"; diff --git a/script/DeployPeriphery.s.sol b/script/DeployPeriphery.s.sol index 40390bc9..a771c41e 100644 --- a/script/DeployPeriphery.s.sol +++ b/script/DeployPeriphery.s.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-or-later -pragma solidity >=0.8.19 <0.9.0; +pragma solidity >=0.8.22 <0.9.0; import { BaseScript } from "./Base.s.sol"; diff --git a/script/DeployProtocol.s.sol b/script/DeployProtocol.s.sol index c1c0ced4..52cbd3e6 100644 --- a/script/DeployProtocol.s.sol +++ b/script/DeployProtocol.s.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-or-later -pragma solidity >=0.8.19 <0.9.0; +pragma solidity >=0.8.22 <0.9.0; import { SablierV2Comptroller } from "@sablier/v2-core/src/SablierV2Comptroller.sol"; import { SablierV2LockupDynamic } from "@sablier/v2-core/src/SablierV2LockupDynamic.sol"; diff --git a/src/SablierV2Batch.sol b/src/SablierV2Batch.sol index c8569cc2..0d051510 100644 --- a/src/SablierV2Batch.sol +++ b/src/SablierV2Batch.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-or-later -pragma solidity >=0.8.19; +pragma solidity >=0.8.22; import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; @@ -40,10 +40,9 @@ contract SablierV2Batch is ISablierV2Batch { // transactions will revert if there is overflow. uint256 i; uint256 transferAmount; - for (i = 0; i < batchSize;) { + for (i = 0; i < batchSize; ++i) { unchecked { transferAmount += batch[i].totalAmount; - i += 1; } } @@ -52,7 +51,7 @@ contract SablierV2Batch is ISablierV2Batch { // Create a stream for each element in the parameter array. streamIds = new uint256[](batchSize); - for (i = 0; i < batchSize;) { + for (i = 0; i < batchSize; ++i) { // Create the stream. streamIds[i] = lockupLinear.createWithDurations( LockupLinear.CreateWithDurations({ @@ -66,11 +65,6 @@ contract SablierV2Batch is ISablierV2Batch { transferable: batch[i].transferable }) ); - - // Increment the for loop iterator. - unchecked { - i += 1; - } } } @@ -94,10 +88,9 @@ contract SablierV2Batch is ISablierV2Batch { // transactions will revert if there is overflow. uint256 i; uint256 transferAmount; - for (i = 0; i < batchSize;) { + for (i = 0; i < batchSize; ++i) { unchecked { transferAmount += batch[i].totalAmount; - i += 1; } } @@ -106,7 +99,7 @@ contract SablierV2Batch is ISablierV2Batch { // Create a stream for each element in the parameter array. streamIds = new uint256[](batchSize); - for (i = 0; i < batchSize;) { + for (i = 0; i < batchSize; ++i) { // Create the stream. streamIds[i] = lockupLinear.createWithRange( LockupLinear.CreateWithRange({ @@ -120,11 +113,6 @@ contract SablierV2Batch is ISablierV2Batch { transferable: batch[i].transferable }) ); - - // Increment the for loop iterator. - unchecked { - i += 1; - } } } @@ -152,10 +140,9 @@ contract SablierV2Batch is ISablierV2Batch { // transactions will revert if there is overflow. uint256 i; uint256 transferAmount; - for (i = 0; i < batchSize;) { + for (i = 0; i < batchSize; ++i) { unchecked { transferAmount += batch[i].totalAmount; - i += 1; } } @@ -164,7 +151,7 @@ contract SablierV2Batch is ISablierV2Batch { // Create a stream for each element in the parameter array. streamIds = new uint256[](batchSize); - for (i = 0; i < batchSize;) { + for (i = 0; i < batchSize; ++i) { // Create the stream. streamIds[i] = lockupDynamic.createWithDeltas( LockupDynamic.CreateWithDeltas({ @@ -178,11 +165,6 @@ contract SablierV2Batch is ISablierV2Batch { transferable: batch[i].transferable }) ); - - // Increment the for loop iterator. - unchecked { - i += 1; - } } } @@ -206,10 +188,9 @@ contract SablierV2Batch is ISablierV2Batch { // transactions will revert if there is overflow. uint256 i; uint256 transferAmount; - for (i = 0; i < batchSize;) { + for (i = 0; i < batchSize; ++i) { unchecked { transferAmount += batch[i].totalAmount; - i += 1; } } @@ -218,7 +199,7 @@ contract SablierV2Batch is ISablierV2Batch { // Create a stream for each element in the parameter array. streamIds = new uint256[](batchSize); - for (i = 0; i < batchSize;) { + for (i = 0; i < batchSize; ++i) { // Create the stream. streamIds[i] = lockupDynamic.createWithMilestones( LockupDynamic.CreateWithMilestones({ @@ -233,11 +214,6 @@ contract SablierV2Batch is ISablierV2Batch { transferable: batch[i].transferable }) ); - - // Increment the for loop iterator. - unchecked { - i += 1; - } } } diff --git a/src/SablierV2MerkleStreamerFactory.sol b/src/SablierV2MerkleStreamerFactory.sol index e9f14b1f..9efdd7a5 100644 --- a/src/SablierV2MerkleStreamerFactory.sol +++ b/src/SablierV2MerkleStreamerFactory.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-or-later -pragma solidity >=0.8.19; +pragma solidity >=0.8.22; import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import { ISablierV2LockupLinear } from "@sablier/v2-core/src/interfaces/ISablierV2LockupLinear.sol"; diff --git a/src/SablierV2MerkleStreamerLL.sol b/src/SablierV2MerkleStreamerLL.sol index fbfd99e8..94207941 100644 --- a/src/SablierV2MerkleStreamerLL.sol +++ b/src/SablierV2MerkleStreamerLL.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-or-later -pragma solidity >=0.8.19; +pragma solidity >=0.8.22; import { BitMaps } from "@openzeppelin/contracts/utils/structs/BitMaps.sol"; import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; diff --git a/src/abstracts/SablierV2MerkleStreamer.sol b/src/abstracts/SablierV2MerkleStreamer.sol index 9591a6af..6b692355 100644 --- a/src/abstracts/SablierV2MerkleStreamer.sol +++ b/src/abstracts/SablierV2MerkleStreamer.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-or-later -pragma solidity >=0.8.19; +pragma solidity >=0.8.22; import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; diff --git a/src/interfaces/ISablierV2Batch.sol b/src/interfaces/ISablierV2Batch.sol index 1d24f273..f7d328a4 100644 --- a/src/interfaces/ISablierV2Batch.sol +++ b/src/interfaces/ISablierV2Batch.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-or-later -pragma solidity >=0.8.19; +pragma solidity >=0.8.22; import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import { ISablierV2LockupDynamic } from "@sablier/v2-core/src/interfaces/ISablierV2LockupDynamic.sol"; diff --git a/src/interfaces/ISablierV2MerkleStreamer.sol b/src/interfaces/ISablierV2MerkleStreamer.sol index 42dc7a4d..6ab4f733 100644 --- a/src/interfaces/ISablierV2MerkleStreamer.sol +++ b/src/interfaces/ISablierV2MerkleStreamer.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-or-later -pragma solidity >=0.8.19; +pragma solidity >=0.8.22; import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import { IAdminable } from "@sablier/v2-core/src/interfaces/IAdminable.sol"; diff --git a/src/interfaces/ISablierV2MerkleStreamerFactory.sol b/src/interfaces/ISablierV2MerkleStreamerFactory.sol index 958ca0e8..504db123 100644 --- a/src/interfaces/ISablierV2MerkleStreamerFactory.sol +++ b/src/interfaces/ISablierV2MerkleStreamerFactory.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-or-later -pragma solidity >=0.8.19; +pragma solidity >=0.8.22; import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import { ISablierV2LockupLinear } from "@sablier/v2-core/src/interfaces/ISablierV2LockupLinear.sol"; diff --git a/src/interfaces/ISablierV2MerkleStreamerLL.sol b/src/interfaces/ISablierV2MerkleStreamerLL.sol index 794ad944..eb53b90a 100644 --- a/src/interfaces/ISablierV2MerkleStreamerLL.sol +++ b/src/interfaces/ISablierV2MerkleStreamerLL.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-or-later -pragma solidity >=0.8.19; +pragma solidity >=0.8.22; import { ISablierV2LockupLinear } from "@sablier/v2-core/src/interfaces/ISablierV2LockupLinear.sol"; diff --git a/src/libraries/Errors.sol b/src/libraries/Errors.sol index 93308ed9..ede4400c 100644 --- a/src/libraries/Errors.sol +++ b/src/libraries/Errors.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-or-later -pragma solidity >=0.8.19; +pragma solidity >=0.8.22; /// @title Errors /// @notice Library containing all custom errors the protocol may revert with. diff --git a/src/types/DataTypes.sol b/src/types/DataTypes.sol index 315886a4..a31972d5 100644 --- a/src/types/DataTypes.sol +++ b/src/types/DataTypes.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-or-later -pragma solidity >=0.8.19; +pragma solidity >=0.8.22; import { ISablierV2Lockup } from "@sablier/v2-core/src/interfaces/ISablierV2Lockup.sol"; import { Broker, LockupDynamic, LockupLinear } from "@sablier/v2-core/src/types/DataTypes.sol"; diff --git a/test/Base.t.sol b/test/Base.t.sol index 16d0ed2d..8a8b1045 100644 --- a/test/Base.t.sol +++ b/test/Base.t.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: UNLICENSED // solhint-disable max-states-count -pragma solidity >=0.8.19 <0.9.0; +pragma solidity >=0.8.22 <0.9.0; import { ERC20 } from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; diff --git a/test/fork/Fork.t.sol b/test/fork/Fork.t.sol index fb2b3b59..c1ab84e6 100644 --- a/test/fork/Fork.t.sol +++ b/test/fork/Fork.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity >=0.8.19 <0.9.0; +pragma solidity >=0.8.22 <0.9.0; import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import { ISablierV2LockupDynamic } from "@sablier/v2-core/src/interfaces/ISablierV2LockupDynamic.sol"; diff --git a/test/fork/assets/USDC.t.sol b/test/fork/assets/USDC.t.sol index 6e038fe4..cecf1298 100644 --- a/test/fork/assets/USDC.t.sol +++ b/test/fork/assets/USDC.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity >=0.8.19 <0.9.0; +pragma solidity >=0.8.22 <0.9.0; import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; diff --git a/test/fork/assets/USDT.t.sol b/test/fork/assets/USDT.t.sol index 423168d0..ae8cd8a0 100644 --- a/test/fork/assets/USDT.t.sol +++ b/test/fork/assets/USDT.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity >=0.8.19 <0.9.0; +pragma solidity >=0.8.22 <0.9.0; import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; diff --git a/test/fork/batch/createWithMilestones.t.sol b/test/fork/batch/createWithMilestones.t.sol index d564ea8a..c717dbf4 100644 --- a/test/fork/batch/createWithMilestones.t.sol +++ b/test/fork/batch/createWithMilestones.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity >=0.8.19 <0.9.0; +pragma solidity >=0.8.22 <0.9.0; import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import { LockupDynamic } from "@sablier/v2-core/src/types/DataTypes.sol"; diff --git a/test/fork/batch/createWithRange.t.sol b/test/fork/batch/createWithRange.t.sol index 13e825ff..61b46135 100644 --- a/test/fork/batch/createWithRange.t.sol +++ b/test/fork/batch/createWithRange.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity >=0.8.19 <0.9.0; +pragma solidity >=0.8.22 <0.9.0; import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import { LockupLinear } from "@sablier/v2-core/src/types/DataTypes.sol"; diff --git a/test/fork/merkle-streamer/MerkleStreamerLL.t.sol b/test/fork/merkle-streamer/MerkleStreamerLL.t.sol index b150be89..0b8038aa 100644 --- a/test/fork/merkle-streamer/MerkleStreamerLL.t.sol +++ b/test/fork/merkle-streamer/MerkleStreamerLL.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity >=0.8.19 <0.9.0; +pragma solidity >=0.8.22 <0.9.0; import { Arrays } from "@openzeppelin/contracts/utils/Arrays.sol"; import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; diff --git a/test/integration/Integration.t.sol b/test/integration/Integration.t.sol index 7d3c0728..f5bc9cdb 100644 --- a/test/integration/Integration.t.sol +++ b/test/integration/Integration.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity >=0.8.19 <0.9.0; +pragma solidity >=0.8.22 <0.9.0; import { Precompiles as V2CorePrecompiles } from "@sablier/v2-core/test/utils/Precompiles.sol"; diff --git a/test/integration/batch/create-with-deltas/createWithDeltas.t.sol b/test/integration/batch/create-with-deltas/createWithDeltas.t.sol index 11c51e4b..dac44686 100644 --- a/test/integration/batch/create-with-deltas/createWithDeltas.t.sol +++ b/test/integration/batch/create-with-deltas/createWithDeltas.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity >=0.8.19 <0.9.0; +pragma solidity >=0.8.22 <0.9.0; import { Errors } from "src/libraries/Errors.sol"; import { Batch } from "src/types/DataTypes.sol"; diff --git a/test/integration/batch/create-with-durations/createWithDurations.t.sol b/test/integration/batch/create-with-durations/createWithDurations.t.sol index 2aea5448..cfbf667c 100644 --- a/test/integration/batch/create-with-durations/createWithDurations.t.sol +++ b/test/integration/batch/create-with-durations/createWithDurations.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity >=0.8.19 <0.9.0; +pragma solidity >=0.8.22 <0.9.0; import { Errors } from "src/libraries/Errors.sol"; import { Batch } from "src/types/DataTypes.sol"; diff --git a/test/integration/batch/create-with-milestones/createWithMilestones.t.sol b/test/integration/batch/create-with-milestones/createWithMilestones.t.sol index ca5b7383..a3e9484b 100644 --- a/test/integration/batch/create-with-milestones/createWithMilestones.t.sol +++ b/test/integration/batch/create-with-milestones/createWithMilestones.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity >=0.8.19 <0.9.0; +pragma solidity >=0.8.22 <0.9.0; import { Errors } from "src/libraries/Errors.sol"; import { Batch } from "src/types/DataTypes.sol"; diff --git a/test/integration/batch/create-with-range/createWithRange.t.sol b/test/integration/batch/create-with-range/createWithRange.t.sol index 4f248bba..4fac3995 100644 --- a/test/integration/batch/create-with-range/createWithRange.t.sol +++ b/test/integration/batch/create-with-range/createWithRange.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity >=0.8.19 <0.9.0; +pragma solidity >=0.8.22 <0.9.0; import { Errors } from "src/libraries/Errors.sol"; import { Batch } from "src/types/DataTypes.sol"; diff --git a/test/integration/merkle-streamer/MerkleStreamer.t.sol b/test/integration/merkle-streamer/MerkleStreamer.t.sol index fd6eeaaa..3f244cef 100644 --- a/test/integration/merkle-streamer/MerkleStreamer.t.sol +++ b/test/integration/merkle-streamer/MerkleStreamer.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity >=0.8.19; +pragma solidity >=0.8.22; import { ISablierV2MerkleStreamerLL } from "src/interfaces/ISablierV2MerkleStreamerLL.sol"; diff --git a/test/integration/merkle-streamer/factory/create-merkle-streamer-ll/createMerkleStreamerLL.t.sol b/test/integration/merkle-streamer/factory/create-merkle-streamer-ll/createMerkleStreamerLL.t.sol index 73d04060..0c17b93a 100644 --- a/test/integration/merkle-streamer/factory/create-merkle-streamer-ll/createMerkleStreamerLL.t.sol +++ b/test/integration/merkle-streamer/factory/create-merkle-streamer-ll/createMerkleStreamerLL.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity >=0.8.19 <0.9.0; +pragma solidity >=0.8.22 <0.9.0; import { LockupLinear } from "@sablier/v2-core/src/types/DataTypes.sol"; diff --git a/test/integration/merkle-streamer/ll/claim/claim.t.sol b/test/integration/merkle-streamer/ll/claim/claim.t.sol index a4742934..7da4d4a7 100644 --- a/test/integration/merkle-streamer/ll/claim/claim.t.sol +++ b/test/integration/merkle-streamer/ll/claim/claim.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity >=0.8.19 <0.9.0; +pragma solidity >=0.8.22 <0.9.0; import { Lockup, LockupLinear } from "@sablier/v2-core/src/types/DataTypes.sol"; import { ud } from "@prb/math/src/UD60x18.sol"; diff --git a/test/integration/merkle-streamer/ll/clawback/clawback.t.sol b/test/integration/merkle-streamer/ll/clawback/clawback.t.sol index 69b28afb..d5433173 100644 --- a/test/integration/merkle-streamer/ll/clawback/clawback.t.sol +++ b/test/integration/merkle-streamer/ll/clawback/clawback.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity >=0.8.19 <0.9.0; +pragma solidity >=0.8.22 <0.9.0; import { Errors as V2CoreErrors } from "@sablier/v2-core/src/libraries/Errors.sol"; import { ud } from "@prb/math/src/UD60x18.sol"; diff --git a/test/integration/merkle-streamer/ll/constructor/constructor.t.sol b/test/integration/merkle-streamer/ll/constructor/constructor.t.sol index 676b9d18..0837554e 100644 --- a/test/integration/merkle-streamer/ll/constructor/constructor.t.sol +++ b/test/integration/merkle-streamer/ll/constructor/constructor.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity >=0.8.19 <0.9.0; +pragma solidity >=0.8.22 <0.9.0; import { LockupLinear } from "@sablier/v2-core/src/types/DataTypes.sol"; diff --git a/test/integration/merkle-streamer/ll/has-claimed/hasClaimed.t.sol b/test/integration/merkle-streamer/ll/has-claimed/hasClaimed.t.sol index a2b12ee8..6802efed 100644 --- a/test/integration/merkle-streamer/ll/has-claimed/hasClaimed.t.sol +++ b/test/integration/merkle-streamer/ll/has-claimed/hasClaimed.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity >=0.8.19 <0.9.0; +pragma solidity >=0.8.22 <0.9.0; import { MerkleStreamer_Integration_Test } from "../../MerkleStreamer.t.sol"; diff --git a/test/integration/merkle-streamer/ll/has-expired/hasExpired.t.sol b/test/integration/merkle-streamer/ll/has-expired/hasExpired.t.sol index eca58123..6ce7b363 100644 --- a/test/integration/merkle-streamer/ll/has-expired/hasExpired.t.sol +++ b/test/integration/merkle-streamer/ll/has-expired/hasExpired.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity >=0.8.19 <0.9.0; +pragma solidity >=0.8.22 <0.9.0; import { ISablierV2MerkleStreamerLL } from "src/interfaces/ISablierV2MerkleStreamerLL.sol"; diff --git a/test/utils/ArrayBuilder.sol b/test/utils/ArrayBuilder.sol index 4ca431a7..c53ec64e 100644 --- a/test/utils/ArrayBuilder.sol +++ b/test/utils/ArrayBuilder.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-or-later -pragma solidity >=0.8.19; +pragma solidity >=0.8.22; library ArrayBuilder { /// @notice Generates an ordered array of integers which starts at `firstStreamId` and ends at `firstStreamId + @@ -13,10 +13,8 @@ library ArrayBuilder { returns (uint256[] memory streamIds) { streamIds = new uint256[](batchSize); - unchecked { - for (uint256 i = 0; i < batchSize; ++i) { - streamIds[i] = firstStreamId + i; - } + for (uint256 i = 0; i < batchSize; ++i) { + streamIds[i] = firstStreamId + i; } } } diff --git a/test/utils/BatchBuilder.sol b/test/utils/BatchBuilder.sol index 361a5f0a..4afada30 100644 --- a/test/utils/BatchBuilder.sol +++ b/test/utils/BatchBuilder.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-or-later -pragma solidity >=0.8.19; +pragma solidity >=0.8.22; import { LockupDynamic, LockupLinear } from "@sablier/v2-core/src/types/DataTypes.sol"; @@ -16,10 +16,8 @@ library BatchBuilder { returns (Batch.CreateWithDeltas[] memory batch) { batch = new Batch.CreateWithDeltas[](batchSize); - unchecked { - for (uint256 i = 0; i < batchSize; ++i) { - batch[i] = batchSingle; - } + for (uint256 i = 0; i < batchSize; ++i) { + batch[i] = batchSingle; } } @@ -55,10 +53,8 @@ library BatchBuilder { returns (Batch.CreateWithDurations[] memory batch) { batch = new Batch.CreateWithDurations[](batchSize); - unchecked { - for (uint256 i = 0; i < batchSize; ++i) { - batch[i] = batchSingle; - } + for (uint256 i = 0; i < batchSize; ++i) { + batch[i] = batchSingle; } } @@ -94,10 +90,8 @@ library BatchBuilder { returns (Batch.CreateWithMilestones[] memory batch) { batch = new Batch.CreateWithMilestones[](batchSize); - unchecked { - for (uint256 i = 0; i < batchSize; ++i) { - batch[i] = batchSingle; - } + for (uint256 i = 0; i < batchSize; ++i) { + batch[i] = batchSingle; } } @@ -134,10 +128,8 @@ library BatchBuilder { returns (Batch.CreateWithRange[] memory batch) { batch = new Batch.CreateWithRange[](batchSize); - unchecked { - for (uint256 i = 0; i < batchSize; ++i) { - batch[i] = batchSingle; - } + for (uint256 i = 0; i < batchSize; ++i) { + batch[i] = batchSingle; } } diff --git a/test/utils/Defaults.sol b/test/utils/Defaults.sol index b468c84e..a5586f6b 100644 --- a/test/utils/Defaults.sol +++ b/test/utils/Defaults.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-or-later -pragma solidity >=0.8.19 <0.9.0; +pragma solidity >=0.8.22 <0.9.0; import { Arrays } from "@openzeppelin/contracts/utils/Arrays.sol"; import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; diff --git a/test/utils/DeployOptimized.sol b/test/utils/DeployOptimized.sol index f49840f8..46b0ae52 100644 --- a/test/utils/DeployOptimized.sol +++ b/test/utils/DeployOptimized.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity >=0.8.19 <0.9.0; +pragma solidity >=0.8.22 <0.9.0; import { StdCheats } from "forge-std/src/StdCheats.sol"; diff --git a/test/utils/Events.sol b/test/utils/Events.sol index 1c6aed6a..5977a16c 100644 --- a/test/utils/Events.sol +++ b/test/utils/Events.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-or-later -pragma solidity >=0.8.19; +pragma solidity >=0.8.22; import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import { LockupLinear } from "@sablier/v2-core/src/types/DataTypes.sol"; diff --git a/test/utils/MerkleBuilder.sol b/test/utils/MerkleBuilder.sol index e0a454bd..ad6bb0c2 100644 --- a/test/utils/MerkleBuilder.sol +++ b/test/utils/MerkleBuilder.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-3.0-or-later // solhint-disable reason-string -pragma solidity >=0.8.19; +pragma solidity >=0.8.22; import { LibSort } from "solady/src/utils/LibSort.sol"; diff --git a/test/utils/MerkleBuilder.t.sol b/test/utils/MerkleBuilder.t.sol index 38963573..9a92b4ee 100644 --- a/test/utils/MerkleBuilder.t.sol +++ b/test/utils/MerkleBuilder.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-or-later -pragma solidity >=0.8.19; +pragma solidity >=0.8.22; import { PRBTest } from "@prb/test/src/PRBTest.sol"; import { StdUtils } from "forge-std/src/StdUtils.sol"; diff --git a/test/utils/Murky.sol b/test/utils/Murky.sol index 85324189..df29f9a4 100644 --- a/test/utils/Murky.sol +++ b/test/utils/Murky.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT // solhint-disable code-complexity,no-inline-assembly,reason-string -pragma solidity >=0.8.19; +pragma solidity >=0.8.22; /// @dev Credits to https://github.com/dmfxyz/murky abstract contract MurkyBase { diff --git a/test/utils/Precompiles.sol b/test/utils/Precompiles.sol index f52c768e..c2775276 100644 --- a/test/utils/Precompiles.sol +++ b/test/utils/Precompiles.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-3.0-or-later // solhint-disable max-line-length,no-inline-assembly,reason-string -pragma solidity >=0.8.19; +pragma solidity >=0.8.22; import { ISablierV2Batch } from "../../src/interfaces/ISablierV2Batch.sol"; import { ISablierV2MerkleStreamerFactory } from "../../src/interfaces/ISablierV2MerkleStreamerFactory.sol"; diff --git a/test/utils/Precompiles.t.sol b/test/utils/Precompiles.t.sol index ed23578e..00595365 100644 --- a/test/utils/Precompiles.t.sol +++ b/test/utils/Precompiles.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity >=0.8.19 <0.9.0; +pragma solidity >=0.8.22 <0.9.0; import { LibString } from "solady/src/utils/LibString.sol"; diff --git a/test/utils/Types.sol b/test/utils/Types.sol index d722cd61..39fdda5a 100644 --- a/test/utils/Types.sol +++ b/test/utils/Types.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-or-later -pragma solidity >=0.8.19 <0.9.0; +pragma solidity >=0.8.22 <0.9.0; struct Users { address alice;