@nradko/metric-omm-sdk-v1 0.0.16 → 0.1.1

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.
Files changed (90) hide show
  1. package/README.md +45 -16
  2. package/dist/abis/{MetricOmmPoolStateView.d.ts → MetricOmmPoolDataProvider.d.ts} +173 -256
  3. package/dist/abis/{MetricOmmPoolStateView.d.ts.map → MetricOmmPoolDataProvider.d.ts.map} +1 -1
  4. package/dist/abis/{MetricOmmPoolStateView.js → MetricOmmPoolDataProvider.js} +200 -320
  5. package/dist/abis/MetricOmmPoolDataProvider.js.map +1 -0
  6. package/dist/abis/index.d.ts +1 -1
  7. package/dist/abis/index.d.ts.map +1 -1
  8. package/dist/abis/index.js +1 -1
  9. package/dist/abis/index.js.map +1 -1
  10. package/dist/addresses.d.ts +5 -9
  11. package/dist/addresses.d.ts.map +1 -1
  12. package/dist/addresses.js +10 -9
  13. package/dist/addresses.js.map +1 -1
  14. package/dist/constants.d.ts +2 -1
  15. package/dist/constants.d.ts.map +1 -1
  16. package/dist/constants.js +3 -2
  17. package/dist/constants.js.map +1 -1
  18. package/dist/dataProvider/index.d.ts +5 -0
  19. package/dist/dataProvider/index.d.ts.map +1 -0
  20. package/dist/dataProvider/index.js +5 -0
  21. package/dist/dataProvider/index.js.map +1 -0
  22. package/dist/dataProvider/read.d.ts +39 -0
  23. package/dist/dataProvider/read.d.ts.map +1 -0
  24. package/dist/dataProvider/read.js +218 -0
  25. package/dist/dataProvider/read.js.map +1 -0
  26. package/dist/index.d.ts +5 -5
  27. package/dist/index.d.ts.map +1 -1
  28. package/dist/index.js +5 -5
  29. package/dist/index.js.map +1 -1
  30. package/dist/pool/index.d.ts +1 -1
  31. package/dist/pool/index.d.ts.map +1 -1
  32. package/dist/pool/index.js +1 -1
  33. package/dist/pool/index.js.map +1 -1
  34. package/dist/pool/liquidity.d.ts +18 -12
  35. package/dist/pool/liquidity.d.ts.map +1 -1
  36. package/dist/pool/liquidity.js +28 -24
  37. package/dist/pool/liquidity.js.map +1 -1
  38. package/dist/pool/read.d.ts +9 -7
  39. package/dist/pool/read.d.ts.map +1 -1
  40. package/dist/pool/read.js +31 -16
  41. package/dist/pool/read.js.map +1 -1
  42. package/dist/router/index.d.ts +1 -1
  43. package/dist/router/index.d.ts.map +1 -1
  44. package/dist/router/index.js +1 -1
  45. package/dist/router/index.js.map +1 -1
  46. package/dist/router/swap.d.ts +10 -11
  47. package/dist/router/swap.d.ts.map +1 -1
  48. package/dist/router/swap.js +18 -10
  49. package/dist/router/swap.js.map +1 -1
  50. package/dist/types.d.ts +6 -5
  51. package/dist/types.d.ts.map +1 -1
  52. package/dist/utils/index.d.ts +2 -1
  53. package/dist/utils/index.d.ts.map +1 -1
  54. package/dist/utils/index.js +3 -1
  55. package/dist/utils/index.js.map +1 -1
  56. package/dist/utils/liquidityMath.d.ts +2 -0
  57. package/dist/utils/liquidityMath.d.ts.map +1 -1
  58. package/dist/utils/liquidityMath.js +12 -0
  59. package/dist/utils/liquidityMath.js.map +1 -1
  60. package/dist/utils/poolState.d.ts +21 -0
  61. package/dist/utils/poolState.d.ts.map +1 -0
  62. package/dist/utils/poolState.js +46 -0
  63. package/dist/utils/poolState.js.map +1 -0
  64. package/package.json +15 -11
  65. package/src/abis/{MetricOmmPoolStateView.ts → MetricOmmPoolDataProvider.ts} +199 -319
  66. package/src/abis/index.ts +1 -1
  67. package/src/addresses.ts +12 -16
  68. package/src/constants.ts +3 -2
  69. package/src/{stateView → dataProvider}/index.ts +2 -3
  70. package/src/dataProvider/read.ts +346 -0
  71. package/src/index.ts +8 -6
  72. package/src/pool/index.ts +7 -1
  73. package/src/pool/liquidity.ts +44 -32
  74. package/src/pool/read.ts +38 -17
  75. package/src/router/index.ts +4 -0
  76. package/src/router/swap.ts +42 -23
  77. package/src/types.ts +7 -6
  78. package/src/utils/index.ts +12 -0
  79. package/src/utils/liquidityMath.ts +14 -0
  80. package/src/utils/poolState.ts +64 -0
  81. package/dist/abis/MetricOmmPoolStateView.js.map +0 -1
  82. package/dist/stateView/index.d.ts +0 -5
  83. package/dist/stateView/index.d.ts.map +0 -1
  84. package/dist/stateView/index.js +0 -5
  85. package/dist/stateView/index.js.map +0 -1
  86. package/dist/stateView/read.d.ts +0 -80
  87. package/dist/stateView/read.d.ts.map +0 -1
  88. package/dist/stateView/read.js +0 -249
  89. package/dist/stateView/read.js.map +0 -1
  90. package/src/stateView/read.ts +0 -355
