mirror of
https://github.com/status-im/github-oracle.git
synced 2026-08-27 09:51:10 +00:00
changed owned to controlled
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import "Owned.sol";
|
||||
import "Controlled.sol";
|
||||
|
||||
pragma solidity ^0.4.11;
|
||||
|
||||
contract BountyBank is Owned {
|
||||
contract BountyBank is Controlled {
|
||||
|
||||
enum State {CLOSED, OPEN, CLAIMED}
|
||||
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
pragma solidity ^0.4.11;
|
||||
|
||||
contract Controlled {
|
||||
/// @notice The address of the controller is the only address that can call
|
||||
/// a function with this modifier
|
||||
modifier onlyController { if (msg.sender != controller) throw; _; }
|
||||
|
||||
address public controller;
|
||||
|
||||
function Controlled() { controller = msg.sender;}
|
||||
|
||||
/// @notice Changes the controller of the contract
|
||||
/// @param _newController The new controller of the contract
|
||||
function changeController(address _newController) onlyController {
|
||||
controller = _newController;
|
||||
}
|
||||
}
|
||||
@@ -3,13 +3,13 @@
|
||||
* Abstract Logic for GitHubOracle Registries.
|
||||
* Ricardo Guilherme Schmidt <3esmit@gmail.com>
|
||||
*/
|
||||
import "Owned.sol";
|
||||
import "Controlled.sol";
|
||||
import "oraclizeAPI_0.4.sol";
|
||||
import "strings.sol";
|
||||
|
||||
pragma solidity ^0.4.11;
|
||||
|
||||
contract GitHubAPIReg is Owned, usingOraclize {
|
||||
contract GitHubAPIReg is Controlled, usingOraclize {
|
||||
using strings for string;
|
||||
using strings for strings.slice;
|
||||
|
||||
|
||||
@@ -14,14 +14,14 @@
|
||||
*/
|
||||
|
||||
import "oraclizeAPI_0.4.sol";
|
||||
import "Owned.sol";
|
||||
import "Controlled.sol";
|
||||
import "./GitHubUserReg.sol";
|
||||
import "./GitHubRepositoryReg.sol";
|
||||
import "./GitHubPoints.sol";
|
||||
|
||||
pragma solidity ^0.4.11;
|
||||
|
||||
contract GitHubOracle is Owned, DGitI {
|
||||
contract GitHubOracle is Controlled, DGitI {
|
||||
|
||||
GitHubUserReg public userReg;
|
||||
GitHubRepositoryReg public repositoryReg;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import "oraclizeAPI_0.4.sol";
|
||||
import "Owned.sol";
|
||||
import "Controlled.sol";
|
||||
import "strings.sol";
|
||||
|
||||
pragma solidity ^0.4.11;
|
||||
@@ -13,7 +13,7 @@ contract DGitI {
|
||||
function __setIssuePoints(uint256 projectId, uint256 issueId, uint256 userId, uint256 points);
|
||||
}
|
||||
|
||||
contract GitHubPoints is Owned, usingOraclize{
|
||||
contract GitHubPoints is Controlled, usingOraclize{
|
||||
|
||||
using strings for string;
|
||||
using strings for strings.slice;
|
||||
|
||||
@@ -14,13 +14,13 @@
|
||||
*/
|
||||
|
||||
import "CollaborationBank.sol";
|
||||
import "Owned.sol";
|
||||
import "Controlled.sol";
|
||||
import "./BountyBank.sol";
|
||||
import "./GitRepositoryToken.sol";
|
||||
|
||||
pragma solidity ^0.4.11;
|
||||
|
||||
contract GitRepositoryI is Owned{
|
||||
contract GitRepositoryI is Controlled{
|
||||
function claim(address _user, uint _total) returns (bool) ;
|
||||
function setBounty(uint256 _issueId, bool _state, uint256 _closedAt);
|
||||
function setBountyPoints(uint256 _issueId, address _claimer, uint256 _points);
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
*/
|
||||
|
||||
import "LockerToken.sol";
|
||||
import "Owned.sol";
|
||||
import "Controlled.sol";
|
||||
|
||||
pragma solidity ^0.4.11;
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import "./Owned.sol";
|
||||
|
||||
pragma solidity ^0.4.11;
|
||||
|
||||
contract Lockable {
|
||||
|
||||
@@ -7,10 +7,11 @@
|
||||
|
||||
import "./AbstractToken.sol";
|
||||
import "Lockable.sol";
|
||||
import "Controlled.sol";
|
||||
|
||||
pragma solidity ^0.4.11;
|
||||
|
||||
contract LockerToken is AbstractToken, Lockable, Owned {
|
||||
contract LockerToken is AbstractToken, Lockable, Controlled {
|
||||
Lockable public locker = this;
|
||||
|
||||
function unlinkLocker() only_owner {
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
pragma solidity ^0.4.11;
|
||||
|
||||
contract Owned {
|
||||
address public owner= msg.sender;
|
||||
event NewOwner(address owner);
|
||||
|
||||
modifier only_owner {
|
||||
if (msg.sender != owner) throw;
|
||||
_;
|
||||
}
|
||||
|
||||
function setOwner(address _owner)
|
||||
only_owner {
|
||||
owner = _owner;
|
||||
NewOwner(_owner);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user