ETH Price: $2,605.32 (-4.34%)
Gas: 0.85 Gwei
 

Overview

Max Total Supply

413,242.685157897024924 DRS

Holders

73

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 18 Decimals)

Balance
5,229.575971202411436 DRS

Value
$0.00
0x67b9ca1f543bf21d5de381c3319a551c22059eaa
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
DRSCoin

Compiler Version
v0.4.24+commit.e67f0147

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2018-09-27
*/

pragma solidity ^0.4.24;

// File: contracts/library/SafeMath.sol

/**
 * @title SafeMath v0.1.9
 * @dev Math operations with safety checks that throw on error
 * change notes:  original SafeMath library from OpenZeppelin modified by Inventor
 * - added sqrt
 * - added sq
 * - added pwr 
 * - changed asserts to requires with error log outputs
 * - removed div, its useless
 */
library SafeMath {
    
    /**
    * @dev Multiplies two numbers, throws on overflow.
    */
    function mul(uint256 a, uint256 b) 
        internal 
        pure 
        returns (uint256 c) 
    {
        if (a == 0) {
            return 0;
        }
        c = a * b;
        require(c / a == b, "SafeMath mul failed");
        return c;
    }

    /**
    * @dev Integer division of two numbers, truncating the quotient.
    */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        assert(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 numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
    */
    function sub(uint256 a, uint256 b)
        internal
        pure
        returns (uint256) 
    {
        require(b <= a, "SafeMath sub failed");
        return a - b;
    }

    /**
    * @dev Adds two numbers, throws on overflow.
    */
    function add(uint256 a, uint256 b)
        internal
        pure
        returns (uint256 c) 
    {
        c = a + b;
        require(c >= a, "SafeMath add failed");
        return c;
    }
    
    /**
     * @dev gives square root of given x.
     */
    function sqrt(uint256 x)
        internal
        pure
        returns (uint256 y) 
    {
        uint256 z = ((add(x,1)) / 2);
        y = x;
        while (z < y) 
        {
            y = z;
            z = ((add((x / z),z)) / 2);
        }
    }
    
    /**
     * @dev gives square. multiplies x by x
     */
    function sq(uint256 x)
        internal
        pure
        returns (uint256)
    {
        return (mul(x,x));
    }
    
    /**
     * @dev x to the power of y 
     */
    function pwr(uint256 x, uint256 y)
        internal 
        pure 
        returns (uint256)
    {
        if (x==0)
            return (0);
        else if (y==0)
            return (1);
        else 
        {
            uint256 z = x;
            for (uint256 i=1; i < y; i++)
                z = mul(z,x);
            return (z);
        }
    }
}

// File: contracts/library/TimeUtils.sol

library TimeUtils {
    /*
     *  Date and Time utilities for ethereum contracts
     *
     */
    struct _DateTime {
        uint16 year;
        uint8 month;
        uint8 day;
        uint8 hour;
        uint8 minute;
        uint8 second;
        uint8 weekday;
    }

    uint constant DAY_IN_SECONDS = 86400;
    uint constant YEAR_IN_SECONDS = 31536000;
    uint constant LEAP_YEAR_IN_SECONDS = 31622400;

    uint constant HOUR_IN_SECONDS = 3600;
    uint constant MINUTE_IN_SECONDS = 60;

    uint16 constant ORIGIN_YEAR = 1970;

    function isLeapYear(uint16 year) public pure returns (bool) {
        if (year % 4 != 0) {
            return false;
        }
        if (year % 100 != 0) {
            return true;
        }
        if (year % 400 != 0) {
            return false;
        }
        return true;
    }

    function leapYearsBefore(uint year) public pure returns (uint) {
        year -= 1;
        return year / 4 - year / 100 + year / 400;
    }

    function getDaysInMonth(uint8 month, uint16 year) public pure returns (uint8) {
        if (month == 1 || month == 3 || month == 5 || month == 7 || month == 8 || month == 10 || month == 12) {
            return 31;
        }
        else if (month == 4 || month == 6 || month == 9 || month == 11) {
            return 30;
        }
        else if (isLeapYear(year)) {
            return 29;
        }
        else {
            return 28;
        }
    }

    function parseTimestamp(uint timestamp) internal pure returns (_DateTime dt) {
        uint secondsAccountedFor = 0;
        uint buf;
        uint8 i;

        // Year
        dt.year = getYear(timestamp);
        buf = leapYearsBefore(dt.year) - leapYearsBefore(ORIGIN_YEAR);

        secondsAccountedFor += LEAP_YEAR_IN_SECONDS * buf;
        secondsAccountedFor += YEAR_IN_SECONDS * (dt.year - ORIGIN_YEAR - buf);

        // Month
        uint secondsInMonth;
        for (i = 1; i <= 12; i++) {
            secondsInMonth = DAY_IN_SECONDS * getDaysInMonth(i, dt.year);
            if (secondsInMonth + secondsAccountedFor > timestamp) {
                dt.month = i;
                break;
            }
            secondsAccountedFor += secondsInMonth;
        }

        // Day
        for (i = 1; i <= getDaysInMonth(dt.month, dt.year); i++) {
            if (DAY_IN_SECONDS + secondsAccountedFor > timestamp) {
                dt.day = i;
                break;
            }
            secondsAccountedFor += DAY_IN_SECONDS;
        }

        // Hour
        dt.hour = getHour(timestamp);

        // Minute
        dt.minute = getMinute(timestamp);

        // Second
        dt.second = getSecond(timestamp);

        // Day of week.
        dt.weekday = getWeekday(timestamp);
    }

    function parseTimestampToYM(uint timestamp) internal pure returns (uint16, uint8) {
        uint secondsAccountedFor = 0;
        uint buf;
        uint8 i;

        uint16 year;
        uint8 month;

        // Year
        year = getYear(timestamp);
        buf = leapYearsBefore(year) - leapYearsBefore(ORIGIN_YEAR);

        secondsAccountedFor += LEAP_YEAR_IN_SECONDS * buf;
        secondsAccountedFor += YEAR_IN_SECONDS * (year - ORIGIN_YEAR - buf);

        // Month
        uint secondsInMonth;
        for(i = 1; i <= 12; i++) {
            secondsInMonth = DAY_IN_SECONDS * getDaysInMonth(i, year);
            if(secondsInMonth + secondsAccountedFor > timestamp) {
                month = i;
                break;
            }
            secondsAccountedFor += secondsInMonth;
        }

        return (year, month);
    }

    function getYear(uint timestamp) public pure returns (uint16) {
        uint secondsAccountedFor = 0;
        uint16 year;
        uint numLeapYears;

        // Year
        year = uint16(ORIGIN_YEAR + timestamp / YEAR_IN_SECONDS);
        numLeapYears = leapYearsBefore(year) - leapYearsBefore(ORIGIN_YEAR);

        secondsAccountedFor += LEAP_YEAR_IN_SECONDS * numLeapYears;
        secondsAccountedFor += YEAR_IN_SECONDS * (year - ORIGIN_YEAR - numLeapYears);

        while (secondsAccountedFor > timestamp) {
            if (isLeapYear(uint16(year - 1))) {
                secondsAccountedFor -= LEAP_YEAR_IN_SECONDS;
            }
            else {
                secondsAccountedFor -= YEAR_IN_SECONDS;
            }
            year -= 1;
        }
        return year;
    }

    function getMonth(uint timestamp) public pure returns (uint8) {
        return parseTimestamp(timestamp).month;
    }

    function getDay(uint timestamp) public pure returns (uint8) {
        return parseTimestamp(timestamp).day;
    }

    function getHour(uint timestamp) public pure returns (uint8) {
        return uint8((timestamp / 60 / 60) % 24);
    }

    function getMinute(uint timestamp) public pure returns (uint8) {
        return uint8((timestamp / 60) % 60);
    }

    function getSecond(uint timestamp) public pure returns (uint8) {
        return uint8(timestamp % 60);
    }

    function getWeekday(uint timestamp) public pure returns (uint8) {
        return uint8((timestamp / DAY_IN_SECONDS + 4) % 7);
    }

    function toTimestamp(uint16 year, uint8 month, uint8 day) public pure returns (uint timestamp) {
        return toTimestamp(year, month, day, 0, 0, 0);
    }

    function toTimestamp(uint16 year, uint8 month, uint8 day, uint8 hour) public pure returns (uint timestamp) {
        return toTimestamp(year, month, day, hour, 0, 0);
    }

    function toTimestamp(uint16 year, uint8 month, uint8 day, uint8 hour, uint8 minute) public pure returns (uint timestamp) {
        return toTimestamp(year, month, day, hour, minute, 0);
    }

    function toTimestamp(uint16 year, uint8 month, uint8 day, uint8 hour, uint8 minute, uint8 second) public pure returns (uint timestamp) {
        uint16 i;

        // Year
        for (i = ORIGIN_YEAR; i < year; i++) {
            if (isLeapYear(i)) {
                timestamp += LEAP_YEAR_IN_SECONDS;
            }
            else {
                timestamp += YEAR_IN_SECONDS;
            }
        }

        // Month
        uint8[12] memory monthDayCounts;
        monthDayCounts[0] = 31;
        if (isLeapYear(year)) {
            monthDayCounts[1] = 29;
        }
        else {
            monthDayCounts[1] = 28;
        }
        monthDayCounts[2] = 31;
        monthDayCounts[3] = 30;
        monthDayCounts[4] = 31;
        monthDayCounts[5] = 30;
        monthDayCounts[6] = 31;
        monthDayCounts[7] = 31;
        monthDayCounts[8] = 30;
        monthDayCounts[9] = 31;
        monthDayCounts[10] = 30;
        monthDayCounts[11] = 31;

        for (i = 1; i < month; i++) {
            timestamp += DAY_IN_SECONDS * monthDayCounts[i - 1];
        }

        // Day
        timestamp += DAY_IN_SECONDS * (day - 1);

        // Hour
        timestamp += HOUR_IN_SECONDS * (hour);

        // Minute
        timestamp += MINUTE_IN_SECONDS * (minute);

        // Second
        timestamp += second;

        return timestamp;
    }
}

// File: contracts/interface/DRSCoinInterface.sol

interface DRSCoinInterface {
    function mint(address _to, uint256 _amount) external;
    function profitEth() external payable;
}

// File: contracts/DRSCoin.sol

contract DRSCoin {
    using SafeMath for uint256;
    using TimeUtils for uint;

    struct MonthInfo {
        uint256 ethIncome;
        uint256 totalTokenSupply;
    }

    string constant tokenName = "DRSCoin";
    string constant tokenSymbol = "DRS";
    uint8 constant decimalUnits = 18;

    uint256 public constant tokenExchangeInitRate = 500; // 500 tokens per 1 ETH initial
    uint256 public constant tokenExchangeLeastRate = 10; // 10 tokens per 1 ETH at least
    uint256 public constant tokenReduceValue = 5000000;
    uint256 public constant coinReduceRate = 90;

    uint256 constant private proposingPeriod = 2 days;
    // uint256 constant private proposingPeriod = 2 seconds;

    string public name;
    string public symbol;
    uint8 public decimals;

    uint256 public totalSupply = 0;
    uint256 public tokenReduceAmount;
    uint256 public tokenExchangeRate; // DRSCoin / eth
    uint256 public nextReduceSupply;  // next DRSCoin reduction supply

    address public owner;

    mapping(address => bool) restrictedAddresses;

    mapping(address => uint256) public balanceOf;

    mapping(address => mapping(address => uint256)) public allowance;

    mapping(address => uint32) public lastRefundMonth;

    mapping(address => uint256) public refundEth;  //record the user profit

    mapping(uint32 => MonthInfo) monthInfos;

    mapping(address => bool) allowedGameAddress;

    mapping(address => uint256) proposedGames;

    /* This generates a public event on the blockchain that will notify clients */
    event Transfer(address indexed from, address indexed to, uint256 value);

    event Approval(address indexed _owner, address indexed _spender, uint256 _value);

    event Mint(address indexed _to, uint256 _value);

    // event Info(uint256 _value);

    /* This notifies clients about the amount burnt */
    event Burn(address indexed from, uint256 value);

    event Profit(address indexed from, uint256 year, uint256 month, uint256 value);

    event Withdraw(address indexed from, uint256 value);

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

    modifier onlyAllowedGameAddress {
        require(allowedGameAddress[msg.sender], "only allowed games permit to call");
        _;
    }

    /* Initializes contract with initial supply tokens to the creator of the contract */
    constructor() public
    {
        name = tokenName;                                   // Set the name for display purposes
        symbol = tokenSymbol;                               // Set the symbol for display purposes
        decimals = decimalUnits;                            // Amount of decimals for display purposes

        tokenReduceAmount = tokenReduceValue.mul(uint256(10) ** uint256(decimals));
        tokenExchangeRate = tokenExchangeInitRate;          // Set initial token exchange rate
        nextReduceSupply = tokenReduceAmount;               // Set next token reduction supply

        owner = msg.sender;
    }

    // _startMonth included
    // _nowMonth excluded
    function settleEth(address _addr, uint32 _startMonth, uint32 _nowMonth) internal {
        require(_nowMonth >= _startMonth);

        // _startMonth == 0 means new address
        if(_startMonth == 0) {
            lastRefundMonth[_addr] = _nowMonth;
            return;
        }

        if(_nowMonth == _startMonth) {
            lastRefundMonth[_addr] = _nowMonth;
            return;
        }

        uint256 _balance = balanceOf[_addr];
        if(_balance == 0) {
            lastRefundMonth[_addr] = _nowMonth;
            return;
        }

        uint256 _unpaidPerfit = getUnpaidPerfit(_startMonth, _nowMonth, _balance);
        refundEth[_addr] = refundEth[_addr].add(_unpaidPerfit);

        lastRefundMonth[_addr] = _nowMonth;
        return;
    }

    function getCurrentMonth() internal view returns(uint32) {
        (uint16 _year, uint8 _month) = now.parseTimestampToYM();
        return _year * 12 + _month - 1;
    }

    function transfer(address _to, uint256 _value) public returns(bool success) {
        require(_value > 0);
        require(balanceOf[msg.sender] >= _value);              // Check if the sender has enough
        require(balanceOf[_to] + _value >= balanceOf[_to]);    // Check for overflows
        require(!restrictedAddresses[msg.sender]);
        require(!restrictedAddresses[_to]);

        uint32 _nowMonth = getCurrentMonth();

        // settle msg.sender's eth
        settleEth(msg.sender, lastRefundMonth[msg.sender], _nowMonth);

        // settle _to's eth
        settleEth(_to, lastRefundMonth[_to], _nowMonth);

        // transfer token
        balanceOf[msg.sender] = balanceOf[msg.sender].sub(_value);   // Subtract from the sender
        balanceOf[_to] = balanceOf[_to].add(_value);                 // Add the same to the recipient
        emit Transfer(msg.sender, _to, _value);                      // Notify anyone listening that this transfer took place
        return true;
    }

    function approve(address _spender, uint256 _value) public returns(bool success) {
        allowance[msg.sender][_spender] = _value;                 // Set allowance
        emit Approval(msg.sender, _spender, _value);              // Raise Approval event
        return true;
    }

    function transferFrom(address _from, address _to, uint256 _value) public returns(bool success) {
        require(balanceOf[_from] >= _value);                  // Check if the sender has enough
        require(balanceOf[_to] + _value >= balanceOf[_to]);   // Check for overflows
        require(_value <= allowance[_from][msg.sender]);      // Check allowance
        require(!restrictedAddresses[_from]);
        require(!restrictedAddresses[msg.sender]);
        require(!restrictedAddresses[_to]);

        uint32 _nowMonth = getCurrentMonth();

        // settle _from's eth
        settleEth(_from, lastRefundMonth[_from], _nowMonth);

        // settle _to's eth
        settleEth(_to, lastRefundMonth[_to], _nowMonth);

        // transfer token
        balanceOf[_from] = balanceOf[_from].sub(_value);    // Subtract from the sender
        balanceOf[_to] = balanceOf[_to].add(_value);        // Add the same to the recipient
        allowance[_from][msg.sender] = allowance[_from][msg.sender].sub(_value);
        emit Transfer(_from, _to, _value);
        return true;
    }

    function getUnpaidPerfit(uint32 _startMonth, uint32 _endMonth, uint256 _tokenAmount) internal view returns(uint256)
    {
        require(_startMonth > 0);
        require(_endMonth >= _startMonth);

        if(_startMonth == _endMonth) {
            return 0;
        }

        if(_tokenAmount == 0) {
            return 0;
        }

        uint256 _profit = 0;

        uint256 _income;
        uint256 _totalSupply;
        for(uint32 j = _startMonth; j < _endMonth; j++) {
            _income = monthInfos[j].ethIncome;
            _totalSupply = monthInfos[j].totalTokenSupply;
            if(_income > 0 && _totalSupply > 0) {
                _profit = _profit.add(_income.mul(_tokenAmount).div(_totalSupply));
            }
        }

        return _profit;
    }

    function totalSupply() constant public returns(uint256) {
        return totalSupply;
    }

    function tokenExchangeRate() constant public returns(uint256) {
        return tokenExchangeRate;
    }

    function nextReduceSupply() constant public returns(uint256) {
        return nextReduceSupply;
    }

    function balanceOf(address _owner) constant public returns(uint256) {
        return balanceOf[_owner];
    }

    function allowance(address _owner, address _spender) constant public returns(uint256) {
        return allowance[_owner][_spender];
    }

    function() public payable {
        revert();
    }

    /* Owner can add new restricted address or removes one */
    function editRestrictedAddress(address _newRestrictedAddress) public onlyOwner {
        restrictedAddresses[_newRestrictedAddress] = !restrictedAddresses[_newRestrictedAddress];
    }

    function isRestrictedAddress(address _querryAddress) constant public returns(bool) {
        return restrictedAddresses[_querryAddress];
    }

    function getMintAmount(uint256 _eth) private view returns(uint256 _amount, uint256 _nextReduceSupply, uint256 _tokenExchangeRate) {
        _nextReduceSupply = nextReduceSupply;
        _tokenExchangeRate = tokenExchangeRate;

        _amount = 0;
        uint256 _part = _nextReduceSupply.sub(totalSupply);  // calculate how many DRSCoin can mint in this period
        while(_part <= _eth.mul(_tokenExchangeRate)) {
            _eth = _eth.sub(_part.div(_tokenExchangeRate));  // sub eth amount
            _amount = _amount.add(_part);                    // add DRSCoin mint in this small part

            _part = tokenReduceAmount;
            _nextReduceSupply = _nextReduceSupply.add(tokenReduceAmount);

            if(_tokenExchangeRate > tokenExchangeLeastRate) {
                _tokenExchangeRate = _tokenExchangeRate.mul(coinReduceRate).div(100);
                if(_tokenExchangeRate < tokenExchangeLeastRate) {
                    _tokenExchangeRate = tokenExchangeLeastRate;
                }
            }
        }

        _amount = _amount.add(_eth.mul(_tokenExchangeRate));

        return (_amount, _nextReduceSupply, _tokenExchangeRate);
    }

    function mint(address _to, uint256 _eth) external onlyAllowedGameAddress {
        require(_eth > 0);

        (uint256 _amount, uint256 _nextReduceSupply, uint256 _tokenExchangeRate) = getMintAmount(_eth);

        require(_amount > 0);
        require(totalSupply + _amount > totalSupply);
        require(balanceOf[_to] + _amount > balanceOf[_to]);     // Check for overflows

        uint32 _nowMonth = getCurrentMonth();

        // settle _to's eth
        settleEth(_to, lastRefundMonth[_to], _nowMonth);

        totalSupply = _amount.add(totalSupply);                 // Update total supply
        balanceOf[_to] = _amount.add(balanceOf[_to]);           // Set minted coins to target

        // add current month's totalTokenSupply
        monthInfos[_nowMonth].totalTokenSupply = totalSupply;

        if(_nextReduceSupply != nextReduceSupply) {
            nextReduceSupply = _nextReduceSupply;
        }
        if(_tokenExchangeRate != tokenExchangeRate) {
            tokenExchangeRate = _tokenExchangeRate;
        }

        emit Mint(_to, _amount);                                // Create Mint event
        emit Transfer(0x0, _to, _amount);                       // Create Transfer event from 0x
    }

    function burn(uint256 _value) public returns(bool success) {
        require(balanceOf[msg.sender] >= _value);            // Check if the sender has enough
        require(_value > 0);

        uint32 _nowMonth = getCurrentMonth();

        // settle msg.sender's eth
        settleEth(msg.sender, lastRefundMonth[msg.sender], _nowMonth);

        balanceOf[msg.sender] = balanceOf[msg.sender].sub(_value);            // Subtract from the sender
        totalSupply = totalSupply.sub(_value);                                // Updates totalSupply

        // update current month's totalTokenSupply
        monthInfos[_nowMonth].totalTokenSupply = totalSupply;

        emit Burn(msg.sender, _value);
        return true;
    }

    function addGame(address gameAddress) public onlyOwner {
        require(!allowedGameAddress[gameAddress], "game already in allow list");
        require(proposedGames[gameAddress] > 0, "game must be in proposed list first");
        require(now > proposedGames[gameAddress].add(proposingPeriod), "game must be debated for 2 days");

        // add gameAddress to allowedGameAddress
        allowedGameAddress[gameAddress] = true;

        // delete gameAddress from proposedGames
        proposedGames[gameAddress] = 0;
    }

    function proposeGame(address gameAddress) public onlyOwner {
        require(!allowedGameAddress[gameAddress], "game already in allow list");
        require(proposedGames[gameAddress] == 0, "game already in proposed list");

        // add gameAddress to proposedGames
        proposedGames[gameAddress] = now;
    }

    function deleteGame (address gameAddress) public onlyOwner {
        require(allowedGameAddress[gameAddress] || proposedGames[gameAddress] > 0, "game must in allow list or proposed list");

        // delete gameAddress from allowedGameAddress
        allowedGameAddress[gameAddress] = false;

        // delete gameAddress from proposedGames
        proposedGames[gameAddress] = 0;
    }

    function gameCountdown(address gameAddress) public view returns(uint256) {
        require(proposedGames[gameAddress] > 0, "game not in proposed list");

        uint256 proposedTime = proposedGames[gameAddress];

        if(now < proposedTime.add(proposingPeriod)) {
            return proposedTime.add(proposingPeriod).sub(now);
        } else {
            return 0;
        }
    }

    function profitEth() external payable onlyAllowedGameAddress {
        (uint16 _year, uint8 _month) = now.parseTimestampToYM();
        uint32 _nowMonth = _year * 12 + _month - 1;

        uint256 _ethIncome = monthInfos[_nowMonth].ethIncome.add(msg.value);

        monthInfos[_nowMonth].ethIncome = _ethIncome;

        if(monthInfos[_nowMonth].totalTokenSupply == 0) {
            monthInfos[_nowMonth].totalTokenSupply = totalSupply;
        }

        emit Profit(msg.sender, _year, _month, _ethIncome);
    }

    function withdraw() public {
        require(!restrictedAddresses[msg.sender]);  // check if msg.sender is restricted

        uint32 _nowMonth = getCurrentMonth();

        uint32 _startMonth = lastRefundMonth[msg.sender];
        require(_startMonth > 0);

        settleEth(msg.sender, _startMonth, _nowMonth);

        uint256 _profit = refundEth[msg.sender];
        require(_profit > 0);

        refundEth[msg.sender] = 0;
        msg.sender.transfer(_profit);

        emit Withdraw(msg.sender, _profit);
    }

    function getEthPerfit(address _addr) public view returns(uint256) {
        uint32 _nowMonth = getCurrentMonth();

        uint32 _startMonth = lastRefundMonth[_addr];
        // new user
        if(_startMonth == 0) {
            return 0;
        }

        uint256 _tokenAmount = balanceOf[_addr];

        uint256 _perfit = refundEth[_addr];

        if(_startMonth < _nowMonth && _tokenAmount > 0) {
            uint256 _unpaidPerfit = getUnpaidPerfit(_startMonth, _nowMonth, _tokenAmount);
            _perfit = _perfit.add(_unpaidPerfit);
        }

        return _perfit;
    }
}

// contract DRSCoinTestContract {
//     DRSCoinInterface public drsCoin;

//     constructor(address _drsCoin) public {
//         drsCoin = DRSCoinInterface(_drsCoin);
//     }

//     function mintDRSCoin(address _addr, uint256 _amount) public {
//         drsCoin.mint(_addr, _amount);
//     }
// }

Contract Security Audit

Contract ABI

[{"constant":true,"inputs":[{"name":"_querryAddress","type":"address"}],"name":"isRestrictedAddress","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"name":"approve","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_addr","type":"address"}],"name":"getEthPerfit","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_eth","type":"uint256"}],"name":"mint","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"tokenExchangeRate","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_value","type":"uint256"}],"name":"burn","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_newRestrictedAddress","type":"address"}],"name":"editRestrictedAddress","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"tokenReduceAmount","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"gameAddress","type":"address"}],"name":"proposeGame","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"gameAddress","type":"address"}],"name":"deleteGame","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"profitEth","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"tokenExchangeLeastRate","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"tokenReduceValue","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"coinReduceRate","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"tokenExchangeInitRate","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transfer","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"gameAddress","type":"address"}],"name":"addGame","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"refundEth","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_spender","type":"address"}],"name":"allowance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"lastRefundMonth","outputs":[{"name":"","type":"uint32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"gameAddress","type":"address"}],"name":"gameCountdown","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"nextReduceSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_owner","type":"address"},{"indexed":true,"name":"_spender","type":"address"},{"indexed":false,"name":"_value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_to","type":"address"},{"indexed":false,"name":"_value","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Burn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":false,"name":"year","type":"uint256"},{"indexed":false,"name":"month","type":"uint256"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Profit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Withdraw","type":"event"}]

