@towns-protocol/contracts 0.0.355 → 0.0.357

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.355",
3
+ "version": "0.0.357",
4
4
  "packageManager": "yarn@3.8.0",
5
5
  "scripts": {
6
6
  "build-types": "bash scripts/build-contract-types.sh",
@@ -35,7 +35,7 @@
35
35
  "@layerzerolabs/oapp-evm": "^0.3.2",
36
36
  "@openzeppelin/merkle-tree": "^1.0.8",
37
37
  "@prb/test": "^0.6.4",
38
- "@towns-protocol/prettier-config": "^0.0.355",
38
+ "@towns-protocol/prettier-config": "^0.0.357",
39
39
  "@typechain/ethers-v5": "^10.1.1",
40
40
  "@wagmi/cli": "^2.2.0",
41
41
  "forge-std": "github:foundry-rs/forge-std#v1.10.0",
@@ -57,5 +57,5 @@
57
57
  "publishConfig": {
58
58
  "access": "public"
59
59
  },
60
- "gitHead": "f0192ebd59ae6a99003a0753d1821713e2407bc5"
60
+ "gitHead": "a536e8ae3b2c739d1f81f5e95e9f0bcb5afb28a5"
61
61
  }
@@ -15,7 +15,7 @@ library DeploySubscriptionModuleFacet {
15
15
  using DynamicArrayLib for DynamicArrayLib.DynamicArray;
16
16
 
17
17
  function selectors() internal pure returns (bytes4[] memory res) {
18
- DynamicArrayLib.DynamicArray memory arr = DynamicArrayLib.p().reserve(19);
18
+ DynamicArrayLib.DynamicArray memory arr = DynamicArrayLib.p().reserve(20);
19
19
  arr.p(SubscriptionModuleFacet.moduleId.selector);
20
20
  arr.p(SubscriptionModuleFacet.onInstall.selector);
21
21
  arr.p(SubscriptionModuleFacet.onUninstall.selector);
@@ -28,6 +28,7 @@ library DeploySubscriptionModuleFacet {
28
28
  arr.p(SubscriptionModuleFacet.batchProcessRenewals.selector);
29
29
  arr.p(SubscriptionModuleFacet.getRenewalBuffer.selector);
30
30
  arr.p(SubscriptionModuleFacet.getSubscription.selector);
31
+ arr.p(SubscriptionModuleFacet.activateSubscription.selector);
31
32
  arr.p(SubscriptionModuleFacet.pauseSubscription.selector);
32
33
  arr.p(SubscriptionModuleFacet.getEntityIds.selector);
33
34
  arr.p(SubscriptionModuleFacet.isOperator.selector);
@@ -125,6 +125,17 @@ interface IAppRegistry is IAppRegistryBase {
125
125
  /// @return appId The attestation UID of the registered app
126
126
  function registerApp(ITownsApp app, address client) external payable returns (bytes32 appId);
127
127
 
128
+ /// @notice Upgrade an app
129
+ /// @param app The app address to update
130
+ /// @param client The client address part of the app's identity
131
+ /// @param appId The app ID to upgrade
132
+ /// @return appId The new app ID of the updated app
133
+ function upgradeApp(
134
+ ITownsApp app,
135
+ address client,
136
+ bytes32 appId
137
+ ) external payable returns (bytes32);
138
+
128
139
  /// @notice Remove a app from the registry
129
140
  /// @param appId The app ID to remove
130
141
  function removeApp(bytes32 appId) external;
@@ -147,6 +158,11 @@ interface IAppRegistry is IAppRegistryBase {
147
158
  /// @param data The data to pass to the app's onUninstall function
148
159
  function uninstallApp(ITownsApp app, IAppAccount account, bytes calldata data) external;
149
160
 
161
+ /// @notice Update an app to the latest version
162
+ /// @param app The app address to update
163
+ /// @param account The account to update the app to
164
+ function updateApp(ITownsApp app, IAppAccount account) external;
165
+
150
166
  /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
151
167
  /* Admin */
152
168
  /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/