@towns-protocol/contracts 0.0.452 → 0.0.455
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/membership_architecture.md +23 -6
- package/package.json +6 -6
- package/scripts/common/Interaction.s.sol +3 -3
- package/scripts/deployments/diamonds/DeployBaseRegistry.s.sol +1 -4
- package/scripts/deployments/diamonds/DeploySpace.s.sol +1 -9
- package/scripts/deployments/diamonds/DeploySpaceFactory.s.sol +1 -5
- package/scripts/deployments/facets/DeployAppFactoryFacet.s.sol +3 -3
- package/scripts/deployments/facets/DeployAppInstallerFacet.s.sol +3 -3
- package/scripts/deployments/facets/DeployAppRegistryFacet.s.sol +3 -3
- package/scripts/deployments/facets/DeployArchitect.s.sol +3 -3
- package/scripts/deployments/facets/DeployAttestationRegistry.s.sol +3 -3
- package/scripts/deployments/facets/DeployERC721ANonTransferable.s.sol +3 -3
- package/scripts/deployments/facets/DeployFeatureManager.s.sol +3 -3
- package/scripts/deployments/facets/DeployMainnetDelegation.s.sol +3 -3
- package/scripts/deployments/facets/DeployMembershipMetadata.s.sol +3 -3
- package/scripts/deployments/facets/DeployMerkleAirdrop.s.sol +3 -3
- package/scripts/deployments/facets/DeployMetadata.s.sol +3 -3
- package/scripts/deployments/facets/DeployMockLegacyArchitect.s.sol +3 -3
- package/scripts/deployments/facets/DeployNodeOperator.s.sol +3 -3
- package/scripts/deployments/facets/DeployPartnerRegistry.s.sol +3 -3
- package/scripts/deployments/facets/DeployPricingModules.s.sol +3 -3
- package/scripts/deployments/facets/DeploySchemaRegistry.s.sol +3 -3
- package/scripts/deployments/facets/DeploySpaceFactoryInit.s.sol +3 -3
- package/scripts/deployments/facets/DeploySpaceOwnerFacet.s.sol +3 -3
- package/scripts/deployments/facets/DeployTokenMigration.s.sol +3 -3
- package/scripts/deployments/facets/DeployXChain.s.sol +3 -3
- package/scripts/deployments/utils/DeployAccountFactory.s.sol +3 -3
- package/scripts/deployments/utils/DeployEntitlementGatedExample.s.sol +3 -3
- package/scripts/deployments/utils/DeployEntrypoint.s.sol +3 -3
- package/scripts/deployments/utils/DeployMember.s.sol +3 -3
- package/scripts/deployments/utils/DeployMockLegacyMembership.s.sol +3 -3
- package/scripts/deployments/utils/DeployMockMessenger.s.sol +3 -3
- package/scripts/deployments/utils/DeploySpaceProxyInitializer.s.sol +3 -3
- package/scripts/deployments/utils/DeployTieredLogPricingV2.s.sol +3 -3
- package/scripts/deployments/utils/DeployTieredLogPricingV3.s.sol +3 -3
- package/scripts/deployments/utils/DeployTownsBase.s.sol +3 -3
- package/scripts/deployments/utils/DeployTownsMainnet.s.sol +3 -3
- package/scripts/deployments/utils/pricing/TieredLogPricing.s.sol +3 -3
- package/scripts/interactions/InteractAirdrop.s.sol +3 -3
- package/scripts/interactions/InteractBaseBridge.s.sol +3 -3
- package/scripts/interactions/InteractRegisterApp.s.sol +2 -2
- package/scripts/interactions/InteractRiverRegistrySetTrimByStreamId.s.sol +44 -0
- package/scripts/interactions/helpers/RiverConfigValues.sol +1 -2
- package/src/account/facets/app/AppManagerFacet.sol +43 -14
- package/src/account/facets/app/AppManagerMod.sol +311 -278
- package/src/account/facets/hub/AccountHubFacet.sol +12 -11
- package/src/account/facets/hub/AccountHubMod.sol +117 -116
- package/src/account/facets/tipping/AccountTippingFacet.sol +10 -9
- package/src/account/facets/tipping/AccountTippingMod.sol +133 -124
- package/src/apps/modules/subscription/ISubscriptionModule.sol +40 -43
- package/src/apps/modules/subscription/SubscriptionModuleBase.sol +41 -16
- package/src/apps/modules/subscription/SubscriptionModuleFacet.sol +113 -105
- package/src/apps/modules/subscription/SubscriptionModuleStorage.sol +2 -1
- package/src/base/registry/facets/checker/EntitlementChecker.sol +43 -17
- package/src/river/registry/facets/stream/StreamRegistry.sol +4 -1
- package/src/spaces/facets/ProtocolFeeLib.sol +43 -0
- package/src/spaces/facets/membership/IMembership.sol +6 -1
- package/src/spaces/facets/membership/MembershipFacet.sol +16 -7
- package/src/spaces/facets/membership/join/MembershipJoin.sol +34 -23
- package/src/spaces/facets/tipping/TippingBase.sol +10 -26
- package/src/tokens/Member.sol +3 -4
- package/src/utils/libraries/CurrencyTransfer.sol +6 -2
- package/scripts/interactions/InteractRiverRegistrySetFreq.s.sol +0 -27
|
@@ -19,8 +19,12 @@ MembershipFacet (external interface)
|
|
|
19
19
|
├─ PointsBase (rewards points)
|
|
20
20
|
└─ ERC721ABase (NFT implementation)
|
|
21
21
|
|
|
22
|
-
SpaceEntitlementGated (
|
|
22
|
+
SpaceEntitlementGated (xchain/SpaceEntitlementGated.sol)
|
|
23
23
|
└─ Overrides _onEntitlementCheckResultPosted()
|
|
24
|
+
|
|
25
|
+
ProtocolFeeLib (ProtocolFeeLib.sol)
|
|
26
|
+
└─ Wraps FeeManager.chargeFee with ERC20 approval handling
|
|
27
|
+
└─ Used by: MembershipJoin, TippingBase
|
|
24
28
|
```
|
|
25
29
|
|
|
26
30
|
### Storage Architecture
|
|
@@ -67,6 +71,8 @@ Memberships can be priced in:
|
|
|
67
71
|
|
|
68
72
|
Currency validation happens in `_setMembershipCurrency()` which requires the token to have an enabled fee configuration in FeeManager.
|
|
69
73
|
|
|
74
|
+
**Note**: Rewards points (`_mintMembershipPoints`) are only minted for native ETH payments. ERC20 payments require an oracle for point calculation.
|
|
75
|
+
|
|
70
76
|
## Core Flow: Join → Entitlement Check → Token
|
|
71
77
|
|
|
72
78
|
### Happy Path (Local Entitlement)
|
|
@@ -84,10 +90,10 @@ User: joinSpace(receiver) + payment
|
|
|
84
90
|
│ └─ ✓ User has local entitlement → PASS
|
|
85
91
|
│
|
|
86
92
|
├─ Charge for Join
|
|
87
|
-
│ ├─ Protocol fee → Platform
|
|
93
|
+
│ ├─ Protocol fee → Platform (via FeeManager)
|
|
88
94
|
│ ├─ Partner fee → Partner (if any)
|
|
89
95
|
│ ├─ Referral fee → Referrer (if any)
|
|
90
|
-
│ └─ Base price
|
|
96
|
+
│ └─ Base price remains in contract as revenue
|
|
91
97
|
│
|
|
92
98
|
├─ Refund Excess (if overpaid)
|
|
93
99
|
│
|
|
@@ -218,10 +224,21 @@ function _releaseCapturedValue(bytes32 transactionId, uint256 amount) internal
|
|
|
218
224
|
### Fee Distribution
|
|
219
225
|
|
|
220
226
|
```solidity
|
|
227
|
+
// MembershipJoin.sol - pays protocol fee via FeeManager
|
|
228
|
+
function _payProtocolFee(address currency, uint256 basePrice, uint256 expectedFee) internal
|
|
229
|
+
|
|
230
|
+
// ProtocolFeeLib.sol - shared fee charging logic
|
|
231
|
+
function charge(
|
|
232
|
+
address spaceFactory, // FeeManager address
|
|
233
|
+
bytes32 feeType, // fee type identifier
|
|
234
|
+
address user, // payer (msg.sender)
|
|
235
|
+
address currency, // NATIVE_TOKEN or ERC20
|
|
236
|
+
uint256 amount, // base price for fee calculation
|
|
237
|
+
uint256 expectedFee // pre-calculated fee amount
|
|
238
|
+
) internal returns (uint256 protocolFee)
|
|
239
|
+
|
|
221
240
|
// MembershipBase.sol
|
|
222
|
-
function
|
|
223
|
-
internal returns (uint256 protocolFee)
|
|
224
|
-
function _transferIn(address from, uint256 amount) internal returns (uint256)
|
|
241
|
+
function _transferIn(address currency, address from, uint256 amount) internal returns (uint256)
|
|
225
242
|
```
|
|
226
243
|
|
|
227
244
|
### Entitlement Checking
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@towns-protocol/contracts",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.455",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"clean": "forge clean",
|
|
6
6
|
"compile": "forge build",
|
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
"@openzeppelin/contracts": "^5.4.0",
|
|
21
21
|
"@openzeppelin/contracts-upgradeable": "^5.4.0",
|
|
22
22
|
"@prb/math": "^4.1.0",
|
|
23
|
-
"@towns-protocol/diamond": "^0.
|
|
23
|
+
"@towns-protocol/diamond": "^0.7.0",
|
|
24
24
|
"@uniswap/permit2": "github:towns-protocol/permit2#v1.0.0",
|
|
25
25
|
"account-abstraction": "github:eth-infinitism/account-abstraction#v0.7.0",
|
|
26
26
|
"crypto-lib": "github:towns-protocol/crypto-lib#v1.0.1",
|
|
27
27
|
"modular-account": "github:towns-protocol/modular-account#v1.0.0",
|
|
28
|
-
"solady": "^0.1.
|
|
28
|
+
"solady": "^0.1.26"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@layerzerolabs/lz-evm-messagelib-v2": "^3.0.112",
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
"@layerzerolabs/oapp-evm": "^0.3.2",
|
|
34
34
|
"@openzeppelin/merkle-tree": "^1.0.8",
|
|
35
35
|
"@prb/test": "^0.6.4",
|
|
36
|
-
"@towns-protocol/prettier-config": "^0.0.
|
|
36
|
+
"@towns-protocol/prettier-config": "^0.0.455",
|
|
37
37
|
"@wagmi/cli": "^2.2.0",
|
|
38
|
-
"forge-std": "github:foundry-rs/forge-std#v1.
|
|
38
|
+
"forge-std": "github:foundry-rs/forge-std#v1.12.0",
|
|
39
39
|
"prettier": "^3.5.3",
|
|
40
40
|
"prettier-plugin-solidity": "^1.4.2",
|
|
41
41
|
"solhint": "^5.0.5",
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"publishConfig": {
|
|
51
51
|
"access": "public"
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "9a5d511378b12fca4eb316895e0bbfe137de137b"
|
|
54
54
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
2
|
pragma solidity ^0.8.0;
|
|
3
3
|
|
|
4
|
-
//interfaces
|
|
4
|
+
// interfaces
|
|
5
5
|
|
|
6
|
-
//libraries
|
|
6
|
+
// libraries
|
|
7
7
|
|
|
8
|
-
//contracts
|
|
8
|
+
// contracts
|
|
9
9
|
|
|
10
10
|
import {DeployBase} from "./DeployBase.s.sol";
|
|
11
11
|
import {Script} from "forge-std/Script.sol";
|
|
@@ -88,16 +88,13 @@ contract DeployBaseRegistry is IDiamondInitHelper, DiamondHelper, Deployer {
|
|
|
88
88
|
facetHelper.add("NodeOperatorFacet");
|
|
89
89
|
facetHelper.add("MetadataFacet");
|
|
90
90
|
facetHelper.add("EntitlementChecker");
|
|
91
|
-
|
|
92
|
-
facetHelper.deployBatch(deployer);
|
|
93
|
-
|
|
94
91
|
facetHelper.add("RewardsDistributionV2");
|
|
95
92
|
facetHelper.add("SpaceDelegationFacet");
|
|
96
93
|
facetHelper.add("MainnetDelegation");
|
|
97
94
|
facetHelper.add("EIP712Facet");
|
|
98
95
|
facetHelper.add("XChain");
|
|
99
96
|
|
|
100
|
-
// Deploy all facets
|
|
97
|
+
// Deploy all facets
|
|
101
98
|
facetHelper.deployBatch(deployer);
|
|
102
99
|
|
|
103
100
|
// Deploy or retrieve the towns token
|
|
@@ -103,20 +103,12 @@ contract DeploySpace is IDiamondInitHelper, DiamondHelper, Deployer {
|
|
|
103
103
|
facetHelper.add("MembershipFacet");
|
|
104
104
|
facetHelper.add("MembershipMetadata");
|
|
105
105
|
facetHelper.add("EntitlementDataQueryable");
|
|
106
|
-
|
|
107
|
-
// Deploy the first batch of facets
|
|
108
|
-
facetHelper.deployBatch(deployer);
|
|
109
|
-
|
|
110
106
|
facetHelper.add("EntitlementsManager");
|
|
111
107
|
facetHelper.add("Roles");
|
|
112
108
|
facetHelper.add("Channels");
|
|
113
109
|
facetHelper.add("TokenPausableFacet");
|
|
114
110
|
facetHelper.add("ReferralsFacet");
|
|
115
111
|
facetHelper.add("ReviewFacet");
|
|
116
|
-
|
|
117
|
-
// Deploy the second batch of facets
|
|
118
|
-
facetHelper.deployBatch(deployer);
|
|
119
|
-
|
|
120
112
|
facetHelper.add("SpaceEntitlementGated");
|
|
121
113
|
facetHelper.add("SwapFacet");
|
|
122
114
|
facetHelper.add("TippingFacet");
|
|
@@ -128,7 +120,7 @@ contract DeploySpace is IDiamondInitHelper, DiamondHelper, Deployer {
|
|
|
128
120
|
facetHelper.add("MockLegacyMembership");
|
|
129
121
|
}
|
|
130
122
|
|
|
131
|
-
// Deploy
|
|
123
|
+
// Deploy all facets
|
|
132
124
|
facetHelper.deployBatch(deployer);
|
|
133
125
|
|
|
134
126
|
// deploy and add facets one by one to avoid stack too deep
|
|
@@ -145,10 +145,6 @@ contract DeploySpaceFactory is IDiamondInitHelper, DiamondHelper, Deployer {
|
|
|
145
145
|
facetHelper.add("PricingModulesFacet");
|
|
146
146
|
facetHelper.add("ImplementationRegistryFacet");
|
|
147
147
|
facetHelper.add("SCL_EIP6565");
|
|
148
|
-
|
|
149
|
-
// Deploy the second batch of facets
|
|
150
|
-
facetHelper.deployBatch(deployer);
|
|
151
|
-
|
|
152
148
|
facetHelper.add("WalletLink");
|
|
153
149
|
facetHelper.add("EIP712Facet");
|
|
154
150
|
facetHelper.add("PartnerRegistry");
|
|
@@ -162,7 +158,7 @@ contract DeploySpaceFactory is IDiamondInitHelper, DiamondHelper, Deployer {
|
|
|
162
158
|
facetHelper.add("MockLegacyArchitect");
|
|
163
159
|
}
|
|
164
160
|
|
|
165
|
-
// Deploy
|
|
161
|
+
// Deploy all facets
|
|
166
162
|
facetHelper.deployBatch(deployer);
|
|
167
163
|
|
|
168
164
|
if (isAnvil()) {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
2
|
pragma solidity ^0.8.23;
|
|
3
3
|
|
|
4
|
-
//interfaces
|
|
4
|
+
// interfaces
|
|
5
5
|
import {IDiamond} from "@towns-protocol/diamond/src/IDiamond.sol";
|
|
6
6
|
|
|
7
|
-
//libraries
|
|
7
|
+
// libraries
|
|
8
8
|
|
|
9
|
-
//contracts
|
|
9
|
+
// contracts
|
|
10
10
|
import {LibDeploy} from "@towns-protocol/diamond/src/utils/LibDeploy.sol";
|
|
11
11
|
import {AppFactoryFacet} from "src/apps/facets/factory/AppFactoryFacet.sol";
|
|
12
12
|
import {DynamicArrayLib} from "solady/utils/DynamicArrayLib.sol";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
2
|
pragma solidity ^0.8.23;
|
|
3
3
|
|
|
4
|
-
//interfaces
|
|
4
|
+
// interfaces
|
|
5
5
|
import {IDiamond} from "@towns-protocol/diamond/src/IDiamond.sol";
|
|
6
6
|
|
|
7
|
-
//libraries
|
|
7
|
+
// libraries
|
|
8
8
|
|
|
9
|
-
//contracts
|
|
9
|
+
// contracts
|
|
10
10
|
import {LibDeploy} from "@towns-protocol/diamond/src/utils/LibDeploy.sol";
|
|
11
11
|
import {AppInstallerFacet} from "src/apps/facets/installer/AppInstallerFacet.sol";
|
|
12
12
|
import {DynamicArrayLib} from "solady/utils/DynamicArrayLib.sol";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
2
|
pragma solidity ^0.8.23;
|
|
3
3
|
|
|
4
|
-
//interfaces
|
|
4
|
+
// interfaces
|
|
5
5
|
import {IDiamond} from "@towns-protocol/diamond/src/IDiamond.sol";
|
|
6
6
|
import {ISchemaResolver} from "@ethereum-attestation-service/eas-contracts/resolver/ISchemaResolver.sol";
|
|
7
7
|
|
|
8
|
-
//libraries
|
|
8
|
+
// libraries
|
|
9
9
|
|
|
10
|
-
//contracts
|
|
10
|
+
// contracts
|
|
11
11
|
import {LibDeploy} from "@towns-protocol/diamond/src/utils/LibDeploy.sol";
|
|
12
12
|
import {AppRegistryFacet} from "src/apps/facets/registry/AppRegistryFacet.sol";
|
|
13
13
|
import {DynamicArrayLib} from "solady/utils/DynamicArrayLib.sol";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
2
|
pragma solidity ^0.8.23;
|
|
3
3
|
|
|
4
|
-
//interfaces
|
|
4
|
+
// interfaces
|
|
5
5
|
import {IDiamond} from "@towns-protocol/diamond/src/IDiamond.sol";
|
|
6
6
|
import {IArchitect} from "src/factory/facets/architect/IArchitect.sol";
|
|
7
7
|
|
|
8
|
-
//libraries
|
|
8
|
+
// libraries
|
|
9
9
|
import {LibDeploy} from "@towns-protocol/diamond/src/utils/LibDeploy.sol";
|
|
10
10
|
|
|
11
|
-
//contracts
|
|
11
|
+
// contracts
|
|
12
12
|
import {Architect} from "src/factory/facets/architect/Architect.sol";
|
|
13
13
|
|
|
14
14
|
library DeployArchitect {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
2
|
pragma solidity ^0.8.23;
|
|
3
3
|
|
|
4
|
-
//interfaces
|
|
4
|
+
// interfaces
|
|
5
5
|
import {IDiamond} from "@towns-protocol/diamond/src/IDiamond.sol";
|
|
6
6
|
|
|
7
|
-
//libraries
|
|
7
|
+
// libraries
|
|
8
8
|
|
|
9
|
-
//contracts
|
|
9
|
+
// contracts
|
|
10
10
|
import {LibDeploy} from "@towns-protocol/diamond/src/utils/LibDeploy.sol";
|
|
11
11
|
import {AttestationRegistry} from "src/apps/facets/attest/AttestationRegistry.sol";
|
|
12
12
|
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
2
|
pragma solidity ^0.8.23;
|
|
3
3
|
|
|
4
|
-
//interfaces
|
|
4
|
+
// interfaces
|
|
5
5
|
import {IDiamond} from "@towns-protocol/diamond/src/IDiamond.sol";
|
|
6
6
|
import {IERC721A} from "src/diamond/facets/token/ERC721A/IERC721A.sol";
|
|
7
7
|
|
|
8
|
-
//libraries
|
|
8
|
+
// libraries
|
|
9
9
|
import {LibDeploy} from "@towns-protocol/diamond/src/utils/LibDeploy.sol";
|
|
10
10
|
|
|
11
|
-
//contracts
|
|
11
|
+
// contracts
|
|
12
12
|
import {ERC721A} from "src/diamond/facets/token/ERC721A/ERC721A.sol";
|
|
13
13
|
|
|
14
14
|
library DeployERC721ANonTransferable {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
2
|
pragma solidity ^0.8.23;
|
|
3
3
|
|
|
4
|
-
//interfaces
|
|
4
|
+
// interfaces
|
|
5
5
|
import {IDiamond} from "@towns-protocol/diamond/src/IDiamond.sol";
|
|
6
6
|
|
|
7
|
-
//libraries
|
|
7
|
+
// libraries
|
|
8
8
|
import {LibDeploy} from "@towns-protocol/diamond/src/utils/LibDeploy.sol";
|
|
9
9
|
|
|
10
|
-
//contracts
|
|
10
|
+
// contracts
|
|
11
11
|
import {FeatureManagerFacet} from "src/factory/facets/feature/FeatureManagerFacet.sol";
|
|
12
12
|
|
|
13
13
|
library DeployFeatureManager {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
2
|
pragma solidity ^0.8.23;
|
|
3
3
|
|
|
4
|
-
//interfaces
|
|
4
|
+
// interfaces
|
|
5
5
|
|
|
6
|
-
//libraries
|
|
6
|
+
// libraries
|
|
7
7
|
import {LibDeploy} from "@towns-protocol/diamond/src/utils/LibDeploy.sol";
|
|
8
8
|
import {DynamicArrayLib} from "solady/utils/DynamicArrayLib.sol";
|
|
9
9
|
|
|
10
|
-
//contracts
|
|
10
|
+
// contracts
|
|
11
11
|
import {MainnetDelegation} from "src/base/registry/facets/mainnet/MainnetDelegation.sol";
|
|
12
12
|
|
|
13
13
|
library DeployMainnetDelegation {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
2
|
pragma solidity ^0.8.23;
|
|
3
3
|
|
|
4
|
-
//interfaces
|
|
4
|
+
// interfaces
|
|
5
5
|
import {IDiamond} from "@towns-protocol/diamond/src/Diamond.sol";
|
|
6
6
|
import {IMembershipMetadata} from "src/spaces/facets/membership/metadata/IMembershipMetadata.sol";
|
|
7
7
|
|
|
8
|
-
//libraries
|
|
8
|
+
// libraries
|
|
9
9
|
import {LibDeploy} from "@towns-protocol/diamond/src/utils/LibDeploy.sol";
|
|
10
10
|
|
|
11
|
-
//contracts
|
|
11
|
+
// contracts
|
|
12
12
|
|
|
13
13
|
library DeployMembershipMetadata {
|
|
14
14
|
function selectors() internal pure returns (bytes4[] memory res) {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
2
|
pragma solidity ^0.8.23;
|
|
3
3
|
|
|
4
|
-
//interfaces
|
|
4
|
+
// interfaces
|
|
5
5
|
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
|
|
6
6
|
import {IDiamond} from "@towns-protocol/diamond/src/IDiamond.sol";
|
|
7
7
|
|
|
8
|
-
//libraries
|
|
8
|
+
// libraries
|
|
9
9
|
import {LibDeploy} from "@towns-protocol/diamond/src/utils/LibDeploy.sol";
|
|
10
10
|
|
|
11
|
-
//contracts
|
|
11
|
+
// contracts
|
|
12
12
|
import {MerkleAirdrop} from "src/utils/airdrop/merkle/MerkleAirdrop.sol";
|
|
13
13
|
|
|
14
14
|
library DeployMerkleAirdrop {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
2
|
pragma solidity ^0.8.23;
|
|
3
3
|
|
|
4
|
-
//interfaces
|
|
4
|
+
// interfaces
|
|
5
5
|
import {IDiamond} from "@towns-protocol/diamond/src/IDiamond.sol";
|
|
6
6
|
|
|
7
|
-
//libraries
|
|
7
|
+
// libraries
|
|
8
8
|
import {LibDeploy} from "@towns-protocol/diamond/src/utils/LibDeploy.sol";
|
|
9
9
|
|
|
10
|
-
//contracts
|
|
10
|
+
// contracts
|
|
11
11
|
import {MetadataFacet} from "src/diamond/facets/metadata/MetadataFacet.sol";
|
|
12
12
|
|
|
13
13
|
library DeployMetadata {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
2
|
pragma solidity ^0.8.23;
|
|
3
3
|
|
|
4
|
-
//interfaces
|
|
4
|
+
// interfaces
|
|
5
5
|
import {IDiamond} from "@towns-protocol/diamond/src/IDiamond.sol";
|
|
6
6
|
|
|
7
|
-
//libraries
|
|
7
|
+
// libraries
|
|
8
8
|
import {LibDeploy} from "@towns-protocol/diamond/src/utils/LibDeploy.sol";
|
|
9
9
|
|
|
10
|
-
//contracts
|
|
10
|
+
// contracts
|
|
11
11
|
import {MockLegacyArchitect} from "test/mocks/legacy/MockLegacyArchitect.sol";
|
|
12
12
|
|
|
13
13
|
library DeployMockLegacyArchitect {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
2
|
pragma solidity ^0.8.23;
|
|
3
3
|
|
|
4
|
-
//interfaces
|
|
4
|
+
// interfaces
|
|
5
5
|
import {IDiamond} from "@towns-protocol/diamond/src/IDiamond.sol";
|
|
6
6
|
|
|
7
|
-
//libraries
|
|
7
|
+
// libraries
|
|
8
8
|
import {LibDeploy} from "@towns-protocol/diamond/src/utils/LibDeploy.sol";
|
|
9
9
|
import {DynamicArrayLib} from "solady/utils/DynamicArrayLib.sol";
|
|
10
10
|
|
|
11
|
-
//contracts
|
|
11
|
+
// contracts
|
|
12
12
|
import {NodeOperatorFacet} from "src/base/registry/facets/operator/NodeOperatorFacet.sol";
|
|
13
13
|
|
|
14
14
|
library DeployNodeOperator {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
2
|
pragma solidity ^0.8.23;
|
|
3
3
|
|
|
4
|
-
//interfaces
|
|
4
|
+
// interfaces
|
|
5
5
|
import {IDiamond} from "@towns-protocol/diamond/src/IDiamond.sol";
|
|
6
6
|
|
|
7
|
-
//libraries
|
|
7
|
+
// libraries
|
|
8
8
|
import {LibDeploy} from "@towns-protocol/diamond/src/utils/LibDeploy.sol";
|
|
9
9
|
|
|
10
|
-
//contracts
|
|
10
|
+
// contracts
|
|
11
11
|
import {PartnerRegistry} from "src/factory/facets/partner/PartnerRegistry.sol";
|
|
12
12
|
|
|
13
13
|
library DeployPartnerRegistry {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
2
|
pragma solidity ^0.8.23;
|
|
3
3
|
|
|
4
|
-
//interfaces
|
|
4
|
+
// interfaces
|
|
5
5
|
import {IDiamond} from "@towns-protocol/diamond/src/IDiamond.sol";
|
|
6
6
|
|
|
7
|
-
//libraries
|
|
7
|
+
// libraries
|
|
8
8
|
import {LibDeploy} from "@towns-protocol/diamond/src/utils/LibDeploy.sol";
|
|
9
9
|
|
|
10
|
-
//contracts
|
|
10
|
+
// contracts
|
|
11
11
|
import {PricingModulesFacet} from "src/factory/facets/architect/pricing/PricingModulesFacet.sol";
|
|
12
12
|
|
|
13
13
|
library DeployPricingModules {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
2
|
pragma solidity ^0.8.23;
|
|
3
3
|
|
|
4
|
-
//interfaces
|
|
4
|
+
// interfaces
|
|
5
5
|
import {IDiamond} from "@towns-protocol/diamond/src/IDiamond.sol";
|
|
6
6
|
|
|
7
|
-
//libraries
|
|
7
|
+
// libraries
|
|
8
8
|
|
|
9
|
-
//contracts
|
|
9
|
+
// contracts
|
|
10
10
|
import {LibDeploy} from "@towns-protocol/diamond/src/utils/LibDeploy.sol";
|
|
11
11
|
import {SchemaRegistry} from "src/apps/facets/schema/SchemaRegistry.sol";
|
|
12
12
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
// SPDX-License-Identifier: Apache-2.0
|
|
2
2
|
pragma solidity ^0.8.19;
|
|
3
3
|
|
|
4
|
-
//interfaces
|
|
4
|
+
// interfaces
|
|
5
5
|
import {IDiamond} from "@towns-protocol/diamond/src/IDiamond.sol";
|
|
6
6
|
|
|
7
|
-
//libraries
|
|
7
|
+
// libraries
|
|
8
8
|
import {LibDeploy} from "@towns-protocol/diamond/src/utils/LibDeploy.sol";
|
|
9
9
|
|
|
10
|
-
//contracts
|
|
10
|
+
// contracts
|
|
11
11
|
import {SpaceFactoryInit} from "src/factory/SpaceFactoryInit.sol";
|
|
12
12
|
|
|
13
13
|
library DeploySpaceFactoryInit {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
2
|
pragma solidity ^0.8.23;
|
|
3
3
|
|
|
4
|
-
//interfaces
|
|
4
|
+
// interfaces
|
|
5
5
|
import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";
|
|
6
6
|
import {IERC6372} from "@openzeppelin/contracts/interfaces/IERC6372.sol";
|
|
7
7
|
import {IDiamond} from "@towns-protocol/diamond/src/Diamond.sol";
|
|
8
8
|
|
|
9
|
-
//libraries
|
|
9
|
+
// libraries
|
|
10
10
|
import {LibDeploy} from "@towns-protocol/diamond/src/utils/LibDeploy.sol";
|
|
11
11
|
import {DynamicArrayLib} from "solady/utils/DynamicArrayLib.sol";
|
|
12
12
|
import {DeployERC721A} from "./DeployERC721A.s.sol";
|
|
13
13
|
|
|
14
|
-
//contracts
|
|
14
|
+
// contracts
|
|
15
15
|
import {SpaceOwner} from "src/spaces/facets/owner/SpaceOwner.sol";
|
|
16
16
|
|
|
17
17
|
library DeploySpaceOwnerFacet {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
2
|
pragma solidity ^0.8.23;
|
|
3
3
|
|
|
4
|
-
//interfaces
|
|
4
|
+
// interfaces
|
|
5
5
|
import {IDiamond} from "@towns-protocol/diamond/src/Diamond.sol";
|
|
6
6
|
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
|
|
7
7
|
|
|
8
|
-
//libraries
|
|
8
|
+
// libraries
|
|
9
9
|
import {LibDeploy} from "@towns-protocol/diamond/src/utils/LibDeploy.sol";
|
|
10
10
|
|
|
11
|
-
//contracts
|
|
11
|
+
// contracts
|
|
12
12
|
import {TokenMigrationFacet} from "src/tokens/migration/TokenMigrationFacet.sol";
|
|
13
13
|
|
|
14
14
|
library DeployTokenMigration {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
2
|
pragma solidity ^0.8.23;
|
|
3
3
|
|
|
4
|
-
//interfaces
|
|
4
|
+
// interfaces
|
|
5
5
|
import {IDiamond} from "@towns-protocol/diamond/src/IDiamond.sol";
|
|
6
6
|
|
|
7
|
-
//libraries
|
|
7
|
+
// libraries
|
|
8
8
|
import {LibDeploy} from "@towns-protocol/diamond/src/utils/LibDeploy.sol";
|
|
9
9
|
|
|
10
|
-
//contracts
|
|
10
|
+
// contracts
|
|
11
11
|
import {XChain} from "src/base/registry/facets/xchain/XChain.sol";
|
|
12
12
|
|
|
13
13
|
library DeployXChain {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
2
|
pragma solidity ^0.8.23;
|
|
3
3
|
|
|
4
|
-
//interfaces
|
|
4
|
+
// interfaces
|
|
5
5
|
|
|
6
|
-
//libraries
|
|
6
|
+
// libraries
|
|
7
7
|
|
|
8
|
-
//contracts
|
|
8
|
+
// contracts
|
|
9
9
|
import {EntryPoint} from "@eth-infinitism/account-abstraction/core/EntryPoint.sol";
|
|
10
10
|
import {SimpleAccountFactory} from "@eth-infinitism/account-abstraction/samples/SimpleAccountFactory.sol";
|
|
11
11
|
import {Deployer} from "scripts/common/Deployer.s.sol";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
2
|
pragma solidity ^0.8.23;
|
|
3
3
|
|
|
4
|
-
//interfaces
|
|
4
|
+
// interfaces
|
|
5
5
|
import {IEntitlementChecker} from "src/base/registry/facets/checker/IEntitlementChecker.sol";
|
|
6
6
|
|
|
7
|
-
//libraries
|
|
7
|
+
// libraries
|
|
8
8
|
|
|
9
|
-
//contracts
|
|
9
|
+
// contracts
|
|
10
10
|
import {Deployer} from "scripts/common/Deployer.s.sol";
|
|
11
11
|
import {MockEntitlementGated} from "test/mocks/MockEntitlementGated.sol";
|
|
12
12
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
2
|
pragma solidity ^0.8.23;
|
|
3
3
|
|
|
4
|
-
//interfaces
|
|
4
|
+
// interfaces
|
|
5
5
|
|
|
6
|
-
//libraries
|
|
6
|
+
// libraries
|
|
7
7
|
|
|
8
|
-
//contracts
|
|
8
|
+
// contracts
|
|
9
9
|
import {EntryPoint} from "@eth-infinitism/account-abstraction/core/EntryPoint.sol";
|
|
10
10
|
import {Deployer} from "scripts/common/Deployer.s.sol";
|
|
11
11
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
2
|
pragma solidity ^0.8.0;
|
|
3
3
|
|
|
4
|
-
//interfaces
|
|
4
|
+
// interfaces
|
|
5
5
|
|
|
6
|
-
//libraries
|
|
6
|
+
// libraries
|
|
7
7
|
import {MerkleTree} from "test/utils/MerkleTree.sol";
|
|
8
8
|
|
|
9
|
-
//contracts
|
|
9
|
+
// contracts
|
|
10
10
|
import {Deployer} from "scripts/common/Deployer.s.sol";
|
|
11
11
|
import {Member} from "src/tokens/Member.sol";
|
|
12
12
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
2
|
pragma solidity ^0.8.23;
|
|
3
3
|
|
|
4
|
-
//interfaces
|
|
4
|
+
// interfaces
|
|
5
5
|
import {IDiamond} from "@towns-protocol/diamond/src/Diamond.sol";
|
|
6
6
|
|
|
7
|
-
//libraries
|
|
7
|
+
// libraries
|
|
8
8
|
import {LibDeploy} from "@towns-protocol/diamond/src/utils/LibDeploy.sol";
|
|
9
9
|
|
|
10
|
-
//contracts
|
|
10
|
+
// contracts
|
|
11
11
|
import {MockLegacyMembership} from "test/mocks/legacy/membership/MockLegacyMembership.sol";
|
|
12
12
|
|
|
13
13
|
library DeployMockLegacyMembership {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
2
|
pragma solidity ^0.8.23;
|
|
3
3
|
|
|
4
|
-
//interfaces
|
|
4
|
+
// interfaces
|
|
5
5
|
|
|
6
|
-
//libraries
|
|
6
|
+
// libraries
|
|
7
7
|
|
|
8
|
-
//contracts
|
|
8
|
+
// contracts
|
|
9
9
|
import {Deployer} from "scripts/common/Deployer.s.sol";
|
|
10
10
|
import {MockMessenger} from "test/mocks/MockMessenger.sol";
|
|
11
11
|
|