Skip to content

Commit 2428502

Browse files
committed
feat: Revised Avalanche configs. Add UiPoolDataProvider helper to deployment scripts.
1 parent a7a54b5 commit 2428502

File tree

5 files changed

+22
-31
lines changed

5 files changed

+22
-31
lines changed

markets/avalanche/commons.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -147,19 +147,19 @@ export const CommonsConfig: ICommonConfiguration = {
147147
[eAvalancheNetwork.fuji]: '',
148148
},
149149
WETH: {
150-
[eAvalancheNetwork.avalanche]: '0xf20d962a6c8f70c731bd838a3a388D7d48fA6e15', // WETH Address
151-
[eAvalancheNetwork.fuji]: '0x3b8b3fc85ccA720809Af2dA4B58cF4ce84bcbdd0', // MintableERC20 WETH
150+
[eAvalancheNetwork.avalanche]: '',
151+
[eAvalancheNetwork.fuji]: '',
152152
},
153153
WrappedNativeToken: {
154154
[eAvalancheNetwork.avalanche]: '0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7', // Official WAVAX
155155
[eAvalancheNetwork.fuji]: '0xd00ae08403B9bbb9124bB305C09058E32C39A48c', // Official WAVAX
156156
},
157157
ReserveFactorTreasuryAddress: {
158-
[eAvalancheNetwork.avalanche]: '0xBDEE917d2BDE529eDEc5b20e0B770F56EDFE8e74', // Not Final, only for test purposes
159-
[eAvalancheNetwork.fuji]: '0xB45F5C501A22288dfdb897e5f73E189597e09288', // Self-controlled EOA
158+
[eAvalancheNetwork.avalanche]: '', // TO BE DEPLOYED
159+
[eAvalancheNetwork.fuji]: '0xB45F5C501A22288dfdb897e5f73E189597e09288', // Self-controlled EOA for testing
160160
},
161161
IncentivesController: {
162-
[eAvalancheNetwork.avalanche]: ZERO_ADDRESS, // Not final, no incentives proxy for test purposes
163-
[eAvalancheNetwork.fuji]: '0xa1EF206fb9a8D8186157FC817fCddcC47727ED55', // WAVAX Incentives Controller
162+
[eAvalancheNetwork.avalanche]: '0x01D83Fe6A10D2f2B7AF17034343746188272cAc9',
163+
[eAvalancheNetwork.fuji]: '0xa1EF206fb9a8D8186157FC817fCddcC47727ED55',
164164
},
165165
};

markets/avalanche/index.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
1-
import { oneRay, ZERO_ADDRESS } from '../../helpers/constants';
2-
import {
3-
IAaveConfiguration,
4-
eEthereumNetwork,
5-
eAvalancheNetwork,
6-
IAvalancheConfiguration,
7-
} from '../../helpers/types';
1+
import { eAvalancheNetwork, IAvalancheConfiguration } from '../../helpers/types';
82

93
import { CommonsConfig } from './commons';
104
import {

tasks/full/6-initialize.ts

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,10 @@ import { getParamPerNetwork } from '../../helpers/contracts-helpers';
33
import {
44
deployLendingPoolCollateralManager,
55
deployWalletBalancerProvider,
6-
deployWETHGateway,
76
authorizeWETHGateway,
7+
deployUiPoolDataProvider,
88
} from '../../helpers/contracts-deployments';
9-
import {
10-
loadPoolConfig,
11-
ConfigNames,
12-
getWethAddress,
13-
getTreasuryAddress,
14-
} from '../../helpers/configuration';
9+
import { loadPoolConfig, ConfigNames, getTreasuryAddress } from '../../helpers/configuration';
1510
import { getWETHGateway } from '../../helpers/contracts-getters';
1611
import { eNetwork, ICommonConfiguration } from '../../helpers/types';
1712
import { notFalsyOrZeroAddress, waitForTx } from '../../helpers/misc-utils';
@@ -50,6 +45,8 @@ task('full:initialize-lending-pool', 'Initialize lending pool configuration.')
5045
const testHelpers = await getAaveProtocolDataProvider();
5146

5247
const admin = await addressesProvider.getPoolAdmin();
48+
const oracle = await addressesProvider.getPriceOracle();
49+
5350
if (!reserveAssets) {
5451
throw 'Reserve assets is undefined. Check ReserveAssets configuration at config directory';
5552
}
@@ -103,6 +100,12 @@ task('full:initialize-lending-pool', 'Initialize lending pool configuration.')
103100

104101
await deployWalletBalancerProvider(verify);
105102

103+
const uiPoolDataProvider = await deployUiPoolDataProvider(
104+
[incentivesController, oracle],
105+
verify
106+
);
107+
console.log('UiPoolDataProvider deployed at:', uiPoolDataProvider.address);
108+
106109
const lendingPoolAddress = await addressesProvider.getLendingPool();
107110

108111
let gateWay = getParamPerNetwork(WethGateway, network);

tasks/verifications/1_general.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
import { error } from 'console';
2-
import { zeroAddress } from 'ethereumjs-util';
31
import { task } from 'hardhat/config';
42
import {
53
loadPoolConfig,
64
ConfigNames,
7-
getWethAddress,
85
getTreasuryAddress,
6+
getWrappedNativeTokenAddress,
97
} from '../../helpers/configuration';
108
import { ZERO_ADDRESS } from '../../helpers/constants';
119
import {
@@ -53,7 +51,8 @@ task('verify:general', 'Verify contracts at Etherscan')
5351
: await getLendingPoolAddressesProviderRegistry();
5452
const lendingPoolAddress = await addressesProvider.getLendingPool();
5553
const lendingPoolConfiguratorAddress = await addressesProvider.getLendingPoolConfigurator(); //getLendingPoolConfiguratorProxy();
56-
const lendingPoolCollateralManagerAddress = await addressesProvider.getLendingPoolCollateralManager();
54+
const lendingPoolCollateralManagerAddress =
55+
await addressesProvider.getLendingPoolCollateralManager();
5756

5857
const lendingPoolProxy = await getProxy(lendingPoolAddress);
5958
const lendingPoolConfiguratorProxy = await getProxy(lendingPoolConfiguratorAddress);
@@ -132,7 +131,7 @@ task('verify:general', 'Verify contracts at Etherscan')
132131
// WETHGateway
133132
console.log('\n- Verifying WETHGateway...\n');
134133
await verifyContract(eContractid.WETHGateway, wethGateway, [
135-
await getWethAddress(poolConfig),
134+
await getWrappedNativeTokenAddress(poolConfig),
136135
]);
137136
}
138137
// Lending Pool proxy

tasks/verifications/2_tokens.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
import { task } from 'hardhat/config';
2-
import {
3-
loadPoolConfig,
4-
ConfigNames,
5-
getWethAddress,
6-
getTreasuryAddress,
7-
} from '../../helpers/configuration';
2+
import { loadPoolConfig, ConfigNames, getTreasuryAddress } from '../../helpers/configuration';
83
import { ZERO_ADDRESS } from '../../helpers/constants';
94
import {
105
getAddressById,

0 commit comments

Comments
 (0)