@@ -323,6 +323,51 @@ abstract contract HorizonConfigAssertionHelper is Test {
323323 for (uint256 i; i < configs.length ; i++ ) {
324324 uint256 price = oracle.getAssetPrice (configs[i].underlying);
325325 assertTrue (price > 0 , string .concat ('VALIDATION: zero oracle price for ' , configs[i].symbol));
326+ address source = oracle.getSourceOfAsset (configs[i].underlying);
327+ assertEq (
328+ AggregatorInterface (source).decimals (),
329+ 8 ,
330+ string .concat ('VALIDATION: unexpected oracle decimals for ' , configs[i].symbol)
331+ );
332+ address expectedFeed = _expectedPriceFeed (configs[i].underlying);
333+ assertEq (
334+ source,
335+ expectedFeed,
336+ string .concat ('VALIDATION: oracle source mismatch for ' , configs[i].symbol)
337+ );
338+ }
339+ }
340+
341+ function _expectedPriceFeed (address underlying ) internal pure returns (address ) {
342+ if (underlying == AaveV3HorizonEthereum.USTB_UNDERLYING) {
343+ return AaveV3HorizonEthereum.USTB_PRICE_FEED_ADAPTER;
344+ }
345+ if (underlying == AaveV3HorizonEthereum.USCC_UNDERLYING) {
346+ return AaveV3HorizonEthereum.USCC_PRICE_FEED_ADAPTER;
347+ }
348+ if (underlying == AaveV3HorizonEthereum.USYC_UNDERLYING) {
349+ return AaveV3HorizonEthereum.USYC_PRICE_FEED;
350+ }
351+ if (underlying == AaveV3HorizonEthereum.JTRSY_UNDERLYING) {
352+ return AaveV3HorizonEthereum.JTRSY_PRICE_FEED_ADAPTER;
353+ }
354+ if (underlying == AaveV3HorizonEthereum.JAAA_UNDERLYING) {
355+ return AaveV3HorizonEthereum.JAAA_PRICE_FEED_ADAPTER;
356+ }
357+ if (underlying == AaveV3HorizonEthereum.VBILL_UNDERLYING) {
358+ return AaveV3HorizonEthereum.VBILL_PRICE_FEED;
359+ }
360+ if (underlying == AaveV3HorizonEthereum.GHO_UNDERLYING) {
361+ return AaveV3HorizonEthereum.GHO_PRICE_FEED;
362+ }
363+ if (underlying == AaveV3HorizonEthereum.USDC_UNDERLYING) {
364+ return AaveV3HorizonEthereum.USDC_PRICE_FEED;
365+ }
366+ if (underlying == AaveV3HorizonEthereum.RLUSD_UNDERLYING) {
367+ return AaveV3HorizonEthereum.RLUSD_PRICE_FEED;
368+ }
369+ if (underlying == AaveV3HorizonEthereum.ACRED_UNDERLYING) {
370+ return AaveV3HorizonEthereum.ACRED_PRICE_FEED;
326371 }
327372 }
328373
0 commit comments