feat: added direct call

This commit is contained in:
sendra 2021-11-02 14:14:48 +01:00
parent 92155c1017
commit bed79c4691
3 changed files with 12 additions and 7 deletions

View File

@ -112,12 +112,15 @@ contract UiPoolDataProvider is IUiPoolDataProvider {
.scaledTotalSupply();
// we're getting this info from the aToken, because some of assets can be not compliant with ETC20Detailed
try IERC20Detailed(reserveData.underlyingAsset).symbol() returns (string memory symbol) {
reserveData.symbol = symbol;
} catch (bytes memory /*lowLevelData*/) {
bytes32 symbol = IERC20DetailedBytes(reserveData.underlyingAsset).symbol();
reserveData.symbol = string(abi.encodePacked(symbol));
}
// (bool success, bytes memory result) = reserveData.underlyingAsset.staticcall(abi.encodeWithSignature("symbol()"));
// reserveData.symbol = string(abi.encodePacked(result));
// try IERC20Detailed(reserveData.underlyingAsset).symbol() returns (string memory symbol) {
// reserveData.symbol = symbol;
// } catch (bytes memory /*lowLevelData*/) {
// bytes32 symbol = IERC20DetailedBytes(reserveData.underlyingAsset).symbol();
// reserveData.symbol = string(abi.encodePacked(symbol));
// }
// reserveData.symbol = IERC20Detailed(reserveData.underlyingAsset).symbol();
reserveData.name = '';

View File

@ -83,6 +83,7 @@ export const chainlinkAggregatorProxy = {
mumbai: '0xd0D5e3DB44DE05E9F294BB0a3bEEaF030DE24Ada',
avalanche: '0x0A77230d17318075983913bC2145DB16C7366156',
fuji: '0x5498BB86BC934c8D34FDA08E81D444153d0D06aD',
tenderly: '0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419',
};
export const chainlinkEthUsdAggregatorProxy = {
@ -92,4 +93,5 @@ export const chainlinkEthUsdAggregatorProxy = {
mumbai: '0x0715A7794a1dc8e42615F059dD6e406A6594651A',
avalanche: '0x976B3D034E162d8bD72D6b9C989d545b839003b0',
fuji: '0x86d67c3D38D2bCeE722E601025C25a575021c6EA',
tenderly: '0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419',
};

2
package-lock.json generated
View File

@ -14793,7 +14793,7 @@
}
},
"ethereumjs-abi": {
"version": "git+https://github.com/ethereumjs/ethereumjs-abi.git#ee3994657fa7a427238e6ba92a84d0b529bbcde0",
"version": "git+https://github.com/ethereumjs/ethereumjs-abi.git#1a27c59c15ab1e95ee8e5c4ed6ad814c49cc439e",
"from": "git+https://github.com/ethereumjs/ethereumjs-abi.git",
"dev": true,
"requires": {