Contract 0xdEe34Cd48D77183B3E70F4f9Ea2718c89bFeFeB4

 

Contract Overview

MCH: Prime
Balance:
18.2 Ether

EtherValue:
$2,239.69 (@ $123.06/ETH)
TxHash Block Age From To Value [TxFee]
0xa1734ac00123fee1573a509adf6b2d2f888a45bff728edd08a5186cc102abfda72255166 hrs 7 mins ago0x35dc443b1f76cd757c5f55bf570c9ba1d2f7fe43  IN   MCH: Prime0.1 Ether0.000332352
0x3c0384ba659683e98e700f932535e29c7e7a6bf2f9b69ed1b16f2125a0d23d2072251298 hrs 22 mins ago0xab49fe9a8c4b5b3b3bde09a023927c46ba809cc3  IN   MCH: Prime0.1 Ether0.000332856
0x3cdfb58ea804e91f0ebb31af88e85b961f6fb3c198d7de364f76791c44bb3394722417813 hrs 52 mins ago0xf47e8b263e529e375943553d3f3c94b4312c2a5f  IN   MCH: Prime0.1 Ether0.000224
0x8323a123e9901c50f3c6ec2b3c5d070349824146ea6cebd57feb30ca506716ca722406314 hrs 36 mins ago0xf47e8b263e529e375943553d3f3c94b4312c2a5f  IN   MCH: Prime0.1 Ether0.000332856
0xb1916a87cadee6a2c8f63c438f8bc0c46688ae40720c92561a7eac85975176be722378016 hrs 7 mins ago0x5f2a28962891f0ddac719240d7f2ee135ba7c5da  IN   MCH: Prime0.1 Ether0.00063977761
0x3af3078728c363fe6333049d8eac6d2f77f0277dc660b94cb9e935da69b2241a722356117 hrs 18 mins ago0xdec8e4316051565c03b3444b85641ae7921e37a6  IN   MCH: Prime0.1 Ether0.000332472
0xb3653e97dcb6fb0abd29e9acab40c8b1b14cbee08434466cf8c46a62088f031f722356117 hrs 18 mins ago0xf0f31f91d248e09ae288a255a819a23cd8fbb08c  IN   MCH: Prime0.1 Ether0.000332352
0xe1f97b2dae0aaee3ea01433bceeb6fb6ce49c822f11121da829b5d20bb3cb3a5722345017 hrs 55 mins ago0xa040a28cedf4846d2e8ce6fcf03cbb8627c444c3  IN   MCH: Prime0.1 Ether0.000332352
0xb72837b12fb82024037eed795a988236e773a4293741e312bdad030967a3718a722339918 hrs 12 mins ago0x08e984c84d29db866de7aeb0dcc0a8fd838769ef  IN   MCH: Prime0.1 Ether0.000332856
0xd60f9ec02d26f3c3ba01695ea72a2791b34f377760d6eb03c1b9793840b8107f722295720 hrs 43 mins ago0xb2efd599f173c8adc8af16a5d6a92256cd59606c  IN   MCH: Prime0.1 Ether0.000443136
0x62bd07f14b0dbf0291fa98bcc2654783f6f8774bd8199b0c35f0aa1e8d388cb7722278921 hrs 41 mins ago0x5a54a51dbb8eaf3a613978cd30882bda794ddbd1  IN   MCH: Prime0.1 Ether0.000358053888
0x57eeaa82119322d0c6076957f1fad4c9d94a56e25a1094d3f0b4336aff6338a972222021 day 1 hr ago0xa9b0c025590470e024a4906401eb75220cceaf76  IN   MCH: Prime0.1 Ether0.00027738
0xb744e157ce453f7f0dcef68c0e09f8c62eade72015ad15b1cc31fe54ada88b1472220971 day 1 hr ago0xe88f42474046183f2367066cd940e74ded8085fe  IN   MCH: Prime0.1 Ether0.000229743277
0xd0ff762dee4717568723e6b940d4031faabf7f42426d01a6fd880fb16ac8318572200351 day 13 hrs ago0x701577da237405af11f029305cb5939c76a1a6cd  IN   MCH: Prime0.1 Ether0.00027696
0xdeb587ca0532cd6064eae29a1eeb0df108e1ad0e43a00e9847ce05b20fc7091272192311 day 18 hrs ago0x0d481893bd6caf2f4cbfb76609ec95f21a887c61  IN   MCH: Prime0.1 Ether0.000166428
0x3ece5e1baa43ab7bcb2e28cda81e4a0dd57d4a46e694c42af8bcafb145caf3ce72189541 day 19 hrs ago0x308e9c99ac194101c971ffcaca897ac943843de8  IN   MCH: Prime0.1 Ether0.000332352
0x26adf2a667c0d6ba8258f693b8c4ff0902af8d9a03de8fe4de553463fceec2b872187781 day 20 hrs ago0x57a311012d80dfab6aa5be4b9f768b36f67c6cfa  IN   MCH: Prime0.1 Ether0.000337503456
0x05563a8136e7ec28152637db6d47070b47ba9584d7d71e77b8e033d51c91d35072183571 day 23 hrs ago0xdc528415d2919dd20e403b3651ad42b585dea202  IN   MCH: Prime0.1 Ether0.000166176
0xd66377159aeabea101e9a48603666ac83a49a1c2bd2d2d6bf0c348c19e380bb172181082 days 54 mins ago0x2bd62f19014b7558a8b2038b8650a06976277882  IN   MCH: Prime0.1 Ether0.000332352
0x25266826f008d50dde3007b9700d1b8eb3f943e9f199e1705615653b902d094f72168092 days 8 hrs ago0x8b85cbeec06196e9f36c4817b6075f511ec16fcb  IN   MCH: Prime0.1 Ether0.000166428
0x8b94cc953b7c40df8b8dafcd3033f9734706e8025fbb985d7d5955cf0d0ca96d72155092 days 15 hrs ago0x8a99e5640013443c18827fec1fdfa6184824e3c8  IN   MCH: Prime0.1 Ether0.000332856
0x81043d784201c301399c0f1ea775eea94f42c34bc87ba8b5fb47e4c971c176f472149412 days 19 hrs ago0xa0b8f504f7394a16b325d50f461f0f45081ca9b8  IN   MCH: Prime0.1 Ether0.00014
0x913216cbb5a97c495c5ab29455fcd55fb1c489add18e22b954f439d3d4c6675572149392 days 19 hrs ago0xa0b8f504f7394a16b325d50f461f0f45081ca9b8  IN   MCH: Prime0.1 Ether0.000056356052
0xdef8a63e40cf3b5a26c27078189005ab53561a04b8aa3b78852906c904281b3572148592 days 19 hrs ago0xebafc1737d85f8bf5a7610aa6b97da83a48358c7  IN   MCH: Prime0.1 Ether0.00110784
0xa2b037723da6f23ac8d6452eb6083da99e4fb3ff02bb30c3edd143431f0a7c0c72135613 days 2 hrs ago0x2da64dcf8579e27ee40f2e3d762efb8af21bbb39  IN   MCH: Prime0.1 Ether0.000443295973
[ Download CSV Export 

Latest 1 Internal Transaction Internal Transactions as a result of Contract Execution

Parent TxHash Block Age From To Value
0xe946760879c368bc29072b6446866a7c0cf44415c23fe67ba266e52532371279717252611 days 21 hrs ago0xdee34cd48d77183b3e70f4f9ea2718c89bfefeb40xe7af11370c3bab51230d8307454350bdf6d68f4a0.2 Ether
[ Download CSV Export 
Contract Source Code Verified (Exact Match)
Contract Name: MCHPrime
Compiler Version: v0.5.2+commit.1df8f40c
Optimization Enabled: No
Runs (Optimizer):  200


Contract Source Code
pragma solidity ^0.5.2;

// File: contracts/lib/github.com/OpenZeppelin/openzeppelin-solidity-2.1.2/contracts/ownership/Ownable.sol

/**
 * @title Ownable
 * @dev The Ownable contract has an owner address, and provides basic authorization control
 * functions, this simplifies the implementation of "user permissions".
 */
contract Ownable {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev The Ownable constructor sets the original `owner` of the contract to the sender
     * account.
     */
    constructor () internal {
        _owner = msg.sender;
        emit OwnershipTransferred(address(0), _owner);
    }

    /**
     * @return the address of the owner.
     */
    function owner() public view returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(isOwner());
        _;
    }

    /**
     * @return true if `msg.sender` is the owner of the contract.
     */
    function isOwner() public view returns (bool) {
        return msg.sender == _owner;
    }

    /**
     * @dev Allows the current owner to relinquish control of the contract.
     * @notice Renouncing to ownership will leave the contract without an owner.
     * It will not be possible to call the functions with the `onlyOwner`
     * modifier anymore.
     */
    function renounceOwnership() public onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = address(0);
    }

    /**
     * @dev Allows the current owner to transfer control of the contract to a newOwner.
     * @param newOwner The address to transfer ownership to.
     */
    function transferOwnership(address newOwner) public onlyOwner {
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers control of the contract to a newOwner.
     * @param newOwner The address to transfer ownership to.
     */
    function _transferOwnership(address newOwner) internal {
        require(newOwner != address(0));
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

// File: contracts/lib/github.com/OpenZeppelin/openzeppelin-solidity-2.1.2/contracts/token/ERC20/IERC20.sol

/**
 * @title ERC20 interface
 * @dev see https://github.com/ethereum/EIPs/issues/20
 */
interface IERC20 {
    function transfer(address to, uint256 value) external returns (bool);

    function approve(address spender, uint256 value) external returns (bool);

    function transferFrom(address from, address to, uint256 value) external returns (bool);

    function totalSupply() external view returns (uint256);

    function balanceOf(address who) external view returns (uint256);

    function allowance(address owner, address spender) external view returns (uint256);

    event Transfer(address indexed from, address indexed to, uint256 value);

    event Approval(address indexed owner, address indexed spender, uint256 value);
}

// File: contracts/lib/github.com/contract-library/contract-library-0.0.4/contracts/ownership/Withdrawable.sol

contract Withdrawable is Ownable {
  function withdrawEther() external onlyOwner {
    msg.sender.transfer(address(this).balance);
  }

  function withdrawToken(IERC20 _token) external onlyOwner {
    require(_token.transfer(msg.sender, _token.balanceOf(address(this))));
  }
}

// File: contracts/lib/github.com/OpenZeppelin/openzeppelin-solidity-2.1.2/contracts/access/Roles.sol

/**
 * @title Roles
 * @dev Library for managing addresses assigned to a Role.
 */
library Roles {
    struct Role {
        mapping (address => bool) bearer;
    }

    /**
     * @dev give an account access to this role
     */
    function add(Role storage role, address account) internal {
        require(account != address(0));
        require(!has(role, account));

        role.bearer[account] = true;
    }

    /**
     * @dev remove an account's access to this role
     */
    function remove(Role storage role, address account) internal {
        require(account != address(0));
        require(has(role, account));

        role.bearer[account] = false;
    }

    /**
     * @dev check if an account has this role
     * @return bool
     */
    function has(Role storage role, address account) internal view returns (bool) {
        require(account != address(0));
        return role.bearer[account];
    }
}

// File: contracts/lib/github.com/OpenZeppelin/openzeppelin-solidity-2.1.2/contracts/access/roles/PauserRole.sol

contract PauserRole {
    using Roles for Roles.Role;

    event PauserAdded(address indexed account);
    event PauserRemoved(address indexed account);

    Roles.Role private _pausers;

    constructor () internal {
        _addPauser(msg.sender);
    }

    modifier onlyPauser() {
        require(isPauser(msg.sender));
        _;
    }

    function isPauser(address account) public view returns (bool) {
        return _pausers.has(account);
    }

    function addPauser(address account) public onlyPauser {
        _addPauser(account);
    }

    function renouncePauser() public {
        _removePauser(msg.sender);
    }

    function _addPauser(address account) internal {
        _pausers.add(account);
        emit PauserAdded(account);
    }

    function _removePauser(address account) internal {
        _pausers.remove(account);
        emit PauserRemoved(account);
    }
}

// File: contracts/lib/github.com/OpenZeppelin/openzeppelin-solidity-2.1.2/contracts/lifecycle/Pausable.sol

/**
 * @title Pausable
 * @dev Base contract which allows children to implement an emergency stop mechanism.
 */
contract Pausable is PauserRole {
    event Paused(address account);
    event Unpaused(address account);

    bool private _paused;

    constructor () internal {
        _paused = false;
    }

    /**
     * @return true if the contract is paused, false otherwise.
     */
    function paused() public view returns (bool) {
        return _paused;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     */
    modifier whenNotPaused() {
        require(!_paused);
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     */
    modifier whenPaused() {
        require(_paused);
        _;
    }

    /**
     * @dev called by the owner to pause, triggers stopped state
     */
    function pause() public onlyPauser whenNotPaused {
        _paused = true;
        emit Paused(msg.sender);
    }

    /**
     * @dev called by the owner to unpause, returns to normal state
     */
    function unpause() public onlyPauser whenPaused {
        _paused = false;
        emit Unpaused(msg.sender);
    }
}

// File: contracts/lib/github.com/OpenZeppelin/openzeppelin-solidity-2.1.2/contracts/math/SafeMath.sol

/**
 * @title SafeMath
 * @dev Unsigned math operations with safety checks that revert on error
 */
library SafeMath {
    /**
    * @dev Multiplies two unsigned integers, reverts on overflow.
    */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b);

        return c;
    }

    /**
    * @dev Integer division of two unsigned integers truncating the quotient, reverts on division by zero.
    */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        // Solidity only automatically asserts when dividing by 0
        require(b > 0);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    /**
    * @dev Subtracts two unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend).
    */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b <= a);
        uint256 c = a - b;

        return c;
    }

    /**
    * @dev Adds two unsigned integers, reverts on overflow.
    */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a);

        return c;
    }

    /**
    * @dev Divides two unsigned integers and returns the remainder (unsigned integer modulo),
    * reverts when dividing by zero.
    */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b != 0);
        return a % b;
    }
}

