Skip to content

Commit

Permalink
chore: fully deprecate SLA refs in bytecodes registry
Browse files Browse the repository at this point in the history
  • Loading branch information
guidiaz committed Feb 19, 2024
1 parent 320486f commit 82d3714
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 38 deletions.
25 changes: 0 additions & 25 deletions contracts/core/defaults/WitnetRequestBytecodesDefault.sol
Original file line number Diff line number Diff line change
Expand Up @@ -295,31 +295,6 @@ contract WitnetRequestBytecodesDefault
];
}

function lookupRadonRAD(bytes32 _radHash)
external view
override
returns (Witnet.RadonRAD memory rad)
{
DataRequest storage __request = __requests(_radHash);
rad.retrieve = new Witnet.RadonRetrieval[](__request.retrievals.length);
for (uint _ix = 0; _ix < rad.retrieve.length; _ix ++) {
rad.retrieve[_ix] = __database().retrievals[__request.retrievals[_ix]];
}
rad.aggregate = __database().reducers[__request.aggregator];
rad.tally = __database().reducers[__request.tally];
}

// function lookupRadonSLA(bytes32 _slaHash)
// external view
// override
// returns (Witnet.RadonSLA memory sla)
// {
// sla = __database().slas[_slaHash];
// if (sla.numWitnesses == 0) {
// revert UnknownRadonSLA(_slaHash);
// }
// }

function verifyRadonRetrieval(
Witnet.RadonDataRequestMethods _requestMethod,
string calldata _requestURL,
Expand Down
3 changes: 0 additions & 3 deletions contracts/data/WitnetRequestBytecodesData.sol
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,8 @@ abstract contract WitnetRequestBytecodesData {

mapping (bytes32 => Witnet.RadonReducer) reducers;
mapping (bytes32 => Witnet.RadonRetrieval) retrievals;
mapping (bytes32 => Witnet.RadonSLA) _slas;

mapping (bytes32 => DataRequest) requests;
mapping (bytes32 => bytes32) rads;

mapping (bytes32 => bytes) radsBytecode;
mapping (bytes32 => bytes) _slasBytecode;
}
Expand Down
12 changes: 2 additions & 10 deletions contracts/interfaces/IWitnetRequestBytecodes.sol
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ interface IWitnetRequestBytecodes {
function lookupRadonRequestSources(bytes32 radHash) external view returns (bytes32[] memory);
function lookupRadonRequestSourcesCount(bytes32 radHash) external view returns (uint);
function lookupRadonRequestTally(bytes32 radHash) external view returns (Witnet.RadonReducer memory);

function lookupRadonRAD(bytes32 radHash) external view returns (Witnet.RadonRAD memory);


function verifyRadonRetrieval(
Witnet.RadonDataRequestMethods requestMethod,
string calldata requestURL,
Expand All @@ -56,10 +54,4 @@ interface IWitnetRequestBytecodes {
) external returns (bytes32 radHash);

function totalDataProviders() external view returns (uint);

/// ===============================================================================================================
/// --- Deprecating methods ---------------------------------------------------------------------------------------

// function lookupRadonSLA(bytes32 slaHash) external view returns (Witnet.RadonSLA memory);

}
}

0 comments on commit 82d3714

Please sign in to comment.