Merged feat/lp-market-updated-deployment

This commit is contained in:
Zer0dot 2021-02-23 10:59:02 -05:00
parent e3846332db
commit d41edec1ab
58 changed files with 74 additions and 83 deletions

View File

@ -8,8 +8,8 @@ import {
} from './types';
import { getParamPerPool } from './contracts-helpers';
import AaveConfig from '../markets/aave';
import LpConfig from '../markets/lp';
import MaticConfig from '../markets/matic';
import AmmConfig from '../markets/amm';
import { CommonsConfig } from '../markets/aave/commons';
import { DRE, filterMapBy } from './misc-utils';
import { tEthereumAddress } from './types';
@ -19,18 +19,18 @@ import { deployWETHMocked } from './contracts-deployments';
export enum ConfigNames {
Commons = 'Commons',
Aave = 'Aave',
Lp = 'Lp',
Matic = 'Matic',
Amm = 'Amm',
}
export const loadPoolConfig = (configName: ConfigNames): PoolConfiguration => {
switch (configName) {
case ConfigNames.Aave:
return AaveConfig;
case ConfigNames.Lp:
return LpConfig;
case ConfigNames.Matic:
return MaticConfig;
case ConfigNames.Amm:
return AmmConfig;
case ConfigNames.Commons:
return CommonsConfig;
default:
@ -48,8 +48,8 @@ export const getReservesConfigByPool = (pool: AavePools): iMultiPoolsAssets<IRes
[AavePools.proto]: {
...AaveConfig.ReservesConfig,
},
[AavePools.lp]: {
...LpConfig.ReservesConfig,
[AavePools.amm]: {
...AmmConfig.ReservesConfig,
},
[AavePools.matic]: {
...MaticConfig.ReservesConfig,

View File

@ -172,7 +172,7 @@ export const getPairsTokenAggregator = (
},
aggregatorsAddresses: { [tokenSymbol: string]: tEthereumAddress }
): [string[], string[]] => {
const { ETH, USD, WETH, LpWETH, ...assetsAddressesWithoutEth } = allAssetsAddresses;
const { ETH, USD, WETH, ...assetsAddressesWithoutEth } = allAssetsAddresses;
const pairs = Object.entries(assetsAddressesWithoutEth).map(([tokenSymbol, tokenAddress]) => {
//if (true/*tokenSymbol !== 'WETH' && tokenSymbol !== 'ETH' && tokenSymbol !== 'LpWETH'*/) {

View File

@ -179,12 +179,12 @@ export const getParamPerNetwork = <T>(param: iParamsPerNetwork<T>, network: eNet
}
};
export const getParamPerPool = <T>({ proto, lp }: iParamsPerPool<T>, pool: AavePools) => {
export const getParamPerPool = <T>({ proto, amm }: iParamsPerPool<T>, pool: AavePools) => {
switch (pool) {
case AavePools.proto:
return proto;
case AavePools.lp:
return lp;
case AavePools.amm:
return amm;
default:
return proto;
}

View File

@ -216,7 +216,7 @@ export const initReservesByHelper = async (
const chunkedInitInputParams = chunk(initInputParams, initChunks);
const configurator = await getLendingPoolConfiguratorProxy();
await waitForTx(await addressProvider.setPoolAdmin(admin));
//await waitForTx(await addressProvider.setPoolAdmin(admin));
console.log(`- Reserves initialization in ${chunkedInitInputParams.length} txs`);
for (let chunkIndex = 0; chunkIndex < chunkedInitInputParams.length; chunkIndex++) {
@ -386,7 +386,7 @@ export const initTokenReservesByHelper = async (
const poolAddress = await addressProvider.getLendingPool();
// Set aTokenAndRatesDeployer as temporal admin
await waitForTx(await addressProvider.setPoolAdmin(atokenAndRatesDeployer.address));
//await waitForTx(await addressProvider.setPoolAdmin(atokenAndRatesDeployer.address));
// CHUNK CONFIGURATION
const initChunks = 4;
@ -562,7 +562,7 @@ export const initTokenReservesByHelper = async (
const chunkedInitInputParams = chunk(initInputParams, initChunks);
const configurator = await getLendingPoolConfiguratorProxy();
await waitForTx(await addressProvider.setPoolAdmin(admin));
//await waitForTx(await addressProvider.setPoolAdmin(admin));
console.log(`- Reserves initialization in ${chunkedInitInputParams.length} txs`);
for (let chunkIndex = 0; chunkIndex < chunkedInitInputParams.length; chunkIndex++) {
@ -575,8 +575,8 @@ export const initTokenReservesByHelper = async (
}
// Set deployer back as admin
await waitForTx(await addressProvider.setPoolAdmin(admin));
return gasUsage; // No longer relevant
//await waitForTx(await addressProvider.setPoolAdmin(admin));
return gasUsage; // No longer relevant
};
// Function deprecated

View File

@ -36,8 +36,8 @@ export enum EthereumNetworkNames {
export enum AavePools {
proto = 'proto',
lp = 'lp',
matic = 'matic',
amm = 'amm',
}
export enum eContractid {
@ -220,11 +220,6 @@ export interface iAssetBase<T> {
USD: T;
REN: T;
ENJ: T;
// LpWETH: T;
// LpWBTC: T;
// LpDAI: T;
// LpUSDC: T;
// LpUSDT: T;
UniDAIWETH: T;
UniWBTCWETH: T;
UniAAVEWETH: T;
@ -334,11 +329,6 @@ export enum TokenContractId {
YFI = 'YFI',
UNI = 'UNI',
ENJ = 'ENJ',
// LpWETH = 'LpWETH',
// LpWBTC = 'LpWBTC',
// LpDAI = 'LpDAI',
// LpUSDC = 'LpUSDC',
// LpUSDT = 'LpUSDT',
UniDAIWETH = 'UniDAIWETH',
UniWBTCWETH = 'UniWBTCWETH',
UniAAVEWETH = 'UniAAVEWETH',
@ -426,8 +416,8 @@ export interface iXDaiParamsPerNetwork<T> {
export interface iParamsPerPool<T> {
[AavePools.proto]: T;
[AavePools.lp]: T;
[AavePools.matic]: T;
[AavePools.amm]: T;
}
export interface iBasicDistributionParams {
@ -502,7 +492,7 @@ export interface IAaveConfiguration extends ICommonConfiguration {
ReservesConfig: iAavePoolAssets<IReserveParams>;
}
export interface ILpConfiguration extends ICommonConfiguration {
export interface IAmmConfiguration extends ICommonConfiguration {
ReservesConfig: iLpPoolAssets<IReserveParams>;
}

View File

@ -1,5 +1,5 @@
import { oneRay, ZERO_ADDRESS } from '../../helpers/constants';
import { ILpConfiguration, eEthereumNetwork } from '../../helpers/types';
import { IAmmConfiguration, eEthereumNetwork } from '../../helpers/types';
import { CommonsConfig } from './commons';
import {
@ -28,9 +28,9 @@ import {
// POOL--SPECIFIC PARAMS
// ----------------
export const lpConfig: ILpConfiguration = {
export const AmmConfig: IAmmConfiguration = {
...CommonsConfig,
MarketId: 'Aave LP market',
MarketId: 'Aave AMM market',
ProviderId: 2,
ReservesConfig: {
WETH: strategyWETH,
@ -129,4 +129,4 @@ export const lpConfig: ILpConfiguration = {
},
};
export default lpConfig;
export default AmmConfig;

View File

@ -3,8 +3,8 @@ import { oneRay } from '../../helpers/constants';
import { IInterestRateStrategyParams } from '../../helpers/types';
// DAIWETH WBTCWETH AAVEWETH BATWETH USDCDAI CRVWETH LINKWETH MKRWETH RENWETH SNXWETH UNIWETH USDCWETH WBTCUSDC YFIWETH
export const rateStrategyLpBase: IInterestRateStrategyParams = {
name: "rateStrategyLpBase",
export const rateStrategyAmmBase: IInterestRateStrategyParams = {
name: "rateStrategyAmmBase",
optimalUtilizationRate: new BigNumber(0.45).multipliedBy(oneRay).toFixed(),
baseVariableBorrowRate: new BigNumber(0.03).multipliedBy(oneRay).toFixed(),
variableRateSlope1: new BigNumber(0.10).multipliedBy(oneRay).toFixed(),

View File

@ -1,6 +1,6 @@
import { eContractid, IReserveParams} from '../../helpers/types';
import {
rateStrategyLpBase,
rateStrategyAmmBase,
rateStrategyStable,
rateStrategyBaseOne,
} from './rateStrategies';
@ -67,7 +67,7 @@ export const strategyUSDT: IReserveParams = {
};
export const strategyDAIWETH: IReserveParams = {
strategy: rateStrategyLpBase,
strategy: rateStrategyAmmBase,
baseLTVAsCollateral: '6000',
liquidationThreshold: '7000',
liquidationBonus: '11500',
@ -79,7 +79,7 @@ export const strategyDAIWETH: IReserveParams = {
};
export const strategyWBTCWETH: IReserveParams = {
strategy: rateStrategyLpBase,
strategy: rateStrategyAmmBase,
baseLTVAsCollateral: '6000',
liquidationThreshold: '7000',
liquidationBonus: '11500',
@ -91,7 +91,7 @@ export const strategyWBTCWETH: IReserveParams = {
};
export const strategyAAVEWETH: IReserveParams = {
strategy: rateStrategyLpBase,
strategy: rateStrategyAmmBase,
baseLTVAsCollateral: '6000',
liquidationThreshold: '7000',
liquidationBonus: '11500',
@ -103,7 +103,7 @@ export const strategyAAVEWETH: IReserveParams = {
};
export const strategyBATWETH: IReserveParams = {
strategy: rateStrategyLpBase,
strategy: rateStrategyAmmBase,
baseLTVAsCollateral: '6000',
liquidationThreshold: '7000',
liquidationBonus: '11500',
@ -115,7 +115,7 @@ export const strategyBATWETH: IReserveParams = {
};
export const strategyUSDCDAI: IReserveParams = {
strategy: rateStrategyLpBase,
strategy: rateStrategyAmmBase,
baseLTVAsCollateral: '6000',
liquidationThreshold: '7000',
liquidationBonus: '11500',
@ -127,7 +127,7 @@ export const strategyUSDCDAI: IReserveParams = {
};
export const strategyCRVWETH: IReserveParams = {
strategy: rateStrategyLpBase,
strategy: rateStrategyAmmBase,
baseLTVAsCollateral: '5000',
liquidationThreshold: '6000',
liquidationBonus: '11500',
@ -139,7 +139,7 @@ export const strategyCRVWETH: IReserveParams = {
};
export const strategyLINKWETH: IReserveParams = {
strategy: rateStrategyLpBase,
strategy: rateStrategyAmmBase,
baseLTVAsCollateral: '6000',
liquidationThreshold: '7000',
liquidationBonus: '11500',
@ -151,7 +151,7 @@ export const strategyLINKWETH: IReserveParams = {
};
export const strategyMKRWETH: IReserveParams = {
strategy: rateStrategyLpBase,
strategy: rateStrategyAmmBase,
baseLTVAsCollateral: '6000',
liquidationThreshold: '7000',
liquidationBonus: '11500',
@ -163,7 +163,7 @@ export const strategyMKRWETH: IReserveParams = {
};
export const strategyRENWETH: IReserveParams = {
strategy: rateStrategyLpBase,
strategy: rateStrategyAmmBase,
baseLTVAsCollateral: '6000',
liquidationThreshold: '7000',
liquidationBonus: '11500',
@ -175,7 +175,7 @@ export const strategyRENWETH: IReserveParams = {
};
export const strategySNXWETH: IReserveParams = {
strategy: rateStrategyLpBase,
strategy: rateStrategyAmmBase,
baseLTVAsCollateral: '4000',
liquidationThreshold: '6000',
liquidationBonus: '11500',
@ -187,7 +187,7 @@ export const strategySNXWETH: IReserveParams = {
};
export const strategyUNIWETH: IReserveParams = {
strategy: rateStrategyLpBase,
strategy: rateStrategyAmmBase,
baseLTVAsCollateral: '6000',
liquidationThreshold: '7000',
liquidationBonus: '11500',
@ -199,7 +199,7 @@ export const strategyUNIWETH: IReserveParams = {
};
export const strategyUSDCWETH: IReserveParams = {
strategy: rateStrategyLpBase,
strategy: rateStrategyAmmBase,
baseLTVAsCollateral: '6000',
liquidationThreshold: '7000',
liquidationBonus: '11500',
@ -211,7 +211,7 @@ export const strategyUSDCWETH: IReserveParams = {
};
export const strategyWBTCUSDC: IReserveParams = {
strategy: rateStrategyLpBase,
strategy: rateStrategyAmmBase,
baseLTVAsCollateral: '6000',
liquidationThreshold: '7000',
liquidationBonus: '11500',
@ -223,7 +223,7 @@ export const strategyWBTCUSDC: IReserveParams = {
};
export const strategyYFIWETH: IReserveParams = {
strategy: rateStrategyLpBase,
strategy: rateStrategyAmmBase,
baseLTVAsCollateral: '5000',
liquidationThreshold: '6000',
liquidationBonus: '11500',

8
package-lock.json generated
View File

@ -27128,7 +27128,7 @@
"requires": {
"underscore": "1.9.1",
"web3-core-helpers": "1.2.1",
"websocket": "github:web3-js/WebSocket-Node#polyfill/globalThis"
"websocket": "websocket@github:web3-js/WebSocket-Node#polyfill/globalThis"
}
},
"web3-shh": {
@ -39846,7 +39846,7 @@
"integrity": "sha1-jZWCAsftuq6Dlwf7pvCf8ydgYhA=",
"dev": true,
"requires": {
"ethereumjs-abi": "git+https://github.com/ethereumjs/ethereumjs-abi.git",
"ethereumjs-abi": "ethereumjs-abi@git+https://github.com/ethereumjs/ethereumjs-abi.git",
"ethereumjs-util": "^5.1.1"
}
},
@ -46846,7 +46846,7 @@
"eth-lib": "0.2.7",
"ethereumjs-common": "^1.3.2",
"ethereumjs-tx": "^2.1.1",
"scrypt-shim": "github:web3-js/scrypt-shim",
"scrypt-shim": "scrypt-shim@github:web3-js/scrypt-shim",
"underscore": "1.9.1",
"uuid": "3.3.2",
"web3-core": "1.2.2",
@ -47176,7 +47176,7 @@
"requires": {
"underscore": "1.9.1",
"web3-core-helpers": "1.2.2",
"websocket": "github:web3-js/WebSocket-Node#polyfill/globalThis"
"websocket": "websocket@github:web3-js/WebSocket-Node#polyfill/globalThis"
}
},
"web3-shh": {

View File

@ -19,8 +19,8 @@
"compile": "SKIP_LOAD=true hardhat compile",
"console:fork": "MAINNET_FORK=true hardhat console",
"test": "TS_NODE_TRANSPILE_ONLY=1 hardhat test ./test-suites/test-aave/*.spec.ts",
"test-lp": "TS_NODE_TRANSPILE_ONLY=1 hardhat test ./test-suites/test-lp/*.spec.ts",
"test-lp-scenarios": "TS_NODE_TRANSPILE_ONLY=1 hardhat test ./test-suites/test-lp/__setup.spec.ts test-suites/test-lp/scenario.spec.ts",
"test-amm": "TS_NODE_TRANSPILE_ONLY=1 hardhat test ./test-suites/test-amm/*.spec.ts",
"test-amm-scenarios": "TS_NODE_TRANSPILE_ONLY=1 hardhat test ./test-suites/test-amm/__setup.spec.ts test-suites/test-amm/scenario.spec.ts",
"test-scenarios": "npx hardhat test test-suites/test-aave/__setup.spec.ts test-suites/test-aave/scenario.spec.ts",
"test-repay-with-collateral": "hardhat test test-suites/test-aave/__setup.spec.ts test-suites/test-aave/repay-with-collateral.spec.ts",
"test-liquidate-with-collateral": "hardhat test test-suites/test-aave/__setup.spec.ts test-suites/test-aave/flash-liquidation-with-collateral.spec.ts",
@ -35,21 +35,21 @@
"test-stable-and-atokens": "hardhat test test-suites/test-aave/__setup.spec.ts test-suites/test-aave/atoken-transfer.spec.ts test-suites/test-aave/stable-token.spec.ts",
"test-subgraph:scenarios": "hardhat --network hardhatevm_docker test test-suites/test-aave/__setup.spec.ts test-suites/test-aave/subgraph-scenarios.spec.ts",
"test-weth:main": "hardhat test test-suites/test-aave/__setup.spec.ts test-suites/test-aave/weth-gateway.spec.ts",
"test-weth:lp": "hardhat test test-suites/test-lp/__setup.spec.ts test-suites/test-lp/weth-gateway.spec.ts",
"test-weth:amm": "hardhat test test-suites/test-amm/__setup.spec.ts test-suites/test-amm/weth-gateway.spec.ts",
"test-uniswap": "hardhat test test-suites/test-aave/__setup.spec.ts test-suites/test-aave/uniswapAdapters*.spec.ts",
"test:main:check-list": "MAINNET_FORK=true TS_NODE_TRANSPILE_ONLY=1 hardhat test test-suites/test-aave/__setup.spec.ts test-suites/test-aave/mainnet/check-list.spec.ts",
"dev:coverage": "buidler compile --force && buidler coverage --network coverage",
"aave:evm:dev:migration": "npm run compile && hardhat aave:dev",
"aave:docker:full:migration": "npm run compile && npm run hardhat:docker -- aave:mainnet",
"aave:kovan:full:migration": "npm run compile && npm run hardhat:kovan -- aave:mainnet --verify",
"lp:kovan:full:migration": "npm run compile && npm run hardhat:kovan -- lp:mainnet --verify",
"matic:mumbai:full:migration": "npm run compile && npm run hardhat:mumbai matic:mainnet",
"matic:matic:full:migration": "npm run compile && npm run hardhat:matic matic:mainnet",
"amm:kovan:full:migration": "npm run compile && npm run hardhat:kovan -- amm:mainnet --verify",
"aave:kovan:full:initialize": "npm run hardhat:kovan -- full:initialize-lending-pool --verify --pool Aave",
"aave:ropsten:full:migration": "npm run compile && npm run hardhat:ropsten -- aave:mainnet --verify",
"aave:fork:main:tenderly": "npm run compile && npm run hardhat:tenderly-main -- aave:mainnet",
"aave:fork:main": "npm run compile && MAINNET_FORK=true hardhat aave:mainnet",
"lp:fork:main": "npm run compile && MAINNET_FORK=true hardhat lp:mainnet",
"amm:fork:main": "npm run compile && MAINNET_FORK=true hardhat amm:mainnet",
"aave:main:full:migration": "npm run compile && npm run hardhat:main -- aave:mainnet --verify",
"aave:main:full:initialize": "npm run compile && MAINNET_FORK=true full:initialize-tokens --pool Aave",
"prettier:check": "npx prettier -c 'tasks/**/*.ts' 'contracts/**/*.sol' 'helpers/**/*.ts' 'test-suites/test-aave/**/*.ts'",

View File

@ -25,7 +25,7 @@ task('full:deploy-lending-pool', 'Deploy lending pool for dev enviroment')
const network = <eNetwork>DRE.network.name;
const poolConfig = loadPoolConfig(pool);
const addressesProvider = await getLendingPoolAddressesProvider();
const { LendingPool, LendingPoolConfigurator } = poolConfig;
// Reuse/deploy lending pool implementation

View File

@ -4,10 +4,10 @@ import { ConfigNames } from '../../helpers/configuration';
import { printContracts } from '../../helpers/misc-utils';
import { usingTenderly } from '../../helpers/tenderly-utils';
task('lp:mainnet', 'Deploy development enviroment')
task('amm:mainnet', 'Deploy development enviroment')
.addFlag('verify', 'Verify contracts at Etherscan')
.setAction(async ({ verify }, DRE) => {
const POOL_NAME = ConfigNames.Lp;
const POOL_NAME = ConfigNames.Amm;
await DRE.run('set-DRE');
// Prevent loss of gas verifying all the needed ENVs for Etherscan verification

View File

@ -28,6 +28,7 @@ import {
deployFlashLiquidationAdapter,
authorizeWETHGateway,
} from '../../helpers/contracts-deployments';
import { eEthereumNetwork } from '../../helpers/types';
import { Signer } from 'ethers';
import { TokenContractId, eContractid, tEthereumAddress, AavePools } from '../../helpers/types';
import { MintableERC20 } from '../../types/MintableERC20';

View File

@ -46,7 +46,7 @@ import {
} from '../../helpers/oracles-helpers';
import { DRE, waitForTx } from '../../helpers/misc-utils';
import { initReservesByHelper, configureReservesByHelper } from '../../helpers/init-helpers';
import LpConfig from '../../markets/lp';
import AmmConfig from '../../markets/amm';
import { ZERO_ADDRESS } from '../../helpers/constants';
import {
getLendingPool,
@ -55,16 +55,16 @@ import {
} from '../../helpers/contracts-getters';
import { WETH9Mocked } from '../../types/WETH9Mocked';
const MOCK_USD_PRICE_IN_WEI = LpConfig.ProtocolGlobalParams.MockUsdPriceInWei;
const ALL_ASSETS_INITIAL_PRICES = LpConfig.Mocks.AllAssetsInitialPrices;
const USD_ADDRESS = LpConfig.ProtocolGlobalParams.UsdAddress;
const MOCK_CHAINLINK_AGGREGATORS_PRICES = LpConfig.Mocks.AllAssetsInitialPrices;
const LENDING_RATE_ORACLE_RATES_COMMON = LpConfig.LendingRateOracleRatesCommon;
const MOCK_USD_PRICE_IN_WEI = AmmConfig.ProtocolGlobalParams.MockUsdPriceInWei;
const ALL_ASSETS_INITIAL_PRICES = AmmConfig.Mocks.AllAssetsInitialPrices;
const USD_ADDRESS = AmmConfig.ProtocolGlobalParams.UsdAddress;
const MOCK_CHAINLINK_AGGREGATORS_PRICES = AmmConfig.Mocks.AllAssetsInitialPrices;
const LENDING_RATE_ORACLE_RATES_COMMON = AmmConfig.LendingRateOracleRatesCommon;
const deployAllMockTokens = async (deployer: Signer) => {
const tokens: { [symbol: string]: MockContract | MintableERC20 | WETH9Mocked } = {};
const lpConfigData = getReservesConfigByPool(AavePools.lp);
const ammConfigData = getReservesConfigByPool(AavePools.amm);
for (const tokenSymbol of Object.keys(TokenContractId)) {
if (tokenSymbol === 'WETH') {
@ -74,7 +74,7 @@ const deployAllMockTokens = async (deployer: Signer) => {
}
let decimals = 18;
let configData = (<any>lpConfigData)[tokenSymbol];
let configData = (<any>ammConfigData)[tokenSymbol];
if (!configData) {
decimals = 18;
@ -97,7 +97,7 @@ const buildTestEnv = async (deployer: Signer, secondaryWallet: Signer) => {
const mockTokens = await deployAllMockTokens(deployer);
const addressesProvider = await deployLendingPoolAddressesProvider(LpConfig.MarketId);
const addressesProvider = await deployLendingPoolAddressesProvider(AmmConfig.MarketId);
await waitForTx(await addressesProvider.setPoolAdmin(aaveAdmin));
//setting users[1] as emergency admin, which is in position 2 in the DRE addresses list
@ -229,7 +229,7 @@ const buildTestEnv = async (deployer: Signer, secondaryWallet: Signer) => {
aaveAdmin
);
const reservesParams = getReservesConfigByPool(AavePools.lp);
const reservesParams = getReservesConfigByPool(AavePools.amm);
const testHelpers = await deployAaveProtocolDataProvider(addressesProvider.address);
@ -238,7 +238,7 @@ const buildTestEnv = async (deployer: Signer, secondaryWallet: Signer) => {
console.log('Initialize configuration');
const config = loadPoolConfig(ConfigNames.Lp);
const config = loadPoolConfig(ConfigNames.Amm);
const {
ATokenNamePrefix,
@ -294,7 +294,7 @@ before(async () => {
const MAINNET_FORK = process.env.MAINNET_FORK === 'true';
if (MAINNET_FORK) {
await rawBRE.run('lp:mainnet');
await rawBRE.run('amm:mainnet');
} else {
console.log('-> Deploying test environment...');
await buildTestEnv(deployer, secondaryWallet);

View File

@ -4,7 +4,7 @@ import { expect } from 'chai';
import { ethers } from 'ethers';
import { RateMode, ProtocolErrors } from '../../helpers/types';
import { makeSuite, TestEnv } from './helpers/make-suite';
import { CommonsConfig } from '../../markets/lp/commons';
import { CommonsConfig } from '../../markets/amm/commons';
const AAVE_REFERRAL = CommonsConfig.ProtocolGlobalParams.AaveReferral;

View File

@ -2,7 +2,7 @@ import { TestEnv, makeSuite } from './helpers/make-suite';
import { APPROVAL_AMOUNT_LENDING_POOL, RAY } from '../../helpers/constants';
import { convertToCurrencyDecimals } from '../../helpers/contracts-helpers';
import { ProtocolErrors } from '../../helpers/types';
import { strategyWETH } from '../../markets/lp/reservesConfigs';
import { strategyWETH } from '../../markets/amm/reservesConfigs';
const { expect } = require('chai');

View File

@ -20,7 +20,7 @@ import {
import { DelegationAwareATokenFactory } from '../../types';
import { DelegationAwareAToken } from '../../types/DelegationAwareAToken';
import { MintableDelegationERC20 } from '../../types/MintableDelegationERC20';
import LpConfig from '../../markets/lp';
import AmmConfig from '../../markets/amm';
const { parseEther } = ethers.utils;
@ -35,7 +35,7 @@ makeSuite('AToken: underlying delegation', (testEnv: TestEnv) => {
delegationERC20 = await deployMintableDelegationERC20(['DEL', 'DEL', '18']);
delegationAToken = await deployDelegationAwareAToken(
[pool.address, delegationERC20.address, await getTreasuryAddress(LpConfig), ZERO_ADDRESS, 'aDEL', 'aDEL'],
[pool.address, delegationERC20.address, await getTreasuryAddress(AmmConfig), ZERO_ADDRESS, 'aDEL', 'aDEL'],
false
);

View File

@ -36,7 +36,7 @@ import { getParamPerNetwork } from '../../../helpers/contracts-helpers';
import { WETH9Mocked } from '../../../types/WETH9Mocked';
import { WETHGateway } from '../../../types/WETHGateway';
import { solidity } from 'ethereum-waffle';
import { lpConfig } from '../../../markets/lp';
import { AmmConfig } from '../../../markets/amm';
import { FlashLiquidationAdapter } from '../../../types';
import { HardhatRuntimeEnvironment } from 'hardhat/types';
import { usingTenderly } from '../../../helpers/tenderly-utils';
@ -118,7 +118,7 @@ export async function initializeMakeSuite() {
if (process.env.MAINNET_FORK === 'true') {
testEnv.registry = await getLendingPoolAddressesProviderRegistry(
getParamPerNetwork(lpConfig.ProviderRegistry, eEthereumNetwork.main)
getParamPerNetwork(AmmConfig.ProviderRegistry, eEthereumNetwork.main)
);
} else {
testEnv.registry = await getLendingPoolAddressesProviderRegistry();

View File

@ -7,7 +7,7 @@ import { makeSuite } from './helpers/make-suite';
import { ProtocolErrors, RateMode } from '../../helpers/types';
import { calcExpectedVariableDebtTokenBalance } from './helpers/utils/calculations';
import { getReserveData, getUserData } from './helpers/utils/helpers';
import { CommonsConfig } from '../../markets/lp/commons';
import { CommonsConfig } from '../../markets/amm/commons';
import { parseEther } from 'ethers/lib/utils';

View File

@ -8,7 +8,7 @@ import { getReservesConfigByPool } from '../../helpers/configuration';
import { AavePools, iLpPoolAssets, IReserveParams } from '../../helpers/types';
import { executeStory } from './helpers/scenario-engine';
const scenarioFolder = './test-suites/test-lp/helpers/scenarios/';
const scenarioFolder = './test-suites/test-amm/helpers/scenarios/';
const selectedScenarios: string[] = [];
@ -25,7 +25,7 @@ fs.readdirSync(scenarioFolder).forEach((file) => {
actionsConfiguration.skipIntegrityCheck = false; //set this to true to execute solidity-coverage
calculationsConfiguration.reservesParams = <iLpPoolAssets<IReserveParams>>(
getReservesConfigByPool(AavePools.lp)
getReservesConfigByPool(AavePools.amm)
);
});
after('Reset', () => {

View File

@ -19,7 +19,7 @@ makeSuite('Subgraph scenario tests', async (testEnv) => {
actionsConfiguration.skipIntegrityCheck = false; //set this to true to execute solidity-coverage
calculationsConfiguration.reservesParams = <iLpPoolAssets<IReserveParams>>(
getReservesConfigByPool(AavePools.lp)
getReservesConfigByPool(AavePools.amm)
);
});
after('Reset', () => {