Removed mock swap

This commit is contained in:
David Racero 2020-10-22 18:27:23 +02:00
parent fd61ab9018
commit 64df1eeb36
7 changed files with 7 additions and 40 deletions

View File

@ -86,7 +86,8 @@
},
"LendingPool": {
"buidlerevm": {
"address": "0xD9273d497eDBC967F39d419461CfcF382a0A822e"
"address": "0xBEF0d4b9c089a5883741fC14cbA352055f35DDA2",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0x3EE716e38f21e5FC16BFDB773db24D63C637A5d8"
@ -235,7 +236,7 @@
},
"WalletBalanceProvider": {
"buidlerevm": {
"address": "0xd4e934C2749CA8C1618659D02E7B28B074bf4df7",
"address": "0x93bB79570dFECC052e36E25cE10793A139e75f1b",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
@ -694,17 +695,6 @@
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"MockSwapAdapter": {
"buidlerevm": {
"address": "0x93bB79570dFECC052e36E25cE10793A139e75f1b"
},
"coverage": {
"address": "0xBEF0d4b9c089a5883741fC14cbA352055f35DDA2"
},
"localhost": {
"address": "0x48FAde2E719B770E1783d03466dAEe98b5183538"
}
},
"MockFlashRepayAdapter": {
"buidlerevm": {
"address": "0xDf73fC454FA018051D4a1509e63D11530A59DE10"
@ -717,19 +707,19 @@
},
"ReserveLogic": {
"buidlerevm": {
"address": "0xFAe0fd738dAbc8a0426F47437322b6d026A9FD95",
"address": "0x63387deC8C4a0F17Cf0C27Ea3476F03F6a45d3AE",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"GenericLogic": {
"buidlerevm": {
"address": "0x6082731fdAba4761277Fb31299ebC782AD3bCf24",
"address": "0x8280D40C9E9F04229D2435EAad6e0011309ce81B",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"ValidationLogic": {
"buidlerevm": {
"address": "0x8456161947DFc1fC159A0B26c025cD2b4bba0c3e",
"address": "0x2B681757d757fbB80cc51c6094cEF5eE75bF55aA",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},

View File

@ -33,7 +33,6 @@ import {
MintableErc20Factory,
MockAggregatorFactory,
MockFlashLoanReceiverFactory,
MockSwapAdapterFactory,
PriceOracleFactory,
ReserveLogicFactory,
StableDebtTokenFactory,
@ -227,9 +226,6 @@ export const deployWalletBalancerProvider = async (
verify
);
export const deployMockSwapAdapter = async (addressesProvider: tEthereumAddress) =>
await new MockSwapAdapterFactory(await getFirstSigner()).deploy(addressesProvider);
export const deployAaveProtocolTestHelpers = async (
addressesProvider: tEthereumAddress,
verify?: boolean

View File

@ -10,7 +10,6 @@ import {
LendingRateOracleFactory,
MintableErc20Factory,
MockFlashLoanReceiverFactory,
MockSwapAdapterFactory,
PriceOracleFactory,
ReserveLogicFactory,
StableDebtTokenFactory,
@ -115,13 +114,6 @@ export const getMockFlashLoanReceiver = async (address?: tEthereumAddress) =>
await getFirstSigner()
);
export const getMockSwapAdapter = async (address?: tEthereumAddress) =>
await MockSwapAdapterFactory.connect(
address ||
(await getDb().get(`${eContractid.MockSwapAdapter}.${BRE.network.name}`).value()).address,
await getFirstSigner()
);
export const getLendingRateOracle = async (address?: tEthereumAddress) =>
await LendingRateOracleFactory.connect(
address ||

View File

@ -44,7 +44,6 @@ export enum eContractid {
LendingPoolCollateralManager = 'LendingPoolCollateralManager',
InitializableAdminUpgradeabilityProxy = 'InitializableAdminUpgradeabilityProxy',
MockFlashLoanReceiver = 'MockFlashLoanReceiver',
MockSwapAdapter = 'MockSwapAdapter',
WalletBalanceProvider = 'WalletBalanceProvider',
AToken = 'AToken',
MockAToken = 'MockAToken',

View File

@ -17,7 +17,6 @@ import {
deployMockFlashLoanReceiver,
deployWalletBalancerProvider,
deployAaveProtocolTestHelpers,
deployMockSwapAdapter,
deployLendingRateOracle,
} from '../helpers/contracts-deployments';
import {Signer} from 'ethers';
@ -239,9 +238,6 @@ const buildTestEnv = async (deployer: Signer, secondaryWallet: Signer) => {
const mockFlashLoanReceiver = await deployMockFlashLoanReceiver(addressesProvider.address);
await insertContractAddressInDb(eContractid.MockFlashLoanReceiver, mockFlashLoanReceiver.address);
const mockSwapAdapter = await deployMockSwapAdapter(addressesProvider.address);
await insertContractAddressInDb(eContractid.MockSwapAdapter, mockSwapAdapter.address);
await deployWalletBalancerProvider(addressesProvider.address);
console.log('END');

View File

@ -8,7 +8,6 @@ import {
getMintableErc20,
getLendingPoolConfiguratorProxy,
getPriceOracle,
getMockSwapAdapter,
getLendingPoolAddressesProviderRegistry,
} from '../../helpers/contracts-getters';
import {tEthereumAddress} from '../../helpers/types';
@ -24,7 +23,6 @@ import bignumberChai from 'chai-bignumber';
import {almostEqual} from './almost-equal';
import {PriceOracle} from '../../types/PriceOracle';
import {LendingPoolAddressesProvider} from '../../types/LendingPoolAddressesProvider';
import {MockSwapAdapter} from '../../types/MockSwapAdapter';
import {LendingPoolAddressesProviderRegistry} from '../../types/LendingPoolAddressesProviderRegistry';
import {getEthersSigners} from '../../helpers/contracts-helpers';
chai.use(bignumberChai());
@ -48,7 +46,6 @@ export interface TestEnv {
usdc: MintableERC20;
lend: MintableERC20;
addressesProvider: LendingPoolAddressesProvider;
mockSwapAdapter: MockSwapAdapter;
registry: LendingPoolAddressesProviderRegistry;
}
@ -73,7 +70,6 @@ const testEnv: TestEnv = {
usdc: {} as MintableERC20,
lend: {} as MintableERC20,
addressesProvider: {} as LendingPoolAddressesProvider,
mockSwapAdapter: {} as MockSwapAdapter,
registry: {} as LendingPoolAddressesProviderRegistry,
} as TestEnv;
@ -132,8 +128,6 @@ export async function initializeMakeSuite() {
testEnv.usdc = await getMintableErc20(usdcAddress);
testEnv.lend = await getMintableErc20(lendAddress);
testEnv.weth = await getMintableErc20(wethAddress);
testEnv.mockSwapAdapter = await getMockSwapAdapter();
}
export function makeSuite(name: string, tests: (testEnv: TestEnv) => void) {

View File

@ -276,7 +276,7 @@ makeSuite('Pausable Pool', (testEnv: TestEnv) => {
});
it('SwapBorrowRateMode', async () => {
const {pool, weth, dai, usdc, users, configurator, mockSwapAdapter} = testEnv;
const {pool, weth, dai, usdc, users, configurator} = testEnv;
const user = users[1];
const amountWETHToDeposit = parseEther('10');
const amountDAIToDeposit = parseEther('120');