From 9165cdc4d5f19ca8478e76dcabe3ada780840f3f Mon Sep 17 00:00:00 2001 From: The3D Date: Fri, 27 Nov 2020 18:18:31 +0100 Subject: [PATCH] Updated migration scripts for the reserve factor --- helpers/contracts-deployments.ts | 20 +++++++++++++------- helpers/init-helpers.ts | 4 ++-- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/helpers/contracts-deployments.ts b/helpers/contracts-deployments.ts index 0fa3daa3..3df53cdf 100644 --- a/helpers/contracts-deployments.ts +++ b/helpers/contracts-deployments.ts @@ -318,12 +318,12 @@ export const deployVariableDebtToken = async ( ); export const deployGenericAToken = async ( - [poolAddress, underlyingAssetAddress, name, symbol, treasuryAddress, incentivesController]: [ + [poolAddress, underlyingAssetAddress, treasuryAddress, name, symbol,incentivesController]: [ + tEthereumAddress, tEthereumAddress, tEthereumAddress, string, string, - tEthereumAddress, tEthereumAddress ], verify: boolean @@ -336,7 +336,7 @@ export const deployGenericAToken = async ( tEthereumAddress, tEthereumAddress - ] = [poolAddress, underlyingAssetAddress, name, symbol, treasuryAddress, incentivesController]; + ] = [poolAddress, underlyingAssetAddress, treasuryAddress, name, symbol, incentivesController]; return withSaveAndVerify( await new ATokenFactory(await getFirstSigner()).deploy(...args), eContractid.AToken, @@ -346,12 +346,12 @@ export const deployGenericAToken = async ( }; export const deployDelegationAwareAToken = async ( - [poolAddress, underlyingAssetAddress, name, symbol, treasuryAddress, incentivesController]: [ + [poolAddress, underlyingAssetAddress, treasuryAddress, name, symbol, incentivesController]: [ + tEthereumAddress, tEthereumAddress, tEthereumAddress, string, string, - tEthereumAddress, tEthereumAddress ], verify: boolean @@ -363,13 +363,19 @@ export const deployDelegationAwareAToken = async ( string, tEthereumAddress, tEthereumAddress - ] = [poolAddress, underlyingAssetAddress, name, symbol, treasuryAddress, incentivesController]; - return withSaveAndVerify( + ] = [poolAddress, underlyingAssetAddress, treasuryAddress, name, symbol, incentivesController]; + + const promise = withSaveAndVerify( await new DelegationAwareATokenFactory(await getFirstSigner()).deploy(...args), eContractid.DelegationAwareAToken, args, verify ); + + console.log("Done"); + + return promise; + }; export const deployAllMockTokens = async (verify?: boolean) => { diff --git a/helpers/init-helpers.ts b/helpers/init-helpers.ts index 266569b7..87b7da62 100644 --- a/helpers/init-helpers.ts +++ b/helpers/init-helpers.ts @@ -171,7 +171,7 @@ export const initReservesByHelper = async ( ) as [string, IReserveParams][]; for (let [symbol, params] of delegatedAwareReserves) { - console.log(` - Deploy ${symbol} delegation await aToken, debts tokens, and strategy`); + console.log(` - Deploy ${symbol} delegation aware aToken, debts tokens, and strategy`); const { optimalUtilizationRate, baseVariableBorrowRate, @@ -185,9 +185,9 @@ export const initReservesByHelper = async ( [ poolAddress, tokenAddresses[symbol], + treasuryAddress, `Aave interest bearing ${symbol}`, `a${symbol}`, - treasuryAddress, ZERO_ADDRESS, ], verify