Skip to content

Commit b7a1e95

Browse files
authored
Merge pull request #3 from aave/feat/add-mumbai
feat: added mumbai network. added private alchemy keys for polygon an…
2 parents c408d4c + e23e698 commit b7a1e95

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

.github/workflows/release-ci.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ jobs:
2626
npm run build
2727
env:
2828
ALCHEMY_KEY: ${{ secrets.ALCHEMY_KEY }}
29+
POLYGON_ALCHEMY_KEY: ${{ secrets.POLYGON_ALCHEMY_KEY }}
30+
MUMBAI_ALCHEMY_KEY: ${{ secrets.MUMBAI_ALCHEMY_KEY }}
2931

3032
- name: Deploy 🚀
3133
uses: JamesIves/[email protected]

src/index.ts

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,13 @@ import * as path from "path";
33
import { providers } from "ethers";
44
import { AaveProtocolDataProviderFactory } from "./contracts/AaveProtocolDataProviderFactory";
55
const 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

915
const 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

Comments
 (0)