@@ -3,7 +3,13 @@ import * as path from "path";
33import { providers } from "ethers" ;
44import { AaveProtocolDataProviderFactory } from "./contracts/AaveProtocolDataProviderFactory" ;
55const KEY = process . env . ALCHEMY_KEY ;
6- if ( KEY === "" ) throw new Error ( "ENV ALCHEMY KEY not configured" ) ;
6+ const POLYGON_ALCHEMY_KEY = process . env . POLYGON_ALCHEMY_KEY ;
7+ const MUMBAI_ALCHEMY_KEY = process . env . MUMBAI_ALCHEMY_KEY ;
8+ if ( KEY === "" || ! KEY ) throw new Error ( "ENV ALCHEMY KEY not configured" ) ;
9+ if ( POLYGON_ALCHEMY_KEY === "" || ! POLYGON_ALCHEMY_KEY )
10+ throw new Error ( "POLYGON_ALCHEMY_KEY ALCHEMY KEY not configured" ) ;
11+ if ( MUMBAI_ALCHEMY_KEY === "" || ! MUMBAI_ALCHEMY_KEY )
12+ throw new Error ( "MUMBAI_ALCHEMY_KEY ALCHEMY KEY not configured" ) ;
713// Get the main addreses from the DOC's https://docs.aave.com/developers/getting-started/deployed-contracts
814
915const NETWORKS_CONFIG = {
@@ -26,13 +32,20 @@ const NETWORKS_CONFIG = {
2632 protocolDataProviderAddress : "0x3c73a5e5785cac854d468f727c606c07488a29d6" ,
2733 } ,
2834 ] ,
29- matic : [
35+ polygon : [
3036 {
3137 market : "matic" ,
32- nodeUrl : `https://rpc -mainnet.matic.network ` ,
38+ nodeUrl : `https://polygon -mainnet.g.alchemy.com/v2/ ${ POLYGON_ALCHEMY_KEY } ` ,
3339 protocolDataProviderAddress : "0x7551b5D2763519d4e37e8B81929D336De671d46d" ,
3440 } ,
3541 ] ,
42+ mumbai : [
43+ {
44+ market : "matic" ,
45+ nodeUrl : `https://polygon-mumbai.g.alchemy.com/v2/${ MUMBAI_ALCHEMY_KEY } ` ,
46+ protocolDataProviderAddress : "0xFA3bD19110d986c5e5E9DD5F69362d05035D045B" ,
47+ } ,
48+ ] ,
3649} as const ;
3750
3851( async ( ) => {
0 commit comments