-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Provides a way to deploy legacy spaces and new spaces for testing (#546)
Co-authored-by: Shuhui Luo <[email protected]> Co-authored-by: Crystal Lemire <[email protected]>
- Loading branch information
1 parent
0c25464
commit 8ba36a6
Showing
167 changed files
with
6,923 additions
and
846 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
48 changes: 48 additions & 0 deletions
48
contracts/scripts/deployments/facets/DeployMockLegacyArchitect.s.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,48 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.23; | ||
|
||
//interfaces | ||
|
||
//libraries | ||
|
||
//contracts | ||
import {Deployer} from "contracts/scripts/common/Deployer.s.sol"; | ||
import {MockLegacyArchitect} from "contracts/test/mocks/legacy/MockLegacyArchitect.sol"; | ||
import {FacetHelper} from "contracts/test/diamond/Facet.t.sol"; | ||
|
||
contract DeployMockLegacyArchitect is FacetHelper, Deployer { | ||
constructor() { | ||
addSelector(MockLegacyArchitect.createSpace.selector); | ||
} | ||
|
||
function initializer() public pure override returns (bytes4) { | ||
return MockLegacyArchitect.__Architect_init.selector; | ||
} | ||
|
||
function makeInitData( | ||
address _spaceOwnerToken, | ||
address _userEntitlement, | ||
address _ruleEntitlement, | ||
address _legacyRuleEntitlement | ||
) public pure returns (bytes memory) { | ||
return | ||
abi.encodeWithSelector( | ||
initializer(), | ||
_spaceOwnerToken, | ||
_userEntitlement, | ||
_ruleEntitlement, | ||
_legacyRuleEntitlement | ||
); | ||
} | ||
|
||
function versionName() public pure override returns (string memory) { | ||
return "legacyArchitectFacet"; | ||
} | ||
|
||
function __deploy(address deployer) public override returns (address) { | ||
vm.startBroadcast(deployer); | ||
MockLegacyArchitect architect = new MockLegacyArchitect(); | ||
vm.stopBroadcast(); | ||
return address(architect); | ||
} | ||
} |
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.