Skip to content

Commit

Permalink
refactor: remove onlyOperator modifier
Browse files Browse the repository at this point in the history
  • Loading branch information
daopunk committed Dec 27, 2024
1 parent 612f890 commit a0f66c0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
6 changes: 0 additions & 6 deletions src/contracts/LayerConsumer.sol
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@ contract LayerConsumer is ILayerConsumer {
/// @inheritdoc ILayerConsumer
ECDSAStakeRegistry public immutable STAKE_REGISTRY;

/// @notice Enforce that the caller is an operator
modifier onlyOperator() {
if (!STAKE_REGISTRY.operatorRegistered(msg.sender)) revert NotOperator();
_;
}

/**
* @notice Initializer
* @param _stakeRegistry The address of the stake registry contract
Expand Down
2 changes: 1 addition & 1 deletion src/contracts/LayerSDK.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ contract LayerSDK is LayerConsumer, ILayerSDK {
constructor(address _stakeRegistry) LayerConsumer(_stakeRegistry) {}

/// @inheritdoc ILayerSDK
function validateLayerTask(string calldata _offchainData) external view onlyOperator returns (bool _isValid) {
function validateLayerTask(string calldata _offchainData) external view returns (bool _isValid) {
Task memory _task = Task({dataHash: bytes32(bytes(_offchainData[0:32])), signatureData: bytes(_offchainData[32:])});
_isValid = _validateLayerTask(_task);
}
Expand Down

0 comments on commit a0f66c0

Please sign in to comment.