added deployment function for delegation aware aToken

This commit is contained in:
The3D 2020-11-02 13:22:26 +01:00
parent 3570fc7803
commit 473336955e

View File

@ -23,6 +23,7 @@ import {
ATokensAndRatesHelperFactory,
ChainlinkProxyPriceProviderFactory,
DefaultReserveInterestRateStrategyFactory,
DelegationAwareATokenFactory,
InitializableAdminUpgradeabilityProxyFactory,
LendingPoolAddressesProviderFactory,
LendingPoolAddressesProviderRegistryFactory,
@ -313,6 +314,32 @@ export const deployGenericAToken = async (
);
};
export const deployDelegationAwareAToken = async (
[poolAddress, underlyingAssetAddress, name, symbol, incentivesController]: [
tEthereumAddress,
tEthereumAddress,
string,
string,
tEthereumAddress
],
verify: boolean
) => {
const args: [
tEthereumAddress,
tEthereumAddress,
tEthereumAddress,
string,
string,
tEthereumAddress
] = [poolAddress, underlyingAssetAddress, ZERO_ADDRESS, name, symbol, incentivesController];
return withSaveAndVerify(
await new DelegationAwareATokenFactory(await getFirstSigner()).deploy(...args),
eContractid.AToken,
args,
verify
);
};
export const deployAllMockTokens = async (verify?: boolean) => {
const tokens: {[symbol: string]: MockContract | MintableERC20} = {};