mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
feat: Revised Avalanche configs. Add UiPoolDataProvider helper to deployment scripts.
This commit is contained in:
parent
a7a54b51ae
commit
242850241f
|
@ -147,19 +147,19 @@ export const CommonsConfig: ICommonConfiguration = {
|
||||||
[eAvalancheNetwork.fuji]: '',
|
[eAvalancheNetwork.fuji]: '',
|
||||||
},
|
},
|
||||||
WETH: {
|
WETH: {
|
||||||
[eAvalancheNetwork.avalanche]: '0xf20d962a6c8f70c731bd838a3a388D7d48fA6e15', // WETH Address
|
[eAvalancheNetwork.avalanche]: '',
|
||||||
[eAvalancheNetwork.fuji]: '0x3b8b3fc85ccA720809Af2dA4B58cF4ce84bcbdd0', // MintableERC20 WETH
|
[eAvalancheNetwork.fuji]: '',
|
||||||
},
|
},
|
||||||
WrappedNativeToken: {
|
WrappedNativeToken: {
|
||||||
[eAvalancheNetwork.avalanche]: '0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7', // Official WAVAX
|
[eAvalancheNetwork.avalanche]: '0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7', // Official WAVAX
|
||||||
[eAvalancheNetwork.fuji]: '0xd00ae08403B9bbb9124bB305C09058E32C39A48c', // Official WAVAX
|
[eAvalancheNetwork.fuji]: '0xd00ae08403B9bbb9124bB305C09058E32C39A48c', // Official WAVAX
|
||||||
},
|
},
|
||||||
ReserveFactorTreasuryAddress: {
|
ReserveFactorTreasuryAddress: {
|
||||||
[eAvalancheNetwork.avalanche]: '0xBDEE917d2BDE529eDEc5b20e0B770F56EDFE8e74', // Not Final, only for test purposes
|
[eAvalancheNetwork.avalanche]: '', // TO BE DEPLOYED
|
||||||
[eAvalancheNetwork.fuji]: '0xB45F5C501A22288dfdb897e5f73E189597e09288', // Self-controlled EOA
|
[eAvalancheNetwork.fuji]: '0xB45F5C501A22288dfdb897e5f73E189597e09288', // Self-controlled EOA for testing
|
||||||
},
|
},
|
||||||
IncentivesController: {
|
IncentivesController: {
|
||||||
[eAvalancheNetwork.avalanche]: ZERO_ADDRESS, // Not final, no incentives proxy for test purposes
|
[eAvalancheNetwork.avalanche]: '0x01D83Fe6A10D2f2B7AF17034343746188272cAc9',
|
||||||
[eAvalancheNetwork.fuji]: '0xa1EF206fb9a8D8186157FC817fCddcC47727ED55', // WAVAX Incentives Controller
|
[eAvalancheNetwork.fuji]: '0xa1EF206fb9a8D8186157FC817fCddcC47727ED55',
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,10 +1,4 @@
|
||||||
import { oneRay, ZERO_ADDRESS } from '../../helpers/constants';
|
import { eAvalancheNetwork, IAvalancheConfiguration } from '../../helpers/types';
|
||||||
import {
|
|
||||||
IAaveConfiguration,
|
|
||||||
eEthereumNetwork,
|
|
||||||
eAvalancheNetwork,
|
|
||||||
IAvalancheConfiguration,
|
|
||||||
} from '../../helpers/types';
|
|
||||||
|
|
||||||
import { CommonsConfig } from './commons';
|
import { CommonsConfig } from './commons';
|
||||||
import {
|
import {
|
||||||
|
|
|
@ -3,15 +3,10 @@ import { getParamPerNetwork } from '../../helpers/contracts-helpers';
|
||||||
import {
|
import {
|
||||||
deployLendingPoolCollateralManager,
|
deployLendingPoolCollateralManager,
|
||||||
deployWalletBalancerProvider,
|
deployWalletBalancerProvider,
|
||||||
deployWETHGateway,
|
|
||||||
authorizeWETHGateway,
|
authorizeWETHGateway,
|
||||||
|
deployUiPoolDataProvider,
|
||||||
} from '../../helpers/contracts-deployments';
|
} from '../../helpers/contracts-deployments';
|
||||||
import {
|
import { loadPoolConfig, ConfigNames, getTreasuryAddress } from '../../helpers/configuration';
|
||||||
loadPoolConfig,
|
|
||||||
ConfigNames,
|
|
||||||
getWethAddress,
|
|
||||||
getTreasuryAddress,
|
|
||||||
} from '../../helpers/configuration';
|
|
||||||
import { getWETHGateway } from '../../helpers/contracts-getters';
|
import { getWETHGateway } from '../../helpers/contracts-getters';
|
||||||
import { eNetwork, ICommonConfiguration } from '../../helpers/types';
|
import { eNetwork, ICommonConfiguration } from '../../helpers/types';
|
||||||
import { notFalsyOrZeroAddress, waitForTx } from '../../helpers/misc-utils';
|
import { notFalsyOrZeroAddress, waitForTx } from '../../helpers/misc-utils';
|
||||||
|
@ -50,6 +45,8 @@ task('full:initialize-lending-pool', 'Initialize lending pool configuration.')
|
||||||
const testHelpers = await getAaveProtocolDataProvider();
|
const testHelpers = await getAaveProtocolDataProvider();
|
||||||
|
|
||||||
const admin = await addressesProvider.getPoolAdmin();
|
const admin = await addressesProvider.getPoolAdmin();
|
||||||
|
const oracle = await addressesProvider.getPriceOracle();
|
||||||
|
|
||||||
if (!reserveAssets) {
|
if (!reserveAssets) {
|
||||||
throw 'Reserve assets is undefined. Check ReserveAssets configuration at config directory';
|
throw 'Reserve assets is undefined. Check ReserveAssets configuration at config directory';
|
||||||
}
|
}
|
||||||
|
@ -103,6 +100,12 @@ task('full:initialize-lending-pool', 'Initialize lending pool configuration.')
|
||||||
|
|
||||||
await deployWalletBalancerProvider(verify);
|
await deployWalletBalancerProvider(verify);
|
||||||
|
|
||||||
|
const uiPoolDataProvider = await deployUiPoolDataProvider(
|
||||||
|
[incentivesController, oracle],
|
||||||
|
verify
|
||||||
|
);
|
||||||
|
console.log('UiPoolDataProvider deployed at:', uiPoolDataProvider.address);
|
||||||
|
|
||||||
const lendingPoolAddress = await addressesProvider.getLendingPool();
|
const lendingPoolAddress = await addressesProvider.getLendingPool();
|
||||||
|
|
||||||
let gateWay = getParamPerNetwork(WethGateway, network);
|
let gateWay = getParamPerNetwork(WethGateway, network);
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
import { error } from 'console';
|
|
||||||
import { zeroAddress } from 'ethereumjs-util';
|
|
||||||
import { task } from 'hardhat/config';
|
import { task } from 'hardhat/config';
|
||||||
import {
|
import {
|
||||||
loadPoolConfig,
|
loadPoolConfig,
|
||||||
ConfigNames,
|
ConfigNames,
|
||||||
getWethAddress,
|
|
||||||
getTreasuryAddress,
|
getTreasuryAddress,
|
||||||
|
getWrappedNativeTokenAddress,
|
||||||
} from '../../helpers/configuration';
|
} from '../../helpers/configuration';
|
||||||
import { ZERO_ADDRESS } from '../../helpers/constants';
|
import { ZERO_ADDRESS } from '../../helpers/constants';
|
||||||
import {
|
import {
|
||||||
|
@ -53,7 +51,8 @@ task('verify:general', 'Verify contracts at Etherscan')
|
||||||
: await getLendingPoolAddressesProviderRegistry();
|
: await getLendingPoolAddressesProviderRegistry();
|
||||||
const lendingPoolAddress = await addressesProvider.getLendingPool();
|
const lendingPoolAddress = await addressesProvider.getLendingPool();
|
||||||
const lendingPoolConfiguratorAddress = await addressesProvider.getLendingPoolConfigurator(); //getLendingPoolConfiguratorProxy();
|
const lendingPoolConfiguratorAddress = await addressesProvider.getLendingPoolConfigurator(); //getLendingPoolConfiguratorProxy();
|
||||||
const lendingPoolCollateralManagerAddress = await addressesProvider.getLendingPoolCollateralManager();
|
const lendingPoolCollateralManagerAddress =
|
||||||
|
await addressesProvider.getLendingPoolCollateralManager();
|
||||||
|
|
||||||
const lendingPoolProxy = await getProxy(lendingPoolAddress);
|
const lendingPoolProxy = await getProxy(lendingPoolAddress);
|
||||||
const lendingPoolConfiguratorProxy = await getProxy(lendingPoolConfiguratorAddress);
|
const lendingPoolConfiguratorProxy = await getProxy(lendingPoolConfiguratorAddress);
|
||||||
|
@ -132,7 +131,7 @@ task('verify:general', 'Verify contracts at Etherscan')
|
||||||
// WETHGateway
|
// WETHGateway
|
||||||
console.log('\n- Verifying WETHGateway...\n');
|
console.log('\n- Verifying WETHGateway...\n');
|
||||||
await verifyContract(eContractid.WETHGateway, wethGateway, [
|
await verifyContract(eContractid.WETHGateway, wethGateway, [
|
||||||
await getWethAddress(poolConfig),
|
await getWrappedNativeTokenAddress(poolConfig),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
// Lending Pool proxy
|
// Lending Pool proxy
|
||||||
|
|
|
@ -1,10 +1,5 @@
|
||||||
import { task } from 'hardhat/config';
|
import { task } from 'hardhat/config';
|
||||||
import {
|
import { loadPoolConfig, ConfigNames, getTreasuryAddress } from '../../helpers/configuration';
|
||||||
loadPoolConfig,
|
|
||||||
ConfigNames,
|
|
||||||
getWethAddress,
|
|
||||||
getTreasuryAddress,
|
|
||||||
} from '../../helpers/configuration';
|
|
||||||
import { ZERO_ADDRESS } from '../../helpers/constants';
|
import { ZERO_ADDRESS } from '../../helpers/constants';
|
||||||
import {
|
import {
|
||||||
getAddressById,
|
getAddressById,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user