-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- expose more functions to testing (tests to come) - separate store, view, update, and operate functionalty and interfaces
- Loading branch information
Showing
18 changed files
with
1,045 additions
and
811 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.0; | ||
|
||
import { FismoView } from "./FismoView.sol"; | ||
import { FismoStore } from "./FismoStore.sol"; | ||
import { FismoEvents } from "../domain/FismoEvents.sol"; | ||
|
||
/** | ||
* @title FismoControl | ||
* | ||
* @notice Fismo access control | ||
* | ||
* @author Cliff Hall <[email protected]> (https://twitter.com/seaofarrows) | ||
*/ | ||
contract FismoAccess is FismoView { | ||
|
||
modifier onlyOwner() { | ||
require(msg.sender == FismoStore.getStore().owner, "Only owner may call"); | ||
_; | ||
} | ||
|
||
modifier onlyOperator(bytes4 _machineId) { | ||
Machine storage machine = getMachine(_machineId); | ||
require(msg.sender == machine.operator, "Only operator may call"); | ||
_; | ||
} | ||
|
||
} |
Oops, something went wrong.