-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: rename Batch to BatchLockup (#322)
* refactor: rename Batch to BatchLockup * refactor: rename 'batchLockup' to 'batch' --------- Co-authored-by: Paul Razvan Berg <[email protected]>
- Loading branch information
1 parent
470aea1
commit 7c3ca60
Showing
41 changed files
with
411 additions
and
355 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,55 @@ | ||
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, μ: 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) | ||
BaseScript_Test:test_ConstructCreate2Salt() (gas: 18701) | ||
Claim_Integration_Test:test_Claim() (gas: 296792) | ||
Claim_Integration_Test:test_Claim() (gas: 359541) | ||
Claim_Integration_Test:test_Claim_CalculatedAmountsSumNotEqualClaimAmount() (gas: 1906979) | ||
Claim_Integration_Test:test_RevertGiven_AlreadyClaimed() (gas: 274624) | ||
Claim_Integration_Test:test_RevertGiven_AlreadyClaimed() (gas: 329502) | ||
Claim_Integration_Test:test_RevertGiven_CampaignExpired() (gas: 17786) | ||
Claim_Integration_Test:test_RevertGiven_CampaignExpired() (gas: 17811) | ||
Clawback_Integration_Test:testFuzz_Clawback(address) (runs: 38, μ: 295825, ~: 295825) | ||
Clawback_Integration_Test:testFuzz_Clawback(address) (runs: 38, μ: 350750, ~: 350750) | ||
Clawback_Integration_Test:test_Clawback() (gas: 278339) | ||
Clawback_Integration_Test:test_Clawback() (gas: 333264) | ||
Clawback_Integration_Test:test_RevertGiven_CampaignNotExpired() (gas: 19523) | ||
Clawback_Integration_Test:test_RevertGiven_CampaignNotExpired() (gas: 19523) | ||
Constructor_MerkleLL_Integration_Test:test_Constructor() (gas: 1150963) | ||
Constructor_MerkleLT_Integration_Test:test_Constructor() (gas: 1495600) | ||
CreateMerkleLL_Integration_Test:testFuzz_CreateMerkleLL(address,uint40) (runs: 38, μ: 1122843, ~: 1123367) | ||
CreateMerkleLL_Integration_Test:test_RevertGiven_CreatedAlready() (gas: 8937393460516730662) | ||
CreateMerkleLT_Integration_Test:testFuzz_CreateMerkleLT(address,uint40) (runs: 38, μ: 1431123, ~: 1431123) | ||
CreateMerkleLT_Integration_Test:test_RevertGiven_CreatedAlready() (gas: 8937393460516730766) | ||
CreateWithDurationsLD_Integration_Test:test_BatchCreateWithDurations() (gas: 2021956) | ||
CreateWithDurationsLL_Integration_Test:test_BatchCreateWithDurations() (gas: 1498705) | ||
CreateWithDurationsLT_Integration_Test:test_BatchCreateWithDurations() (gas: 2007334) | ||
CreateWithTimestampsLD_Integration_Test:test_BatchCreateWithTimestamps() (gas: 2005042) | ||
CreateWithTimestampsLL_Integration_Test:test_BatchCreateWithTimestamps() (gas: 1497928) | ||
CreateWithTimestampsLT_Integration_Test:test_BatchCreateWithTimestamps() (gas: 1991536) | ||
HasClaimed_Integration_Test:test_HasClaimed() (gas: 263197) | ||
HasClaimed_Integration_Test:test_HasClaimed() (gas: 318100) | ||
HasClaimed_Integration_Test:test_HasClaimed_IndexNotInTree() (gas: 11174) | ||
HasClaimed_Integration_Test:test_HasClaimed_IndexNotInTree() (gas: 11196) | ||
HasClaimed_Integration_Test:test_HasClaimed_NotClaimed() (gas: 16409) | ||
HasClaimed_Integration_Test:test_HasClaimed_NotClaimed() (gas: 16431) | ||
HasExpired_Integration_Test:test_HasExpired_ExpirationEqualToBlockTimestamp() (gas: 14692) | ||
HasExpired_Integration_Test:test_HasExpired_ExpirationEqualToBlockTimestamp() (gas: 14714) | ||
HasExpired_Integration_Test:test_HasExpired_ExpirationGreaterThanBlockTimestamp() (gas: 14788) | ||
HasExpired_Integration_Test:test_HasExpired_ExpirationGreaterThanBlockTimestamp() (gas: 14810) | ||
HasExpired_Integration_Test:test_HasExpired_ExpirationLessThanBlockTimestamp() (gas: 8902) | ||
HasExpired_Integration_Test:test_HasExpired_ExpirationLessThanBlockTimestamp() (gas: 8924) | ||
HasExpired_Integration_Test:test_HasExpired_ExpirationZero() (gas: 1051899) | ||
HasExpired_Integration_Test:test_HasExpired_ExpirationZero() (gas: 1343143) | ||
MerkleBuilder_Test:testFuzz_ComputeLeaf(uint256,address,uint128) (runs: 38, μ: 4323, ~: 4323) | ||
MerkleBuilder_Test:testFuzz_ComputeLeaves((uint256,address,uint128)[]) (runs: 38, μ: 366364, ~: 398189) | ||
Precompiles_Test:test_DeployBatchLockup() (gas: 3323914) | ||
Precompiles_Test:test_DeployMerkleLockupFactory() (gas: 6986949) | ||
Precompiles_Test:test_DeployPeriphery() (gas: 10310682) | ||
USDC_CreateWithTimestamps_LockupDynamic_BatchLockup_Fork_Test:testForkFuzz_CreateWithTimestampsLD((uint128,address,address,uint128,uint40,(uint128,uint64,uint40)[])) (runs: 38, μ: 34210026, ~: 30903106) | ||
USDC_CreateWithTimestamps_LockupLinear_BatchLockup_Fork_Test:testForkFuzz_CreateWithTimestampsLL((uint128,(uint40,uint40,uint40),address,address,uint128)) (runs: 38, μ: 1592674, ~: 1502438) | ||
USDC_CreateWithTimestamps_LockupTranched_BatchLockup_Fork_Test:testForkFuzz_CreateWithTimestampsLT((uint128,address,address,uint128,uint40,(uint128,uint40)[])) (runs: 36, μ: 24927469, ~: 23804750) | ||
USDC_MerkleLL_Fork_Test:testForkFuzz_MerkleLL((address,uint40,(uint256,uint256,uint128)[],uint256)) (runs: 38, μ: 5247542, ~: 5027798) | ||
USDC_MerkleLT_Fork_Test:testForkFuzz_MerkleLT((address,uint40,(uint256,uint256,uint128)[],uint256)) (runs: 38, μ: 5622048, ~: 5399736) | ||
USDT_CreateWithTimestamps_LockupDynamic_BatchLockup_Fork_Test:testForkFuzz_CreateWithTimestampsLD((uint128,address,address,uint128,uint40,(uint128,uint64,uint40)[])) (runs: 38, μ: 30978443, ~: 21899958) | ||
USDT_CreateWithTimestamps_LockupLinear_BatchLockup_Fork_Test:testForkFuzz_CreateWithTimestampsLL((uint128,(uint40,uint40,uint40),address,address,uint128)) (runs: 38, μ: 1953484, ~: 2211406) | ||
USDT_CreateWithTimestamps_LockupTranched_BatchLockup_Fork_Test:testForkFuzz_CreateWithTimestampsLT((uint128,address,address,uint128,uint40,(uint128,uint40)[])) (runs: 38, μ: 27146173, ~: 17675525) | ||
USDT_MerkleLL_Fork_Test:testForkFuzz_MerkleLL((address,uint40,(uint256,uint256,uint128)[],uint256)) (runs: 38, μ: 5214786, ~: 4997326) | ||
USDT_MerkleLT_Fork_Test:testForkFuzz_MerkleLT((address,uint40,(uint256,uint256,uint128)[],uint256)) (runs: 38, μ: 5585576, ~: 5365241) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// SPDX-License-Identifier: GPL-3.0-or-later | ||
pragma solidity >=0.8.22 <0.9.0; | ||
|
||
import { BaseScript } from "./Base.s.sol"; | ||
|
||
import { SablierV2BatchLockup } from "../src/SablierV2BatchLockup.sol"; | ||
|
||
contract DeployBatchLockup is BaseScript { | ||
/// @dev Deploy via Forge. | ||
function runBroadcast() public virtual broadcast returns (SablierV2BatchLockup batchLockup) { | ||
batchLockup = _run(); | ||
} | ||
|
||
/// @dev Deploy via Sphinx. | ||
function runSphinx() public virtual sphinx returns (SablierV2BatchLockup batchLockup) { | ||
batchLockup = _run(); | ||
} | ||
|
||
function _run() internal returns (SablierV2BatchLockup batchLockup) { | ||
batchLockup = new SablierV2BatchLockup(); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// SPDX-License-Identifier: GPL-3.0-or-later | ||
pragma solidity >=0.8.22 <0.9.0; | ||
|
||
import { BaseScript } from "./Base.s.sol"; | ||
|
||
import { SablierV2BatchLockup } from "../src/SablierV2BatchLockup.sol"; | ||
|
||
/// @notice Deploys {SablierV2BatchLockup} at a deterministic address across chains. | ||
/// @dev Reverts if the contract has already been deployed. | ||
contract DeployDeterministicBatchLockup is BaseScript { | ||
/// @dev Deploy via Forge. | ||
function runBroadcast() public virtual broadcast returns (SablierV2BatchLockup batchLockup) { | ||
batchLockup = _run(); | ||
} | ||
|
||
/// @dev Deploy via Sphinx. | ||
function runSphinx() public virtual sphinx returns (SablierV2BatchLockup batchLockup) { | ||
batchLockup = _run(); | ||
} | ||
|
||
function _run() internal returns (SablierV2BatchLockup batchLockup) { | ||
bytes32 salt = constructCreate2Salt(); | ||
batchLockup = new SablierV2BatchLockup{ salt: salt }(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.