// File: contracts/lib/github.com/OpenZeppelin/openzeppelin-solidity-2.1.2/contracts/utils/ReentrancyGuard.sol

/**
 * @title Helps contracts guard against reentrancy attacks.
 * @author Remco Bloemen <[email protected]π.com>, Eenae <[email protected]>
 * @dev If you mark a function `nonReentrant`, you should also
 * mark it `external`.
 */
contract ReentrancyGuard {
    /// @dev counter to allow mutex lock with only one SSTORE operation
    uint256 private _guardCounter;

    constructor () internal {
        // The counter starts at one to prevent changing it from zero to a non-zero
        // value, which is a more expensive operation.
        _guardCounter = 1;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _guardCounter += 1;
        uint256 localCounter = _guardCounter;
        _;
        require(localCounter == _guardCounter);
    }
}

// File: contracts/lib/github.com/contract-library/contract-library-0.0.4/contracts/DJTBase.sol

contract DJTBase is Withdrawable, Pausable, ReentrancyGuard {
    using SafeMath for uint256;
}

// File: contracts/lib/github.com/contract-library/contract-library-0.0.4/contracts/access/roles/OperatorRole.sol

contract OperatorRole {
    using Roles for Roles.Role;

    event OperatorAdded(address indexed account);
    event OperatorRemoved(address indexed account);

    Roles.Role private operators;

    constructor() public {
        operators.add(msg.sender);
    }

    modifier onlyOperator() {
        require(isOperator(msg.sender));
        _;
    }
    
    function isOperator(address account) public view returns (bool) {
        return operators.has(account);
    }

    function addOperator(address account) public onlyOperator() {
        operators.add(account);
        emit OperatorAdded(account);
    }

    function removeOperator(address account) public onlyOperator() {
        operators.remove(account);
        emit OperatorRemoved(account);
    }

}