package/README.md CHANGED
@@ -20,23 +20,26 @@ import { v1 } from "@nradko/metric-omm-sdk";
20
20
 
21
21
  | Contract | Address |
22
22
  | -------- | ------- |
23
- | MetricOmmPoolFactory | `0x93e314a9a65a15f3c3bc039bb4261dbbbc343fba` |
24
- | MetricOmmPoolDeployer | `0xe56e89c4faeec39364b5a2cbde13c572a876afb6` |
25
- | MetricOmmPoolLiquidityAdder | `0x1f2a03dc43947c6bdebb2e6136222997e49fa3e9` |
26
- | MetricOmmPoolSwapDataProvider | `0x404bdb6d2b9ed34a5637211a8d52177c38c39d02` |
27
- | DepositAllowlist | `0xea700fcd860533474e1ff920b76914113ae56681` |
28
- | SwapAllowlist | `0x5269d78af4a288e1649be6bf169a51bb94b6eb78` |
29
- | MetricOmmPoolSwapper | `0x85e4ff47427f1a62ed19a3abf97b80c333da266c` |
23
+ | MetricOmmPoolFactory | `0xf98aD80FE666B9a23075CdF64aF5971802844Fd8` |
24
+ | MetricOmmPoolDeployer | `0xf93e1ea4516E99A4Ee81D4979C8D3C8Ab636e397` |
25
+ | MetricOmmPoolLiquidityAdder | `0x05632ffd8D4a22ac6f925B9fc7b60390d436467D` |
26
+ | MetricOmmPoolDataProvider | `0xAce0Ec0040e81eE3496EeE768db8F453f2f0B9Bb` |
27
+ | DepositAllowlist | `0x497B15B9640eCbfFB96C1CFF7e6A3D8Ec5C6dAE2` |
28
+ | SwapAllowlist | `0x657f8CAC2066481b3Cd421781410e383f173433D` |
29
+ | MetricOmmPoolSwapper | `0x377421359e849cc44da76b18511f6A5Dd5abFc23` |
30
30
  | WETH | `0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2` |
31
31
 
32
- `stateView` is **not** in the deploy bundle deploy `MetricOmmPoolStateView` from metric-core (constructor: factory) and pass its address into read helpers.
32
+ `MetricOmmPoolDataProvider` is the deployed lens: pool reads (`slot0`, `binStates`, `positionBinShares`, …) plus swap depth and revert-based quotes. Pass `addresses.dataProvider` to read helpers and liquidity builders (`dataProviderAddress` param).
33
33
 
34
34
  ```typescript
35
- import { getAddressesOrThrow, ChainId } from "@nradko/metric-omm-sdk-v1";
35
+ import { getAddressesOrThrow, ChainId, isChainSupported } from "@nradko/metric-omm-sdk-v1";
36
36
 
37
37
  const a = getAddressesOrThrow(ChainId.ETHEREUM);
38
+ // isChainSupported(ChainId.BASE) === false — use DeployedChainId / getSupportedChainIds() for bundled addresses
38
39
  ```
39
40
 
