@oldzeppelin/contract 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. package/.docker/Dockerfile +17 -0
  2. package/.dockerignore +7 -0
  3. package/.env.sample +24 -0
  4. package/.gitlab-ci.yml +51 -0
  5. package/.gitmodules +15 -0
  6. package/.prettierrc +10 -0
  7. package/.solcover.js +4 -0
  8. package/.vscode/settings.json +23 -0
  9. package/LICENSE.MD +51 -0
  10. package/README.md +135 -0
  11. package/contracts/arbitrum/contracts/controllers/UniswapV2ControllerArbitrum.sol +37 -0
  12. package/contracts/arbitrum/contracts/controllers/UniswapV3ControllerArbitrum.sol +46 -0
  13. package/contracts/arbitrum/contracts/oracle/PriceOracleArbitrum.sol +51 -0
  14. package/contracts/main/contracts/controllers/Controller.sol +61 -0
  15. package/contracts/main/contracts/controllers/IController.sol +81 -0
  16. package/contracts/main/contracts/controllers/OneInchV5Controller.sol +332 -0
  17. package/contracts/main/contracts/controllers/UnoswapV2Controller.sol +789 -0
  18. package/contracts/main/contracts/controllers/UnoswapV3Controller.sol +1018 -0
  19. package/contracts/main/contracts/core/CoreWhitelist.sol +192 -0
  20. package/contracts/main/contracts/core/ICoreWhitelist.sol +92 -0
  21. package/contracts/main/contracts/core/IUFarmCore.sol +95 -0
  22. package/contracts/main/contracts/core/UFarmCore.sol +402 -0
  23. package/contracts/main/contracts/fund/FundFactory.sol +59 -0
  24. package/contracts/main/contracts/fund/IUFarmFund.sol +68 -0
  25. package/contracts/main/contracts/fund/UFarmFund.sol +504 -0
  26. package/contracts/main/contracts/oracle/ChainlinkedOracle.sol +71 -0
  27. package/contracts/main/contracts/oracle/IChainlinkAggregator.sol +18 -0
  28. package/contracts/main/contracts/oracle/IPriceOracle.sol +55 -0
  29. package/contracts/main/contracts/oracle/PriceOracle.sol +20 -0
  30. package/contracts/main/contracts/oracle/PriceOracleCore.sol +212 -0
  31. package/contracts/main/contracts/oracle/WstETHOracle.sol +64 -0
  32. package/contracts/main/contracts/permissions/Permissions.sol +54 -0
  33. package/contracts/main/contracts/permissions/UFarmPermissionsModel.sol +136 -0
  34. package/contracts/main/contracts/pool/IPoolAdmin.sol +57 -0
  35. package/contracts/main/contracts/pool/IUFarmPool.sol +304 -0
  36. package/contracts/main/contracts/pool/PerformanceFeeLib.sol +81 -0
  37. package/contracts/main/contracts/pool/PoolAdmin.sol +437 -0
  38. package/contracts/main/contracts/pool/PoolFactory.sol +74 -0
  39. package/contracts/main/contracts/pool/PoolWhitelist.sol +70 -0
  40. package/contracts/main/contracts/pool/UFarmPool.sol +959 -0
  41. package/contracts/main/shared/AssetController.sol +194 -0
  42. package/contracts/main/shared/ECDSARecover.sol +91 -0
  43. package/contracts/main/shared/NZGuard.sol +99 -0
  44. package/contracts/main/shared/SafeOPS.sol +128 -0
  45. package/contracts/main/shared/UFarmCoreLink.sol +83 -0
  46. package/contracts/main/shared/UFarmErrors.sol +16 -0
  47. package/contracts/main/shared/UFarmMathLib.sol +80 -0
  48. package/contracts/main/shared/UFarmOwnableUUPS.sol +59 -0
  49. package/contracts/main/shared/UFarmOwnableUUPSBeacon.sol +34 -0
  50. package/contracts/test/Block.sol +15 -0
  51. package/contracts/test/InchSwapTestProxy.sol +292 -0
  52. package/contracts/test/MockPoolAdmin.sol +8 -0
  53. package/contracts/test/MockUFarmPool.sol +8 -0
  54. package/contracts/test/MockV3wstETHstETHAgg.sol +128 -0
  55. package/contracts/test/MockedWETH9.sol +72 -0
  56. package/contracts/test/OneInchToUFarmTestEnv.sol +466 -0
  57. package/contracts/test/StableCoin.sol +25 -0
  58. package/contracts/test/UFarmMockSequencerUptimeFeed.sol +44 -0
  59. package/contracts/test/UFarmMockV3Aggregator.sol +145 -0
  60. package/contracts/test/UUPSBlock.sol +19 -0
  61. package/contracts/test/ufarmLocal/MulticallV3.sol +220 -0
  62. package/contracts/test/ufarmLocal/controllers/UniswapV2ControllerUFarm.sol +27 -0
  63. package/contracts/test/ufarmLocal/controllers/UniswapV3ControllerUFarm.sol +43 -0
  64. package/deploy/100_test_env_setup.ts +483 -0
  65. package/deploy/20_deploy_uniV2.ts +48 -0
  66. package/deploy/21_create_pairs_uniV2.ts +149 -0
  67. package/deploy/22_deploy_mocked_aggregators.ts +123 -0
  68. package/deploy/22_deploy_wsteth_oracle.ts +65 -0
  69. package/deploy/23_deploy_uniV3.ts +80 -0
  70. package/deploy/24_create_pairs_uniV3.ts +140 -0
  71. package/deploy/25_deploy_oneInch.ts +38 -0
  72. package/deploy/2_deploy_multicall.ts +34 -0
  73. package/deploy/30_deploy_price_oracle.ts +33 -0
  74. package/deploy/3_deploy_lido.ts +114 -0
  75. package/deploy/40_deploy_pool_beacon.ts +19 -0
  76. package/deploy/41_deploy_poolAdmin_beacon.ts +19 -0
  77. package/deploy/42_deploy_ufarmcore.ts +29 -0
  78. package/deploy/43_deploy_fund_beacon.ts +19 -0
  79. package/deploy/4_deploy_tokens.ts +76 -0
  80. package/deploy/50_deploy_poolFactory.ts +35 -0
  81. package/deploy/51_deploy_fundFactory.ts +29 -0
  82. package/deploy/60_init_contracts.ts +101 -0
  83. package/deploy/61_whitelist_tokens.ts +18 -0
  84. package/deploy/70_deploy_uniV2Controller.ts +70 -0
  85. package/deploy/71_deploy_uniV3Controller.ts +67 -0
  86. package/deploy/72_deploy_oneInchController.ts +25 -0
  87. package/deploy/79_whitelist_controllers.ts +125 -0
  88. package/deploy/ufarm/arbitrum/1_prepare_env.ts +82 -0
  89. package/deploy/ufarm/arbitrum/2_deploy_ufarm.ts +178 -0
  90. package/deploy/ufarm/arbitrum-sepolia/1000_prepare_arb_sepolia_env.ts +308 -0
  91. package/deploy-config.json +112 -0
  92. package/deploy-data/oracles.csv +32 -0
  93. package/deploy-data/protocols.csv +10 -0
  94. package/deploy-data/tokens.csv +32 -0
  95. package/docker-compose.yml +67 -0
  96. package/hardhat.config.ts +449 -0
  97. package/index.js +93 -0
  98. package/package.json +82 -0
  99. package/scripts/_deploy_helpers.ts +992 -0
  100. package/scripts/_deploy_network_options.ts +49 -0
  101. package/scripts/activatePool.ts +51 -0
  102. package/scripts/createPool.ts +62 -0
  103. package/scripts/deploy_1inch_proxy.ts +98 -0
  104. package/scripts/pool-data.ts +420 -0
  105. package/scripts/post-deploy.sh +24 -0
  106. package/scripts/setUniV2Rate.ts +252 -0
  107. package/scripts/swapOneInchV5.ts +94 -0
  108. package/scripts/swapUniswapV2.ts +65 -0
  109. package/scripts/swapUniswapV3.ts +71 -0
  110. package/scripts/test.ts +61 -0
  111. package/scripts/typings-copy-artifacts.ts +83 -0
  112. package/tasks/boostPool.ts +39 -0
  113. package/tasks/createFund.ts +44 -0
  114. package/tasks/deboostPool.ts +48 -0
  115. package/tasks/grantUFarmPermissions.ts +57 -0
  116. package/tasks/index.ts +7 -0
  117. package/tasks/mintUSDT.ts +62 -0
  118. package/test/Periphery.test.ts +640 -0
  119. package/test/PriceOracle.test.ts +82 -0
  120. package/test/TestCases.MD +109 -0
  121. package/test/UFarmCore.test.ts +331 -0
  122. package/test/UFarmFund.test.ts +406 -0
  123. package/test/UFarmPool.test.ts +4736 -0
  124. package/test/_fixtures.ts +783 -0
  125. package/test/_helpers.ts +2195 -0
  126. package/test/_oneInchTestData.ts +632 -0
  127. package/tsconfig.json +12 -0