// File: contracts/lib/github.com/OpenZeppelin/openzeppelin-solidity-2.1.2/contracts/cryptography/ECDSA.sol

/**
 * @title Elliptic curve signature operations
 * @dev Based on https://gist.github.com/axic/5b33912c6f61ae6fd96d6c4a47afde6d
 * TODO Remove this library once solidity supports passing a signature to ecrecover.
 * See https://github.com/ethereum/solidity/issues/864
 */

library ECDSA {
    /**
     * @dev Recover signer address from a message by using their signature
     * @param hash bytes32 message, the hash is the signed message. What is recovered is the signer address.
     * @param signature bytes signature, the signature is generated using web3.eth.sign()
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        bytes32 r;
        bytes32 s;
        uint8 v;

        // Check the signature length
        if (signature.length != 65) {
            return (address(0));
        }

        // Divide the signature in r, s and v variables
        // ecrecover takes the signature parameters, and the only way to get them
        // currently is to use assembly.
        // solhint-disable-next-line no-inline-assembly
        assembly {
            r := mload(add(signature, 0x20))
            s := mload(add(signature, 0x40))
            v := byte(0, mload(add(signature, 0x60)))
        }

        // Version of signature should be 27 or 28, but 0 and 1 are also possible versions
        if (v < 27) {
            v += 27;
        }

        // If the version is correct return the signer address
        if (v != 27 && v != 28) {
            return (address(0));
        } else {
            return ecrecover(hash, v, r, s);
        }
    }

    /**
     * toEthSignedMessageHash
     * @dev prefix a bytes32 value with "\x19Ethereum Signed Message:"
     * and hash the result
     */
    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
        // 32 is the length in bytes of hash,
        // enforced by the type signature above
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
    }
}

