From eb64121d2a9bb7f3f5008086335a76df9caab5e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20D=C3=ADaz?= Date: Thu, 28 Nov 2024 07:53:56 +0100 Subject: [PATCH] chore(pfs): add IWitPriceFeedsSolverFactory as core interface --- contracts/WitPriceFeeds.sol | 11 ++++++++--- contracts/apps/WitPriceFeedsUpgradable.sol | 7 ++----- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/contracts/WitPriceFeeds.sol b/contracts/WitPriceFeeds.sol index 04e704e7..d76359c1 100644 --- a/contracts/WitPriceFeeds.sol +++ b/contracts/WitPriceFeeds.sol @@ -3,14 +3,17 @@ pragma solidity >=0.8.0 <0.9.0; import "./WitFeeds.sol"; + import "./interfaces/IWitPriceFeeds.sol"; +import "./interfaces/IWitPriceFeedsSolverFactory.sol"; /// @title WitPriceFeeds: Price Feeds live repository reliant on the Wit/Oracle blockchain. /// @author The Witnet Foundation. abstract contract WitPriceFeeds is WitFeeds, - IWitPriceFeeds + IWitPriceFeeds, + IWitPriceFeedsSolverFactory { constructor() WitFeeds( @@ -21,10 +24,12 @@ abstract contract WitPriceFeeds function specs() virtual override external pure returns (bytes4) { return ( - type(IWitOracleAppliance).interfaceId - ^ type(IERC2362).interfaceId + type(IERC2362).interfaceId + ^ type(IWitOracleAppliance).interfaceId ^ type(IWitFeeds).interfaceId + ^ type(IWitFeedsAdmin).interfaceId ^ type(IWitPriceFeeds).interfaceId + ^ type(IWitPriceFeedsSolverFactory).interfaceId ); } } diff --git a/contracts/apps/WitPriceFeedsUpgradable.sol b/contracts/apps/WitPriceFeedsUpgradable.sol index e7609b59..b1935c77 100644 --- a/contracts/apps/WitPriceFeedsUpgradable.sol +++ b/contracts/apps/WitPriceFeedsUpgradable.sol @@ -7,7 +7,6 @@ import "../core/WitnetUpgradableBase.sol"; import "../data/WitPriceFeedsDataLib.sol"; import "../interfaces/IWitFeedsLegacy.sol"; -import "../interfaces/IWitPriceFeedsSolverFactory.sol"; import "../interfaces/IWitOracleLegacy.sol"; import "../patterns/Ownable2Step.sol"; @@ -17,11 +16,10 @@ import "../patterns/Ownable2Step.sol"; contract WitPriceFeedsUpgradable is - Ownable2Step, - WitnetUpgradableBase, WitPriceFeeds, IWitFeedsLegacy, - IWitPriceFeedsSolverFactory + Ownable2Step, + WitnetUpgradableBase { using Witnet for bytes; using Witnet for Witnet.DataResult; @@ -29,7 +27,6 @@ contract WitPriceFeedsUpgradable using Witnet for Witnet.QuerySLA; using Witnet for Witnet.ResultStatus; - function class() virtual override public view returns (string memory) { return type(WitPriceFeedsUpgradable).name; }