@whetstone-research/doppler-sdk 0.0.1-alpha.13 → 0.0.1-alpha.15

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 (60) hide show
  1. package/LICENSE +21 -0
  2. package/dist/DopplerSDK.js +7 -7
  3. package/dist/DopplerSDK.mjs +6 -6
  4. package/dist/addresses.d.mts +1 -0
  5. package/dist/addresses.d.ts +1 -0
  6. package/dist/addresses.js +4 -4
  7. package/dist/addresses.mjs +1 -1
  8. package/dist/{chunk-VDTWZWY6.mjs → chunk-4YUXZRXO.mjs} +15 -9
  9. package/dist/chunk-4YUXZRXO.mjs.map +1 -0
  10. package/dist/{chunk-B4HLWPBT.js → chunk-6PHRKGLT.js} +12 -12
  11. package/dist/{chunk-B4HLWPBT.js.map → chunk-6PHRKGLT.js.map} +1 -1
  12. package/dist/{chunk-PL2AZ24Y.js → chunk-7ODAEZ5G.js} +4 -4
  13. package/dist/{chunk-PL2AZ24Y.js.map → chunk-7ODAEZ5G.js.map} +1 -1
  14. package/dist/{chunk-Y3KBSG4Y.mjs → chunk-DUO3CANY.mjs} +3 -3
  15. package/dist/{chunk-Y3KBSG4Y.mjs.map → chunk-DUO3CANY.mjs.map} +1 -1
  16. package/dist/{chunk-KRSEBXPW.mjs → chunk-EL4BTXY4.mjs} +6 -6
  17. package/dist/{chunk-KRSEBXPW.mjs.map → chunk-EL4BTXY4.mjs.map} +1 -1
  18. package/dist/{chunk-Z2CEHD7C.js → chunk-H4CAYUCM.js} +9 -9
  19. package/dist/{chunk-Z2CEHD7C.js.map → chunk-H4CAYUCM.js.map} +1 -1
  20. package/dist/{chunk-BHYYCQ3Q.mjs → chunk-JWWZAT5R.mjs} +3 -3
  21. package/dist/{chunk-BHYYCQ3Q.mjs.map → chunk-JWWZAT5R.mjs.map} +1 -1
  22. package/dist/{chunk-Z73AEDBE.mjs → chunk-LGTYMP3U.mjs} +3 -3
  23. package/dist/{chunk-Z73AEDBE.mjs.map → chunk-LGTYMP3U.mjs.map} +1 -1
  24. package/dist/{chunk-5YF2QN6D.mjs → chunk-R74XZRPG.mjs} +3 -3
  25. package/dist/{chunk-5YF2QN6D.mjs.map → chunk-R74XZRPG.mjs.map} +1 -1
  26. package/dist/{chunk-JMR5HBX7.js → chunk-UDAHYEIT.js} +8 -8
  27. package/dist/{chunk-JMR5HBX7.js.map → chunk-UDAHYEIT.js.map} +1 -1
  28. package/dist/{chunk-KDUEFQXG.js → chunk-W3XY463N.js} +15 -9
  29. package/dist/chunk-W3XY463N.js.map +1 -0
  30. package/dist/{chunk-45FNFE5D.js → chunk-WDWZPBQO.js} +4 -4
  31. package/dist/{chunk-45FNFE5D.js.map → chunk-WDWZPBQO.js.map} +1 -1
  32. package/dist/{chunk-4J7NCWYK.js → chunk-XAQQ5MKB.js} +5 -5
  33. package/dist/{chunk-4J7NCWYK.js.map → chunk-XAQQ5MKB.js.map} +1 -1
  34. package/dist/{chunk-EO7INTQ7.mjs → chunk-XG2CXLFS.mjs} +3 -3
  35. package/dist/{chunk-EO7INTQ7.mjs.map → chunk-XG2CXLFS.mjs.map} +1 -1
  36. package/dist/entities/DopplerFactory.js +3 -3
  37. package/dist/entities/DopplerFactory.mjs +2 -2
  38. package/dist/entities/auction/DynamicAuction.js +3 -3
  39. package/dist/entities/auction/DynamicAuction.mjs +2 -2
  40. package/dist/entities/auction/StaticAuction.js +3 -3
  41. package/dist/entities/auction/StaticAuction.mjs +2 -2
  42. package/dist/entities/auction/index.js +5 -5
  43. package/dist/entities/auction/index.mjs +3 -3
  44. package/dist/entities/quoter/Quoter.js +3 -3
  45. package/dist/entities/quoter/Quoter.mjs +2 -2
  46. package/dist/entities/quoter/index.js +3 -3
  47. package/dist/entities/quoter/index.mjs +2 -2
  48. package/dist/entities/token/index.js +6 -6
  49. package/dist/entities/token/index.mjs +2 -2
  50. package/dist/index.js +22 -22
  51. package/dist/index.mjs +9 -9
  52. package/dist/types.js +1 -1
  53. package/dist/types.mjs +1 -1
  54. package/dist/utils/airlock.js +3 -3
  55. package/dist/utils/airlock.mjs +2 -2
  56. package/dist/utils/index.js +3 -3
  57. package/dist/utils/index.mjs +2 -2
  58. package/package.json +1 -1
  59. package/dist/chunk-KDUEFQXG.js.map +0 -1
  60. package/dist/chunk-VDTWZWY6.mjs.map +0 -1
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Whetstone Research
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -1,15 +1,15 @@
1
1
  'use strict';
2
2
 
3
- var chunkB4HLWPBT_js = require('./chunk-B4HLWPBT.js');
3
+ var chunk6PHRKGLT_js = require('./chunk-6PHRKGLT.js');
4
4
  require('./chunk-KRN3ROUE.js');
5
- require('./chunk-4J7NCWYK.js');
6
- require('./chunk-JMR5HBX7.js');
5
+ require('./chunk-XAQQ5MKB.js');
6
+ require('./chunk-UDAHYEIT.js');
7
7
  require('./chunk-P7CHGWY7.js');
8
- require('./chunk-Z2CEHD7C.js');
9
- require('./chunk-PL2AZ24Y.js');
8
+ require('./chunk-H4CAYUCM.js');
9
+ require('./chunk-7ODAEZ5G.js');
10
10
  require('./chunk-5OFMFSTQ.js');
11
11
  require('./chunk-ER42VG7H.js');
12
- require('./chunk-KDUEFQXG.js');
12
+ require('./chunk-W3XY463N.js');
13
13
  require('./chunk-EFAPDN4J.js');
14
14
  require('./chunk-CIRZKWLL.js');
15
15
 
@@ -17,7 +17,7 @@ require('./chunk-CIRZKWLL.js');
17
17
 
18
18
  Object.defineProperty(exports, "DopplerSDK", {
19
19
  enumerable: true,
20
- get: function () { return chunkB4HLWPBT_js.DopplerSDK; }
20
+ get: function () { return chunk6PHRKGLT_js.DopplerSDK; }
21
21
  });
22
22
  //# sourceMappingURL=DopplerSDK.js.map
23
23
  //# sourceMappingURL=DopplerSDK.js.map
@@ -1,13 +1,13 @@
1
- export { DopplerSDK } from './chunk-KRSEBXPW.mjs';
1
+ export { DopplerSDK } from './chunk-EL4BTXY4.mjs';
2
2
  import './chunk-AZLFJNTG.mjs';
3
- import './chunk-Y3KBSG4Y.mjs';
4
- import './chunk-EO7INTQ7.mjs';
3
+ import './chunk-DUO3CANY.mjs';
4
+ import './chunk-XG2CXLFS.mjs';
5
5
  import './chunk-QSQGLWNY.mjs';
6
- import './chunk-BHYYCQ3Q.mjs';
7
- import './chunk-5YF2QN6D.mjs';
6
+ import './chunk-JWWZAT5R.mjs';
7
+ import './chunk-R74XZRPG.mjs';
8
8
  import './chunk-GUF66EFF.mjs';
9
9
  import './chunk-T644D54P.mjs';
10
- import './chunk-VDTWZWY6.mjs';
10
+ import './chunk-4YUXZRXO.mjs';
11
11
  import './chunk-DCFHANLR.mjs';
12
12
  import './chunk-7W72MFJO.mjs';
13
13
  //# sourceMappingURL=DopplerSDK.mjs.map
@@ -36,6 +36,7 @@ interface ChainAddresses {
36
36
  weth: Address;
37
37
  uniswapV2Factory?: Address;
38
38
  uniswapV3Factory?: Address;
39
+ uniswapV4Quoter: Address;
39
40
  }
40
41
  declare const ADDRESSES: Record<SupportedChainId, ChainAddresses>;
