-
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.
Inherit
SablierV2Blast
in Batch and Factory (#341)
* feat: inherit SablierV2Blast in Batch and Factory contracts * feat: update scripts with admin param feat: configure blast settings in scripts * test: add constructor test in batch and factory * refactor: update precompiles * refactor: blast related changes --------- Co-authored-by: smol-ninja <[email protected]>
- Loading branch information
1 parent
62cb598
commit 36587a2
Showing
21 changed files
with
200 additions
and
49 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
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 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
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
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
22 changes: 22 additions & 0 deletions
22
test/integration/batch-lockup/constructor/constructor.t.sol
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: UNLICENSED | ||
pragma solidity >=0.8.22 <0.9.0; | ||
|
||
import { SablierV2BatchLockup } from "src/SablierV2BatchLockup.sol"; | ||
|
||
import { Integration_Test } from "../../Integration.t.sol"; | ||
|
||
contract Constructor_BatchLockup_Integration_Test is Integration_Test { | ||
function setUp() public virtual override { | ||
Integration_Test.setUp(); | ||
} | ||
|
||
function test_Constructor() external { | ||
vm.expectEmit(); | ||
emit TransferAdmin({ oldAdmin: address(0), newAdmin: users.admin }); | ||
SablierV2BatchLockup batchLockup = new SablierV2BatchLockup(users.admin); | ||
|
||
address actualAdmin = batchLockup.admin(); | ||
address expectedAdmin = users.admin; | ||
assertEq(actualAdmin, expectedAdmin, "admin mismatch"); | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
test/integration/merkle-lockup/factory/constructor/constructor.t.sol
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: UNLICENSED | ||
pragma solidity >=0.8.22 <0.9.0; | ||
|
||
import { SablierV2MerkleLockupFactory } from "src/SablierV2MerkleLockupFactory.sol"; | ||
|
||
import { MerkleLockup_Integration_Test } from "../../MerkleLockup.t.sol"; | ||
|
||
contract Constructor_BatchLockup_Integration_Test is MerkleLockup_Integration_Test { | ||
function setUp() public virtual override { | ||
MerkleLockup_Integration_Test.setUp(); | ||
} | ||
|
||
function test_Constructor() external { | ||
vm.expectEmit(); | ||
emit TransferAdmin({ oldAdmin: address(0), newAdmin: users.admin }); | ||
SablierV2MerkleLockupFactory merkleLockupFactory = new SablierV2MerkleLockupFactory(users.admin); | ||
|
||
address actualAdmin = merkleLockupFactory.admin(); | ||
address expectedAdmin = users.admin; | ||
assertEq(actualAdmin, expectedAdmin, "admin mismatch"); | ||
} | ||
} |
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.