Skip to content

Commit

Permalink
feat: remove WalletBalanceProvider
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven Valeri committed Aug 2, 2021
1 parent e6b5d55 commit efa9df9
Show file tree
Hide file tree
Showing 10 changed files with 1 addition and 162 deletions.
111 changes: 0 additions & 111 deletions contracts/misc/WalletBalanceProvider.sol

This file was deleted.

9 changes: 0 additions & 9 deletions helpers/contracts-deployments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ import {
SelfdestructTransferFactory,
StableDebtTokenFactory,
VariableDebtTokenFactory,
WalletBalanceProviderFactory,
WETH9MockedFactory,
} from '../types';
import {
Expand Down Expand Up @@ -234,14 +233,6 @@ export const deployMockFlashLoanReceiver = async (
verify
);

export const deployWalletBalancerProvider = async (verify?: boolean) =>
withSaveAndVerify(
await new WalletBalanceProviderFactory(await getFirstSigner()).deploy(),
eContractid.WalletBalanceProvider,
[],
verify
);

export const deployAaveProtocolDataProvider = async (
addressesProvider: tEthereumAddress,
verify?: boolean
Expand Down
10 changes: 0 additions & 10 deletions helpers/contracts-getters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import {
StableAndVariableTokensHelperFactory,
StableDebtTokenFactory,
VariableDebtTokenFactory,
WalletBalanceProviderFactory,
WETH9MockedFactory,
} from '../types';
import { IERC20DetailedFactory } from '../types/IERC20DetailedFactory';
Expand Down Expand Up @@ -316,15 +315,6 @@ export const getPoolCollateralManagerImpl = async (address?: tEthereumAddress) =
await getFirstSigner()
);

export const getWalletProvider = async (address?: tEthereumAddress) =>
await WalletBalanceProviderFactory.connect(
address ||
(
await getDb().get(`${eContractid.WalletBalanceProvider}.${DRE.network.name}`).value()
).address,
await getFirstSigner()
);

export const getPoolCollateralManager = async (address?: tEthereumAddress) =>
await PoolCollateralManagerFactory.connect(
address ||
Expand Down
1 change: 0 additions & 1 deletion helpers/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ export enum eContractid {
PoolCollateralManager = 'PoolCollateralManager',
InitializableAdminUpgradeabilityProxy = 'InitializableAdminUpgradeabilityProxy',
MockFlashLoanReceiver = 'MockFlashLoanReceiver',
WalletBalanceProvider = 'WalletBalanceProvider',
AToken = 'AToken',
MockAToken = 'MockAToken',
DelegationAwareAToken = 'DelegationAwareAToken',
Expand Down
3 changes: 0 additions & 3 deletions tasks/dev/5_initialize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { task } from 'hardhat/config';
import {
deployPoolCollateralManager,
deployMockFlashLoanReceiver,
deployWalletBalancerProvider,
deployAaveProtocolDataProvider,
} from '../../helpers/contracts-deployments';
import { getParamPerNetwork } from '../../helpers/contracts-helpers';
Expand Down Expand Up @@ -78,7 +77,5 @@ task('dev:initialize-pool', 'Initialize pool configuration.')
mockFlashLoanReceiver.address
);

await deployWalletBalancerProvider(verify);

await insertContractAddressInDb(eContractid.AaveProtocolDataProvider, testHelpers.address);
});
12 changes: 0 additions & 12 deletions tasks/dev/6_wallet_balance_provider.ts

This file was deleted.

7 changes: 1 addition & 6 deletions tasks/full/6-initialize.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import { task } from 'hardhat/config';
import { getParamPerNetwork } from '../../helpers/contracts-helpers';
import {
deployPoolCollateralManager,
deployWalletBalancerProvider,
} from '../../helpers/contracts-deployments';
import { deployPoolCollateralManager } from '../../helpers/contracts-deployments';
import {
loadPoolConfig,
ConfigNames,
Expand Down Expand Up @@ -90,8 +87,6 @@ task('full:initialize-pool', 'Initialize pool configuration.')
aaveProtocolDataProvider.address
)
);

await deployWalletBalancerProvider(verify);
} catch (err) {
console.error(err);
exit(1);
Expand Down
4 changes: 0 additions & 4 deletions tasks/verifications/1_general.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,6 @@ task('verify:general', 'Verify contracts at Etherscan')
await verifyContract(eContractid.AaveProtocolDataProvider, dataProvider, [
addressesProvider.address,
]);

// Wallet balance provider
console.log('\n- Verifying Wallet Balance Provider...\n');
await verifyContract(eContractid.WalletBalanceProvider, walletProvider, []);
}
// Pool proxy
console.log('\n- Verifying Pool Proxy...\n');
Expand Down
3 changes: 0 additions & 3 deletions test-suites/test-aave/__setup.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import {
deployAaveOracle,
deployPoolCollateralManager,
deployMockFlashLoanReceiver,
deployWalletBalancerProvider,
deployAaveProtocolDataProvider,
deployRateOracle,
deployStableAndVariableTokensHelper,
Expand Down Expand Up @@ -265,8 +264,6 @@ const buildTestEnv = async (deployer: Signer, secondaryWallet: Signer) => {

const mockUniswapRouter = await deployMockUniswapRouter();

await deployWalletBalancerProvider();

console.timeEnd('setup');
};

Expand Down
3 changes: 0 additions & 3 deletions test-suites/test-amm/__setup.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import {
deployAaveOracle,
deployPoolCollateralManager,
deployMockFlashLoanReceiver,
deployWalletBalancerProvider,
deployAaveProtocolDataProvider,
deployRateOracle,
deployStableAndVariableTokensHelper,
Expand Down Expand Up @@ -260,8 +259,6 @@ const buildTestEnv = async (deployer: Signer, secondaryWallet: Signer) => {

const mockUniswapRouter = await deployMockUniswapRouter();

await deployWalletBalancerProvider();

console.timeEnd('setup');
};

Expand Down

0 comments on commit efa9df9

Please sign in to comment.