-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #817 from sablier-labs/feat/lockup-tranched
LockupTranched contract
- Loading branch information
Showing
91 changed files
with
4,855 additions
and
532 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// SPDX-License-Identifier: GPL-3.0-or-later | ||
pragma solidity >=0.8.22 <0.9.0; | ||
|
||
import { ISablierV2Comptroller } from "../src/interfaces/ISablierV2Comptroller.sol"; | ||
import { ISablierV2NFTDescriptor } from "../src/interfaces/ISablierV2NFTDescriptor.sol"; | ||
import { SablierV2LockupTranched } from "../src/SablierV2LockupTranched.sol"; | ||
|
||
import { BaseScript } from "./Base.s.sol"; | ||
|
||
/// @dev Deploys {SablierV2LockupTranched} at a deterministic address across chains. | ||
/// @dev Reverts if the contract has already been deployed. | ||
contract DeployDeterministicLockupTranched is BaseScript { | ||
function run( | ||
address initialAdmin, | ||
ISablierV2Comptroller initialComptroller, | ||
ISablierV2NFTDescriptor initialNFTDescriptor | ||
) | ||
public | ||
virtual | ||
broadcast | ||
returns (SablierV2LockupTranched lockupTranched) | ||
{ | ||
bytes32 salt = constructCreate2Salt(); | ||
lockupTranched = | ||
new SablierV2LockupTranched{ salt: salt }(initialAdmin, initialComptroller, initialNFTDescriptor, maxCount); | ||
} | ||
} |
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,23 @@ | ||
// SPDX-License-Identifier: GPL-3.0-or-later | ||
pragma solidity >=0.8.22 <0.9.0; | ||
|
||
import { ISablierV2Comptroller } from "../src/interfaces/ISablierV2Comptroller.sol"; | ||
import { ISablierV2NFTDescriptor } from "../src/interfaces/ISablierV2NFTDescriptor.sol"; | ||
import { SablierV2LockupTranched } from "../src/SablierV2LockupTranched.sol"; | ||
|
||
import { BaseScript } from "./Base.s.sol"; | ||
|
||
contract DeployLockupTranched is BaseScript { | ||
function run( | ||
address initialAdmin, | ||
ISablierV2Comptroller initialComptroller, | ||
ISablierV2NFTDescriptor initialNFTDescriptor | ||
) | ||
public | ||
virtual | ||
broadcast | ||
returns (SablierV2LockupTranched lockupTranched) | ||
{ | ||
lockupTranched = new SablierV2LockupTranched(initialAdmin, initialComptroller, initialNFTDescriptor, maxCount); | ||
} | ||
} |
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
Oops, something went wrong.