@towns-protocol/contracts 0.0.425 → 0.0.427

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@towns-protocol/contracts",
3
- "version": "0.0.425",
3
+ "version": "0.0.427",
4
4
  "scripts": {
5
5
  "clean": "forge clean",
6
6
  "compile": "forge build",
@@ -33,7 +33,7 @@
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.425",
36
+ "@towns-protocol/prettier-config": "^0.0.427",
37
37
  "@wagmi/cli": "^2.2.0",
38
38
  "forge-std": "github:foundry-rs/forge-std#v1.10.0",
39
39
  "prettier": "^3.5.3",
@@ -53,5 +53,5 @@
53
53
  "publishConfig": {
54
54
  "access": "public"
55
55
  },
56
- "gitHead": "ae7d659371ac6e1222af926a4cdf6926a8c12e1c"
56
+ "gitHead": "2d6205b7f8bb6913d203745986ac5e9f110383ff"
57
57
  }
@@ -51,14 +51,6 @@ contract InteractPostDeploy is Interaction {
51
51
  IImplementationRegistry(spaceFactory).addImplementation(baseRegistry);
52
52
  IImplementationRegistry(spaceFactory).addImplementation(riverAirdrop);
53
53
  IImplementationRegistry(spaceFactory).addImplementation(appRegistry);
54
- IFeeManager(spaceFactory).setFeeConfig(
55
- FeeTypesLib.TIP_MEMBER,
56
- deployer,
57
- FeeCalculationMethod.PERCENT,
58
- 50,
59
- 0,
60
- true
61
- );
62
54
  ISubscriptionModule(subscriptionModule).setSpaceFactory(spaceFactory);
63
55
  IMainnetDelegation(baseRegistry).setProxyDelegation(proxyDelegation);
64
56
  IRewardsDistribution(baseRegistry).setRewardNotifier(deployer, true);
@@ -8,6 +8,9 @@ import {OwnableBase} from "@towns-protocol/diamond/src/facets/ownable/OwnableBas
8
8
  import {Facet} from "@towns-protocol/diamond/src/facets/Facet.sol";
9
9
  import {ReentrancyGuardTransient} from "solady/utils/ReentrancyGuardTransient.sol";
10
10
 
11
+ // libraries
12
+ import {FeeTypesLib} from "./FeeTypesLib.sol";
13
+
11
14
  /// @title FeeManagerFacet
12
15
  /// @notice Facet for unified fee management across the protocol
13
16
  contract FeeManagerFacet is
@@ -28,6 +31,7 @@ contract FeeManagerFacet is
28
31
 
29
32
  function __FeeManagerFacet__init_unchained(address protocolRecipient) internal {
30
33
  _setProtocolFeeRecipient(protocolRecipient);
34
+ _setInitialFeeConfigs(protocolRecipient);
31
35
  }
32
36
 
33
37
  /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
@@ -100,4 +104,36 @@ contract FeeManagerFacet is
100
104
  function getProtocolFeeRecipient() external view returns (address recipient) {
101
105
  return _getProtocolFeeRecipient();
102
106
  }
107
+
108
+ function _setInitialFeeConfigs(address protocolRecipient) internal {
109
+ // tipping fee
110
+ _setFeeConfig(
111
+ FeeTypesLib.TIP_MEMBER,
112
+ protocolRecipient,
113
+ FeeCalculationMethod.PERCENT,
114
+ 50,
115
+ 0,
116
+ true
117
+ );
118
+
119
+ // membership fee
120
+ _setFeeConfig(
121
+ FeeTypesLib.MEMBERSHIP,
122
+ protocolRecipient,
123
+ FeeCalculationMethod.HYBRID,
124
+ 1000, // 10%
125
+ 0.0005 ether,
126
+ true
127
+ );
128
+
129
+ // app installation fee
130
+ _setFeeConfig(
131
+ FeeTypesLib.APP_INSTALL,
132
+ protocolRecipient,
133
+ FeeCalculationMethod.HYBRID,
134
+ 1000, // 10%
135
+ 0.0005 ether,
136
+ true
137
+ );
138
+ }
103
139
  }