41
+ `ChainId` lists future chain IDs for typing; **only Ethereum mainnet** has entries in `ADDRESSES` for this release. Use `getSupportedChainIds()`, `isChainSupported()`, or `DeployedChainId` when you need compile-time guarantees.
42
+
40
43
  ## Swaps (Swapper)
41
44
 
42
45
  ```typescript
@@ -52,6 +55,7 @@ const addresses = getAddressesOrThrow(ChainId.ETHEREUM);
52
55
  const { args, expectedInput, expectedOutput } =
53
56
  await buildArgsAndExpectedAmountsForSwapExactInput({
54
57
  publicClient,
58
+ factoryAddress: addresses.factory,
55
59
  swapperAddress: addresses.swapper,
56
60
  pool: poolAddress,
57
61
  recipient: account,
@@ -70,7 +74,7 @@ await walletClient.writeContract({
70
74
  });
71
75
  ```
72
76
 
73
- Quote without building tx args: `quoteSwap`, `quoteExpectedAmountsForSwapExactInput`.
77
+ Quote without building tx args: `quoteSwap` (read-only pool quote), `quoteExpectedAmountsForSwapExactInput` / `quoteExpectedAmountsForSwapExactOutput` (Swapper-aligned estimates for slippage math).
74
78
 
75
79
  ## Liquidity
76
80
 
@@ -82,10 +86,12 @@ SDK builders still use internal names like `buildModifyLiquidityArgsForUniformAd
82
86
  ## Pool reads
83
87
 
84
88
  ```typescript
85
- import { getPoolImmutables, getPoolState, getSlot0 } from "@nradko/metric-omm-sdk-v1";
89
+ import { getPoolImmutables, getPoolState, getSlot0, getAddressesOrThrow, ChainId } from "@nradko/metric-omm-sdk-v1";
86
90
 
91
+ const addresses = getAddressesOrThrow(ChainId.ETHEREUM);
87
92
  const imm = await getPoolImmutables(publicClient, addresses.factory, poolAddress);
88
- const state = await getPoolState(publicClient, stateViewAddress, poolAddress);
93
+ const state = await getPoolState(publicClient, addresses.dataProvider, poolAddress);
94
+ const slot0 = await getSlot0(publicClient, addresses.dataProvider, poolAddress);
89
95
  ```
90
96
 
91
97
  ## ABIs
@@ -93,19 +99,42 @@ const state = await getPoolState(publicClient, stateViewAddress, poolAddress);
93
99
  ```typescript
94
100
  import {
95
101
  MetricOmmPoolAbi,
102
+ MetricOmmPoolDataProviderAbi,
96
103
  MetricOmmPoolSwapperAbi,
97
104
  MetricOmmPoolLiquidityAdderAbi,
98
105
  } from "@nradko/metric-omm-sdk-v1/abis";
99
106
  ```
100
107
 
101
- ABIs are committed under `src/abis/` and copied to `dist/abis/` on build.
108
+ Regenerate from pinned contracts:
109
+
110
+ ```bash
111
+ npm run setup:contracts # init submodules, hardhat build, sync ABIs
112
+ ```
113
+
114
+ All pinned contracts (including `MetricOmmPoolDataProvider`) are compiled by Hardhat from the pinned `@metric/core` and `@metric/periphery` git dependencies (periphery remappings use core's libs via `lib/metric-core`).
102
115
 
103
116
  ## Development
104
117
 
105
118
  ```bash
106
- npm run setup:contracts # submodules + hardhat + sync ABIs
107
- npm run build
119
+ npm run build # tsc only (default prepare)
120
+ npm run setup:contracts # refresh ABIs from pinned git deps (maintainers)
121
+ npm test # Hardhat tests (needs matching @metric/* in node_modules)
122
+ ```
123
+
124
+ In the monorepo, run v1 tests with an isolated install (same pattern as v0):
125
+
126
+ ```bash
127
+ # from dev_sdk/
128
+ cd v1
129
+ npm ci
130
+ npm run sync:contracts # required before first test run
108
131
  npm test