@@ -0,0 +1,632 @@
1
+ // SPDX-License-Identifier: UNLICENSED
2
+
3
+ export const oneinchETHConstants = {
4
+ native_address: '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE',
5
+ usdt_address: '0xdac17f958d2ee523a2206206994597c13d831ec7',
6
+ weth_address: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
7
+ univ2_usdtweth: '0x0d4a11d5eeaac28ec3f61d100daf4d40471f1852',
8
+ eth_oneinch_routerv5_address: '0x1111111254eeb25477b68fb85ed929f73a960582',
9
+ swap: {
10
+ usdt100_weth: {
11
+ // USDT -> WETH
12
+ request: {
13
+ srcAsset: '0xdac17f958d2ee523a2206206994597c13d831ec7',
14
+ dstAsset: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
15
+ srcAmount: '1000000000000000000',
16
+ fromAddress: '0xda830142036BACE57F1b65Fc94DD42F1CDB03470',
17
+ toAddress: '0x95222290DD7278Aa3Ddd389Cc1E1d165CC4BAfe5',
18
+ chainId: 1,
19
+ },
20
+ response: {
21
+ toAmount: '54321717034358428',
22
+ tx: {
23
+ from: '0xda830142036BACE57F1b65Fc94DD42F1CDB03470',
24
+ to: '0x95222290DD7278Aa3Ddd389Cc1E1d165CC4BAfe5',
25
+ data: '0xf78dc25300000000000000000000000095222290dd7278aa3ddd389cc1e1d165cc4bafe5000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec70000000000000000000000000000000000000000000000000000000005f5e10000000000000000000000000000000000000000000000000000bf0f42bcf2affb00000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001c0000000000000003b6d03400d4a11d5eeaac28ec3f61d100daf4d40471f1852cfee7c08',
26
+ value: '0',
27
+ gas: '0',
28
+ gasPrice: '22423938298',
29
+ },
30
+ },
31
+ },
32
+ },
33
+ }
34
+
35
+ export const oneInchSupportedProtocols = {
36
+ protocols: [
37
+ {
38
+ id: 'UNISWAP_V1',
39
+ title: 'Uniswap V1',
40
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/uniswap.png',
41
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/uniswap_color.png',
42
+ },
43
+ {
44
+ id: 'UNISWAP_V2',
45
+ title: 'Uniswap V2',
46
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/uniswap.png',
47
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/uniswap_color.png',
48
+ },
49
+ {
50
+ id: 'SUSHI',
51
+ title: 'SushiSwap',
52
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/sushiswap.png',
53
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/sushiswap_color.png',
54
+ },
55
+ {
56
+ id: 'MOONISWAP',
57
+ title: 'Mooniswap',
58
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/mooniswap.png',
59
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/mooniswap_color.png',
60
+ },
61
+ {
62
+ id: 'BALANCER',
63
+ title: 'Balancer',
64
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/balancer.png',
65
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/balancer_color.png',
66
+ },
67
+ {
68
+ id: 'COMPOUND',
69
+ title: 'Compound',
70
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/compound.png',
71
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/compound_color.png',
72
+ },
73
+ {
74
+ id: 'CURVE',
75
+ title: 'Curve',
76
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/curve.png',
77
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/curve_color.png',
78
+ },
79
+ {
80
+ id: 'CURVE_V2_SPELL_2_ASSET',
81
+ title: 'Curve Spell',
82
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/curve.png',
83
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/curve_color.png',
84
+ },
85
+ {
86
+ id: 'CURVE_V2_SGT_2_ASSET',
87
+ title: 'Curve SGT',
88
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/curve.png',
89
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/curve_color.png',
90
+ },
91
+ {
92
+ id: 'CURVE_V2_THRESHOLDNETWORK_2_ASSET',
93
+ title: 'Curve Threshold',
94
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/curve.png',
95
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/curve_color.png',
96
+ },
97
+ {
98
+ id: 'CHAI',
99
+ title: 'Chai',
100
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/chai.png',
101
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/chai_color.png',
102
+ },
103
+ {
104
+ id: 'OASIS',
105
+ title: 'Oasis',
106
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/oasis.png',
107
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/oasis_color.png',
108
+ },
109
+ {
110
+ id: 'KYBER',
111
+ title: 'Kyber',
112
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/kyber.png',
113
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/kyber_color.png',
114
+ },
115
+ {
116
+ id: 'AAVE',
117
+ title: 'Aave',
118
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/aave.png',
119
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/aave_color.png',
120
+ },
121
+ {
122
+ id: 'IEARN',
123
+ title: 'yearn',
124
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/yearn.png',
125
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/yearn_color.png',
126
+ },
127
+ {
128
+ id: 'BANCOR',
129
+ title: 'Bancor',
130
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/bancor.png',
131
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/bancor_color.png',
132
+ },
133
+ {
134
+ id: 'SWERVE',
135
+ title: 'Swerve',
136
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/swerve.png',
137
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/swerve_color.png',
138
+ },
139
+ {
140
+ id: 'BLACKHOLESWAP',
141
+ title: 'BlackholeSwap',
142
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/blackholeswap.png',
143
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/blackholeswap_color.png',
144
+ },
145
+ {
146
+ id: 'DODO',
147
+ title: 'DODO',
148
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/dodo.png',
149
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/dodo_color.png',
150
+ },
151
+ {
152
+ id: 'DODO_V2',
153
+ title: 'DODO v2',
154
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/dodo.png',
155
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/dodo_color.png',
156
+ },
157
+ {
158
+ id: 'VALUELIQUID',
159
+ title: 'Value Liquid',
160
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/valueliquid.png',
161
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/valueliquid_color.png',
162
+ },
163
+ {
164
+ id: 'SHELL',
165
+ title: 'Shell',
166
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/shell.png',
167
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/shell_color.png',
168
+ },
169
+ {
170
+ id: 'DEFISWAP',
171
+ title: 'DeFi Swap',
172
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/defiswap.png',
173
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/defiswap_color.png',
174
+ },
175
+ {
176
+ id: 'SAKESWAP',
177
+ title: 'Sake Swap',
178
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/sakeswap.png',
179
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/sakeswap_color.png',
180
+ },
181
+ {
182
+ id: 'LUASWAP',
183
+ title: 'Lua Swap',
184
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/luaswap.png',
185
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/luaswap_color.png',
186
+ },
187
+ {
188
+ id: 'MINISWAP',
189
+ title: 'Mini Swap',
190
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/miniswap.png',
191
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/miniswap_color.png',
192
+ },
193
+ {
194
+ id: 'MSTABLE',
195
+ title: 'MStable',
196
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/mstable.png',
197
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/mstable_color.png',
198
+ },
199
+ {
200
+ id: 'PMM2',
201
+ title: 'PMM2',
202
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/pmm.png',
203
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/pmm_color.png',
204
+ },
205
+ {
206
+ id: 'SYNTHETIX',
207
+ title: 'Synthetix',
208
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/synthetix.png',
209
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/synthetix_color.png',
210
+ },
211
+ {
212
+ id: 'AAVE_V2',
213
+ title: 'Aave V2',
214
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/aave.png',
215
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/aave_color.png',
216
+ },
217
+ {
218
+ id: 'ST_ETH',
219
+ title: 'LiDo',
220
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/steth.png',
221
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/steth_color.png',
222
+ },
223
+ {
224
+ id: 'ONE_INCH_LP',
225
+ title: '1INCH LP v1.0',
226
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/1inch.png',
227
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/1inch_color.png',
228
+ },
229
+ {
230
+ id: 'ONE_INCH_LP_1_1',
231
+ title: '1INCH LP v1.1',
232
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/1inch.png',
233
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/1inch_color.png',
234
+ },
235
+ {
236
+ id: 'LINKSWAP',
237
+ title: 'LINKSWAP',
238
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/linkswap.png',
239
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/linkswap_color.png',
240
+ },
241
+ {
242
+ id: 'S_FINANCE',
243
+ title: 'sFinance',
244
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/sfinance.png',
245
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/sfinance_color.png',
246
+ },
247
+ {
248
+ id: 'PSM',
249
+ title: 'PSM USDC',
250
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/maker.png',
251
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/maker_color.png',
252
+ },
253
+ {
254
+ id: 'POWERINDEX',
255
+ title: 'POWERINDEX',
256
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/powerindex.png',
257
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/powerindex_color.png',
258
+ },
259
+ {
260
+ id: 'XSIGMA',
261
+ title: 'xSigma',
262
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/xsigma.png',
263
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/xsigma_color.png',
264
+ },
265
+ {
266
+ id: 'SMOOTHY_FINANCE',
267
+ title: 'Smoothy Finance',
268
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/smoothy.png',
269
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/smoothy_color.png',
270
+ },
271
+ {
272
+ id: 'SADDLE',
273
+ title: 'Saddle Finance',
274
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/saddle.png',
275
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/saddle_color.png',
276
+ },
277
+ {
278
+ id: 'KYBER_DMM',
279
+ title: 'Kyber DMM',
280
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/kyber.png',
281
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/kyber_color.png',
282
+ },
283
+ {
284
+ id: 'BALANCER_V2',
285
+ title: 'Balancer V2',
286
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/balancer.png',
287
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/balancer_color.png',
288
+ },
289
+ {
290
+ id: 'UNISWAP_V3',
291
+ title: 'Uniswap V3',
292
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/uniswap.png',
293
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/uniswap_color.png',
294
+ },
295
+ {
296
+ id: 'SETH_WRAPPER',
297
+ title: 'sETH Wrapper',
298
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/synthetix.png',
299
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/synthetix_color.png',
300
+ },
301
+ {
302
+ id: 'CURVE_V2',
303
+ title: 'Curve V2',
304
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/curve.png',
305
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/curve_color.png',
306
+ },
307
+ {
308
+ id: 'CURVE_V2_EURS_2_ASSET',
309
+ title: 'Curve V2 EURS',
310
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/curve.png',
311
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/curve_color.png',
312
+ },
313
+ {
314
+ id: 'CURVE_V2_ETH_CRV',
315
+ title: 'Curve V2 ETH CRV',
316
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/curve.png',
317
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/curve_color.png',
318
+ },
319
+ {
320
+ id: 'CURVE_V2_ETH_CVX',
321
+ title: 'Curve V2 ETH CVX',
322
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/curve.png',
323
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/curve_color.png',
324
+ },
325
+ {
326
+ id: 'CONVERGENCE_X',
327
+ title: 'Convergence X',
328
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/convergence.png',
329
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/convergence_color.png',
330
+ },
331
+ {
332
+ id: 'ONE_INCH_LIMIT_ORDER',
333
+ title: '1inch Limit Order Protocol',
334
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/1inch.png',
335
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/1inch_color.png',
336
+ },
337
+ {
338
+ id: 'ONE_INCH_LIMIT_ORDER_V2',
339
+ title: '1inch Limit Order Protocol V2',
340
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/1inch.png',
341
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/1inch_color.png',
342
+ },
343
+ {
344
+ id: 'ONE_INCH_LIMIT_ORDER_V3',
345
+ title: '1inch Limit Order Protocol V3',
346
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/1inch.png',
347
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/1inch_color.png',
348
+ },
349
+ {
350
+ id: 'DFX_FINANCE',
351
+ title: 'DFX Finance',
352
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/dfx.png',
353
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/dfx_color.png',
354
+ },
355
+ {
356
+ id: 'FIXED_FEE_SWAP',
357
+ title: 'Fixed Fee Swap',
358
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/1inch.png',
359
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/1inch_color.png',
360
+ },
361
+ {
362
+ id: 'DXSWAP',
363
+ title: 'Swapr',
364
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/swapr.png',
365
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/swapr_color.png',
366
+ },
367
+ {
368
+ id: 'SHIBASWAP',
369
+ title: 'ShibaSwap',
370
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/shiba.png',
371
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/shiba_color.png',
372
+ },
373
+ {
374
+ id: 'UNIFI',
375
+ title: 'Unifi',
376
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/unifi.png',
377
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/unifi_color.png',
378
+ },
379
+ {
380
+ id: 'PSM_PAX',
381
+ title: 'PSM USDP',
382
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/maker.png',
383
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/maker_color.png',
384
+ },
385
+ {
386
+ id: 'WSTETH',
387
+ title: 'wstETH',
388
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/steth.png',
389
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/steth_color.png',
390
+ },
391
+ {
392
+ id: 'DEFI_PLAZA',
393
+ title: 'DeFi Plaza',
394
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/defiplaza.png',
395
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/defiplaza_color.png',
396
+ },
397
+ {
398
+ id: 'FIXED_FEE_SWAP_V3',
399
+ title: 'Fixed Rate Swap',
400
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/1inch.png',
401
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/1inch_color.png',
402
+ },
403
+ {
404
+ id: 'SYNTHETIX_WRAPPER',
405
+ title: 'Wrapped Synthetix',
406
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/synthetix.png',
407
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/synthetix_color.png',
408
+ },
409
+ {
410
+ id: 'SYNAPSE',
411
+ title: 'Synapse',
412
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/synapse.png',
413
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/synapse_color.png',
414
+ },
415
+ {
416
+ id: 'CURVE_V2_YFI_2_ASSET',
417
+ title: 'Curve Yfi',
418
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/curve.png',
419
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/curve_color.png',
420
+ },
421
+ {
422
+ id: 'CURVE_V2_ETH_PAL',
423
+ title: 'Curve V2 ETH Pal',
424
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/curve.png',
425
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/curve_color.png',
426
+ },
427
+ {
428
+ id: 'POOLTOGETHER',
429
+ title: 'Pooltogether',
430
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/pooltogether.png',
431
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/pooltogether_color.png',
432
+ },
433
+ {
434
+ id: 'ETH_BANCOR_V3',
435
+ title: 'Bancor V3',
436
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/bancor.png',
437
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/bancor_color.png',
438
+ },
439
+ {
440
+ id: 'ELASTICSWAP',
441
+ title: 'ElasticSwap',
442
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/elastic_swap.png',
443
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/elastic_swap_color.png',
444
+ },
445
+ {
446
+ id: 'BALANCER_V2_WRAPPER',
447
+ title: 'Balancer V2 Aave Wrapper',
448
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/balancer.png',
449
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/balancer_color.png',
450
+ },
451
+ {
452
+ id: 'FRAXSWAP',
453
+ title: 'FraxSwap',
454
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/frax_swap.png',
455
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/frax_swap_color.png',
456
+ },
457
+ {
458
+ id: 'RADIOSHACK',
459
+ title: 'RadioShack',
460
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/radioshack.png',
461
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/radioshack_color.png',
462
+ },
463
+ {
464
+ id: 'KYBERSWAP_ELASTIC',
465
+ title: 'KyberSwap Elastic',
466
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/kyber.png',
467
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/kyber_color.png',
468
+ },
469
+ {
470
+ id: 'CURVE_V2_TWO_CRYPTO',
471
+ title: 'Curve V2 2Crypto',
472
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/curve.png',
473
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/curve_color.png',
474
+ },
475
+ {
476
+ id: 'STABLE_PLAZA',
477
+ title: 'Stable Plaza',
478
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/defiplaza.png',
479
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/defiplaza_color.png',
480
+ },
481
+ {
482
+ id: 'ZEROX_LIMIT_ORDER',
483
+ title: '0x Limit Order',
484
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/0x.png',
485
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/0x_color.png',
486
+ },
487
+ {
488
+ id: 'CURVE_3CRV',
489
+ title: 'Curve 3CRV',
490
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/curve.png',
491
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/curve_color.png',
492
+ },
493
+ {
494
+ id: 'KYBER_DMM_STATIC',
495
+ title: 'Kyber DMM Static',
496
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/kyber.png',
497
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/kyber_color.png',
498
+ },
499
+ {
500
+ id: 'ANGLE',
501
+ title: 'Angle',
502
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/angle.png',
503
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/angle_color.png',
504
+ },
505
+ {
506
+ id: 'ROCKET_POOL',
507
+ title: 'Rocket Pool',
508
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/rocketpool.png',
509
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/rocketpool_color.png',
510
+ },
511
+ {
512
+ id: 'ETHEREUM_ELK',
513
+ title: 'ELK',
514
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/elk.png',
515
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/elk_color.png',
516
+ },
517
+ {
518
+ id: 'ETHEREUM_PANCAKESWAP_V2',
519
+ title: 'Pancake Swap',
520
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/pancakeswap.png',
521
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/pancakeswap_color.png',
522
+ },
523
+ {
524
+ id: 'SYNTHETIX_ATOMIC_SIP288',
525
+ title: 'Synthetix Atomic SIP288',
526
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/synthetix.png',
527
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/synthetix_color.png',
528
+ },
529
+ {
530
+ id: 'PSM_GUSD',
531
+ title: 'PSM GUSD',
532
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/maker.png',
533
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/maker_color.png',
534
+ },
535
+ {
536
+ id: 'INTEGRAL',
537
+ title: 'Integral',
538
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/integral.png',
539
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/integral_color.png',
540
+ },
541
+ {
542
+ id: 'MAINNET_SOLIDLY',
543
+ title: 'Solidly',
544
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/solidly.png',
545
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/solidly_color.png',
546
+ },
547
+ {
548
+ id: 'NOMISWAP_STABLE',
549
+ title: 'Nomiswap Stable',
550
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/nomiswap.png',
551
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/nomiswap_color.png',
552
+ },
553
+ {
554
+ id: 'CURVE_V2_TWOCRYPTO_META',
555
+ title: 'Curve V2 2Crypto Meta',
556
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/curve.png',
557
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/curve_color.png',
558
+ },
559
+ {
560
+ id: 'MAVERICK_V1',
561
+ title: 'Maverick V1',
562
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/maverick.png',
563
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/maverick_color.png',
564
+ },
565
+ {
566
+ id: 'VERSE',
567
+ title: 'Verse',
568
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/verse.png',
569
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/verse_color.png',
570
+ },
571
+ {
572
+ id: 'DFX_FINANCE_V2',
573
+ title: 'DFX Finance V2',
574
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/dfx.png',
575
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/dfx_color.png',
576
+ },
577
+ {
578
+ id: 'ZK_BOB',
579
+ title: 'BobSwap',
580
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/zkbob.png',
581
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/zkbob_color.png',
582
+ },
583
+ {
584
+ id: 'PANCAKESWAP_V3',
585
+ title: 'Pancake Swap V3',
586
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/pancakeswap.png',
587
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/pancakeswap_color.png',
588
+ },
589
+ {
590
+ id: 'NOMISWAPEPCS',
591
+ title: 'Nomiswap-epcs',
592
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/nomiswap.png',
593
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/nomiswap_color.png',
594
+ },
595
+ {
596
+ id: 'XFAI',
597
+ title: 'Xfai',
598
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/xfai.png',
599
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/xfai_color.png',
600
+ },
601
+ {
602
+ id: 'CURVE_V2_LLAMMA',
603
+ title: 'Curve Llama',
604
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/curve.png',
605
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/curve_color.png',
606
+ },
607
+ {
608
+ id: 'CURVE_V2_TRICRYPTO_NG',
609
+ title: 'Curve 3Crypto',
610
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/curve.png',
611
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/curve_color.png',
612
+ },
613
+ {
614
+ id: 'PMM8_2',
615
+ title: 'PMM8_2',
616
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/pmm.png',
617
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/pmm_color.png',
618
+ },
619
+ {
620
+ id: 'SUSHISWAP_V3',
621
+ title: 'SushiSwap V3',
622
+ img: 'https://cdn.1inch.io/liquidity-sources-logo/sushiswap.png',
623
+ img_color: 'https://cdn.1inch.io/liquidity-sources-logo/sushiswap_color.png',
624
+ },
625
+ ],
626
+ }
627
+
628
+ export const oneInchProtocolsIds = oneInchSupportedProtocols.protocols.map(
629
+ (protocol) => protocol.id,
630
+ )
631
+
632
+ export const ufarmSupportsOneInchProtocols = ['UNISWAP_V2']
package/tsconfig.json ADDED
@@ -0,0 +1,12 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "es2020",
4
+ "module": "commonjs",
5
+ "esModuleInterop": true,
6
+ "forceConsistentCasingInFileNames": true,
7
+ "strict": true,
8
+ "skipLibCheck": true,
9
+ "resolveJsonModule": true,
10
+ },
11
+ "exclude": ["node_modules","ufarm-evm-typings"]
12
+ }