Skip to content

Commit

Permalink
refactor(mocks): implement ISedaCore for SedaPermissioned
Browse files Browse the repository at this point in the history
  • Loading branch information
mariocao committed Dec 11, 2024
1 parent 55d0902 commit da9951e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions contracts/mocks/SedaPermissioned.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";
import {EnumerableSet} from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
import {Pausable} from "@openzeppelin/contracts/utils/Pausable.sol";

import {IRequestHandler} from "../interfaces/IRequestHandler.sol";
import {IResultHandler} from "../interfaces/IResultHandler.sol";
import {ISedaCore} from "../interfaces/ISedaCore.sol";
import {RequestHandlerBase} from "../core/abstract/RequestHandlerBase.sol";
import {SedaDataTypes} from "../libraries/SedaDataTypes.sol";

Expand All @@ -15,7 +17,7 @@ import {SedaDataTypes} from "../libraries/SedaDataTypes.sol";
/// @dev WARNING: This is a permissioned version of the SEDA core contract, primarily intended for testing
/// and controlled environments. It should not be used in production without careful consideration
/// of the centralization risks introduced by the permissioning system.
contract SedaPermissioned is RequestHandlerBase, IResultHandler, AccessControl, Pausable {
contract SedaPermissioned is ISedaCore, RequestHandlerBase, AccessControl, Pausable {
using EnumerableSet for EnumerableSet.Bytes32Set;

// ============ Constants ============
Expand Down Expand Up @@ -98,7 +100,7 @@ contract SedaPermissioned is RequestHandlerBase, IResultHandler, AccessControl,
/// @return requestId The ID of the posted request
function postRequest(
SedaDataTypes.RequestInputs calldata inputs
) public override(RequestHandlerBase) whenNotPaused returns (bytes32) {
) public override(IRequestHandler, RequestHandlerBase) whenNotPaused returns (bytes32) {
// Check max replication factor first
if (inputs.replicationFactor > maxReplicationFactor) {
revert InvalidReplicationFactor();
Expand Down

0 comments on commit da9951e

Please sign in to comment.