41
42
  /**
@@ -36,6 +36,7 @@ interface ChainAddresses {
36
36
  weth: Address;
37
37
  uniswapV2Factory?: Address;
38
38
  uniswapV3Factory?: Address;
39
+ uniswapV4Quoter: Address;
39
40
  }
40
41
  declare const ADDRESSES: Record<SupportedChainId, ChainAddresses>;
41
42
  /**
package/dist/addresses.js CHANGED
@@ -1,20 +1,20 @@
1
1
  'use strict';
2
2
 
3
- var chunkKDUEFQXG_js = require('./chunk-KDUEFQXG.js');
3
+ var chunkW3XY463N_js = require('./chunk-W3XY463N.js');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "ADDRESSES", {
8
8
  enumerable: true,
9
- get: function () { return chunkKDUEFQXG_js.ADDRESSES; }
9
+ get: function () { return chunkW3XY463N_js.ADDRESSES; }
10
10
  });
11
11
  Object.defineProperty(exports, "CHAIN_IDS", {
12
12
  enumerable: true,
13
- get: function () { return chunkKDUEFQXG_js.CHAIN_IDS; }
13
+ get: function () { return chunkW3XY463N_js.CHAIN_IDS; }
14
14
  });
15
15
  Object.defineProperty(exports, "getAddresses", {
16
16
  enumerable: true,
17
- get: function () { return chunkKDUEFQXG_js.getAddresses; }
17
+ get: function () { return chunkW3XY463N_js.getAddresses; }
18
18
  });
19
19
  //# sourceMappingURL=addresses.js.map
20
20
  //# sourceMappingURL=addresses.js.map
@@ -1,3 +1,3 @@
1
- export { ADDRESSES, CHAIN_IDS, getAddresses } from './chunk-VDTWZWY6.mjs';
1
+ export { ADDRESSES, CHAIN_IDS, getAddresses } from './chunk-4YUXZRXO.mjs';
2
2
  //# sourceMappingURL=addresses.mjs.map
3
3
  //# sourceMappingURL=addresses.mjs.map
@@ -29,7 +29,8 @@ var ADDRESSES = {
29
29
  permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3",
30
30
  weth: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
31
31
  uniswapV2Factory: "0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f",
32
- uniswapV3Factory: "0x1F98431c8aD98523631AE4a59f267346ea31F984"
32
+ uniswapV3Factory: "0x1F98431c8aD98523631AE4a59f267346ea31F984",
33
+ uniswapV4Quoter: "0x52f0e24d1c21c8a0cb1e5a5dd6198556bd9e1203"
33
34
  },
34
35
  [CHAIN_IDS.BASE]: {
35
36
  airlock: "0x660eAaEdEBc968f8f3694354FA8EC0b4c5Ba8D12",
@@ -53,12 +54,13 @@ var ADDRESSES = {
53
54
  univ2Router02: "0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24",
54
55
  permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3",
55
56
  bundler: "0x136191B46478cAB023cbC01a36160C4Aad81677a",
56
- weth: "0x4200000000000000000000000000000000000006"
57
+ weth: "0x4200000000000000000000000000000000000006",
58
+ uniswapV4Quoter: "0x0d5e0f971ed27fbff6c2837bf31316121532048d"
57
59
  },
58
60
  [CHAIN_IDS.BASE_SEPOLIA]: {
59
61
  airlock: "0x3411306ce66c9469bff1535ba955503c4bde1c6e",
60
62
  tokenFactory: "0xc69ba223c617f7d936b3cf2012aa644815dbe9ff",
61
- doppler404Factory: "0x35c1ced35876f733f327da69e8efb83d453f3a31",
63
+ doppler404Factory: "0xdd8cea2890f1b3498436f19ec8da8fecc2cb7af7",
62
64
  v3Initializer: "0x4c3062b9ccfdbcb10353f57c1b59a29d4c5cfa47",
63
65
  v3Quoter: "0xC5290058841028F1614F3A6F0F5816cAd0df5E27",
64
66
  lockableV3Initializer: "0x16ada5be50c3c2d94af5feae6b539c40a78ad53c",
@@ -79,7 +81,8 @@ var ADDRESSES = {
79
81
  univ2Router02: "0x1689E7B1F10000AE47eBfE339a4f69dECd19F602",
80
82
  permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3",
81
83
  bundler: "0xab7bacb0d5c2c10152f92d34e07f530eb3cb0fb1",
82
- weth: "0x4200000000000000000000000000000000000006"
84
+ weth: "0x4200000000000000000000000000000000000006",
85
+ uniswapV4Quoter: "0x4A6513c898fe1B2d0E78d3b0e0A4a151589B1cBa"
83
86
  },
84
87
  [CHAIN_IDS.INK]: {
85
88
  airlock: "0x014E1c0bd34f3B10546E554CB33B3293fECDD056",
@@ -105,8 +108,9 @@ var ADDRESSES = {
105
108
  univ2Router02: "0xB3FB126ACDd5AdCA2f50Ac644a7a2303745f18b4",
106
109
  permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3",
107
110
  bundler: "0x136191B46478cAB023cbC01a36160C4Aad81677a",
108
- weth: ZERO_ADDRESS
111
+ weth: ZERO_ADDRESS,
109
112
  // TODO: Get INK WETH address
113
+ uniswapV4Quoter: "0x3972c00f7ed4885e145823eb7c655375d275a1c5"
110
114
  },
111
115
  [CHAIN_IDS.UNICHAIN]: {
112
116
  airlock: "0x77EbfBAE15AD200758E9E2E61597c0B07d731254",
@@ -132,8 +136,9 @@ var ADDRESSES = {
132
136
  univ2Router02: "0x284f11109359a7e1306c3e447ef14d38400063ff",
133
137
  permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3",
134
138
  bundler: "0x91231cDdD8d6C86Df602070a3081478e074b97b7",
135
- weth: ZERO_ADDRESS
139
+ weth: ZERO_ADDRESS,
136
140
  // TODO: Get Unichain WETH address
141
+ uniswapV4Quoter: "0x333e3c607b141b18ff6de9f258db6e77fe7491e0"
137
142
  },
138
143
  [CHAIN_IDS.UNICHAIN_SEPOLIA]: {
139
144
  airlock: "0x651ab94B4777e2e4cdf96082d90C65bd947b73A4",
@@ -159,8 +164,9 @@ var ADDRESSES = {
159
164
  univ2Router02: "0x284f11109359a7e1306c3e447ef14d38400063ff",
160
165
  permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3",
161
166
  bundler: "0x63f8C8F9beFaab2FaCD7Ece0b0242f78B920Ee90",
162
- weth: ZERO_ADDRESS
167
+ weth: ZERO_ADDRESS,
163
168
  // TODO: Get Unichain Sepolia WETH address
169
+ uniswapV4Quoter: "0x56dcd40a3f2d466f48e7f48bdbe5cc9b92ae4472"
164
170
  }
165
171
  };
166
172
  function getAddresses(chainId) {
@@ -172,5 +178,5 @@ function getAddresses(chainId) {
172
178
  }
173
179
 
174
180
  export { ADDRESSES, CHAIN_IDS, getAddresses };
175
- //# sourceMappingURL=chunk-VDTWZWY6.mjs.map
176
- //# sourceMappingURL=chunk-VDTWZWY6.mjs.map
181
+ //# sourceMappingURL=chunk-4YUXZRXO.mjs.map
182
+ //# sourceMappingURL=chunk-4YUXZRXO.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/addresses.ts"],"names":[],"mappings":";AAGO,IAAM,SAAA,GAAY;AAAA,EACvB,OAAA,EAAS,CAAA;AAAA,EACT,IAAA,EAAM,IAAA;AAAA,EACN,YAAA,EAAc,KAAA;AAAA,EACd,GAAA,EAAK,KAAA;AAAA,EACL,QAAA,EAAU,GAAA;AAAA,EACV,gBAAA,EAAkB;AACpB;AAqDA,IAAM,YAAA,GAAe,4CAAA;AAEd,IAAM,SAAA,GAAsD;AAAA,EACjE,CAAC,SAAA,CAAU,OAAO,GAAG;AAAA;AAAA,IAEnB,OAAA,EAAS,YAAA;AAAA,IACT,YAAA,EAAc,YAAA;AAAA,IACd,aAAA,EAAe,YAAA;AAAA,IACf,QAAA,EAAU,YAAA;AAAA,IACV,aAAA,EAAe,YAAA;AAAA,IACf,OAAA,EAAS,YAAA;AAAA,IACT,WAAA,EAAa,YAAA;AAAA,IACb,eAAA,EAAiB,YAAA;AAAA,IACjB,UAAA,EAAY,YAAA;AAAA,IACZ,UAAA,EAAY,YAAA;AAAA,IACZ,UAAA,EAAY,YAAA;AAAA,IACZ,WAAA,EAAa,YAAA;AAAA,IACb,SAAA,EAAW,YAAA;AAAA,IACX,iBAAA,EAAmB,YAAA;AAAA,IACnB,eAAA,EAAiB,YAAA;AAAA,IACjB,OAAA,EAAS,4CAAA;AAAA,IACT,IAAA,EAA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,qBAAA,EAAuB,YAAA;AAAA;AAAA,IACvB,oBAAA,EAAsB,YAAA;AAAA;AAAA,IACtB,eAAA,EAAiB,4CAAA;AAAA,IACjB,aAAA,EAAe,4CAAA;AAAA,IACf,OAAA,EAAS,4CAAA;AAAA,IACT,OAAA,EAAS,4CAAA;AAAA,IACT,IAAA,EAAM,YAAA;AAAA;AAAA,IACN,eAAA,EAAiB;AAAA;AAErB;AAKO,SAAS,aAAa,OAAA,EAAiC;AAC5D,EAAA,MAAM,SAAA,GAAY,UAAU,OAA2B,CAAA;AACvD,EAAA,IAAI,CAAC,SAAA,EAAW;AACd,IAAA,MAAM,IAAI,KAAA,CAAM,CAAA,sBAAA,EAAyB,OAAO,CAAA,CAAE,CAAA;AAAA,EACpD;AACA,EAAA,OAAO,SAAA;AACT","file":"chunk-4YUXZRXO.mjs","sourcesContent":["import { Address } from 'viem'\n\n// Chain IDs\nexport const CHAIN_IDS = {\n MAINNET: 1,\n BASE: 8453,\n BASE_SEPOLIA: 84532,\n INK: 57073,\n UNICHAIN: 130,\n UNICHAIN_SEPOLIA: 1301,\n} as const\n\nexport type SupportedChainId = typeof CHAIN_IDS[keyof typeof CHAIN_IDS]\n\n// Contract addresses per chain\nexport interface ChainAddresses {\n // Core contracts\n airlock: Address\n tokenFactory: Address\n\n // Static auction contracts (V3)\n v3Initializer: Address\n v3Quoter: Address\n lockableV3Initializer?: Address\n \n // Dynamic auction contracts (V4)\n v4Initializer: Address\n doppler: Address\n dopplerLens: Address\n dopplerDeployer: Address\n poolManager: Address\n stateView: Address\n\n // Doppler404 contracts\n doppler404Factory?: Address\n \n // Migration contracts\n v2Migrator: Address\n v3Migrator: Address\n v4Migrator: Address\n v4MigratorHook?: Address\n \n // Governance contracts\n governanceFactory: Address\n noOpGovernanceFactory?: Address\n streamableFeesLocker?: Address\n \n // Router contracts\n universalRouter: Address\n univ2Router02?: Address\n permit2: Address\n \n // Other contracts\n bundler?: Address\n \n // Uniswap contracts\n weth: Address\n uniswapV2Factory?: Address\n uniswapV3Factory?: Address\n uniswapV4Quoter: Address\n}\n\n// Not yet deployed placeholder\nconst ZERO_ADDRESS = '0x0000000000000000000000000000000000000000' as Address\n\nexport const ADDRESSES: Record<SupportedChainId, ChainAddresses> = {\n [CHAIN_IDS.MAINNET]: {\n // Mainnet addresses not yet deployed\n airlock: ZERO_ADDRESS,\n tokenFactory: ZERO_ADDRESS,\n v3Initializer: ZERO_ADDRESS,\n v3Quoter: ZERO_ADDRESS,\n v4Initializer: ZERO_ADDRESS,\n doppler: ZERO_ADDRESS,\n dopplerLens: ZERO_ADDRESS,\n dopplerDeployer: ZERO_ADDRESS,\n v2Migrator: ZERO_ADDRESS,\n v3Migrator: ZERO_ADDRESS,\n v4Migrator: ZERO_ADDRESS,\n poolManager: ZERO_ADDRESS,\n stateView: ZERO_ADDRESS,\n governanceFactory: ZERO_ADDRESS,\n universalRouter: ZERO_ADDRESS,\n permit2: '0x000000000022D473030F116dDEE9F6B43aC78BA3' as Address,\n weth: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2' as Address,\n uniswapV2Factory: '0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f' as Address,\n uniswapV3Factory: '0x1F98431c8aD98523631AE4a59f267346ea31F984' as Address,\n uniswapV4Quoter: '0x52f0e24d1c21c8a0cb1e5a5dd6198556bd9e1203' as Address,\n },\n [CHAIN_IDS.BASE]: {\n airlock: '0x660eAaEdEBc968f8f3694354FA8EC0b4c5Ba8D12' as Address,\n tokenFactory: '0xFAafdE6a5b658684cC5eb0C5c2c755B00A246F45' as Address,\n v3Initializer: '0xaA47D2977d622DBdFD33eeF6a8276727c52EB4e5' as Address,\n v3Quoter: '0x3d4e44Eb1374240CE5F1B871ab261CD16335B76a' as Address,\n lockableV3Initializer: '0xe0dc4012ac9c868f09c6e4b20d66ed46d6f258d0' as Address,\n v4Initializer: '0x82ac010c67f70bacf7655cd8948a4ad92a173cac' as Address,\n doppler: '0x2f2bacd46d3f5c9ee052ab392b73711db89129db' as Address,\n dopplerLens: '0x43d0d97ec9241a8f05a264f94b82a1d2e600f2b3' as Address,\n dopplerDeployer: '0x8350cAd81149A9944c2fb4276955FaAA7D61e836' as Address,\n poolManager: '0x498581ff718922c3f8e6a244956af099b2652b2b' as Address,\n stateView: '0xa3c0c9b65bad0b08107aa264b0f3db444b867a71' as Address,\n v2Migrator: '0x5F3bA43D44375286296Cb85F1EA2EBfa25dde731' as Address,\n v3Migrator: '0x5F3bA43D44375286296Cb85F1EA2EBfa25dde731' as Address,\n v4Migrator: '0xa24e35a5d71d02a59b41e7c93567626302da1958' as Address,\n governanceFactory: '0xb4deE32EB70A5E55f3D2d861F49Fb3D79f7a14d9' as Address,\n noOpGovernanceFactory: '0xe7dfbd5b0a2c3b4464653a9becdc489229ef090e' as Address,\n streamableFeesLocker: '0x0a00775d71a42cd33d62780003035e7f5b47bd3a' as Address,\n universalRouter: '0x6ff5693b99212da76ad316178a184ab56d299b43' as Address,\n univ2Router02: '0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24' as Address,\n permit2: '0x000000000022D473030F116dDEE9F6B43aC78BA3' as Address,\n bundler: '0x136191B46478cAB023cbC01a36160C4Aad81677a' as Address,\n weth: '0x4200000000000000000000000000000000000006' as Address,\n uniswapV4Quoter: '0x0d5e0f971ed27fbff6c2837bf31316121532048d' as Address,\n },\n [CHAIN_IDS.BASE_SEPOLIA]: {\n airlock: '0x3411306ce66c9469bff1535ba955503c4bde1c6e' as Address,\n tokenFactory: '0xc69ba223c617f7d936b3cf2012aa644815dbe9ff' as Address,\n doppler404Factory: '0xdd8cea2890f1b3498436f19ec8da8fecc2cb7af7' as Address,\n v3Initializer: '0x4c3062b9ccfdbcb10353f57c1b59a29d4c5cfa47' as Address,\n v3Quoter: '0xC5290058841028F1614F3A6F0F5816cAd0df5E27' as Address,\n lockableV3Initializer: '0x16ada5be50c3c2d94af5feae6b539c40a78ad53c' as Address,\n v4Initializer: '0x8e891d249f1ecbffa6143c03eb1b12843aef09d3' as Address,\n doppler: '0x60a039e4add40ca95e0475c11e8a4182d06c9aa0' as Address,\n dopplerLens: '0x4a8d81db741248a36d9eb3bc6ef648bf798b47a7' as Address,\n dopplerDeployer: '0x60a039e4add40ca95e0475c11e8a4182d06c9aa0' as Address,\n poolManager: '0x05E73354cFDd6745C338b50BcFDfA3Aa6fA03408' as Address,\n stateView: '0x571291b572ed32ce6751a2cb2486ebee8defb9b4' as Address,\n v2Migrator: '0x04a898f3722c38f9def707bd17dc78920efa977c' as Address,\n v3Migrator: '0xb2ec6559704467306d04322a5dc082b2af4562dd' as Address,\n v4Migrator: '0xb2ec6559704467306d04322a5dc082b2af4562dd' as Address,\n v4MigratorHook: '0x508812fcdd4972a59b66eb2cad3772279c052000' as Address,\n governanceFactory: '0x9dbfaadc8c0cb2c34ba698dd9426555336992e20' as Address,\n noOpGovernanceFactory: '0x916b8987e4ad325c10d58ed8dc2036a6ff5eb228' as Address,\n streamableFeesLocker: '0x4da7d7a8034510c0ffd38a9252237ae8dba3cb61' as Address,\n universalRouter: '0x492E6456D9528771018DeB9E87ef7750EF184104' as Address,\n univ2Router02: '0x1689E7B1F10000AE47eBfE339a4f69dECd19F602' as Address,\n permit2: '0x000000000022D473030F116dDEE9F6B43aC78BA3' as Address,\n bundler: '0xab7bacb0d5c2c10152f92d34e07f530eb3cb0fb1' as Address,\n weth: '0x4200000000000000000000000000000000000006' as Address,\n uniswapV4Quoter: '0x4A6513c898fe1B2d0E78d3b0e0A4a151589B1cBa' as Address,\n },\n [CHAIN_IDS.INK]: {\n airlock: '0x014E1c0bd34f3B10546E554CB33B3293fECDD056' as Address,\n tokenFactory: '0xFAafdE6a5b658684cC5eb0C5c2c755B00A246F45' as Address,\n v3Initializer: '0xaA47D2977d622DBdFD33eeF6a8276727c52EB4e5' as Address,\n v3Quoter: '0x96b572D2d880cf2Fa2563651BD23ADE6f5516652' as Address,\n v4Initializer: '0xC99b485499f78995C6F1640dbB1413c57f8BA684' as Address,\n doppler: '0xa82c66b6ddEb92089015C3565E05B5c9750b2d4B' as Address,\n dopplerLens: '0x3972c00f7ed4885e145823eb7c655375d275a1c5' as Address,\n dopplerDeployer: '0xa82c66b6ddEb92089015C3565E05B5c9750b2d4B' as Address,\n poolManager: '0x360e68faccca8ca495c1b759fd9eee466db9fb32' as Address,\n stateView: '0x76fd297e2d437cd7f76d50f01afe6160f86e9990' as Address,\n v2Migrator: '0x5F3bA43D44375286296Cb85F1EA2EBfa25dde731' as Address,\n v3Migrator: '0x5F3bA43D44375286296Cb85F1EA2EBfa25dde731' as Address,\n v4Migrator: '0x5F3bA43D44375286296Cb85F1EA2EBfa25dde731' as Address, // Same as v2/v3 migrator\n governanceFactory: '0xb4deE32EB70A5E55f3D2d861F49Fb3D79f7a14d9' as Address,\n noOpGovernanceFactory: ZERO_ADDRESS, // Not yet deployed\n streamableFeesLocker: ZERO_ADDRESS, // Not yet deployed\n universalRouter: '0x112908dac86e20e7241b0927479ea3bf935d1fa0' as Address,\n univ2Router02: '0xB3FB126ACDd5AdCA2f50Ac644a7a2303745f18b4' as Address,\n permit2: '0x000000000022D473030F116dDEE9F6B43aC78BA3' as Address,\n bundler: '0x136191B46478cAB023cbC01a36160C4Aad81677a' as Address,\n weth: ZERO_ADDRESS, // TODO: Get INK WETH address\n uniswapV4Quoter: '0x3972c00f7ed4885e145823eb7c655375d275a1c5' as Address,\n },\n [CHAIN_IDS.UNICHAIN]: {\n airlock: '0x77EbfBAE15AD200758E9E2E61597c0B07d731254' as Address,\n tokenFactory: '0x43d0D97EC9241A8F05A264f94B82A1d2E600f2B3' as Address,\n v3Initializer: '0x9F4e56be80f08ba1A2445645EFa6d231E27b43ec' as Address,\n v3Quoter: '0x385A5cf5F83e99f7BB2852b6A19C3538b9FA7658' as Address,\n v4Initializer: '0x2F2BAcd46d3F5c9EE052Ab392b73711dB89129DB' as Address,\n doppler: '0x06FEFD02F0b6d9f57F52cfacFc113665Dfa20F0f' as Address,\n dopplerLens: '0x333e3c607b141b18ff6de9f258db6e77fe7491e0' as Address,\n dopplerDeployer: '0x06FEFD02F0b6d9f57F52cfacFc113665Dfa20F0f' as Address,\n poolManager: '0x1f98400000000000000000000000000000000004' as Address,\n stateView: '0x86e8631a016f9068c3f085faf484ee3f5fdee8f2' as Address,\n v2Migrator: '0xf6023127f6E937091D5B605680056A6D27524bad' as Address,\n v3Migrator: '0xf6023127f6E937091D5B605680056A6D27524bad' as Address,\n v4Migrator: '0xf6023127f6E937091D5B605680056A6D27524bad' as Address, // Same as v2/v3 migrator\n governanceFactory: '0x99C94B9Df930E1E21a4E4a2c105dBff21bF5c5aE' as Address,\n noOpGovernanceFactory: ZERO_ADDRESS, // Not yet deployed\n streamableFeesLocker: ZERO_ADDRESS, // Not yet deployed\n universalRouter: '0xef740bf23acae26f6492b10de645d6b98dc8eaf3' as Address,\n univ2Router02: '0x284f11109359a7e1306c3e447ef14d38400063ff' as Address,\n permit2: '0x000000000022D473030F116dDEE9F6B43aC78BA3' as Address,\n bundler: '0x91231cDdD8d6C86Df602070a3081478e074b97b7' as Address,\n weth: ZERO_ADDRESS, // TODO: Get Unichain WETH address\n uniswapV4Quoter: '0x333e3c607b141b18ff6de9f258db6e77fe7491e0' as Address,\n },\n [CHAIN_IDS.UNICHAIN_SEPOLIA]: {\n airlock: '0x651ab94B4777e2e4cdf96082d90C65bd947b73A4' as Address,\n tokenFactory: '0xC5E5a19a2ee32831Fcb8a81546979AF43936EbaA' as Address,\n v3Initializer: '0x7Fb9a622186B4660A5988C223ebb9d3690dD5007' as Address,\n v3Quoter: '0x6Dd37329A1A225a6Fca658265D460423DCafBF89' as Address,\n v4Initializer: '0x992375478626E67F4e639d3298EbCAaE51C3dF0b' as Address,\n doppler: '0x8350cAd81149A9944c2fb4276955FaAA7D61e836' as Address,\n dopplerLens: '0x56dcd40a3f2d466f48e7f48bdbe5cc9b92ae4472' as Address,\n dopplerDeployer: '0x2f2bacd46d3f5c9ee052ab392b73711db89129db' as Address,\n poolManager: '0x00B036B58a818B1BC34d502D3fE730Db729e62AC' as Address,\n stateView: '0xc199F1072a74D4e905ABa1A84d9a45E2546B6222' as Address,\n v2Migrator: '0x44C448E38A2C3D206c9132E7f645510dFbBC946b' as Address,\n v3Migrator: '0x44C448E38A2C3D206c9132E7f645510dFbBC946b' as Address,\n v4Migrator: '0x44C448E38A2C3D206c9132E7f645510dFbBC946b' as Address, // Same as v2/v3 migrator\n governanceFactory: '0x1E4332EEfAE9e4967C2D186f7b2d439D778e81cC' as Address,\n noOpGovernanceFactory: ZERO_ADDRESS, // Not yet deployed\n streamableFeesLocker: ZERO_ADDRESS, // Not yet deployed\n universalRouter: '0xf70536B3bcC1bD1a972dc186A2cf84cC6da6Be5D' as Address,\n univ2Router02: '0x284f11109359a7e1306c3e447ef14d38400063ff' as Address,\n permit2: '0x000000000022D473030F116dDEE9F6B43aC78BA3' as Address,\n bundler: '0x63f8C8F9beFaab2FaCD7Ece0b0242f78B920Ee90' as Address,\n weth: ZERO_ADDRESS, // TODO: Get Unichain Sepolia WETH address\n uniswapV4Quoter: '0x56dcd40a3f2d466f48e7f48bdbe5cc9b92ae4472' as Address,\n },\n}\n\n/**\n * Get addresses for a specific chain\n */\nexport function getAddresses(chainId: number): ChainAddresses {\n const addresses = ADDRESSES[chainId as SupportedChainId]\n if (!addresses) {\n throw new Error(`Unsupported chain ID: ${chainId}`)\n }\n return addresses\n}\n"]}
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var chunk4J7NCWYK_js = require('./chunk-4J7NCWYK.js');
4
- var chunkJMR5HBX7_js = require('./chunk-JMR5HBX7.js');
5
- var chunkZ2CEHD7C_js = require('./chunk-Z2CEHD7C.js');
6
- var chunkPL2AZ24Y_js = require('./chunk-PL2AZ24Y.js');
3
+ var chunkXAQQ5MKB_js = require('./chunk-XAQQ5MKB.js');
4
+ var chunkUDAHYEIT_js = require('./chunk-UDAHYEIT.js');
5
+ var chunkH4CAYUCM_js = require('./chunk-H4CAYUCM.js');
6
+ var chunk7ODAEZ5G_js = require('./chunk-7ODAEZ5G.js');
7
7
  var chunk5OFMFSTQ_js = require('./chunk-5OFMFSTQ.js');