// File: contracts/MCHPrime.sol

contract MCHPrime is OperatorRole, DJTBase {


	uint128 public primeFee;
	uint256 public primeTerm;
	uint256 public allowedUpdateBuffer;
	mapping(address => uint256) public addressToExpiredAt;

	address public validater;
  
	event PrimeFeeUpdated(
		uint128 PrimeFeeUpdated
	);

	event PrimeTermAdded(
		address user,
		uint256 expiredAt,
		uint256 at
	);

	event PrimeTermUpdated(
		uint256 primeTerm
	);

	event AllowedUpdateBufferUpdated(
		uint256 allowedUpdateBuffer
	);

	event ExpiredAtUpdated(
		address user,
		uint256 expiredAt,
		uint256 at
	);

	constructor() public {
		primeFee = 0.1 ether;
		primeTerm = 30 days;
		allowedUpdateBuffer = 5 days;
	}

	function setValidater(address _varidater) external onlyOwner() {
		validater = _varidater;
	}

	function updatePrimeFee(uint128 _newPrimeFee) external onlyOwner() {
		primeFee = _newPrimeFee;
		emit PrimeFeeUpdated(
			primeFee
		);
	}

	function updatePrimeTerm(uint256 _newPrimeTerm) external onlyOwner() {
		primeTerm = _newPrimeTerm;
		emit PrimeTermUpdated(
			primeTerm
		);
	}

	function updateAllowedUpdateBuffer(uint256 _newAllowedUpdateBuffer) external onlyOwner() {
		allowedUpdateBuffer = _newAllowedUpdateBuffer;
		emit AllowedUpdateBufferUpdated(
			allowedUpdateBuffer
		);
	}

	function updateExpiredAt(address _user, uint256 _expiredAt) external onlyOperator() {
		addressToExpiredAt[_user] = _expiredAt;
		emit ExpiredAtUpdated(
			_user,
			_expiredAt,
			block.timestamp
		);
	}

	function buyPrimeRights(bytes calldata _signature) external whenNotPaused() payable {
		require(msg.value == primeFee, "not enough eth");
		require(canUpdateNow(msg.sender), "unable to update");
		require(validateSig(_signature, bytes32(uint256(msg.sender))), "invalid signature");

		uint256 _now = block.timestamp;
		uint256 expiredAt = addressToExpiredAt[msg.sender];
		if (expiredAt <= _now) {
			addressToExpiredAt[msg.sender] = _now.add(primeTerm);
		} else if(expiredAt <= _now.add(allowedUpdateBuffer)) {
			addressToExpiredAt[msg.sender] = expiredAt.add(primeTerm);
		}

		emit PrimeTermAdded(
			msg.sender,
			addressToExpiredAt[msg.sender],
			_now
		);
	}

	function canUpdateNow(address _user) public view returns (bool) {
		uint256 _now = block.timestamp;
		uint256 expiredAt = addressToExpiredAt[_user];
		// expired user or new user
		if (expiredAt <= _now) {
			return true;
		}
		// user who are able to extend their PrimeTerm
		if (expiredAt <= _now.add(allowedUpdateBuffer)) {
			return true;
		}
		return false;
	}

	function validateSig(bytes memory _signature, bytes32 _message) private view returns (bool) {
		require(validater != address(0));
		address signer = ECDSA.recover(ECDSA.toEthSignedMessageHash(_message), _signature);
		return (signer == validater);
	}

}

