mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
Removed swapAdapter from the migration scripts
This commit is contained in:
parent
4834a587f5
commit
1f8efbd4f5
|
@ -235,7 +235,7 @@
|
||||||
},
|
},
|
||||||
"WalletBalanceProvider": {
|
"WalletBalanceProvider": {
|
||||||
"buidlerevm": {
|
"buidlerevm": {
|
||||||
"address": "0x2cfcA5785261fbC88EFFDd46fCFc04c22525F9e4",
|
"address": "0xDf73fC454FA018051D4a1509e63D11530A59DE10",
|
||||||
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
|
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
|
||||||
},
|
},
|
||||||
"localhost": {
|
"localhost": {
|
||||||
|
@ -640,7 +640,7 @@
|
||||||
},
|
},
|
||||||
"MockAToken": {
|
"MockAToken": {
|
||||||
"buidlerevm": {
|
"buidlerevm": {
|
||||||
"address": "0x392E5355a0e88Bd394F717227c752670fb3a8020",
|
"address": "0x3bDA11B584dDff7F66E0cFe1da1562c92B45db60",
|
||||||
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
|
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
|
||||||
},
|
},
|
||||||
"localhost": {
|
"localhost": {
|
||||||
|
@ -668,7 +668,7 @@
|
||||||
},
|
},
|
||||||
"MockStableDebtToken": {
|
"MockStableDebtToken": {
|
||||||
"buidlerevm": {
|
"buidlerevm": {
|
||||||
"address": "0x3b050AFb4ac4ACE646b31fF3639C1CD43aC31460",
|
"address": "0x392E5355a0e88Bd394F717227c752670fb3a8020",
|
||||||
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
|
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
|
||||||
},
|
},
|
||||||
"localhost": {
|
"localhost": {
|
||||||
|
@ -682,7 +682,7 @@
|
||||||
},
|
},
|
||||||
"MockVariableDebtToken": {
|
"MockVariableDebtToken": {
|
||||||
"buidlerevm": {
|
"buidlerevm": {
|
||||||
"address": "0xEBAB67ee3ef604D5c250A53b4b8fcbBC6ec3007C",
|
"address": "0x3b050AFb4ac4ACE646b31fF3639C1CD43aC31460",
|
||||||
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
|
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
|
||||||
},
|
},
|
||||||
"localhost": {
|
"localhost": {
|
||||||
|
|
|
@ -47,7 +47,6 @@ const {
|
||||||
|
|
||||||
export type MockTokenMap = {[symbol: string]: MintableERC20};
|
export type MockTokenMap = {[symbol: string]: MintableERC20};
|
||||||
import {ZERO_ADDRESS} from './constants';
|
import {ZERO_ADDRESS} from './constants';
|
||||||
import {MockSwapAdapter} from '../types/MockSwapAdapter';
|
|
||||||
import {signTypedData_v4, TypedData} from 'eth-sig-util';
|
import {signTypedData_v4, TypedData} from 'eth-sig-util';
|
||||||
import {fromRpcSig, ECDSASignature} from 'ethereumjs-util';
|
import {fromRpcSig, ECDSASignature} from 'ethereumjs-util';
|
||||||
import {SignerWithAddress} from '../test/helpers/make-suite';
|
import {SignerWithAddress} from '../test/helpers/make-suite';
|
||||||
|
@ -322,8 +321,6 @@ export const deployWalletBalancerProvider = async (
|
||||||
}
|
}
|
||||||
return instance;
|
return instance;
|
||||||
};
|
};
|
||||||
export const deployMockSwapAdapter = async (addressesProvider: tEthereumAddress) =>
|
|
||||||
await deployContract<MockSwapAdapter>(eContractid.MockSwapAdapter, [addressesProvider]);
|
|
||||||
|
|
||||||
export const deployAaveProtocolTestHelpers = async (
|
export const deployAaveProtocolTestHelpers = async (
|
||||||
addressesProvider: tEthereumAddress,
|
addressesProvider: tEthereumAddress,
|
||||||
|
@ -549,14 +546,6 @@ export const getMockFlashLoanReceiver = async (address?: tEthereumAddress) => {
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getMockSwapAdapter = async (address?: tEthereumAddress) => {
|
|
||||||
return await getContract<MockSwapAdapter>(
|
|
||||||
eContractid.MockSwapAdapter,
|
|
||||||
address ||
|
|
||||||
(await getDb().get(`${eContractid.MockSwapAdapter}.${BRE.network.name}`).value()).address
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export const getLendingRateOracle = async (address?: tEthereumAddress) => {
|
export const getLendingRateOracle = async (address?: tEthereumAddress) => {
|
||||||
return await getContract<LendingRateOracle>(
|
return await getContract<LendingRateOracle>(
|
||||||
eContractid.LendingRateOracle,
|
eContractid.LendingRateOracle,
|
||||||
|
|
|
@ -44,7 +44,6 @@ export enum eContractid {
|
||||||
LendingPoolCollateralManager = 'LendingPoolCollateralManager',
|
LendingPoolCollateralManager = 'LendingPoolCollateralManager',
|
||||||
InitializableAdminUpgradeabilityProxy = 'InitializableAdminUpgradeabilityProxy',
|
InitializableAdminUpgradeabilityProxy = 'InitializableAdminUpgradeabilityProxy',
|
||||||
MockFlashLoanReceiver = 'MockFlashLoanReceiver',
|
MockFlashLoanReceiver = 'MockFlashLoanReceiver',
|
||||||
MockSwapAdapter = 'MockSwapAdapter',
|
|
||||||
WalletBalanceProvider = 'WalletBalanceProvider',
|
WalletBalanceProvider = 'WalletBalanceProvider',
|
||||||
AToken = 'AToken',
|
AToken = 'AToken',
|
||||||
MockAToken = 'MockAToken',
|
MockAToken = 'MockAToken',
|
||||||
|
|
|
@ -19,7 +19,6 @@ import {
|
||||||
registerContractInJsonDb,
|
registerContractInJsonDb,
|
||||||
getPairsTokenAggregator,
|
getPairsTokenAggregator,
|
||||||
initReserves,
|
initReserves,
|
||||||
deployMockSwapAdapter,
|
|
||||||
deployLendingRateOracle,
|
deployLendingRateOracle,
|
||||||
} from '../helpers/contracts-helpers';
|
} from '../helpers/contracts-helpers';
|
||||||
import {Signer} from 'ethers';
|
import {Signer} from 'ethers';
|
||||||
|
@ -239,9 +238,6 @@ const buildTestEnv = async (deployer: Signer, secondaryWallet: Signer) => {
|
||||||
const mockFlashLoanReceiver = await deployMockFlashLoanReceiver(addressesProvider.address);
|
const mockFlashLoanReceiver = await deployMockFlashLoanReceiver(addressesProvider.address);
|
||||||
await insertContractAddressInDb(eContractid.MockFlashLoanReceiver, mockFlashLoanReceiver.address);
|
await insertContractAddressInDb(eContractid.MockFlashLoanReceiver, mockFlashLoanReceiver.address);
|
||||||
|
|
||||||
const mockSwapAdapter = await deployMockSwapAdapter(addressesProvider.address);
|
|
||||||
await insertContractAddressInDb(eContractid.MockSwapAdapter, mockSwapAdapter.address);
|
|
||||||
|
|
||||||
await deployWalletBalancerProvider(addressesProvider.address);
|
await deployWalletBalancerProvider(addressesProvider.address);
|
||||||
|
|
||||||
console.timeEnd('setup');
|
console.timeEnd('setup');
|
||||||
|
|
|
@ -9,7 +9,6 @@ import {
|
||||||
getMintableErc20,
|
getMintableErc20,
|
||||||
getLendingPoolConfiguratorProxy,
|
getLendingPoolConfiguratorProxy,
|
||||||
getPriceOracle,
|
getPriceOracle,
|
||||||
getMockSwapAdapter,
|
|
||||||
getLendingPoolAddressesProviderRegistry,
|
getLendingPoolAddressesProviderRegistry,
|
||||||
} from '../../helpers/contracts-helpers';
|
} from '../../helpers/contracts-helpers';
|
||||||
import {tEthereumAddress} from '../../helpers/types';
|
import {tEthereumAddress} from '../../helpers/types';
|
||||||
|
@ -25,7 +24,6 @@ import bignumberChai from 'chai-bignumber';
|
||||||
import {almostEqual} from './almost-equal';
|
import {almostEqual} from './almost-equal';
|
||||||
import {PriceOracle} from '../../types/PriceOracle';
|
import {PriceOracle} from '../../types/PriceOracle';
|
||||||
import {LendingPoolAddressesProvider} from '../../types/LendingPoolAddressesProvider';
|
import {LendingPoolAddressesProvider} from '../../types/LendingPoolAddressesProvider';
|
||||||
import {MockSwapAdapter} from '../../types/MockSwapAdapter';
|
|
||||||
import {LendingPoolAddressesProviderRegistry} from '../../types/LendingPoolAddressesProviderRegistry';
|
import {LendingPoolAddressesProviderRegistry} from '../../types/LendingPoolAddressesProviderRegistry';
|
||||||
chai.use(bignumberChai());
|
chai.use(bignumberChai());
|
||||||
chai.use(almostEqual());
|
chai.use(almostEqual());
|
||||||
|
@ -48,7 +46,6 @@ export interface TestEnv {
|
||||||
usdc: MintableERC20;
|
usdc: MintableERC20;
|
||||||
lend: MintableERC20;
|
lend: MintableERC20;
|
||||||
addressesProvider: LendingPoolAddressesProvider;
|
addressesProvider: LendingPoolAddressesProvider;
|
||||||
mockSwapAdapter: MockSwapAdapter;
|
|
||||||
registry: LendingPoolAddressesProviderRegistry;
|
registry: LendingPoolAddressesProviderRegistry;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,7 +70,6 @@ const testEnv: TestEnv = {
|
||||||
usdc: {} as MintableERC20,
|
usdc: {} as MintableERC20,
|
||||||
lend: {} as MintableERC20,
|
lend: {} as MintableERC20,
|
||||||
addressesProvider: {} as LendingPoolAddressesProvider,
|
addressesProvider: {} as LendingPoolAddressesProvider,
|
||||||
mockSwapAdapter: {} as MockSwapAdapter,
|
|
||||||
registry: {} as LendingPoolAddressesProviderRegistry,
|
registry: {} as LendingPoolAddressesProviderRegistry,
|
||||||
} as TestEnv;
|
} as TestEnv;
|
||||||
|
|
||||||
|
@ -134,8 +130,6 @@ export async function initializeMakeSuite() {
|
||||||
testEnv.usdc = await getMintableErc20(usdcAddress);
|
testEnv.usdc = await getMintableErc20(usdcAddress);
|
||||||
testEnv.lend = await getMintableErc20(lendAddress);
|
testEnv.lend = await getMintableErc20(lendAddress);
|
||||||
testEnv.weth = await getMintableErc20(wethAddress);
|
testEnv.weth = await getMintableErc20(wethAddress);
|
||||||
|
|
||||||
testEnv.mockSwapAdapter = await getMockSwapAdapter();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function makeSuite(name: string, tests: (testEnv: TestEnv) => void) {
|
export function makeSuite(name: string, tests: (testEnv: TestEnv) => void) {
|
||||||
|
|
|
@ -275,7 +275,7 @@ makeSuite('Pausable Pool', (testEnv: TestEnv) => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('SwapBorrowRateMode', async () => {
|
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 user = users[1];
|
||||||
const amountWETHToDeposit = parseEther('10');
|
const amountWETHToDeposit = parseEther('10');
|
||||||
const amountDAIToDeposit = parseEther('120');
|
const amountDAIToDeposit = parseEther('120');
|
||||||
|
|
Loading…
Reference in New Issue
Block a user