@paraswap/dex-lib 2.33.4-balancer-v2-multihop.2 → 2.33.4-base-support.0

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 (115) hide show
  1. package/build/config.js +26 -0
  2. package/build/config.js.map +1 -1
  3. package/build/constants.d.ts +2 -1
  4. package/build/constants.js +2 -1
  5. package/build/constants.js.map +1 -1
  6. package/build/dex/balancer-v2/optimizer.d.ts +0 -1
  7. package/build/dex/balancer-v2/optimizer.js +21 -29
  8. package/build/dex/balancer-v2/optimizer.js.map +1 -1
  9. package/build/dex/pancakeswap-v3/types.d.ts +137 -0
  10. package/build/dex/pancakeswap-v3/types.js +9 -0
  11. package/build/dex/pancakeswap-v3/types.js.map +1 -0
  12. package/build/dex/uniswap-v3/config.js +12 -0
  13. package/build/dex/uniswap-v3/config.js.map +1 -1
  14. package/build/dex/weth/config.js +3 -0
  15. package/build/dex/weth/config.js.map +1 -1
  16. package/build/web3-provider.d.ts +3 -0
  17. package/build/web3-provider.js +13 -0
  18. package/build/web3-provider.js.map +1 -0
  19. package/package.json +1 -1
  20. package/src/config.ts +29 -0
  21. package/src/constants.ts +2 -1
  22. package/src/dex/balancer-v2/optimizer.ts +23 -38
  23. package/src/dex/uniswap-v3/config.ts +13 -0
  24. package/src/dex/weth/config.ts +3 -0
  25. package/build/abi/algebra/AlgebraFactory-v1_1.abi.json +0 -250
  26. package/build/abi/api3-proxy.json +0 -46
  27. package/build/abi/api3-server-v1.json +0 -463
  28. package/build/abi/quick-perps/fast-price-events.json +0 -70
  29. package/build/abi/quick-perps/fast-price-feed.json +0 -741
  30. package/build/abi/quick-perps/reader.json +0 -313
  31. package/build/abi/quick-perps/vault-price-feed.json +0 -323
  32. package/build/abi/quick-perps/vault.json +0 -1953
  33. package/build/abi/quickPerps/fast-price-events.json +0 -70
  34. package/build/abi/quickPerps/fast-price-feed.json +0 -748
  35. package/build/abi/quickPerps/reader.json +0 -313
  36. package/build/abi/quickPerps/vault-price-feed.json +0 -477
  37. package/build/abi/quickPerps/vault.json +0 -1953
  38. package/build/abi/woo-fi/WooFeeManager.abi.json +0 -318
  39. package/build/abi/woo-fi/WooPP.abi.json +0 -548
  40. package/build/abi/woo-fi/Wooracle.abi.json +0 -260
  41. package/build/dex/aave-v3/tokens/arbitrum.json +0 -50
  42. package/build/dex/aave-v3/tokens/avalanche.json +0 -74
  43. package/build/dex/aave-v3/tokens/fantom.json +0 -62
  44. package/build/dex/aave-v3/tokens/optimism.json +0 -50
  45. package/build/dex/aave-v3/tokens/polygon.json +0 -116
  46. package/build/dex/quick-perps/config.d.ts +0 -11
  47. package/build/dex/quick-perps/config.js +0 -27
  48. package/build/dex/quick-perps/config.js.map +0 -1
  49. package/build/dex/quick-perps/fast-price-feed.d.ts +0 -26
  50. package/build/dex/quick-perps/fast-price-feed.js +0 -176
  51. package/build/dex/quick-perps/fast-price-feed.js.map +0 -1
  52. package/build/dex/quick-perps/pool.d.ts +0 -21
  53. package/build/dex/quick-perps/pool.js +0 -210
  54. package/build/dex/quick-perps/pool.js.map +0 -1
  55. package/build/dex/quick-perps/quick-perps.d.ts +0 -52
  56. package/build/dex/quick-perps/quick-perps.js +0 -205
  57. package/build/dex/quick-perps/quick-perps.js.map +0 -1
  58. package/build/dex/quick-perps/types.d.ts +0 -98
  59. package/build/dex/quick-perps/types.js +0 -3
  60. package/build/dex/quick-perps/types.js.map +0 -1
  61. package/build/dex/quick-perps/usdq.d.ts +0 -15
  62. package/build/dex/quick-perps/usdq.js +0 -61
  63. package/build/dex/quick-perps/usdq.js.map +0 -1
  64. package/build/dex/quick-perps/vault-price-feed.d.ts +0 -43
  65. package/build/dex/quick-perps/vault-price-feed.js +0 -194
  66. package/build/dex/quick-perps/vault-price-feed.js.map +0 -1
  67. package/build/dex/quick-perps/vault-utils.d.ts +0 -8
  68. package/build/dex/quick-perps/vault-utils.js +0 -41
  69. package/build/dex/quick-perps/vault-utils.js.map +0 -1
  70. package/build/dex/quick-perps/vault.d.ts +0 -46
  71. package/build/dex/quick-perps/vault.js +0 -166
  72. package/build/dex/quick-perps/vault.js.map +0 -1
  73. package/build/dex/quickswap/camelot-v3.d.ts +0 -6
  74. package/build/dex/quickswap/camelot-v3.js +0 -19
  75. package/build/dex/quickswap/camelot-v3.js.map +0 -1
  76. package/build/dex/quickswap-v3.d.ts +0 -21
  77. package/build/dex/quickswap-v3.js +0 -40
  78. package/build/dex/quickswap-v3.js.map +0 -1
  79. package/build/dex/test-dex/config.d.ts +0 -4
  80. package/build/dex/test-dex/config.js +0 -15
  81. package/build/dex/test-dex/config.js.map +0 -1
  82. package/build/dex/test-dex/test-dex-pool.d.ts +0 -39
  83. package/build/dex/test-dex/test-dex-pool.js +0 -63
  84. package/build/dex/test-dex/test-dex-pool.js.map +0 -1
  85. package/build/dex/test-dex/test-dex.d.ts +0 -37
  86. package/build/dex/test-dex/test-dex.js +0 -126
  87. package/build/dex/test-dex/test-dex.js.map +0 -1
  88. package/build/dex/test-dex/types.d.ts +0 -6
  89. package/build/dex/test-dex/types.js +0 -3
  90. package/build/dex/test-dex/types.js.map +0 -1
  91. package/build/dex/woo-fi/config.d.ts +0 -4
  92. package/build/dex/woo-fi/config.js +0 -141
  93. package/build/dex/woo-fi/config.js.map +0 -1
  94. package/build/dex/woo-fi/constants.d.ts +0 -5
  95. package/build/dex/woo-fi/constants.js +0 -20
  96. package/build/dex/woo-fi/constants.js.map +0 -1
  97. package/build/dex/woo-fi/types.d.ts +0 -48
  98. package/build/dex/woo-fi/types.js +0 -3
  99. package/build/dex/woo-fi/types.js.map +0 -1
  100. package/build/dex/woo-fi/woo-fi-decimal-math.d.ts +0 -14
  101. package/build/dex/woo-fi/woo-fi-decimal-math.js +0 -42
  102. package/build/dex/woo-fi/woo-fi-decimal-math.js.map +0 -1
  103. package/build/dex/woo-fi/woo-fi-math.d.ts +0 -31
  104. package/build/dex/woo-fi/woo-fi-math.js +0 -300
  105. package/build/dex/woo-fi/woo-fi-math.js.map +0 -1
  106. package/build/dex/woo-fi/woo-fi.d.ts +0 -65
  107. package/build/dex/woo-fi/woo-fi.js +0 -480
  108. package/build/dex/woo-fi/woo-fi.js.map +0 -1
  109. package/build/dex/woo-fi-v2/woo-fi-math.d.ts +0 -16
  110. package/build/dex/woo-fi-v2/woo-fi-math.js +0 -137
  111. package/build/dex/woo-fi-v2/woo-fi-math.js.map +0 -1
  112. package/build/lib/api3-feed.d.ts +0 -26
  113. package/build/lib/api3-feed.js +0 -82
  114. package/build/lib/api3-feed.js.map +0 -1
  115. package/src/dex/balancer-v2/balancer-v2-optimizer.test.ts +0 -226