Contract ABI
[{"constant":false,"inputs":[{"name":"_newPrimeFee","type":"uint128"}],"name":"updatePrimeFee","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_signature","type":"bytes"}],"name":"buyPrimeRights","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[],"name":"unpause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_newPrimeTerm","type":"uint256"}],"name":"updatePrimeTerm","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"account","type":"address"}],"name":"isPauser","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"addressToExpiredAt","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"paused","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"allowedUpdateBuffer","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_newAllowedUpdateBuffer","type":"uint256"}],"name":"updateAllowedUpdateBuffer","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"account","type":"address"}],"name":"isOperator","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"renouncePauser","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"withdrawEther","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"account","type":"address"}],"name":"addPauser","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"pause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_token","type":"address"}],"name":"withdrawToken","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_user","type":"address"},{"name":"_expiredAt","type":"uint256"}],"name":"updateExpiredAt","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isOwner","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"account","type":"address"}],"name":"addOperator","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"account","type":"address"}],"name":"removeOperator","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_user","type":"address"}],"name":"canUpdateNow","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"primeFee","outputs":[{"name":"","type":"uint128"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_varidater","type":"address"}],"name":"setValidater","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"primeTerm","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"validater","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"PrimeFeeUpdated","type":"uint128"}],"name":"PrimeFeeUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"user","type":"address"},{"indexed":false,"name":"expiredAt","type":"uint256"},{"indexed":false,"name":"at","type":"uint256"}],"name":"PrimeTermAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"primeTerm","type":"uint256"}],"name":"PrimeTermUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"allowedUpdateBuffer","type":"uint256"}],"name":"AllowedUpdateBufferUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"user","type":"address"},{"indexed":false,"name":"expiredAt","type":"uint256"},{"indexed":false,"name":"at","type":"uint256"}],"name":"ExpiredAtUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"account","type":"address"}],"name":"PauserAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"account","type":"address"}],"name":"PauserRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"account","type":"address"}],"name":"OperatorAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"account","type":"address"}],"name":"OperatorRemoved","type":"event"}]

