aboutsummaryrefslogtreecommitdiffstats
path: root/contracts/FoundationOwnable.sol
blob: b32ba7ad697c3f919972f4790ddc83e7b2f05046 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
pragma solidity ^0.5.11;

contract FoundationOwnable {
  address foundationAddress;

  constructor() public {
    foundationAddress = msg.sender;
  }

  // ---------
  // Modifiers
  // ---------

  modifier onlyFoundation() {
    require(isFoundation(), "only foundation");
    _;
  }

  // ---------
  // Functions
  // ---------

  function isFoundation() public view returns (bool) {
    return msg.sender == foundationAddress;
  }

  function setFoundationAddress(address _address) public onlyFoundation {
    foundationAddress = _address;
  }

}