@@ -106,6 +106,19 @@ export const UniswapV3Config: DexConfigMap<DexParams> = {
106
106
  subgraphURL:
107
107
  'https://api.thegraph.com/subgraphs/name/lynnshaoyu/uniswap-v3-avax',
108
108
  },
109
+ [Network.BASE]: {
110
+ factory: '0x33128a8fC17869897dcE68Ed026d694621f6FDfD',
111
+ quoter: '0x3d4e44Eb1374240CE5F1B871ab261CD16335B76a',
112
+ router: '0xaeE2b8d4A154e36f479dAeCe3FB3e6c3c03d396E',
113
+ supportedFees: SUPPORTED_FEES,
114
+ stateMulticall: '0x7160f736c52e1e78e92FD4eE4D73e21A7Cf4F950',
115
+ uniswapMulticall: '0x091e99cb1C49331a94dD62755D168E941AbD0693',
116
+ chunksCount: 10,
117
+ initRetryFrequency: 10,
118
+ initHash: `0xe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b54`,
119
+ subgraphURL:
120
+ 'https://api.thegraph.com/subgraphs/name/lynnshaoyu/uniswap-v3-base',
121
+ },
109
122
  },
110
123
  SushiSwapV3: {
111
124
  [Network.MAINNET]: {
@@ -25,6 +25,9 @@ export const WethConfig: DexConfigMap<DexParams> = {
25
25
  [Network.ZKEVM]: {
26
26
  poolGasCost: WethGasCost,
27
27
  },
28
+ [Network.BASE]: {
29
+ poolGasCost: WethGasCost,
30
+ },
28
31
  },
29
32
  Wbnb: {
30
33
  [Network.BSC]: {
@@ -1,250 +0,0 @@
1
- [
2
- {
3
- "inputs": [
4
- { "internalType": "address", "name": "_poolDeployer", "type": "address" },
5
- { "internalType": "address", "name": "_vaultAddress", "type": "address" }
6
- ],
7
- "stateMutability": "nonpayable",
8
- "type": "constructor"
9
- },
10
- {
11
- "anonymous": false,
12
- "inputs": [
13
- {
14
- "indexed": true,
15
- "internalType": "address",
16
- "name": "newFarmingAddress",
17
- "type": "address"
18
- }
19
- ],
20
- "name": "FarmingAddress",
21
- "type": "event"
22
- },
23
- {
24
- "anonymous": false,
25
- "inputs": [
26
- {
27
- "indexed": false,
28
- "internalType": "uint16",
29
- "name": "alpha1",
30
- "type": "uint16"
31
- },
32
- {
33
- "indexed": false,
34
- "internalType": "uint16",
35
- "name": "alpha2",
36
- "type": "uint16"
37
- },
38
- {
39
- "indexed": false,
40
- "internalType": "uint32",
41
- "name": "beta1",
42
- "type": "uint32"
43
- },
44
- {
45
- "indexed": false,
46
- "internalType": "uint32",
47
- "name": "beta2",
48
- "type": "uint32"
49
- },
50
- {
51
- "indexed": false,
52
- "internalType": "uint16",
53
- "name": "gamma1",
54
- "type": "uint16"
55
- },
56
- {
57
- "indexed": false,
58
- "internalType": "uint16",
59
- "name": "gamma2",
60
- "type": "uint16"
61
- },
62
- {
63
- "indexed": false,
64
- "internalType": "uint32",
65
- "name": "volumeBeta",
66
- "type": "uint32"
67
- },
68
- {
69
- "indexed": false,
70
- "internalType": "uint16",
71
- "name": "volumeGamma",
72
- "type": "uint16"
73
- },
74
- {
75
- "indexed": false,
76
- "internalType": "uint16",
77
- "name": "baseFee",
78
- "type": "uint16"
79
- }
80
- ],
81
- "name": "FeeConfiguration",
82
- "type": "event"
83
- },
84
- {
85
- "anonymous": false,
86
- "inputs": [
87
- {
88
- "indexed": true,
89
- "internalType": "address",
90
- "name": "newOwner",
91
- "type": "address"
92
- }
93
- ],
94
- "name": "Owner",
95
- "type": "event"
96
- },
97
- {
98
- "anonymous": false,
99
- "inputs": [
100
- {
101
- "indexed": true,
102
- "internalType": "address",
103
- "name": "token0",
104
- "type": "address"
105
- },
106
- {
107
- "indexed": true,
108
- "internalType": "address",
109
- "name": "token1",
110
- "type": "address"
111
- },
112
- {
113
- "indexed": false,
114
- "internalType": "address",
115
- "name": "pool",
116
- "type": "address"
117
- }
118
- ],
119
- "name": "Pool",
120
- "type": "event"
121
- },
122
- {
123
- "anonymous": false,
124
- "inputs": [
125
- {
126
- "indexed": true,
127
- "internalType": "address",
128
- "name": "newVaultAddress",
129
- "type": "address"
130
- }
131
- ],
132
- "name": "VaultAddress",
133
- "type": "event"
134
- },
135
- {
136
- "inputs": [],
137
- "name": "baseFeeConfiguration",
138
- "outputs": [
139
- { "internalType": "uint16", "name": "alpha1", "type": "uint16" },
140
- { "internalType": "uint16", "name": "alpha2", "type": "uint16" },
141
- { "internalType": "uint32", "name": "beta1", "type": "uint32" },
142
- { "internalType": "uint32", "name": "beta2", "type": "uint32" },
143
- { "internalType": "uint16", "name": "gamma1", "type": "uint16" },
144
- { "internalType": "uint16", "name": "gamma2", "type": "uint16" },
145
- { "internalType": "uint32", "name": "volumeBeta", "type": "uint32" },
146
- { "internalType": "uint16", "name": "volumeGamma", "type": "uint16" },
147
- { "internalType": "uint16", "name": "baseFee", "type": "uint16" }
148
- ],
149
- "stateMutability": "view",
150
- "type": "function"
151
- },
152
- {
153
- "inputs": [
154
- { "internalType": "address", "name": "tokenA", "type": "address" },
155
- { "internalType": "address", "name": "tokenB", "type": "address" }
156
- ],
157
- "name": "createPool",
158
- "outputs": [
159
- { "internalType": "address", "name": "pool", "type": "address" }
160
- ],
161
- "stateMutability": "nonpayable",
162
- "type": "function"
163
- },
164
- {
165
- "inputs": [],
166
- "name": "farmingAddress",
167
- "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
168
- "stateMutability": "view",
169
- "type": "function"
170
- },
171
- {
172
- "inputs": [],
173
- "name": "owner",
174
- "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
175
- "stateMutability": "view",
176
- "type": "function"
177
- },
178
- {
179
- "inputs": [
180
- { "internalType": "address", "name": "", "type": "address" },
181
- { "internalType": "address", "name": "", "type": "address" }
182
- ],
183
- "name": "poolByPair",
184
- "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
185
- "stateMutability": "view",
186
- "type": "function"
187
- },
188
- {
189
- "inputs": [],
190
- "name": "poolDeployer",
191
- "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
192
- "stateMutability": "view",
193
- "type": "function"
194
- },
195
- {
196
- "inputs": [
197
- { "internalType": "uint16", "name": "alpha1", "type": "uint16" },
198
- { "internalType": "uint16", "name": "alpha2", "type": "uint16" },
199
- { "internalType": "uint32", "name": "beta1", "type": "uint32" },
200
- { "internalType": "uint32", "name": "beta2", "type": "uint32" },
201
- { "internalType": "uint16", "name": "gamma1", "type": "uint16" },
202
- { "internalType": "uint16", "name": "gamma2", "type": "uint16" },
203
- { "internalType": "uint32", "name": "volumeBeta", "type": "uint32" },
204
- { "internalType": "uint16", "name": "volumeGamma", "type": "uint16" },
205
- { "internalType": "uint16", "name": "baseFee", "type": "uint16" }
206
- ],
207
- "name": "setBaseFeeConfiguration",
208
- "outputs": [],
209
- "stateMutability": "nonpayable",
210
- "type": "function"
211
- },
212
- {
213
- "inputs": [
214
- {
215
- "internalType": "address",
216
- "name": "_farmingAddress",
217
- "type": "address"
218
- }
219
- ],
220
- "name": "setFarmingAddress",
221
- "outputs": [],
222
- "stateMutability": "nonpayable",
223
- "type": "function"
224
- },
225
- {
226
- "inputs": [
227
- { "internalType": "address", "name": "_owner", "type": "address" }
228
- ],
229
- "name": "setOwner",
230
- "outputs": [],
231
- "stateMutability": "nonpayable",
232
- "type": "function"
233
- },
234
- {
235
- "inputs": [
236
- { "internalType": "address", "name": "_vaultAddress", "type": "address" }
237
- ],
238
- "name": "setVaultAddress",
239
- "outputs": [],
240
- "stateMutability": "nonpayable",
241
- "type": "function"
242
- },
243
- {
244
- "inputs": [],
245
- "name": "vaultAddress",
246
- "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
247
- "stateMutability": "view",
248
- "type": "function"
249
- }
250
- ]
@@ -1,46 +0,0 @@
1
- [
2
- {
3
- "inputs": [],
4
- "name": "api3ServerV1",
5
- "outputs": [
6
- {
7
- "internalType": "address",
8
- "name": "",
9
- "type": "address"
10
- }
11
- ],
12
- "stateMutability": "view",
13
- "type": "function"
14
- },
15
- {
16
- "inputs": [],
17
- "name": "dataFeedId",
18
- "outputs": [
19
- {
20
- "internalType": "bytes32",
21
- "name": "",
22
- "type": "bytes32"
23
- }
24
- ],
25
- "stateMutability": "view",
26
- "type": "function"
27
- },
28
- {
29
- "inputs": [],
30
- "name": "read",
31
- "outputs": [
32
- {
33
- "internalType": "int224",
34
- "name": "value",
35
- "type": "int224"
36
- },
37
- {
38
- "internalType": "uint32",
39
- "name": "timestamp",
40
- "type": "uint32"
41
- }
42
- ],
43
- "stateMutability": "view",
44
- "type": "function"
45
- }
46
- ]