Skip to content

Commit

Permalink
Add missing file
Browse files Browse the repository at this point in the history
  • Loading branch information
alsco77 committed Mar 18, 2021
1 parent 29a555b commit f0bc0a3
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions tasks/deployAaveIntegration.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/* eslint-disable no-console */
import "ts-node/register"
import "tsconfig-paths/register"

import { task } from "hardhat/config"
import { AaveV2Integration__factory } from "types/generated"

interface CommonAddresses {
nexus: string
mAsset: string
aave: string
}

task("deployAaveIntegration", "Deploys an instance of AaveV2Integration contract").setAction(async (_, hre) => {
const { ethers, network } = hre
const [deployer] = await ethers.getSigners()

if (network.name !== "mainnet") throw Error("Invalid network")

const addresses: CommonAddresses = {
mAsset: "0xe2f2a5C287993345a840Db3B0845fbC70f5935a5",
nexus: "0xAFcE80b19A8cE13DEc0739a1aaB7A028d6845Eb3",
aave: "0xB53C1a33016B2DC2fF3653530bfF1848a515c8c5",
}

// Deploy
const impl = await new AaveV2Integration__factory(deployer).deploy(addresses.nexus, addresses.mAsset, addresses.aave)
const reciept = await impl.deployTransaction.wait()
console.log(`Deployed Integration to ${impl.address}. gas used ${reciept.gasUsed}`)

// Complete setup
// - Set pToken addresses via governance
})

module.exports = {}

0 comments on commit f0bc0a3

Please sign in to comment.