Updated test cases

This commit is contained in:
The3D 2020-06-26 21:28:18 +02:00
parent c298579908
commit 1980773a58
10 changed files with 663 additions and 73 deletions

View File

@ -1,37 +1,34 @@
import {usePlugin, BuidlerConfig} from "@nomiclabs/buidler/config";
import path from "path";
import fs from "fs";
import {usePlugin, BuidlerConfig} from '@nomiclabs/buidler/config';
import path from 'path';
import fs from 'fs';
// @ts-ignore
import {accounts} from "./test-wallets.js";
import {eEthereumNetwork} from "./helpers/types";
import {accounts} from './test-wallets.js';
import {eEthereumNetwork} from './helpers/types';
usePlugin("@nomiclabs/buidler-ethers");
usePlugin("buidler-typechain");
usePlugin("solidity-coverage");
usePlugin("@nomiclabs/buidler-waffle");
usePlugin("@nomiclabs/buidler-etherscan");
usePlugin('@nomiclabs/buidler-ethers');
usePlugin('buidler-typechain');
usePlugin('solidity-coverage');
usePlugin('@nomiclabs/buidler-waffle');
usePlugin('@nomiclabs/buidler-etherscan');
["misc", "deployments", "migrations"].forEach((folder) => {
const tasksPath = path.join(__dirname, "tasks", folder);
['misc', 'deployments', 'migrations'].forEach((folder) => {
const tasksPath = path.join(__dirname, 'tasks', folder);
fs.readdirSync(tasksPath).forEach((task) => require(`${tasksPath}/${task}`));
});
const DEFAULT_BLOCK_GAS_LIMIT = 10000000;
const DEFAULT_GAS_PRICE = 10;
const HARDFORK = "istanbul";
const INFURA_KEY = "";
const ETHERSCAN_KEY = "";
const HARDFORK = 'istanbul';
const INFURA_KEY = '';
const ETHERSCAN_KEY = '';
const MNEMONIC_PATH = "m/44'/60'/0'/0";
const MNEMONICS: {[network: string]: string} = {
[eEthereumNetwork.kovan]: "",
[eEthereumNetwork.ropsten]: "",
[eEthereumNetwork.main]: "",
[eEthereumNetwork.kovan]: '',
[eEthereumNetwork.ropsten]: '',
[eEthereumNetwork.main]: '',
};
const getCommonNetworkConfig = (
networkName: eEthereumNetwork,
networkId: number
) => {
const getCommonNetworkConfig = (networkName: eEthereumNetwork, networkId: number) => {
return {
url: `https://${networkName}.infura.io/v3/${INFURA_KEY}`,
hardfork: HARDFORK,
@ -47,21 +44,21 @@ const getCommonNetworkConfig = (
};
};
const config: BuidlerConfig = {
const config: any = {
solc: {
version: "0.6.8",
version: '0.6.8',
optimizer: {enabled: true, runs: 200},
evmVersion: "istanbul",
evmVersion: 'istanbul',
},
typechain: {
outDir: "types",
target: "ethers-v4",
outDir: 'types',
target: 'ethers-v4',
},
etherscan: {
url: "https://api-kovan.etherscan.io/api",
url: 'https://api-kovan.etherscan.io/api',
apiKey: ETHERSCAN_KEY,
},
defaultNetwork: "buidlerevm",
defaultNetwork: 'buidlerevm',
mocha: {
timeout: 0,
},
@ -70,31 +67,28 @@ const config: BuidlerConfig = {
ropsten: getCommonNetworkConfig(eEthereumNetwork.ropsten, 3),
main: getCommonNetworkConfig(eEthereumNetwork.main, 1),
buidlerevm: {
hardfork: "istanbul",
hardfork: 'istanbul',
blockGasLimit: DEFAULT_BLOCK_GAS_LIMIT,
gas: DEFAULT_BLOCK_GAS_LIMIT,
gasPrice: 8000000000,
chainId: 31337,
throwOnTransactionFailures: true,
throwOnCallFailures: true,
accounts: accounts.map(
({secretKey, balance}: {secretKey: string; balance: string}) => ({
privateKey: secretKey,
balance,
})
),
accounts: accounts.map(({secretKey, balance}: {secretKey: string; balance: string}) => ({
privateKey: secretKey,
balance,
})),
},
ganache: {
url: "http://ganache:8545",
url: 'http://ganache:8545',
accounts: {
mnemonic:
"fox sight canyon orphan hotel grow hedgehog build bless august weather swarm",
mnemonic: 'fox sight canyon orphan hotel grow hedgehog build bless august weather swarm',
path: "m/44'/60'/0'/0",
initialIndex: 0,
count: 20,
},
},
},
}
};
export default config;

View File

@ -39,19 +39,19 @@ contract DefaultReserveInterestRateStrategy is IReserveInterestRateStrategy {
LendingPoolAddressesProvider public addressesProvider;
//base variable borrow rate when Utilization rate = 0. Expressed in ray
uint256 internal baseVariableBorrowRate;
uint256 internal immutable baseVariableBorrowRate;
//slope of the variable interest curve when utilization rate > 0 and <= OPTIMAL_UTILIZATION_RATE. Expressed in ray
uint256 internal variableRateSlope1;
uint256 internal immutable variableRateSlope1;
//slope of the variable interest curve when utilization rate > OPTIMAL_UTILIZATION_RATE. Expressed in ray
uint256 internal variableRateSlope2;
uint256 internal immutable variableRateSlope2;
//slope of the stable interest curve when utilization rate > 0 and <= OPTIMAL_UTILIZATION_RATE. Expressed in ray
uint256 internal stableRateSlope1;
uint256 internal immutable stableRateSlope1;
//slope of the stable interest curve when utilization rate > OPTIMAL_UTILIZATION_RATE. Expressed in ray
uint256 internal stableRateSlope2;
uint256 internal immutable stableRateSlope2;
constructor(
LendingPoolAddressesProvider _provider,

View File

@ -21,6 +21,7 @@ import "../interfaces/IFeeProvider.sol";
import "../flashloan/interfaces/IFlashLoanReceiver.sol";
import "./LendingPoolLiquidationManager.sol";
import "../interfaces/IPriceOracleGetter.sol";
import "@nomiclabs/buidler/console.sol";
/**
* @title LendingPool contract
@ -381,7 +382,6 @@ contract LendingPool is ReentrancyGuard, VersionedInitializable {
);
//all conditions passed - borrow is accepted
reserve.updateStateOnBorrow(
user,
principalBorrowBalance,
@ -539,9 +539,8 @@ contract LendingPool is ReentrancyGuard, VersionedInitializable {
if (IERC20(_reserve).isETH()) {
//send excess ETH back to the caller if needed
uint256 exceedAmount = msg.value.sub(vars.originationFee).sub(
vars.paybackAmountMinusFees
);
uint256 exceedAmount = msg.value.sub(vars.paybackAmount);
if (exceedAmount > 0) {
IERC20(_reserve).universalTransfer(msg.sender, exceedAmount);
}

View File

@ -321,15 +321,20 @@ library ReserveLogic {
) internal {
uint256 currentAvgStableRate = _reserve.currentAverageStableBorrowRate;
uint256 balance = IERC20(_reserveAddress).universalBalanceOf(address(this));
//if the reserve is ETH, the msg.value has already been cumulated to the balance of the reserve
if(IERC20(_reserveAddress).isETH()){
balance = balance.sub(msg.value);
}
(uint256 newLiquidityRate, uint256 newStableRate, uint256 newVariableRate) = IReserveInterestRateStrategy(
_reserve
.interestRateStrategyAddress
)
.calculateInterestRates(
_reserveAddress,
IERC20(_reserveAddress).universalBalanceOf(address(this)).add(_liquidityAdded).sub(
_liquidityTaken
),
balance.add(_liquidityAdded).sub(_liquidityTaken),
_reserve.totalBorrowsStable,
_reserve.totalBorrowsVariable,
currentAvgStableRate

View File

@ -14,6 +14,7 @@ import {UniversalERC20} from "./UniversalERC20.sol";
import {IPriceOracleGetter} from "../interfaces/IPriceOracleGetter.sol";
import {IFeeProvider} from "../interfaces/IFeeProvider.sol";
import "@nomiclabs/buidler/console.sol";
library ValidationLogic {
using ReserveLogic for CoreLibrary.ReserveData;

View File

@ -3,23 +3,38 @@
"buidlerevm": {
"address": "0xB00cC45B4a7d3e1FEE684cFc4417998A1c183e6d",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0x9cbEE5c0A6178F61dcD57C3b21180C8602aBdAc1",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"LendingPoolAddressesProvider": {
"buidlerevm": {
"address": "0x58F132FBB86E21545A4Bace3C19f1C05d86d7A22",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0xdE00B3eb5e9F867eE45F9B9E5aF0d102Fe6A093f",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"LendingPoolAddressesProviderRegistry": {
"buidlerevm": {
"address": "0x22474D350EC2dA53D717E30b96e9a2B7628Ede5b",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0x1b52F7d75DA9b64daF2D8ad2E7eaf75205c99d3B",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"FeeProvider": {
"buidlerevm": {
"address": "0x852e3718A320aD93Ad8692E8D663d247e4c1b400"
},
"localhost": {
"address": "0x704e04A46B436335f2024c54373F64863F879532"
}
},
"LendingPoolParametersProvider": {
@ -35,6 +50,9 @@
"LendingPoolConfigurator": {
"buidlerevm": {
"address": "0x2C4603396dE2F08642354A3A102760827FfFe113"
},
"localhost": {
"address": "0x1899Fe21bB5135E792F34fe89F3F47246c92D724"
}
},
"LendingPoolDataProvider": {
@ -45,36 +63,59 @@
"LendingPool": {
"buidlerevm": {
"address": "0xA10958a24032283FbE2D23cedf264d6eC9411CBA"
},
"localhost": {
"address": "0x4ec19E17FC0A28Dda89a5a96C8f65dfbAE922CA6"
}
},
"PriceOracle": {
"buidlerevm": {
"address": "0x8731324a6C09a1745bD15009Dc8FcceF11c05F4a",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0x3c3AB51fF33032159e82E1FDEe6503dEd082F1d9",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"MockAggregator": {
"buidlerevm": {
"address": "0x474d9b0D5F1Bb1602711F9346743a7a7478d6f52",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0x5B51d8344769d18fB85DF29EDbaB8E94dbA38455",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"ChainlinkProxyPriceProvider": {
"buidlerevm": {
"address": "0xf91aC1098F3b154671Ce83290114aaE45ac0225f",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0xd8f831Ef919D3f38694f2797CD44D7Cc7d595A67",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"LendingRateOracle": {
"buidlerevm": {
"address": "0xf4830d6b1D70C8595d3BD8A63f9ed9F636DB9ef2",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0xc52Df73f1BBe582061C65a2bd36A1d685f0a2BE5",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"DefaultReserveInterestRateStrategy": {
"buidlerevm": {
"address": "0xFf130817Aa9863B3D809A2A11617c05646245d80",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0x62ebEd87c709e29EaE50521059e8AF78D893d7D5",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"LendingPoolLiquidationManager": {
@ -87,177 +128,294 @@
"buidlerevm": {
"address": "0xe5a5a5b78F165C875EE2264a8743570176eA39d9",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0x2A7BE996B8801ED21f2f45148791D402811A2106",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"OneSplitAdapter": {
"buidlerevm": {
"address": "0x828C9C41Fae6113C1DEA9056Dcd9C85A19002d52",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0xcDfbcd115A4074d3311e6935Cb996b2C62F6F4F9",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"TokenDistributor": {
"buidlerevm": {
"address": "0x7d40dD74d3aE1a7e4A7dd08eaE899e85940563cd"
},
"localhost": {
"address": "0x8ba99a6fe4101539A3b403603d8C297E8074c4b8"
}
},
"InitializableAdminUpgradeabilityProxy": {
"buidlerevm": {
"address": "0x7d40dD74d3aE1a7e4A7dd08eaE899e85940563cd",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0x8ba99a6fe4101539A3b403603d8C297E8074c4b8",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"MockFlashLoanReceiver": {
"buidlerevm": {
"address": "0xB660Fdd109a95718cB9d20E3A89EE6cE342aDcB6"
},
"localhost": {
"address": "0xe3353ddEc0cf8aA6761a3C21D896D04ebd59bDe2"
}
},
"WalletBalanceProvider": {
"buidlerevm": {
"address": "0x830bceA96E56DBC1F8578f75fBaC0AF16B32A07d",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0xa7B8e0F888D416d7e08bD12029c6ec8b8Ed18373",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"DAI": {
"buidlerevm": {
"address": "0x7c2C195CD6D34B8F845992d380aADB2730bB9C6F",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0x16b610FCD65E552FAC8c8FC6AC9104E1E00a7B86",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"LEND": {
"buidlerevm": {
"address": "0x8858eeB3DfffA017D4BCE9801D340D36Cf895CCf",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0x4A9559FEF44B25F1A7157e047cD09683fe45c599",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"TUSD": {
"buidlerevm": {
"address": "0x0078371BDeDE8aAc7DeBfFf451B74c5EDB385Af7",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0x02F36856D11c723A78c91758b6e24b244Cdd05b0",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"BAT": {
"buidlerevm": {
"address": "0xf4e77E5Da47AC3125140c470c71cBca77B5c638c",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0xe94Cb57AD747445c13C08A931F3f1421C540eB5F",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"USDC": {
"buidlerevm": {
"address": "0xf784709d2317D872237C4bC22f867d1BAe2913AB",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0xE2ba935c1b3e833aFD45dA9CBCBDd2e90875ba30",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"USDT": {
"buidlerevm": {
"address": "0x3619DbE27d7c1e7E91aA738697Ae7Bc5FC3eACA5",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0x377eC146Bd9299cd8f5f35dc22DCdE3623E37ECB",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"SUSD": {
"buidlerevm": {
"address": "0x038B86d9d8FAFdd0a02ebd1A476432877b0107C8",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0x303CEAFd0aF91A63576FF7dEFc01E66ca2D19E3a",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"ZRX": {
"buidlerevm": {
"address": "0x1A1FEe7EeD918BD762173e4dc5EfDB8a78C924A8",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0x168ef56fCb0382f4808497C9570434684657A9D3",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"MKR": {
"buidlerevm": {
"address": "0x500D1d6A4c7D8Ae28240b47c8FCde034D827fD5e",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0x5366cD335B002b009304Dc74a21EC97e94510177",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"WBTC": {
"buidlerevm": {
"address": "0xc4905364b78a742ccce7B890A89514061E47068D",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0x8821b8e3000629f2c43BB99A092f6687366592F0",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"LINK": {
"buidlerevm": {
"address": "0xD6C850aeBFDC46D7F4c207e445cC0d6B0919BDBe",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0x71FF58Af627447C233Febdb9390CFB6c52fAA3a7",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"KNC": {
"buidlerevm": {
"address": "0x8B5B7a6055E54a36fF574bbE40cf2eA68d5554b3",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0x3E447b144e446558c2467d95FcF17Eaee9d704Bf",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"MANA": {
"buidlerevm": {
"address": "0xEcc0a6dbC0bb4D51E4F84A315a9e5B0438cAD4f0",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0x6452dDB1f891be0426b6B519E461a777aeAe2E9d",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"REP": {
"buidlerevm": {
"address": "0x20Ce94F404343aD2752A2D01b43fa407db9E0D00",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0x6174769FBbC16D956a7bf70c3Ae7283341CAe3B6",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"SNX": {
"buidlerevm": {
"address": "0x1d80315fac6aBd3EfeEbE97dEc44461ba7556160",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0x9e498c2dF52Efdd649140417E405B9DeedcfEbE1",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"BUSD": {
"buidlerevm": {
"address": "0x2D8553F9ddA85A9B3259F6Bf26911364B85556F5",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0x09d5c8d8EB9dF4A9779778d4B2c66943F1A0f923",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"USD": {
"buidlerevm": {
"address": "0x52d3b94181f8654db2530b0fEe1B19173f519C52",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0x184E5376484c2728e7A2cb4E7f2c1975f4a177dA",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"UNI_DAI_ETH": {
"buidlerevm": {
"address": "0xd15468525c35BDBC1eD8F2e09A00F8a173437f2f",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0x23Fa899d0b780f2f439354DcdC325ff738d1234d",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"UNI_USDC_ETH": {
"buidlerevm": {
"address": "0x7e35Eaf7e8FBd7887ad538D4A38Df5BbD073814a",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0x398A7a447E4D9007Fa1A5F82F2D07F0B369bD26f",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"UNI_SETH_ETH": {
"buidlerevm": {
"address": "0x5bcb88A0d20426e451332eE6C4324b0e663c50E0",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0xc9ffDd024B01AcE9B8ee692b85797593ddd25eBb",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"UNI_LINK_ETH": {
"buidlerevm": {
"address": "0x3521eF8AaB0323004A6dD8b03CE890F4Ea3A13f5",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0xE95b5DF6c8c8b8AE04bb8ccA9802E5faf8E2a380",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"UNI_MKR_ETH": {
"buidlerevm": {
"address": "0x53369fd4680FfE3DfF39Fc6DDa9CfbfD43daeA2E",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0x8A054E7463937F7bf914B2a0C6C1a9D7348f32d9",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"UNI_LEND_ETH": {
"buidlerevm": {
"address": "0xB00cC45B4a7d3e1FEE684cFc4417998A1c183e6d",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0x9cbEE5c0A6178F61dcD57C3b21180C8602aBdAc1",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"AaveProtocolTestHelpers": {
"buidlerevm": {
"address": "0xA0AB1cB92A4AF81f84dCd258155B5c25D247b54E"
},
"localhost": {
"address": "0x7dF045e4721203EBEDD3436b15391f32A375Cbc4"
}
}
}

430
package-lock.json generated
View File

@ -133,6 +133,133 @@
"ganache-core": "^2.10.2"
}
},
"@ethersproject/abi": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.0.1.tgz",
"integrity": "sha512-9fqSa3jEYV4nN8tijW+jz4UnT/Ma9/b8y4+nHlsvuWqr32E2kYsT9SCIVpk/51iM6NOud7xsA6UxCox9zBeHKg==",
"dev": true,
"requires": {
"@ethersproject/address": "^5.0.0",
"@ethersproject/bignumber": "^5.0.0",
"@ethersproject/bytes": "^5.0.0",
"@ethersproject/constants": "^5.0.0",
"@ethersproject/hash": "^5.0.0",
"@ethersproject/keccak256": "^5.0.0",
"@ethersproject/logger": "^5.0.0",
"@ethersproject/properties": "^5.0.0",
"@ethersproject/strings": "^5.0.0"
}
},
"@ethersproject/address": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.0.1.tgz",
"integrity": "sha512-kfQtXpBP2pI2TfoRRAYv8grHGiYw8U0c1KbMsC58/W33TIBy7gFSf/oAzOd94lNzdIUenKU0OuSzrHQfVcDDDA==",
"dev": true,
"requires": {
"@ethersproject/bignumber": "^5.0.0",
"@ethersproject/bytes": "^5.0.0",
"@ethersproject/keccak256": "^5.0.0",
"@ethersproject/logger": "^5.0.0",
"@ethersproject/rlp": "^5.0.0",
"bn.js": "^4.4.0"
}
},
"@ethersproject/bignumber": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.0.1.tgz",
"integrity": "sha512-srGDO7ksT0avdDw5pBtj6F81psv5xiJMInwSSatfIKplitubFb6yVwoHGObGRd0Pp3TvrkIDfJkuskoSMj4OHQ==",
"dev": true,
"requires": {
"@ethersproject/bytes": "^5.0.0",
"@ethersproject/logger": "^5.0.0",
"@ethersproject/properties": "^5.0.0",
"bn.js": "^4.4.0"
}
},
"@ethersproject/bytes": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.0.1.tgz",
"integrity": "sha512-Y198536UW9Jb9RBXuqmCsCa9mYJUsxJn+5aGr2XjNMpLBc6vEn/44GHnbQXYgRCzh4rnWtJ9bTgSwDjme9Hgnw==",
"dev": true,
"requires": {
"@ethersproject/logger": "^5.0.0"
}
},
"@ethersproject/constants": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.0.1.tgz",
"integrity": "sha512-Xec07hFCPN4wfC3WDiRay7KipkApl2msiKTrBHCuAwNMOM8M92+mlQp8tgfEL51DPwCZkmdk1f02kArc6caVSw==",
"dev": true,
"requires": {
"@ethersproject/bignumber": "^5.0.0"
}
},
"@ethersproject/hash": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.0.1.tgz",
"integrity": "sha512-1ByUXYvkszrSSks07xctBtZfpFnIVmftxWlAAnguxh6Q65vKECd/EPi5uI5xVOvnrYMH9Vb8MK1SofPX/6fArQ==",
"dev": true,
"requires": {
"@ethersproject/bytes": "^5.0.0",
"@ethersproject/keccak256": "^5.0.0",
"@ethersproject/logger": "^5.0.0",
"@ethersproject/strings": "^5.0.0"
}
},
"@ethersproject/keccak256": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.0.1.tgz",
"integrity": "sha512-AtFm/4qHRQUvZcG3WYmaT7zV79dz72+N01w0XphcIBaD/7UZXyW85Uf08sirVlckHmh9fvc4UDWyHiroKsBT6Q==",
"dev": true,
"requires": {
"@ethersproject/bytes": "^5.0.0",
"js-sha3": "0.5.7"
},
"dependencies": {
"js-sha3": {
"version": "0.5.7",
"resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz",
"integrity": "sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc=",
"dev": true
}
}
},
"@ethersproject/logger": {
"version": "5.0.2",
"resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.0.2.tgz",
"integrity": "sha512-NQe3O1/Nwkcp6bto6hsTvrcCeR/cOGK+RhOMn0Zi2FND6gdWsf1g+5ie8gQ1REqDX4MTGP/Y131dZas985ls/g==",
"dev": true
},
"@ethersproject/properties": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.0.1.tgz",
"integrity": "sha512-b3VZ/NpYIf64/hFXeWNxVCbY1xoMPIYM3n6Qnu6Ayr3bLt1olFPQfAaaRB0aOsLz7tMtmkT3DrA1KG/IrOgBRw==",
"dev": true,
"requires": {
"@ethersproject/logger": "^5.0.0"
}
},
"@ethersproject/rlp": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.0.1.tgz",
"integrity": "sha512-3F8XE1zS4w8w4xiK1hMtFuVs6UnhQlmrEHLT85GanqK8vG5wGi81IQmkukL9tQIu2a5jykoO46ibja+6N1fpFg==",
"dev": true,
"requires": {
"@ethersproject/bytes": "^5.0.0",
"@ethersproject/logger": "^5.0.0"
}
},
"@ethersproject/strings": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.0.1.tgz",
"integrity": "sha512-N8LxdHGBT7GZdogkEOV5xKXYTz5PNHuNzcxLNPYfH3kpvWSyXshZBgAz8YE1a8sMZagGj+Ic6d3mHijdCTSkGA==",
"dev": true,
"requires": {
"@ethersproject/bytes": "^5.0.0",
"@ethersproject/constants": "^5.0.0",
"@ethersproject/logger": "^5.0.0"
}
},
"@nodelib/fs.scandir": {
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz",
@ -1046,12 +1173,30 @@
"integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==",
"dev": true
},
"@types/concat-stream": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/@types/concat-stream/-/concat-stream-1.6.0.tgz",
"integrity": "sha1-OU2+C7X+5Gs42JZzXoto7yOQ0A0=",
"dev": true,
"requires": {
"@types/node": "*"
}
},
"@types/events": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/@types/events/-/events-3.0.0.tgz",
"integrity": "sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g==",
"dev": true
},
"@types/form-data": {
"version": "0.0.33",
"resolved": "https://registry.npmjs.org/@types/form-data/-/form-data-0.0.33.tgz",
"integrity": "sha1-yayFsqX9GENbjIXZ7LUObWyJP/g=",
"dev": true,
"requires": {
"@types/node": "*"
}
},
"@types/glob": {
"version": "7.1.1",
"resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.1.tgz",
@ -1155,6 +1300,12 @@
"integrity": "sha512-5qOlnZscTn4xxM5MeGXAMOsIOIKIbh9e85zJWfBRVPlRMEVawzoPhINYbRGkBZCI8LxvBe7tJCdWiarA99OZfQ==",
"dev": true
},
"@types/qs": {
"version": "6.9.3",
"resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.3.tgz",
"integrity": "sha512-7s9EQWupR1fTc2pSMtXRQ9w9gLOcrJn+h7HOXw4evxyvVqMi4f+q7d2tnFe3ng3SNHjtK+0EzGMGFUQX4/AQRA==",
"dev": true
},
"@types/resolve": {
"version": "0.0.8",
"resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-0.0.8.tgz",
@ -1426,6 +1577,12 @@
"integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==",
"dev": true
},
"asap": {
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz",
"integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=",
"dev": true
},
"asn1": {
"version": "0.2.4",
"resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz",
@ -1905,6 +2062,15 @@
"integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=",
"dev": true
},
"buidler-gas-reporter": {
"version": "0.1.3",
"resolved": "https://registry.npmjs.org/buidler-gas-reporter/-/buidler-gas-reporter-0.1.3.tgz",
"integrity": "sha512-3Q27K52iGEghJ4icDdkV/67iJiRCaiZ39E2LLCBNZgx5NvltI5Q7oR3RVyCGO/m3SZBcj418zC8p7yeyj/jFdw==",
"dev": true,
"requires": {
"eth-gas-reporter": "^0.2.13"
}
},
"buidler-typechain": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/buidler-typechain/-/buidler-typechain-0.1.1.tgz",
@ -2007,6 +2173,12 @@
"supports-color": "^5.3.0"
}
},
"charenc": {
"version": "0.0.2",
"resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz",
"integrity": "sha1-wKHS86cJLgN3S/qD8UwPxXkKhmc=",
"dev": true
},
"check-error": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz",
@ -2060,6 +2232,17 @@
"safe-buffer": "^5.0.1"
}
},
"cli-table3": {
"version": "0.5.1",
"resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.5.1.tgz",
"integrity": "sha512-7Qg2Jrep1S/+Q3EceiZtQcDPWxhAvBw+ERf1162v4sikJrvojMHFqXt8QIVha8UlH9rgU0BeWPytZ9/TzYqlUw==",
"dev": true,
"requires": {
"colors": "^1.1.2",
"object-assign": "^4.1.0",
"string-width": "^2.1.1"
}
},
"cliui": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz",
@ -2123,6 +2306,12 @@
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
"dev": true
},
"colors": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz",
"integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==",
"dev": true
},
"combined-stream": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
@ -2170,6 +2359,56 @@
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
"dev": true
},
"concat-stream": {
"version": "1.6.2",
"resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz",
"integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==",
"dev": true,
"requires": {
"buffer-from": "^1.0.0",
"inherits": "^2.0.3",
"readable-stream": "^2.2.2",
"typedarray": "^0.0.6"
},
"dependencies": {
"isarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
"dev": true
},
"readable-stream": {
"version": "2.3.7",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
"integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
"dev": true,
"requires": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.3",
"isarray": "~1.0.0",
"process-nextick-args": "~2.0.0",
"safe-buffer": "~5.1.1",
"string_decoder": "~1.1.1",
"util-deprecate": "~1.0.1"
}
},
"safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
"dev": true
},
"string_decoder": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"dev": true,
"requires": {
"safe-buffer": "~5.1.0"
}
}
}
},
"config-chain": {
"version": "1.1.12",
"resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.12.tgz",
@ -2293,6 +2532,12 @@
"sha.js": "^2.4.8"
}
},
"crypt": {
"version": "0.0.2",
"resolved": "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz",
"integrity": "sha1-iNf/fsDfuG9xPch7u0LQRNPmxBs=",
"dev": true
},
"crypto-browserify": {
"version": "3.12.0",
"resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz",
@ -2967,6 +3212,29 @@
}
}
},
"eth-gas-reporter": {
"version": "0.2.17",
"resolved": "https://registry.npmjs.org/eth-gas-reporter/-/eth-gas-reporter-0.2.17.tgz",
"integrity": "sha512-MsrUqeXTAFU9QEdAIdaVu+QeU1XwFsKvPDEC68iheppVR5xUP11h4SyPhSRZiGfOzXr1CfTtPM/B6wPGtt7/LA==",
"dev": true,
"requires": {
"@ethersproject/abi": "^5.0.0-beta.146",
"@solidity-parser/parser": "^0.5.2",
"cli-table3": "^0.5.0",
"colors": "^1.1.2",
"ethereumjs-util": "6.2.0",
"ethers": "^4.0.40",
"fs-readdir-recursive": "^1.1.0",
"lodash": "^4.17.14",
"markdown-table": "^1.1.3",
"mocha": "^7.1.1",
"req-cwd": "^2.0.0",
"request": "^2.88.0",
"request-promise-native": "^1.0.5",
"sha1": "^1.1.1",
"sync-request": "^6.0.0"
}
},
"eth-lib": {
"version": "0.1.29",
"resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.1.29.tgz",
@ -3914,6 +4182,12 @@
"minipass": "^2.6.0"
}
},
"fs-readdir-recursive": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz",
"integrity": "sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA==",
"dev": true
},
"fs.realpath": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
@ -19048,6 +19322,12 @@
"integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=",
"dev": true
},
"get-port": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/get-port/-/get-port-3.2.0.tgz",
"integrity": "sha1-3Xzn3hh8Bsi/NTeWrHHgmfCYDrw=",
"dev": true
},
"get-proxy": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/get-proxy/-/get-proxy-2.1.0.tgz",
@ -19312,6 +19592,18 @@
"integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==",
"dev": true
},
"http-basic": {
"version": "8.1.3",
"resolved": "https://registry.npmjs.org/http-basic/-/http-basic-8.1.3.tgz",
"integrity": "sha512-/EcDMwJZh3mABI2NhGfHOGOeOZITqfkEO4p/xK+l3NpyncIHUQBoMvCSF/b5GqvKtySC2srL/GGG3+EtlqlmCw==",
"dev": true,
"requires": {
"caseless": "^0.12.0",
"concat-stream": "^1.6.2",
"http-response-object": "^3.0.1",
"parse-cache-control": "^1.0.1"
}
},
"http-cache-semantics": {
"version": "3.8.1",
"resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz",
@ -19337,6 +19629,23 @@
"integrity": "sha1-L5CN1fHbQGjAWM1ubUzjkskTOJs=",
"dev": true
},
"http-response-object": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/http-response-object/-/http-response-object-3.0.2.tgz",
"integrity": "sha512-bqX0XTF6fnXSQcEJ2Iuyr75yVakyjIDCqroJQ/aHfSdlM743Cwqoi2nDYMzLGWUcuTWGWy8AAvOKXTfiv6q9RA==",
"dev": true,
"requires": {
"@types/node": "^10.0.3"
},
"dependencies": {
"@types/node": {
"version": "10.17.26",
"resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.26.tgz",
"integrity": "sha512-myMwkO2Cr82kirHY8uknNRHEVtn0wV3DTQfkrjx17jmkstDRZ24gNUdl8AHXVyVclTYI/bNjgTPTAWvWLqXqkw==",
"dev": true
}
}
},
"http-signature": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz",
@ -20207,6 +20516,12 @@
"integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==",
"dev": true
},
"markdown-table": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-1.1.3.tgz",
"integrity": "sha512-1RUZVgQlpJSPWYbFSpmudq5nHY1doEIv89gBtF0s4gW1GF2XorxcA/70M5vq7rLv0a6mhOUccRsqkwhwLCIQ2Q==",
"dev": true
},
"md5.js": {
"version": "1.3.5",
"resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz",
@ -20975,6 +21290,12 @@
"safe-buffer": "^5.1.1"
}
},
"parse-cache-control": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/parse-cache-control/-/parse-cache-control-1.0.1.tgz",
"integrity": "sha1-juqz5U+laSD+Fro493+iGqzC104=",
"dev": true
},
"parse-code-context": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/parse-code-context/-/parse-code-context-1.0.0.tgz",
@ -21286,6 +21607,15 @@
"integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==",
"dev": true
},
"promise": {
"version": "8.1.0",
"resolved": "https://registry.npmjs.org/promise/-/promise-8.1.0.tgz",
"integrity": "sha512-W04AqnILOL/sPRXziNicCjSNRruLAuIHEOVBazepu0545DDNGYHz7ar9ZgZ1fMU8/MA4mVxp5rkBWRi6OXIy3Q==",
"dev": true,
"requires": {
"asap": "~2.0.6"
}
},
"proto-list": {
"version": "1.2.4",
"resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz",
@ -21448,6 +21778,32 @@
"minimatch": "3.0.4"
}
},
"req-cwd": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/req-cwd/-/req-cwd-2.0.0.tgz",
"integrity": "sha1-1AgrTURZgDZkD7c93qAe1T20nrw=",
"dev": true,
"requires": {
"req-from": "^2.0.0"
}
},
"req-from": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/req-from/-/req-from-2.0.0.tgz",
"integrity": "sha1-10GI5H+TeW9Kpx327jWuaJ8+DnA=",
"dev": true,
"requires": {
"resolve-from": "^3.0.0"
},
"dependencies": {
"resolve-from": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz",
"integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=",
"dev": true
}
}
},
"request": {
"version": "2.88.2",
"resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz",
@ -21505,6 +21861,17 @@
"lodash": "^4.17.15"
}
},
"request-promise-native": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.8.tgz",
"integrity": "sha512-dapwLGqkHtwL5AEbfenuzjTYg35Jd6KPytsC2/TLkVMz8rm+tNt72MGUWT1RP/aYawMpN6HqbNGBQaRcBtjQMQ==",
"dev": true,
"requires": {
"request-promise-core": "1.1.3",
"stealthy-require": "^1.1.1",
"tough-cookie": "^2.3.3"
}
},
"require-directory": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
@ -21835,6 +22202,16 @@
"safe-buffer": "^5.0.1"
}
},
"sha1": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/sha1/-/sha1-1.1.1.tgz",
"integrity": "sha1-rdqnqTFo85PxnrKxUJFhjicA+Eg=",
"dev": true,
"requires": {
"charenc": ">= 0.0.1",
"crypt": ">= 0.0.1"
}
},
"sha3": {
"version": "1.2.6",
"resolved": "https://registry.npmjs.org/sha3/-/sha3-1.2.6.tgz",
@ -22957,6 +23334,26 @@
}
}
},
"sync-request": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/sync-request/-/sync-request-6.1.0.tgz",
"integrity": "sha512-8fjNkrNlNCrVc/av+Jn+xxqfCjYaBoHqCsDz6mt030UMxJGr+GSfCV1dQt2gRtlL63+VPidwDVLr7V2OcTSdRw==",
"dev": true,
"requires": {
"http-response-object": "^3.0.1",
"sync-rpc": "^1.2.1",
"then-request": "^6.0.0"
}
},
"sync-rpc": {
"version": "1.3.6",
"resolved": "https://registry.npmjs.org/sync-rpc/-/sync-rpc-1.3.6.tgz",
"integrity": "sha512-J8jTXuZzRlvU7HemDgHi3pGnh/rkoqR/OZSjhTyyZrEkkYQbk7Z33AXp37mkPfPpfdOuj7Ex3H/TJM1z48uPQw==",
"dev": true,
"requires": {
"get-port": "^3.1.0"
}
},
"tar": {
"version": "4.4.13",
"resolved": "https://registry.npmjs.org/tar/-/tar-4.4.13.tgz",
@ -23052,6 +23449,33 @@
}
}
},
"then-request": {
"version": "6.0.2",
"resolved": "https://registry.npmjs.org/then-request/-/then-request-6.0.2.tgz",
"integrity": "sha512-3ZBiG7JvP3wbDzA9iNY5zJQcHL4jn/0BWtXIkagfz7QgOL/LqjCEOBQuJNZfu0XYnv5JhKh+cDxCPM4ILrqruA==",
"dev": true,
"requires": {
"@types/concat-stream": "^1.6.0",
"@types/form-data": "0.0.33",
"@types/node": "^8.0.0",
"@types/qs": "^6.2.31",
"caseless": "~0.12.0",
"concat-stream": "^1.6.0",
"form-data": "^2.2.0",
"http-basic": "^8.1.1",
"http-response-object": "^3.0.1",
"promise": "^8.0.0",
"qs": "^6.4.0"
},
"dependencies": {
"@types/node": {
"version": "8.10.61",
"resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.61.tgz",
"integrity": "sha512-l+zSbvT8TPRaCxL1l9cwHCb0tSqGAGcjPJFItGGYat5oCTiq1uQQKYg5m7AF1mgnEBzFXGLJ2LRmNjtreRX76Q==",
"dev": true
}
}
},
"through": {
"version": "2.3.8",
"resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz",
@ -23361,6 +23785,12 @@
}
}
},
"typedarray": {
"version": "0.0.6",
"resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
"integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=",
"dev": true
},
"typedarray-to-buffer": {
"version": "3.1.5",
"resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz",

View File

@ -32,6 +32,7 @@
"@types/mocha": "7.0.2",
"@types/node": "14.0.5",
"bignumber.js": "9.0.0",
"buidler-gas-reporter": "^0.1.3",
"buidler-typechain": "0.1.1",
"chai": "4.2.0",
"chai-bignumber": "3.0.0",

View File

@ -62,12 +62,31 @@ import { initializeMakeSuite } from './helpers/make-suite';
const deployAllMockTokens = async (deployer: Signer) => {
const tokens: {[symbol: string]: MockContract | MintableErc20} = {};
const protoConfigData = getReservesConfigByPool(AavePools.proto);
const secondaryConfigData = getReservesConfigByPool(AavePools.secondary);
for (const tokenSymbol of Object.keys(TokenContractId)) {
if (tokenSymbol !== "ETH") {
let decimals = 18;
let configData = (<any>protoConfigData)[tokenSymbol];
if(!configData){
configData = (<any>secondaryConfigData)[tokenSymbol]
}
if(!configData){
decimals = 18;
}
tokens[tokenSymbol] = await deployMintableErc20([
tokenSymbol,
tokenSymbol,
18,
configData ? configData.reserveDecimals : 18,
]);
await registerContractInJsonDb(
tokenSymbol.toUpperCase(),
@ -195,13 +214,9 @@ const initReserves = async (
string
][])[assetAddressIndex];
console.log("Getting active flag for reserve ", tokenAddress);
const {isActive: reserveInitialized} = await lendingPool.getReserveConfigurationData(
tokenAddress
);
console.log("Result ",reserveInitialized);
if (reserveInitialized) {
console.log(
@ -236,9 +251,7 @@ const initReserves = async (
stableRateSlope2,
]
);
console.log("Interest rate strategy deployed");
if (process.env.POOL === AavePools.secondary) {
if (assetSymbol.search("UNI") === -1) {
assetSymbol = `Uni${assetSymbol}`;

View File

@ -13,23 +13,12 @@ BigNumber.config({DECIMAL_PLACES: 0, ROUNDING_MODE: BigNumber.ROUND_DOWN});
const scenarioFolder = "./test/helpers/scenarios/";
fs.readdirSync(scenarioFolder).forEach((file) => {
if (
![
"borrow-negatives.json",
/* if (![
"borrow-repay-variable.json",
"borrow-repay-stable.json",
"deposit.json",
"redeem-negatives.json",
"redeem.json",
"set-use-as-collateral.json",
"swap-rate-mode.json",
"rebalance-stable-rate.json",
"interest-redirection.json",
"interest-redirection-negatives.json",
].includes(file)
)
return;
*/
const scenario = require(`./helpers/scenarios/${file}`);
makeSuite(scenario.title, async (testEnv) => {