109
132
  ```
110
133
 
111
- From repo root: `npm test -w @nradko/metric-omm-sdk-v1` (fork tests need `ETHEREUM_RPC_URL`).
134
+ ## Tests
135
+
136
+ ```bash
137
+ npm run sync:contracts && npm test
138
+ ```
139
+
140
+ Fork tests: set `ETHEREUM_RPC_URL` (optional `ETHEREUM_FORK_BLOCK_NUMBER`).
@@ -1,4 +1,4 @@
1
- export declare const MetricOmmPoolStateViewAbi: readonly [{
1
+ export declare const MetricOmmPoolDataProviderAbi: readonly [{
2
2
  readonly inputs: readonly [{
3
3
  readonly internalType: "address";
4
4
  readonly name: "factory";
@@ -6,6 +6,34 @@ export declare const MetricOmmPoolStateViewAbi: readonly [{
6
6
  }];
7
7
  readonly stateMutability: "nonpayable";
8
8
  readonly type: "constructor";
9
+ }, {
10
+ readonly inputs: readonly [];
11
+ readonly name: "BidDepthBinAvgExecPriceZero";
12
+ readonly type: "error";
13
+ }, {
14
+ readonly inputs: readonly [];
15
+ readonly name: "InvalidDistance";
16
+ readonly type: "error";
17
+ }, {
18
+ readonly inputs: readonly [];
19
+ readonly name: "InvalidFactory";
20
+ readonly type: "error";
21
+ }, {
22
+ readonly inputs: readonly [];
23
+ readonly name: "InvalidNotionalFee";
24
+ readonly type: "error";
25
+ }, {
26
+ readonly inputs: readonly [];
27
+ readonly name: "InvalidOraclePrice";
28
+ readonly type: "error";
29
+ }, {
30
+ readonly inputs: readonly [];
31
+ readonly name: "InvalidPriceProvider";
32
+ readonly type: "error";
33
+ }, {
34
+ readonly inputs: readonly [];
35
+ readonly name: "MaxBinsPerSideTooLarge";
36
+ readonly type: "error";
9
37
  }, {
10
38
  readonly inputs: readonly [{
11
39
  readonly internalType: "uint8";
@@ -21,79 +49,23 @@ export declare const MetricOmmPoolStateViewAbi: readonly [{
21
49
  }, {
22
50
  readonly inputs: readonly [{
23
51
  readonly internalType: "address";
24
- readonly name: "pool";
25
- readonly type: "address";
26
- }];
27
- readonly name: "admin";
28
- readonly outputs: readonly [{
29
- readonly internalType: "address";
30
- readonly name: "";
31
- readonly type: "address";
32
- }];
33
- readonly stateMutability: "view";
34
- readonly type: "function";
35
- }, {
36
- readonly inputs: readonly [{
37
- readonly internalType: "address";
38
- readonly name: "pool";
39
- readonly type: "address";
40
- }];
41
- readonly name: "adminFeeDestination";
42
- readonly outputs: readonly [{
43
- readonly internalType: "address";
44
- readonly name: "";
45
- readonly type: "address";
46
- }];
47
- readonly stateMutability: "view";
48
- readonly type: "function";
49
- }, {
50
- readonly inputs: readonly [{
51
- readonly internalType: "address";
52
- readonly name: "pool";
52
+ readonly name: "target";
53
53
  readonly type: "address";
54
- }];
55
- readonly name: "adminSpreadFeeE6";
56
- readonly outputs: readonly [{
57
- readonly internalType: "uint24";
58
- readonly name: "";
59
- readonly type: "uint24";
60
- }];
61
- readonly stateMutability: "view";
62
- readonly type: "function";
63
- }, {
64
- readonly inputs: readonly [{
65
- readonly internalType: "address";
66
- readonly name: "pool";
67
- readonly type: "address";
68
- }, {
69
- readonly internalType: "int8";
70
- readonly name: "binIdx";
71
- readonly type: "int8";
72
- }];
73
- readonly name: "binState";
74
- readonly outputs: readonly [{
75
- readonly internalType: "uint104";
76
- readonly name: "token0Balance";
77
- readonly type: "uint104";
78
- }, {
79
- readonly internalType: "uint104";
80
- readonly name: "token1Balance";
81
- readonly type: "uint104";
82
54
  }, {
83
- readonly internalType: "uint16";
84
- readonly name: "lengthE6";
85
- readonly type: "uint16";
55
+ readonly internalType: "bytes4";
56
+ readonly name: "selector";
57
+ readonly type: "bytes4";
86
58
  }, {
87
- readonly internalType: "uint16";
88
- readonly name: "addFeeBuyE6";
89
- readonly type: "uint16";
59
+ readonly internalType: "bytes";
60
+ readonly name: "reason";
61
+ readonly type: "bytes";
90
62
  }, {
91
- readonly internalType: "uint16";
92
- readonly name: "addFeeSellE6";
93
- readonly type: "uint16";
63
+ readonly internalType: "bytes";
64
+ readonly name: "additionalInfo";
65
+ readonly type: "bytes";
94
66
  }];
95
- readonly stateMutability: "view";
96
- readonly type: "function";
67
+ readonly name: "WrappedError";
68
+ readonly type: "error";
97
69
  }, {
98
70
  readonly inputs: readonly [{
99
71
  readonly internalType: "address";
@@ -104,7 +76,7 @@ export declare const MetricOmmPoolStateViewAbi: readonly [{
104
76
  readonly name: "binIdx";
105
77
  readonly type: "int8";
106
78
  }];
107
- readonly name: "binStateScaled";
79
+ readonly name: "binState";
108
80
  readonly outputs: readonly [{
109
81
  readonly internalType: "uint104";
110
82
  readonly name: "token0BalanceScaled";
@@ -140,29 +112,9 @@ export declare const MetricOmmPoolStateViewAbi: readonly [{
140
112
  }];
141
113
  readonly name: "binStates";
142
114
  readonly outputs: readonly [{
143
- readonly internalType: "uint104[]";
144
- readonly name: "token0Balances";
145
- readonly type: "uint104[]";
146
- }, {
147
- readonly internalType: "uint104[]";
148
- readonly name: "token1Balances";
149
- readonly type: "uint104[]";
150
- }, {
151
- readonly internalType: "uint16[]";
152
- readonly name: "lengthsInUnits";
153
- readonly type: "uint16[]";
154
- }, {
155
- readonly internalType: "uint16[]";
156
- readonly name: "addFeeBuysE6";
157
- readonly type: "uint16[]";
158
- }, {
159
- readonly internalType: "uint16[]";
160
- readonly name: "addFeeSellsE6";
161
- readonly type: "uint16[]";
162
- }, {
163
- readonly internalType: "uint104[]";
164
- readonly name: "totalShares";
165
- readonly type: "uint104[]";
115
+ readonly internalType: "bytes32[]";
116
+ readonly name: "";
117
+ readonly type: "bytes32[]";
166
118
  }];
167
119
  readonly stateMutability: "view";
168
120
  readonly type: "function";
@@ -178,37 +130,9 @@ export declare const MetricOmmPoolStateViewAbi: readonly [{
178
130
  }];
179
131
  readonly name: "binTotalShares";
180
132
  readonly outputs: readonly [{
181
- readonly internalType: "uint104";
182
- readonly name: "";
183
- readonly type: "uint104";
184
- }];
185
- readonly stateMutability: "view";
186
- readonly type: "function";
187
- }, {
188
- readonly inputs: readonly [{
189
- readonly internalType: "address";
190
- readonly name: "pool";
191
- readonly type: "address";
192
- }];
193
- readonly name: "curBinDistFromProvidedPriceE6";
194
- readonly outputs: readonly [{
195
- readonly internalType: "int24";
196
- readonly name: "";
197
- readonly type: "int24";
198
- }];
199
- readonly stateMutability: "view";
200
- readonly type: "function";
201
- }, {
202
- readonly inputs: readonly [{
203
- readonly internalType: "address";
204
- readonly name: "pool";
205
- readonly type: "address";
206
- }];
207
- readonly name: "curBinIdx";
208
- readonly outputs: readonly [{
209
- readonly internalType: "int8";
133
+ readonly internalType: "uint256";
210
134
  readonly name: "";
211
- readonly type: "int8";
135
+ readonly type: "uint256";
212
136
  }];
213
137
  readonly stateMutability: "view";
214
138
  readonly type: "function";
@@ -217,38 +141,16 @@ export declare const MetricOmmPoolStateViewAbi: readonly [{
217
141
  readonly internalType: "address";
218
142
  readonly name: "pool";
219
143
  readonly type: "address";
144
+ }, {
145
+ readonly internalType: "int8[]";
146
+ readonly name: "binIdxs";
147
+ readonly type: "int8[]";
220
148
  }];
221
- readonly name: "curPosInBin";
149
+ readonly name: "binTotalShares";
222
150
  readonly outputs: readonly [{
223
- readonly internalType: "uint104";
151
+ readonly internalType: "bytes32[]";
224
152
  readonly name: "";
225
- readonly type: "uint104";
226
- }];
227
- readonly stateMutability: "view";
228
- readonly type: "function";
229
- }, {
230
- readonly inputs: readonly [{
231
- readonly internalType: "address";
232
- readonly name: "pool";
233
- readonly type: "address";
234
- }];
235
- readonly name: "feeConfig";
236
- readonly outputs: readonly [{
237
- readonly internalType: "address";
238
- readonly name: "adminAddr";
239
- readonly type: "address";
240
- }, {
241
- readonly internalType: "uint24";
242
- readonly name: "protocolSpreadFee";
243
- readonly type: "uint24";
244
- }, {
245
- readonly internalType: "uint24";
246
- readonly name: "adminSpreadFee";
247
- readonly type: "uint24";
248
- }, {
249
- readonly internalType: "address";
250
- readonly name: "adminFeeDest";
251
- readonly type: "address";
153
+ readonly type: "bytes32[]";
252
154
  }];
253
155
  readonly stateMutability: "view";
254
156
  readonly type: "function";
@@ -258,14 +160,10 @@ export declare const MetricOmmPoolStateViewAbi: readonly [{
258
160
  readonly name: "pool";
259
161
  readonly type: "address";
260
162
  }];
261
- readonly name: "getScaleMultipliers";
163
+ readonly name: "currentPriceX64";
262
164
  readonly outputs: readonly [{
263
165
  readonly internalType: "uint256";
264
- readonly name: "token0ScaleMultiplier";
265
- readonly type: "uint256";
266
- }, {
267
- readonly internalType: "uint256";
268
- readonly name: "token1ScaleMultiplier";
166
+ readonly name: "currentPriceX64Value";
269
167
  readonly type: "uint256";
270
168
  }];
271
169
  readonly stateMutability: "view";
@@ -276,11 +174,11 @@ export declare const MetricOmmPoolStateViewAbi: readonly [{
276
174
  readonly name: "pool";
277
175
  readonly type: "address";
278
176
  }];
279
- readonly name: "notionalFeeE8";
177
+ readonly name: "distanceFromProvidedPriceX64";
280
178
  readonly outputs: readonly [{
281
- readonly internalType: "uint24";
282
- readonly name: "";
283
- readonly type: "uint24";
179
+ readonly internalType: "int256";
180
+ readonly name: "distanceX64";
181
+ readonly type: "int256";
284
182
  }];
285
183
  readonly stateMutability: "view";
286
184
  readonly type: "function";
@@ -290,24 +188,14 @@ export declare const MetricOmmPoolStateViewAbi: readonly [{
290
188
  readonly name: "pool";
291
189
  readonly type: "address";
292
190
  }];
293
- readonly name: "notionalFeeToken0Scaled";
191
+ readonly name: "getBestBidAndAsk";
294
192
  readonly outputs: readonly [{
295
193
  readonly internalType: "uint128";
296
- readonly name: "";
194
+ readonly name: "bestBidX64";
297
195
  readonly type: "uint128";
298
- }];
299
- readonly stateMutability: "view";
300
- readonly type: "function";
301
- }, {
302
- readonly inputs: readonly [{
303
- readonly internalType: "address";
304
- readonly name: "pool";
305
- readonly type: "address";
306
- }];
307
- readonly name: "notionalFeeToken1Scaled";
308
- readonly outputs: readonly [{
196
+ }, {
309
197
  readonly internalType: "uint128";
310
- readonly name: "";
198
+ readonly name: "bestAskX64";
311
199
  readonly type: "uint128";
312
200
  }];
313
201
  readonly stateMutability: "view";
@@ -317,54 +205,83 @@ export declare const MetricOmmPoolStateViewAbi: readonly [{
317
205
  readonly internalType: "address";
318
206
  readonly name: "pool";
319
207
  readonly type: "address";
320
- }];
321
- readonly name: "pauseLevel";
322
- readonly outputs: readonly [{
208
+ }, {
323
209
  readonly internalType: "uint8";
324
- readonly name: "";
210
+ readonly name: "maxBinsPerSide";
325
211
  readonly type: "uint8";
326
212
  }];
327
- readonly stateMutability: "view";
328
- readonly type: "function";
329
- }, {
330
- readonly inputs: readonly [{
331
- readonly internalType: "address";
332
- readonly name: "pool";
333
- readonly type: "address";
334
- }];
335
- readonly name: "paused";
336
- readonly outputs: readonly [{
337
- readonly internalType: "bool";
338
- readonly name: "";
339
- readonly type: "bool";
340
- }];
341
- readonly stateMutability: "view";
342
- readonly type: "function";
343
- }, {
344
- readonly inputs: readonly [{
345
- readonly internalType: "address";
346
- readonly name: "pool";
347
- readonly type: "address";
348
- }];
349
- readonly name: "pendingPriceProvider";
213
+ readonly name: "getLiquidityDepth";
350
214
  readonly outputs: readonly [{
351
- readonly internalType: "address";
352
- readonly name: "";
353
- readonly type: "address";
354
- }];
355
- readonly stateMutability: "view";
356
- readonly type: "function";
357
- }, {
358
- readonly inputs: readonly [{
359
- readonly internalType: "address";
360
- readonly name: "pool";
361
- readonly type: "address";
362
- }];
363
- readonly name: "pendingPriceProviderExecuteAfter";
364
- readonly outputs: readonly [{
365
- readonly internalType: "uint256";
366
- readonly name: "";
367
- readonly type: "uint256";
215
+ readonly components: readonly [{
216
+ readonly internalType: "uint128";
217
+ readonly name: "oracleBidX64";
218
+ readonly type: "uint128";
219
+ }, {
220
+ readonly internalType: "uint128";
221
+ readonly name: "oracleAskX64";
222
+ readonly type: "uint128";
223
+ }, {
224
+ readonly internalType: "uint128";
225
+ readonly name: "referenceBestBidX64";
226
+ readonly type: "uint128";
227
+ }, {
228
+ readonly internalType: "uint128";
229
+ readonly name: "referenceBestAskX64";
230
+ readonly type: "uint128";
231
+ }, {
232
+ readonly components: readonly [{
233
+ readonly internalType: "int8";
234
+ readonly name: "binIdx";
235
+ readonly type: "int8";
236
+ }, {
237
+ readonly internalType: "uint256";
238
+ readonly name: "amountInBin";
239
+ readonly type: "uint256";
240
+ }, {
241
+ readonly internalType: "uint256";
242
+ readonly name: "amountCumulative";
243
+ readonly type: "uint256";
244
+ }, {
245
+ readonly internalType: "uint256";
246
+ readonly name: "binAvgExecPriceX64";
247
+ readonly type: "uint256";
248
+ }, {
249
+ readonly internalType: "uint256";
250
+ readonly name: "cumulativeAvgExecPriceX64";
251
+ readonly type: "uint256";
252
+ }];
253
+ readonly internalType: "struct MetricOmmPoolDataProvider.DepthLevel[]";
254
+ readonly name: "asks";
255
+ readonly type: "tuple[]";
256
+ }, {
257
+ readonly components: readonly [{
258
+ readonly internalType: "int8";
259
+ readonly name: "binIdx";
260
+ readonly type: "int8";
261
+ }, {
262
+ readonly internalType: "uint256";
263
+ readonly name: "amountInBin";
264
+ readonly type: "uint256";
265
+ }, {
266
+ readonly internalType: "uint256";
267
+ readonly name: "amountCumulative";
268
+ readonly type: "uint256";
269
+ }, {
270
+ readonly internalType: "uint256";
271
+ readonly name: "binAvgExecPriceX64";
272
+ readonly type: "uint256";
273
+ }, {
274
+ readonly internalType: "uint256";
275
+ readonly name: "cumulativeAvgExecPriceX64";
276
+ readonly type: "uint256";
277
+ }];
278
+ readonly internalType: "struct MetricOmmPoolDataProvider.DepthLevel[]";
279
+ readonly name: "bids";
280
+ readonly type: "tuple[]";
281
+ }];
282
+ readonly internalType: "struct MetricOmmPoolDataProvider.LiquidityDepth";
283
+ readonly name: "depth";
284
+ readonly type: "tuple";
368
285
  }];
369
286
  readonly stateMutability: "view";
370
287
  readonly type: "function";
@@ -431,14 +348,38 @@ export declare const MetricOmmPoolStateViewAbi: readonly [{
431
348
  readonly internalType: "address";
432
349
  readonly name: "pool";
433
350
  readonly type: "address";
351
+ }, {
352
+ readonly internalType: "bool";
353
+ readonly name: "zeroForOne";
354
+ readonly type: "bool";
355
+ }, {
356
+ readonly internalType: "int128";
357
+ readonly name: "amountSpecified";
358
+ readonly type: "int128";
359
+ }, {
360
+ readonly internalType: "uint128";
361
+ readonly name: "priceLimitX64";
362
+ readonly type: "uint128";
363
+ }, {
364
+ readonly internalType: "uint128";
365
+ readonly name: "bidPriceX64";
366
+ readonly type: "uint128";
367
+ }, {
368
+ readonly internalType: "uint128";
369
+ readonly name: "askPriceX64";
370
+ readonly type: "uint128";
434
371
  }];
435
- readonly name: "protocolSpreadFeeE6";
372
+ readonly name: "quoteSwap";
436
373
  readonly outputs: readonly [{
437
- readonly internalType: "uint24";
438
- readonly name: "";
439
- readonly type: "uint24";
374
+ readonly internalType: "int128";
375
+ readonly name: "amount0Delta";
376
+ readonly type: "int128";
377
+ }, {
378
+ readonly internalType: "int128";
379
+ readonly name: "amount1Delta";
380
+ readonly type: "int128";
440
381
  }];
441
- readonly stateMutability: "view";
382
+ readonly stateMutability: "nonpayable";
442
383
  readonly type: "function";
443
384
  }, {
444
385
  readonly inputs: readonly [{
@@ -483,11 +424,11 @@ export declare const MetricOmmPoolStateViewAbi: readonly [{
483
424
  readonly name: "slot1";
484
425
  readonly outputs: readonly [{
485
426
  readonly internalType: "uint128";
486
- readonly name: "_totalScaledToken0InBins";
427
+ readonly name: "totalScaledToken0InBins";
487
428
  readonly type: "uint128";
488
429
  }, {
489
430
  readonly internalType: "uint128";
490
- readonly name: "_totalScaledToken1InBins";
431
+ readonly name: "totalScaledToken1InBins";
491
432
  readonly type: "uint128";
492
433
  }];
493
434
  readonly stateMutability: "view";
@@ -498,41 +439,17 @@ export declare const MetricOmmPoolStateViewAbi: readonly [{
498
439
  readonly name: "pool";
499
440
  readonly type: "address";
500
441
  }];
501
- readonly name: "spreadFeeE6";
502
- readonly outputs: readonly [{
503
- readonly internalType: "uint24";
504
- readonly name: "";
505
- readonly type: "uint24";
506
- }];
507
- readonly stateMutability: "view";
508
- readonly type: "function";
509
- }, {
510
- readonly inputs: readonly [{
511
- readonly internalType: "address";
512
- readonly name: "pool";
513
- readonly type: "address";
514
- }];
515
- readonly name: "totalToken0InBins";
442
+ readonly name: "slot2";
516
443
  readonly outputs: readonly [{
517
444
  readonly internalType: "uint128";
518
- readonly name: "";
445
+ readonly name: "notionalFeeToken0Scaled";
519
446
  readonly type: "uint128";
520
- }];
521
- readonly stateMutability: "view";
522
- readonly type: "function";
523
- }, {
524
- readonly inputs: readonly [{
525
- readonly internalType: "address";
526
- readonly name: "pool";
527
- readonly type: "address";
528
- }];
529
- readonly name: "totalToken1InBins";
530
- readonly outputs: readonly [{
447
+ }, {
531
448
  readonly internalType: "uint128";
532
- readonly name: "";
449
+ readonly name: "notionalFeeToken1Scaled";
533
450
  readonly type: "uint128";
534
451
  }];
535
452
  readonly stateMutability: "view";
536
453
  readonly type: "function";
537
454
  }];
538
- //# sourceMappingURL=MetricOmmPoolStateView.d.ts.map
455
+ //# sourceMappingURL=MetricOmmPoolDataProvider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MetricOmmPoolStateView.d.ts","sourceRoot":"","sources":["../../src/abis/MetricOmmPoolStateView.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2sB5B,CAAC"}
1
+ {"version":3,"file":"MetricOmmPoolDataProvider.d.ts","sourceRoot":"","sources":["../../src/abis/MetricOmmPoolDataProvider.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmlB/B,CAAC"}