1
- const { compoundExports2 } = require ( '../helper/compound' )
1
+ const { compoundExports2 } = require ( "../helper/compound" ) ;
2
+ const { mergeExports } = require ( "../helper/utils" ) ;
2
3
3
- const addresses = {
4
- polygon : {
5
- comptroller : '0x5B7136CFFd40Eee5B882678a5D02AA25A48d669F' ,
6
- cether : '0x7854D4Cfa7d0B877E399bcbDFfb49536d7A14fc7' ,
7
- } ,
8
- manta : {
9
- comptroller : '0x91e9e99AC7C39d5c057F83ef44136dFB1e7adD7d' ,
10
- cether : '0x8903Dc1f4736D2FcB90C1497AebBABA133DaAC76' ,
11
- } ,
12
- polygon_zkevm : {
13
- comptroller : "0x6EA32f626e3A5c41547235ebBdf861526e11f482" ,
14
- cether : "0xee1727f5074e747716637e1776b7f7c7133f16b1"
15
- }
16
- }
17
- module . exports = {
18
- polygon : compoundExports2 ( { ...addresses . polygon , } ) ,
19
- manta : compoundExports2 ( { ...addresses . manta , } ) ,
20
- polygon_zkevm : compoundExports2 ( { ...addresses . polygon_zkevm , } ) ,
4
+ const config = {
5
+ polygon_zkevm : [
6
+ {
7
+ comptroller : "0x6EA32f626e3A5c41547235ebBdf861526e11f482" ,
8
+ cether : "0xee1727f5074e747716637e1776b7f7c7133f16b1" ,
9
+ } ,
10
+ ] ,
11
+ polygon : [
12
+ {
13
+ comptroller : "0x5B7136CFFd40Eee5B882678a5D02AA25A48d669F" ,
14
+ cether : "0x7854D4Cfa7d0B877E399bcbDFfb49536d7A14fc7" ,
15
+ } ,
16
+ ] ,
17
+ manta : [
18
+ {
19
+ comptroller : "0x91e9e99AC7C39d5c057F83ef44136dFB1e7adD7d" ,
20
+ cether : "0x8903Dc1f4736D2FcB90C1497AebBABA133DaAC76" ,
21
+ } ,
22
+ {
23
+ comptroller : "0xBAc1e5A0B14490Dd0b32fE769eb5637183D8655d" ,
24
+ cether : "0xd773ffa79258F2D7458F1B74d075F4524Ee3CCa0" ,
25
+ } ,
26
+ ] ,
21
27
} ;
28
+
29
+ const data = [ ] ;
30
+
31
+ Object . values ( config ) . forEach ( ( chain , i ) => {
32
+ chain . forEach ( ( item ) => {
33
+ data . push ( { [ Object . keys ( config ) [ i ] ] : compoundExports2 ( item ) } ) ;
34
+ } ) ;
35
+ } ) ;
36
+
37
+ module . exports = mergeExports ( data ) ;
0 commit comments