1
1
const AaveAssetAdapter = artifacts . require ( 'AaveAssetAdapter' ) ;
2
2
const AaveDebtAdapter = artifacts . require ( 'AaveDebtAdapter' ) ;
3
+ const BalancerAdapter = artifacts . require ( 'BalancerAdapter' ) ;
3
4
const CompoundAssetAdapter = artifacts . require ( 'CompoundAssetAdapter' ) ;
4
5
const CompoundDebtAdapter = artifacts . require ( 'CompoundDebtAdapter' ) ;
5
6
const CurveAdapter = artifacts . require ( 'CurveAdapter' ) ;
@@ -18,6 +19,7 @@ const UniswapV1Adapter = artifacts.require('UniswapV1Adapter');
18
19
const ZrxAdapter = artifacts . require ( 'ZrxAdapter' ) ;
19
20
const ERC20TokenAdapter = artifacts . require ( 'ERC20TokenAdapter' ) ;
20
21
const AaveTokenAdapter = artifacts . require ( 'AaveTokenAdapter' ) ;
22
+ const BalancerTokenAdapter = artifacts . require ( 'BalancerTokenAdapter' ) ;
21
23
const CompoundTokenAdapter = artifacts . require ( 'CompoundTokenAdapter' ) ;
22
24
const CurveTokenAdapter = artifacts . require ( 'CurveTokenAdapter' ) ;
23
25
const IdleTokenAdapter = artifacts . require ( 'IdleTokenAdapter' ) ;
@@ -50,6 +52,7 @@ const tusdAddress = '0x0000000000085d4780B73119b644AE5ecd22b376';
50
52
const usdcAddress = '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48' ;
51
53
const usdtAddress = '0xdAC17F958D2ee523a2206206994597C13D831ec7' ;
52
54
const susdAddress = '0x57Ab1ec28D129707052df4dF418D58a2D46d5f51' ;
55
+ const busdAddress = '0x4Fabb145d64652a948d72533023f6E7A623C7C53' ;
53
56
const lendAddress = '0x80fB784B7eD66730e8b1DBd9820aFD29931aab03' ;
54
57
const batAddress = '0x0D8775F648430679A709E98d2b0Cb6250d2887EF' ;
55
58
const ethAddress = '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE' ;
@@ -125,6 +128,7 @@ const aaveDebtAdapterTokens = [
125
128
usdcAddress ,
126
129
usdtAddress ,
127
130
susdAddress ,
131
+ busdAddress ,
128
132
lendAddress ,
129
133
batAddress ,
130
134
ethAddress ,
@@ -210,46 +214,14 @@ const synthetixAssetAdapterTokens = [
210
214
const synthetixDebtAdapterTokens = [
211
215
susdAddress ,
212
216
] ;
213
- const uniswapV1AdapterTokens = [ // top 30 pools
214
- '0xe9cf7887b93150d4f2da7dfc6d502b216438f244' ,
215
- '0x05cde89ccfa0ada8c88d5a23caaa79ef129e7883' ,
216
- '0x2a1530c4c41db0b0b2bb646cb5eb1a67b7158667' ,
217
- '0x97dec872013f6b5fb443861090ad931542878126' ,
218
- '0x2c4bd064b998838076fa341a83d007fc2fa50957' ,
219
- '0xa2881a90bf33f03e7a3f803765cd2ed5c8928dfb' ,
220
- '0x3958b4ec427f8fa24eb60f42821760e88d485f7f' ,
221
- '0x4d2f5cfba55ae412221182d8475bc85799a5644b' ,
222
- '0x2e642b8d59b45a1d8c5aef716a84ff44ea665914' ,
223
- '0xf173214c720f58e03e194085b1db28b50acdeead' ,
224
- '0x93a8515d674c3d3235beea0de7ae3099aa34b1a5' ,
225
- '0x49c4f9bc14884f6210f28342ced592a633801a8b' ,
226
- '0xf506828b166de88ca2edb2a98d960abba0d2402a' ,
227
- '0xb944d13b2f4047fc7bd3f7013bcf01b115fb260d' ,
228
- '0x077d52b047735976dfda76fef74d4d988ac25196' ,
229
- '0x80324ec8d64425b37f8603a97097da7d493dbc79' ,
230
- '0x09cabec1ead1c0ba254b09efb3ee13841712be14' ,
231
- '0xa539baaa3aca455c986bb1e25301cef936ce1b65' ,
232
- '0x3fb2f18065926ddb33e7571475c509541d15da0e' ,
233
- '0x48b04d2a05b6b604d8d5223fd1984f191ded51af' ,
234
- '0xffcf45b540e6c9f094ae656d2e34ad11cdfdb187' ,
235
- '0xb6cfbf322db47d39331e306005dc7e5e6549942b' ,
236
- '0x8de0d002dc83478f479dc31f76cb0a8aa7ccea17' ,
237
- '0x4e395304655f0796bc3bc63709db72173b9ddf98' ,
238
- '0xae76c84c9262cdb9abc0c2c8888e62db8e22a0bf' ,
239
- '0x43892992b0b102459e895b88601bb2c76736942c' ,
240
- '0xf79cb3bea83bd502737586a6e8b133c378fd1ff2' ,
241
- '0xd91ff16ef92568fc27f466c3c5613e43313ab1dc' ,
242
- '0x2bf5a5ba29e60682fc56b2fcf9ce07bef4f6196f' ,
243
- '0xe8e45431b93215566ba923a7e611b7342ea954df' ,
244
- ] ;
245
217
const zrxAdapterTokens = [
246
218
zrxAddress ,
247
219
] ;
248
220
249
221
let protocolNames = [ ] ;
250
222
let metadata = [ ] ;
251
- let adapters = [ [ ] , [ ] , [ ] , [ ] , [ ] , [ ] , [ ] , [ ] , [ ] , [ ] , [ ] , [ ] , [ ] , [ ] ] ;
252
- let tokens = [ [ ] , [ ] , [ ] , [ ] , [ ] , [ ] , [ ] , [ ] , [ ] , [ ] , [ ] , [ ] , [ ] , [ ] ] ;
223
+ let adapters = [ [ ] , [ ] , [ ] , [ ] , [ ] , [ ] , [ ] , [ ] , [ ] , [ ] , [ ] , [ ] , [ ] , [ ] , [ ] ] ;
224
+ let tokens = [ [ ] , [ ] , [ ] , [ ] , [ ] , [ ] , [ ] , [ ] , [ ] , [ ] , [ ] , [ ] , [ ] , [ ] , [ ] ] ;
253
225
let tokenAdapters = [ ] ;
254
226
255
227
module . exports = async ( deployer , network , accounts ) => {
@@ -271,15 +243,28 @@ module.exports = async (deployer, network, accounts) => {
271
243
'protocol-icons.s3.amazonaws.com/aave.png' ,
272
244
'0' ,
273
245
] ) ;
246
+ await deployer . deploy ( BalancerAdapter , { from : accounts [ 0 ] } )
247
+ . then ( ( ) => {
248
+ adapters [ 1 ] . push ( BalancerAdapter . address ) ;
249
+ tokens [ 1 ] . push ( [ ] ) ;
250
+ } ) ;
251
+ protocolNames . push ( 'Balancer' ) ;
252
+ metadata . push ( [
253
+ 'Balancer' ,
254
+ 'Non-custodial portfolio manager, liquidity provider, and price sensor' ,
255
+ 'pools.balancer.exchange' ,
256
+ 'protocol-icons.s3.amazonaws.com/balancer.png' ,
257
+ '0' ,
258
+ ] ) ;
274
259
await deployer . deploy ( CompoundAssetAdapter , { from : accounts [ 0 ] } )
275
260
. then ( ( ) => {
276
- adapters [ 1 ] . push ( CompoundAssetAdapter . address ) ;
277
- tokens [ 1 ] . push ( compoundAssetAdapterTokens ) ;
261
+ adapters [ 2 ] . push ( CompoundAssetAdapter . address ) ;
262
+ tokens [ 2 ] . push ( compoundAssetAdapterTokens ) ;
278
263
} ) ;
279
264
await deployer . deploy ( CompoundDebtAdapter , { from : accounts [ 0 ] } )
280
265
. then ( ( ) => {
281
- adapters [ 1 ] . push ( CompoundDebtAdapter . address ) ;
282
- tokens [ 1 ] . push ( compoundDebtAdapterTokens ) ;
266
+ adapters [ 2 ] . push ( CompoundDebtAdapter . address ) ;
267
+ tokens [ 2 ] . push ( compoundDebtAdapterTokens ) ;
283
268
} ) ;
284
269
protocolNames . push ( 'Compound' ) ;
285
270
metadata . push ( [
@@ -291,8 +276,8 @@ module.exports = async (deployer, network, accounts) => {
291
276
] ) ;
292
277
await deployer . deploy ( CurveAdapter , { from : accounts [ 0 ] } )
293
278
. then ( ( ) => {
294
- adapters [ 2 ] . push ( CurveAdapter . address ) ;
295
- tokens [ 2 ] . push ( curveAdapterTokens ) ;
279
+ adapters [ 3 ] . push ( CurveAdapter . address ) ;
280
+ tokens [ 3 ] . push ( curveAdapterTokens ) ;
296
281
} ) ;
297
282
protocolNames . push ( 'Curve' ) ;
298
283
metadata . push ( [
@@ -304,13 +289,13 @@ module.exports = async (deployer, network, accounts) => {
304
289
] ) ;
305
290
await deployer . deploy ( DyDxAssetAdapter , { from : accounts [ 0 ] } )
306
291
. then ( ( ) => {
307
- adapters [ 3 ] . push ( DyDxAssetAdapter . address ) ;
308
- tokens [ 3 ] . push ( dydxAdapterTokens ) ;
292
+ adapters [ 4 ] . push ( DyDxAssetAdapter . address ) ;
293
+ tokens [ 4 ] . push ( dydxAdapterTokens ) ;
309
294
} ) ;
310
295
await deployer . deploy ( DyDxDebtAdapter , { from : accounts [ 0 ] } )
311
296
. then ( ( ) => {
312
- adapters [ 3 ] . push ( DyDxDebtAdapter . address ) ;
313
- tokens [ 3 ] . push ( dydxAdapterTokens ) ;
297
+ adapters [ 4 ] . push ( DyDxDebtAdapter . address ) ;
298
+ tokens [ 4 ] . push ( dydxAdapterTokens ) ;
314
299
} ) ;
315
300
protocolNames . push ( 'dYdX' ) ;
316
301
metadata . push ( [
@@ -322,8 +307,8 @@ module.exports = async (deployer, network, accounts) => {
322
307
] ) ;
323
308
await deployer . deploy ( IdleAdapter , { from : accounts [ 0 ] } )
324
309
. then ( ( ) => {
325
- adapters [ 4 ] . push ( IdleAdapter . address ) ;
326
- tokens [ 4 ] . push ( idleAdapterTokens ) ;
310
+ adapters [ 5 ] . push ( IdleAdapter . address ) ;
311
+ tokens [ 5 ] . push ( idleAdapterTokens ) ;
327
312
} ) ;
328
313
protocolNames . push ( 'Idle' ) ;
329
314
metadata . push ( [
@@ -335,8 +320,8 @@ module.exports = async (deployer, network, accounts) => {
335
320
] ) ;
336
321
await deployer . deploy ( IearnAdapter , { from : accounts [ 0 ] } )
337
322
. then ( ( ) => {
338
- adapters [ 5 ] . push ( IearnAdapter . address ) ;
339
- tokens [ 5 ] . push ( iearn2AdapterTokens ) ;
323
+ adapters [ 6 ] . push ( IearnAdapter . address ) ;
324
+ tokens [ 6 ] . push ( iearn2AdapterTokens ) ;
340
325
} ) ;
341
326
protocolNames . push ( 'iearn.finance (v2)' ) ;
342
327
metadata . push ( [
@@ -348,8 +333,8 @@ module.exports = async (deployer, network, accounts) => {
348
333
] ) ;
349
334
await deployer . deploy ( IearnAdapter , { from : accounts [ 0 ] } )
350
335
. then ( ( ) => {
351
- adapters [ 6 ] . push ( IearnAdapter . address ) ;
352
- tokens [ 6 ] . push ( iearn3AdapterTokens ) ;
336
+ adapters [ 7 ] . push ( IearnAdapter . address ) ;
337
+ tokens [ 7 ] . push ( iearn3AdapterTokens ) ;
353
338
} ) ;
354
339
protocolNames . push ( 'iearn.finance (v3)' ) ;
355
340
metadata . push ( [
@@ -361,8 +346,8 @@ module.exports = async (deployer, network, accounts) => {
361
346
] ) ;
362
347
await deployer . deploy ( ChaiAdapter , { from : accounts [ 0 ] } )
363
348
. then ( ( ) => {
364
- adapters [ 7 ] . push ( ChaiAdapter . address ) ;
365
- tokens [ 7 ] . push ( chaiAdapterTokens ) ;
349
+ adapters [ 8 ] . push ( ChaiAdapter . address ) ;
350
+ tokens [ 8 ] . push ( chaiAdapterTokens ) ;
366
351
} ) ;
367
352
protocolNames . push ( 'Chai' ) ;
368
353
metadata . push ( [
@@ -374,8 +359,8 @@ module.exports = async (deployer, network, accounts) => {
374
359
] ) ;
375
360
await deployer . deploy ( DSRAdapter , { from : accounts [ 0 ] } )
376
361
. then ( ( ) => {
377
- adapters [ 8 ] . push ( DSRAdapter . address ) ;
378
- tokens [ 8 ] . push ( dsrAdapterTokens ) ;
362
+ adapters [ 9 ] . push ( DSRAdapter . address ) ;
363
+ tokens [ 9 ] . push ( dsrAdapterTokens ) ;
379
364
} ) ;
380
365
protocolNames . push ( 'Dai Savings Rate' ) ;
381
366
metadata . push ( [
@@ -387,13 +372,13 @@ module.exports = async (deployer, network, accounts) => {
387
372
] ) ;
388
373
await deployer . deploy ( MCDAssetAdapter , { from : accounts [ 0 ] } )
389
374
. then ( ( ) => {
390
- adapters [ 9 ] . push ( MCDAssetAdapter . address ) ;
391
- tokens [ 9 ] . push ( mcdAssetAdapterTokens ) ;
375
+ adapters [ 10 ] . push ( MCDAssetAdapter . address ) ;
376
+ tokens [ 10 ] . push ( mcdAssetAdapterTokens ) ;
392
377
} ) ;
393
378
await deployer . deploy ( MCDDebtAdapter , { from : accounts [ 0 ] } )
394
379
. then ( ( ) => {
395
- adapters [ 9 ] . push ( MCDDebtAdapter . address ) ;
396
- tokens [ 9 ] . push ( mcdDebtAdapterTokens ) ;
380
+ adapters [ 10 ] . push ( MCDDebtAdapter . address ) ;
381
+ tokens [ 10 ] . push ( mcdDebtAdapterTokens ) ;
397
382
} ) ;
398
383
protocolNames . push ( 'Multi-Collateral Dai' ) ;
399
384
metadata . push ( [
@@ -405,8 +390,8 @@ module.exports = async (deployer, network, accounts) => {
405
390
] ) ;
406
391
await deployer . deploy ( PoolTogetherAdapter , { from : accounts [ 0 ] } )
407
392
. then ( ( ) => {
408
- adapters [ 10 ] . push ( PoolTogetherAdapter . address ) ;
409
- tokens [ 10 ] . push ( poolTogetherAdapterTokens ) ;
393
+ adapters [ 11 ] . push ( PoolTogetherAdapter . address ) ;
394
+ tokens [ 11 ] . push ( poolTogetherAdapterTokens ) ;
410
395
} ) ;
411
396
protocolNames . push ( 'PoolTogether' ) ;
412
397
metadata . push ( [
@@ -418,13 +403,13 @@ module.exports = async (deployer, network, accounts) => {
418
403
] ) ;
419
404
await deployer . deploy ( SynthetixAssetAdapter , { from : accounts [ 0 ] } )
420
405
. then ( ( ) => {
421
- adapters [ 11 ] . push ( SynthetixAssetAdapter . address ) ;
422
- tokens [ 11 ] . push ( synthetixAssetAdapterTokens ) ;
406
+ adapters [ 12 ] . push ( SynthetixAssetAdapter . address ) ;
407
+ tokens [ 12 ] . push ( synthetixAssetAdapterTokens ) ;
423
408
} ) ;
424
409
await deployer . deploy ( SynthetixDebtAdapter , { from : accounts [ 0 ] } )
425
410
. then ( ( ) => {
426
- adapters [ 11 ] . push ( SynthetixDebtAdapter . address ) ;
427
- tokens [ 11 ] . push ( synthetixDebtAdapterTokens ) ;
411
+ adapters [ 12 ] . push ( SynthetixDebtAdapter . address ) ;
412
+ tokens [ 12 ] . push ( synthetixDebtAdapterTokens ) ;
428
413
} ) ;
429
414
protocolNames . push ( 'Synthetix' ) ;
430
415
metadata . push ( [
@@ -436,8 +421,8 @@ module.exports = async (deployer, network, accounts) => {
436
421
] ) ;
437
422
await deployer . deploy ( UniswapV1Adapter , { from : accounts [ 0 ] } )
438
423
. then ( ( ) => {
439
- adapters [ 12 ] . push ( UniswapV1Adapter . address ) ;
440
- tokens [ 12 ] . push ( uniswapV1AdapterTokens ) ;
424
+ adapters [ 13 ] . push ( UniswapV1Adapter . address ) ;
425
+ tokens [ 13 ] . push ( [ ] ) ;
441
426
} ) ;
442
427
protocolNames . push ( 'Uniswap V1' ) ;
443
428
metadata . push ( [
@@ -449,8 +434,8 @@ module.exports = async (deployer, network, accounts) => {
449
434
] ) ;
450
435
await deployer . deploy ( ZrxAdapter , { from : accounts [ 0 ] } )
451
436
. then ( ( ) => {
452
- adapters [ 13 ] . push ( ZrxAdapter . address ) ;
453
- tokens [ 13 ] . push ( zrxAdapterTokens ) ;
437
+ adapters [ 14 ] . push ( ZrxAdapter . address ) ;
438
+ tokens [ 14 ] . push ( zrxAdapterTokens ) ;
454
439
} ) ;
455
440
protocolNames . push ( '0x Staking' ) ;
456
441
metadata . push ( [
@@ -460,6 +445,7 @@ module.exports = async (deployer, network, accounts) => {
460
445
'protocol-icons.s3.amazonaws.com/0x-staking.png' ,
461
446
'0' ,
462
447
] ) ;
448
+
463
449
await deployer . deploy ( ERC20TokenAdapter , { from : accounts [ 0 ] } )
464
450
. then ( ( ) => {
465
451
tokenAdapters . push (
@@ -472,6 +458,12 @@ module.exports = async (deployer, network, accounts) => {
472
458
AaveTokenAdapter . address ,
473
459
) ;
474
460
} ) ;
461
+ await deployer . deploy ( BalancerTokenAdapter , { from : accounts [ 0 ] } )
462
+ . then ( ( ) => {
463
+ tokenAdapters . push (
464
+ BalancerTokenAdapter . address ,
465
+ ) ;
466
+ } ) ;
475
467
await deployer . deploy ( CompoundTokenAdapter , { from : accounts [ 0 ] } )
476
468
. then ( ( ) => {
477
469
tokenAdapters . push (
@@ -530,6 +522,7 @@ module.exports = async (deployer, network, accounts) => {
530
522
[
531
523
'ERC20' ,
532
524
'AToken' ,
525
+ 'Balancer pool token' ,
533
526
'CToken' ,
534
527
'Curve pool token' ,
535
528
'IdleToken' ,
0 commit comments