Added tokens, fix getter

This commit is contained in:
David Racero 2020-11-30 19:41:42 +01:00
parent ac63cfaf05
commit 3f46697d24

View File

@ -58,15 +58,20 @@ task('print-config', 'Inits the DRE, to have access to all the plugins')
'isActive', 'isActive',
'isFrozen', 'isFrozen',
]; ];
const tokensFields = ['aToken', 'stableDebtToken', 'variableDebtToken'];
for (const [symbol, address] of Object.entries( for (const [symbol, address] of Object.entries(
getParamPerNetwork(poolConfig.ReserveAssets, network) getParamPerNetwork(poolConfig.ReserveAssets, network)
)) { )) {
console.log(`- ${symbol} asset config`); console.log(`- ${symbol} asset config`);
console.log(` - reserve address: ${address}`); console.log(` - reserve address: ${address}`);
const reserveData = await protocolDataProvider.getReserveData(address); const reserveData = await protocolDataProvider.getReserveConfigurationData(address);
const tokensAddresses = await protocolDataProvider.getReserveTokensAddresses(address);
fields.forEach((field, index) => { fields.forEach((field, index) => {
console.log(` - ${field}:`, reserveData[index].toString()); console.log(` - ${field}:`, reserveData[index].toString());
}); });
tokensFields.forEach((field, index) => {
console.log(` - ${field}:`, tokensAddresses[index]);
});
} }
}); });