@logswap/sdk 0.5.64 → 0.5.66

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/src/generated.ts CHANGED
@@ -1100,20 +1100,6 @@ export const fPoolManagerAbi = [
1100
1100
  outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
1101
1101
  stateMutability: 'view',
1102
1102
  },
1103
- {
1104
- type: 'function',
1105
- inputs: [],
1106
- name: 'FEE_MAX',
1107
- outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
1108
- stateMutability: 'view',
1109
- },
1110
- {
1111
- type: 'function',
1112
- inputs: [],
1113
- name: 'FEE_MIN',
1114
- outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
1115
- stateMutability: 'view',
1116
- },
1117
1103
  {
1118
1104
  type: 'function',
1119
1105
  inputs: [],
@@ -1330,35 +1316,6 @@ export const fPoolManagerAbi = [
1330
1316
  outputs: [],
1331
1317
  stateMutability: 'nonpayable',
1332
1318
  },
1333
- {
1334
- type: 'function',
1335
- inputs: [{ name: 'poolId', internalType: 'bytes32', type: 'bytes32' }],
1336
- name: 'harvestable',
1337
- outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
1338
- stateMutability: 'view',
1339
- },
1340
- {
1341
- type: 'function',
1342
- inputs: [
1343
- {
1344
- name: 'key',
1345
- internalType: 'struct FPoolKey',
1346
- type: 'tuple',
1347
- components: [
1348
- { name: 'quote', internalType: 'address', type: 'address' },
1349
- { name: 'bases', internalType: 'address[]', type: 'address[]' },
1350
- { name: 'weights', internalType: 'uint256[]', type: 'uint256[]' },
1351
- { name: 'phi', internalType: 'uint256', type: 'uint256' },
1352
- { name: 'policy', internalType: 'address', type: 'address' },
1353
- { name: 'creator', internalType: 'address', type: 'address' },
1354
- { name: 'salt', internalType: 'bytes32', type: 'bytes32' },
1355
- ],
1356
- },
1357
- ],
1358
- name: 'idOf',
1359
- outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }],
1360
- stateMutability: 'pure',
1361
- },
1362
1319
  {
1363
1320
  type: 'function',
1364
1321
  inputs: [
@@ -1516,16 +1473,6 @@ export const fPoolManagerAbi = [
1516
1473
  ],
1517
1474
  stateMutability: 'view',
1518
1475
  },
1519
- {
1520
- type: 'function',
1521
- inputs: [
1522
- { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
1523
- { name: 'j', internalType: 'uint256', type: 'uint256' },
1524
- ],
1525
- name: 'reserveOf',
1526
- outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
1527
- stateMutability: 'view',
1528
- },
1529
1476
  {
1530
1477
  type: 'function',
1531
1478
  inputs: [{ name: 'poolId', internalType: 'bytes32', type: 'bytes32' }],
@@ -2369,6 +2316,13 @@ export const ifPoolManagerMoveAbi = [
2369
2316
  ],
2370
2317
  stateMutability: 'view',
2371
2318
  },
2319
+ {
2320
+ type: 'function',
2321
+ inputs: [],
2322
+ name: 'registry',
2323
+ outputs: [{ name: '', internalType: 'address', type: 'address' }],
2324
+ stateMutability: 'view',
2325
+ },
2372
2326
  {
2373
2327
  type: 'function',
2374
2328
  inputs: [
@@ -3901,6 +3855,9 @@ export const padPolicyAbi = [
3901
3855
  inputs: [
3902
3856
  { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
3903
3857
  { name: 'from', internalType: 'address', type: 'address' },
3858
+ { name: 'creator_', internalType: 'address', type: 'address' },
3859
+ { name: 'authority_', internalType: 'address', type: 'address' },
3860
+ { name: 'name_', internalType: 'bytes32', type: 'bytes32' },
3904
3861
  ],
3905
3862
  name: 'onMigrate',
3906
3863
  outputs: [{ name: '', internalType: 'uint8', type: 'uint8' }],
@@ -3941,6 +3898,7 @@ export const padPolicyAbi = [
3941
3898
  { name: 'toPayee', internalType: 'uint256', type: 'uint256' },
3942
3899
  { name: 'protocolCut', internalType: 'uint256', type: 'uint256' },
3943
3900
  { name: 'burn', internalType: 'uint256', type: 'uint256' },
3901
+ { name: 'carried', internalType: 'address', type: 'address' },
3944
3902
  ],
3945
3903
  },
3946
3904
  ],
@@ -3984,13 +3942,6 @@ export const padPolicyAbi = [
3984
3942
  outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
3985
3943
  stateMutability: 'view',
3986
3944
  },
3987
- {
3988
- type: 'function',
3989
- inputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }],
3990
- name: 'rung',
3991
- outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
3992
- stateMutability: 'view',
3993
- },
3994
3945
  {
3995
3946
  type: 'function',
3996
3947
  inputs: [{ name: '_harvestCut', internalType: 'uint256', type: 'uint256' }],
@@ -4397,6 +4348,9 @@ export const polPolicyAbi = [
4397
4348
  inputs: [
4398
4349
  { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
4399
4350
  { name: 'from', internalType: 'address', type: 'address' },
4351
+ { name: 'creator_', internalType: 'address', type: 'address' },
4352
+ { name: 'authority_', internalType: 'address', type: 'address' },
4353
+ { name: 'name_', internalType: 'bytes32', type: 'bytes32' },
4400
4354
  ],
4401
4355
  name: 'onMigrate',
4402
4356
  outputs: [{ name: '', internalType: 'uint8', type: 'uint8' }],
@@ -4437,6 +4391,7 @@ export const polPolicyAbi = [
4437
4391
  { name: 'toPayee', internalType: 'uint256', type: 'uint256' },
4438
4392
  { name: 'protocolCut', internalType: 'uint256', type: 'uint256' },
4439
4393
  { name: 'burn', internalType: 'uint256', type: 'uint256' },
4394
+ { name: 'carried', internalType: 'address', type: 'address' },
4440
4395
  ],
4441
4396
  },
4442
4397
  ],
@@ -4693,11 +4648,31 @@ export const policyRegistryAbi = [
4693
4648
  outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
4694
4649
  stateMutability: 'view',
4695
4650
  },
4651
+ {
4652
+ type: 'function',
4653
+ inputs: [{ name: '', internalType: 'address', type: 'address' }],
4654
+ name: 'kindOf',
4655
+ outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }],
4656
+ stateMutability: 'view',
4657
+ },
4696
4658
  {
4697
4659
  type: 'function',
4698
4660
  inputs: [
4699
4661
  { name: 'manager', internalType: 'address', type: 'address' },
4700
- { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
4662
+ {
4663
+ name: 'key',
4664
+ internalType: 'struct FPoolKey',
4665
+ type: 'tuple',
4666
+ components: [
4667
+ { name: 'quote', internalType: 'address', type: 'address' },
4668
+ { name: 'bases', internalType: 'address[]', type: 'address[]' },
4669
+ { name: 'weights', internalType: 'uint256[]', type: 'uint256[]' },
4670
+ { name: 'phi', internalType: 'uint256', type: 'uint256' },
4671
+ { name: 'policy', internalType: 'address', type: 'address' },
4672
+ { name: 'creator', internalType: 'address', type: 'address' },
4673
+ { name: 'salt', internalType: 'bytes32', type: 'bytes32' },
4674
+ ],
4675
+ },
4701
4676
  { name: 'to', internalType: 'address', type: 'address' },
4702
4677
  ],
4703
4678
  name: 'migrate',
@@ -4785,6 +4760,38 @@ export const policyRegistryAbi = [
4785
4760
  ],
4786
4761
  name: 'Approved',
4787
4762
  },
4763
+ {
4764
+ type: 'event',
4765
+ anonymous: false,
4766
+ inputs: [
4767
+ {
4768
+ name: 'manager',
4769
+ internalType: 'address',
4770
+ type: 'address',
4771
+ indexed: true,
4772
+ },
4773
+ {
4774
+ name: 'poolId',
4775
+ internalType: 'bytes32',
4776
+ type: 'bytes32',
4777
+ indexed: true,
4778
+ },
4779
+ { name: 'to', internalType: 'address', type: 'address', indexed: true },
4780
+ {
4781
+ name: 'from',
4782
+ internalType: 'address',
4783
+ type: 'address',
4784
+ indexed: false,
4785
+ },
4786
+ {
4787
+ name: 'authority',
4788
+ internalType: 'address',
4789
+ type: 'address',
4790
+ indexed: false,
4791
+ },
4792
+ ],
4793
+ name: 'Migrated',
4794
+ },
4788
4795
  {
4789
4796
  type: 'event',
4790
4797
  anonymous: false,
@@ -4861,10 +4868,12 @@ export const policyRegistryAbi = [
4861
4868
  },
4862
4869
  { type: 'error', inputs: [], name: 'BadSunset' },
4863
4870
  { type: 'error', inputs: [], name: 'KindMismatch' },
4871
+ { type: 'error', inputs: [], name: 'NoPool' },
4864
4872
  { type: 'error', inputs: [], name: 'NotAPolicy' },
4865
4873
  { type: 'error', inputs: [], name: 'NotListed' },
4866
4874
  { type: 'error', inputs: [], name: 'NotOwner' },
4867
4875
  { type: 'error', inputs: [], name: 'SamePolicy' },
4876
+ { type: 'error', inputs: [], name: 'WrongManager' },
4868
4877
  ] as const
4869
4878
 
4870
4879
  //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -4993,6 +5002,13 @@ export const privatePolicyAbi = [
4993
5002
  outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }],
