contract owned is usingOraclize{
    address public owner;

    function owned() public {
        owner = msg.sender;
    }

    modifier onlyOwner {
        require(msg.sender == owner);
        _;
    }

    function transferOwnership(address newOwner) onlyOwner public {
        owner = newOwner;
    }
    //====================== Utility Functions =========================//
    /// @dev Compares two strings and returns true iff they are equal.
    function stringEqual(string _a, string _b) internal returns (bool) {
        return strCompare(_a, _b) == 0;
    }
    function addressToAsciiString(address x) internal returns (string) {
        bytes memory s = new bytes(40);
        for (uint i = 0; i < 20; i++) {
            byte b = byte(uint8(uint(x) / (2**(8*(19 - i)))));
            byte hi = byte(uint8(b) / 16);
            byte lo = byte(uint8(b) - 16 * uint8(hi));
            s[2*i] = char(hi);
            s[2*i+1] = char(lo);
        }
        return string(s);
    }

    function char(byte b) internal returns (byte c) {
        if (b < 10) return byte(uint8(b) + 0x30);
        else return byte(uint8(b) + 0x57);
    }
    //==================================================================//
}
/* Deployment Manual
 After deployed, 
 (1) Set hedgeAddress (default: owner);
 (2) Set all Query and Query Data;
 (3) Add U/D trading product addresses using addMinter.
 
 	Notes:   
 	0. tickerQuery is an HTTP POST. (Note: tickerQueryPurpose: (1) Sale; (2) CWCreturn (our buyback of CWC)
 		By default: POST goes to our HTTP server (tickerQuery) with opcode, CWC, client_address, and amount.
 You cannot change tickerQueryData (auto generated as follows)
 		===> "opcode (0 for sale; 1 for return), CWC, client_address, amount”
 		    Note: amount is Wei for 3 (sale) and CWC for 4 (return)
 
 	2.  result of every POST is the "result" parameter of __callback() in a string.
 		Error return definition:
 			===> hedgeQuery: return=="err";
 			===> CWCreturnQuery: return=="err";
 			 
 */
function stringEqual(string _a, string _b) internal returns (bool) {
        return strCompare(_a, _b) == 0;
    }
/// @dev Compares two strings and returns true iff they are equal.