@logswap/sdk 0.5.99 → 0.5.101

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
@@ -56,7 +56,6 @@ export const lensCAbi = [
56
56
  type: 'tuple[]',
57
57
  components: [
58
58
  { name: 'initialized', internalType: 'bool', type: 'bool' },
59
- { name: 'backstopSeeded', internalType: 'bool', type: 'bool' },
60
59
  { name: 'logPrice', internalType: 'int256', type: 'int256' },
61
60
  { name: 'lActive', internalType: 'uint256', type: 'uint256' },
62
61
  { name: 'reserveBase', internalType: 'uint256', type: 'uint256' },
@@ -194,9 +193,8 @@ export const lensCAbi = [
194
193
  inputs: [],
195
194
  name: 'params',
196
195
  outputs: [
197
- { name: 'feeMax', internalType: 'uint256', type: 'uint256' },
198
- { name: 'feeMin', internalType: 'uint256', type: 'uint256' },
199
- { name: 'minTickSpacing', internalType: 'int256', type: 'int256' },
196
+ { name: 'feeList', internalType: 'uint256[]', type: 'uint256[]' },
197
+ { name: 'spacingList', internalType: 'int256[]', type: 'int256[]' },
200
198
  { name: 'noCap', internalType: 'int256', type: 'int256' },
201
199
  { name: 'cVersion', internalType: 'uint256', type: 'uint256' },
202
200
  ],
@@ -431,6 +429,16 @@ export const lensFAbi = [
431
429
  ],
432
430
  stateMutability: 'view',
433
431
  },
432
+ {
433
+ type: 'function',
434
+ inputs: [],
435
+ name: 'params',
436
+ outputs: [
437
+ { name: 'feeList', internalType: 'uint256[]', type: 'uint256[]' },
438
+ { name: 'fVersion', internalType: 'uint256', type: 'uint256' },
439
+ ],
440
+ stateMutability: 'view',
441
+ },
434
442
  {
435
443
  type: 'function',
436
444
  inputs: [{ name: 'poolId', internalType: 'bytes32', type: 'bytes32' }],
@@ -639,6 +647,7 @@ export const managerCAbi = [
639
647
  inputs: [
640
648
  { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
641
649
  { name: 'id', internalType: 'uint256', type: 'uint256' },
650
+ { name: 'owner', internalType: 'address', type: 'address' },
642
651
  { name: 'to', internalType: 'address', type: 'address' },
643
652
  ],
644
653
  name: 'claim',
@@ -748,14 +757,12 @@ export const managerCAbi = [
748
757
  internalType: 'struct PoolKeyC',
749
758
  type: 'tuple',
750
759
  components: [
751
- { name: 'base', internalType: 'address', type: 'address' },
752
760
  { name: 'quote', internalType: 'address', type: 'address' },
753
- { name: 'tickSpacing', internalType: 'int256', type: 'int256' },
761
+ { name: 'base', internalType: 'address', type: 'address' },
762
+ { name: 'swapFeeIdx', internalType: 'uint8', type: 'uint8' },
763
+ { name: 'spacingIdx', internalType: 'uint8', type: 'uint8' },
754
764
  { name: 'policy', internalType: 'address', type: 'address' },
755
- { name: 'creator', internalType: 'address', type: 'address' },
756
765
  { name: 'salt', internalType: 'bytes32', type: 'bytes32' },
757
- { name: 'swapFee', internalType: 'uint256', type: 'uint256' },
758
- { name: 'mintFee', internalType: 'uint256', type: 'uint256' },
759
766
  ],
760
767
  },
761
768
  { name: 'initialLogPrice', internalType: 'int256', type: 'int256' },
@@ -785,6 +792,7 @@ export const managerCAbi = [
785
792
  type: 'function',
786
793
  inputs: [
787
794
  { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
795
+ { name: 'payer', internalType: 'address', type: 'address' },
788
796
  { name: 'to', internalType: 'address', type: 'address' },
789
797
  { name: 'floor', internalType: 'int256', type: 'int256' },
790
798
  { name: 'cap', internalType: 'int256', type: 'int256' },
@@ -1031,13 +1039,13 @@ export const managerCAbi = [
1031
1039
  type: 'event',
1032
1040
  anonymous: false,
1033
1041
  inputs: [
1034
- { name: 'id', internalType: 'uint256', type: 'uint256', indexed: true },
1035
1042
  {
1036
1043
  name: 'poolId',
1037
1044
  internalType: 'bytes32',
1038
1045
  type: 'bytes32',
1039
1046
  indexed: true,
1040
1047
  },
1048
+ { name: 'id', internalType: 'uint256', type: 'uint256', indexed: true },
1041
1049
  { name: 'floor', internalType: 'int256', type: 'int256', indexed: false },
1042
1050
  { name: 'cap', internalType: 'int256', type: 'int256', indexed: false },
1043
1051
  { name: 'capped', internalType: 'bool', type: 'bool', indexed: false },
@@ -1055,12 +1063,13 @@ export const managerCAbi = [
1055
1063
  indexed: true,
1056
1064
  },
1057
1065
  {
1058
- name: 'holder',
1066
+ name: 'owner',
1059
1067
  internalType: 'address',
1060
1068
  type: 'address',
1061
1069
  indexed: true,
1062
1070
  },
1063
1071
  { name: 'id', internalType: 'uint256', type: 'uint256', indexed: true },
1072
+ { name: 'to', internalType: 'address', type: 'address', indexed: false },
1064
1073
  {
1065
1074
  name: 'fees',
1066
1075
  internalType: 'uint256',
@@ -1130,36 +1139,36 @@ export const managerCAbi = [
1130
1139
  name: 'creator',
1131
1140
  internalType: 'address',
1132
1141
  type: 'address',
1133
- indexed: true,
1142
+ indexed: false,
1134
1143
  },
1135
1144
  {
1136
- name: 'base',
1145
+ name: 'policy',
1137
1146
  internalType: 'address',
1138
1147
  type: 'address',
1139
- indexed: false,
1148
+ indexed: true,
1140
1149
  },
1141
1150
  {
1142
- name: 'swapFee',
1143
- internalType: 'uint256',
1144
- type: 'uint256',
1151
+ name: 'base',
1152
+ internalType: 'address',
1153
+ type: 'address',
1145
1154
  indexed: false,
1146
1155
  },
1147
1156
  {
1148
- name: 'policy',
1149
- internalType: 'address',
1150
- type: 'address',
1157
+ name: 'swapFeeIdx',
1158
+ internalType: 'uint8',
1159
+ type: 'uint8',
1151
1160
  indexed: false,
1152
1161
  },
1153
1162
  {
1154
- name: 'mintFee',
1155
- internalType: 'uint256',
1156
- type: 'uint256',
1163
+ name: 'spacingIdx',
1164
+ internalType: 'uint8',
1165
+ type: 'uint8',
1157
1166
  indexed: false,
1158
1167
  },
1159
1168
  {
1160
- name: 'tickSpacing',
1161
- internalType: 'int256',
1162
- type: 'int256',
1169
+ name: 'salt',
1170
+ internalType: 'bytes32',
1171
+ type: 'bytes32',
1163
1172
  indexed: false,
1164
1173
  },
1165
1174
  {
@@ -1174,12 +1183,6 @@ export const managerCAbi = [
1174
1183
  type: 'uint256',
1175
1184
  indexed: false,
1176
1185
  },
1177
- {
1178
- name: 'salt',
1179
- internalType: 'bytes32',
1180
- type: 'bytes32',
1181
- indexed: false,
1182
- },
1183
1186
  ],
1184
1187
  name: 'PoolCreated',
1185
1188
  },
@@ -1193,7 +1196,12 @@ export const managerCAbi = [
1193
1196
  type: 'bytes32',
1194
1197
  indexed: true,
1195
1198
  },
1196
- { name: 'from', internalType: 'address', type: 'address', indexed: true },
1199
+ {
1200
+ name: 'owner',
1201
+ internalType: 'address',
1202
+ type: 'address',
1203
+ indexed: true,
1204
+ },
1197
1205
  { name: 'id', internalType: 'uint256', type: 'uint256', indexed: true },
1198
1206
  {
1199
1207
  name: 'shares',
@@ -1234,6 +1242,18 @@ export const managerCAbi = [
1234
1242
  },
1235
1243
  { name: 'to', internalType: 'address', type: 'address', indexed: true },
1236
1244
  { name: 'id', internalType: 'uint256', type: 'uint256', indexed: true },
1245
+ {
1246
+ name: 'sender',
1247
+ internalType: 'address',
1248
+ type: 'address',
1249
+ indexed: false,
1250
+ },
1251
+ {
1252
+ name: 'payer',
1253
+ internalType: 'address',
1254
+ type: 'address',
1255
+ indexed: false,
1256
+ },
1237
1257
  {
1238
1258
  name: 'shares',
1239
1259
  internalType: 'uint256',
@@ -1266,7 +1286,7 @@ export const managerCAbi = [
1266
1286
  indexed: true,
1267
1287
  },
1268
1288
  {
1269
- name: 'holder',
1289
+ name: 'owner',
1270
1290
  internalType: 'address',
1271
1291
  type: 'address',
1272
1292
  indexed: true,
@@ -1321,6 +1341,12 @@ export const managerCAbi = [
1321
1341
  type: 'bytes32',
1322
1342
  indexed: true,
1323
1343
  },
1344
+ {
1345
+ name: 'sender',
1346
+ internalType: 'address',
1347
+ type: 'address',
1348
+ indexed: true,
1349
+ },
1324
1350
  { name: 'to', internalType: 'address', type: 'address', indexed: true },
1325
1351
  {
1326
1352
  name: 'amount',
@@ -1480,8 +1506,6 @@ export const managerCAbi = [
1480
1506
  name: 'TreasuryProposed',
1481
1507
  },
1482
1508
  { type: 'error', inputs: [], name: 'AlreadyUnlocked' },
1483
- { type: 'error', inputs: [], name: 'BackstopMustBeUncapped' },
1484
- { type: 'error', inputs: [], name: 'BackstopTooSmall' },
1485
1509
  { type: 'error', inputs: [], name: 'BadCap' },
1486
1510
  { type: 'error', inputs: [], name: 'BadParam' },
1487
1511
  { type: 'error', inputs: [], name: 'BadTerms' },
@@ -1490,7 +1514,6 @@ export const managerCAbi = [
1490
1514
  { type: 'error', inputs: [], name: 'CappedOut' },
1491
1515
  { type: 'error', inputs: [], name: 'DrainedToFloor' },
1492
1516
  { type: 'error', inputs: [], name: 'DrainsBase' },
1493
- { type: 'error', inputs: [], name: 'IdenticalTokens' },
1494
1517
  { type: 'error', inputs: [], name: 'InsufficientBalance' },
1495
1518
  { type: 'error', inputs: [], name: 'InsufficientPermission' },
1496
1519
  { type: 'error', inputs: [], name: 'InsufficientQuote' },
@@ -1498,11 +1521,11 @@ export const managerCAbi = [
1498
1521
  { type: 'error', inputs: [], name: 'InvalidToken' },
1499
1522
  { type: 'error', inputs: [], name: 'NoLiquidity' },
1500
1523
  { type: 'error', inputs: [], name: 'NotAuthorized' },
1501
- { type: 'error', inputs: [], name: 'NotCreator' },
1502
1524
  { type: 'error', inputs: [], name: 'NotLogAuthority' },
1503
1525
  { type: 'error', inputs: [], name: 'NotPolicy' },
1504
1526
  { type: 'error', inputs: [], name: 'NotTreasury' },
1505
1527
  { type: 'error', inputs: [], name: 'OffGrid' },
1528
+ { type: 'error', inputs: [], name: 'PolicyNotApproved' },
1506
1529
  { type: 'error', inputs: [], name: 'PoolAlreadyInitialized' },
1507
1530
  { type: 'error', inputs: [], name: 'PoolLocked' },
1508
1531
  { type: 'error', inputs: [], name: 'PoolNotInitialized' },
@@ -1514,15 +1537,14 @@ export const managerCAbi = [
1514
1537
  },
1515
1538
  { type: 'error', inputs: [], name: 'ReserveNotRepresentable' },
1516
1539
  { type: 'error', inputs: [], name: 'Restructured' },
1540
+ { type: 'error', inputs: [], name: 'SameAsset' },
1517
1541
  { type: 'error', inputs: [], name: 'Slippage' },
1518
- { type: 'error', inputs: [], name: 'SpacingZero' },
1519
1542
  { type: 'error', inputs: [], name: 'SyncAlreadyOpen' },
1520
1543
  { type: 'error', inputs: [], name: 'TokensNotSettled' },
1521
1544
  { type: 'error', inputs: [], name: 'TransferShortfall' },
1522
1545
  { type: 'error', inputs: [], name: 'WrongPool' },
1523
1546
  { type: 'error', inputs: [], name: 'ZeroAmount' },
1524
1547
  { type: 'error', inputs: [], name: 'ZeroExposure' },
1525
- { type: 'error', inputs: [], name: 'ZeroShares' },
1526
1548
  ] as const
1527
1549
 
1528
1550
  //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -1611,6 +1633,7 @@ export const managerFAbi = [
1611
1633
  inputs: [
1612
1634
  { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
1613
1635
  { name: 'gen', internalType: 'uint256', type: 'uint256' },
1636
+ { name: 'owner', internalType: 'address', type: 'address' },
1614
1637
  { name: 'to', internalType: 'address', type: 'address' },
1615
1638
  ],
1616
1639
  name: 'claim',
@@ -1679,13 +1702,6 @@ export const managerFAbi = [
1679
1702
  outputs: [{ name: 'shares', internalType: 'uint256', type: 'uint256' }],
1680
1703
  stateMutability: 'nonpayable',
1681
1704
  },
1682
- {
1683
- type: 'function',
1684
- inputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
1685
- name: 'dps',
1686
- outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
1687
- stateMutability: 'view',
1688
- },
1689
1705
  {
1690
1706
  type: 'function',
1691
1707
  inputs: [{ name: 'slot', internalType: 'bytes32', type: 'bytes32' }],
@@ -1721,13 +1737,6 @@ export const managerFAbi = [
1721
1737
  outputs: [],
1722
1738
  stateMutability: 'nonpayable',
1723
1739
  },
1724
- {
1725
- type: 'function',
1726
- inputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
1727
- name: 'incomeHeld',
1728
- outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
1729
- stateMutability: 'view',
1730
- },
1731
1740
  {
1732
1741
  type: 'function',
1733
1742
  inputs: [
@@ -1792,6 +1801,7 @@ export const managerFAbi = [
1792
1801
  type: 'function',
1793
1802
  inputs: [
1794
1803
  { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
1804
+ { name: 'payer', internalType: 'address', type: 'address' },
1795
1805
  { name: 'to', internalType: 'address', type: 'address' },
1796
1806
  { name: 'L', internalType: 'uint256', type: 'uint256' },
1797
1807
  { name: 'maxQuoteIn', internalType: 'uint256', type: 'uint256' },
@@ -1813,7 +1823,7 @@ export const managerFAbi = [
1813
1823
  },
1814
1824
  {
1815
1825
  type: 'function',
1816
- inputs: [{ name: 'calls', internalType: 'bytes[]', type: 'bytes[]' }],
1826
+ inputs: [{ name: 'data', internalType: 'bytes[]', type: 'bytes[]' }],
1817
1827
  name: 'multicall',
1818
1828
  outputs: [{ name: 'results', internalType: 'bytes[]', type: 'bytes[]' }],
1819
1829
  stateMutability: 'nonpayable',
@@ -2069,13 +2079,13 @@ export const managerFAbi = [
2069
2079
  type: 'bytes32',
2070
2080
  indexed: true,
2071
2081
  },
2072
- { name: 'gen', internalType: 'uint256', type: 'uint256', indexed: true },
2073
2082
  {
2074
- name: 'holder',
2083
+ name: 'owner',
2075
2084
  internalType: 'address',
2076
2085
  type: 'address',
2077
2086
  indexed: true,
2078
2087
  },
2088
+ { name: 'gen', internalType: 'uint256', type: 'uint256', indexed: true },
2079
2089
  { name: 'to', internalType: 'address', type: 'address', indexed: false },
2080
2090
  {
2081
2091
  name: 'amount',
@@ -2117,6 +2127,12 @@ export const managerFAbi = [
2117
2127
  indexed: true,
2118
2128
  },
2119
2129
  { name: 'gen', internalType: 'uint256', type: 'uint256', indexed: true },
2130
+ {
2131
+ name: 'operator',
2132
+ internalType: 'address',
2133
+ type: 'address',
2134
+ indexed: true,
2135
+ },
2120
2136
  {
2121
2137
  name: 'supply',
2122
2138
  internalType: 'uint256',
@@ -2143,6 +2159,12 @@ export const managerFAbi = [
2143
2159
  indexed: true,
2144
2160
  },
2145
2161
  { name: 'to', internalType: 'address', type: 'address', indexed: true },
2162
+ {
2163
+ name: 'operator',
2164
+ internalType: 'address',
2165
+ type: 'address',
2166
+ indexed: true,
2167
+ },
2146
2168
  { name: 'gen', internalType: 'uint256', type: 'uint256', indexed: false },
2147
2169
  {
2148
2170
  name: 'income',
@@ -2243,6 +2265,12 @@ export const managerFAbi = [
2243
2265
  indexed: true,
2244
2266
  },
2245
2267
  { name: 'gen', internalType: 'uint256', type: 'uint256', indexed: true },
2268
+ {
2269
+ name: 'operator',
2270
+ internalType: 'address',
2271
+ type: 'address',
2272
+ indexed: true,
2273
+ },
2246
2274
  {
2247
2275
  name: 'quoteAmount',
2248
2276
  internalType: 'uint256',
@@ -2305,6 +2333,12 @@ export const managerFAbi = [
2305
2333
  type: 'address',
2306
2334
  indexed: true,
2307
2335
  },
2336
+ {
2337
+ name: 'creator',
2338
+ internalType: 'address',
2339
+ type: 'address',
2340
+ indexed: false,
2341
+ },
2308
2342
  {
2309
2343
  name: 'policy',
2310
2344
  internalType: 'address',
@@ -2362,8 +2396,13 @@ export const managerFAbi = [
2362
2396
  type: 'bytes32',
2363
2397
  indexed: true,
2364
2398
  },
2365
- { name: 'from', internalType: 'address', type: 'address', indexed: true },
2366
- { name: 'gen', internalType: 'uint256', type: 'uint256', indexed: false },
2399
+ {
2400
+ name: 'owner',
2401
+ internalType: 'address',
2402
+ type: 'address',
2403
+ indexed: true,
2404
+ },
2405
+ { name: 'gen', internalType: 'uint256', type: 'uint256', indexed: true },
2367
2406
  { name: 'L', internalType: 'uint256', type: 'uint256', indexed: false },
2368
2407
  {
2369
2408
  name: 'shares',
@@ -2403,7 +2442,19 @@ export const managerFAbi = [
2403
2442
  indexed: true,
2404
2443
  },
2405
2444
  { name: 'to', internalType: 'address', type: 'address', indexed: true },
2406
- { name: 'gen', internalType: 'uint256', type: 'uint256', indexed: false },
2445
+ { name: 'gen', internalType: 'uint256', type: 'uint256', indexed: true },
2446
+ {
2447
+ name: 'sender',
2448
+ internalType: 'address',
2449
+ type: 'address',
2450
+ indexed: false,
2451
+ },
2452
+ {
2453
+ name: 'payer',
2454
+ internalType: 'address',
2455
+ type: 'address',
2456
+ indexed: false,
2457
+ },
2407
2458
  { name: 'L', internalType: 'uint256', type: 'uint256', indexed: false },
2408
2459
  {
2409
2460
  name: 'shares',
@@ -2442,13 +2493,13 @@ export const managerFAbi = [
2442
2493
  type: 'bytes32',
2443
2494
  indexed: true,
2444
2495
  },
2445
- { name: 'gen', internalType: 'uint256', type: 'uint256', indexed: true },
2446
2496
  {
2447
2497
  name: 'owner',
2448
2498
  internalType: 'address',
2449
2499
  type: 'address',
2450
2500
  indexed: true,
2451
2501
  },
2502
+ { name: 'gen', internalType: 'uint256', type: 'uint256', indexed: true },
2452
2503
  {
2453
2504
  name: 'shares',
2454
2505
  internalType: 'uint256',
@@ -2643,7 +2694,6 @@ export const managerFAbi = [
2643
2694
  name: 'MulticallFailed',
2644
2695
  },
2645
2696
  { type: 'error', inputs: [], name: 'NotAuthorized' },
2646
- { type: 'error', inputs: [], name: 'NotCreator' },
2647
2697
  { type: 'error', inputs: [], name: 'NotFrozen' },
2648
2698
  { type: 'error', inputs: [], name: 'NotLogAuthority' },
2649
2699
  { type: 'error', inputs: [], name: 'NotOperator' },
@@ -2674,28 +2724,23 @@ export const managerFAbi = [
2674
2724
  ] as const
2675
2725
 
2676
2726
  //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
2677
- // PolicyF
2727
+ // PolicyC
2678
2728
  //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
2679
2729
 
2680
- export const policyFAbi = [
2730
+ export const policyCAbi = [
2681
2731
  {
2682
2732
  type: 'constructor',
2683
2733
  inputs: [
2684
2734
  { name: 'manager_', internalType: 'address', type: 'address' },
2685
2735
  {
2686
2736
  name: 'p',
2687
- internalType: 'struct PolicyParams',
2737
+ internalType: 'struct PolicyCParams',
2688
2738
  type: 'tuple',
2689
2739
  components: [
2690
2740
  { name: 'authority', internalType: 'address', type: 'address' },
2691
2741
  { name: 'open', internalType: 'bool', type: 'bool' },
2692
- { name: 'seedToDead', internalType: 'bool', type: 'bool' },
2693
- { name: 'incomeHarvestOnly', internalType: 'bool', type: 'bool' },
2694
- { name: 'incomeTaxRate', internalType: 'uint256', type: 'uint256' },
2695
2742
  { name: 'feeMask', internalType: 'uint8', type: 'uint8' },
2696
- { name: 'lenMax', internalType: 'uint8', type: 'uint8' },
2697
- { name: 'lnCapMin', internalType: 'uint24', type: 'uint24' },
2698
- { name: 'quoteBuffer', internalType: 'uint256', type: 'uint256' },
2743
+ { name: 'swapFeeTax', internalType: 'uint256', type: 'uint256' },
2699
2744
  { name: 'quotes', internalType: 'address[]', type: 'address[]' },
2700
2745
  { name: 'bases', internalType: 'address[]', type: 'address[]' },
2701
2746
  ],
@@ -2762,20 +2807,6 @@ export const policyFAbi = [
2762
2807
  outputs: [{ name: '', internalType: 'address', type: 'address' }],
2763
2808
  stateMutability: 'view',
2764
2809
  },
2765
- {
2766
- type: 'function',
2767
- inputs: [],
2768
- name: 'incomeHarvestOnly',
2769
- outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
2770
- stateMutability: 'view',
2771
- },
2772
- {
2773
- type: 'function',
2774
- inputs: [],
2775
- name: 'incomeTaxRate',
2776
- outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
2777
- stateMutability: 'view',
2778
- },
2779
2810
  {
2780
2811
  type: 'function',
2781
2812
  inputs: [],
@@ -2783,20 +2814,6 @@ export const policyFAbi = [
2783
2814
  outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }],
2784
2815
  stateMutability: 'pure',
2785
2816
  },
2786
- {
2787
- type: 'function',
2788
- inputs: [],
2789
- name: 'lenMax',
2790
- outputs: [{ name: '', internalType: 'uint8', type: 'uint8' }],
2791
- stateMutability: 'view',
2792
- },
2793
- {
2794
- type: 'function',
2795
- inputs: [],
2796
- name: 'lnCapMin',
2797
- outputs: [{ name: '', internalType: 'uint24', type: 'uint24' }],
2798
- stateMutability: 'view',
2799
- },
2800
2817
  {
2801
2818
  type: 'function',
2802
2819
  inputs: [],
@@ -2808,46 +2825,24 @@ export const policyFAbi = [
2808
2825
  type: 'function',
2809
2826
  inputs: [
2810
2827
  { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
2811
- { name: 'action', internalType: 'enum IPolicyF.Action', type: 'uint8' },
2828
+ {
2829
+ name: 'action',
2830
+ internalType: 'enum IPolicyBase.Action',
2831
+ type: 'uint8',
2832
+ },
2812
2833
  { name: 'who', internalType: 'address', type: 'address' },
2813
2834
  ],
2814
2835
  name: 'may',
2815
2836
  outputs: [{ name: '', internalType: 'bytes4', type: 'bytes4' }],
2816
2837
  stateMutability: 'view',
2817
2838
  },
2818
- {
2819
- type: 'function',
2820
- inputs: [
2821
- { name: '', internalType: 'bytes32', type: 'bytes32' },
2822
- { name: 'n', internalType: 'uint256', type: 'uint256' },
2823
- { name: 'quoteAmount', internalType: 'uint256', type: 'uint256' },
2824
- { name: 'lnCapOverSeed', internalType: 'uint24', type: 'uint24' },
2825
- { name: 'L', internalType: 'uint256', type: 'uint256' },
2826
- ],
2827
- name: 'mayDeploy',
2828
- outputs: [{ name: '', internalType: 'bytes4', type: 'bytes4' }],
2829
- stateMutability: 'view',
2830
- },
2831
- {
2832
- type: 'function',
2833
- inputs: [
2834
- { name: '', internalType: 'bytes32', type: 'bytes32' },
2835
- { name: 'income', internalType: 'uint256', type: 'uint256' },
2836
- { name: 'extra', internalType: 'uint256', type: 'uint256' },
2837
- { name: 'Q', internalType: 'uint256', type: 'uint256' },
2838
- { name: 'L', internalType: 'uint256', type: 'uint256' },
2839
- ],
2840
- name: 'mayHarvest',
2841
- outputs: [{ name: '', internalType: 'bytes4', type: 'bytes4' }],
2842
- stateMutability: 'view',
2843
- },
2844
2839
  {
2845
2840
  type: 'function',
2846
2841
  inputs: [
2847
2842
  { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
2848
2843
  { name: 'caller', internalType: 'address', type: 'address' },
2849
2844
  { name: 'quote', internalType: 'address', type: 'address' },
2850
- { name: 'bases', internalType: 'address[]', type: 'address[]' },
2845
+ { name: 'base', internalType: 'address', type: 'address' },
2851
2846
  { name: 'swapFeeIdx', internalType: 'uint8', type: 'uint8' },
2852
2847
  { name: 'salt', internalType: 'bytes32', type: 'bytes32' },
2853
2848
  ],
@@ -2855,6 +2850,7 @@ export const policyFAbi = [
2855
2850
  outputs: [
2856
2851
  { name: 'flags', internalType: 'uint8', type: 'uint8' },
2857
2852
  { name: 'op', internalType: 'address', type: 'address' },
2853
+ { name: 'tax', internalType: 'uint256', type: 'uint256' },
2858
2854
  ],
2859
2855
  stateMutability: 'nonpayable',
2860
2856
  },
@@ -2862,7 +2858,9 @@ export const policyFAbi = [
2862
2858
  type: 'function',
2863
2859
  inputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }],
2864
2860
  name: 'mintMode',
2865
- outputs: [{ name: '', internalType: 'enum IPolicyF.Mode', type: 'uint8' }],
2861
+ outputs: [
2862
+ { name: '', internalType: 'enum IPolicyBase.Mode', type: 'uint8' },
2863
+ ],
2866
2864
  stateMutability: 'view',
2867
2865
  },
2868
2866
  {
@@ -2879,13 +2877,6 @@ export const policyFAbi = [
2879
2877
  outputs: [{ name: '', internalType: 'address', type: 'address' }],
2880
2878
  stateMutability: 'view',
2881
2879
  },
2882
- {
2883
- type: 'function',
2884
- inputs: [],
2885
- name: 'quoteBuffer',
2886
- outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
2887
- stateMutability: 'view',
2888
- },
2889
2880
  {
2890
2881
  type: 'function',
2891
2882
  inputs: [],
@@ -2907,18 +2898,11 @@ export const policyFAbi = [
2907
2898
  outputs: [{ name: '', internalType: 'uint8', type: 'uint8' }],
2908
2899
  stateMutability: 'view',
2909
2900
  },
2910
- {
2911
- type: 'function',
2912
- inputs: [],
2913
- name: 'seedToDead',
2914
- outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
2915
- stateMutability: 'view',
2916
- },
2917
2901
  {
2918
2902
  type: 'function',
2919
2903
  inputs: [
2920
2904
  { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
2921
- { name: 'mode', internalType: 'enum IPolicyF.Mode', type: 'uint8' },
2905
+ { name: 'mode', internalType: 'enum IPolicyBase.Mode', type: 'uint8' },
2922
2906
  ],
2923
2907
  name: 'setMintMode',
2924
2908
  outputs: [],
@@ -2948,7 +2932,7 @@ export const policyFAbi = [
2948
2932
  type: 'function',
2949
2933
  inputs: [
2950
2934
  { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
2951
- { name: 'mode', internalType: 'enum IPolicyF.Mode', type: 'uint8' },
2935
+ { name: 'mode', internalType: 'enum IPolicyBase.Mode', type: 'uint8' },
2952
2936
  ],
2953
2937
  name: 'setSwapMode',
2954
2938
  outputs: [],
@@ -2956,18 +2940,17 @@ export const policyFAbi = [
2956
2940
  },
2957
2941
  {
2958
2942
  type: 'function',
2959
- inputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }],
2960
- name: 'swapMode',
2961
- outputs: [{ name: '', internalType: 'enum IPolicyF.Mode', type: 'uint8' }],
2943
+ inputs: [],
2944
+ name: 'swapFeeTax',
2945
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
2962
2946
  stateMutability: 'view',
2963
2947
  },
2964
2948
  {
2965
2949
  type: 'function',
2966
- inputs: [{ name: 'poolId', internalType: 'bytes32', type: 'bytes32' }],
2967
- name: 'taxOf',
2950
+ inputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }],
2951
+ name: 'swapMode',
2968
2952
  outputs: [
2969
- { name: 'payer', internalType: 'address', type: 'address' },
2970
- { name: 'rate', internalType: 'uint256', type: 'uint256' },
2953
+ { name: '', internalType: 'enum IPolicyBase.Mode', type: 'uint8' },
2971
2954
  ],
2972
2955
  stateMutability: 'view',
2973
2956
  },
@@ -2983,7 +2966,7 @@ export const policyFAbi = [
2983
2966
  },
2984
2967
  {
2985
2968
  name: 'mode',
2986
- internalType: 'enum IPolicyF.Mode',
2969
+ internalType: 'enum IPolicyBase.Mode',
2987
2970
  type: 'uint8',
2988
2971
  indexed: false,
2989
2972
  },
@@ -3045,7 +3028,7 @@ export const policyFAbi = [
3045
3028
  },
3046
3029
  {
3047
3030
  name: 'mode',
3048
- internalType: 'enum IPolicyF.Mode',
3031
+ internalType: 'enum IPolicyBase.Mode',
3049
3032
  type: 'uint8',
3050
3033
  indexed: false,
3051
3034
  },
@@ -3060,7 +3043,6 @@ export const policyFAbi = [
3060
3043
  inputs: [{ name: 'base', internalType: 'address', type: 'address' }],
3061
3044
  name: 'BaseNotListed',
3062
3045
  },
3063
- { type: 'error', inputs: [], name: 'CapTooClose' },
3064
3046
  {
3065
3047
  type: 'error',
3066
3048
  inputs: [{ name: 'idx', internalType: 'uint256', type: 'uint256' }],
@@ -3068,7 +3050,6 @@ export const policyFAbi = [
3068
3050
  },
3069
3051
  { type: 'error', inputs: [], name: 'GatesUnavailable' },
3070
3052
  { type: 'error', inputs: [], name: 'InactivePool' },
3071
- { type: 'error', inputs: [], name: 'IncomeOnly' },
3072
3053
  { type: 'error', inputs: [], name: 'ModeOrder' },
3073
3054
  { type: 'error', inputs: [], name: 'NotAuthority' },
3074
3055
  { type: 'error', inputs: [], name: 'NotCanonical' },
@@ -3079,295 +3060,344 @@ export const policyFAbi = [
3079
3060
  inputs: [{ name: 'quote', internalType: 'address', type: 'address' }],
3080
3061
  name: 'QuoteNotListed',
3081
3062
  },
3082
- { type: 'error', inputs: [], name: 'QuoteTooThin' },
3083
3063
  { type: 'error', inputs: [], name: 'Refused' },
3084
- { type: 'error', inputs: [], name: 'TooManyLegs' },
3085
3064
  ] as const
3086
3065
 
3087
3066
  //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
3088
- // PolicyRegistry
3067
+ // PolicyF
3089
3068
  //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
3090
3069
 
3091
- export const policyRegistryAbi = [
3070
+ export const policyFAbi = [
3092
3071
  {
3093
3072
  type: 'constructor',
3094
3073
  inputs: [
3095
- { name: '_logAuthority', internalType: 'address', type: 'address' },
3096
- ],
3097
- stateMutability: 'nonpayable',
3098
- },
3099
- {
3100
- type: 'function',
3101
- inputs: [],
3102
- name: 'acceptLogAuthority',
3103
- outputs: [],
3104
- stateMutability: 'nonpayable',
3074
+ { name: 'manager_', internalType: 'address', type: 'address' },
3075
+ {
3076
+ name: 'p',
3077
+ internalType: 'struct PolicyParams',
3078
+ type: 'tuple',
3079
+ components: [
3080
+ { name: 'authority', internalType: 'address', type: 'address' },
3081
+ { name: 'open', internalType: 'bool', type: 'bool' },
3082
+ { name: 'seedToDead', internalType: 'bool', type: 'bool' },
3083
+ { name: 'incomeHarvestOnly', internalType: 'bool', type: 'bool' },
3084
+ { name: 'incomeTaxRate', internalType: 'uint256', type: 'uint256' },
3085
+ { name: 'feeMask', internalType: 'uint8', type: 'uint8' },
3086
+ { name: 'lenMax', internalType: 'uint8', type: 'uint8' },
3087
+ { name: 'lnCapMin', internalType: 'uint24', type: 'uint24' },
3088
+ { name: 'quoteBuffer', internalType: 'uint256', type: 'uint256' },
3089
+ { name: 'quotes', internalType: 'address[]', type: 'address[]' },
3090
+ { name: 'bases', internalType: 'address[]', type: 'address[]' },
3091
+ ],
3092
+ },
3093
+ ],
3094
+ stateMutability: 'nonpayable',
3105
3095
  },
3106
3096
  {
3107
3097
  type: 'function',
3108
- inputs: [
3109
- { name: 'policy', internalType: 'address', type: 'address' },
3110
- { name: 'caller', internalType: 'address', type: 'address' },
3111
- { name: 'creator', internalType: 'address', type: 'address' },
3112
- ],
3113
- name: 'admit',
3114
- outputs: [{ name: 'who', internalType: 'address', type: 'address' }],
3098
+ inputs: [],
3099
+ name: 'MINT',
3100
+ outputs: [{ name: '', internalType: 'uint8', type: 'uint8' }],
3101
+ stateMutability: 'view',
3102
+ },
3103
+ {
3104
+ type: 'function',
3105
+ inputs: [],
3106
+ name: 'SWAP',
3107
+ outputs: [{ name: '', internalType: 'uint8', type: 'uint8' }],
3115
3108
  stateMutability: 'view',
3116
3109
  },
3117
3110
  {
3118
3111
  type: 'function',
3119
3112
  inputs: [
3120
- { name: 'policy', internalType: 'address', type: 'address' },
3121
- { name: 'name', internalType: 'bytes32', type: 'bytes32' },
3113
+ { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
3114
+ { name: 'who', internalType: 'address', type: 'address' },
3122
3115
  ],
3123
- name: 'approve',
3116
+ name: 'appointOperator',
3124
3117
  outputs: [],
3125
3118
  stateMutability: 'nonpayable',
3126
3119
  },
3127
3120
  {
3128
3121
  type: 'function',
3129
- inputs: [{ name: '', internalType: 'address', type: 'address' }],
3130
- name: 'creationMode',
3131
- outputs: [
3132
- {
3133
- name: '',
3134
- internalType: 'enum PolicyRegistry.CreationMode',
3135
- type: 'uint8',
3136
- },
3137
- ],
3122
+ inputs: [],
3123
+ name: 'authority',
3124
+ outputs: [{ name: '', internalType: 'address', type: 'address' }],
3138
3125
  stateMutability: 'view',
3139
3126
  },
3140
3127
  {
3141
3128
  type: 'function',
3142
- inputs: [{ name: '', internalType: 'address', type: 'address' }],
3143
- name: 'entries',
3144
- outputs: [
3145
- { name: 'listed', internalType: 'bool', type: 'bool' },
3146
- { name: 'until', internalType: 'uint64', type: 'uint64' },
3147
- { name: 'index', internalType: 'uint32', type: 'uint32' },
3148
- { name: 'name', internalType: 'bytes32', type: 'bytes32' },
3149
- ],
3129
+ inputs: [],
3130
+ name: 'baseCurated',
3131
+ outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
3150
3132
  stateMutability: 'view',
3151
3133
  },
3152
3134
  {
3153
3135
  type: 'function',
3154
3136
  inputs: [{ name: '', internalType: 'address', type: 'address' }],
3155
- name: 'forwarderTrusted',
3137
+ name: 'baseListed',
3156
3138
  outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
3157
3139
  stateMutability: 'view',
3158
3140
  },
3159
3141
  {
3160
3142
  type: 'function',
3161
- inputs: [{ name: 'policy', internalType: 'address', type: 'address' }],
3162
- name: 'isApproved',
3163
- outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
3143
+ inputs: [],
3144
+ name: 'feeMask',
3145
+ outputs: [{ name: '', internalType: 'uint8', type: 'uint8' }],
3164
3146
  stateMutability: 'view',
3165
3147
  },
3166
3148
  {
3167
3149
  type: 'function',
3168
- inputs: [{ name: '', internalType: 'address', type: 'address' }],
3169
- name: 'kindOf',
3170
- outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }],
3150
+ inputs: [],
3151
+ name: 'fixedAuthority',
3152
+ outputs: [{ name: '', internalType: 'address', type: 'address' }],
3171
3153
  stateMutability: 'view',
3172
3154
  },
3173
3155
  {
3174
3156
  type: 'function',
3175
3157
  inputs: [],
3176
- name: 'logAuthority',
3177
- outputs: [{ name: '', internalType: 'address', type: 'address' }],
3158
+ name: 'incomeHarvestOnly',
3159
+ outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
3178
3160
  stateMutability: 'view',
3179
3161
  },
3180
3162
  {
3181
3163
  type: 'function',
3182
3164
  inputs: [],
3183
- name: 'pendingLogAuthority',
3184
- outputs: [{ name: '', internalType: 'address', type: 'address' }],
3165
+ name: 'incomeTaxRate',
3166
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
3185
3167
  stateMutability: 'view',
3186
3168
  },
3187
3169
  {
3188
3170
  type: 'function',
3189
3171
  inputs: [],
3190
- name: 'policies',
3191
- outputs: [{ name: '', internalType: 'address[]', type: 'address[]' }],
3172
+ name: 'kind',
3173
+ outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }],
3174
+ stateMutability: 'pure',
3175
+ },
3176
+ {
3177
+ type: 'function',
3178
+ inputs: [],
3179
+ name: 'lenMax',
3180
+ outputs: [{ name: '', internalType: 'uint8', type: 'uint8' }],
3192
3181
  stateMutability: 'view',
3193
3182
  },
3194
3183
  {
3195
3184
  type: 'function',
3196
- inputs: [{ name: 'next', internalType: 'address', type: 'address' }],
3197
- name: 'proposeLogAuthority',
3198
- outputs: [],
3199
- stateMutability: 'nonpayable',
3185
+ inputs: [],
3186
+ name: 'lnCapMin',
3187
+ outputs: [{ name: '', internalType: 'uint24', type: 'uint24' }],
3188
+ stateMutability: 'view',
3200
3189
  },
3201
3190
  {
3202
3191
  type: 'function',
3203
- inputs: [{ name: 'policy', internalType: 'address', type: 'address' }],
3204
- name: 'revoke',
3205
- outputs: [],
3206
- stateMutability: 'nonpayable',
3192
+ inputs: [],
3193
+ name: 'manager',
3194
+ outputs: [{ name: '', internalType: 'address', type: 'address' }],
3195
+ stateMutability: 'view',
3207
3196
  },
3208
3197
  {
3209
3198
  type: 'function',
3210
3199
  inputs: [
3211
- { name: 'policy', internalType: 'address', type: 'address' },
3200
+ { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
3212
3201
  {
3213
- name: 'mode',
3214
- internalType: 'enum PolicyRegistry.CreationMode',
3202
+ name: 'action',
3203
+ internalType: 'enum IPolicyBase.Action',
3215
3204
  type: 'uint8',
3216
3205
  },
3206
+ { name: 'who', internalType: 'address', type: 'address' },
3217
3207
  ],
3218
- name: 'setCreationMode',
3219
- outputs: [],
3220
- stateMutability: 'nonpayable',
3208
+ name: 'may',
3209
+ outputs: [{ name: '', internalType: 'bytes4', type: 'bytes4' }],
3210
+ stateMutability: 'view',
3221
3211
  },
3222
3212
  {
3223
3213
  type: 'function',
3224
3214
  inputs: [
3225
- { name: 'forwarder', internalType: 'address', type: 'address' },
3226
- { name: 'trusted', internalType: 'bool', type: 'bool' },
3215
+ { name: '', internalType: 'bytes32', type: 'bytes32' },
3216
+ { name: 'n', internalType: 'uint256', type: 'uint256' },
3217
+ { name: 'quoteAmount', internalType: 'uint256', type: 'uint256' },
3218
+ { name: 'lnCapOverSeed', internalType: 'uint24', type: 'uint24' },
3219
+ { name: 'L', internalType: 'uint256', type: 'uint256' },
3227
3220
  ],
3228
- name: 'setForwarderTrusted',
3229
- outputs: [],
3230
- stateMutability: 'nonpayable',
3221
+ name: 'mayDeploy',
3222
+ outputs: [{ name: '', internalType: 'bytes4', type: 'bytes4' }],
3223
+ stateMutability: 'view',
3231
3224
  },
3232
3225
  {
3233
3226
  type: 'function',
3234
3227
  inputs: [
3235
- { name: 'who', internalType: 'address', type: 'address' },
3236
- { name: 'name', internalType: 'bytes32', type: 'bytes32' },
3228
+ { name: '', internalType: 'bytes32', type: 'bytes32' },
3229
+ { name: 'income', internalType: 'uint256', type: 'uint256' },
3230
+ { name: 'extra', internalType: 'uint256', type: 'uint256' },
3231
+ { name: 'Q', internalType: 'uint256', type: 'uint256' },
3232
+ { name: 'L', internalType: 'uint256', type: 'uint256' },
3233
+ ],
3234
+ name: 'mayHarvest',
3235
+ outputs: [{ name: '', internalType: 'bytes4', type: 'bytes4' }],
3236
+ stateMutability: 'view',
3237
+ },
3238
+ {
3239
+ type: 'function',
3240
+ inputs: [
3241
+ { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
3242
+ { name: 'caller', internalType: 'address', type: 'address' },
3243
+ { name: 'quote', internalType: 'address', type: 'address' },
3244
+ { name: 'bases', internalType: 'address[]', type: 'address[]' },
3245
+ { name: 'swapFeeIdx', internalType: 'uint8', type: 'uint8' },
3246
+ { name: 'salt', internalType: 'bytes32', type: 'bytes32' },
3247
+ ],
3248
+ name: 'mayInit',
3249
+ outputs: [
3250
+ { name: 'flags', internalType: 'uint8', type: 'uint8' },
3251
+ { name: 'op', internalType: 'address', type: 'address' },
3237
3252
  ],
3238
- name: 'setSponsorName',
3239
- outputs: [],
3240
3253
  stateMutability: 'nonpayable',
3241
3254
  },
3242
3255
  {
3243
3256
  type: 'function',
3244
- inputs: [{ name: '', internalType: 'address', type: 'address' }],
3245
- name: 'sponsorName',
3246
- outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }],
3257
+ inputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }],
3258
+ name: 'mintMode',
3259
+ outputs: [
3260
+ { name: '', internalType: 'enum IPolicyBase.Mode', type: 'uint8' },
3261
+ ],
3247
3262
  stateMutability: 'view',
3248
3263
  },
3249
3264
  {
3250
3265
  type: 'function',
3251
- inputs: [{ name: 'policy', internalType: 'address', type: 'address' }],
3252
- name: 'sponsorOf',
3266
+ inputs: [],
3267
+ name: 'open',
3268
+ outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
3269
+ stateMutability: 'view',
3270
+ },
3271
+ {
3272
+ type: 'function',
3273
+ inputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }],
3274
+ name: 'operator',
3253
3275
  outputs: [{ name: '', internalType: 'address', type: 'address' }],
3254
3276
  stateMutability: 'view',
3255
3277
  },
3256
3278
  {
3257
3279
  type: 'function',
3258
- inputs: [
3259
- { name: 'policy', internalType: 'address', type: 'address' },
3260
- { name: 'untilTime', internalType: 'uint64', type: 'uint64' },
3261
- ],
3262
- name: 'sunset',
3263
- outputs: [],
3264
- stateMutability: 'nonpayable',
3280
+ inputs: [],
3281
+ name: 'quoteBuffer',
3282
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
3283
+ stateMutability: 'view',
3265
3284
  },
3266
3285
  {
3267
3286
  type: 'function',
3268
- inputs: [{ name: 'caller', internalType: 'address', type: 'address' }],
3269
- name: 'userOf',
3270
- outputs: [{ name: '', internalType: 'address', type: 'address' }],
3287
+ inputs: [],
3288
+ name: 'quoteCurated',
3289
+ outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
3271
3290
  stateMutability: 'view',
3272
3291
  },
3273
3292
  {
3274
- type: 'event',
3275
- anonymous: false,
3293
+ type: 'function',
3294
+ inputs: [{ name: '', internalType: 'address', type: 'address' }],
3295
+ name: 'quoteListed',
3296
+ outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
3297
+ stateMutability: 'view',
3298
+ },
3299
+ {
3300
+ type: 'function',
3301
+ inputs: [{ name: '', internalType: 'address', type: 'address' }],
3302
+ name: 'rights',
3303
+ outputs: [{ name: '', internalType: 'uint8', type: 'uint8' }],
3304
+ stateMutability: 'view',
3305
+ },
3306
+ {
3307
+ type: 'function',
3308
+ inputs: [],
3309
+ name: 'seedToDead',
3310
+ outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
3311
+ stateMutability: 'view',
3312
+ },
3313
+ {
3314
+ type: 'function',
3276
3315
  inputs: [
3277
- {
3278
- name: 'policy',
3279
- internalType: 'address',
3280
- type: 'address',
3281
- indexed: true,
3282
- },
3283
- {
3284
- name: 'name',
3285
- internalType: 'bytes32',
3286
- type: 'bytes32',
3287
- indexed: false,
3288
- },
3316
+ { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
3317
+ { name: 'mode', internalType: 'enum IPolicyBase.Mode', type: 'uint8' },
3289
3318
  ],
3290
- name: 'Approved',
3319
+ name: 'setMintMode',
3320
+ outputs: [],
3321
+ stateMutability: 'nonpayable',
3291
3322
  },
3292
3323
  {
3293
- type: 'event',
3294
- anonymous: false,
3324
+ type: 'function',
3295
3325
  inputs: [
3296
- {
3297
- name: 'policy',
3298
- internalType: 'address',
3299
- type: 'address',
3300
- indexed: true,
3301
- },
3302
- {
3303
- name: 'mode',
3304
- internalType: 'enum PolicyRegistry.CreationMode',
3305
- type: 'uint8',
3306
- indexed: false,
3307
- },
3326
+ { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
3327
+ { name: 'name', internalType: 'bytes32', type: 'bytes32' },
3308
3328
  ],
3309
- name: 'CreationModeSet',
3329
+ name: 'setName',
3330
+ outputs: [],
3331
+ stateMutability: 'nonpayable',
3310
3332
  },
3311
3333
  {
3312
- type: 'event',
3313
- anonymous: false,
3334
+ type: 'function',
3314
3335
  inputs: [
3315
- {
3316
- name: 'forwarder',
3317
- internalType: 'address',
3318
- type: 'address',
3319
- indexed: true,
3320
- },
3321
- { name: 'trusted', internalType: 'bool', type: 'bool', indexed: false },
3336
+ { name: 'who', internalType: 'address[]', type: 'address[]' },
3337
+ { name: 'bits', internalType: 'uint8', type: 'uint8' },
3322
3338
  ],
3323
- name: 'ForwarderTrusted',
3339
+ name: 'setRights',
3340
+ outputs: [],
3341
+ stateMutability: 'nonpayable',
3324
3342
  },
3325
3343
  {
3326
- type: 'event',
3327
- anonymous: false,
3344
+ type: 'function',
3328
3345
  inputs: [
3329
- { name: 'prev', internalType: 'address', type: 'address', indexed: true },
3330
- { name: 'next', internalType: 'address', type: 'address', indexed: true },
3346
+ { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
3347
+ { name: 'mode', internalType: 'enum IPolicyBase.Mode', type: 'uint8' },
3331
3348
  ],
3332
- name: 'LogAuthorityAccepted',
3349
+ name: 'setSwapMode',
3350
+ outputs: [],
3351
+ stateMutability: 'nonpayable',
3352
+ },
3353
+ {
3354
+ type: 'function',
3355
+ inputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }],
3356
+ name: 'swapMode',
3357
+ outputs: [
3358
+ { name: '', internalType: 'enum IPolicyBase.Mode', type: 'uint8' },
3359
+ ],
3360
+ stateMutability: 'view',
3361
+ },
3362
+ {
3363
+ type: 'function',
3364
+ inputs: [{ name: 'poolId', internalType: 'bytes32', type: 'bytes32' }],
3365
+ name: 'taxOf',
3366
+ outputs: [
3367
+ { name: 'payer', internalType: 'address', type: 'address' },
3368
+ { name: 'rate', internalType: 'uint256', type: 'uint256' },
3369
+ ],
3370
+ stateMutability: 'view',
3333
3371
  },
3334
3372
  {
3335
3373
  type: 'event',
3336
3374
  anonymous: false,
3337
3375
  inputs: [
3338
3376
  {
3339
- name: 'current',
3340
- internalType: 'address',
3341
- type: 'address',
3377
+ name: 'poolId',
3378
+ internalType: 'bytes32',
3379
+ type: 'bytes32',
3342
3380
  indexed: true,
3343
3381
  },
3344
3382
  {
3345
- name: 'proposed',
3346
- internalType: 'address',
3347
- type: 'address',
3348
- indexed: true,
3383
+ name: 'mode',
3384
+ internalType: 'enum IPolicyBase.Mode',
3385
+ type: 'uint8',
3386
+ indexed: false,
3349
3387
  },
3350
3388
  ],
3351
- name: 'LogAuthorityProposed',
3389
+ name: 'MintModeSet',
3352
3390
  },
3353
3391
  {
3354
3392
  type: 'event',
3355
3393
  anonymous: false,
3356
3394
  inputs: [
3357
3395
  {
3358
- name: 'policy',
3359
- internalType: 'address',
3360
- type: 'address',
3396
+ name: 'poolId',
3397
+ internalType: 'bytes32',
3398
+ type: 'bytes32',
3361
3399
  indexed: true,
3362
3400
  },
3363
- ],
3364
- name: 'Revoked',
3365
- },
3366
- {
3367
- type: 'event',
3368
- anonymous: false,
3369
- inputs: [
3370
- { name: 'who', internalType: 'address', type: 'address', indexed: true },
3371
3401
  {
3372
3402
  name: 'name',
3373
3403
  internalType: 'bytes32',
@@ -3375,1248 +3405,941 @@ export const policyRegistryAbi = [
3375
3405
  indexed: false,
3376
3406
  },
3377
3407
  ],
3378
- name: 'SponsorNamed',
3408
+ name: 'NameSet',
3379
3409
  },
3380
3410
  {
3381
3411
  type: 'event',
3382
3412
  anonymous: false,
3383
3413
  inputs: [
3384
3414
  {
3385
- name: 'policy',
3386
- internalType: 'address',
3387
- type: 'address',
3415
+ name: 'poolId',
3416
+ internalType: 'bytes32',
3417
+ type: 'bytes32',
3388
3418
  indexed: true,
3389
3419
  },
3390
- {
3391
- name: 'untilTime',
3392
- internalType: 'uint64',
3393
- type: 'uint64',
3394
- indexed: false,
3395
- },
3420
+ { name: 'prev', internalType: 'address', type: 'address', indexed: true },
3421
+ { name: 'next', internalType: 'address', type: 'address', indexed: true },
3396
3422
  ],
3397
- name: 'SunsetSet',
3423
+ name: 'OperatorAppointed',
3398
3424
  },
3399
- { type: 'error', inputs: [], name: 'BadSunset' },
3400
- { type: 'error', inputs: [], name: 'InvalidForwardedUser' },
3401
- { type: 'error', inputs: [], name: 'NotAPolicy' },
3402
- { type: 'error', inputs: [], name: 'NotListed' },
3403
- { type: 'error', inputs: [], name: 'NotLogAuthority' },
3404
- { type: 'error', inputs: [], name: 'SponsorOnly' },
3405
- ] as const
3406
-
3407
- //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
3408
- // RouterActions
3409
- //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
3410
-
3411
- export const routerActionsAbi = [
3412
3425
  {
3413
- type: 'function',
3426
+ type: 'event',
3427
+ anonymous: false,
3414
3428
  inputs: [
3415
- {
3416
- name: 'a',
3417
- internalType: 'struct BurnAct',
3418
- type: 'tuple',
3419
- components: [
3420
- { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
3421
- { name: 'ids', internalType: 'uint256[]', type: 'uint256[]' },
3422
- { name: 'shares', internalType: 'uint256[]', type: 'uint256[]' },
3423
- ],
3424
- },
3429
+ { name: 'who', internalType: 'address', type: 'address', indexed: true },
3430
+ { name: 'bits', internalType: 'uint8', type: 'uint8', indexed: false },
3425
3431
  ],
3426
- name: 'encodeBurn',
3427
- outputs: [{ name: '', internalType: 'bytes', type: 'bytes' }],
3428
- stateMutability: 'pure',
3432
+ name: 'RightsSet',
3429
3433
  },
3430
3434
  {
3431
- type: 'function',
3435
+ type: 'event',
3436
+ anonymous: false,
3432
3437
  inputs: [
3433
3438
  {
3434
- name: 'a',
3435
- internalType: 'struct ClaimAct',
3436
- type: 'tuple',
3437
- components: [
3438
- { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
3439
- { name: 'ids', internalType: 'uint256[]', type: 'uint256[]' },
3440
- ],
3439
+ name: 'poolId',
3440
+ internalType: 'bytes32',
3441
+ type: 'bytes32',
3442
+ indexed: true,
3441
3443
  },
3442
- ],
3443
- name: 'encodeClaim',
3444
- outputs: [{ name: '', internalType: 'bytes', type: 'bytes' }],
3445
- stateMutability: 'pure',
3446
- },
3447
- {
3448
- type: 'function',
3449
- inputs: [
3450
3444
  {
3451
- name: 'a',
3452
- internalType: 'struct MintAct',
3453
- type: 'tuple',
3454
- components: [
3455
- { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
3456
- { name: 'targetFloor', internalType: 'int256', type: 'int256' },
3457
- { name: 'cap', internalType: 'int256', type: 'int256' },
3458
- { name: 'L', internalType: 'uint256', type: 'uint256' },
3459
- ],
3445
+ name: 'mode',
3446
+ internalType: 'enum IPolicyBase.Mode',
3447
+ type: 'uint8',
3448
+ indexed: false,
3460
3449
  },
3461
3450
  ],
3462
- name: 'encodeMint',
3463
- outputs: [{ name: '', internalType: 'bytes', type: 'bytes' }],
3464
- stateMutability: 'pure',
3451
+ name: 'SwapModeSet',
3465
3452
  },
3453
+ { type: 'error', inputs: [], name: 'AlreadyHeld' },
3454
+ { type: 'error', inputs: [], name: 'BadParams' },
3455
+ { type: 'error', inputs: [], name: 'BadRights' },
3466
3456
  {
3467
- type: 'function',
3468
- inputs: [
3469
- {
3470
- name: 'a',
3471
- internalType: 'struct PathAct',
3472
- type: 'tuple',
3473
- components: [
3474
- {
3475
- name: 'hops',
3476
- internalType: 'struct Hop[]',
3477
- type: 'tuple[]',
3478
- components: [
3479
- { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
3480
- { name: 'baseIn', internalType: 'bool', type: 'bool' },
3481
- ],
3482
- },
3483
- { name: 'amountIn', internalType: 'uint256', type: 'uint256' },
3484
- { name: 'minOut', internalType: 'uint256', type: 'uint256' },
3485
- ],
3486
- },
3487
- ],
3488
- name: 'encodePath',
3489
- outputs: [{ name: '', internalType: 'bytes', type: 'bytes' }],
3490
- stateMutability: 'pure',
3457
+ type: 'error',
3458
+ inputs: [{ name: 'base', internalType: 'address', type: 'address' }],
3459
+ name: 'BaseNotListed',
3491
3460
  },
3461
+ { type: 'error', inputs: [], name: 'CapTooClose' },
3492
3462
  {
3493
- type: 'function',
3494
- inputs: [
3495
- {
3496
- name: 'a',
3497
- internalType: 'struct SwapAct',
3498
- type: 'tuple',
3499
- components: [
3500
- { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
3501
- { name: 'baseSide', internalType: 'bool', type: 'bool' },
3502
- { name: 'amount', internalType: 'uint256', type: 'uint256' },
3503
- { name: 'limit', internalType: 'uint256', type: 'uint256' },
3504
- ],
3505
- },
3506
- ],
3507
- name: 'encodeSwap',
3508
- outputs: [{ name: '', internalType: 'bytes', type: 'bytes' }],
3509
- stateMutability: 'pure',
3463
+ type: 'error',
3464
+ inputs: [{ name: 'idx', internalType: 'uint256', type: 'uint256' }],
3465
+ name: 'FeeNotListed',
3510
3466
  },
3467
+ { type: 'error', inputs: [], name: 'GatesUnavailable' },
3468
+ { type: 'error', inputs: [], name: 'InactivePool' },
3469
+ { type: 'error', inputs: [], name: 'IncomeOnly' },
3470
+ { type: 'error', inputs: [], name: 'ModeOrder' },
3471
+ { type: 'error', inputs: [], name: 'NotAuthority' },
3472
+ { type: 'error', inputs: [], name: 'NotCanonical' },
3473
+ { type: 'error', inputs: [], name: 'NotManager' },
3474
+ { type: 'error', inputs: [], name: 'NotOperator' },
3511
3475
  {
3512
- type: 'function',
3513
- inputs: [
3514
- {
3515
- name: 'a',
3516
- internalType: 'struct UpdateAct',
3517
- type: 'tuple',
3518
- components: [
3519
- { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
3520
- { name: 'fromId', internalType: 'uint256', type: 'uint256' },
3521
- { name: 'shares', internalType: 'uint256', type: 'uint256' },
3522
- { name: 'toFloor', internalType: 'int256', type: 'int256' },
3523
- { name: 'toCap', internalType: 'int256', type: 'int256' },
3524
- { name: 'newL', internalType: 'uint256', type: 'uint256' },
3525
- ],
3526
- },
3527
- ],
3528
- name: 'encodeUpdate',
3529
- outputs: [{ name: '', internalType: 'bytes', type: 'bytes' }],
3530
- stateMutability: 'pure',
3476
+ type: 'error',
3477
+ inputs: [{ name: 'quote', internalType: 'address', type: 'address' }],
3478
+ name: 'QuoteNotListed',
3531
3479
  },
3480
+ { type: 'error', inputs: [], name: 'QuoteTooThin' },
3481
+ { type: 'error', inputs: [], name: 'Refused' },
3482
+ { type: 'error', inputs: [], name: 'TooManyLegs' },
3532
3483
  ] as const
3533
3484
 
3534
3485
  //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
3535
- // RouterC
3486
+ // PolicyRegistry
3536
3487
  //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
3537
3488
 
3538
- export const routerCAbi = [
3489
+ export const policyRegistryAbi = [
3539
3490
  {
3540
3491
  type: 'constructor',
3541
3492
  inputs: [
3542
- { name: '_mgr', internalType: 'contract ManagerC', type: 'address' },
3543
- { name: '_permit2', internalType: 'address', type: 'address' },
3493
+ { name: '_logAuthority', internalType: 'address', type: 'address' },
3544
3494
  ],
3545
3495
  stateMutability: 'nonpayable',
3546
3496
  },
3547
3497
  {
3548
3498
  type: 'function',
3549
3499
  inputs: [],
3550
- name: 'NO_CAP',
3551
- outputs: [{ name: '', internalType: 'int256', type: 'int256' }],
3552
- stateMutability: 'view',
3500
+ name: 'acceptLogAuthority',
3501
+ outputs: [],
3502
+ stateMutability: 'nonpayable',
3553
3503
  },
3554
3504
  {
3555
3505
  type: 'function',
3556
3506
  inputs: [
3557
- { name: 'owner', internalType: 'address', type: 'address' },
3558
- {
3559
- name: 'permitSingle',
3560
- internalType: 'struct IPermit2.PermitSingle',
3561
- type: 'tuple',
3562
- components: [
3563
- {
3564
- name: 'details',
3565
- internalType: 'struct IPermit2.PermitDetails',
3566
- type: 'tuple',
3567
- components: [
3568
- { name: 'token', internalType: 'address', type: 'address' },
3569
- { name: 'amount', internalType: 'uint160', type: 'uint160' },
3570
- { name: 'expiration', internalType: 'uint48', type: 'uint48' },
3571
- { name: 'nonce', internalType: 'uint48', type: 'uint48' },
3572
- ],
3573
- },
3574
- { name: 'spender', internalType: 'address', type: 'address' },
3575
- { name: 'sigDeadline', internalType: 'uint256', type: 'uint256' },
3576
- ],
3577
- },
3578
- { name: 'signature', internalType: 'bytes', type: 'bytes' },
3507
+ { name: 'policy', internalType: 'address', type: 'address' },
3508
+ { name: 'name', internalType: 'bytes32', type: 'bytes32' },
3579
3509
  ],
3580
- name: 'applyPermit2',
3510
+ name: 'approve',
3581
3511
  outputs: [],
3582
3512
  stateMutability: 'nonpayable',
3583
3513
  },
3584
3514
  {
3585
3515
  type: 'function',
3586
- inputs: [
3587
- { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
3588
- { name: 'base', internalType: 'address', type: 'address' },
3589
- { name: 'quote', internalType: 'address', type: 'address' },
3590
- { name: 'ids', internalType: 'uint256[]', type: 'uint256[]' },
3591
- { name: 'shares', internalType: 'uint256[]', type: 'uint256[]' },
3592
- { name: 'minBaseOut', internalType: 'uint256', type: 'uint256' },
3593
- { name: 'minQuoteOut', internalType: 'uint256', type: 'uint256' },
3594
- { name: 'recipient', internalType: 'address', type: 'address' },
3595
- { name: 'deadline', internalType: 'uint256', type: 'uint256' },
3596
- ],
3597
- name: 'burn',
3516
+ inputs: [{ name: '', internalType: 'address', type: 'address' }],
3517
+ name: 'entries',
3598
3518
  outputs: [
3599
- { name: 'baseOut', internalType: 'uint256', type: 'uint256' },
3600
- { name: 'quoteOut', internalType: 'uint256', type: 'uint256' },
3519
+ { name: 'listed', internalType: 'bool', type: 'bool' },
3520
+ { name: 'until', internalType: 'uint64', type: 'uint64' },
3521
+ { name: 'index', internalType: 'uint32', type: 'uint32' },
3522
+ { name: 'name', internalType: 'bytes32', type: 'bytes32' },
3601
3523
  ],
3602
- stateMutability: 'nonpayable',
3524
+ stateMutability: 'view',
3603
3525
  },
3604
3526
  {
3605
3527
  type: 'function',
3606
- inputs: [
3607
- { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
3608
- { name: 'quote', internalType: 'address', type: 'address' },
3609
- { name: 'ids', internalType: 'uint256[]', type: 'uint256[]' },
3610
- { name: 'recipient', internalType: 'address', type: 'address' },
3611
- { name: 'deadline', internalType: 'uint256', type: 'uint256' },
3612
- ],
3613
- name: 'claim',
3614
- outputs: [{ name: 'total', internalType: 'uint256', type: 'uint256' }],
3615
- stateMutability: 'nonpayable',
3528
+ inputs: [{ name: '', internalType: 'address', type: 'address' }],
3529
+ name: 'forwarderTrusted',
3530
+ outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
3531
+ stateMutability: 'view',
3616
3532
  },
3617
3533
  {
3618
3534
  type: 'function',
3619
- inputs: [
3620
- {
3621
- name: 'key',
3622
- internalType: 'struct PoolKeyC',
3623
- type: 'tuple',
3624
- components: [
3625
- { name: 'base', internalType: 'address', type: 'address' },
3626
- { name: 'quote', internalType: 'address', type: 'address' },
3627
- { name: 'tickSpacing', internalType: 'int256', type: 'int256' },
3628
- { name: 'policy', internalType: 'address', type: 'address' },
3629
- { name: 'creator', internalType: 'address', type: 'address' },
3630
- { name: 'salt', internalType: 'bytes32', type: 'bytes32' },
3631
- { name: 'swapFee', internalType: 'uint256', type: 'uint256' },
3632
- { name: 'mintFee', internalType: 'uint256', type: 'uint256' },
3633
- ],
3634
- },
3635
- { name: 'initialLogPrice', internalType: 'int256', type: 'int256' },
3636
- { name: 'targetFloor', internalType: 'int256', type: 'int256' },
3637
- { name: 'L', internalType: 'uint256', type: 'uint256' },
3638
- { name: 'maxBaseIn', internalType: 'uint256', type: 'uint256' },
3639
- { name: 'maxQuoteIn', internalType: 'uint256', type: 'uint256' },
3640
- { name: 'recipient', internalType: 'address', type: 'address' },
3641
- { name: 'deadline', internalType: 'uint256', type: 'uint256' },
3642
- ],
3643
- name: 'createMarket',
3644
- outputs: [
3645
- { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
3646
- { name: 'baseIn', internalType: 'uint256', type: 'uint256' },
3647
- { name: 'quoteIn', internalType: 'uint256', type: 'uint256' },
3648
- ],
3649
- stateMutability: 'nonpayable',
3535
+ inputs: [{ name: 'policy', internalType: 'address', type: 'address' }],
3536
+ name: 'isApproved',
3537
+ outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
3538
+ stateMutability: 'view',
3650
3539
  },
3651
3540
  {
3652
3541
  type: 'function',
3653
- inputs: [
3654
- {
3655
- name: 'actions',
3656
- internalType: 'struct Action[]',
3657
- type: 'tuple[]',
3658
- components: [
3659
- { name: 'op', internalType: 'enum OpType', type: 'uint8' },
3660
- { name: 'data', internalType: 'bytes', type: 'bytes' },
3661
- ],
3662
- },
3663
- {
3664
- name: 'settle',
3665
- internalType: 'struct Settle',
3666
- type: 'tuple',
3667
- components: [
3668
- { name: 'tokens', internalType: 'address[]', type: 'address[]' },
3669
- { name: 'maxIn', internalType: 'uint256[]', type: 'uint256[]' },
3670
- { name: 'minOut', internalType: 'uint256[]', type: 'uint256[]' },
3671
- { name: 'recipient', internalType: 'address', type: 'address' },
3672
- ],
3673
- },
3674
- { name: 'deadline', internalType: 'uint256', type: 'uint256' },
3675
- ],
3676
- name: 'execute',
3677
- outputs: [
3678
- { name: 'results', internalType: 'bytes[]', type: 'bytes[]' },
3679
- { name: 'flows', internalType: 'int256[]', type: 'int256[]' },
3680
- ],
3681
- stateMutability: 'nonpayable',
3542
+ inputs: [{ name: '', internalType: 'address', type: 'address' }],
3543
+ name: 'kindOf',
3544
+ outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }],
3545
+ stateMutability: 'view',
3682
3546
  },
3683
3547
  {
3684
3548
  type: 'function',
3685
3549
  inputs: [],
3686
- name: 'mgr',
3687
- outputs: [{ name: '', internalType: 'contract ManagerC', type: 'address' }],
3550
+ name: 'logAuthority',
3551
+ outputs: [{ name: '', internalType: 'address', type: 'address' }],
3688
3552
  stateMutability: 'view',
3689
3553
  },
3690
3554
  {
3691
3555
  type: 'function',
3692
- inputs: [
3693
- { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
3694
- { name: 'base', internalType: 'address', type: 'address' },
3695
- { name: 'quote', internalType: 'address', type: 'address' },
3696
- { name: 'targetFloor', internalType: 'int256', type: 'int256' },
3697
- { name: 'cap', internalType: 'int256', type: 'int256' },
3698
- { name: 'L', internalType: 'uint256', type: 'uint256' },
3699
- { name: 'maxBaseIn', internalType: 'uint256', type: 'uint256' },
3700
- { name: 'maxQuoteIn', internalType: 'uint256', type: 'uint256' },
3701
- { name: 'recipient', internalType: 'address', type: 'address' },
3702
- { name: 'deadline', internalType: 'uint256', type: 'uint256' },
3703
- ],
3704
- name: 'mintBlended',
3705
- outputs: [
3706
- { name: 'baseIn', internalType: 'uint256', type: 'uint256' },
3707
- { name: 'quoteIn', internalType: 'uint256', type: 'uint256' },
3708
- ],
3709
- stateMutability: 'nonpayable',
3556
+ inputs: [],
3557
+ name: 'pendingLogAuthority',
3558
+ outputs: [{ name: '', internalType: 'address', type: 'address' }],
3559
+ stateMutability: 'view',
3710
3560
  },
3711
3561
  {
3712
3562
  type: 'function',
3713
- inputs: [
3714
- { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
3715
- { name: 'base', internalType: 'address', type: 'address' },
3716
- { name: 'quote', internalType: 'address', type: 'address' },
3717
- { name: 'fromId', internalType: 'uint256', type: 'uint256' },
3718
- { name: 'shares', internalType: 'uint256', type: 'uint256' },
3719
- { name: 'toFloor', internalType: 'int256', type: 'int256' },
3720
- { name: 'toCap', internalType: 'int256', type: 'int256' },
3721
- { name: 'maxBaseIn', internalType: 'uint256', type: 'uint256' },
3722
- { name: 'maxQuoteIn', internalType: 'uint256', type: 'uint256' },
3723
- { name: 'recipient', internalType: 'address', type: 'address' },
3724
- { name: 'deadline', internalType: 'uint256', type: 'uint256' },
3725
- ],
3726
- name: 'move',
3727
- outputs: [
3728
- { name: 'dBase', internalType: 'int256', type: 'int256' },
3729
- { name: 'dQuote', internalType: 'int256', type: 'int256' },
3730
- { name: 'newShares', internalType: 'uint256', type: 'uint256' },
3731
- ],
3732
- stateMutability: 'nonpayable',
3563
+ inputs: [],
3564
+ name: 'policies',
3565
+ outputs: [{ name: '', internalType: 'address[]', type: 'address[]' }],
3566
+ stateMutability: 'view',
3733
3567
  },
3734
3568
  {
3735
3569
  type: 'function',
3736
- inputs: [{ name: 'data', internalType: 'bytes[]', type: 'bytes[]' }],
3737
- name: 'multicall',
3738
- outputs: [{ name: 'results', internalType: 'bytes[]', type: 'bytes[]' }],
3570
+ inputs: [{ name: 'next', internalType: 'address', type: 'address' }],
3571
+ name: 'proposeLogAuthority',
3572
+ outputs: [],
3739
3573
  stateMutability: 'nonpayable',
3740
3574
  },
3741
3575
  {
3742
3576
  type: 'function',
3743
- inputs: [],
3744
- name: 'permit2',
3745
- outputs: [{ name: '', internalType: 'contract IPermit2', type: 'address' }],
3746
- stateMutability: 'view',
3577
+ inputs: [{ name: 'policy', internalType: 'address', type: 'address' }],
3578
+ name: 'revoke',
3579
+ outputs: [],
3580
+ stateMutability: 'nonpayable',
3747
3581
  },
3748
3582
  {
3749
3583
  type: 'function',
3750
3584
  inputs: [
3751
- { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
3752
- { name: 'exactIn', internalType: 'bool', type: 'bool' },
3753
- { name: 'baseSide', internalType: 'bool', type: 'bool' },
3754
- { name: 'amount', internalType: 'uint256', type: 'uint256' },
3755
- { name: 'taker', internalType: 'address', type: 'address' },
3585
+ { name: 'forwarder', internalType: 'address', type: 'address' },
3586
+ { name: 'trusted', internalType: 'bool', type: 'bool' },
3756
3587
  ],
3757
- name: 'quoteSwap',
3588
+ name: 'setForwarderTrusted',
3758
3589
  outputs: [],
3759
3590
  stateMutability: 'nonpayable',
3760
3591
  },
3761
3592
  {
3762
3593
  type: 'function',
3763
3594
  inputs: [
3764
- { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
3765
- { name: 'tokenIn', internalType: 'address', type: 'address' },
3766
- { name: 'tokenOut', internalType: 'address', type: 'address' },
3767
- { name: 'baseIn', internalType: 'bool', type: 'bool' },
3768
- { name: 'amountIn', internalType: 'uint256', type: 'uint256' },
3769
- { name: 'minOut', internalType: 'uint256', type: 'uint256' },
3770
- { name: 'recipient', internalType: 'address', type: 'address' },
3771
- { name: 'deadline', internalType: 'uint256', type: 'uint256' },
3595
+ { name: 'who', internalType: 'address', type: 'address' },
3596
+ { name: 'name', internalType: 'bytes32', type: 'bytes32' },
3772
3597
  ],
3773
- name: 'swapExactIn',
3774
- outputs: [{ name: 'amountOut', internalType: 'uint256', type: 'uint256' }],
3598
+ name: 'setSponsorName',
3599
+ outputs: [],
3775
3600
  stateMutability: 'nonpayable',
3776
3601
  },
3777
3602
  {
3778
3603
  type: 'function',
3779
- inputs: [
3780
- {
3781
- name: 'hops',
3782
- internalType: 'struct Hop[]',
3783
- type: 'tuple[]',
3784
- components: [
3785
- { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
3786
- { name: 'baseIn', internalType: 'bool', type: 'bool' },
3787
- ],
3788
- },
3789
- { name: 'tokenIn', internalType: 'address', type: 'address' },
3790
- { name: 'tokenOut', internalType: 'address', type: 'address' },
3791
- { name: 'amountIn', internalType: 'uint256', type: 'uint256' },
3792
- { name: 'minOut', internalType: 'uint256', type: 'uint256' },
3793
- { name: 'recipient', internalType: 'address', type: 'address' },
3794
- { name: 'deadline', internalType: 'uint256', type: 'uint256' },
3795
- ],
3796
- name: 'swapExactInPath',
3797
- outputs: [{ name: 'amountOut', internalType: 'uint256', type: 'uint256' }],
3798
- stateMutability: 'nonpayable',
3604
+ inputs: [{ name: '', internalType: 'address', type: 'address' }],
3605
+ name: 'sponsorName',
3606
+ outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }],
3607
+ stateMutability: 'view',
3799
3608
  },
3800
3609
  {
3801
3610
  type: 'function',
3802
3611
  inputs: [
3803
- { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
3804
- { name: 'tokenIn', internalType: 'address', type: 'address' },
3805
- { name: 'tokenOut', internalType: 'address', type: 'address' },
3806
- { name: 'baseOut', internalType: 'bool', type: 'bool' },
3807
- { name: 'amountOut', internalType: 'uint256', type: 'uint256' },
3808
- { name: 'maxIn', internalType: 'uint256', type: 'uint256' },
3809
- { name: 'recipient', internalType: 'address', type: 'address' },
3810
- { name: 'deadline', internalType: 'uint256', type: 'uint256' },
3612
+ { name: 'policy', internalType: 'address', type: 'address' },
3613
+ { name: 'untilTime', internalType: 'uint64', type: 'uint64' },
3811
3614
  ],
3812
- name: 'swapExactOut',
3813
- outputs: [{ name: 'amountIn', internalType: 'uint256', type: 'uint256' }],
3615
+ name: 'sunset',
3616
+ outputs: [],
3814
3617
  stateMutability: 'nonpayable',
3815
3618
  },
3816
3619
  {
3817
3620
  type: 'function',
3818
- inputs: [{ name: 'data', internalType: 'bytes', type: 'bytes' }],
3819
- name: 'unlockCallback',
3820
- outputs: [{ name: '', internalType: 'bytes', type: 'bytes' }],
3821
- stateMutability: 'nonpayable',
3621
+ inputs: [{ name: 'caller', internalType: 'address', type: 'address' }],
3622
+ name: 'userOf',
3623
+ outputs: [{ name: '', internalType: 'address', type: 'address' }],
3624
+ stateMutability: 'view',
3822
3625
  },
3823
3626
  {
3824
- type: 'function',
3627
+ type: 'event',
3628
+ anonymous: false,
3825
3629
  inputs: [
3826
- { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
3827
- { name: 'base', internalType: 'address', type: 'address' },
3828
- { name: 'quote', internalType: 'address', type: 'address' },
3829
- { name: 'fromId', internalType: 'uint256', type: 'uint256' },
3830
- { name: 'shares', internalType: 'uint256', type: 'uint256' },
3831
- { name: 'toFloor', internalType: 'int256', type: 'int256' },
3832
- { name: 'toCap', internalType: 'int256', type: 'int256' },
3833
- { name: 'newL', internalType: 'uint256', type: 'uint256' },
3834
- { name: 'maxBaseIn', internalType: 'uint256', type: 'uint256' },
3835
- { name: 'maxQuoteIn', internalType: 'uint256', type: 'uint256' },
3836
- { name: 'recipient', internalType: 'address', type: 'address' },
3837
- { name: 'deadline', internalType: 'uint256', type: 'uint256' },
3630
+ {
3631
+ name: 'policy',
3632
+ internalType: 'address',
3633
+ type: 'address',
3634
+ indexed: true,
3635
+ },
3636
+ {
3637
+ name: 'name',
3638
+ internalType: 'bytes32',
3639
+ type: 'bytes32',
3640
+ indexed: false,
3641
+ },
3838
3642
  ],
3839
- name: 'update',
3840
- outputs: [
3841
- { name: 'dBase', internalType: 'int256', type: 'int256' },
3842
- { name: 'dQuote', internalType: 'int256', type: 'int256' },
3843
- { name: 'newShares', internalType: 'uint256', type: 'uint256' },
3643
+ name: 'Approved',
3644
+ },
3645
+ {
3646
+ type: 'event',
3647
+ anonymous: false,
3648
+ inputs: [
3649
+ {
3650
+ name: 'forwarder',
3651
+ internalType: 'address',
3652
+ type: 'address',
3653
+ indexed: true,
3654
+ },
3655
+ { name: 'trusted', internalType: 'bool', type: 'bool', indexed: false },
3844
3656
  ],
3845
- stateMutability: 'nonpayable',
3657
+ name: 'ForwarderTrusted',
3846
3658
  },
3847
3659
  {
3848
- type: 'function',
3849
- inputs: [],
3850
- name: 'user',
3851
- outputs: [{ name: 'u', internalType: 'address', type: 'address' }],
3852
- stateMutability: 'view',
3660
+ type: 'event',
3661
+ anonymous: false,
3662
+ inputs: [
3663
+ { name: 'prev', internalType: 'address', type: 'address', indexed: true },
3664
+ { name: 'next', internalType: 'address', type: 'address', indexed: true },
3665
+ ],
3666
+ name: 'LogAuthorityAccepted',
3853
3667
  },
3854
3668
  {
3855
- type: 'function',
3669
+ type: 'event',
3670
+ anonymous: false,
3856
3671
  inputs: [
3857
- { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
3858
- { name: 'base', internalType: 'address', type: 'address' },
3859
- { name: 'quote', internalType: 'address', type: 'address' },
3860
- { name: 'fundWithBase', internalType: 'bool', type: 'bool' },
3861
- { name: 'amountIn', internalType: 'uint256', type: 'uint256' },
3862
- { name: 'minSwapOut', internalType: 'uint256', type: 'uint256' },
3863
- { name: 'targetFloor', internalType: 'int256', type: 'int256' },
3864
- { name: 'cap', internalType: 'int256', type: 'int256' },
3865
- { name: 'L', internalType: 'uint256', type: 'uint256' },
3866
- { name: 'maxIn', internalType: 'uint256', type: 'uint256' },
3867
- { name: 'recipient', internalType: 'address', type: 'address' },
3868
- { name: 'deadline', internalType: 'uint256', type: 'uint256' },
3672
+ {
3673
+ name: 'current',
3674
+ internalType: 'address',
3675
+ type: 'address',
3676
+ indexed: true,
3677
+ },
3678
+ {
3679
+ name: 'proposed',
3680
+ internalType: 'address',
3681
+ type: 'address',
3682
+ indexed: true,
3683
+ },
3869
3684
  ],
3870
- name: 'zapIn',
3871
- outputs: [
3872
- { name: 'baseIn', internalType: 'uint256', type: 'uint256' },
3873
- { name: 'quoteIn', internalType: 'uint256', type: 'uint256' },
3685
+ name: 'LogAuthorityProposed',
3686
+ },
3687
+ {
3688
+ type: 'event',
3689
+ anonymous: false,
3690
+ inputs: [
3691
+ {
3692
+ name: 'policy',
3693
+ internalType: 'address',
3694
+ type: 'address',
3695
+ indexed: true,
3696
+ },
3874
3697
  ],
3875
- stateMutability: 'nonpayable',
3698
+ name: 'Revoked',
3876
3699
  },
3877
3700
  {
3878
3701
  type: 'event',
3879
3702
  anonymous: false,
3880
3703
  inputs: [
3881
- { name: 'user', internalType: 'address', type: 'address', indexed: true },
3704
+ { name: 'who', internalType: 'address', type: 'address', indexed: true },
3705
+ {
3706
+ name: 'name',
3707
+ internalType: 'bytes32',
3708
+ type: 'bytes32',
3709
+ indexed: false,
3710
+ },
3882
3711
  ],
3883
- name: 'RouterCall',
3712
+ name: 'SponsorNamed',
3884
3713
  },
3885
- { type: 'error', inputs: [], name: 'BadFloor' },
3886
- { type: 'error', inputs: [], name: 'BadRecipient' },
3887
- { type: 'error', inputs: [], name: 'DeadlineExceeded' },
3888
- { type: 'error', inputs: [], name: 'EmptyPath' },
3889
- { type: 'error', inputs: [], name: 'LengthMismatch' },
3890
- { type: 'error', inputs: [], name: 'NotManager' },
3891
3714
  {
3892
- type: 'error',
3893
- inputs: [{ name: 'amount', internalType: 'uint256', type: 'uint256' }],
3894
- name: 'QuoteResult',
3715
+ type: 'event',
3716
+ anonymous: false,
3717
+ inputs: [
3718
+ {
3719
+ name: 'policy',
3720
+ internalType: 'address',
3721
+ type: 'address',
3722
+ indexed: true,
3723
+ },
3724
+ {
3725
+ name: 'untilTime',
3726
+ internalType: 'uint64',
3727
+ type: 'uint64',
3728
+ indexed: false,
3729
+ },
3730
+ ],
3731
+ name: 'SunsetSet',
3895
3732
  },
3896
- { type: 'error', inputs: [], name: 'SlippageIn' },
3897
- { type: 'error', inputs: [], name: 'SlippageOut' },
3898
- { type: 'error', inputs: [], name: 'UnsupportedOp' },
3899
- { type: 'error', inputs: [], name: 'WrongToken' },
3900
- { type: 'error', inputs: [], name: 'ZeroAmount' },
3733
+ { type: 'error', inputs: [], name: 'BadSunset' },
3734
+ { type: 'error', inputs: [], name: 'NotAPolicy' },
3735
+ { type: 'error', inputs: [], name: 'NotListed' },
3736
+ { type: 'error', inputs: [], name: 'NotLogAuthority' },
3901
3737
  ] as const
3902
3738
 
3903
3739
  //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
3904
- // RouterF
3740
+ // RouterActions
3905
3741
  //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
3906
3742
 
3907
- export const routerFAbi = [
3908
- {
3909
- type: 'constructor',
3910
- inputs: [
3911
- { name: '_mgr', internalType: 'contract ManagerF', type: 'address' },
3912
- { name: '_permit2', internalType: 'address', type: 'address' },
3913
- ],
3914
- stateMutability: 'nonpayable',
3915
- },
3743
+ export const routerActionsAbi = [
3916
3744
  {
3917
3745
  type: 'function',
3918
3746
  inputs: [
3919
- { name: 'owner', internalType: 'address', type: 'address' },
3920
3747
  {
3921
- name: 'permitSingle',
3922
- internalType: 'struct IPermit2.PermitSingle',
3748
+ name: 'a',
3749
+ internalType: 'struct BurnAct',
3923
3750
  type: 'tuple',
3924
3751
  components: [
3925
- {
3926
- name: 'details',
3927
- internalType: 'struct IPermit2.PermitDetails',
3928
- type: 'tuple',
3929
- components: [
3930
- { name: 'token', internalType: 'address', type: 'address' },
3931
- { name: 'amount', internalType: 'uint160', type: 'uint160' },
3932
- { name: 'expiration', internalType: 'uint48', type: 'uint48' },
3933
- { name: 'nonce', internalType: 'uint48', type: 'uint48' },
3934
- ],
3935
- },
3936
- { name: 'spender', internalType: 'address', type: 'address' },
3937
- { name: 'sigDeadline', internalType: 'uint256', type: 'uint256' },
3752
+ { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
3753
+ { name: 'ids', internalType: 'uint256[]', type: 'uint256[]' },
3754
+ { name: 'shares', internalType: 'uint256[]', type: 'uint256[]' },
3938
3755
  ],
3939
3756
  },
3940
- { name: 'signature', internalType: 'bytes', type: 'bytes' },
3941
3757
  ],
3942
- name: 'applyPermit2',
3943
- outputs: [],
3944
- stateMutability: 'nonpayable',
3945
- },
3946
- {
3947
- type: 'function',
3948
- inputs: [],
3949
- name: 'mgr',
3950
- outputs: [{ name: '', internalType: 'contract ManagerF', type: 'address' }],
3951
- stateMutability: 'view',
3952
- },
3953
- {
3954
- type: 'function',
3955
- inputs: [{ name: 'data', internalType: 'bytes[]', type: 'bytes[]' }],
3956
- name: 'multicall',
3957
- outputs: [{ name: 'results', internalType: 'bytes[]', type: 'bytes[]' }],
3958
- stateMutability: 'nonpayable',
3959
- },
3960
- {
3961
- type: 'function',
3962
- inputs: [],
3963
- name: 'permit2',
3964
- outputs: [{ name: '', internalType: 'contract IPermit2', type: 'address' }],
3965
- stateMutability: 'view',
3758
+ name: 'encodeBurn',
3759
+ outputs: [{ name: '', internalType: 'bytes', type: 'bytes' }],
3760
+ stateMutability: 'pure',
3966
3761
  },
3967
3762
  {
3968
3763
  type: 'function',
3969
3764
  inputs: [
3970
- { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
3971
- { name: 'kind', internalType: 'enum QuoteKind', type: 'uint8' },
3972
- { name: 'j', internalType: 'uint256', type: 'uint256' },
3973
- { name: 'k', internalType: 'uint256', type: 'uint256' },
3974
- { name: 'amountIn', internalType: 'uint256', type: 'uint256' },
3975
- { name: 'taker', internalType: 'address', type: 'address' },
3765
+ {
3766
+ name: 'a',
3767
+ internalType: 'struct ClaimAct',
3768
+ type: 'tuple',
3769
+ components: [
3770
+ { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
3771
+ { name: 'ids', internalType: 'uint256[]', type: 'uint256[]' },
3772
+ ],
3773
+ },
3976
3774
  ],
3977
- name: 'quoteSwap',
3978
- outputs: [],
3979
- stateMutability: 'nonpayable',
3775
+ name: 'encodeClaim',
3776
+ outputs: [{ name: '', internalType: 'bytes', type: 'bytes' }],
3777
+ stateMutability: 'pure',
3980
3778
  },
3981
3779
  {
3982
3780
  type: 'function',
3983
3781
  inputs: [
3984
- { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
3985
- { name: 'gen', internalType: 'uint256', type: 'uint256' },
3986
- { name: 'shares', internalType: 'uint256', type: 'uint256' },
3987
- { name: 'L', internalType: 'uint256', type: 'uint256' },
3988
- { name: 'maxQuoteIn', internalType: 'uint256', type: 'uint256' },
3989
- { name: 'minShares', internalType: 'uint256', type: 'uint256' },
3990
- { name: 'to', internalType: 'address', type: 'address' },
3991
- { name: 'deadline', internalType: 'uint256', type: 'uint256' },
3782
+ {
3783
+ name: 'a',
3784
+ internalType: 'struct MintAct',
3785
+ type: 'tuple',
3786
+ components: [
3787
+ { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
3788
+ { name: 'targetFloor', internalType: 'int256', type: 'int256' },
3789
+ { name: 'cap', internalType: 'int256', type: 'int256' },
3790
+ { name: 'L', internalType: 'uint256', type: 'uint256' },
3791
+ ],
3792
+ },
3992
3793
  ],
3993
- name: 'rollIn',
3994
- outputs: [{ name: 'sharesOut', internalType: 'uint256', type: 'uint256' }],
3995
- stateMutability: 'nonpayable',
3794
+ name: 'encodeMint',
3795
+ outputs: [{ name: '', internalType: 'bytes', type: 'bytes' }],
3796
+ stateMutability: 'pure',
3996
3797
  },
3997
3798
  {
3998
3799
  type: 'function',
3999
3800
  inputs: [
4000
- { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
4001
- { name: 'kind', internalType: 'enum QuoteKind', type: 'uint8' },
4002
- { name: 'j', internalType: 'uint256', type: 'uint256' },
4003
- { name: 'k', internalType: 'uint256', type: 'uint256' },
4004
- { name: 'amountIn', internalType: 'uint256', type: 'uint256' },
4005
- { name: 'minOut', internalType: 'uint256', type: 'uint256' },
4006
- { name: 'to', internalType: 'address', type: 'address' },
4007
- { name: 'deadline', internalType: 'uint256', type: 'uint256' },
3801
+ {
3802
+ name: 'a',
3803
+ internalType: 'struct PathAct',
3804
+ type: 'tuple',
3805
+ components: [
3806
+ {
3807
+ name: 'hops',
3808
+ internalType: 'struct Hop[]',
3809
+ type: 'tuple[]',
3810
+ components: [
3811
+ { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
3812
+ { name: 'baseIn', internalType: 'bool', type: 'bool' },
3813
+ ],
3814
+ },
3815
+ { name: 'amountIn', internalType: 'uint256', type: 'uint256' },
3816
+ { name: 'minOut', internalType: 'uint256', type: 'uint256' },
3817
+ ],
3818
+ },
4008
3819
  ],
4009
- name: 'swapExactIn',
4010
- outputs: [{ name: 'amountOut', internalType: 'uint256', type: 'uint256' }],
4011
- stateMutability: 'nonpayable',
4012
- },
4013
- {
4014
- type: 'function',
4015
- inputs: [{ name: 'data', internalType: 'bytes', type: 'bytes' }],
4016
- name: 'unlockCallback',
3820
+ name: 'encodePath',
4017
3821
  outputs: [{ name: '', internalType: 'bytes', type: 'bytes' }],
4018
- stateMutability: 'nonpayable',
3822
+ stateMutability: 'pure',
4019
3823
  },
4020
3824
  {
4021
3825
  type: 'function',
4022
3826
  inputs: [
4023
- { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
4024
- { name: 'L', internalType: 'uint256', type: 'uint256' },
4025
- { name: 'maxQuoteIn', internalType: 'uint256', type: 'uint256' },
4026
- { name: 'minShares', internalType: 'uint256', type: 'uint256' },
4027
- { name: 'to', internalType: 'address', type: 'address' },
4028
- { name: 'deadline', internalType: 'uint256', type: 'uint256' },
3827
+ {
3828
+ name: 'a',
3829
+ internalType: 'struct SwapAct',
3830
+ type: 'tuple',
3831
+ components: [
3832
+ { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
3833
+ { name: 'baseSide', internalType: 'bool', type: 'bool' },
3834
+ { name: 'amount', internalType: 'uint256', type: 'uint256' },
3835
+ { name: 'limit', internalType: 'uint256', type: 'uint256' },
3836
+ ],
3837
+ },
4029
3838
  ],
4030
- name: 'zapIn',
4031
- outputs: [{ name: 'shares', internalType: 'uint256', type: 'uint256' }],
4032
- stateMutability: 'nonpayable',
3839
+ name: 'encodeSwap',
3840
+ outputs: [{ name: '', internalType: 'bytes', type: 'bytes' }],
3841
+ stateMutability: 'pure',
4033
3842
  },
4034
3843
  {
4035
3844
  type: 'function',
4036
3845
  inputs: [
4037
- { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
4038
- { name: 'shares', internalType: 'uint256', type: 'uint256' },
4039
- { name: 'tokenOut', internalType: 'address', type: 'address' },
4040
- { name: 'minOut', internalType: 'uint256', type: 'uint256' },
4041
- { name: 'to', internalType: 'address', type: 'address' },
4042
- { name: 'deadline', internalType: 'uint256', type: 'uint256' },
4043
- ],
4044
- name: 'zapOut',
4045
- outputs: [{ name: 'amountOut', internalType: 'uint256', type: 'uint256' }],
4046
- stateMutability: 'nonpayable',
4047
- },
4048
- {
4049
- type: 'event',
4050
- anonymous: false,
4051
- inputs: [
4052
- { name: 'user', internalType: 'address', type: 'address', indexed: true },
3846
+ {
3847
+ name: 'a',
3848
+ internalType: 'struct UpdateAct',
3849
+ type: 'tuple',
3850
+ components: [
3851
+ { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
3852
+ { name: 'fromId', internalType: 'uint256', type: 'uint256' },
3853
+ { name: 'shares', internalType: 'uint256', type: 'uint256' },
3854
+ { name: 'toFloor', internalType: 'int256', type: 'int256' },
3855
+ { name: 'toCap', internalType: 'int256', type: 'int256' },
3856
+ { name: 'newL', internalType: 'uint256', type: 'uint256' },
3857
+ ],
3858
+ },
4053
3859
  ],
4054
- name: 'RouterCall',
4055
- },
4056
- { type: 'error', inputs: [], name: 'BadRecipient' },
4057
- { type: 'error', inputs: [], name: 'BadToken' },
4058
- { type: 'error', inputs: [], name: 'DeadlineExceeded' },
4059
- { type: 'error', inputs: [], name: 'DrainsBase' },
4060
- { type: 'error', inputs: [], name: 'NotManager' },
4061
- {
4062
- type: 'error',
4063
- inputs: [{ name: 'amount', internalType: 'uint256', type: 'uint256' }],
4064
- name: 'QuoteResult',
3860
+ name: 'encodeUpdate',
3861
+ outputs: [{ name: '', internalType: 'bytes', type: 'bytes' }],
3862
+ stateMutability: 'pure',
4065
3863
  },
4066
- { type: 'error', inputs: [], name: 'SlippageIn' },
4067
- { type: 'error', inputs: [], name: 'SlippageOut' },
4068
- { type: 'error', inputs: [], name: 'UnsupportedOp' },
4069
- { type: 'error', inputs: [], name: 'ZeroAmount' },
4070
3864
  ] as const
4071
3865
 
4072
3866
  //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
4073
- // SponsorPolicyC
3867
+ // RouterC
4074
3868
  //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
4075
3869
 
4076
- export const sponsorPolicyCAbi = [
3870
+ export const routerCAbi = [
4077
3871
  {
4078
3872
  type: 'constructor',
4079
3873
  inputs: [
4080
- { name: 'manager_', internalType: 'contract ManagerC', type: 'address' },
4081
- {
4082
- name: 'p',
4083
- internalType: 'struct SponsorParams',
4084
- type: 'tuple',
4085
- components: [
4086
- { name: 'sponsor', internalType: 'address', type: 'address' },
4087
- { name: 'swapTiers', internalType: 'uint256', type: 'uint256' },
4088
- { name: 'mintTiers', internalType: 'uint256', type: 'uint256' },
4089
- { name: 'canonical', internalType: 'bool', type: 'bool' },
4090
- { name: 'gatesAvailable', internalType: 'bool', type: 'bool' },
4091
- { name: 'bornGated', internalType: 'bool', type: 'bool' },
4092
- { name: 'quotes', internalType: 'address[]', type: 'address[]' },
4093
- ],
4094
- },
4095
- { name: 'swapFeeTax_', internalType: 'uint256', type: 'uint256' },
4096
- { name: 'spacings', internalType: 'int256[]', type: 'int256[]' },
4097
- ],
4098
- stateMutability: 'nonpayable',
4099
- },
4100
- {
4101
- type: 'function',
4102
- inputs: [],
4103
- name: 'SWAP_FEE_TAX_MAX',
4104
- outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
4105
- stateMutability: 'view',
4106
- },
4107
- {
4108
- type: 'function',
4109
- inputs: [
4110
- { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
4111
- { name: 'who', internalType: 'address', type: 'address' },
3874
+ { name: '_mgr', internalType: 'contract ManagerC', type: 'address' },
3875
+ { name: '_permit2', internalType: 'address', type: 'address' },
4112
3876
  ],
4113
- name: 'appointOperator',
4114
- outputs: [],
4115
3877
  stateMutability: 'nonpayable',
4116
3878
  },
4117
- {
4118
- type: 'function',
4119
- inputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }],
4120
- name: 'authority',
4121
- outputs: [{ name: '', internalType: 'address', type: 'address' }],
4122
- stateMutability: 'view',
4123
- },
4124
3879
  {
4125
3880
  type: 'function',
4126
3881
  inputs: [],
4127
- name: 'bornGated',
4128
- outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
4129
- stateMutability: 'view',
4130
- },
4131
- {
4132
- type: 'function',
4133
- inputs: [],
4134
- name: 'canonical',
4135
- outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
3882
+ name: 'NO_CAP',
3883
+ outputs: [{ name: '', internalType: 'int256', type: 'int256' }],
4136
3884
  stateMutability: 'view',
4137
3885
  },
4138
3886
  {
4139
3887
  type: 'function',
4140
3888
  inputs: [
4141
- { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
3889
+ { name: 'owner', internalType: 'address', type: 'address' },
4142
3890
  {
4143
- name: 'permissions',
4144
- internalType: 'struct ISponsorMigration.Permissions',
3891
+ name: 'permitSingle',
3892
+ internalType: 'struct IPermit2.PermitSingle',
4145
3893
  type: 'tuple',
4146
3894
  components: [
4147
- { name: 'swapMode', internalType: 'uint8', type: 'uint8' },
4148
- { name: 'operator', internalType: 'address', type: 'address' },
4149
- { name: 'mintGated', internalType: 'bool', type: 'bool' },
4150
- { name: 'listed', internalType: 'address[]', type: 'address[]' },
3895
+ {
3896
+ name: 'details',
3897
+ internalType: 'struct IPermit2.PermitDetails',
3898
+ type: 'tuple',
3899
+ components: [
3900
+ { name: 'token', internalType: 'address', type: 'address' },
3901
+ { name: 'amount', internalType: 'uint160', type: 'uint160' },
3902
+ { name: 'expiration', internalType: 'uint48', type: 'uint48' },
3903
+ { name: 'nonce', internalType: 'uint48', type: 'uint48' },
3904
+ ],
3905
+ },
3906
+ { name: 'spender', internalType: 'address', type: 'address' },
3907
+ { name: 'sigDeadline', internalType: 'uint256', type: 'uint256' },
4151
3908
  ],
4152
3909
  },
3910
+ { name: 'signature', internalType: 'bytes', type: 'bytes' },
4153
3911
  ],
4154
- name: 'configureMigration',
3912
+ name: 'applyPermit2',
4155
3913
  outputs: [],
4156
3914
  stateMutability: 'nonpayable',
4157
3915
  },
4158
3916
  {
4159
3917
  type: 'function',
4160
- inputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }],
4161
- name: 'gateMint',
4162
- outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
4163
- stateMutability: 'view',
4164
- },
4165
- {
4166
- type: 'function',
4167
- inputs: [],
4168
- name: 'gatesAvailable',
4169
- outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
4170
- stateMutability: 'view',
4171
- },
4172
- {
4173
- type: 'function',
4174
- inputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }],
4175
- name: 'incomeTax',
4176
- outputs: [
4177
- { name: '', internalType: 'address', type: 'address' },
4178
- { name: '', internalType: 'uint256', type: 'uint256' },
3918
+ inputs: [
3919
+ { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
3920
+ { name: 'base', internalType: 'address', type: 'address' },
3921
+ { name: 'quote', internalType: 'address', type: 'address' },
3922
+ { name: 'ids', internalType: 'uint256[]', type: 'uint256[]' },
3923
+ { name: 'shares', internalType: 'uint256[]', type: 'uint256[]' },
3924
+ { name: 'minBaseOut', internalType: 'uint256', type: 'uint256' },
3925
+ { name: 'minQuoteOut', internalType: 'uint256', type: 'uint256' },
3926
+ { name: 'to', internalType: 'address', type: 'address' },
3927
+ { name: 'deadline', internalType: 'uint256', type: 'uint256' },
4179
3928
  ],
4180
- stateMutability: 'view',
4181
- },
4182
- {
4183
- type: 'function',
4184
- inputs: [],
4185
- name: 'kind',
4186
- outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }],
4187
- stateMutability: 'pure',
3929
+ name: 'burn',
3930
+ outputs: [
3931
+ { name: 'baseOut', internalType: 'uint256', type: 'uint256' },
3932
+ { name: 'quoteOut', internalType: 'uint256', type: 'uint256' },
3933
+ ],
3934
+ stateMutability: 'nonpayable',
4188
3935
  },
4189
3936
  {
4190
3937
  type: 'function',
4191
3938
  inputs: [
4192
- { name: '', internalType: 'bytes32', type: 'bytes32' },
4193
- { name: '', internalType: 'address', type: 'address' },
3939
+ { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
3940
+ { name: 'quote', internalType: 'address', type: 'address' },
3941
+ { name: 'ids', internalType: 'uint256[]', type: 'uint256[]' },
3942
+ { name: 'to', internalType: 'address', type: 'address' },
3943
+ { name: 'deadline', internalType: 'uint256', type: 'uint256' },
4194
3944
  ],
4195
- name: 'listed',
4196
- outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
4197
- stateMutability: 'view',
4198
- },
4199
- {
4200
- type: 'function',
4201
- inputs: [],
4202
- name: 'manager',
4203
- outputs: [{ name: '', internalType: 'address', type: 'address' }],
4204
- stateMutability: 'view',
3945
+ name: 'claim',
3946
+ outputs: [{ name: 'total', internalType: 'uint256', type: 'uint256' }],
3947
+ stateMutability: 'nonpayable',
4205
3948
  },
4206
3949
  {
4207
3950
  type: 'function',
4208
3951
  inputs: [
4209
3952
  {
4210
- name: 'a',
4211
- internalType: 'struct IPolicy.Ask',
3953
+ name: 'actions',
3954
+ internalType: 'struct Action[]',
3955
+ type: 'tuple[]',
3956
+ components: [
3957
+ { name: 'op', internalType: 'enum OpType', type: 'uint8' },
3958
+ { name: 'data', internalType: 'bytes', type: 'bytes' },
3959
+ ],
3960
+ },
3961
+ {
3962
+ name: 'settle',
3963
+ internalType: 'struct Settle',
4212
3964
  type: 'tuple',
4213
3965
  components: [
4214
- { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
4215
- { name: 'gen', internalType: 'uint256', type: 'uint256' },
4216
- {
4217
- name: 'action',
4218
- internalType: 'enum IPolicy.Action',
4219
- type: 'uint8',
4220
- },
4221
- { name: 'who', internalType: 'address', type: 'address' },
4222
- { name: 'amount', internalType: 'uint256', type: 'uint256' },
4223
- { name: 'income', internalType: 'uint256', type: 'uint256' },
4224
- { name: 'Q', internalType: 'uint256', type: 'uint256' },
4225
- { name: 'L', internalType: 'uint256', type: 'uint256' },
4226
- { name: 'n', internalType: 'uint256', type: 'uint256' },
3966
+ { name: 'tokens', internalType: 'address[]', type: 'address[]' },
3967
+ { name: 'maxIn', internalType: 'uint256[]', type: 'uint256[]' },
3968
+ { name: 'minOut', internalType: 'uint256[]', type: 'uint256[]' },
3969
+ { name: 'to', internalType: 'address', type: 'address' },
4227
3970
  ],
4228
3971
  },
3972
+ { name: 'deadline', internalType: 'uint256', type: 'uint256' },
4229
3973
  ],
4230
- name: 'may',
4231
- outputs: [{ name: '', internalType: 'bytes4', type: 'bytes4' }],
4232
- stateMutability: 'view',
4233
- },
4234
- {
4235
- type: 'function',
4236
- inputs: [{ name: 'fee', internalType: 'uint256', type: 'uint256' }],
4237
- name: 'mintFeeListed',
4238
- outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
4239
- stateMutability: 'view',
3974
+ name: 'execute',
3975
+ outputs: [
3976
+ { name: 'results', internalType: 'bytes[]', type: 'bytes[]' },
3977
+ { name: 'flows', internalType: 'int256[]', type: 'int256[]' },
3978
+ ],
3979
+ stateMutability: 'nonpayable',
4240
3980
  },
4241
3981
  {
4242
3982
  type: 'function',
4243
3983
  inputs: [],
4244
- name: 'mintTiers',
4245
- outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
3984
+ name: 'mgr',
3985
+ outputs: [{ name: '', internalType: 'contract ManagerC', type: 'address' }],
4246
3986
  stateMutability: 'view',
4247
3987
  },
4248
3988
  {
4249
3989
  type: 'function',
4250
- inputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }],
4251
- name: 'nameOf',
4252
- outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }],
4253
- stateMutability: 'view',
3990
+ inputs: [
3991
+ { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
3992
+ { name: 'base', internalType: 'address', type: 'address' },
3993
+ { name: 'quote', internalType: 'address', type: 'address' },
3994
+ { name: 'targetFloor', internalType: 'int256', type: 'int256' },
3995
+ { name: 'cap', internalType: 'int256', type: 'int256' },
3996
+ { name: 'L', internalType: 'uint256', type: 'uint256' },
3997
+ { name: 'maxBaseIn', internalType: 'uint256', type: 'uint256' },
3998
+ { name: 'maxQuoteIn', internalType: 'uint256', type: 'uint256' },
3999
+ { name: 'to', internalType: 'address', type: 'address' },
4000
+ { name: 'deadline', internalType: 'uint256', type: 'uint256' },
4001
+ ],
4002
+ name: 'mintBlended',
4003
+ outputs: [
4004
+ { name: 'baseIn', internalType: 'uint256', type: 'uint256' },
4005
+ { name: 'quoteIn', internalType: 'uint256', type: 'uint256' },
4006
+ ],
4007
+ stateMutability: 'nonpayable',
4254
4008
  },
4255
4009
  {
4256
4010
  type: 'function',
4257
4011
  inputs: [
4258
4012
  { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
4259
- { name: '', internalType: 'address', type: 'address' },
4260
- {
4261
- name: 'key',
4262
- internalType: 'struct PoolKeyC',
4263
- type: 'tuple',
4264
- components: [
4265
- { name: 'base', internalType: 'address', type: 'address' },
4266
- { name: 'quote', internalType: 'address', type: 'address' },
4267
- { name: 'tickSpacing', internalType: 'int256', type: 'int256' },
4268
- { name: 'policy', internalType: 'address', type: 'address' },
4269
- { name: 'creator', internalType: 'address', type: 'address' },
4270
- { name: 'salt', internalType: 'bytes32', type: 'bytes32' },
4271
- { name: 'swapFee', internalType: 'uint256', type: 'uint256' },
4272
- { name: 'mintFee', internalType: 'uint256', type: 'uint256' },
4273
- ],
4274
- },
4013
+ { name: 'base', internalType: 'address', type: 'address' },
4014
+ { name: 'quote', internalType: 'address', type: 'address' },
4015
+ { name: 'fromId', internalType: 'uint256', type: 'uint256' },
4016
+ { name: 'shares', internalType: 'uint256', type: 'uint256' },
4017
+ { name: 'toFloor', internalType: 'int256', type: 'int256' },
4018
+ { name: 'toCap', internalType: 'int256', type: 'int256' },
4019
+ { name: 'maxBaseIn', internalType: 'uint256', type: 'uint256' },
4020
+ { name: 'maxQuoteIn', internalType: 'uint256', type: 'uint256' },
4021
+ { name: 'to', internalType: 'address', type: 'address' },
4022
+ { name: 'deadline', internalType: 'uint256', type: 'uint256' },
4275
4023
  ],
4276
- name: 'onInitialize',
4024
+ name: 'move',
4277
4025
  outputs: [
4278
- { name: '', internalType: 'uint8', type: 'uint8' },
4279
- { name: '', internalType: 'uint256', type: 'uint256' },
4280
- { name: '', internalType: 'address', type: 'address' },
4026
+ { name: 'dBase', internalType: 'int256', type: 'int256' },
4027
+ { name: 'dQuote', internalType: 'int256', type: 'int256' },
4028
+ { name: 'newShares', internalType: 'uint256', type: 'uint256' },
4281
4029
  ],
4282
4030
  stateMutability: 'nonpayable',
4283
4031
  },
4032
+ {
4033
+ type: 'function',
4034
+ inputs: [{ name: 'data', internalType: 'bytes[]', type: 'bytes[]' }],
4035
+ name: 'multicall',
4036
+ outputs: [{ name: 'results', internalType: 'bytes[]', type: 'bytes[]' }],
4037
+ stateMutability: 'nonpayable',
4038
+ },
4039
+ {
4040
+ type: 'function',
4041
+ inputs: [],
4042
+ name: 'permit2',
4043
+ outputs: [{ name: '', internalType: 'contract IPermit2', type: 'address' }],
4044
+ stateMutability: 'view',
4045
+ },
4284
4046
  {
4285
4047
  type: 'function',
4286
4048
  inputs: [
4287
- { name: '', internalType: 'bytes32', type: 'bytes32' },
4288
- { name: '', internalType: 'address', type: 'address' },
4289
- {
4290
- name: '',
4291
- internalType: 'struct PoolKeyF',
4292
- type: 'tuple',
4293
- components: [
4294
- { name: 'quote', internalType: 'address', type: 'address' },
4295
- { name: 'bases', internalType: 'address[]', type: 'address[]' },
4296
- { name: 'swapFeeIdx', internalType: 'uint8', type: 'uint8' },
4297
- { name: 'policy', internalType: 'address', type: 'address' },
4298
- { name: 'salt', internalType: 'bytes32', type: 'bytes32' },
4299
- ],
4300
- },
4301
- ],
4302
- name: 'onInitialize',
4303
- outputs: [
4304
- { name: '', internalType: 'uint8', type: 'uint8' },
4305
- { name: '', internalType: 'uint256', type: 'uint256' },
4306
- { name: '', internalType: 'address', type: 'address' },
4049
+ { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
4050
+ { name: 'exactIn', internalType: 'bool', type: 'bool' },
4051
+ { name: 'baseSide', internalType: 'bool', type: 'bool' },
4052
+ { name: 'amount', internalType: 'uint256', type: 'uint256' },
4053
+ { name: 'taker', internalType: 'address', type: 'address' },
4307
4054
  ],
4308
- stateMutability: 'pure',
4055
+ name: 'quoteSwap',
4056
+ outputs: [],
4057
+ stateMutability: 'nonpayable',
4309
4058
  },
4310
4059
  {
4311
4060
  type: 'function',
4312
4061
  inputs: [
4313
4062
  { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
4314
- { name: 'from', internalType: 'address', type: 'address' },
4315
- { name: '', internalType: 'address', type: 'address' },
4316
- { name: 'authority_', internalType: 'address', type: 'address' },
4317
- { name: 'name_', internalType: 'bytes32', type: 'bytes32' },
4063
+ { name: 'tokenIn', internalType: 'address', type: 'address' },
4064
+ { name: 'tokenOut', internalType: 'address', type: 'address' },
4065
+ { name: 'baseIn', internalType: 'bool', type: 'bool' },
4066
+ { name: 'amountIn', internalType: 'uint256', type: 'uint256' },
4067
+ { name: 'minOut', internalType: 'uint256', type: 'uint256' },
4068
+ { name: 'to', internalType: 'address', type: 'address' },
4069
+ { name: 'deadline', internalType: 'uint256', type: 'uint256' },
4318
4070
  ],
4319
- name: 'onMigrate',
4320
- outputs: [{ name: '', internalType: 'uint8', type: 'uint8' }],
4071
+ name: 'swapExactIn',
4072
+ outputs: [{ name: 'amountOut', internalType: 'uint256', type: 'uint256' }],
4321
4073
  stateMutability: 'nonpayable',
4322
4074
  },
4323
4075
  {
4324
4076
  type: 'function',
4325
4077
  inputs: [
4326
4078
  {
4327
- name: 'a',
4328
- internalType: 'struct IPolicy.Ask',
4329
- type: 'tuple',
4079
+ name: 'hops',
4080
+ internalType: 'struct Hop[]',
4081
+ type: 'tuple[]',
4330
4082
  components: [
4331
4083
  { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
4332
- { name: 'gen', internalType: 'uint256', type: 'uint256' },
4333
- {
4334
- name: 'action',
4335
- internalType: 'enum IPolicy.Action',
4336
- type: 'uint8',
4337
- },
4338
- { name: 'who', internalType: 'address', type: 'address' },
4339
- { name: 'amount', internalType: 'uint256', type: 'uint256' },
4340
- { name: 'income', internalType: 'uint256', type: 'uint256' },
4341
- { name: 'Q', internalType: 'uint256', type: 'uint256' },
4342
- { name: 'L', internalType: 'uint256', type: 'uint256' },
4343
- { name: 'n', internalType: 'uint256', type: 'uint256' },
4344
- ],
4345
- },
4346
- ],
4347
- name: 'onRegenerate',
4348
- outputs: [
4349
- {
4350
- name: 't',
4351
- internalType: 'struct IPolicy.Terms',
4352
- type: 'tuple',
4353
- components: [
4354
- { name: 'payee', internalType: 'address', type: 'address' },
4355
- { name: 'toPayee', internalType: 'uint256', type: 'uint256' },
4356
- { name: 'minQuoteRatio', internalType: 'uint256', type: 'uint256' },
4357
- { name: 'carried', internalType: 'address', type: 'address' },
4084
+ { name: 'baseIn', internalType: 'bool', type: 'bool' },
4358
4085
  ],
4359
4086
  },
4087
+ { name: 'tokenIn', internalType: 'address', type: 'address' },
4088
+ { name: 'tokenOut', internalType: 'address', type: 'address' },
4089
+ { name: 'amountIn', internalType: 'uint256', type: 'uint256' },
4090
+ { name: 'minOut', internalType: 'uint256', type: 'uint256' },
4091
+ { name: 'to', internalType: 'address', type: 'address' },
4092
+ { name: 'deadline', internalType: 'uint256', type: 'uint256' },
4360
4093
  ],
4094
+ name: 'swapExactInPath',
4095
+ outputs: [{ name: 'amountOut', internalType: 'uint256', type: 'uint256' }],
4361
4096
  stateMutability: 'nonpayable',
4362
4097
  },
4363
4098
  {
4364
4099
  type: 'function',
4365
- inputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }],
4366
- name: 'operator',
4367
- outputs: [{ name: '', internalType: 'address', type: 'address' }],
4368
- stateMutability: 'view',
4369
- },
4370
- {
4371
- type: 'function',
4372
- inputs: [],
4373
- name: 'quoteCurated',
4374
- outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
4375
- stateMutability: 'view',
4100
+ inputs: [
4101
+ { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
4102
+ { name: 'tokenIn', internalType: 'address', type: 'address' },
4103
+ { name: 'tokenOut', internalType: 'address', type: 'address' },
4104
+ { name: 'baseOut', internalType: 'bool', type: 'bool' },
4105
+ { name: 'amountOut', internalType: 'uint256', type: 'uint256' },
4106
+ { name: 'maxIn', internalType: 'uint256', type: 'uint256' },
4107
+ { name: 'to', internalType: 'address', type: 'address' },
4108
+ { name: 'deadline', internalType: 'uint256', type: 'uint256' },
4109
+ ],
4110
+ name: 'swapExactOut',
4111
+ outputs: [{ name: 'amountIn', internalType: 'uint256', type: 'uint256' }],
4112
+ stateMutability: 'nonpayable',
4376
4113
  },
4377
4114
  {
4378
4115
  type: 'function',
4379
- inputs: [{ name: '', internalType: 'address', type: 'address' }],
4380
- name: 'quoteListed',
4381
- outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
4382
- stateMutability: 'view',
4116
+ inputs: [{ name: 'data', internalType: 'bytes', type: 'bytes' }],
4117
+ name: 'unlockCallback',
4118
+ outputs: [{ name: '', internalType: 'bytes', type: 'bytes' }],
4119
+ stateMutability: 'nonpayable',
4383
4120
  },
4384
4121
  {
4385
4122
  type: 'function',
4386
- inputs: [],
4387
- name: 'registry',
4388
- outputs: [{ name: '', internalType: 'address', type: 'address' }],
4389
- stateMutability: 'view',
4123
+ inputs: [
4124
+ { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
4125
+ { name: 'base', internalType: 'address', type: 'address' },
4126
+ { name: 'quote', internalType: 'address', type: 'address' },
4127
+ { name: 'fromId', internalType: 'uint256', type: 'uint256' },
4128
+ { name: 'shares', internalType: 'uint256', type: 'uint256' },
4129
+ { name: 'toFloor', internalType: 'int256', type: 'int256' },
4130
+ { name: 'toCap', internalType: 'int256', type: 'int256' },
4131
+ { name: 'newL', internalType: 'uint256', type: 'uint256' },
4132
+ { name: 'maxBaseIn', internalType: 'uint256', type: 'uint256' },
4133
+ { name: 'maxQuoteIn', internalType: 'uint256', type: 'uint256' },
4134
+ { name: 'to', internalType: 'address', type: 'address' },
4135
+ { name: 'deadline', internalType: 'uint256', type: 'uint256' },
4136
+ ],
4137
+ name: 'update',
4138
+ outputs: [
4139
+ { name: 'dBase', internalType: 'int256', type: 'int256' },
4140
+ { name: 'dQuote', internalType: 'int256', type: 'int256' },
4141
+ { name: 'newShares', internalType: 'uint256', type: 'uint256' },
4142
+ ],
4143
+ stateMutability: 'nonpayable',
4390
4144
  },
4391
4145
  {
4392
4146
  type: 'function',
4393
4147
  inputs: [
4394
4148
  { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
4395
- { name: 'who', internalType: 'address[]', type: 'address[]' },
4396
- { name: 'yes', internalType: 'bool', type: 'bool' },
4149
+ { name: 'base', internalType: 'address', type: 'address' },
4150
+ { name: 'quote', internalType: 'address', type: 'address' },
4151
+ { name: 'fundWithBase', internalType: 'bool', type: 'bool' },
4152
+ { name: 'amountIn', internalType: 'uint256', type: 'uint256' },
4153
+ { name: 'minSwapOut', internalType: 'uint256', type: 'uint256' },
4154
+ { name: 'targetFloor', internalType: 'int256', type: 'int256' },
4155
+ { name: 'cap', internalType: 'int256', type: 'int256' },
4156
+ { name: 'L', internalType: 'uint256', type: 'uint256' },
4157
+ { name: 'maxIn', internalType: 'uint256', type: 'uint256' },
4158
+ { name: 'to', internalType: 'address', type: 'address' },
4159
+ { name: 'deadline', internalType: 'uint256', type: 'uint256' },
4160
+ ],
4161
+ name: 'zapIn',
4162
+ outputs: [
4163
+ { name: 'baseIn', internalType: 'uint256', type: 'uint256' },
4164
+ { name: 'quoteIn', internalType: 'uint256', type: 'uint256' },
4397
4165
  ],
4398
- name: 'setListed',
4399
- outputs: [],
4400
4166
  stateMutability: 'nonpayable',
4401
4167
  },
4168
+ { type: 'error', inputs: [], name: 'BadFloor' },
4169
+ { type: 'error', inputs: [], name: 'BadRecipient' },
4170
+ { type: 'error', inputs: [], name: 'DeadlineExceeded' },
4171
+ { type: 'error', inputs: [], name: 'EmptyPath' },
4172
+ { type: 'error', inputs: [], name: 'LengthMismatch' },
4173
+ { type: 'error', inputs: [], name: 'NotManager' },
4402
4174
  {
4403
- type: 'function',
4404
- inputs: [
4405
- { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
4406
- { name: 'gated', internalType: 'bool', type: 'bool' },
4407
- ],
4408
- name: 'setMintGate',
4409
- outputs: [],
4410
- stateMutability: 'nonpayable',
4175
+ type: 'error',
4176
+ inputs: [{ name: 'amount', internalType: 'uint256', type: 'uint256' }],
4177
+ name: 'QuoteResult',
4411
4178
  },
4179
+ { type: 'error', inputs: [], name: 'SlippageIn' },
4180
+ { type: 'error', inputs: [], name: 'SlippageOut' },
4181
+ { type: 'error', inputs: [], name: 'UnsupportedOp' },
4182
+ { type: 'error', inputs: [], name: 'WrongToken' },
4183
+ { type: 'error', inputs: [], name: 'ZeroAmount' },
4184
+ ] as const
4185
+
4186
+ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
4187
+ // RouterF
4188
+ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
4189
+
4190
+ export const routerFAbi = [
4412
4191
  {
4413
- type: 'function',
4192
+ type: 'constructor',
4414
4193
  inputs: [
4415
- { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
4416
- { name: 'name_', internalType: 'bytes32', type: 'bytes32' },
4194
+ { name: '_mgr', internalType: 'contract ManagerF', type: 'address' },
4195
+ { name: '_permit2', internalType: 'address', type: 'address' },
4417
4196
  ],
4418
- name: 'setName',
4419
- outputs: [],
4420
4197
  stateMutability: 'nonpayable',
4421
4198
  },
4422
4199
  {
4423
4200
  type: 'function',
4424
4201
  inputs: [
4425
- { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
4202
+ { name: 'owner', internalType: 'address', type: 'address' },
4426
4203
  {
4427
- name: 'mode',
4428
- internalType: 'enum SponsorPolicyBase.SwapMode',
4429
- type: 'uint8',
4204
+ name: 'permitSingle',
4205
+ internalType: 'struct IPermit2.PermitSingle',
4206
+ type: 'tuple',
4207
+ components: [
4208
+ {
4209
+ name: 'details',
4210
+ internalType: 'struct IPermit2.PermitDetails',
4211
+ type: 'tuple',
4212
+ components: [
4213
+ { name: 'token', internalType: 'address', type: 'address' },
4214
+ { name: 'amount', internalType: 'uint160', type: 'uint160' },
4215
+ { name: 'expiration', internalType: 'uint48', type: 'uint48' },
4216
+ { name: 'nonce', internalType: 'uint48', type: 'uint48' },
4217
+ ],
4218
+ },
4219
+ { name: 'spender', internalType: 'address', type: 'address' },
4220
+ { name: 'sigDeadline', internalType: 'uint256', type: 'uint256' },
4221
+ ],
4430
4222
  },
4223
+ { name: 'signature', internalType: 'bytes', type: 'bytes' },
4431
4224
  ],
4432
- name: 'setSwapMode',
4225
+ name: 'applyPermit2',
4433
4226
  outputs: [],
4434
4227
  stateMutability: 'nonpayable',
4435
4228
  },
4436
4229
  {
4437
4230
  type: 'function',
4438
4231
  inputs: [],
4439
- name: 'spacingCurated',
4440
- outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
4441
- stateMutability: 'view',
4442
- },
4443
- {
4444
- type: 'function',
4445
- inputs: [{ name: '', internalType: 'int256', type: 'int256' }],
4446
- name: 'spacingListed',
4447
- outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
4448
- stateMutability: 'view',
4449
- },
4450
- {
4451
- type: 'function',
4452
- inputs: [],
4453
- name: 'sponsor',
4454
- outputs: [{ name: '', internalType: 'address', type: 'address' }],
4232
+ name: 'mgr',
4233
+ outputs: [{ name: '', internalType: 'contract ManagerF', type: 'address' }],
4455
4234
  stateMutability: 'view',
4456
4235
  },
4457
4236
  {
4458
4237
  type: 'function',
4459
- inputs: [{ name: 'fee', internalType: 'uint256', type: 'uint256' }],
4460
- name: 'swapFeeListed',
4461
- outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
4462
- stateMutability: 'view',
4238
+ inputs: [{ name: 'data', internalType: 'bytes[]', type: 'bytes[]' }],
4239
+ name: 'multicall',
4240
+ outputs: [{ name: 'results', internalType: 'bytes[]', type: 'bytes[]' }],
4241
+ stateMutability: 'nonpayable',
4463
4242
  },
4464
4243
  {
4465
4244
  type: 'function',
4466
4245
  inputs: [],
4467
- name: 'swapFeeTax',
4468
- outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
4469
- stateMutability: 'view',
4470
- },
4471
- {
4472
- type: 'function',
4473
- inputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }],
4474
- name: 'swapMode',
4475
- outputs: [
4476
- {
4477
- name: '',
4478
- internalType: 'enum SponsorPolicyBase.SwapMode',
4479
- type: 'uint8',
4480
- },
4481
- ],
4246
+ name: 'permit2',
4247
+ outputs: [{ name: '', internalType: 'contract IPermit2', type: 'address' }],
4482
4248
  stateMutability: 'view',
4483
4249
  },
4484
4250
  {
4485
4251
  type: 'function',
4486
- inputs: [],
4487
- name: 'swapTiers',
4488
- outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
4489
- stateMutability: 'view',
4490
- },
4491
- {
4492
- type: 'event',
4493
- anonymous: false,
4494
4252
  inputs: [
4495
- {
4496
- name: 'poolId',
4497
- internalType: 'bytes32',
4498
- type: 'bytes32',
4499
- indexed: true,
4500
- },
4501
- { name: 'prev', internalType: 'address', type: 'address', indexed: true },
4502
- { name: 'next', internalType: 'address', type: 'address', indexed: true },
4253
+ { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
4254
+ { name: 'kind', internalType: 'enum QuoteKind', type: 'uint8' },
4255
+ { name: 'j', internalType: 'uint256', type: 'uint256' },
4256
+ { name: 'k', internalType: 'uint256', type: 'uint256' },
4257
+ { name: 'amountIn', internalType: 'uint256', type: 'uint256' },
4258
+ { name: 'taker', internalType: 'address', type: 'address' },
4503
4259
  ],
4504
- name: 'AuthoritySet',
4260
+ name: 'quoteSwap',
4261
+ outputs: [],
4262
+ stateMutability: 'nonpayable',
4505
4263
  },
4506
4264
  {
4507
- type: 'event',
4508
- anonymous: false,
4265
+ type: 'function',
4509
4266
  inputs: [
4510
- {
4511
- name: 'poolId',
4512
- internalType: 'bytes32',
4513
- type: 'bytes32',
4514
- indexed: true,
4515
- },
4516
- { name: 'who', internalType: 'address', type: 'address', indexed: true },
4517
- { name: 'listed', internalType: 'bool', type: 'bool', indexed: false },
4267
+ { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
4268
+ { name: 'gen', internalType: 'uint256', type: 'uint256' },
4269
+ { name: 'shares', internalType: 'uint256', type: 'uint256' },
4270
+ { name: 'L', internalType: 'uint256', type: 'uint256' },
4271
+ { name: 'maxQuoteIn', internalType: 'uint256', type: 'uint256' },
4272
+ { name: 'minShares', internalType: 'uint256', type: 'uint256' },
4273
+ { name: 'to', internalType: 'address', type: 'address' },
4274
+ { name: 'deadline', internalType: 'uint256', type: 'uint256' },
4518
4275
  ],
4519
- name: 'Listed',
4276
+ name: 'rollIn',
4277
+ outputs: [{ name: 'sharesOut', internalType: 'uint256', type: 'uint256' }],
4278
+ stateMutability: 'nonpayable',
4520
4279
  },
4521
4280
  {
4522
- type: 'event',
4523
- anonymous: false,
4281
+ type: 'function',
4524
4282
  inputs: [
4525
- {
4526
- name: 'poolId',
4527
- internalType: 'bytes32',
4528
- type: 'bytes32',
4529
- indexed: true,
4530
- },
4531
- { name: 'gated', internalType: 'bool', type: 'bool', indexed: false },
4283
+ { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
4284
+ { name: 'kind', internalType: 'enum QuoteKind', type: 'uint8' },
4285
+ { name: 'j', internalType: 'uint256', type: 'uint256' },
4286
+ { name: 'k', internalType: 'uint256', type: 'uint256' },
4287
+ { name: 'amountIn', internalType: 'uint256', type: 'uint256' },
4288
+ { name: 'minOut', internalType: 'uint256', type: 'uint256' },
4289
+ { name: 'to', internalType: 'address', type: 'address' },
4290
+ { name: 'deadline', internalType: 'uint256', type: 'uint256' },
4532
4291
  ],
4533
- name: 'MintGateSet',
4292
+ name: 'swapExactIn',
4293
+ outputs: [{ name: 'amountOut', internalType: 'uint256', type: 'uint256' }],
4294
+ stateMutability: 'nonpayable',
4534
4295
  },
4535
4296
  {
4536
- type: 'event',
4537
- anonymous: false,
4538
- inputs: [
4539
- {
4540
- name: 'poolId',
4541
- internalType: 'bytes32',
4542
- type: 'bytes32',
4543
- indexed: true,
4544
- },
4545
- {
4546
- name: 'name',
4547
- internalType: 'bytes32',
4548
- type: 'bytes32',
4549
- indexed: false,
4550
- },
4551
- ],
4552
- name: 'NameSet',
4297
+ type: 'function',
4298
+ inputs: [{ name: 'data', internalType: 'bytes', type: 'bytes' }],
4299
+ name: 'unlockCallback',
4300
+ outputs: [{ name: '', internalType: 'bytes', type: 'bytes' }],
4301
+ stateMutability: 'nonpayable',
4553
4302
  },
4554
4303
  {
4555
- type: 'event',
4556
- anonymous: false,
4304
+ type: 'function',
4557
4305
  inputs: [
4558
- {
4559
- name: 'poolId',
4560
- internalType: 'bytes32',
4561
- type: 'bytes32',
4562
- indexed: true,
4563
- },
4564
- { name: 'prev', internalType: 'address', type: 'address', indexed: true },
4565
- { name: 'next', internalType: 'address', type: 'address', indexed: true },
4306
+ { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
4307
+ { name: 'L', internalType: 'uint256', type: 'uint256' },
4308
+ { name: 'maxQuoteIn', internalType: 'uint256', type: 'uint256' },
4309
+ { name: 'minShares', internalType: 'uint256', type: 'uint256' },
4310
+ { name: 'to', internalType: 'address', type: 'address' },
4311
+ { name: 'deadline', internalType: 'uint256', type: 'uint256' },
4566
4312
  ],
4567
- name: 'OperatorAppointed',
4313
+ name: 'zapIn',
4314
+ outputs: [{ name: 'shares', internalType: 'uint256', type: 'uint256' }],
4315
+ stateMutability: 'nonpayable',
4568
4316
  },
4569
4317
  {
4570
- type: 'event',
4571
- anonymous: false,
4318
+ type: 'function',
4572
4319
  inputs: [
4573
- {
4574
- name: 'poolId',
4575
- internalType: 'bytes32',
4576
- type: 'bytes32',
4577
- indexed: true,
4578
- },
4579
- {
4580
- name: 'mode',
4581
- internalType: 'enum SponsorPolicyBase.SwapMode',
4582
- type: 'uint8',
4583
- indexed: false,
4584
- },
4320
+ { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
4321
+ { name: 'shares', internalType: 'uint256', type: 'uint256' },
4322
+ { name: 'tokenOut', internalType: 'address', type: 'address' },
4323
+ { name: 'minOut', internalType: 'uint256', type: 'uint256' },
4324
+ { name: 'to', internalType: 'address', type: 'address' },
4325
+ { name: 'deadline', internalType: 'uint256', type: 'uint256' },
4585
4326
  ],
4586
- name: 'SwapModeSet',
4587
- },
4588
- { type: 'error', inputs: [], name: 'AlreadyHeld' },
4589
- { type: 'error', inputs: [], name: 'BadParams' },
4590
- { type: 'error', inputs: [], name: 'BadRate' },
4591
- { type: 'error', inputs: [], name: 'BadSwapMode' },
4592
- { type: 'error', inputs: [], name: 'BadTax' },
4593
- {
4594
- type: 'error',
4595
- inputs: [{ name: 'fee', internalType: 'uint256', type: 'uint256' }],
4596
- name: 'FeeNotListed',
4597
- },
4598
- { type: 'error', inputs: [], name: 'GatesUnavailable' },
4599
- { type: 'error', inputs: [], name: 'InactivePool' },
4600
- {
4601
- type: 'error',
4602
- inputs: [{ name: 'fee', internalType: 'uint256', type: 'uint256' }],
4603
- name: 'MintFeeNotListed',
4327
+ name: 'zapOut',
4328
+ outputs: [{ name: 'amountOut', internalType: 'uint256', type: 'uint256' }],
4329
+ stateMutability: 'nonpayable',
4604
4330
  },
4605
- { type: 'error', inputs: [], name: 'NoCreator' },
4606
- { type: 'error', inputs: [], name: 'NotAuthority' },
4607
- { type: 'error', inputs: [], name: 'NotCanonical' },
4331
+ { type: 'error', inputs: [], name: 'BadRecipient' },
4332
+ { type: 'error', inputs: [], name: 'DeadlineExceeded' },
4333
+ { type: 'error', inputs: [], name: 'DrainsBase' },
4608
4334
  { type: 'error', inputs: [], name: 'NotManager' },
4609
- { type: 'error', inputs: [], name: 'NotRegistry' },
4610
- { type: 'error', inputs: [], name: 'OneBase' },
4611
- {
4612
- type: 'error',
4613
- inputs: [{ name: 'quote', internalType: 'address', type: 'address' }],
4614
- name: 'QuoteNotListed',
4615
- },
4616
- { type: 'error', inputs: [], name: 'Refused' },
4617
4335
  {
4618
4336
  type: 'error',
4619
- inputs: [{ name: 'tickSpacing', internalType: 'int256', type: 'int256' }],
4620
- name: 'SpacingNotListed',
4337
+ inputs: [{ name: 'amount', internalType: 'uint256', type: 'uint256' }],
4338
+ name: 'QuoteResult',
4621
4339
  },
4340
+ { type: 'error', inputs: [], name: 'SlippageIn' },
4341
+ { type: 'error', inputs: [], name: 'SlippageOut' },
4342
+ { type: 'error', inputs: [], name: 'UnsupportedOp' },
4343
+ { type: 'error', inputs: [], name: 'WrongToken' },
4344
+ { type: 'error', inputs: [], name: 'ZeroAmount' },
4622
4345
  ] as const