4994
5003
  stateMutability: 'pure',
4995
5004
  },
5005
+ {
5006
+ type: 'function',
5007
+ inputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }],
5008
+ name: 'listEpoch',
5009
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
5010
+ stateMutability: 'view',
5011
+ },
4996
5012
  {
4997
5013
  type: 'function',
4998
5014
  inputs: [],
@@ -5103,6 +5119,9 @@ export const privatePolicyAbi = [
5103
5119
  inputs: [
5104
5120
  { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
5105
5121
  { name: 'from', internalType: 'address', type: 'address' },
5122
+ { name: 'creator_', internalType: 'address', type: 'address' },
5123
+ { name: 'authority_', internalType: 'address', type: 'address' },
5124
+ { name: 'name_', internalType: 'bytes32', type: 'bytes32' },
5106
5125
  ],
5107
5126
  name: 'onMigrate',
5108
5127
  outputs: [{ name: '', internalType: 'uint8', type: 'uint8' }],
@@ -5143,6 +5162,7 @@ export const privatePolicyAbi = [
5143
5162
  { name: 'toPayee', internalType: 'uint256', type: 'uint256' },
5144
5163
  { name: 'protocolCut', internalType: 'uint256', type: 'uint256' },
5145
5164
  { name: 'burn', internalType: 'uint256', type: 'uint256' },
5165
+ { name: 'carried', internalType: 'address', type: 'address' },
5146
5166
  ],
5147
5167
  },
5148
5168
  ],
@@ -5630,6 +5650,9 @@ export const publicPolicyAbi = [
5630
5650
  inputs: [
5631
5651
  { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
5632
5652
  { name: 'from', internalType: 'address', type: 'address' },
5653
+ { name: 'creator_', internalType: 'address', type: 'address' },
5654
+ { name: 'authority_', internalType: 'address', type: 'address' },
5655
+ { name: 'name_', internalType: 'bytes32', type: 'bytes32' },
5633
5656
  ],
5634
5657
  name: 'onMigrate',
5635
5658
  outputs: [{ name: '', internalType: 'uint8', type: 'uint8' }],
@@ -5670,6 +5693,7 @@ export const publicPolicyAbi = [
5670
5693
  { name: 'toPayee', internalType: 'uint256', type: 'uint256' },
5671
5694
  { name: 'protocolCut', internalType: 'uint256', type: 'uint256' },
5672
5695
  { name: 'burn', internalType: 'uint256', type: 'uint256' },
5696
+ { name: 'carried', internalType: 'address', type: 'address' },
5673
5697
  ],
5674
5698
  },
5675
5699
  ],
package/src/keys.ts CHANGED
@@ -13,6 +13,16 @@
13
13
 
14
14
  import { encodeAbiParameters, keccak256, type Address, type Hex } from "viem";
15
15
 
16
+ /**
17
+ * The fee domain of the family, `FeeParams.FEE_MIN` / `FEE_MAX` (decisions 043): one bound for a
18
+ * C market's φ and an F pool's alike, WAD. 1 bp and 1%. The F manager no longer answers
19
+ * `FEE_MIN()` / `FEE_MAX()` (F version 21 cut the getters for bytecode); every F policy still
20
+ * checks φ against these at `onInitialize`, and the C side re-exposes them through the lens's
21
+ * `cParams()`. Constants here, so a create form bounds φ with no read.
22
+ */
23
+ export const FEE_MIN = 10n ** 14n;
24
+ export const FEE_MAX = 10n ** 16n;
25
+
16
26
  /**
17
27
  * The economic tuple that IS the market. Field order is load-bearing: it is the ABI encoding order,
18
28
  * so it must match `src/types/PoolKey.sol` exactly.
@@ -23,7 +33,7 @@ export interface PoolKey {
23
33
  /** Log-tick spacing, WAD. The LP-boundary ladder — position floors and caps. */
24
34
  tickSpacing: bigint;
25
35
  /**
26
- * The swap fee, WAD, fixed for the life of the market: `FEE_MIN` (1 bp) ≤ φ ≤ `FEE_MAX` (25%),
36
+ * The swap fee, WAD, fixed for the life of the market: {@link FEE_MIN} (1 bp) ≤ φ ≤ {@link FEE_MAX} (1%),
27
37
  * or `0n`, which selects `DEFAULT_FEE` (2 bp) at read time. Four fields since C version 4
28
38
  *: `kappa` and `alpha` left with the variance kernel, and `phiMin` — a floor with
29
39
  * nothing above it — became `phi`. Every pool id changed with the shape.