mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
Fixed tests, moved MOCK_CHAINLING_AGGREGATORS_PRICES to constants.ts
This commit is contained in:
parent
e591ae4dfc
commit
ec4df02f84
|
@ -28,3 +28,43 @@ export const TOKEN_DISTRIBUTOR_PERCENTAGE_BASE = '10000';
|
|||
export const MOCK_USD_PRICE_IN_WEI = '5848466240000000';
|
||||
export const USD_ADDRESS = '0x10F7Fc1F91Ba351f9C629c5947AD69bD03C05b96';
|
||||
export const AAVE_REFERRAL = '0';
|
||||
|
||||
export const MOCK_CHAINLINK_AGGREGATORS_PRICES = {
|
||||
AAVE: oneEther.multipliedBy('0.003620948469').toFixed(),
|
||||
BAT: oneEther.multipliedBy('0.00137893825230').toFixed(),
|
||||
BUSD: oneEther.multipliedBy('0.00736484').toFixed(),
|
||||
DAI: oneEther.multipliedBy('0.00369068412860').toFixed(),
|
||||
ENJ: oneEther.multipliedBy('0.00029560').toFixed(),
|
||||
KNC: oneEther.multipliedBy('0.001072').toFixed(),
|
||||
LINK: oneEther.multipliedBy('0.009955').toFixed(),
|
||||
MANA: oneEther.multipliedBy('0.000158').toFixed(),
|
||||
MKR: oneEther.multipliedBy('2.508581').toFixed(),
|
||||
REN: oneEther.multipliedBy('0.00065133').toFixed(),
|
||||
SNX: oneEther.multipliedBy('0.00442616').toFixed(),
|
||||
SUSD: oneEther.multipliedBy('0.00364714136416').toFixed(),
|
||||
TUSD: oneEther.multipliedBy('0.00364714136416').toFixed(),
|
||||
UNI: oneEther.multipliedBy('0.00536479').toFixed(),
|
||||
USDC: oneEther.multipliedBy('0.00367714136416').toFixed(),
|
||||
USDT: oneEther.multipliedBy('0.00369068412860').toFixed(),
|
||||
WETH: oneEther.toFixed(),
|
||||
WBTC: oneEther.multipliedBy('47.332685').toFixed(),
|
||||
YFI: oneEther.multipliedBy('22.407436').toFixed(),
|
||||
ZRX: oneEther.multipliedBy('0.001151').toFixed(),
|
||||
UniDAIWETH: oneEther.multipliedBy('22.407436').toFixed(),
|
||||
UniWBTCWETH: oneEther.multipliedBy('22.407436').toFixed(),
|
||||
UniAAVEWETH: oneEther.multipliedBy('0.003620948469').toFixed(),
|
||||
UniBATWETH: oneEther.multipliedBy('22.407436').toFixed(),
|
||||
UniUSDCDAI: oneEther.multipliedBy('22.407436').toFixed(),
|
||||
UniCRVWETH: oneEther.multipliedBy('22.407436').toFixed(),
|
||||
UniLINKWETH: oneEther.multipliedBy('0.009955').toFixed(),
|
||||
UniMKRWETH: oneEther.multipliedBy('22.407436').toFixed(),
|
||||
UniRENWETH: oneEther.multipliedBy('22.407436').toFixed(),
|
||||
UniSNXWETH: oneEther.multipliedBy('22.407436').toFixed(),
|
||||
UniUNIWETH: oneEther.multipliedBy('22.407436').toFixed(),
|
||||
UniUSDCWETH: oneEther.multipliedBy('22.407436').toFixed(),
|
||||
UniWBTCUSDC: oneEther.multipliedBy('22.407436').toFixed(),
|
||||
UniYFIWETH: oneEther.multipliedBy('22.407436').toFixed(),
|
||||
BptWBTCWETH: oneEther.multipliedBy('22.407436').toFixed(),
|
||||
MATIC: oneEther.multipliedBy('0.003620948469').toFixed(),
|
||||
USD: '5848466240000000',
|
||||
};
|
||||
|
|
|
@ -343,6 +343,7 @@ export enum TokenContractId {
|
|||
UniWBTCUSDC = 'UniWBTCUSDC',
|
||||
UniYFIWETH = 'UniYFIWETH',
|
||||
BptWBTCWETH = 'BptWBTCWETH',
|
||||
MATIC = 'MATIC',
|
||||
}
|
||||
|
||||
export interface IReserveParams extends IReserveBorrowParams, IReserveCollateralParams {
|
||||
|
@ -493,3 +494,4 @@ export interface ITokenAddress {
|
|||
}
|
||||
|
||||
export type PoolConfiguration = ICommonConfiguration | IAaveConfiguration;
|
||||
|
||||
|
|
|
@ -1,51 +1,7 @@
|
|||
import BigNumber from 'bignumber.js';
|
||||
import { oneEther, oneRay, RAY, ZERO_ADDRESS } from '../../helpers/constants';
|
||||
import { oneEther, oneRay, RAY, ZERO_ADDRESS, MOCK_CHAINLINK_AGGREGATORS_PRICES } from '../../helpers/constants';
|
||||
import { ICommonConfiguration, EthereumNetwork, eEthereumNetwork } from '../../helpers/types';
|
||||
|
||||
const MOCK_CHAINLINK_AGGREGATORS_PRICES = {
|
||||
AAVE: oneEther.multipliedBy('0.003620948469').toFixed(),
|
||||
BAT: oneEther.multipliedBy('0.00137893825230').toFixed(),
|
||||
BUSD: oneEther.multipliedBy('0.00736484').toFixed(),
|
||||
DAI: oneEther.multipliedBy('0.00369068412860').toFixed(),
|
||||
ENJ: oneEther.multipliedBy('0.00029560').toFixed(),
|
||||
KNC: oneEther.multipliedBy('0.001072').toFixed(),
|
||||
LINK: oneEther.multipliedBy('0.009955').toFixed(),
|
||||
MANA: oneEther.multipliedBy('0.000158').toFixed(),
|
||||
MKR: oneEther.multipliedBy('2.508581').toFixed(),
|
||||
REN: oneEther.multipliedBy('0.00065133').toFixed(),
|
||||
SNX: oneEther.multipliedBy('0.00442616').toFixed(),
|
||||
SUSD: oneEther.multipliedBy('0.00364714136416').toFixed(),
|
||||
TUSD: oneEther.multipliedBy('0.00364714136416').toFixed(),
|
||||
UNI: oneEther.multipliedBy('0.00536479').toFixed(),
|
||||
USDC: oneEther.multipliedBy('0.00367714136416').toFixed(),
|
||||
USDT: oneEther.multipliedBy('0.00369068412860').toFixed(),
|
||||
WETH: oneEther.toFixed(),
|
||||
WBTC: oneEther.multipliedBy('47.332685').toFixed(),
|
||||
YFI: oneEther.multipliedBy('22.407436').toFixed(),
|
||||
ZRX: oneEther.multipliedBy('0.001151').toFixed(),
|
||||
// LpDAI: oneEther.multipliedBy('0.00369068412860').toFixed(),
|
||||
// LpUSDC: oneEther.multipliedBy('0.00367714136416').toFixed(),
|
||||
// LpUSDT: oneEther.multipliedBy('0.00369068412860').toFixed(),
|
||||
// LpWBTC: oneEther.multipliedBy('47.332685').toFixed(),
|
||||
// LpWETH: oneEther.toFixed(),
|
||||
UniDAIWETH: oneEther.multipliedBy('22.407436').toFixed(),
|
||||
UniWBTCWETH: oneEther.multipliedBy('22.407436').toFixed(),
|
||||
UniAAVEWETH: oneEther.multipliedBy('0.003620948469').toFixed(),
|
||||
UniBATWETH: oneEther.multipliedBy('22.407436').toFixed(),
|
||||
UniUSDCDAI: oneEther.multipliedBy('22.407436').toFixed(),
|
||||
UniCRVWETH: oneEther.multipliedBy('22.407436').toFixed(),
|
||||
UniLINKWETH: oneEther.multipliedBy('0.009955').toFixed(),
|
||||
UniMKRWETH: oneEther.multipliedBy('22.407436').toFixed(),
|
||||
UniRENWETH: oneEther.multipliedBy('22.407436').toFixed(),
|
||||
UniSNXWETH: oneEther.multipliedBy('22.407436').toFixed(),
|
||||
UniUNIWETH: oneEther.multipliedBy('22.407436').toFixed(),
|
||||
UniUSDCWETH: oneEther.multipliedBy('22.407436').toFixed(),
|
||||
UniWBTCUSDC: oneEther.multipliedBy('22.407436').toFixed(),
|
||||
UniYFIWETH: oneEther.multipliedBy('22.407436').toFixed(),
|
||||
BptWBTCWETH: oneEther.multipliedBy('22.407436').toFixed(),
|
||||
MATIC: oneEther.multipliedBy('0.003620948469').toFixed(),
|
||||
USD: '5848466240000000',
|
||||
};
|
||||
// ----------------
|
||||
// PROTOCOL GLOBAL PARAMS
|
||||
// ----------------
|
||||
|
|
|
@ -1,51 +1,7 @@
|
|||
import BigNumber from 'bignumber.js';
|
||||
import { oneEther, oneRay, RAY, ZERO_ADDRESS } from '../../helpers/constants';
|
||||
import { oneEther, oneRay, RAY, ZERO_ADDRESS, MOCK_CHAINLINK_AGGREGATORS_PRICES } from '../../helpers/constants';
|
||||
import { ICommonConfiguration, EthereumNetwork, eEthereumNetwork } from '../../helpers/types';
|
||||
|
||||
const MOCK_CHAINLINK_AGGREGATORS_PRICES = {
|
||||
AAVE: oneEther.multipliedBy('0.003620948469').toFixed(),
|
||||
BAT: oneEther.multipliedBy('0.00137893825230').toFixed(),
|
||||
BUSD: oneEther.multipliedBy('0.00736484').toFixed(),
|
||||
DAI: oneEther.multipliedBy('0.00369068412860').toFixed(),
|
||||
ENJ: oneEther.multipliedBy('0.00029560').toFixed(),
|
||||
KNC: oneEther.multipliedBy('0.001072').toFixed(),
|
||||
LINK: oneEther.multipliedBy('0.009955').toFixed(),
|
||||
MANA: oneEther.multipliedBy('0.000158').toFixed(),
|
||||
MKR: oneEther.multipliedBy('2.508581').toFixed(),
|
||||
REN: oneEther.multipliedBy('0.00065133').toFixed(),
|
||||
SNX: oneEther.multipliedBy('0.00442616').toFixed(),
|
||||
SUSD: oneEther.multipliedBy('0.00364714136416').toFixed(),
|
||||
TUSD: oneEther.multipliedBy('0.00364714136416').toFixed(),
|
||||
UNI: oneEther.multipliedBy('0.00536479').toFixed(),
|
||||
USDC: oneEther.multipliedBy('0.00367714136416').toFixed(),
|
||||
USDT: oneEther.multipliedBy('0.00369068412860').toFixed(),
|
||||
WETH: oneEther.toFixed(),
|
||||
WBTC: oneEther.multipliedBy('47.332685').toFixed(),
|
||||
YFI: oneEther.multipliedBy('22.407436').toFixed(),
|
||||
ZRX: oneEther.multipliedBy('0.001151').toFixed(),
|
||||
// DAI: oneEther.multipliedBy('0.00369068412860').toFixed(),
|
||||
// USDC: oneEther.multipliedBy('0.00367714136416').toFixed(),
|
||||
// USDT: oneEther.multipliedBy('0.00369068412860').toFixed(),
|
||||
// WBTC: oneEther.multipliedBy('47.332685').toFixed(),
|
||||
// WETH: oneEther.toFixed(),
|
||||
UniDAIWETH: oneEther.multipliedBy('22.407436').toFixed(),
|
||||
UniWBTCWETH: oneEther.multipliedBy('22.407436').toFixed(),
|
||||
UniAAVEWETH: oneEther.multipliedBy('0.003620948469').toFixed(),
|
||||
UniBATWETH: oneEther.multipliedBy('22.407436').toFixed(),
|
||||
UniUSDCDAI: oneEther.multipliedBy('22.407436').toFixed(),
|
||||
UniCRVWETH: oneEther.multipliedBy('22.407436').toFixed(),
|
||||
UniLINKWETH: oneEther.multipliedBy('0.009955').toFixed(),
|
||||
UniMKRWETH: oneEther.multipliedBy('22.407436').toFixed(),
|
||||
UniRENWETH: oneEther.multipliedBy('22.407436').toFixed(),
|
||||
UniSNXWETH: oneEther.multipliedBy('22.407436').toFixed(),
|
||||
UniUNIWETH: oneEther.multipliedBy('22.407436').toFixed(),
|
||||
UniUSDCWETH: oneEther.multipliedBy('22.407436').toFixed(),
|
||||
UniWBTCUSDC: oneEther.multipliedBy('22.407436').toFixed(),
|
||||
UniYFIWETH: oneEther.multipliedBy('22.407436').toFixed(),
|
||||
BptWBTCWETH: oneEther.multipliedBy('22.407436').toFixed(),
|
||||
MATIC: oneEther.multipliedBy('0.003620948469').toFixed(),
|
||||
USD: '5848466240000000',
|
||||
};
|
||||
// ----------------
|
||||
// PROTOCOL GLOBAL PARAMS
|
||||
// ----------------
|
||||
|
|
|
@ -1,51 +1,7 @@
|
|||
import BigNumber from 'bignumber.js';
|
||||
import { oneEther, oneRay, RAY, ZERO_ADDRESS } from '../../helpers/constants';
|
||||
import { oneEther, oneRay, RAY, ZERO_ADDRESS, MOCK_CHAINLINK_AGGREGATORS_PRICES } from '../../helpers/constants';
|
||||
import { ICommonConfiguration, EthereumNetwork, eEthereumNetwork } from '../../helpers/types';
|
||||
|
||||
const MOCK_CHAINLINK_AGGREGATORS_PRICES = {
|
||||
AAVE: oneEther.multipliedBy('0.003620948469').toFixed(),
|
||||
BAT: oneEther.multipliedBy('0.00137893825230').toFixed(),
|
||||
BUSD: oneEther.multipliedBy('0.00736484').toFixed(),
|
||||
DAI: oneEther.multipliedBy('0.00369068412860').toFixed(),
|
||||
ENJ: oneEther.multipliedBy('0.00029560').toFixed(),
|
||||
KNC: oneEther.multipliedBy('0.001072').toFixed(),
|
||||
LINK: oneEther.multipliedBy('0.009955').toFixed(),
|
||||
MANA: oneEther.multipliedBy('0.000158').toFixed(),
|
||||
MKR: oneEther.multipliedBy('2.508581').toFixed(),
|
||||
REN: oneEther.multipliedBy('0.00065133').toFixed(),
|
||||
SNX: oneEther.multipliedBy('0.00442616').toFixed(),
|
||||
SUSD: oneEther.multipliedBy('0.00364714136416').toFixed(),
|
||||
TUSD: oneEther.multipliedBy('0.00364714136416').toFixed(),
|
||||
UNI: oneEther.multipliedBy('0.00536479').toFixed(),
|
||||
USDC: oneEther.multipliedBy('0.00367714136416').toFixed(),
|
||||
USDT: oneEther.multipliedBy('0.00369068412860').toFixed(),
|
||||
WETH: oneEther.toFixed(),
|
||||
WBTC: oneEther.multipliedBy('47.332685').toFixed(),
|
||||
YFI: oneEther.multipliedBy('22.407436').toFixed(),
|
||||
ZRX: oneEther.multipliedBy('0.001151').toFixed(),
|
||||
// LpDAI: oneEther.multipliedBy('0.00369068412860').toFixed(),
|
||||
// LpUSDC: oneEther.multipliedBy('0.00367714136416').toFixed(),
|
||||
// LpUSDT: oneEther.multipliedBy('0.00369068412860').toFixed(),
|
||||
// LpWBTC: oneEther.multipliedBy('47.332685').toFixed(),
|
||||
// LpWETH: oneEther.toFixed(),
|
||||
UniDAIWETH: oneEther.multipliedBy('22.407436').toFixed(),
|
||||
UniWBTCWETH: oneEther.multipliedBy('22.407436').toFixed(),
|
||||
UniAAVEWETH: oneEther.multipliedBy('0.003620948469').toFixed(),
|
||||
UniBATWETH: oneEther.multipliedBy('22.407436').toFixed(),
|
||||
UniUSDCDAI: oneEther.multipliedBy('22.407436').toFixed(),
|
||||
UniCRVWETH: oneEther.multipliedBy('22.407436').toFixed(),
|
||||
UniLINKWETH: oneEther.multipliedBy('0.009955').toFixed(),
|
||||
UniMKRWETH: oneEther.multipliedBy('22.407436').toFixed(),
|
||||
UniRENWETH: oneEther.multipliedBy('22.407436').toFixed(),
|
||||
UniSNXWETH: oneEther.multipliedBy('22.407436').toFixed(),
|
||||
UniUNIWETH: oneEther.multipliedBy('22.407436').toFixed(),
|
||||
UniUSDCWETH: oneEther.multipliedBy('22.407436').toFixed(),
|
||||
UniWBTCUSDC: oneEther.multipliedBy('22.407436').toFixed(),
|
||||
UniYFIWETH: oneEther.multipliedBy('22.407436').toFixed(),
|
||||
BptWBTCWETH: oneEther.multipliedBy('22.407436').toFixed(),
|
||||
MATIC: oneEther.multipliedBy('0.003620948469').toFixed(),
|
||||
USD: '5848466240000000',
|
||||
};
|
||||
// ----------------
|
||||
// PROTOCOL GLOBAL PARAMS
|
||||
// ----------------
|
||||
|
|
|
@ -185,6 +185,7 @@ const buildTestEnv = async (deployer: Signer, secondaryWallet: Signer) => {
|
|||
UniWBTCUSDC: mockTokens.UniWBTCUSDC.address,
|
||||
UniYFIWETH: mockTokens.UniYFIWETH.address,
|
||||
BptWBTCWETH: mockTokens.BptWBTCWETH.address,
|
||||
MATIC: mockTokens.MATIC.address,
|
||||
USD: USD_ADDRESS,
|
||||
},
|
||||
fallbackOracle
|
||||
|
|
|
@ -185,6 +185,7 @@ const buildTestEnv = async (deployer: Signer, secondaryWallet: Signer) => {
|
|||
UniWBTCUSDC: mockTokens.UniWBTCUSDC.address,
|
||||
UniYFIWETH: mockTokens.UniYFIWETH.address,
|
||||
BptWBTCWETH: mockTokens.BptWBTCWETH.address,
|
||||
MATIC: mockTokens.MATIC.address,
|
||||
USD: USD_ADDRESS,
|
||||
},
|
||||
fallbackOracle
|
||||
|
|
Loading…
Reference in New Issue
Block a user