608060405260006003553480156200001657600080fd5b506040805180820190915260078082527f445253436f696e0000000000000000000000000000000000000000000000000060209092019182526200005d9160009162000196565b506040805180820190915260038082527f44525300000000000000000000000000000000000000000000000000000000006020909201918252620000a49160019162000196565b506002805460ff191660121790819055620000d890624c4b409060ff16600a0a64010000000062001ba7620000fe82021704565b60048190556101f460055560065560078054600160a060020a031916331790556200023b565b6000821515620001115750600062000190565b508181028183828115156200012257fe5b04146200019057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f536166654d617468206d756c206661696c656400000000000000000000000000604482015290519081900360640190fd5b92915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620001d957805160ff191683800117855562000209565b8280016001018555821562000209579182015b8281111562000209578251825591602001919060010190620001ec565b50620002179291506200021b565b5090565b6200023891905b8082111562000217576000815560010162000222565b90565b611e29806200024b6000396000f30060806040526004361061017f5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166303c175ff811461018457806306fdde03146101b9578063095ea7b31461024357806318160ddd1461026757806323b872dd1461028e5780632bf4760b146102b8578063313ce567146102d95780633ccfd60b1461030457806340c10f191461031b5780634172d0801461033f57806342966c68146103545780634ec883d11461036c57806370a082311461038d578063762c159a146103ae5780638284f2a7146103c35780638406ab82146103e45780638b77071c146104055780638da5cb5b1461040d578063903e285a1461043e57806394807acc1461045357806395d89b411461046857806397da2f8c1461047d5780639b741d9d14610492578063a9059cbb146104a7578063d72d04db146104cb578063d83edd70146104ec578063dd62ed3e1461050d578063e39f722a14610534578063f16b64821461056e578063f45ef0331461058f575b600080fd5b34801561019057600080fd5b506101a5600160a060020a03600435166105a4565b604080519115158252519081900360200190f35b3480156101c557600080fd5b506101ce6105c6565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102085781810151838201526020016101f0565b50505050905090810190601f1680156102355780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561024f57600080fd5b506101a5600160a060020a0360043516602435610654565b34801561027357600080fd5b5061027c6106bb565b60408051918252519081900360200190f35b34801561029a57600080fd5b506101a5600160a060020a03600435811690602435166044356106c1565b3480156102c457600080fd5b5061027c600160a060020a0360043516610917565b3480156102e557600080fd5b506102ee6109d1565b6040805160ff9092168252519081900360200190f35b34801561031057600080fd5b506103196109da565b005b34801561032757600080fd5b50610319600160a060020a0360043516602435610aca565b34801561034b57600080fd5b5061027c610d13565b34801561036057600080fd5b506101a5600435610d19565b34801561037857600080fd5b50610319600160a060020a0360043516610e13565b34801561039957600080fd5b5061027c600160a060020a0360043516610e50565b3480156103ba57600080fd5b5061027c610e6b565b3480156103cf57600080fd5b50610319600160a060020a0360043516610e71565b3480156103f057600080fd5b50610319600160a060020a0360043516610f80565b610319611079565b34801561041957600080fd5b506104226111da565b60408051600160a060020a039092168252519081900360200190f35b34801561044a57600080fd5b5061027c6111e9565b34801561045f57600080fd5b5061027c6111ee565b34801561047457600080fd5b506101ce6111f5565b34801561048957600080fd5b5061027c61124f565b34801561049e57600080fd5b5061027c611254565b3480156104b357600080fd5b506101a5600160a060020a036004351660243561125a565b3480156104d757600080fd5b50610319600160a060020a03600435166113f6565b3480156104f857600080fd5b5061027c600160a060020a03600435166115c0565b34801561051957600080fd5b5061027c600160a060020a03600435811690602435166115d2565b34801561054057600080fd5b50610555600160a060020a03600435166115fd565b6040805163ffffffff9092168252519081900360200190f35b34801561057a57600080fd5b5061027c600160a060020a0360043516611615565b34801561059b57600080fd5b5061027c6116ed565b600160a060020a03811660009081526008602052604090205460ff165b919050565b6000805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561064c5780601f106106215761010080835404028352916020019161064c565b820191906000526020600020905b81548152906001019060200180831161062f57829003601f168201915b505050505081565b336000818152600a60209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a35060015b92915050565b60035490565b600160a060020a03831660009081526009602052604081205481908311156106e857600080fd5b600160a060020a038416600090815260096020526040902054838101101561070f57600080fd5b600160a060020a0385166000908152600a6020908152604080832033845290915290205483111561073f57600080fd5b600160a060020a03851660009081526008602052604090205460ff161561076557600080fd5b3360009081526008602052604090205460ff161561078257600080fd5b600160a060020a03841660009081526008602052604090205460ff16156107a857600080fd5b6107b06116f3565b600160a060020a0386166000908152600b60205260409020549091506107de90869063ffffffff168361171c565b600160a060020a0384166000908152600b602052604090205461080990859063ffffffff168361171c565b600160a060020a038516600090815260096020526040902054610832908463ffffffff61187e16565b600160a060020a038087166000908152600960205260408082209390935590861681522054610867908463ffffffff6118de16565b600160a060020a038086166000908152600960209081526040808320949094559188168152600a825282812033825290915220546108ab908463ffffffff61187e16565b600160a060020a038087166000818152600a6020908152604080832033845282529182902094909455805187815290519288169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a3506001949350505050565b6000806000806000806109286116f3565b600160a060020a0388166000908152600b602052604090205490955063ffffffff16935083151561095c57600095506109c7565b600160a060020a038716600090815260096020908152604080832054600c90925290912054909350915063ffffffff80861690851610801561099e5750600083115b156109c3576109ae848685611939565b90506109c0828263ffffffff6118de16565b91505b8195505b5050505050919050565b60025460ff1681565b336000908152600860205260408120548190819060ff16156109fb57600080fd5b610a036116f3565b336000908152600b602052604081205491945063ffffffff90911692508211610a2b57600080fd5b610a3633838561171c565b50336000908152600c6020526040812054908111610a5357600080fd5b336000818152600c60205260408082208290555183156108fc0291849190818181858888f19350505050158015610a8e573d6000803e3d6000fd5b5060408051828152905133917f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a9424364919081900360200190a2505050565b336000908152600e602052604081205481908190819060ff161515610b5f576040805160e560020a62461bcd02815260206004820152602160248201527f6f6e6c7920616c6c6f7765642067616d6573207065726d697420746f2063616c60448201527f6c00000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b60008511610b6c57600080fd5b610b7585611a2e565b9195509350915060008411610b8957600080fd5b60035484810111610b9957600080fd5b600160a060020a03861660009081526009602052604090205484810111610bbf57600080fd5b610bc76116f3565b600160a060020a0387166000908152600b6020526040902054909150610bf590879063ffffffff168361171c565b600354610c0990859063ffffffff6118de16565b600355600160a060020a038616600090815260096020526040902054610c3690859063ffffffff6118de16565b600160a060020a03871660009081526009602090815260408083209390935560035463ffffffff85168352600d909152919020600101556006548314610c7c5760068390555b6005548214610c8b5760058290555b604080518581529051600160a060020a038816917f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885919081900360200190a2604080518581529051600160a060020a038816916000917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a3505050505050565b60055490565b336000908152600960205260408120548190831115610d3757600080fd5b60008311610d4457600080fd5b610d4c6116f3565b336000818152600b6020526040902054919250610d6f9163ffffffff168361171c565b33600090815260096020526040902054610d8f908463ffffffff61187e16565b33600090815260096020526040902055600354610db2908463ffffffff61187e16565b600381905563ffffffff82166000908152600d6020908152604091829020600101929092558051858152905133927fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5928290030190a2600191505b50919050565b600754600160a060020a03163314610e2757fe5b600160a060020a03166000908152600860205260409020805460ff19811660ff90911615179055565b600160a060020a031660009081526009602052604090205490565b60045481565b600754600160a060020a03163314610e8557fe5b600160a060020a0381166000908152600e602052604090205460ff1615610ef6576040805160e560020a62461bcd02815260206004820152601a60248201527f67616d6520616c726561647920696e20616c6c6f77206c697374000000000000604482015290519081900360640190fd5b600160a060020a0381166000908152600f602052604090205415610f64576040805160e560020a62461bcd02815260206004820152601d60248201527f67616d6520616c726561647920696e2070726f706f736564206c697374000000604482015290519081900360640190fd5b600160a060020a03166000908152600f60205260409020429055565b600754600160a060020a03163314610f9457fe5b600160a060020a0381166000908152600e602052604090205460ff1680610fd15750600160a060020a0381166000908152600f6020526040812054115b151561104d576040805160e560020a62461bcd02815260206004820152602860248201527f67616d65206d75737420696e20616c6c6f77206c697374206f722070726f706f60448201527f736564206c697374000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600160a060020a03166000908152600e60209081526040808320805460ff19169055600f909152812055565b336000908152600e602052604081205481908190819060ff16151561110e576040805160e560020a62461bcd02815260206004820152602160248201527f6f6e6c7920616c6c6f7765642067616d6573207065726d697420746f2063616c60448201527f6c00000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b61111742611b05565b61ffff600019600c840260ff84160101166000818152600d6020526040902054929650909450925061114990346118de565b63ffffffff83166000908152600d6020526040902081815560010154909150151561118b5760035463ffffffff83166000908152600d60205260409020600101555b6040805161ffff8616815260ff85166020820152808201839052905133917f8b0cb8ed9764b54369b23141ee20ee74d5fec21db7c14535d1fe5ce94b4d4913919081900360600190a250505050565b600754600160a060020a031681565b600a81565b624c4b4081565b60018054604080516020600284861615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561064c5780601f106106215761010080835404028352916020019161064c565b605a81565b6101f481565b60008080831161126957600080fd5b3360009081526009602052604090205483111561128557600080fd5b600160a060020a03841660009081526009602052604090205483810110156112ac57600080fd5b3360009081526008602052604090205460ff16156112c957600080fd5b600160a060020a03841660009081526008602052604090205460ff16156112ef57600080fd5b6112f76116f3565b336000818152600b602052604090205491925061131a9163ffffffff168361171c565b600160a060020a0384166000908152600b602052604090205461134590859063ffffffff168361171c565b33600090815260096020526040902054611365908463ffffffff61187e16565b3360009081526009602052604080822092909255600160a060020a03861681522054611397908463ffffffff6118de16565b600160a060020a0385166000818152600960209081526040918290209390935580518681529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35060019392505050565b600754600160a060020a0316331461140a57fe5b600160a060020a0381166000908152600e602052604090205460ff161561147b576040805160e560020a62461bcd02815260206004820152601a60248201527f67616d6520616c726561647920696e20616c6c6f77206c697374000000000000604482015290519081900360640190fd5b600160a060020a0381166000908152600f60205260408120541161150f576040805160e560020a62461bcd02815260206004820152602360248201527f67616d65206d75737420626520696e2070726f706f736564206c69737420666960448201527f7273740000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600160a060020a0381166000908152600f602052604090205461153b906202a30063ffffffff6118de16565b4211611591576040805160e560020a62461bcd02815260206004820152601f60248201527f67616d65206d757374206265206465626174656420666f722032206461797300604482015290519081900360640190fd5b600160a060020a03166000908152600e60209081526040808320805460ff19166001179055600f909152812055565b600c6020526000908152604090205481565b600160a060020a039182166000908152600a6020908152604080832093909416825291909152205490565b600b6020526000908152604090205463ffffffff1681565b600160a060020a0381166000908152600f602052604081205481908110611686576040805160e560020a62461bcd02815260206004820152601960248201527f67616d65206e6f7420696e2070726f706f736564206c69737400000000000000604482015290519081900360640190fd5b50600160a060020a0382166000908152600f60205260409020546116b3816202a30063ffffffff6118de16565b4210156116e4576116dd426116d1836202a30063ffffffff6118de16565b9063ffffffff61187e16565b9150610e0d565b60009150610e0d565b60065490565b600080600061170142611b05565b9150915060018160ff1683600c02010361ffff169250505090565b60008063ffffffff808516908416101561173557600080fd5b63ffffffff8416151561177257600160a060020a0385166000908152600b60205260409020805463ffffffff191663ffffffff8516179055611877565b8363ffffffff168363ffffffff1614156117b657600160a060020a0385166000908152600b60205260409020805463ffffffff191663ffffffff8516179055611877565b600160a060020a038516600090815260096020526040902054915081151561180857600160a060020a0385166000908152600b60205260409020805463ffffffff191663ffffffff8516179055611877565b611813848484611939565b600160a060020a0386166000908152600c602052604090205490915061183f908263ffffffff6118de16565b600160a060020a0386166000908152600c6020908152604080832093909355600b905220805463ffffffff191663ffffffff85161790555b5050505050565b6000828211156118d8576040805160e560020a62461bcd02815260206004820152601360248201527f536166654d61746820737562206661696c656400000000000000000000000000604482015290519081900360640190fd5b50900390565b818101828110156106b5576040805160e560020a62461bcd02815260206004820152601360248201527f536166654d61746820616464206661696c656400000000000000000000000000604482015290519081900360640190fd5b60008080808063ffffffff8816811061195157600080fd5b63ffffffff808916908816101561196757600080fd5b8663ffffffff168863ffffffff1614156119845760009450611a23565b8515156119945760009450611a23565b5060009250865b8663ffffffff168163ffffffff161015611a1f5763ffffffff81166000908152600d6020526040812080546001909101549094509250831180156119df5750600082115b15611a1757611a14611a07836119fb868a63ffffffff611ba716565b9063ffffffff611c1e16565b859063ffffffff6118de16565b93505b60010161199b565b8394505b505050509392505050565b60065460055460035460009291908390611a4f90849063ffffffff61187e16565b90505b611a62858363ffffffff611ba716565b8111611ae857611a88611a7b828463ffffffff611c1e16565b869063ffffffff61187e16565b9450611a9a848263ffffffff6118de16565b6004549094509050611ab2838263ffffffff6118de16565b9250600a821115611ae357611ad360646119fb84605a63ffffffff611ba716565b9150600a821015611ae357600a91505b611a52565b611afb611a07868463ffffffff611ba716565b9350509193909250565b600080808080808080611b1789611c3e565b9250611b246107b2611cce565b611b318461ffff16611cce565b039450846301e285000286019550846107b2840361ffff16036301e133800286019550600193505b600c60ff851611611b9957611b6e8484611ce9565b60ff1662015180029050888682011115611b8a57839150611b99565b94850194600190930192611b59565b509097909650945050505050565b6000821515611bb8575060006106b5565b50818102818382811515611bc857fe5b04146106b5576040805160e560020a62461bcd02815260206004820152601360248201527f536166654d617468206d756c206661696c656400000000000000000000000000604482015290519081900360640190fd5b600080808311611c2a57fe5b8284811515611c3557fe5b04949350505050565b6000806107b26301e1338084048101908290611c5990611cce565b611c668361ffff16611cce565b039050806301e285000283019250806107b2830361ffff16036301e1338002830192505b84831115611cc657611c9e60018303611daf565b15611cb1576301e2850083039250611cbb565b6301e13380830392505b600182039150611c8a565b509392505050565b60001901600061019082046064830460048404030192915050565b60008260ff1660011480611d0057508260ff166003145b80611d0e57508260ff166005145b80611d1c57508260ff166007145b80611d2a57508260ff166008145b80611d3857508260ff16600a145b80611d4657508260ff16600c145b15611d535750601f6106b5565b8260ff1660041480611d6857508260ff166006145b80611d7657508260ff166009145b80611d8457508260ff16600b145b15611d915750601e6106b5565b611d9a82611daf565b15611da75750601d6106b5565b50601c6106b5565b60006003821615611dc2575060006105c1565b606461ffff83160661ffff1615611ddb575060016105c1565b61019061ffff83160661ffff1615611df5575060006105c1565b5060019190505600a165627a7a72305820910b50d5c20ae3fd54f77f2fea46b716d72b2bfaa1a8a4531218d37da17ee4090029

