-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: create a markdown deployment file with docs structure build: remove problematic etherscan fields
- Loading branch information
1 parent
da4c076
commit a322ba6
Showing
8 changed files
with
413 additions
and
89 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 |
---|---|---|
|
@@ -19,4 +19,5 @@ out-svg | |
lcov.info | ||
package-lock.json | ||
pnpm-lock.yaml | ||
script/protocol/*.md | ||
yarn.lock |
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 was deleted.
Oops, something went wrong.
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,86 @@ | ||
// SPDX-License-Identifier: GPL-3.0-or-later | ||
pragma solidity >=0.8.22 <0.9.0; | ||
|
||
import { LockupNFTDescriptor } from "../../src/core/LockupNFTDescriptor.sol"; | ||
import { SablierLockupDynamic } from "../../src/core/SablierLockupDynamic.sol"; | ||
import { SablierLockupLinear } from "../../src/core/SablierLockupLinear.sol"; | ||
import { SablierLockupTranched } from "../../src/core/SablierLockupTranched.sol"; | ||
import { SablierMerkleFactory } from "../../src/periphery/SablierMerkleFactory.sol"; | ||
import { SablierBatchLockup } from "../../src/periphery/SablierBatchLockup.sol"; | ||
|
||
import { DeploymentLogger } from "./DeploymentLogger.s.sol"; | ||
|
||
/// @notice Deploys the Lockup Protocol at deterministic addresses across chains. | ||
contract DeployDeterministicProtocol is DeploymentLogger("deterministic") { | ||
/// @dev Deploys the protocol with the admin set in `adminMap`. | ||
function run() | ||
public | ||
virtual | ||
broadcast | ||
returns ( | ||
LockupNFTDescriptor nftDescriptor, | ||
SablierLockupDynamic lockupDynamic, | ||
SablierLockupLinear lockupLinear, | ||
SablierLockupTranched lockupTranched, | ||
SablierBatchLockup batchLockup, | ||
SablierMerkleFactory merkleLockupFactory | ||
) | ||
{ | ||
address initialAdmin = adminMap[block.chainid]; | ||
|
||
(nftDescriptor, lockupDynamic, lockupLinear, lockupTranched, batchLockup, merkleLockupFactory) = | ||
_run(initialAdmin); | ||
} | ||
|
||
/// @dev Deploys the protocol with the given `initialAdmin`. | ||
function run(address initialAdmin) | ||
internal | ||
returns ( | ||
LockupNFTDescriptor nftDescriptor, | ||
SablierLockupDynamic lockupDynamic, | ||
SablierLockupLinear lockupLinear, | ||
SablierLockupTranched lockupTranched, | ||
SablierBatchLockup batchLockup, | ||
SablierMerkleFactory merkleLockupFactory | ||
) | ||
{ | ||
(nftDescriptor, lockupDynamic, lockupLinear, lockupTranched, batchLockup, merkleLockupFactory) = | ||
_run(initialAdmin); | ||
} | ||
|
||
/// @dev Common logic for the run functions. | ||
function _run(address initialAdmin) | ||
internal | ||
returns ( | ||
LockupNFTDescriptor nftDescriptor, | ||
SablierLockupDynamic lockupDynamic, | ||
SablierLockupLinear lockupLinear, | ||
SablierLockupTranched lockupTranched, | ||
SablierBatchLockup batchLockup, | ||
SablierMerkleFactory merkleLockupFactory | ||
) | ||
{ | ||
bytes32 salt = constructCreate2Salt(); | ||
|
||
// Deploy Core. | ||
nftDescriptor = new LockupNFTDescriptor{ salt: salt }(); | ||
lockupDynamic = | ||
new SablierLockupDynamic{ salt: salt }(initialAdmin, nftDescriptor, segmentCountMap[block.chainid]); | ||
lockupLinear = new SablierLockupLinear{ salt: salt }(initialAdmin, nftDescriptor); | ||
lockupTranched = | ||
new SablierLockupTranched{ salt: salt }(initialAdmin, nftDescriptor, trancheCountMap[block.chainid]); | ||
|
||
// Deploy Periphery. | ||
batchLockup = new SablierBatchLockup{ salt: salt }(); | ||
merkleLockupFactory = new SablierMerkleFactory{ salt: salt }(); | ||
|
||
appendToFileDeployedAddresses( | ||
address(lockupDynamic), | ||
address(lockupLinear), | ||
address(lockupTranched), | ||
address(nftDescriptor), | ||
address(batchLockup), | ||
address(merkleLockupFactory) | ||
); | ||
} | ||
} |
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,79 @@ | ||
// SPDX-License-Identifier: GPL-3.0-or-later | ||
pragma solidity >=0.8.22 <0.9.0; | ||
|
||
import { LockupNFTDescriptor } from "../../src/core/LockupNFTDescriptor.sol"; | ||
import { SablierLockupDynamic } from "../../src/core/SablierLockupDynamic.sol"; | ||
import { SablierLockupLinear } from "../../src/core/SablierLockupLinear.sol"; | ||
import { SablierLockupTranched } from "../../src/core/SablierLockupTranched.sol"; | ||
import { SablierMerkleFactory } from "../../src/periphery/SablierMerkleFactory.sol"; | ||
import { SablierBatchLockup } from "../../src/periphery/SablierBatchLockup.sol"; | ||
|
||
import { DeploymentLogger } from "./DeploymentLogger.s.sol"; | ||
|
||
/// @notice Deploys the Lockup Protocol. | ||
contract DeployProtocol is DeploymentLogger("non_deterministic") { | ||
/// @dev Deploys the protocol with the admin set in `adminMap`. | ||
function run() | ||
public | ||
virtual | ||
broadcast | ||
returns ( | ||
LockupNFTDescriptor nftDescriptor, | ||
SablierLockupDynamic lockupDynamic, | ||
SablierLockupLinear lockupLinear, | ||
SablierLockupTranched lockupTranched, | ||
SablierBatchLockup batchLockup, | ||
SablierMerkleFactory merkleLockupFactory | ||
) | ||
{ | ||
address initialAdmin = adminMap[block.chainid]; | ||
|
||
(nftDescriptor, lockupDynamic, lockupLinear, lockupTranched, batchLockup, merkleLockupFactory) = | ||
_run(initialAdmin); | ||
} | ||
|
||
/// @dev Deploys the protocol with the given `initialAdmin`. | ||
function run(address initialAdmin) | ||
internal | ||
returns ( | ||
LockupNFTDescriptor nftDescriptor, | ||
SablierLockupDynamic lockupDynamic, | ||
SablierLockupLinear lockupLinear, | ||
SablierLockupTranched lockupTranched, | ||
SablierBatchLockup batchLockup, | ||
SablierMerkleFactory merkleLockupFactory | ||
) | ||
{ | ||
(nftDescriptor, lockupDynamic, lockupLinear, lockupTranched, batchLockup, merkleLockupFactory) = | ||
_run(initialAdmin); | ||
} | ||
|
||
/// @dev Common logic for the run functions. | ||
function _run(address initialAdmin) | ||
internal | ||
returns ( | ||
LockupNFTDescriptor nftDescriptor, | ||
SablierLockupDynamic lockupDynamic, | ||
SablierLockupLinear lockupLinear, | ||
SablierLockupTranched lockupTranched, | ||
SablierBatchLockup batchLockup, | ||
SablierMerkleFactory merkleLockupFactory | ||
) | ||
{ | ||
nftDescriptor = new LockupNFTDescriptor(); | ||
lockupDynamic = new SablierLockupDynamic(initialAdmin, nftDescriptor, segmentCountMap[block.chainid]); | ||
lockupLinear = new SablierLockupLinear(initialAdmin, nftDescriptor); | ||
lockupTranched = new SablierLockupTranched(initialAdmin, nftDescriptor, trancheCountMap[block.chainid]); | ||
batchLockup = new SablierBatchLockup(); | ||
merkleLockupFactory = new SablierMerkleFactory(); | ||
|
||
appendToFileDeployedAddresses( | ||
address(lockupDynamic), | ||
address(lockupLinear), | ||
address(lockupTranched), | ||
address(nftDescriptor), | ||
address(batchLockup), | ||
address(merkleLockupFactory) | ||
); | ||
} | ||
} |
Oops, something went wrong.