From 1f8efbd4f523055d2b6a46a57dc00585fbc73a6b Mon Sep 17 00:00:00 2001 From: emilio Date: Tue, 27 Oct 2020 11:08:11 +0100 Subject: [PATCH] Removed swapAdapter from the migration scripts --- deployed-contracts.json | 8 ++++---- helpers/contracts-helpers.ts | 11 ----------- helpers/types.ts | 1 - test/__setup.spec.ts | 4 ---- test/helpers/make-suite.ts | 6 ------ test/pausable-functions.spec.ts | 2 +- 6 files changed, 5 insertions(+), 27 deletions(-) diff --git a/deployed-contracts.json b/deployed-contracts.json index c924bcb9..f924b450 100644 --- a/deployed-contracts.json +++ b/deployed-contracts.json @@ -235,7 +235,7 @@ }, "WalletBalanceProvider": { "buidlerevm": { - "address": "0x2cfcA5785261fbC88EFFDd46fCFc04c22525F9e4", + "address": "0xDf73fC454FA018051D4a1509e63D11530A59DE10", "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" }, "localhost": { @@ -640,7 +640,7 @@ }, "MockAToken": { "buidlerevm": { - "address": "0x392E5355a0e88Bd394F717227c752670fb3a8020", + "address": "0x3bDA11B584dDff7F66E0cFe1da1562c92B45db60", "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" }, "localhost": { @@ -668,7 +668,7 @@ }, "MockStableDebtToken": { "buidlerevm": { - "address": "0x3b050AFb4ac4ACE646b31fF3639C1CD43aC31460", + "address": "0x392E5355a0e88Bd394F717227c752670fb3a8020", "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" }, "localhost": { @@ -682,7 +682,7 @@ }, "MockVariableDebtToken": { "buidlerevm": { - "address": "0xEBAB67ee3ef604D5c250A53b4b8fcbBC6ec3007C", + "address": "0x3b050AFb4ac4ACE646b31fF3639C1CD43aC31460", "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" }, "localhost": { diff --git a/helpers/contracts-helpers.ts b/helpers/contracts-helpers.ts index a53da9ca..93f0c307 100644 --- a/helpers/contracts-helpers.ts +++ b/helpers/contracts-helpers.ts @@ -47,7 +47,6 @@ const { export type MockTokenMap = {[symbol: string]: MintableERC20}; import {ZERO_ADDRESS} from './constants'; -import {MockSwapAdapter} from '../types/MockSwapAdapter'; import {signTypedData_v4, TypedData} from 'eth-sig-util'; import {fromRpcSig, ECDSASignature} from 'ethereumjs-util'; import {SignerWithAddress} from '../test/helpers/make-suite'; @@ -322,8 +321,6 @@ export const deployWalletBalancerProvider = async ( } return instance; }; -export const deployMockSwapAdapter = async (addressesProvider: tEthereumAddress) => - await deployContract(eContractid.MockSwapAdapter, [addressesProvider]); export const deployAaveProtocolTestHelpers = async ( addressesProvider: tEthereumAddress, @@ -549,14 +546,6 @@ export const getMockFlashLoanReceiver = async (address?: tEthereumAddress) => { ); }; -export const getMockSwapAdapter = async (address?: tEthereumAddress) => { - return await getContract( - eContractid.MockSwapAdapter, - address || - (await getDb().get(`${eContractid.MockSwapAdapter}.${BRE.network.name}`).value()).address - ); -}; - export const getLendingRateOracle = async (address?: tEthereumAddress) => { return await getContract( eContractid.LendingRateOracle, diff --git a/helpers/types.ts b/helpers/types.ts index ce5f0e2e..305ec335 100644 --- a/helpers/types.ts +++ b/helpers/types.ts @@ -44,7 +44,6 @@ export enum eContractid { LendingPoolCollateralManager = 'LendingPoolCollateralManager', InitializableAdminUpgradeabilityProxy = 'InitializableAdminUpgradeabilityProxy', MockFlashLoanReceiver = 'MockFlashLoanReceiver', - MockSwapAdapter = 'MockSwapAdapter', WalletBalanceProvider = 'WalletBalanceProvider', AToken = 'AToken', MockAToken = 'MockAToken', diff --git a/test/__setup.spec.ts b/test/__setup.spec.ts index 676ae52a..8a7b1e62 100644 --- a/test/__setup.spec.ts +++ b/test/__setup.spec.ts @@ -19,7 +19,6 @@ import { registerContractInJsonDb, getPairsTokenAggregator, initReserves, - deployMockSwapAdapter, deployLendingRateOracle, } from '../helpers/contracts-helpers'; 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.timeEnd('setup'); diff --git a/test/helpers/make-suite.ts b/test/helpers/make-suite.ts index 5eb8788f..6618725f 100644 --- a/test/helpers/make-suite.ts +++ b/test/helpers/make-suite.ts @@ -9,7 +9,6 @@ import { getMintableErc20, getLendingPoolConfiguratorProxy, getPriceOracle, - getMockSwapAdapter, getLendingPoolAddressesProviderRegistry, } from '../../helpers/contracts-helpers'; import {tEthereumAddress} from '../../helpers/types'; @@ -25,7 +24,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'; chai.use(bignumberChai()); chai.use(almostEqual()); @@ -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; @@ -134,8 +130,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) { diff --git a/test/pausable-functions.spec.ts b/test/pausable-functions.spec.ts index cc8fb0d4..48c50ee2 100644 --- a/test/pausable-functions.spec.ts +++ b/test/pausable-functions.spec.ts @@ -275,7 +275,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');