Contract Creation Code
60806040523480156200001157600080fd5b50620000363360006200018c6401000000000262001939179091906401000000009004565b33600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36200010e336200024f640100000000026401000000009004565b6000600360006101000a81548160ff021916908315150217905550600160048190555067016345785d8a0000600560006101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff16021790555062278d00600681905550620697806007819055506200034e565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515620001c957600080fd5b620001e48282620002b9640100000000026401000000009004565b151515620001f157600080fd5b60018260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b620002738160026200018c6401000000000262001939179091906401000000009004565b8073ffffffffffffffffffffffffffffffffffffffff167f6719d08c1888103bea251a4ed56406bd0c3e69723c8a1686e017e7bbe159b6f860405160405180910390a250565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614151515620002f757600080fd5b8260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b611cfc806200035e6000396000f3fe6080604052600436106101b9576000357c01000000000000000000000000000000000000000000000000000000009004806382dc1ec411610109578063ac8a584a116100a7578063c14e50ce11610081578063c14e50ce146107db578063c512d5d01461082c578063d95b18eb14610857578063f2fde38b146108ae576101b9565b8063ac8a584a146106d2578063adfc982114610723578063af823d411461078c576101b9565b806389ad3220116100e357806389ad3220146105a05780638da5cb5b146105fb5780638f32d59b146106525780639870d7fe14610681576101b9565b806382dc1ec4146104e75780638456cb5914610538578063894760691461054f576101b9565b80635c975abb116101765780636d70f7ae116101505780636d70f7ae146104395780636ef8d66d146104a2578063715018a6146104b95780637362377b146104d0576101b9565b80635c975abb146103a457806360c7f35a146103d35780636a334655146103fe576101b9565b80632a695c14146101be5780632a916b431461020b5780633f4ba83a146102845780633f5b009a1461029b57806346fbf68e146102d657806348bc2bb31461033f575b600080fd5b3480156101ca57600080fd5b50610209600480360360208110156101e157600080fd5b8101908080356fffffffffffffffffffffffffffffffff1690602001909291905050506108ff565b005b6102826004803603602081101561022157600080fd5b810190808035906020019064010000000081111561023e57600080fd5b82018360208201111561025057600080fd5b8035906020019184600183028401116401000000008311171561027257600080fd5b90919293919293905050506109c7565b005b34801561029057600080fd5b50610299610dc0565b005b3480156102a757600080fd5b506102d4600480360360208110156102be57600080fd5b8101908080359060200190929190505050610e6f565b005b3480156102e257600080fd5b50610325600480360360208110156102f957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610ec5565b604051808215151515815260200191505060405180910390f35b34801561034b57600080fd5b5061038e6004803603602081101561036257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610ee2565b6040518082815260200191505060405180910390f35b3480156103b057600080fd5b506103b9610efa565b604051808215151515815260200191505060405180910390f35b3480156103df57600080fd5b506103e8610f11565b6040518082815260200191505060405180910390f35b34801561040a57600080fd5b506104376004803603602081101561042157600080fd5b8101908080359060200190929190505050610f17565b005b34801561044557600080fd5b506104886004803603602081101561045c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f6d565b604051808215151515815260200191505060405180910390f35b3480156104ae57600080fd5b506104b7610f8a565b005b3480156104c557600080fd5b506104ce610f95565b005b3480156104dc57600080fd5b506104e5611069565b005b3480156104f357600080fd5b506105366004803603602081101561050a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506110dc565b005b34801561054457600080fd5b5061054d6110fc565b005b34801561055b57600080fd5b5061059e6004803603602081101561057257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506111ac565b005b3480156105ac57600080fd5b506105f9600480360360408110156105c357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061137e565b005b34801561060757600080fd5b5061061061144d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561065e57600080fd5b50610667611477565b604051808215151515815260200191505060405180910390f35b34801561068d57600080fd5b506106d0600480360360208110156106a457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506114cf565b005b3480156106de57600080fd5b50610721600480360360208110156106f557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061153d565b005b34801561072f57600080fd5b506107726004803603602081101561074657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506115ab565b604051808215151515815260200191505060405180910390f35b34801561079857600080fd5b506107a161163d565b60405180826fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156107e757600080fd5b5061082a600480360360208110156107fe57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061165f565b005b34801561083857600080fd5b506108416116b6565b6040518082815260200191505060405180910390f35b34801561086357600080fd5b5061086c6116bc565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156108ba57600080fd5b506108fd600480360360208110156108d157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506116e2565b005b610907611477565b151561091257600080fd5b80600560006101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055507ffed96b0c64f9aaf4e519749bad60634447e9796f423a5e659d0a282eaf6117bb600560009054906101000a90046fffffffffffffffffffffffffffffffff1660405180826fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff16815260200191505060405180910390a150565b600360009054906101000a900460ff161515156109e357600080fd5b600560009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff1634141515610a8a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f6e6f7420656e6f7567682065746800000000000000000000000000000000000081525060200191505060405180910390fd5b610a93336115ab565b1515610b07576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f756e61626c6520746f207570646174650000000000000000000000000000000081525060200191505060405180910390fd5b610b6e82828080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050503373ffffffffffffffffffffffffffffffffffffffff16600102611701565b1515610be2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f696e76616c6964207369676e617475726500000000000000000000000000000081525060200191505060405180910390fd5b60004290506000600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508181111515610c9157610c49600654836117d090919063ffffffff16565b600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610d08565b610ca6600754836117d090919063ffffffff16565b81111515610d0757610cc3600654826117d090919063ffffffff16565b600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b5b7f8665b217237a31c64ca6468b4e32bfbe2318e2ce52042d61a30c934525f9ab3a33600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205484604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828152602001935050505060405180910390a150505050565b610dc933610ec5565b1515610dd457600080fd5b600360009054906101000a900460ff161515610def57600080fd5b6000600360006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1565b610e77611477565b1515610e8257600080fd5b806006819055507f9cbafb3744c21c389553d4ec97ef9c963c7c54b5d5fa92ecc561b1f242e5947a6006546040518082815260200191505060405180910390a150565b6000610edb8260026117f190919063ffffffff16565b9050919050565b60086020528060005260406000206000915090505481565b6000600360009054906101000a900460ff16905090565b60075481565b610f1f611477565b1515610f2a57600080fd5b806007819055507faaf2d702b0a9bc78edc2b61ca7f54ad67bf95dee4c1adaa42afa22431aeb69656007546040518082815260200191505060405180910390a150565b6000610f838260006117f190919063ffffffff16565b9050919050565b610f9333611885565b565b610f9d611477565b1515610fa857600080fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36000600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b611071611477565b151561107c57600080fd5b3373ffffffffffffffffffffffffffffffffffffffff166108fc3073ffffffffffffffffffffffffffffffffffffffff16319081150290604051600060405180830381858888f193505050501580156110d9573d6000803e3d6000fd5b50565b6110e533610ec5565b15156110f057600080fd5b6110f9816118df565b50565b61110533610ec5565b151561111057600080fd5b600360009054906101000a900460ff1615151561112c57600080fd5b6001600360006101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25833604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1565b6111b4611477565b15156111bf57600080fd5b8073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb338373ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561127557600080fd5b505afa158015611289573d6000803e3d6000fd5b505050506040513d602081101561129f57600080fd5b81019080805190602001909291905050506040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561133557600080fd5b505af1158015611349573d6000803e3d6000fd5b505050506040513d602081101561135f57600080fd5b8101908080519060200190929190505050151561137b57600080fd5b50565b61138733610f6d565b151561139257600080fd5b80600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055507fd61dba7e9e175f676fff24c4ab21e5c385319adce64fb7217c2fdf2a4c915c93828242604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828152602001935050505060405180910390a15050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614905090565b6114d833610f6d565b15156114e357600080fd5b6114f781600061193990919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff167fac6fa858e9350a46cec16539926e0fde25b7629f84b5a72bffaae4df888ae86d60405160405180910390a250565b61154633610f6d565b151561155157600080fd5b6115658160006119e990919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff167f80c0b871b97b595b16a7741c1b06fed0c6f6f558639f18ccbce50724325dc40d60405160405180910390a250565b6000804290506000600860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050818111151561160957600192505050611638565b61161e600754836117d090919063ffffffff16565b8111151561163157600192505050611638565b6000925050505b919050565b600560009054906101000a90046fffffffffffffffffffffffffffffffff1681565b611667611477565b151561167257600080fd5b80600960006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60065481565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6116ea611477565b15156116f557600080fd5b6116fe81611a98565b50565b60008073ffffffffffffffffffffffffffffffffffffffff16600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415151561176057600080fd5b600061177461176e84611b94565b85611bec565b9050600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161491505092915050565b60008082840190508381101515156117e757600080fd5b8091505092915050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415151561182e57600080fd5b8260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b6118998160026119e990919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff167fcd265ebaf09df2871cc7bd4133404a235ba12eff2041bb89d9c714a2621c7c7e60405160405180910390a250565b6118f381600261193990919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff167f6719d08c1888103bea251a4ed56406bd0c3e69723c8a1686e017e7bbe159b6f860405160405180910390a250565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561197557600080fd5b61197f82826117f1565b15151561198b57600080fd5b60018260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515611a2557600080fd5b611a2f82826117f1565b1515611a3a57600080fd5b60008260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515611ad457600080fd5b8073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008160405160200180807f19457468657265756d205369676e6564204d6573736167653a0a333200000000815250601c01828152602001915050604051602081830303815290604052805190602001209050919050565b60008060008060418551141515611c095760009350505050611cca565b6020850151925060408501519150606085015160001a9050601b8160ff161015611c3457601b810190505b601b8160ff1614158015611c4c5750601c8160ff1614155b15611c5d5760009350505050611cca565b60018682858560405160008152602001604052604051808581526020018460ff1660ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015611cba573d6000803e3d6000fd5b5050506020604051035193505050505b9291505056fea165627a7a72305820bcbe19ddd94a6ec1bcf5b6e7116877d401252e10c2ab69b8544f94ffbb28194e0029


   Swarm Source:
bzzr://bcbe19ddd94a6ec1bcf5b6e7116877d401252e10c2ab69b8544f94ffbb28194e
Block Age transaction Difficulty GasUsed Reward
Block Age Uncle Number Difficulty GasUsed Reward
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.