mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
Remove Uniswap V1 config and scripts. Renamed config to markets.
This commit is contained in:
parent
27365697ac
commit
b275fedfe8
|
@ -45,7 +45,7 @@ TENDERLY_USERNAME=""
|
|||
|
||||
## Markets configuration
|
||||
|
||||
The configurations related with the Aave Markets are located at `config` directory. You can follow the `IAaveConfiguration` interface to create new Markets configuration or extend the current configuration.
|
||||
The configurations related with the Aave Markets are located at `markets` directory. You can follow the `IAaveConfiguration` interface to create new Markets configuration or extend the current Aave configuration.
|
||||
|
||||
Each market should have his own Market configuration file, and their own set of deployment tasks, using the Aave market config and tasks as a reference.
|
||||
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
import {CommonsConfig} from './commons';
|
||||
|
||||
export const TokenSetsConfig = {
|
||||
...CommonsConfig,
|
||||
// ...TokenSetsConfigStore,
|
||||
};
|
|
@ -1,249 +0,0 @@
|
|||
import BigNumber from 'bignumber.js';
|
||||
import {eEthereumNetwork, EthereumNetwork, IUniswapConfiguration} from '../helpers/types';
|
||||
import {oneRay} from '../helpers/constants';
|
||||
|
||||
import {CommonsConfig} from './commons';
|
||||
|
||||
// ----------------
|
||||
// POOL--SPECIFIC PARAMS
|
||||
// ----------------
|
||||
|
||||
export const UniswapConfig: IUniswapConfiguration = {
|
||||
...CommonsConfig,
|
||||
ConfigName: 'Uniswap',
|
||||
ProviderId: 2,
|
||||
ReservesConfig: {
|
||||
DAI: {
|
||||
baseVariableBorrowRate: new BigNumber(0.01).multipliedBy(oneRay).toFixed(),
|
||||
variableRateSlope1: new BigNumber(0.07).multipliedBy(oneRay).toFixed(),
|
||||
variableRateSlope2: new BigNumber(0.6).multipliedBy(oneRay).toFixed(),
|
||||
stableRateSlope1: new BigNumber(0.06).multipliedBy(oneRay).toFixed(),
|
||||
stableRateSlope2: new BigNumber(0.6).multipliedBy(oneRay).toFixed(),
|
||||
baseLTVAsCollateral: '-1',
|
||||
liquidationThreshold: '8000',
|
||||
liquidationBonus: '10500',
|
||||
borrowingEnabled: true,
|
||||
stableBorrowRateEnabled: false,
|
||||
reserveDecimals: '18',
|
||||
},
|
||||
USDC: {
|
||||
baseVariableBorrowRate: new BigNumber(0.01).multipliedBy(oneRay).toFixed(),
|
||||
variableRateSlope1: new BigNumber(0.07).multipliedBy(oneRay).toFixed(),
|
||||
variableRateSlope2: new BigNumber(0.6).multipliedBy(oneRay).toFixed(),
|
||||
stableRateSlope1: new BigNumber(0.06).multipliedBy(oneRay).toFixed(),
|
||||
stableRateSlope2: new BigNumber(0.6).multipliedBy(oneRay).toFixed(),
|
||||
baseLTVAsCollateral: '-1',
|
||||
liquidationThreshold: '8000',
|
||||
liquidationBonus: '10500',
|
||||
borrowingEnabled: true,
|
||||
stableBorrowRateEnabled: false,
|
||||
reserveDecimals: '6',
|
||||
},
|
||||
USDT: {
|
||||
baseVariableBorrowRate: new BigNumber(0.01).multipliedBy(oneRay).toFixed(),
|
||||
variableRateSlope1: new BigNumber(0.07).multipliedBy(oneRay).toFixed(),
|
||||
variableRateSlope2: new BigNumber(0.6).multipliedBy(oneRay).toFixed(),
|
||||
stableRateSlope1: new BigNumber(0.06).multipliedBy(oneRay).toFixed(),
|
||||
stableRateSlope2: new BigNumber(0.6).multipliedBy(oneRay).toFixed(),
|
||||
baseLTVAsCollateral: '-1',
|
||||
liquidationThreshold: '8000',
|
||||
liquidationBonus: '10500',
|
||||
borrowingEnabled: true,
|
||||
stableBorrowRateEnabled: false,
|
||||
reserveDecimals: '6',
|
||||
},
|
||||
WETH: {
|
||||
baseVariableBorrowRate: new BigNumber(0).multipliedBy(oneRay).toFixed(),
|
||||
variableRateSlope1: new BigNumber(0.08).multipliedBy(oneRay).toFixed(),
|
||||
variableRateSlope2: new BigNumber(0.5).multipliedBy(oneRay).toFixed(),
|
||||
stableRateSlope1: new BigNumber(0.1).multipliedBy(oneRay).toFixed(),
|
||||
stableRateSlope2: new BigNumber(0.6).multipliedBy(oneRay).toFixed(),
|
||||
baseLTVAsCollateral: '-1',
|
||||
liquidationThreshold: '8000',
|
||||
liquidationBonus: '10500',
|
||||
borrowingEnabled: true,
|
||||
stableBorrowRateEnabled: false,
|
||||
reserveDecimals: '18',
|
||||
},
|
||||
UNI_DAI_ETH: {
|
||||
baseVariableBorrowRate: new BigNumber(0.01).multipliedBy(oneRay).toFixed(),
|
||||
variableRateSlope1: new BigNumber(0.04).multipliedBy(oneRay).toFixed(),
|
||||
variableRateSlope2: new BigNumber(0.5).multipliedBy(oneRay).toFixed(),
|
||||
stableRateSlope1: new BigNumber(0.16).multipliedBy(oneRay).toFixed(),
|
||||
stableRateSlope2: new BigNumber(0.6).multipliedBy(oneRay).toFixed(),
|
||||
baseLTVAsCollateral: '6800',
|
||||
liquidationThreshold: '7300',
|
||||
liquidationBonus: '11000',
|
||||
borrowingEnabled: false,
|
||||
stableBorrowRateEnabled: false,
|
||||
reserveDecimals: '18',
|
||||
},
|
||||
UNI_LEND_ETH: {
|
||||
baseVariableBorrowRate: new BigNumber(0.01).multipliedBy(oneRay).toFixed(),
|
||||
variableRateSlope1: new BigNumber(0.04).multipliedBy(oneRay).toFixed(),
|
||||
variableRateSlope2: new BigNumber(0.5).multipliedBy(oneRay).toFixed(),
|
||||
stableRateSlope1: new BigNumber(0.16).multipliedBy(oneRay).toFixed(),
|
||||
stableRateSlope2: new BigNumber(0.6).multipliedBy(oneRay).toFixed(),
|
||||
baseLTVAsCollateral: '5100',
|
||||
liquidationThreshold: '6600',
|
||||
liquidationBonus: '11000',
|
||||
borrowingEnabled: false,
|
||||
stableBorrowRateEnabled: false,
|
||||
reserveDecimals: '18',
|
||||
},
|
||||
UNI_LINK_ETH: {
|
||||
baseVariableBorrowRate: new BigNumber(0.01).multipliedBy(oneRay).toFixed(),
|
||||
variableRateSlope1: new BigNumber(0.04).multipliedBy(oneRay).toFixed(),
|
||||
variableRateSlope2: new BigNumber(0.5).multipliedBy(oneRay).toFixed(),
|
||||
stableRateSlope1: new BigNumber(0.16).multipliedBy(oneRay).toFixed(),
|
||||
stableRateSlope2: new BigNumber(0.6).multipliedBy(oneRay).toFixed(),
|
||||
baseLTVAsCollateral: '6300',
|
||||
liquidationThreshold: '6800',
|
||||
liquidationBonus: '11000',
|
||||
borrowingEnabled: false,
|
||||
stableBorrowRateEnabled: false,
|
||||
reserveDecimals: '18',
|
||||
},
|
||||
UNI_MKR_ETH: {
|
||||
baseVariableBorrowRate: new BigNumber(0.01).multipliedBy(oneRay).toFixed(),
|
||||
variableRateSlope1: new BigNumber(0.04).multipliedBy(oneRay).toFixed(),
|
||||
variableRateSlope2: new BigNumber(0.5).multipliedBy(oneRay).toFixed(),
|
||||
stableRateSlope1: new BigNumber(0.16).multipliedBy(oneRay).toFixed(),
|
||||
stableRateSlope2: new BigNumber(0.6).multipliedBy(oneRay).toFixed(),
|
||||
baseLTVAsCollateral: '4800',
|
||||
liquidationThreshold: '6600',
|
||||
liquidationBonus: '11000',
|
||||
borrowingEnabled: false,
|
||||
stableBorrowRateEnabled: false,
|
||||
reserveDecimals: '18',
|
||||
},
|
||||
UNI_SETH_ETH: {
|
||||
baseVariableBorrowRate: new BigNumber(0.01).multipliedBy(oneRay).toFixed(),
|
||||
variableRateSlope1: new BigNumber(0.04).multipliedBy(oneRay).toFixed(),
|
||||
variableRateSlope2: new BigNumber(0.5).multipliedBy(oneRay).toFixed(),
|
||||
stableRateSlope1: new BigNumber(0.16).multipliedBy(oneRay).toFixed(),
|
||||
stableRateSlope2: new BigNumber(0.6).multipliedBy(oneRay).toFixed(),
|
||||
baseLTVAsCollateral: '4800',
|
||||
liquidationThreshold: '6600',
|
||||
liquidationBonus: '11000',
|
||||
borrowingEnabled: false,
|
||||
stableBorrowRateEnabled: false,
|
||||
reserveDecimals: '18',
|
||||
},
|
||||
UNI_USDC_ETH: {
|
||||
baseVariableBorrowRate: new BigNumber(0.01).multipliedBy(oneRay).toFixed(),
|
||||
variableRateSlope1: new BigNumber(0.04).multipliedBy(oneRay).toFixed(),
|
||||
variableRateSlope2: new BigNumber(0.5).multipliedBy(oneRay).toFixed(),
|
||||
stableRateSlope1: new BigNumber(0.16).multipliedBy(oneRay).toFixed(),
|
||||
stableRateSlope2: new BigNumber(0.6).multipliedBy(oneRay).toFixed(),
|
||||
baseLTVAsCollateral: '6800',
|
||||
liquidationThreshold: '7300',
|
||||
liquidationBonus: '11000',
|
||||
borrowingEnabled: false,
|
||||
stableBorrowRateEnabled: false,
|
||||
reserveDecimals: '18',
|
||||
},
|
||||
},
|
||||
ChainlinkAggregator: {
|
||||
[eEthereumNetwork.buidlerevm]: {},
|
||||
[eEthereumNetwork.hardhat]: {},
|
||||
[eEthereumNetwork.coverage]: {},
|
||||
[EthereumNetwork.kovan]: {
|
||||
DAI: '0x6F47077D3B6645Cb6fb7A29D280277EC1e5fFD90',
|
||||
USDC: '0x672c1C0d1130912D83664011E7960a42E8cA05D5',
|
||||
USDT: '0xCC833A6522721B3252e7578c5BCAF65738B75Fc3',
|
||||
UNI_DAI_ETH: '0x0338C40020Bf886c11406115fD1ba205Ef1D9Ff9',
|
||||
UNI_LEND_ETH: '0xB996b1a11BA0aACc4deA57f7f92d1722428f2E90',
|
||||
UNI_LINK_ETH: '0x267490eE9Ad21dfE839aE73A8B1c8C9A36F60d33',
|
||||
UNI_MKR_ETH: '0x6eBF25AB0A18B8F6243619f1AE6b94373169A069',
|
||||
UNI_SETH_ETH: '0xc5F1eA001c1570783b3af418fa775237Eb129EDC',
|
||||
UNI_USDC_ETH: '0x7f5E5D34591e9a70D187BBA94260C30B92aC0961',
|
||||
},
|
||||
[EthereumNetwork.ropsten]: {
|
||||
DAI: '0x64b8e49baded7bfb2fd5a9235b2440c0ee02971b',
|
||||
USDC: '0xe1480303dde539e2c241bdc527649f37c9cbef7d',
|
||||
USDT: '0xc08fe0c4d97ccda6b40649c6da621761b628c288',
|
||||
UNI_DAI_ETH: '0x16048819e3f77b7112eB033624A0bA9d33743028',
|
||||
UNI_LEND_ETH: '0x43c44B27376Afedee06Bae2A003e979FC3B3Da6C',
|
||||
UNI_LINK_ETH: '0xb60c29714146EA3539261f599Eb30f62904108Fa',
|
||||
UNI_MKR_ETH: '0x594ae5421f378b8B4AF9e758C461d2A1FF990BC5',
|
||||
UNI_SETH_ETH: '0x23Ee5188806BD2D31103368B0EA0259bc6706Af1',
|
||||
UNI_USDC_ETH: '0x6952A2678D574073DB97963886c2F38CD09C8Ba3',
|
||||
},
|
||||
[EthereumNetwork.main]: {
|
||||
DAI: '0x037E8F2125bF532F3e228991e051c8A7253B642c',
|
||||
USDC: '0xdE54467873c3BCAA76421061036053e371721708',
|
||||
USDT: '0xa874fe207DF445ff19E7482C746C4D3fD0CB9AcE',
|
||||
UNI_DAI_ETH: '0x1bAB293850289Bf161C5DA79ff3d1F02A950555b',
|
||||
UNI_LEND_ETH: '0xF4C8Db2d999b024bBB6c6022566503eD41f2AC1E',
|
||||
UNI_LINK_ETH: '0xE2A639Beb647d7F709ca805ABa760bBEfdbE37e3',
|
||||
UNI_MKR_ETH: '0xEe40a5E8F3732bE6ECDb5A90e23D0b7bF0D4a73c',
|
||||
UNI_SETH_ETH: '0x517D40E49660c7705b2e99eEFA6d7B0E9Ba5BF10',
|
||||
UNI_USDC_ETH: '0x444315Ee92F2bb3579293C17B07194227fA99bF0',
|
||||
},
|
||||
[EthereumNetwork.tenderlyMain]: {
|
||||
DAI: '0x037E8F2125bF532F3e228991e051c8A7253B642c',
|
||||
USDC: '0xdE54467873c3BCAA76421061036053e371721708',
|
||||
USDT: '0xa874fe207DF445ff19E7482C746C4D3fD0CB9AcE',
|
||||
UNI_DAI_ETH: '0x1bAB293850289Bf161C5DA79ff3d1F02A950555b',
|
||||
UNI_LEND_ETH: '0xF4C8Db2d999b024bBB6c6022566503eD41f2AC1E',
|
||||
UNI_LINK_ETH: '0xE2A639Beb647d7F709ca805ABa760bBEfdbE37e3',
|
||||
UNI_MKR_ETH: '0xEe40a5E8F3732bE6ECDb5A90e23D0b7bF0D4a73c',
|
||||
UNI_SETH_ETH: '0x517D40E49660c7705b2e99eEFA6d7B0E9Ba5BF10',
|
||||
UNI_USDC_ETH: '0x444315Ee92F2bb3579293C17B07194227fA99bF0',
|
||||
},
|
||||
},
|
||||
ReserveAssets: {
|
||||
[eEthereumNetwork.hardhat]: {},
|
||||
[eEthereumNetwork.buidlerevm]: {},
|
||||
[eEthereumNetwork.coverage]: {},
|
||||
[EthereumNetwork.kovan]: {
|
||||
DAI: '0xFf795577d9AC8bD7D90Ee22b6C1703490b6512FD',
|
||||
USDC: '0xe22da380ee6B445bb8273C81944ADEB6E8450422',
|
||||
USDT: '0x13512979ADE267AB5100878E2e0f485B568328a4',
|
||||
WETH: '0xd0a1e359811322d97991e03f863a0c30c2cf029c',
|
||||
UNI_DAI_ETH: '0x2e0086b5343101203ADeE40160ca1BD91E29fF75',
|
||||
UNI_LEND_ETH: '0x7615cd666F867406C64E558B9CCC3883e7EC9BA8',
|
||||
UNI_LINK_ETH: '0xFb9AAc184e79025f936E9C4EF3047Ad4889Df4a8',
|
||||
UNI_MKR_ETH: '0xB31a1c30f38cD68e8177566Ef950d7bc3C81DaCF',
|
||||
UNI_SETH_ETH: '0xCF457d8Bb8D8f54Af1ea1B3710231e89bd6CFbfe',
|
||||
UNI_USDC_ETH: '0x34eA1aB2a43ee696914fc3C0d3e517fA666B9e8D',
|
||||
},
|
||||
[EthereumNetwork.ropsten]: {
|
||||
DAI: '0xf80A32A835F79D7787E8a8ee5721D0fEaFd78108',
|
||||
USDC: '0x851dEf71f0e6A903375C1e536Bd9ff1684BAD802',
|
||||
USDT: '0xB404c51BBC10dcBE948077F18a4B8E553D160084',
|
||||
WETH: '0xc778417e063141139fce010982780140aa0cd5ab',
|
||||
UNI_DAI_ETH: '0xC245A7d35E652Cae438A1FdB13E474DF53DBB81D',
|
||||
UNI_LEND_ETH: '0xcD5DE1EDD40aBBD6efE2C306276FF56f81Bc3151',
|
||||
UNI_LINK_ETH: '0x8dcf3c8d4d69ca7C188c0A4cf219A1dcE1e510d7',
|
||||
UNI_MKR_ETH: '0xd8b7B99a9205FD0D0abFB6D7a2c13Db2681bff43',
|
||||
UNI_SETH_ETH: '0xed4597DCd234867d7A260AD24bAb8253F64940a5',
|
||||
UNI_USDC_ETH: '0x2BD65323955D08eb600074291305881d1295c4D2',
|
||||
},
|
||||
[EthereumNetwork.main]: {
|
||||
DAI: '0x6b175474e89094c44da98b954eedeac495271d0f',
|
||||
USDC: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',
|
||||
USDT: '0xdac17f958d2ee523a2206206994597c13d831ec7',
|
||||
WETH: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
|
||||
UNI_DAI_ETH: '0x2a1530c4c41db0b0b2bb646cb5eb1a67b7158667',
|
||||
UNI_LEND_ETH: '0xcaa7e4656f6a2b59f5f99c745f91ab26d1210dce',
|
||||
UNI_LINK_ETH: '0xf173214c720f58e03e194085b1db28b50acdeead',
|
||||
UNI_MKR_ETH: '0x2c4bd064b998838076fa341a83d007fc2fa50957',
|
||||
UNI_SETH_ETH: '0xe9cf7887b93150d4f2da7dfc6d502b216438f244',
|
||||
UNI_USDC_ETH: '0x97dec872013f6b5fb443861090ad931542878126',
|
||||
},
|
||||
[EthereumNetwork.tenderlyMain]: {
|
||||
DAI: '0x6b175474e89094c44da98b954eedeac495271d0f',
|
||||
USDC: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',
|
||||
USDT: '0xdac17f958d2ee523a2206206994597c13d831ec7',
|
||||
WETH: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
|
||||
UNI_DAI_ETH: '0x2a1530c4c41db0b0b2bb646cb5eb1a67b7158667',
|
||||
UNI_LEND_ETH: '0xcaa7e4656f6a2b59f5f99c745f91ab26d1210dce',
|
||||
UNI_LINK_ETH: '0xf173214c720f58e03e194085b1db28b50acdeead',
|
||||
UNI_MKR_ETH: '0x2c4bd064b998838076fa341a83d007fc2fa50957',
|
||||
UNI_SETH_ETH: '0xe9cf7887b93150d4f2da7dfc6d502b216438f244',
|
||||
UNI_USDC_ETH: '0x97dec872013f6b5fb443861090ad931542878126',
|
||||
},
|
||||
},
|
||||
};
|
|
@ -3,16 +3,12 @@ import {
|
|||
iMultiPoolsAssets,
|
||||
IReserveParams,
|
||||
PoolConfiguration,
|
||||
iBasicDistributionParams,
|
||||
ICommonConfiguration,
|
||||
eEthereumNetwork,
|
||||
IMarketRates,
|
||||
} from './types';
|
||||
import {getParamPerPool} from './contracts-helpers';
|
||||
import {AaveConfig} from '../config/aave';
|
||||
import {UniswapConfig} from '../config/uniswap';
|
||||
import {CommonsConfig} from '../config/commons';
|
||||
import {ZERO_ADDRESS} from './constants';
|
||||
import AaveConfig from '../markets/aave';
|
||||
import {CommonsConfig} from '../markets/aave/commons';
|
||||
import {DRE, filterMapBy} from './misc-utils';
|
||||
import {tEthereumAddress} from './types';
|
||||
import {getParamPerNetwork} from './contracts-helpers';
|
||||
|
@ -28,8 +24,6 @@ export const loadPoolConfig = (configName: ConfigNames): PoolConfiguration => {
|
|||
switch (configName) {
|
||||
case ConfigNames.Aave:
|
||||
return AaveConfig;
|
||||
case ConfigNames.Uniswap:
|
||||
return UniswapConfig;
|
||||
case ConfigNames.Commons:
|
||||
return CommonsConfig;
|
||||
default:
|
||||
|
@ -47,9 +41,6 @@ export const getReservesConfigByPool = (pool: AavePools): iMultiPoolsAssets<IRes
|
|||
[AavePools.proto]: {
|
||||
...AaveConfig.ReservesConfig,
|
||||
},
|
||||
[AavePools.secondary]: {
|
||||
...UniswapConfig.ReservesConfig,
|
||||
},
|
||||
},
|
||||
pool
|
||||
);
|
||||
|
|
|
@ -157,12 +157,10 @@ export const getParamPerNetwork = <T>(
|
|||
}
|
||||
};
|
||||
|
||||
export const getParamPerPool = <T>({proto, secondary}: iParamsPerPool<T>, pool: AavePools) => {
|
||||
export const getParamPerPool = <T>({proto}: iParamsPerPool<T>, pool: AavePools) => {
|
||||
switch (pool) {
|
||||
case AavePools.proto:
|
||||
return proto;
|
||||
case AavePools.secondary:
|
||||
return secondary;
|
||||
default:
|
||||
return proto;
|
||||
}
|
||||
|
|
|
@ -1,17 +1,12 @@
|
|||
import {eContractid, iMultiPoolsAssets, IReserveParams, tEthereumAddress} from './types';
|
||||
import {LendingPoolConfigurator} from '../types/LendingPoolConfigurator';
|
||||
import {iMultiPoolsAssets, IReserveParams, tEthereumAddress} from './types';
|
||||
import {AaveProtocolDataProvider} from '../types/AaveProtocolDataProvider';
|
||||
import {
|
||||
deployATokensAndRatesHelper,
|
||||
deployStableAndVariableTokensHelper,
|
||||
} from './contracts-deployments';
|
||||
import {chunk, waitForTx} from './misc-utils';
|
||||
import {
|
||||
getATokensAndRatesHelper,
|
||||
getLendingPoolAddressesProvider,
|
||||
getStableAndVariableTokensHelper,
|
||||
} from './contracts-getters';
|
||||
import {insertContractAddressInDb, rawInsertContractAddressInDb} from './contracts-helpers';
|
||||
import {rawInsertContractAddressInDb} from './contracts-helpers';
|
||||
|
||||
export const initReservesByHelper = async (
|
||||
reservesParams: iMultiPoolsAssets<IReserveParams>,
|
||||
|
|
|
@ -13,7 +13,6 @@ import {MockAggregator} from '../types/MockAggregator';
|
|||
import {deployMockAggregator} from './contracts-deployments';
|
||||
import {chunk, waitForTx} from './misc-utils';
|
||||
import {getStableAndVariableTokensHelper} from './contracts-getters';
|
||||
import {stablecoinStrategyCentralized} from '../config/reservesConfigs';
|
||||
|
||||
export const setInitialMarketRatesInRatesOracleByHelper = async (
|
||||
marketRates: iMultiPoolsAssets<IMarketRates>,
|
||||
|
|
|
@ -259,7 +259,7 @@ export type iAaveSecondPoolAssets<T> = Pick<
|
|||
| 'UNI_LINK_ETH'
|
||||
>;
|
||||
|
||||
export type iMultiPoolsAssets<T> = iAssetCommon<T> | iAavePoolAssets<T> | iAaveSecondPoolAssets<T>;
|
||||
export type iMultiPoolsAssets<T> = iAssetCommon<T> | iAavePoolAssets<T>;
|
||||
|
||||
export type iAavePoolTokens<T> = Omit<iAavePoolAssets<T>, 'ETH'>;
|
||||
|
||||
|
@ -330,7 +330,6 @@ export interface iParamsPerNetwork<T> {
|
|||
|
||||
export interface iParamsPerPool<T> {
|
||||
[AavePools.proto]: T;
|
||||
[AavePools.secondary]: T;
|
||||
}
|
||||
|
||||
export interface iBasicDistributionParams {
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import BigNumber from 'bignumber.js';
|
||||
import {zeroPad} from 'ethers/lib/utils';
|
||||
import {oneEther, oneRay, RAY, ZERO_ADDRESS} from '../helpers/constants';
|
||||
import {ICommonConfiguration, EthereumNetwork, eEthereumNetwork} from '../helpers/types';
|
||||
import {oneEther, oneRay, RAY, ZERO_ADDRESS} from '../../helpers/constants';
|
||||
import {ICommonConfiguration, EthereumNetwork, eEthereumNetwork} from '../../helpers/types';
|
||||
|
||||
const MOCK_CHAINLINK_AGGREGATORS_PRICES = {
|
||||
AAVE: oneEther.multipliedBy('0.003620948469').toFixed(),
|
|
@ -1,6 +1,5 @@
|
|||
import BigNumber from 'bignumber.js';
|
||||
import {oneRay, ZERO_ADDRESS} from '../helpers/constants';
|
||||
import {IAaveConfiguration, EthereumNetwork, eEthereumNetwork} from '../helpers/types';
|
||||
import {oneRay, ZERO_ADDRESS} from '../../helpers/constants';
|
||||
import {IAaveConfiguration, EthereumNetwork, eEthereumNetwork} from '../../helpers/types';
|
||||
|
||||
import {CommonsConfig} from './commons';
|
||||
import {
|
|
@ -1,6 +1,6 @@
|
|||
import BigNumber from 'bignumber.js';
|
||||
import {oneRay} from '../helpers/constants';
|
||||
import {IReserveParams} from '../helpers/types';
|
||||
import {oneRay} from '../../helpers/constants';
|
||||
import {IReserveParams} from '../../helpers/types';
|
||||
|
||||
export const strategyBase: IReserveParams = {
|
||||
baseVariableBorrowRate: new BigNumber(0).multipliedBy(oneRay).toFixed(),
|
32
package.json
32
package.json
|
@ -13,23 +13,6 @@
|
|||
"compile": "SKIP_LOAD=true hardhat compile",
|
||||
"test": "TS_NODE_TRANSPILE_ONLY=1 hardhat test ./test/*.spec.ts",
|
||||
"test-scenarios": "npm run test -- test/__setup.spec.ts test/scenario.spec.ts",
|
||||
"aave:evm:dev:migration": "hardhat aave:dev",
|
||||
"aave:docker:full:migration": "npm run hardhat:docker -- aave:full",
|
||||
"aave:kovan:full:migration": "npm run hardhat:kovan -- aave:full --verify",
|
||||
"aave:kovan:full:initialize": "npm run hardhat:kovan -- full:initialize-lending-pool --verify --pool Aave",
|
||||
"aave:ropsten:full:migration": "npm run hardhat:ropsten -- aave:full --verify",
|
||||
"aave:fork:main:tenderly": "npm run hardhat:tenderly-main -- aave:mainnet",
|
||||
"aave:fork:main": "MAINNET_FORK=true hardhat aave:mainnet",
|
||||
"test:main:check-list": "MAINNET_FORK=true TS_NODE_TRANSPILE_ONLY=1 hardhat test test/__setup.spec.ts test/mainnet/check-list.spec.ts",
|
||||
"aave:main:full:migration": "npm run hardhat:main -- aave:mainnet --verify",
|
||||
"uniswap:evm:dev:migration": "hardhat uniswap:dev",
|
||||
"uniswap:evm:full:migration": "hardhat uniswap:full --verify",
|
||||
"uniswap:kovan:dev:migration": "npm run hardhat:kovan -- uniswap:dev --verify",
|
||||
"uniswap:kovan:full:migration": "npm run hardhat:kovan -- uniswap:full --verify",
|
||||
"uniswap:ropsten:dev:migration": "npm run hardhat:ropsten -- uniswap:dev --verify",
|
||||
"uniswap:ropsten:full:migration": "npm run hardhat:ropsten -- uniswap:full --verify",
|
||||
"uniswap:main:dev:migration": "npm run hardhat:main -- uniswap:dev --verify",
|
||||
"uniswap:main:full:migration": "npm run hardhat:main -- uniswap:full --verify",
|
||||
"test-repay-with-collateral": "hardhat test test/__setup.spec.ts test/repay-with-collateral.spec.ts",
|
||||
"test-liquidate-with-collateral": "hardhat test test/__setup.spec.ts test/flash-liquidation-with-collateral.spec.ts",
|
||||
"test-liquidate-underlying": "hardhat test test/__setup.spec.ts test/liquidation-underlying.spec.ts",
|
||||
|
@ -43,9 +26,16 @@
|
|||
"test-stable-and-atokens": "hardhat test test/__setup.spec.ts test/atoken-transfer.spec.ts test/stable-token.spec.ts",
|
||||
"test-subgraph:scenarios": "hardhat --network hardhatevm_docker test test/__setup.spec.ts test/subgraph-scenarios.spec.ts",
|
||||
"test-weth": "hardhat test test/__setup.spec.ts test/weth-gateway.spec.ts",
|
||||
"test:main:check-list": "MAINNET_FORK=true TS_NODE_TRANSPILE_ONLY=1 hardhat test test/__setup.spec.ts test/mainnet/check-list.spec.ts",
|
||||
"dev:coverage": "buidler compile --force && buidler coverage --network coverage",
|
||||
"dev:deployment": "hardhat dev-deployment",
|
||||
"dev:deployExample": "hardhat deploy-Example",
|
||||
"aave:evm:dev:migration": "npm run compile && hardhat aave:dev",
|
||||
"aave:docker:full:migration": "npm run compile && npm run hardhat:docker -- aave:full",
|
||||
"aave:kovan:full:migration": "npm run compile && npm run hardhat:kovan -- aave:full --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:full --verify",
|
||||
"aave:fork:main:tenderly": "npm run compile && npm run hardhat:tenderly-main -- aave:mainnet",
|
||||
"aave:fork:main": "MAINNET_FORK=true npm run compile && hardhat aave:mainnet",
|
||||
"aave:main:full:migration": "npm run hardhat:main -- aave:mainnet --verify",
|
||||
"dev:prettier": "prettier --write .",
|
||||
"ci:test": "npm run compile && npm run test",
|
||||
"ci:clean": "rm -rf ./artifacts ./cache ./types",
|
||||
|
@ -125,6 +115,10 @@
|
|||
{
|
||||
"name": "Andrey Kozlov",
|
||||
"email": "andrey@aave.com"
|
||||
},
|
||||
{
|
||||
"name": "David Racero",
|
||||
"email": "david.k@aave.com"
|
||||
}
|
||||
],
|
||||
"license": "AGPLv3",
|
||||
|
|
|
@ -1,44 +0,0 @@
|
|||
import {task} from 'hardhat/config';
|
||||
import {checkVerification} from '../../helpers/etherscan-verification';
|
||||
import {ConfigNames} from '../../helpers/configuration';
|
||||
import {EthereumNetworkNames} from '../../helpers/types';
|
||||
import {printContracts} from '../../helpers/misc-utils';
|
||||
|
||||
task('aave:full', 'Deploy development enviroment')
|
||||
.addFlag('verify', 'Verify contracts at Etherscan')
|
||||
.setAction(async ({verify}, localBRE) => {
|
||||
const POOL_NAME = ConfigNames.Aave;
|
||||
const network = <EthereumNetworkNames>localBRE.network.name;
|
||||
|
||||
await localBRE.run('set-DRE');
|
||||
|
||||
// Prevent loss of gas verifying all the needed ENVs for Etherscan verification
|
||||
if (verify) {
|
||||
checkVerification();
|
||||
}
|
||||
|
||||
console.log('Migration started\n');
|
||||
|
||||
console.log('1. Deploy address provider');
|
||||
await localBRE.run('full:deploy-address-provider', {pool: POOL_NAME});
|
||||
|
||||
console.log('2. Deploy lending pool');
|
||||
await localBRE.run('full:deploy-lending-pool');
|
||||
|
||||
console.log('3. Deploy data provider');
|
||||
await localBRE.run('full:data-provider');
|
||||
|
||||
console.log('4. Initialize lending pool');
|
||||
await localBRE.run('full:initialize-lending-pool', {pool: POOL_NAME});
|
||||
|
||||
if (verify) {
|
||||
printContracts();
|
||||
console.log('4. Veryfing contracts');
|
||||
await localBRE.run('verify:general', {all: true, pool: POOL_NAME});
|
||||
|
||||
console.log('5. Veryfing aTokens and debtTokens');
|
||||
await localBRE.run('verify:tokens', {pool: POOL_NAME});
|
||||
}
|
||||
console.log('\nFinished migrations');
|
||||
printContracts();
|
||||
});
|
|
@ -1,35 +0,0 @@
|
|||
import {task} from 'hardhat/config';
|
||||
import {checkVerification} from '../../helpers/etherscan-verification';
|
||||
import {ConfigNames} from '../../helpers/configuration';
|
||||
|
||||
task('uniswap:dev', 'Deploy development enviroment')
|
||||
.addOptionalParam('verify', 'Verify contracts at Etherscan')
|
||||
.setAction(async ({verify}, localBRE) => {
|
||||
const POOL_NAME = ConfigNames.Uniswap;
|
||||
|
||||
await localBRE.run('set-DRE');
|
||||
|
||||
// Prevent loss of gas verifying all the needed ENVs for Etherscan verification
|
||||
if (verify) {
|
||||
checkVerification();
|
||||
}
|
||||
|
||||
console.log('Migration started\n');
|
||||
|
||||
console.log('1. Deploy mock tokens');
|
||||
await localBRE.run('dev:deploy-mock-tokens', {verify});
|
||||
|
||||
console.log('2. Deploy address provider');
|
||||
await localBRE.run('dev:deploy-address-provider', {verify});
|
||||
|
||||
console.log('3. Deploy lending pool');
|
||||
await localBRE.run('dev:deploy-lending-pool', {verify});
|
||||
|
||||
console.log('4. Deploy oracles');
|
||||
await localBRE.run('dev:deploy-oracles', {verify, pool: POOL_NAME});
|
||||
|
||||
console.log('5. Initialize lending pool');
|
||||
await localBRE.run('dev:initialize-lending-pool', {verify, pool: POOL_NAME});
|
||||
|
||||
console.log('\nFinished migration');
|
||||
});
|
|
@ -1,32 +0,0 @@
|
|||
import {task} from 'hardhat/config';
|
||||
import {checkVerification} from '../../helpers/etherscan-verification';
|
||||
import {ConfigNames} from '../../helpers/configuration';
|
||||
|
||||
task('uniswap:full', 'Deploy development enviroment')
|
||||
.addFlag('verify', 'Verify contracts at Etherscan')
|
||||
.setAction(async ({verify}, localBRE) => {
|
||||
const POOL_NAME = ConfigNames.Uniswap;
|
||||
|
||||
await localBRE.run('set-DRE');
|
||||
|
||||
// Prevent loss of gas verifying all the needed ENVs for Etherscan verification
|
||||
if (verify) {
|
||||
checkVerification();
|
||||
}
|
||||
|
||||
console.log('Migration started\n');
|
||||
|
||||
console.log('1. Deploy address provider');
|
||||
await localBRE.run('full:deploy-address-provider', {verify, pool: POOL_NAME});
|
||||
|
||||
console.log('2. Deploy lending pool');
|
||||
await localBRE.run('full:deploy-lending-pool', {verify});
|
||||
|
||||
console.log('3. Deploy oracles');
|
||||
await localBRE.run('full:deploy-oracles', {verify, pool: POOL_NAME});
|
||||
|
||||
console.log('4. Initialize lending pool');
|
||||
await localBRE.run('full:initialize-lending-pool', {verify, pool: POOL_NAME});
|
||||
|
||||
console.log('\nFinished migrations');
|
||||
});
|
|
@ -26,7 +26,7 @@ import {
|
|||
import {Signer} from 'ethers';
|
||||
import {TokenContractId, eContractid, tEthereumAddress, AavePools} from '../helpers/types';
|
||||
import {MintableErc20 as MintableERC20} from '../types/MintableErc20';
|
||||
import {getEmergencyAdmin, getReservesConfigByPool} from '../helpers/configuration';
|
||||
import {getReservesConfigByPool} from '../helpers/configuration';
|
||||
import {initializeMakeSuite} from './helpers/make-suite';
|
||||
|
||||
import {
|
||||
|
@ -40,7 +40,7 @@ import {
|
|||
enableReservesToBorrowByHelper,
|
||||
enableReservesAsCollateralByHelper,
|
||||
} from '../helpers/init-helpers';
|
||||
import {AaveConfig} from '../config/aave';
|
||||
import AaveConfig from '../markets/aave';
|
||||
import {ZERO_ADDRESS} from '../helpers/constants';
|
||||
import {
|
||||
getLendingPool,
|
||||
|
|
|
@ -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 '../config/commons';
|
||||
import {CommonsConfig} from '../markets/aave/commons';
|
||||
|
||||
const APPROVAL_AMOUNT_LENDING_POOL =
|
||||
CommonsConfig.ProtocolGlobalParams.ApprovalAmountLendingPoolCore;
|
||||
|
|
|
@ -2,7 +2,7 @@ import {TestEnv, makeSuite} from './helpers/make-suite';
|
|||
import {RAY} from '../helpers/constants';
|
||||
import {convertToCurrencyDecimals} from '../helpers/contracts-helpers';
|
||||
import {ProtocolErrors} from '../helpers/types';
|
||||
import {CommonsConfig} from '../config/commons';
|
||||
import {CommonsConfig} from '../markets/aave/commons';
|
||||
|
||||
const APPROVAL_AMOUNT_LENDING_POOL =
|
||||
CommonsConfig.ProtocolGlobalParams.ApprovalAmountLendingPoolCore;
|
||||
|
|
|
@ -7,7 +7,7 @@ import {makeSuite} from './helpers/make-suite';
|
|||
import {ProtocolErrors, RateMode} from '../helpers/types';
|
||||
import {calcExpectedVariableDebtTokenBalance} from './helpers/utils/calculations';
|
||||
import {getUserData, getReserveData} from './helpers/utils/helpers';
|
||||
import {CommonsConfig} from '../config/commons';
|
||||
import {CommonsConfig} from '../markets/aave/commons';
|
||||
|
||||
const APPROVAL_AMOUNT_LENDING_POOL =
|
||||
CommonsConfig.ProtocolGlobalParams.ApprovalAmountLendingPoolCore;
|
||||
|
|
|
@ -7,7 +7,7 @@ import {makeSuite} from './helpers/make-suite';
|
|||
import {ProtocolErrors, RateMode} from '../helpers/types';
|
||||
import {calcExpectedStableDebtTokenBalance} from './helpers/utils/calculations';
|
||||
import {getUserData} from './helpers/utils/helpers';
|
||||
import {CommonsConfig} from '../config/commons';
|
||||
import {CommonsConfig} from '../markets/aave/commons';
|
||||
|
||||
const APPROVAL_AMOUNT_LENDING_POOL =
|
||||
CommonsConfig.ProtocolGlobalParams.ApprovalAmountLendingPoolCore;
|
||||
|
|
Loading…
Reference in New Issue
Block a user