-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: andreivladbrg <andreivladbrg@gmail.com> refactor: abstract contract SablierMerkleLockup to SablierMerkleBase refactor: library MerkleLockup to MerkleBase refactor: contract MerkleLockupFactory to MerkleFactory test: add test for MerkleInstant contract chore: add CreateMerkleInstant script test: use super.setUp() where setUp() is redundant test: rename merkle-lockup folder to merkle test: rename MerkleLockup_Integration_Test contract to Merkle_Shared_Integration_Test test: fix event assersion in merkleLL and merkleLT refactor: rename MerkleLockup to Merkle Lockup in NatSpecs fix conflicts
- Loading branch information
1 parent
96295a8
commit 4bf8a98
Showing
87 changed files
with
1,448 additions
and
418 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// SPDX-License-Identifier: GPL-3.0-or-later | ||
pragma solidity >=0.8.22 <0.9.0; | ||
|
||
import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; | ||
|
||
import { ISablierMerkleFactory } from "../../src/periphery/interfaces/ISablierMerkleFactory.sol"; | ||
import { ISablierMerkleInstant } from "../../src/periphery/interfaces/ISablierMerkleInstant.sol"; | ||
import { MerkleBase } from "../../src/periphery/types/DataTypes.sol"; | ||
|
||
import { BaseScript } from "../Base.s.sol"; | ||
|
||
contract CreateMerkleInstant is BaseScript { | ||
/// @dev Deploy via Forge. | ||
function run() public virtual broadcast returns (ISablierMerkleInstant merkleInstant) { | ||
// Prepare the constructor parameters. | ||
// TODO: Update address once deployed. | ||
ISablierMerkleFactory merkleFactory = ISablierMerkleFactory(0xF35aB407CF28012Ba57CAF5ee2f6d6E4420253bc); | ||
|
||
MerkleBase.ConstructorParams memory baseParams; | ||
baseParams.asset = IERC20(0x6B175474E89094C44Da98b954EedeAC495271d0F); | ||
baseParams.expiration = uint40(block.timestamp + 30 days); | ||
baseParams.initialAdmin = 0x79Fb3e81aAc012c08501f41296CCC145a1E15844; | ||
baseParams.ipfsCID = "QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"; | ||
baseParams.merkleRoot = 0x0000000000000000000000000000000000000000000000000000000000000000; | ||
baseParams.name = "The Boys Instant"; | ||
|
||
uint256 campaignTotalAmount = 10_000e18; | ||
uint256 recipientCount = 100; | ||
|
||
// Deploy MerkleInstant contract. | ||
merkleInstant = merkleFactory.createMerkleInstant(baseParams, campaignTotalAmount, recipientCount); | ||
} | ||
} |
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 |
---|---|---|
@@ -1,13 +1,13 @@ | ||
// SPDX-License-Identifier: GPL-3.0-or-later | ||
pragma solidity >=0.8.22 <0.9.0; | ||
|
||
import { SablierMerkleLockupFactory } from "../../src/periphery/SablierMerkleLockupFactory.sol"; | ||
import { SablierMerkleFactory } from "../../src/periphery/SablierMerkleFactory.sol"; | ||
|
||
import { BaseScript } from "../Base.s.sol"; | ||
|
||
contract DeployMerkleLockupFactory is BaseScript { | ||
contract DeployMerkleFactory is BaseScript { | ||
/// @dev Deploy via Forge. | ||
function run() public virtual broadcast returns (SablierMerkleLockupFactory merkleLockupFactory) { | ||
merkleLockupFactory = new SablierMerkleLockupFactory(); | ||
function run() public virtual broadcast returns (SablierMerkleFactory merkleFactory) { | ||
merkleFactory = new SablierMerkleFactory(); | ||
} | ||
} |
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,24 +1,24 @@ | ||
// SPDX-License-Identifier: GPL-3.0-or-later | ||
pragma solidity >=0.8.22 <0.9.0; | ||
|
||
import { SablierMerkleLockupFactory } from "../../src/periphery/SablierMerkleLockupFactory.sol"; | ||
import { SablierMerkleFactory } from "../../src/periphery/SablierMerkleFactory.sol"; | ||
import { SablierBatchLockup } from "../../src/periphery/SablierBatchLockup.sol"; | ||
|
||
import { BaseScript } from "../Base.s.sol"; | ||
|
||
/// @notice Deploys all Periphery contract in the following order: | ||
/// | ||
/// 1. {SablierBatchLockup} | ||
/// 2. {SablierMerkleLockupFactory} | ||
/// 2. {SablierMerkleFactory} | ||
contract DeployPeriphery is BaseScript { | ||
/// @dev Deploy via Forge. | ||
function run() | ||
public | ||
virtual | ||
broadcast | ||
returns (SablierBatchLockup batchLockup, SablierMerkleLockupFactory merkleLockupFactory) | ||
returns (SablierBatchLockup batchLockup, SablierMerkleFactory merkleFactory) | ||
{ | ||
batchLockup = new SablierBatchLockup(); | ||
merkleLockupFactory = new SablierMerkleLockupFactory(); | ||
merkleFactory = new SablierMerkleFactory(); | ||
} | ||
} |
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.