Deployed Bytecode

0x60806040526004361061017f5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166303c175ff811461018457806306fdde03146101b9578063095ea7b31461024357806318160ddd1461026757806323b872dd1461028e5780632bf4760b146102b8578063313ce567146102d95780633ccfd60b1461030457806340c10f191461031b5780634172d0801461033f57806342966c68146103545780634ec883d11461036c57806370a082311461038d578063762c159a146103ae5780638284f2a7146103c35780638406ab82146103e45780638b77071c146104055780638da5cb5b1461040d578063903e285a1461043e57806394807acc1461045357806395d89b411461046857806397da2f8c1461047d5780639b741d9d14610492578063a9059cbb146104a7578063d72d04db146104cb578063d83edd70146104ec578063dd62ed3e1461050d578063e39f722a14610534578063f16b64821461056e578063f45ef0331461058f575b600080fd5b34801561019057600080fd5b506101a5600160a060020a03600435166105a4565b604080519115158252519081900360200190f35b3480156101c557600080fd5b506101ce6105c6565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102085781810151838201526020016101f0565b50505050905090810190601f1680156102355780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561024f57600080fd5b506101a5600160a060020a0360043516602435610654565b34801561027357600080fd5b5061027c6106bb565b60408051918252519081900360200190f35b34801561029a57600080fd5b506101a5600160a060020a03600435811690602435166044356106c1565b3480156102c457600080fd5b5061027c600160a060020a0360043516610917565b3480156102e557600080fd5b506102ee6109d1565b6040805160ff9092168252519081900360200190f35b34801561031057600080fd5b506103196109da565b005b34801561032757600080fd5b50610319600160a060020a0360043516602435610aca565b34801561034b57600080fd5b5061027c610d13565b34801561036057600080fd5b506101a5600435610d19565b34801561037857600080fd5b50610319600160a060020a0360043516610e13565b34801561039957600080fd5b5061027c600160a060020a0360043516610e50565b3480156103ba57600080fd5b5061027c610e6b565b3480156103cf57600080fd5b50610319600160a060020a0360043516610e71565b3480156103f057600080fd5b50610319600160a060020a0360043516610f80565b610319611079565b34801561041957600080fd5b506104226111da565b60408051600160a060020a039092168252519081900360200190f35b34801561044a57600080fd5b5061027c6111e9565b34801561045f57600080fd5b5061027c6111ee565b34801561047457600080fd5b506101ce6111f5565b34801561048957600080fd5b5061027c61124f565b34801561049e57600080fd5b5061027c611254565b3480156104b357600080fd5b506101a5600160a060020a036004351660243561125a565b3480156104d757600080fd5b50610319600160a060020a03600435166113f6565b3480156104f857600080fd5b5061027c600160a060020a03600435166115c0565b34801561051957600080fd5b5061027c600160a060020a03600435811690602435166115d2565b34801561054057600080fd5b50610555600160a060020a03600435166115fd565b6040805163ffffffff9092168252519081900360200190f35b34801561057a57600080fd5b5061027c600160a060020a0360043516611615565b34801561059b57600080fd5b5061027c6116ed565b600160a060020a03811660009081526008602052604090205460ff165b919050565b6000805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561064c5780601f106106215761010080835404028352916020019161064c565b820191906000526020600020905b81548152906001019060200180831161062f57829003601f168201915b505050505081565b336000818152600a60209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a35060015b92915050565b60035490565b600160a060020a03831660009081526009602052604081205481908311156106e857600080fd5b600160a060020a038416600090815260096020526040902054838101101561070f57600080fd5b600160a060020a0385166000908152600a6020908152604080832033845290915290205483111561073f57600080fd5b600160a060020a03851660009081526008602052604090205460ff161561076557600080fd5b3360009081526008602052604090205460ff161561078257600080fd5b600160a060020a03841660009081526008602052604090205460ff16156107a857600080fd5b6107b06116f3565b600160a060020a0386166000908152600b60205260409020549091506107de90869063ffffffff168361171c565b600160a060020a0384166000908152600b602052604090205461080990859063ffffffff168361171c565b600160a060020a038516600090815260096020526040902054610832908463ffffffff61187e16565b600160a060020a038087166000908152600960205260408082209390935590861681522054610867908463ffffffff6118de16565b600160a060020a038086166000908152600960209081526040808320949094559188168152600a825282812033825290915220546108ab908463ffffffff61187e16565b600160a060020a038087166000818152600a6020908152604080832033845282529182902094909455805187815290519288169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a3506001949350505050565b6000806000806000806109286116f3565b600160a060020a0388166000908152600b602052604090205490955063ffffffff16935083151561095c57600095506109c7565b600160a060020a038716600090815260096020908152604080832054600c90925290912054909350915063ffffffff80861690851610801561099e5750600083115b156109c3576109ae848685611939565b90506109c0828263ffffffff6118de16565b91505b8195505b5050505050919050565b60025460ff1681565b336000908152600860205260408120548190819060ff16156109fb57600080fd5b610a036116f3565b336000908152600b602052604081205491945063ffffffff90911692508211610a2b57600080fd5b610a3633838561171c565b50336000908152600c6020526040812054908111610a5357600080fd5b336000818152600c60205260408082208290555183156108fc0291849190818181858888f19350505050158015610a8e573d6000803e3d6000fd5b5060408051828152905133917f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a9424364919081900360200190a2505050565b336000908152600e602052604081205481908190819060ff161515610b5f576040805160e560020a62461bcd02815260206004820152602160248201527f6f6e6c7920616c6c6f7765642067616d6573207065726d697420746f2063616c60448201527f6c00000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b60008511610b6c57600080fd5b610b7585611a2e565b9195509350915060008411610b8957600080fd5b60035484810111610b9957600080fd5b600160a060020a03861660009081526009602052604090205484810111610bbf57600080fd5b610bc76116f3565b600160a060020a0387166000908152600b6020526040902054909150610bf590879063ffffffff168361171c565b600354610c0990859063ffffffff6118de16565b600355600160a060020a038616600090815260096020526040902054610c3690859063ffffffff6118de16565b600160a060020a03871660009081526009602090815260408083209390935560035463ffffffff85168352600d909152919020600101556006548314610c7c5760068390555b6005548214610c8b5760058290555b604080518581529051600160a060020a038816917f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885919081900360200190a2604080518581529051600160a060020a038816916000917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a3505050505050565b60055490565b336000908152600960205260408120548190831115610d3757600080fd5b60008311610d4457600080fd5b610d4c6116f3565b336000818152600b6020526040902054919250610d6f9163ffffffff168361171c565b33600090815260096020526040902054610d8f908463ffffffff61187e16565b33600090815260096020526040902055600354610db2908463ffffffff61187e16565b600381905563ffffffff82166000908152600d6020908152604091829020600101929092558051858152905133927fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5928290030190a2600191505b50919050565b600754600160a060020a03163314610e2757fe5b600160a060020a03166000908152600860205260409020805460ff19811660ff90911615179055565b600160a060020a031660009081526009602052604090205490565b60045481565b600754600160a060020a03163314610e8557fe5b600160a060020a0381166000908152600e602052604090205460ff1615610ef6576040805160e560020a62461bcd02815260206004820152601a60248201527f67616d6520616c726561647920696e20616c6c6f77206c697374000000000000604482015290519081900360640190fd5b600160a060020a0381166000908152600f602052604090205415610f64576040805160e560020a62461bcd02815260206004820152601d60248201527f67616d6520616c726561647920696e2070726f706f736564206c697374000000604482015290519081900360640190fd5b600160a060020a03166000908152600f60205260409020429055565b600754600160a060020a03163314610f9457fe5b600160a060020a0381166000908152600e602052604090205460ff1680610fd15750600160a060020a0381166000908152600f6020526040812054115b151561104d576040805160e560020a62461bcd02815260206004820152602860248201527f67616d65206d75737420696e20616c6c6f77206c697374206f722070726f706f60448201527f736564206c697374000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600160a060020a03166000908152600e60209081526040808320805460ff19169055600f909152812055565b336000908152600e602052604081205481908190819060ff16151561110e576040805160e560020a62461bcd02815260206004820152602160248201527f6f6e6c7920616c6c6f7765642067616d6573207065726d697420746f2063616c60448201527f6c00000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b61111742611b05565b61ffff600019600c840260ff84160101166000818152600d6020526040902054929650909450925061114990346118de565b63ffffffff83166000908152600d6020526040902081815560010154909150151561118b5760035463ffffffff83166000908152600d60205260409020600101555b6040805161ffff8616815260ff85166020820152808201839052905133917f8b0cb8ed9764b54369b23141ee20ee74d5fec21db7c14535d1fe5ce94b4d4913919081900360600190a250505050565b600754600160a060020a031681565b600a81565b624c4b4081565b60018054604080516020600284861615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561064c5780601f106106215761010080835404028352916020019161064c565b605a81565b6101f481565b60008080831161126957600080fd5b3360009081526009602052604090205483111561128557600080fd5b600160a060020a03841660009081526009602052604090205483810110156112ac57600080fd5b3360009081526008602052604090205460ff16156112c957600080fd5b600160a060020a03841660009081526008602052604090205460ff16156112ef57600080fd5b6112f76116f3565b336000818152600b602052604090205491925061131a9163ffffffff168361171c565b600160a060020a0384166000908152600b602052604090205461134590859063ffffffff168361171c565b33600090815260096020526040902054611365908463ffffffff61187e16565b3360009081526009602052604080822092909255600160a060020a03861681522054611397908463ffffffff6118de16565b600160a060020a0385166000818152600960209081526040918290209390935580518681529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35060019392505050565b600754600160a060020a0316331461140a57fe5b600160a060020a0381166000908152600e602052604090205460ff161561147b576040805160e560020a62461bcd02815260206004820152601a60248201527f67616d6520616c726561647920696e20616c6c6f77206c697374000000000000604482015290519081900360640190fd5b600160a060020a0381166000908152600f60205260408120541161150f576040805160e560020a62461bcd02815260206004820152602360248201527f67616d65206d75737420626520696e2070726f706f736564206c69737420666960448201527f7273740000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600160a060020a0381166000908152600f602052604090205461153b906202a30063ffffffff6118de16565b4211611591576040805160e560020a62461bcd02815260206004820152601f60248201527f67616d65206d757374206265206465626174656420666f722032206461797300604482015290519081900360640190fd5b600160a060020a03166000908152600e60209081526040808320805460ff19166001179055600f909152812055565b600c6020526000908152604090205481565b600160a060020a039182166000908152600a6020908152604080832093909416825291909152205490565b600b6020526000908152604090205463ffffffff1681565b600160a060020a0381166000908152600f602052604081205481908110611686576040805160e560020a62461bcd02815260206004820152601960248201527f67616d65206e6f7420696e2070726f706f736564206c69737400000000000000604482015290519081900360640190fd5b50600160a060020a0382166000908152600f60205260409020546116b3816202a30063ffffffff6118de16565b4210156116e4576116dd426116d1836202a30063ffffffff6118de16565b9063ffffffff61187e16565b9150610e0d565b60009150610e0d565b60065490565b600080600061170142611b05565b9150915060018160ff1683600c02010361ffff169250505090565b60008063ffffffff808516908416101561173557600080fd5b63ffffffff8416151561177257600160a060020a0385166000908152600b60205260409020805463ffffffff191663ffffffff8516179055611877565b8363ffffffff168363ffffffff1614156117b657600160a060020a0385166000908152600b60205260409020805463ffffffff191663ffffffff8516179055611877565b600160a060020a038516600090815260096020526040902054915081151561180857600160a060020a0385166000908152600b60205260409020805463ffffffff191663ffffffff8516179055611877565b611813848484611939565b600160a060020a0386166000908152600c602052604090205490915061183f908263ffffffff6118de16565b600160a060020a0386166000908152600c6020908152604080832093909355600b905220805463ffffffff191663ffffffff85161790555b5050505050565b6000828211156118d8576040805160e560020a62461bcd02815260206004820152601360248201527f536166654d61746820737562206661696c656400000000000000000000000000604482015290519081900360640190fd5b50900390565b818101828110156106b5576040805160e560020a62461bcd02815260206004820152601360248201527f536166654d61746820616464206661696c656400000000000000000000000000604482015290519081900360640190fd5b60008080808063ffffffff8816811061195157600080fd5b63ffffffff808916908816101561196757600080fd5b8663ffffffff168863ffffffff1614156119845760009450611a23565b8515156119945760009450611a23565b5060009250865b8663ffffffff168163ffffffff161015611a1f5763ffffffff81166000908152600d6020526040812080546001909101549094509250831180156119df5750600082115b15611a1757611a14611a07836119fb868a63ffffffff611ba716565b9063ffffffff611c1e16565b859063ffffffff6118de16565b93505b60010161199b565b8394505b505050509392505050565b60065460055460035460009291908390611a4f90849063ffffffff61187e16565b90505b611a62858363ffffffff611ba716565b8111611ae857611a88611a7b828463ffffffff611c1e16565b869063ffffffff61187e16565b9450611a9a848263ffffffff6118de16565b6004549094509050611ab2838263ffffffff6118de16565b9250600a821115611ae357611ad360646119fb84605a63ffffffff611ba716565b9150600a821015611ae357600a91505b611a52565b611afb611a07868463ffffffff611ba716565b9350509193909250565b600080808080808080611b1789611c3e565b9250611b246107b2611cce565b611b318461ffff16611cce565b039450846301e285000286019550846107b2840361ffff16036301e133800286019550600193505b600c60ff851611611b9957611b6e8484611ce9565b60ff1662015180029050888682011115611b8a57839150611b99565b94850194600190930192611b59565b509097909650945050505050565b6000821515611bb8575060006106b5565b50818102818382811515611bc857fe5b04146106b5576040805160e560020a62461bcd02815260206004820152601360248201527f536166654d617468206d756c206661696c656400000000000000000000000000604482015290519081900360640190fd5b600080808311611c2a57fe5b8284811515611c3557fe5b04949350505050565b6000806107b26301e1338084048101908290611c5990611cce565b611c668361ffff16611cce565b039050806301e285000283019250806107b2830361ffff16036301e1338002830192505b84831115611cc657611c9e60018303611daf565b15611cb1576301e2850083039250611cbb565b6301e13380830392505b600182039150611c8a565b509392505050565b60001901600061019082046064830460048404030192915050565b60008260ff1660011480611d0057508260ff166003145b80611d0e57508260ff166005145b80611d1c57508260ff166007145b80611d2a57508260ff166008145b80611d3857508260ff16600a145b80611d4657508260ff16600c145b15611d535750601f6106b5565b8260ff1660041480611d6857508260ff166006145b80611d7657508260ff166009145b80611d8457508260ff16600b145b15611d915750601e6106b5565b611d9a82611daf565b15611da75750601d6106b5565b50601c6106b5565b60006003821615611dc2575060006105c1565b606461ffff83160661ffff1615611ddb575060016105c1565b61019061ffff83160661ffff1615611df5575060006105c1565b5060019190505600a165627a7a72305820910b50d5c20ae3fd54f77f2fea46b716d72b2bfaa1a8a4531218d37da17ee4090029

Swarm Source

bzzr://910b50d5c20ae3fd54f77f2fea46b716d72b2bfaa1a8a4531218d37da17ee409
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.