8
8
 
9
9
  // src/DopplerSDK.ts
@@ -18,7 +18,7 @@ var DopplerSDK = class {
18
18
  */
19
19
  get factory() {
20
20
  if (!this._factory) {
21
- this._factory = new chunkJMR5HBX7_js.DopplerFactory(this.publicClient, this.walletClient, this.chainId);
21
+ this._factory = new chunkUDAHYEIT_js.DopplerFactory(this.publicClient, this.walletClient, this.chainId);
22
22
  }
23
23
  return this._factory;
24
24
  }
@@ -27,7 +27,7 @@ var DopplerSDK = class {
27
27
  */
28
28
  get quoter() {
29
29
  if (!this._quoter) {
30
- this._quoter = new chunkZ2CEHD7C_js.Quoter(this.publicClient, this.chainId);
30
+ this._quoter = new chunkH4CAYUCM_js.Quoter(this.publicClient, this.chainId);
31
31
  }
32
32
  return this._quoter;
33
33
  }
@@ -36,21 +36,21 @@ var DopplerSDK = class {
36
36
  * @param poolAddress The address of the Uniswap V3 pool
37
37
  */
38
38
  async getStaticAuction(poolAddress) {
39
- return new chunk4J7NCWYK_js.StaticAuction(this.publicClient, poolAddress);
39
+ return new chunkXAQQ5MKB_js.StaticAuction(this.publicClient, poolAddress);
40
40
  }
41
41
  /**
42
42
  * Get a DynamicAuction instance for interacting with a dynamic auction hook
43
43
  * @param hookAddress The address of the Uniswap V4 hook
44
44
  */
45
45
  async getDynamicAuction(hookAddress) {
46
- return new chunkPL2AZ24Y_js.DynamicAuction(this.publicClient, hookAddress);
46
+ return new chunk7ODAEZ5G_js.DynamicAuction(this.publicClient, hookAddress);
47
47
  }
48
48
  /**
49
49
  * Get information about a static auction pool
50
50
  * @param poolAddress The address of the pool
51
51
  */
52
52
  async getPoolInfo(poolAddress) {
53
- const auction = new chunk4J7NCWYK_js.StaticAuction(this.publicClient, poolAddress);
53
+ const auction = new chunkXAQQ5MKB_js.StaticAuction(this.publicClient, poolAddress);
54
54
  return auction.getPoolInfo();
55
55
  }
56
56
  /**
@@ -58,7 +58,7 @@ var DopplerSDK = class {
58
58
  * @param hookAddress The address of the hook
59
59
  */
60
60
  async getHookInfo(hookAddress) {
61
- const auction = new chunkPL2AZ24Y_js.DynamicAuction(this.publicClient, hookAddress);
61
+ const auction = new chunk7ODAEZ5G_js.DynamicAuction(this.publicClient, hookAddress);
62
62
  return auction.getHookInfo();
63
63
  }
64
64
  /**
@@ -91,5 +91,5 @@ var DopplerSDK = class {
91
91
  };
92
92
 
93
93
  exports.DopplerSDK = DopplerSDK;
94
- //# sourceMappingURL=chunk-B4HLWPBT.js.map
95
- //# sourceMappingURL=chunk-B4HLWPBT.js.map
94
+ //# sourceMappingURL=chunk-6PHRKGLT.js.map
95
+ //# sourceMappingURL=chunk-6PHRKGLT.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/DopplerSDK.ts"],"names":["DopplerFactory","Quoter","StaticAuction","DynamicAuction","StaticAuctionBuilder","DynamicAuctionBuilder"],"mappings":";;;;;;;;;AAQO,IAAM,aAAN,MAAgE;AAAA,EAOrE,YAAY,MAAA,EAA6B;AACvC,IAAA,IAAA,CAAK,eAAe,MAAA,CAAO,YAAA;AAC3B,IAAA,IAAA,CAAK,eAAe,MAAA,CAAO,YAAA;AAC3B,IAAA,IAAA,CAAK,UAAU,MAAA,CAAO,OAAA;AAAA,EACxB;AAAA;AAAA;AAAA;AAAA,EAKA,IAAI,OAAA,GAA6B;AAC/B,IAAA,IAAI,CAAC,KAAK,QAAA,EAAU;AAClB,MAAA,IAAA,CAAK,QAAA,GAAW,IAAIA,+BAAA,CAAe,IAAA,CAAK,cAAc,IAAA,CAAK,YAAA,EAAc,KAAK,OAAO,CAAA;AAAA,IACvF;AACA,IAAA,OAAO,IAAA,CAAK,QAAA;AAAA,EACd;AAAA;AAAA;AAAA;AAAA,EAKA,IAAI,MAAA,GAAiB;AACnB,IAAA,IAAI,CAAC,KAAK,OAAA,EAAS;AACjB,MAAA,IAAA,CAAK,UAAU,IAAIC,u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AA,MACnB,cAAc,IAAA,CAAK;AAAA,KACrB;AAAA,EACF;AACF","file":"chunk-B4HLWPBT.js","sourcesContent":["import type { Address, WalletClient } from 'viem'\nimport type { DopplerSDKConfig, HookInfo, PoolInfo, SupportedPublicClient } from './types'\nimport type { SupportedChainId } from './addresses'\nimport { DopplerFactory } from './entities/DopplerFactory'\nimport { StaticAuction, DynamicAuction } from './entities/auction'\nimport { Quoter } from './entities/quoter'\nimport { StaticAuctionBuilder, DynamicAuctionBuilder } from './builders'\n\nexport class DopplerSDK<C extends SupportedChainId = SupportedChainId> {\n private publicClient: SupportedPublicClient\n private walletClient?: WalletClient\n public chainId: C\n private _factory?: DopplerFactory<C>\n private _quoter?: Quoter\n\n constructor(config: DopplerSDKConfig<C>) {\n this.publicClient = config.publicClient\n this.walletClient = config.walletClient\n this.chainId = config.chainId\n }\n\n /**\n * Get the factory instance for creating auctions\n */\n get factory(): DopplerFactory<C> {\n if (!this._factory) {\n this._factory = new DopplerFactory(this.publicClient, this.walletClient, this.chainId)\n }\n return this._factory\n }\n\n /**\n * Get the quoter instance for price queries\n */\n get quoter(): Quoter {\n if (!this._quoter) {\n this._quoter = new Quoter(this.publicClient, this.chainId)\n }\n return this._quoter\n }\n\n /**\n * Get a StaticAuction instance for interacting with a static auction pool\n * @param poolAddress The address of the Uniswap V3 pool\n */\n async getStaticAuction(poolAddress: Address): Promise<StaticAuction> {\n return new StaticAuction(this.publicClient, poolAddress)\n }\n\n /**\n * Get a DynamicAuction instance for interacting with a dynamic auction hook\n * @param hookAddress The address of the Uniswap V4 hook\n */\n async getDynamicAuction(hookAddress: Address): Promise<DynamicAuction> {\n return new DynamicAuction(this.publicClient, hookAddress)\n }\n\n /**\n * Get information about a static auction pool\n * @param poolAddress The address of the pool\n */\n async getPoolInfo(poolAddress: Address): Promise<PoolInfo> {\n const auction = new StaticAuction(this.publicClient, poolAddress)\n return auction.getPoolInfo()\n }\n\n /**\n * Get information about a dynamic auction hook\n * @param hookAddress The address of the hook\n */\n async getHookInfo(hookAddress: Address): Promise<HookInfo> {\n const auction = new DynamicAuction(this.publicClient, hookAddress)\n return auction.getHookInfo()\n }\n\n /**\n * Create a new static auction builder\n */\n buildStaticAuction(): StaticAuctionBuilder<C> {\n return new StaticAuctionBuilder(this.chainId)\n }\n\n /**\n * Create a new dynamic auction builder\n */\n buildDynamicAuction(): DynamicAuctionBuilder<C> {\n return new DynamicAuctionBuilder(this.chainId)\n }\n\n /**\n * Get the current chain ID\n */\n getChainId(): C {\n return this.chainId\n }\n\n /**\n * Get the underlying clients\n */\n getClients(): { publicClient: SupportedPublicClient; walletClient?: WalletClient } {\n return {\n publicClient: this.publicClient,\n walletClient: this.walletClient\n }\n }\n}"]}
1
+ {"version":3,"sources":["../src/DopplerSDK.ts"],"names":["DopplerFactory","Quoter","StaticAuction","DynamicAuction","StaticAuctionBuilder","DynamicAuctionBuilder"],"mappings":";;;;;;;;;AAQO,IAAM,aAAN,MAAgE;AAAA,EAOrE,YAAY,MAAA,EAA6B;AACvC,IAAA,IAAA,CAAK,eAAe,MAAA,CAAO,YAAA;AAC3B,IAAA,IAAA,CAAK,eAAe,MAAA,CAAO,YAAA;AAC3B,IAAA,IAAA,CAAK,UAAU,MAAA,CAAO,OAAA;AAAA,EACxB;AAAA;AAAA;AAAA;AAAA,EAKA,IAAI,OAAA,GAA6B;AAC/B,IAAA,IAAI,CAAC,KAAK,QAAA,EAAU;AAClB,MAAA,IAAA,CAAK,QAAA,GAAW,IAAIA,+BAAA,CAAe,IAAA,CAAK,cAAc,IAAA,CAAK,YAAA,EAAc,KAAK,OAAO,CAAA;AAAA,IACvF;AACA,IAAA,OAAO,IAAA,CAAK,QAAA;AAAA,EACd;AAAA;AAAA;AAAA;AAAA,EAKA,IAAI,MAAA,GAAiB;AACnB,IAAA,IAAI,CAAC,KAAK,OAAA,EAAS;AACjB,MAAA,IAAA,CAAK,UAAU,IAAIC,uBAAA,CAAO,IAAA,CAAK,YAAA,EAAc,KAAK,OAAO,CA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AACF","file":"chunk-6PHRKGLT.js","sourcesContent":["import type { Address, WalletClient } from 'viem'\nimport type { DopplerSDKConfig, HookInfo, PoolInfo, SupportedPublicClient } from './types'\nimport type { SupportedChainId } from './addresses'\nimport { DopplerFactory } from './entities/DopplerFactory'\nimport { StaticAuction, DynamicAuction } from './entities/auction'\nimport { Quoter } from './entities/quoter'\nimport { StaticAuctionBuilder, DynamicAuctionBuilder } from './builders'\n\nexport class DopplerSDK<C extends SupportedChainId = SupportedChainId> {\n private publicClient: SupportedPublicClient\n private walletClient?: WalletClient\n public chainId: C\n private _factory?: DopplerFactory<C>\n private _quoter?: Quoter\n\n constructor(config: DopplerSDKConfig<C>) {\n this.publicClient = config.publicClient\n this.walletClient = config.walletClient\n this.chainId = config.chainId\n }\n\n /**\n * Get the factory instance for creating auctions\n */\n get factory(): DopplerFactory<C> {\n if (!this._factory) {\n this._factory = new DopplerFactory(this.publicClient, this.walletClient, this.chainId)\n }\n return this._factory\n }\n\n /**\n * Get the quoter instance for price queries\n */\n get quoter(): Quoter {\n if (!this._quoter) {\n this._quoter = new Quoter(this.publicClient, this.chainId)\n }\n return this._quoter\n }\n\n /**\n * Get a StaticAuction instance for interacting with a static auction pool\n * @param poolAddress The address of the Uniswap V3 pool\n */\n async getStaticAuction(poolAddress: Address): Promise<StaticAuction> {\n return new StaticAuction(this.publicClient, poolAddress)\n }\n\n /**\n * Get a DynamicAuction instance for interacting with a dynamic auction hook\n * @param hookAddress The address of the Uniswap V4 hook\n */\n async getDynamicAuction(hookAddress: Address): Promise<DynamicAuction> {\n return new DynamicAuction(this.publicClient, hookAddress)\n }\n\n /**\n * Get information about a static auction pool\n * @param poolAddress The address of the pool\n */\n async getPoolInfo(poolAddress: Address): Promise<PoolInfo> {\n const auction = new StaticAuction(this.publicClient, poolAddress)\n return auction.getPoolInfo()\n }\n\n /**\n * Get information about a dynamic auction hook\n * @param hookAddress The address of the hook\n */\n async getHookInfo(hookAddress: Address): Promise<HookInfo> {\n const auction = new DynamicAuction(this.publicClient, hookAddress)\n return auction.getHookInfo()\n }\n\n /**\n * Create a new static auction builder\n */\n buildStaticAuction(): StaticAuctionBuilder<C> {\n return new StaticAuctionBuilder(this.chainId)\n }\n\n /**\n * Create a new dynamic auction builder\n */\n buildDynamicAuction(): DynamicAuctionBuilder<C> {\n return new DynamicAuctionBuilder(this.chainId)\n }\n\n /**\n * Get the current chain ID\n */\n getChainId(): C {\n return this.chainId\n }\n\n /**\n * Get the underlying clients\n */\n getClients(): { publicClient: SupportedPublicClient; walletClient?: WalletClient } {\n return {\n publicClient: this.publicClient,\n walletClient: this.walletClient\n }\n }\n}"]}
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkKDUEFQXG_js = require('./chunk-KDUEFQXG.js');
3
+ var chunkW3XY463N_js = require('./chunk-W3XY463N.js');
4
4
  var chunkEFAPDN4J_js = require('./chunk-EFAPDN4J.js');
5
5
  var viem = require('viem');
6
6
 
@@ -139,7 +139,7 @@ var DynamicAuction = class {
139
139
  async hasGraduated() {
140
140
  const tokenAddress = await this.getTokenAddress();
141
141
  const chainId = await this.client.getChainId();
142
- const addresses = chunkKDUEFQXG_js.getAddresses(chainId);
142
+ const addresses = chunkW3XY463N_js.getAddresses(chainId);
143
143
  const assetData = await this.client.readContract({
144
144
  address: addresses.airlock,
145
145
  abi: chunkEFAPDN4J_js.airlockAbi,
@@ -266,5 +266,5 @@ var DynamicAuction = class {
266
266
  };
267
267
 
268
268
  exports.DynamicAuction = DynamicAuction;
269
- //# sourceMappingURL=chunk-PL2AZ24Y.js.map
270
- //# sourceMappingURL=chunk-PL2AZ24Y.js.map
269
+ //# sourceMappingURL=chunk-7ODAEZ5G.js.map
270
+ //# sourceMappingURL=chunk-7ODAEZ5G.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/entities/auction/DynamicAuction.ts"],"names":["dopplerHookAbi","zeroAddress","getAddresses","airlockAbi","encodeAbiParameters","keccak256"],"mappings":";;;;;;AAWO,IAA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A,QAChB,EAAE,MAAM,SAAA;AAAU,OACpB;AAAA,MACA;AAAA,QACE,OAAA,CAAQ,SAAA;AAAA,QACR,OAAA,CAAQ,SAAA;AAAA,QACR,OAAA,CAAQ,GAAA;AAAA,QACR,OAAA,CAAQ,WAAA;AAAA,QACR,OAAA,CAAQ;AAAA;AACV,KACF;AACA,IAAA,OAAOC,eAAU,OAAO,CAAA;AAAA,EAC1B;AACF","file":"chunk-PL2AZ24Y.js","sourcesContent":["import { type Address, type PublicClient, encodePacked, keccak256, encodeAbiParameters, zeroAddress } from 'viem'\nimport type { HookInfo, SupportedPublicClient } from '../../types'\nimport { dopplerHookAbi, airlockAbi } from '../../abis'\nimport { getAddresses } from '../../addresses'\n\n/**\n * DynamicAuction class for interacting with dynamic auctions (Uniswap V4 hook based)\n * \n * Dynamic auctions use a Uniswap V4 hook to create a gradual Dutch auction\n * where the price moves dynamically over time according to set parameters.\n */\nexport class DynamicAuction {\n private client: SupportedPublicClient\n private hookAddress: Address\n \n constructor(client: SupportedPublicClient, hookAddress: Address) {\n this.client = client\n this.hookAddress = hookAddress\n }\n \n /**\n * Get the hook address\n */\n getAddress(): Address {\n return this.hookAddress\n }\n \n /**\n * Get current hook information\n */\n async getHookInfo(): Promise<HookInfo> {\n // Fetch all hook data in parallel\n const [\n state,\n earlyExit,\n insufficientProceeds,\n poolKey,\n startingTime,\n endingTime,\n epochLength,\n minimumProceeds,\n maximumProceeds,\n numTokensToSell,\n ] = await Promise.all([\n this.client.readContract({\n address: this.hookAddress,\n abi: dopplerHookAbi,\n functionName: 'state',\n }),\n this.client.readContract({\n address: this.hookAddress,\n abi: dopplerHookAbi,\n functionName: 'earlyExit',\n }),\n this.client.readContract({\n address: this.hookAddress,\n abi: dopplerHookAbi,\n functionName: 'insufficientProceeds',\n }),\n this.client.readContract({\n address: this.hookAddress,\n abi: dopplerHookAbi,\n functionName: 'poolKey',\n }),\n this.client.readContract({\n address: this.hookAddress,\n abi: dopplerHookAbi,\n functionName: 'startingTime',\n }),\n this.client.readContract({\n address: this.hookAddress,\n abi: dopplerHookAbi,\n functionName: 'endingTime',\n }),\n this.client.readContract({\n address: this.hookAddress,\n abi: dopplerHookAbi,\n functionName: 'epochLength',\n }),\n this.client.readContract({\n address: this.hookAddress,\n abi: dopplerHookAbi,\n functionName: 'minimumProceeds',\n }),\n this.client.readContract({\n address: this.hookAddress,\n abi: dopplerHookAbi,\n functionName: 'maximumProceeds',\n }),\n this.client.readContract({\n address: this.hookAddress,\n abi: dopplerHookAbi,\n functionName: 'numTokensToSell',\n }),\n ])\n \n // Calculate current epoch\n const currentTime = BigInt(Math.floor(Date.now() / 1000))\n const elapsedTime = currentTime > startingTime ? currentTime - startingTime : BigInt(0)\n const currentEpoch = epochLength > 0n ? Number(elapsedTime / epochLength) : 0\n \n // Determine token addresses from poolKey\n const isToken0 = poolKey.currency0 !== zeroAddress\n const tokenAddress = isToken0 ? poolKey.currency0 : poolKey.currency1\n const numeraireAddress = isToken0 ? poolKey.currency1 : poolKey.currency0\n \n // Compute pool ID\n const poolId = this.computePoolId(poolKey)\n \n return {\n hookAddress: this.hookAddress,\n tokenAddress,\n numeraireAddress,\n poolId,\n currentEpoch,\n totalProceeds: state.totalProceeds,\n totalTokensSold: state.totalTokensSold,\n earlyExit,\n insufficientProceeds,\n startingTime,\n endingTime,\n epochLength,\n minimumProceeds,\n maximumProceeds,\n }\n }\n \n /**\n * Get the token address for this auction\n */\n async getTokenAddress(): Promise<Address> {\n const poolKey = await this.client.readContract({\n address: this.hookAddress,\n abi: dopplerHookAbi,\n functionName: 'poolKey',\n })\n \n const isToken0 = await this.client.readContract({\n address: this.hookAddress,\n abi: dopplerHookAbi,\n functionName: 'isToken0',\n })\n \n return isToken0 ? poolKey.currency0 : poolKey.currency1\n }\n \n /**\n * Get the pool ID for this auction\n */\n async getPoolId(): Promise<string> {\n const poolKey = await this.client.readContract({\n address: this.hookAddress,\n abi: dopplerHookAbi,\n functionName: 'poolKey',\n })\n \n return this.computePoolId(poolKey)\n }\n \n /**\n * Check if the auction has graduated (ready for migration)\n */\n async hasGraduated(): Promise<boolean> {\n const tokenAddress = await this.getTokenAddress()\n const chainId = await this.client.getChainId()\n const addresses = getAddresses(chainId)\n \n const assetData = await this.client.readContract({\n address: addresses.airlock,\n abi: airlockAbi,\n functionName: 'getAssetData',\n args: [tokenAddress],\n })\n \n // The getAssetData returns: [numeraire, timelock, governance, liquidityMigrator, poolInitializer, pool, migrationPool, numTokensToSell, totalSupply, integrator]\n // Check if the asset is graduated (liquidityMigrator is set to address(0))\n return assetData[3] === zeroAddress\n }\n \n /**\n * Get the current epoch\n */\n async getCurrentEpoch(): Promise<number> {\n const [startingTime, epochLength] = await Promise.all([\n this.client.readContract({\n address: this.hookAddress,\n abi: dopplerHookAbi,\n functionName: 'startingTime',\n }),\n this.client.readContract({\n address: this.hookAddress,\n abi: dopplerHookAbi,\n functionName: 'epochLength',\n }),\n ])\n \n const currentTime = BigInt(Math.floor(Date.now() / 1000))\n const elapsedTime = currentTime > startingTime ? currentTime - startingTime : BigInt(0)\n \n return Number(elapsedTime / epochLength)\n }\n \n /**\n * Get the current price in the auction\n * Returns the current tick based on the epoch and gamma parameters\n */\n async getCurrentPrice(): Promise<bigint> {\n const [\n state,\n startingTick,\n endingTick,\n gamma,\n startingTime,\n epochLength,\n ] = await Promise.all([\n this.client.readContract({\n address: this.hookAddress,\n abi: dopplerHookAbi,\n functionName: 'state',\n }),\n this.client.readContract({\n address: this.hookAddress,\n abi: dopplerHookAbi,\n functionName: 'startingTick',\n }),\n this.client.readContract({\n address: this.hookAddress,\n abi: dopplerHookAbi,\n functionName: 'endingTick',\n }),\n this.client.readContract({\n address: this.hookAddress,\n abi: dopplerHookAbi,\n functionName: 'gamma',\n }),\n this.client.readContract({\n address: this.hookAddress,\n abi: dopplerHookAbi,\n functionName: 'startingTime',\n }),\n this.client.readContract({\n address: this.hookAddress,\n abi: dopplerHookAbi,\n functionName: 'epochLength',\n }),\n ])\n \n // Calculate current epoch\n const currentTime = BigInt(Math.floor(Date.now() / 1000))\n const elapsedTime = currentTime > startingTime ? currentTime - startingTime : BigInt(0)\n const currentEpoch = epochLength > 0n ? Number(elapsedTime / epochLength) : 0\n \n // Calculate current tick based on the auction progression\n // The tick moves from startingTick towards endingTick based on epochs and gamma\n const direction = endingTick > startingTick ? 1 : -1\n const tickMovement = Math.floor(currentEpoch * gamma * direction)\n const currentTick = Math.floor(startingTick + tickMovement)\n \n // Convert tick to price\n // price = 1.0001^tick\n // For simplicity, returning the tick as bigint for now\n // In production, you'd convert this to actual price using TickMath\n return BigInt(currentTick)\n }\n \n /**\n * Get total proceeds collected so far\n */\n async getTotalProceeds(): Promise<bigint> {\n const state = await this.client.readContract({\n address: this.hookAddress,\n abi: dopplerHookAbi,\n functionName: 'state',\n })\n \n return state.totalProceeds\n }\n \n /**\n * Check if the auction ended early due to max proceeds\n */\n async hasEndedEarly(): Promise<boolean> {\n return await this.client.readContract({\n address: this.hookAddress,\n abi: dopplerHookAbi,\n functionName: 'earlyExit',\n })\n }\n \n /**\n * Compute V4 pool ID from pool key components\n */\n private computePoolId(poolKey: {\n currency0: Address\n currency1: Address \n fee: number\n tickSpacing: number\n hooks: Address\n }): string {\n // V4 pools are identified by the hash of their PoolKey\n const encoded = encodeAbiParameters(\n [\n { type: 'address' },\n { type: 'address' },\n { type: 'uint24' },\n { type: 'int24' },\n { type: 'address' }\n ],\n [\n poolKey.currency0,\n poolKey.currency1,\n poolKey.fee,\n poolKey.tickSpacing,\n poolKey.hooks\n ]\n )\n return keccak256(encoded)\n }\n}\n"]}
1
+ {"version":3,"sources":["../src/entities/auction/DynamicAuction.ts"],"names":["dopplerHookAbi","zeroAddress","getAddresses","airlockAbi","encodeAbiParameters","keccak256"],"mappings":";;;;;;AAWO,IAAM,iBAAN,MAAqB;AAAA,EAI1B,WAAA,CAAY,QAA+B,WAAA,EAAsB;AAC/D,IAAA,IAAA,CAAK,MAAA,GAAS,MAAA;AACd,IAAA,IAAA,CAAK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AAQ,GAAA;AAAA,QACR,OAAA,CAAQ,WAAA;AAAA,QACR,OAAA,CAAQ;AAAA;AACV,KACF;AACA,IAAA,OAAOC,eAAU,OAAO,CAAA;AAAA,EAC1B;AACF","file":"chunk-7ODAEZ5G.js","sourcesContent":["import { type Address, type PublicClient, encodePacked, keccak256, encodeAbiParameters, zeroAddress } from 'viem'\nimport type { HookInfo, SupportedPublicClient } from '../../types'\nimport { dopplerHookAbi, airlockAbi } from '../../abis'\nimport { getAddresses } from '../../addresses'\n\n/**\n * DynamicAuction class for interacting with dynamic auctions (Uniswap V4 hook based)\n * \n * Dynamic auctions use a Uniswap V4 hook to create a gradual Dutch auction\n * where the price moves dynamically over time according to set parameters.\n */\nexport class DynamicAuction {\n private client: SupportedPublicClient\n private hookAddress: Address\n \n constructor(client: SupportedPublicClient, hookAddress: Address) {\n this.client = client\n this.hookAddress = hookAddress\n }\n \n /**\n * Get the hook address\n */\n getAddress(): Address {\n return this.hookAddress\n }\n \n /**\n * Get current hook information\n */\n async getHookInfo(): Promise<HookInfo> {\n // Fetch all hook data in parallel\n const [\n state,\n earlyExit,\n insufficientProceeds,\n poolKey,\n startingTime,\n endingTime,\n epochLength,\n minimumProceeds,\n maximumProceeds,\n numTokensToSell,\n ] = await Promise.all([\n this.client.readContract({\n address: this.hookAddress,\n abi: dopplerHookAbi,\n functionName: 'state',\n }),\n this.client.readContract({\n address: this.hookAddress,\n abi: dopplerHookAbi,\n functionName: 'earlyExit',\n }),\n this.client.readContract({\n address: this.hookAddress,\n abi: dopplerHookAbi,\n functionName: 'insufficientProceeds',\n }),\n this.client.readContract({\n address: this.hookAddress,\n abi: dopplerHookAbi,\n functionName: 'poolKey',\n }),\n this.client.readContract({\n address: this.hookAddress,\n abi: dopplerHookAbi,\n functionName: 'startingTime',\n }),\n this.client.readContract({\n address: this.hookAddress,\n abi: dopplerHookAbi,\n functionName: 'endingTime',\n }),\n this.client.readContract({\n address: this.hookAddress,\n abi: dopplerHookAbi,\n functionName: 'epochLength',\n }),\n this.client.readContract({\n address: this.hookAddress,\n abi: dopplerHookAbi,\n functionName: 'minimumProceeds',\n }),\n this.client.readContract({\n address: this.hookAddress,\n abi: dopplerHookAbi,\n functionName: 'maximumProceeds',\n }),\n this.client.readContract({\n address: this.hookAddress,\n abi: dopplerHookAbi,\n functionName: 'numTokensToSell',\n }),\n ])\n \n // Calculate current epoch\n const currentTime = BigInt(Math.floor(Date.now() / 1000))\n const elapsedTime = currentTime > startingTime ? currentTime - startingTime : BigInt(0)\n const currentEpoch = epochLength > 0n ? Number(elapsedTime / epochLength) : 0\n \n // Determine token addresses from poolKey\n const isToken0 = poolKey.currency0 !== zeroAddress\n const tokenAddress = isToken0 ? poolKey.currency0 : poolKey.currency1\n const numeraireAddress = isToken0 ? poolKey.currency1 : poolKey.currency0\n \n // Compute pool ID\n const poolId = this.computePoolId(poolKey)\n \n return {\n hookAddress: this.hookAddress,\n tokenAddress,\n numeraireAddress,\n poolId,\n currentEpoch,\n totalProceeds: state.totalProceeds,\n totalTokensSold: state.totalTokensSold,\n earlyExit,\n insufficientProceeds,\n startingTime,\n endingTime,\n epochLength,\n minimumProceeds,\n maximumProceeds,\n }\n }\n \n /**\n * Get the token address for this auction\n */\n async getTokenAddress(): Promise<Address> {\n const poolKey = await this.client.readContract({\n address: this.hookAddress,\n abi: dopplerHookAbi,\n functionName: 'poolKey',\n })\n \n const isToken0 = await this.client.readContract({\n address: this.hookAddress,\n abi: dopplerHookAbi,\n functionName: 'isToken0',\n })\n \n return isToken0 ? poolKey.currency0 : poolKey.currency1\n }\n \n /**\n * Get the pool ID for this auction\n */\n async getPoolId(): Promise<string> {\n const poolKey = await this.client.readContract({\n address: this.hookAddress,\n abi: dopplerHookAbi,\n functionName: 'poolKey',\n })\n \n return this.computePoolId(poolKey)\n }\n \n /**\n * Check if the auction has graduated (ready for migration)\n */\n async hasGraduated(): Promise<boolean> {\n const tokenAddress = await this.getTokenAddress()\n const chainId = await this.client.getChainId()\n const addresses = getAddresses(chainId)\n \n const assetData = await this.client.readContract({\n address: addresses.airlock,\n abi: airlockAbi,\n functionName: 'getAssetData',\n args: [tokenAddress],\n })\n \n // The getAssetData returns: [numeraire, timelock, governance, liquidityMigrator, poolInitializer, pool, migrationPool, numTokensToSell, totalSupply, integrator]\n // Check if the asset is graduated (liquidityMigrator is set to address(0))\n return assetData[3] === zeroAddress\n }\n \n /**\n * Get the current epoch\n */\n async getCurrentEpoch(): Promise<number> {\n const [startingTime, epochLength] = await Promise.all([\n this.client.readContract({\n address: this.hookAddress,\n abi: dopplerHookAbi,\n functionName: 'startingTime',\n }),\n this.client.readContract({\n address: this.hookAddress,\n abi: dopplerHookAbi,\n functionName: 'epochLength',\n }),\n ])\n \n const currentTime = BigInt(Math.floor(Date.now() / 1000))\n const elapsedTime = currentTime > startingTime ? currentTime - startingTime : BigInt(0)\n \n return Number(elapsedTime / epochLength)\n }\n \n /**\n * Get the current price in the auction\n * Returns the current tick based on the epoch and gamma parameters\n */\n async getCurrentPrice(): Promise<bigint> {\n const [\n state,\n startingTick,\n endingTick,\n gamma,\n startingTime,\n epochLength,\n ] = await Promise.all([\n this.client.readContract({\n address: this.hookAddress,\n abi: dopplerHookAbi,\n functionName: 'state',\n }),\n this.client.readContract({\n address: this.hookAddress,\n abi: dopplerHookAbi,\n functionName: 'startingTick',\n }),\n this.client.readContract({\n address: this.hookAddress,\n abi: dopplerHookAbi,\n functionName: 'endingTick',\n }),\n this.client.readContract({\n address: this.hookAddress,\n abi: dopplerHookAbi,\n functionName: 'gamma',\n }),\n this.client.readContract({\n address: this.hookAddress,\n abi: dopplerHookAbi,\n functionName: 'startingTime',\n }),\n this.client.readContract({\n address: this.hookAddress,\n abi: dopplerHookAbi,\n functionName: 'epochLength',\n }),\n ])\n \n // Calculate current epoch\n const currentTime = BigInt(Math.floor(Date.now() / 1000))\n const elapsedTime = currentTime > startingTime ? currentTime - startingTime : BigInt(0)\n const currentEpoch = epochLength > 0n ? Number(elapsedTime / epochLength) : 0\n \n // Calculate current tick based on the auction progression\n // The tick moves from startingTick towards endingTick based on epochs and gamma\n const direction = endingTick > startingTick ? 1 : -1\n const tickMovement = Math.floor(currentEpoch * gamma * direction)\n const currentTick = Math.floor(startingTick + tickMovement)\n \n // Convert tick to price\n // price = 1.0001^tick\n // For simplicity, returning the tick as bigint for now\n // In production, you'd convert this to actual price using TickMath\n return BigInt(currentTick)\n }\n \n /**\n * Get total proceeds collected so far\n */\n async getTotalProceeds(): Promise<bigint> {\n const state = await this.client.readContract({\n address: this.hookAddress,\n abi: dopplerHookAbi,\n functionName: 'state',\n })\n \n return state.totalProceeds\n }\n \n /**\n * Check if the auction ended early due to max proceeds\n */\n async hasEndedEarly(): Promise<boolean> {\n return await this.client.readContract({\n address: this.hookAddress,\n abi: dopplerHookAbi,\n functionName: 'earlyExit',\n })\n }\n \n /**\n * Compute V4 pool ID from pool key components\n */\n private computePoolId(poolKey: {\n currency0: Address\n currency1: Address \n fee: number\n tickSpacing: number\n hooks: Address\n }): string {\n // V4 pools are identified by the hash of their PoolKey\n const encoded = encodeAbiParameters(\n [\n { type: 'address' },\n { type: 'address' },\n { type: 'uint24' },\n { type: 'int24' },\n { type: 'address' }\n ],\n [\n poolKey.currency0,\n poolKey.currency1,\n poolKey.fee,\n poolKey.tickSpacing,\n poolKey.hooks\n ]\n )\n return keccak256(encoded)\n }\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { getAddresses } from './chunk-VDTWZWY6.mjs';
1
+ import { getAddresses } from './chunk-4YUXZRXO.mjs';
2
2
  import { uniswapV3PoolAbi, airlockAbi } from './chunk-DCFHANLR.mjs';
3
3
  import { zeroAddress } from 'viem';
4
4
 
@@ -127,5 +127,5 @@ var StaticAuction = class {
127
127
  };
128
128
 
129
129
  export { StaticAuction };
130
- //# sourceMappingURL=chunk-Y3KBSG4Y.mjs.map
131
- //# sourceMappingURL=chunk-Y3KBSG4Y.mjs.map
130
+ //# sourceMappingURL=chunk-DUO3CANY.mjs.map
131
+ //# s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AAK,gBAAA;AAAA,MACL,YAAA,EAAc;AAAA,KACf,CAAA;AAAA,EACH;AACF","file":"chunk-Y3KBSG4Y.mjs","sourcesContent":["import { type Address, getAddress, zeroAddress } from 'viem'\nimport type { PoolInfo, SupportedPublicClient } from '../../types'\nimport { uniswapV3PoolAbi, airlockAbi } from '../../abis'\nimport { getAddresses } from '../../addresses'\n\n/**\n * StaticAuction class for interacting with static auctions (Uniswap V3 based)\n * \n * Static auctions use a fixed price range on Uniswap V3 for initial liquidity bootstrapping.\n * This is ideal for simple, predictable price discovery events.\n */\nexport class StaticAuction {\n private client: SupportedPublicClient\n private poolAddress: Address\n \n constructor(client: SupportedPublicClient, poolAddress: Address) {\n this.client = client\n this.poolAddress = poolAddress\n }\n \n /**\n * Get the pool address\n */\n getAddress(): Address {\n return this.poolAddress\n }\n \n /**\n * Get current pool information\n */\n async getPoolInfo(): Promise<PoolInfo> {\n // Fetch all pool data in parallel\n const [slot0, liquidity, token0, token1, fee] = await Promise.all([\n this.client.readContract({\n address: this.poolAddress,\n abi: uniswapV3PoolAbi,\n functionName: 'slot0',\n }),\n this.client.readContract({\n address: this.poolAddress,\n abi: uniswapV3PoolAbi,\n functionName: 'liquidity',\n }),\n this.client.readContract({\n address: this.poolAddress,\n abi: uniswapV3PoolAbi,\n functionName: 'token0',\n }),\n this.client.readContract({\n address: this.poolAddress,\n abi: uniswapV3PoolAbi,\n functionName: 'token1',\n }),\n this.client.readContract({\n address: this.poolAddress,\n abi: uniswapV3PoolAbi,\n functionName: 'fee',\n }),\n ])\n \n // Determine which token is the auction token and which is numeraire\n // This requires checking with the Airlock contract\n const chainId = await this.client.getChainId()\n const addresses = getAddresses(chainId)\n \n const assetData = await this.client.readContract({\n address: addresses.airlock,\n abi: airlockAbi,\n functionName: 'getAssetData',\n args: [token0],\n })\n \n // The getAssetData returns: [numeraire, timelock, governance, liquidityMigrator, poolInitializer, pool, migrationPool, numTokensToSell, totalSupply, integrator]\n // If token0 has asset data in Airlock (pool is not zero), it's the auction token\n const isToken0AuctionToken = assetData[5] !== zeroAddress\n \n return {\n address: this.poolAddress,\n tokenAddress: isToken0AuctionToken ? token0 : token1,\n numeraireAddress: isToken0AuctionToken ? token1 : token0,\n fee,\n liquidity,\n sqrtPriceX96: slot0[0], // First element is sqrtPriceX96\n }\n }\n \n /**\n * Get the token address for this auction\n */\n async getTokenAddress(): Promise<Address> {\n const poolInfo = await this.getPoolInfo()\n return poolInfo.tokenAddress\n }\n \n /**\n * Check if the auction has graduated (ready for migration)\n */\n async hasGraduated(): Promise<boolean> {\n const tokenAddress = await this.getTokenAddress()\n const chainId = await this.client.getChainId()\n const addresses = getAddresses(chainId)\n \n const assetData = await this.client.readContract({\n address: addresses.airlock,\n abi: airlockAbi,\n functionName: 'getAssetData',\n args: [tokenAddress],\n })\n \n // The getAssetData returns: [numeraire, timelock, governance, liquidityMigrator, poolInitializer, pool, migrationPool, numTokensToSell, totalSupply, integrator]\n // Check if the asset is graduated (liquidityMigrator is set to address(0))\n return assetData[3] === zeroAddress\n }\n \n /**\n * Get the current price in the pool\n * Returns the price of token in terms of numeraire (token/numeraire)\n */\n async getCurrentPrice(): Promise<bigint> {\n const poolInfo = await this.getPoolInfo()\n \n // Get token ordering\n const [token0, token1] = await Promise.all([\n this.client.readContract({\n address: this.poolAddress,\n abi: uniswapV3PoolAbi,\n functionName: 'token0',\n }),\n this.client.readContract({\n address: this.poolAddress,\n abi: uniswapV3PoolAbi,\n functionName: 'token1',\n }),\n ])\n \n // Calculate price from sqrtPriceX96\n // sqrtPriceX96 = sqrt(price) * 2^96\n // price = (sqrtPriceX96 / 2^96)^2\n const sqrtPriceX96 = poolInfo.sqrtPriceX96\n const Q96 = BigInt(2) ** BigInt(96)\n \n // price0 = amount of token1 per token0\n const sqrtPriceX96Squared = sqrtPriceX96 * sqrtPriceX96\n const Q96Squared = Q96 * Q96\n const price0 = sqrtPriceX96Squared / Q96Squared\n \n // Return price based on which token is the auction token\n if (poolInfo.tokenAddress === token0) {\n // Auction token is token0, return price in terms of token1 (numeraire)\n return price0\n } else {\n // Auction token is token1, return reciprocal price\n // price1 = 1 / price0 (with precision handling)\n return Q96Squared / price0\n }\n }\n \n /**\n * Get total liquidity in the pool\n */\n async getTotalLiquidity(): Promise<bigint> {\n return await this.client.readContract({\n address: this.poolAddress,\n abi: uniswapV3PoolAbi,\n functionName: 'liquidity',\n })\n }\n}\n"]}
1
+ {"version":3,"sources":["../src/entities/auction/StaticAuction.ts"],"names":[],"mappings":";;;;AAWO,IAAM,gBAAN,MAAoB;AAAA,EAIzB,WAAA,CAAY,QAA+B,WAAA,EAAsB;AAC/D,IAAA,IAAA,CAAK,MAAA,GAAS,MAAA;AACd,IAAA,IAAA,CAAK,WAAA,GAAc,WAAA;AAAA,EACrB;AAAA;AAAA;AAAA;AAAA,EAKA,UAAA,GAAsB;AACpB,IAAA,OAAO,IAAA,CAAK,WAAA;AAAA,EACd;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,WAAA,GAAiC;AAErC,IAAA,MAAM,CAAC,OAAO,SAAA,EAAW,MAAA,EAAQ,QAAQ,GAAG,CAAA,GAAI,MAAM,OAAA,CAAQ,GAAA,CAAI;AAAA,MAChE,IAAA,CAAK,OAAO,YAAA,CAAa;AAAA,QACvB,SAAS,IAAA,CAAK,WAAA;AAAA,QACd,GAAA,EAAK,gBAAA;AAAA,QACL,YAAA,EAAc;AAAA,OACf,CAAA;AAAA,MACD,IAAA,CAAK,OAAO,YAAA,CAAa;AAAA,QACvB,SAAS,IAAA,CAAK,WAAA;AAAA,QACd,GAAA,EAAK,gBAAA;AAAA,QACL,YAAA,EAAc;AAAA,OACf,CAAA;AAAA,MACD,IAAA,CAAK,OAAO,YAAA,CAAa;AAAA,QACvB,SAAS,IAAA,CAAK,WAAA;AAAA,QACd,GAAA,EAAK,gBAAA;AAAA,QACL,YAAA,EAAc;AAAA,OACf,CAAA;AAAA,MACD,IAAA,CAAK,OAAO,YAAA,CAAa;AAAA,QACvB,SAAS,I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,UAAA,GAAa,MAAA;AAAA,IACtB;AAAA,EACF;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,iBAAA,GAAqC;AACzC,IAAA,OAAO,MAAM,IAAA,CAAK,MAAA,CAAO,YAAA,CAAa;AAAA,MACpC,SAAS,IAAA,CAAK,WAAA;AAAA,MACd,GAAA,EAAK,gBAAA;AAAA,MACL,YAAA,EAAc;AAAA,KACf,CAAA;AAAA,EACH;AACF","file":"chunk-DUO3CANY.mjs","sourcesContent":["import { type Address, getAddress, zeroAddress } from 'viem'\nimport type { PoolInfo, SupportedPublicClient } from '../../types'\nimport { uniswapV3PoolAbi, airlockAbi } from '../../abis'\nimport { getAddresses } from '../../addresses'\n\n/**\n * StaticAuction class for interacting with static auctions (Uniswap V3 based)\n * \n * Static auctions use a fixed price range on Uniswap V3 for initial liquidity bootstrapping.\n * This is ideal for simple, predictable price discovery events.\n */\nexport class StaticAuction {\n private client: SupportedPublicClient\n private poolAddress: Address\n \n constructor(client: SupportedPublicClient, poolAddress: Address) {\n this.client = client\n this.poolAddress = poolAddress\n }\n \n /**\n * Get the pool address\n */\n getAddress(): Address {\n return this.poolAddress\n }\n \n /**\n * Get current pool information\n */\n async getPoolInfo(): Promise<PoolInfo> {\n // Fetch all pool data in parallel\n const [slot0, liquidity, token0, token1, fee] = await Promise.all([\n this.client.readContract({\n address: this.poolAddress,\n abi: uniswapV3PoolAbi,\n functionName: 'slot0',\n }),\n this.client.readContract({\n address: this.poolAddress,\n abi: uniswapV3PoolAbi,\n functionName: 'liquidity',\n }),\n this.client.readContract({\n address: this.poolAddress,\n abi: uniswapV3PoolAbi,\n functionName: 'token0',\n }),\n this.client.readContract({\n address: this.poolAddress,\n abi: uniswapV3PoolAbi,\n functionName: 'token1',\n }),\n this.client.readContract({\n address: this.poolAddress,\n abi: uniswapV3PoolAbi,\n functionName: 'fee',\n }),\n ])\n \n // Determine which token is the auction token and which is numeraire\n // This requires checking with the Airlock contract\n const chainId = await this.client.getChainId()\n const addresses = getAddresses(chainId)\n \n const assetData = await this.client.readContract({\n address: addresses.airlock,\n abi: airlockAbi,\n functionName: 'getAssetData',\n args: [token0],\n })\n \n // The getAssetData returns: [numeraire, timelock, governance, liquidityMigrator, poolInitializer, pool, migrationPool, numTokensToSell, totalSupply, integrator]\n // If token0 has asset data in Airlock (pool is not zero), it's the auction token\n const isToken0AuctionToken = assetData[5] !== zeroAddress\n \n return {\n address: this.poolAddress,\n tokenAddress: isToken0AuctionToken ? token0 : token1,\n numeraireAddress: isToken0AuctionToken ? token1 : token0,\n fee,\n liquidity,\n sqrtPriceX96: slot0[0], // First element is sqrtPriceX96\n }\n }\n \n /**\n * Get the token address for this auction\n */\n async getTokenAddress(): Promise<Address> {\n const poolInfo = await this.getPoolInfo()\n return poolInfo.tokenAddress\n }\n \n /**\n * Check if the auction has graduated (ready for migration)\n */\n async hasGraduated(): Promise<boolean> {\n const tokenAddress = await this.getTokenAddress()\n const chainId = await this.client.getChainId()\n const addresses = getAddresses(chainId)\n \n const assetData = await this.client.readContract({\n address: addresses.airlock,\n abi: airlockAbi,\n functionName: 'getAssetData',\n args: [tokenAddress],\n })\n \n // The getAssetData returns: [numeraire, timelock, governance, liquidityMigrator, poolInitializer, pool, migrationPool, numTokensToSell, totalSupply, integrator]\n // Check if the asset is graduated (liquidityMigrator is set to address(0))\n return assetData[3] === zeroAddress\n }\n \n /**\n * Get the current price in the pool\n * Returns the price of token in terms of numeraire (token/numeraire)\n */\n async getCurrentPrice(): Promise<bigint> {\n const poolInfo = await this.getPoolInfo()\n \n // Get token ordering\n const [token0, token1] = await Promise.all([\n this.client.readContract({\n address: this.poolAddress,\n abi: uniswapV3PoolAbi,\n functionName: 'token0',\n }),\n this.client.readContract({\n address: this.poolAddress,\n abi: uniswapV3PoolAbi,\n functionName: 'token1',\n }),\n ])\n \n // Calculate price from sqrtPriceX96\n // sqrtPriceX96 = sqrt(price) * 2^96\n // price = (sqrtPriceX96 / 2^96)^2\n const sqrtPriceX96 = poolInfo.sqrtPriceX96\n const Q96 = BigInt(2) ** BigInt(96)\n \n // price0 = amount of token1 per token0\n const sqrtPriceX96Squared = sqrtPriceX96 * sqrtPriceX96\n const Q96Squared = Q96 * Q96\n const price0 = sqrtPriceX96Squared / Q96Squared\n \n // Return price based on which token is the auction token\n if (poolInfo.tokenAddress === token0) {\n // Auction token is token0, return price in terms of token1 (numeraire)\n return price0\n } else {\n // Auction token is token1, return reciprocal price\n // price1 = 1 / price0 (with precision handling)\n return Q96Squared / price0\n }\n }\n \n /**\n * Get total liquidity in the pool\n */\n async getTotalLiquidity(): Promise<bigint> {\n return await this.client.readContract({\n address: this.poolAddress,\n abi: uniswapV3PoolAbi,\n functionName: 'liquidity',\n })\n }\n}\n"]}
@@ -1,7 +1,7 @@
1
- import { StaticAuction } from './chunk-Y3KBSG4Y.mjs';
2
- import { DopplerFactory } from './chunk-EO7INTQ7.mjs';
3
- import { Quoter } from './chunk-BHYYCQ3Q.mjs';
4
- import { DynamicAuction } from './chunk-5YF2QN6D.mjs';
1
+ import { StaticAuction } from './chunk-DUO3CANY.mjs';
2
+ import { DopplerFactory } from './chunk-XG2CXLFS.mjs';
3
+ import { Quoter } from './chunk-JWWZAT5R.mjs';
4
+ import { DynamicAuction } from './chunk-R74XZRPG.mjs';
5
5
  import { StaticAuctionBuilder, DynamicAuctionBuilder } from './chunk-GUF66EFF.mjs';
6
6
 
7
7
  // src/DopplerSDK.ts
@@ -89,5 +89,5 @@ var DopplerSDK = class {
89
89
  };
90
90
 
91
91
  export { DopplerSDK };
92
- //# sourceMappingURL=chunk-KRSEBXPW.mjs.map
93
- //# sourceMappingURL=chunk-KRSEBXPW.mjs.map
92
+ //# sourceMappingURL=chunk-EL4BTXY4.mjs.map
93
+ //# sourceMappingURL=chunk-EL4BTXY4.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/DopplerSDK.ts"],"names":[],"mappings":";;;;;;;AAQO,IAAM,aAAN,MAAgE;AAAA,EAOrE,YAAY,MAAA,E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AAM,OAAA,GAAU,IAAI,cAAA,CAAe,IAAA,CAAK,cAAc,WAAW,CAAA;AACjE,IAAA,OAAO,QAAQ,WAAA,EAAY;AAAA,EAC7B;AAAA;AAAA;AAAA;AAAA,EAKA,kBAAA,GAA8C;AAC5C,IAAA,OAAO,IAAI,oBAAA,CAAqB,IAAA,CAAK,OAAO,CAAA;AAAA,EAC9C;AAAA;AAAA;AAAA;AAAA,EAKA,mBAAA,GAAgD;AAC9C,IAAA,OAAO,IAAI,qBAAA,CAAsB,IAAA,CAAK,OAAO,CAAA;AAAA,EAC/C;AAAA;AAAA;AAAA;AAAA,EAKA,UAAA,GAAgB;AACd,IAAA,OAAO,IAAA,CAAK,OAAA;AAAA,EACd;AAAA;AAAA;AAAA;AAAA,EAKA,UAAA,GAAmF;AACjF,IAAA,OAAO;AAAA,MACL,cAAc,IAAA,CAAK,YAAA;AAAA,MACnB,cAAc,IAAA,CAAK;AAAA,KACrB;AAAA,EACF;AACF","file":"chunk-KRSEBXPW.mjs","sourcesContent":["import type { Address, WalletClient } from 'viem'\nimport type { DopplerSDKConfig, HookInfo, PoolInfo, SupportedPublicClient } from './types'\nimport type { SupportedChainId } from './addresses'\nimport { DopplerFactory } from './entities/DopplerFactory'\nimport { StaticAuction, DynamicAuction } from './entities/auction'\nimport { Quoter } from './entities/quoter'\nimport { StaticAuctionBuilder, DynamicAuctionBuilder } from './builders'\n\nexport class DopplerSDK<C extends SupportedChainId = SupportedChainId> {\n private publicClient: SupportedPublicClient\n private walletClient?: WalletClient\n public chainId: C\n private _factory?: DopplerFactory<C>\n private _quoter?: Quoter\n\n constructor(config: DopplerSDKConfig<C>) {\n this.publicClient = config.publicClient\n this.walletClient = config.walletClient\n this.chainId = config.chainId\n }\n\n /**\n * Get the factory instance for creating auctions\n */\n get factory(): DopplerFactory<C> {\n if (!this._factory) {\n this._factory = new DopplerFactory(this.publicClient, this.walletClient, this.chainId)\n }\n return this._factory\n }\n\n /**\n * Get the quoter instance for price queries\n */\n get quoter(): Quoter {\n if (!this._quoter) {\n this._quoter = new Quoter(this.publicClient, this.chainId)\n }\n return this._quoter\n }\n\n /**\n * Get a StaticAuction instance for interacting with a static auction pool\n * @param poolAddress The address of the Uniswap V3 pool\n */\n async getStaticAuction(poolAddress: Address): Promise<StaticAuction> {\n return new StaticAuction(this.publicClient, poolAddress)\n }\n\n /**\n * Get a DynamicAuction instance for interacting with a dynamic auction hook\n * @param hookAddress The address of the Uniswap V4 hook\n */\n async getDynamicAuction(hookAddress: Address): Promise<DynamicAuction> {\n return new DynamicAuction(this.publicClient, hookAddress)\n }\n\n /**\n * Get information about a static auction pool\n * @param poolAddress The address of the pool\n */\n async getPoolInfo(poolAddress: Address): Promise<PoolInfo> {\n const auction = new StaticAuction(this.publicClient, poolAddress)\n return auction.getPoolInfo()\n }\n\n /**\n * Get information about a dynamic auction hook\n * @param hookAddress The address of the hook\n */\n async getHookInfo(hookAddress: Address): Promise<HookInfo> {\n const auction = new DynamicAuction(this.publicClient, hookAddress)\n return auction.getHookInfo()\n }\n\n /**\n * Create a new static auction builder\n */\n buildStaticAuction(): StaticAuctionBuilder<C> {\n return new StaticAuctionBuilder(this.chainId)\n }\n\n /**\n * Create a new dynamic auction builder\n */\n buildDynamicAuction(): DynamicAuctionBuilder<C> {\n return new DynamicAuctionBuilder(this.chainId)\n }\n\n /**\n * Get the current chain ID\n */\n getChainId(): C {\n return this.chainId\n }\n\n /**\n * Get the underlying clients\n */\n getClients(): { publicClient: SupportedPublicClient; walletClient?: WalletClient } {\n return {\n publicClient: this.publicClient,\n walletClient: this.walletClient\n }\n }\n}"]}
1
+ {"version":3,"sources":["../src/DopplerSDK.ts"],"names":[],"mappings":";;;;;;;AAQO,IAAM,aAAN,MAAgE;AAAA,EAOrE,YAAY,MAAA,EAA6B;AACvC,IAAA,IAAA,CAAK,eAAe,MAAA,CAAO,YAAA;AAC3B,IAAA,IAAA,CAAK,eAAe,MAAA,CAAO,YAAA;AAC3B,IAAA,IAAA,CAAK,U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AA;AAAA,EAKA,kBAAA,GAA8C;AAC5C,IAAA,OAAO,IAAI,oBAAA,CAAqB,IAAA,CAAK,OAAO,CAAA;AAAA,EAC9C;AAAA;AAAA;AAAA;AAAA,EAKA,mBAAA,GAAgD;AAC9C,IAAA,OAAO,IAAI,qBAAA,CAAsB,IAAA,CAAK,OAAO,CAAA;AAAA,EAC/C;AAAA;AAAA;AAAA;AAAA,EAKA,UAAA,GAAgB;AACd,IAAA,OAAO,IAAA,CAAK,OAAA;AAAA,EACd;AAAA;AAAA;AAAA;AAAA,EAKA,UAAA,GAAmF;AACjF,IAAA,OAAO;AAAA,MACL,cAAc,IAAA,CAAK,YAAA;AAAA,MACnB,cAAc,IAAA,CAAK;AAAA,KACrB;AAAA,EACF;AACF","file":"chunk-EL4BTXY4.mjs","sourcesContent":["import type { Address, WalletClient } from 'viem'\nimport type { DopplerSDKConfig, HookInfo, PoolInfo, SupportedPublicClient } from './types'\nimport type { SupportedChainId } from './addresses'\nimport { DopplerFactory } from './entities/DopplerFactory'\nimport { StaticAuction, DynamicAuction } from './entities/auction'\nimport { Quoter } from './entities/quoter'\nimport { StaticAuctionBuilder, DynamicAuctionBuilder } from './builders'\n\nexport class DopplerSDK<C extends SupportedChainId = SupportedChainId> {\n private publicClient: SupportedPublicClient\n private walletClient?: WalletClient\n public chainId: C\n private _factory?: DopplerFactory<C>\n private _quoter?: Quoter\n\n constructor(config: DopplerSDKConfig<C>) {\n this.publicClient = config.publicClient\n this.walletClient = config.walletClient\n this.chainId = config.chainId\n }\n\n /**\n * Get the factory instance for creating auctions\n */\n get factory(): DopplerFactory<C> {\n if (!this._factory) {\n this._factory = new DopplerFactory(this.publicClient, this.walletClient, this.chainId)\n }\n return this._factory\n }\n\n /**\n * Get the quoter instance for price queries\n */\n get quoter(): Quoter {\n if (!this._quoter) {\n this._quoter = new Quoter(this.publicClient, this.chainId)\n }\n return this._quoter\n }\n\n /**\n * Get a StaticAuction instance for interacting with a static auction pool\n * @param poolAddress The address of the Uniswap V3 pool\n */\n async getStaticAuction(poolAddress: Address): Promise<StaticAuction> {\n return new StaticAuction(this.publicClient, poolAddress)\n }\n\n /**\n * Get a DynamicAuction instance for interacting with a dynamic auction hook\n * @param hookAddress The address of the Uniswap V4 hook\n */\n async getDynamicAuction(hookAddress: Address): Promise<DynamicAuction> {\n return new DynamicAuction(this.publicClient, hookAddress)\n }\n\n /**\n * Get information about a static auction pool\n * @param poolAddress The address of the pool\n */\n async getPoolInfo(poolAddress: Address): Promise<PoolInfo> {\n const auction = new StaticAuction(this.publicClient, poolAddress)\n return auction.getPoolInfo()\n }\n\n /**\n * Get information about a dynamic auction hook\n * @param hookAddress The address of the hook\n */\n async getHookInfo(hookAddress: Address): Promise<HookInfo> {\n const auction = new DynamicAuction(this.publicClient, hookAddress)\n return auction.getHookInfo()\n }\n\n /**\n * Create a new static auction builder\n */\n buildStaticAuction(): StaticAuctionBuilder<C> {\n return new StaticAuctionBuilder(this.chainId)\n }\n\n /**\n * Create a new dynamic auction builder\n */\n buildDynamicAuction(): DynamicAuctionBuilder<C> {\n return new DynamicAuctionBuilder(this.chainId)\n }\n\n /**\n * Get the current chain ID\n */\n getChainId(): C {\n return this.chainId\n }\n\n /**\n * Get the underlying clients\n */\n getClients(): { publicClient: SupportedPublicClient; walletClient?: WalletClient } {\n return {\n publicClient: this.publicClient,\n walletClient: this.walletClient\n }\n }\n}"]}
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkKDUEFQXG_js = require('./chunk-KDUEFQXG.js');
3
+ var chunkW3XY463N_js = require('./chunk-W3XY463N.js');
4
4
  var chunkEFAPDN4J_js = require('./chunk-EFAPDN4J.js');
5
5
 
6
6
  // src/entities/quoter/Quoter.ts
@@ -15,7 +15,7 @@ var Quoter = class {
15
15
  * @returns Quote result including output amount and price impact
16
16
  */
17
17
  async quoteExactInputV3(params) {
18
- const addresses = chunkKDUEFQXG_js.getAddresses(this.chainId);
18
+ const addresses = chunkW3XY463N_js.getAddresses(this.chainId);
19
19
  const { result } = await this.publicClient.simulateContract({
20
20
  address: addresses.v3Quoter,
21
21
  abi: chunkEFAPDN4J_js.quoterV2Abi,
@@ -41,7 +41,7 @@ var Quoter = class {
41
41
  * @returns Quote result including required input amount
42
42
  */
43
43
  async quoteExactOutputV3(params) {
44
- const addresses = chunkKDUEFQXG_js.getAddresses(this.chainId);
44
+ const addresses = chunkW3XY463N_js.getAddresses(this.chainId);
45
45
  const { result } = await this.publicClient.simulateContract({
46
46
  address: addresses.v3Quoter,
47
47
  abi: chunkEFAPDN4J_js.quoterV2Abi,
@@ -67,7 +67,7 @@ var Quoter = class {
67
67
  * @returns Array of amounts for each step in the path
68
68
  */
69
69
  async quoteExactInputV2(params) {
70
- const addresses = chunkKDUEFQXG_js.getAddresses(this.chainId);
70
+ const addresses = chunkW3XY463N_js.getAddresses(this.chainId);
71
71
  if (!addresses.univ2Router02) {
72
72
  throw new Error("Uniswap V2 Router not available on this chain");
73
73
  }
@@ -85,7 +85,7 @@ var Quoter = class {
85
85
  * @returns Array of amounts for each step in the path
86
86
  */
87
87
  async quoteExactOutputV2(params) {
88
- const addresses = chunkKDUEFQXG_js.getAddresses(this.chainId);
88
+ const addresses = chunkW3XY463N_js.getAddresses(this.chainId);
89
89
  if (!addresses.univ2Router02) {
90
90
  throw new Error("Uniswap V2 Router not available on this chain");
91
91
  }
@@ -103,7 +103,7 @@ var Quoter = class {
103
103
  * @returns Quote result for V4 pools
104
104
  */
105
105
  async quoteExactInputV4(params) {
106
- const addresses = chunkKDUEFQXG_js.getAddresses(this.chainId);
106
+ const addresses = chunkW3XY463N_js.getAddresses(this.chainId);
107
107
  const quoterAddress = addresses.dopplerLens;
108
108
  if (!quoterAddress) {
109
109
  throw new Error("No V4 quoter available on this chain");
@@ -134,7 +134,7 @@ var Quoter = class {
134
134
  * @returns Quote result for V4 pools
135
135
  */
136
136
  async quoteExactOutputV4(params) {
137
- const addresses = chunkKDUEFQXG_js.getAddresses(this.chainId);
137
+ const addresses = chunkW3XY463N_js.getAddresses(this.chainId);
138
138
  const quoterAddress = addresses.dopplerLens;
139
139
  if (!quoterAddress) {
140
140
  throw new Error("No V4 quoter available on this chain");
@@ -158,5 +158,5 @@ var Quoter = class {
158
158
  };
159
159
 
160
160
  exports.Quoter = Quoter;
161
- //# sourceMappingURL=chunk-Z2CEHD7C.js.map
162
- //# sourceMappingURL=chunk-Z2CEHD7C.js.map
161
+ //# sourceMappingURL=chunk-H4CAYUCM.js.map
162
+ //# sourceMappingURL=chunk-H4CAYUCM.js.map