@towns-protocol/contracts 0.0.378 → 0.0.380

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.378",
3
+ "version": "0.0.380",
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.378",
38
+ "@towns-protocol/prettier-config": "^0.0.380",
39
39
  "@typechain/ethers-v5": "^11.1.2",
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": "0b3314fe323abc06b7fea39333aad09e2a3e19c7"
60
+ "gitHead": "7560ed0123757c125b45e033f373c481e437bb06"
61
61
  }
@@ -0,0 +1,27 @@
1
+ // SPDX-License-Identifier: MIT
2
+ pragma solidity ^0.8.24;
3
+
4
+ // interfaces
5
+ import {IRiverConfig} from "src/river/registry/facets/config/IRiverConfig.sol";
6
+
7
+ // libraries
8
+ import {RiverConfigValues} from "scripts/interactions/helpers/RiverConfigValues.sol";
9
+
10
+ // contracts
11
+ import {Interaction} from "scripts/common/Interaction.s.sol";
12
+
13
+ contract InteractSetStreamHistoryMiniblocks is Interaction {
14
+ function __interact(address deployer) internal override {
15
+ address riverRegistry = getDeployment("riverRegistry");
16
+
17
+ uint64 userSettingsMiniblocks = 40;
18
+
19
+ vm.startBroadcast(deployer);
20
+ IRiverConfig(riverRegistry).setConfiguration(
21
+ RiverConfigValues.STREAM_HISTORY_MINIBLOCKS_USER_SETTINGS,
22
+ 0,
23
+ abi.encode(userSettingsMiniblocks)
24
+ );
25
+ vm.stopBroadcast();
26
+ }
27
+ }
@@ -0,0 +1,27 @@
1
+ // SPDX-License-Identifier: MIT
2
+ pragma solidity ^0.8.24;
3
+
4
+ // interfaces
5
+ import {IRiverConfig} from "src/river/registry/facets/config/IRiverConfig.sol";
6
+
7
+ // libraries
8
+ import {RiverConfigValues} from "scripts/interactions/helpers/RiverConfigValues.sol";
9
+
10
+ // contracts
11
+ import {Interaction} from "scripts/common/Interaction.s.sol";
12
+
13
+ contract InteractSetStreamTrimActivationFactor is Interaction {
14
+ function __interact(address deployer) internal override {
15
+ address riverRegistry = getDeployment("riverRegistry");
16
+
17
+ uint64 value = 10;
18
+
19
+ vm.startBroadcast(deployer);
20
+ IRiverConfig(riverRegistry).setConfiguration(
21
+ RiverConfigValues.STREAM_TRIM_ACTIVATION_FACTOR,
22
+ 0,
23
+ abi.encode(value)
24
+ );
25
+ vm.stopBroadcast();
26
+ }
27
+ }
@@ -17,4 +17,8 @@ library RiverConfigValues {
17
17
  bytes32 public constant MEDIA_CHUNK_COUNT = keccak256("stream.media.maxchunkcount");
18
18
  bytes32 public constant ENABLE_NODE_2_NODE_AUTH = keccak256("server.enablenode2nodeauth");
19
19
  bytes32 public constant MB_RECENCY_CHECK = keccak256("stream.recencyconstraints.ageseconds");
20
+ bytes32 public constant STREAM_HISTORY_MINIBLOCKS_USER_SETTINGS =
21
+ keccak256("stream.historyminiblocks.a5");
22
+ bytes32 public constant STREAM_TRIM_ACTIVATION_FACTOR =
23
+ keccak256("stream.trimactivationfactor");
20
24
  }