Contract Overview
Balance: 0 Ether
Ether Value: $0
Transactions: 7 txns
Token Tracker: GlitchGoons (GG)
Misc:
Address Watch: Add To Watch List
Contract Creator: 0x16ff5fc7e4d127adbca4b25396779156944f7690at txn 0x69d5acd00289fe360bb12aa06a07585a9eab115e0562b34b5e2a90b5735f8802
Token Balance:
 Latest 7 txns

TxHash Age From To Value [TxFee]
0xb21524be1fc643f66f3ac1ae5ec4415b37efcc7a7ca8dbfc6065b118cbcb2e2312 days 6 hrs ago0xbe45c1bc3b7b06268b3c4460c8e8b76fd907a93c  IN   0xae42410c62e8254429e0fa06a4f965ee7d123eb50 Ether0.000368448
0xef4ee1a4885a067e3ba1e5c2b045a728a7f280262d84b596c78a233d6511940c12 days 7 hrs ago0xbe45c1bc3b7b06268b3c4460c8e8b76fd907a93c  IN   0xae42410c62e8254429e0fa06a4f965ee7d123eb50 Ether0.003320415
0x71966376650d98673b8dd60b94f095c8cfcc3c7c763e02e20b6378cab98d501112 days 7 hrs ago0xbe45c1bc3b7b06268b3c4460c8e8b76fd907a93c  IN   0xae42410c62e8254429e0fa06a4f965ee7d123eb50.5 Ether0.000705228
0x43780d3de561cf356cd55c7fd8ffc5a1eef8d7ac87f6173ed18d3a397918259d14 days 7 hrs ago0xd8ceb9a2f5150df9c5b624c926cc3853e3d592d6  IN   0xae42410c62e8254429e0fa06a4f965ee7d123eb50 Ether0.00046366
0xd4f418eed7f06add4bacd9445d5e1f1e7788adb6da10048a16fa844fd8d49a7025 days 3 hrs ago0xd8ceb9a2f5150df9c5b624c926cc3853e3d592d6  IN   0xae42410c62e8254429e0fa06a4f965ee7d123eb50 Ether0.005312664
0x5ee046e6af37a3d8e87807b7afc8c714b52be43f5ba1281feef8b7e6aedad5cf25 days 3 hrs ago0xd8ceb9a2f5150df9c5b624c926cc3853e3d592d6  IN   0xae42410c62e8254429e0fa06a4f965ee7d123eb50.5 Ether0.001946763
0x69d5acd00289fe360bb12aa06a07585a9eab115e0562b34b5e2a90b5735f880232 days 2 hrs ago0x16ff5fc7e4d127adbca4b25396779156944f7690  IN    Contract Creation0 Ether0.025510008
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
 Latest 2 Internal Transactions

ParentTxHash Block Age From To Value
0x71966376650d98673b8dd60b94f095c8cfcc3c7c763e02e20b6378cab98d5011664132012 days 7 hrs ago0xae42410c62e8254429e0fa06a4f965ee7d123eb50xf6cc2894f9537d84288ce241e6ba9443b4392aef0.5 Ether
0x5ee046e6af37a3d8e87807b7afc8c714b52be43f5ba1281feef8b7e6aedad5cf656301325 days 3 hrs ago0xae42410c62e8254429e0fa06a4f965ee7d123eb50xf6cc2894f9537d84288ce241e6ba9443b4392aef0.5 Ether
[ Download CSV Export  ] 
Warning: The Compiled Contract might be susceptible to ExpExponentCleanup (medium/high-severity), EventStructWrongData (very low-severity) SolidityCompiler Bugs.

Contract Source Code Verified (Exact Match)
Contract Name: GlitchGoonsItem
Compiler Text: v0.4.24+commit.e67f0147
Optimization Enabled: Yes
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts

pragma solidity ^0.4.24;

// File: contracts\utils\ItemUtils.sol

library ItemUtils {

    uint256 internal constant UID_SHIFT = 2 ** 0; // 32
    uint256 internal constant RARITY_SHIFT = 2 ** 32; // 4
    uint256 internal constant CLASS_SHIFT = 2 ** 36;  // 10
    uint256 internal constant TYPE_SHIFT = 2 ** 46;  // 10
    uint256 internal constant TIER_SHIFT = 2 ** 56; // 7
    uint256 internal constant NAME_SHIFT = 2 ** 63; // 7
    uint256 internal constant REGION_SHIFT = 2 ** 70; // 8
    uint256 internal constant BASE_SHIFT = 2 ** 78;

    function createItem(uint256 _class, uint256 _type, uint256 _rarity, uint256 _tier, uint256 _name, uint256 _region) internal pure returns (uint256 dna) {
        dna = setClass(dna, _class);
        dna = setType(dna, _type);
        dna = setRarity(dna, _rarity);
        dna = setTier(dna, _tier);
        dna = setName(dna, _name);
        dna = setRegion(dna, _region);
    }

    function setUID(uint256 _dna, uint256 _value) internal pure returns (uint256) {
        require(_value < RARITY_SHIFT / UID_SHIFT);
        return setValue(_dna, _value, UID_SHIFT);
    }

    function setRarity(uint256 _dna, uint256 _value) internal pure returns (uint256) {
        require(_value < CLASS_SHIFT / RARITY_SHIFT);
        return setValue(_dna, _value, RARITY_SHIFT);
    }

    function setClass(uint256 _dna, uint256 _value) internal pure returns (uint256) {
        require(_value < TYPE_SHIFT / CLASS_SHIFT);
        return setValue(_dna, _value, CLASS_SHIFT);
    }

    function setType(uint256 _dna, uint256 _value) internal pure returns (uint256) {
        require(_value < TIER_SHIFT / TYPE_SHIFT);
        return setValue(_dna, _value, TYPE_SHIFT);
    }

    function setTier(uint256 _dna, uint256 _value) internal pure returns (uint256) {
        require(_value < NAME_SHIFT / TIER_SHIFT);
        return setValue(_dna, _value, TIER_SHIFT);
    }

    function setName(uint256 _dna, uint256 _value) internal pure returns (uint256) {
        require(_value < REGION_SHIFT / NAME_SHIFT);
        return setValue(_dna, _value, NAME_SHIFT);
    }

    function setRegion(uint256 _dna, uint256 _value) internal pure returns (uint256) {
        require(_value < BASE_SHIFT / REGION_SHIFT);
        return setValue(_dna, _value, REGION_SHIFT);
    }

    function getUID(uint256 _dna) internal pure returns (uint256) {
        return (_dna % RARITY_SHIFT) / UID_SHIFT;
    }

    function getRarity(uint256 _dna) internal pure returns (uint256) {
        return (_dna % CLASS_SHIFT) / RARITY_SHIFT;
    }

    function getClass(uint256 _dna) internal pure returns (uint256) {
        return (_dna % TYPE_SHIFT) / CLASS_SHIFT;
    }

    function getType(uint256 _dna) internal pure returns (uint256) {
        return (_dna % TIER_SHIFT) / TYPE_SHIFT;
    }

    function getTier(uint256 _dna) internal pure returns (uint256) {
        return (_dna % NAME_SHIFT) / TIER_SHIFT;
    }

    function getName(uint256 _dna) internal pure returns (uint256) {
        return (_dna % REGION_SHIFT) / NAME_SHIFT;
    }

    function getRegion(uint256 _dna) internal pure returns (uint256) {
        return (_dna % BASE_SHIFT) / REGION_SHIFT;
    }

    function setValue(uint256 dna, uint256 value, uint256 shift) internal pure returns (uint256) {
        return dna + (value * shift);
    }
}

// File: contracts\utils\StringUtils.sol

library StringUtils {

    function concat(string _base, string _value) internal pure returns (string) {
        bytes memory _baseBytes = bytes(_base);
        bytes memory _valueBytes = bytes(_value);

        string memory _tmpValue = new string(_baseBytes.length + _valueBytes.length);
        bytes memory _newValue = bytes(_tmpValue);

        uint i;
        uint j;

        for (i = 0; i < _baseBytes.length; i++) {
            _newValue[j++] = _baseBytes[i];
        }

        for (i = 0; i < _valueBytes.length; i++) {
            _newValue[j++] = _valueBytes[i++];
        }

        return string(_newValue);
    }

    function uint2str(uint i) internal pure returns (string){
        if (i == 0) return "0";
        uint j = i;
        uint length;
        while (j != 0) {
            length++;
            j /= 10;
        }
        bytes memory bstr = new bytes(length);
        uint k = length - 1;
        while (i != 0) {
            bstr[k--] = byte(48 + i % 10);
            i /= 10;
        }
        return string(bstr);
    }

}

// File: contracts\Ownable.sol

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

    /**
     * @dev Sets the original `emitter` of the contract
     */
    function setEmitter(address _emitter) internal {
        require(_emitter != address(0));
        require(emitter == address(0));
        emitter = _emitter;
    }

    /**
     * @dev Sets the original `administrator` of the contract
     */
    function setAdministrator(address _administrator) internal {
        require(_administrator != address(0));
        require(administrator == address(0));
        administrator = _administrator;
    }

    /**
     * @dev Throws if called by any account other than the emitter.
     */
    modifier onlyEmitter() {
        require(msg.sender == emitter);
        _;
    }

    /**
     * @dev Throws if called by any account other than the administrator.
     */
    modifier onlyAdministrator() {
        require(msg.sender == administrator);
        _;
    }

    /**
   * @dev Allows the current super emitter to transfer control of the contract to a emitter.
   * @param _emitter The address to transfer emitter ownership to.
   * @param _administrator The address to transfer administrator ownership to.
   */
    function transferOwnership(address _emitter, address _administrator) public onlyAdministrator {
        require(_emitter != _administrator);
        require(_emitter != emitter);
        require(_emitter != address(0));
        require(_administrator != address(0));
        emitter = _emitter;
        administrator = _administrator;
    }
}

// File: contracts\token\ERC20\ERC20Basic.sol

/**
 * @title ERC20Basic
 * @dev Simpler version of ERC20 interface
 * See https://github.com/ethereum/EIPs/issues/179
 */
contract ERC20Basic {
  function totalSupply() public view returns (uint256);
  function balanceOf(address _who) public view returns (uint256);
  function transfer(address _to, uint256 _value) public returns (bool);
  event Transfer(address indexed from, address indexed to, uint256 value);
}

// File: contracts\math\SafeMath.sol

/**
 * @title SafeMath
 * @dev Math operations with safety checks that throw on error
 */
library SafeMath {

  /**
  * @dev Multiplies two numbers, throws on overflow.
  */
  function mul(uint256 _a, uint256 _b) internal pure returns (uint256 c) {
    // Gas optimization: this is cheaper than asserting '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;
    }

    c = _a * _b;
    assert(c / _a == _b);
    return c;
  }

  /**
  * @dev Integer division of two numbers, truncating the quotient.
  */
  function div(uint256 _a, uint256 _b) internal pure returns (uint256) {
    // assert(_b > 0); // Solidity automatically throws when dividing by 0
    // uint256 c = _a / _b;
    // assert(_a == _b * c + _a % _b); // There is no case in which this doesn't hold
    return _a / _b;
  }

  /**
  * @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) {
    assert(_b <= _a);
    return _a - _b;
  }

  /**
  * @dev Adds two numbers, throws on overflow.
  */
  function add(uint256 _a, uint256 _b) internal pure returns (uint256 c) {
    c = _a + _b;
    assert(c >= _a);
    return c;
  }
}

// File: contracts\token\ERC20\BasicToken.sol

/**
 * @title Basic token
 * @dev Basic version of StandardToken, with no allowances.
 */
contract BasicToken is ERC20Basic {
  using SafeMath for uint256;

  mapping(address => uint256) internal balances;

  uint256 internal totalSupply_;

  /**
  * @dev Total number of tokens in existence
  */
  function totalSupply() public view returns (uint256) {
    return totalSupply_;
  }

  /**
  * @dev Transfer token for a specified address
  * @param _to The address to transfer to.
  * @param _value The amount to be transferred.
  */
  function transfer(address _to, uint256 _value) public returns (bool) {
    require(_value <= balances[msg.sender]);
    require(_to != address(0));

    balances[msg.sender] = balances[msg.sender].sub(_value);
    balances[_to] = balances[_to].add(_value);
    emit Transfer(msg.sender, _to, _value);
    return true;
  }

  /**
  * @dev Gets the balance of the specified address.
  * @param _owner The address to query the the balance of.
  * @return An uint256 representing the amount owned by the passed address.
  */
  function balanceOf(address _owner) public view returns (uint256) {
    return balances[_owner];
  }

}

// File: contracts\token\ERC20\ERC20.sol

/**
 * @title ERC20 interface
 * @dev see https://github.com/ethereum/EIPs/issues/20
 */
contract ERC20 is ERC20Basic {
  function allowance(address _owner, address _spender)
    public view returns (uint256);

  function transferFrom(address _from, address _to, uint256 _value)
    public returns (bool);

  function approve(address _spender, uint256 _value) public returns (bool);
  event Approval(
    address indexed owner,
    address indexed spender,
    uint256 value
  );
}

// File: contracts\token\ERC20\StandardToken.sol

/**
 * @title Standard ERC20 token
 *
 * @dev Implementation of the basic standard token.
 * https://github.com/ethereum/EIPs/issues/20
 * Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
 */
contract StandardToken is ERC20, BasicToken {

  mapping (address => mapping (address => uint256)) internal allowed;


  /**
   * @dev Transfer tokens from one address to another
   * @param _from address The address which you want to send tokens from
   * @param _to address The address which you want to transfer to
   * @param _value uint256 the amount of tokens to be transferred
   */
  function transferFrom(
    address _from,
    address _to,
    uint256 _value
  )
    public
    returns (bool)
  {
    require(_value <= balances[_from]);
    require(_value <= allowed[_from][msg.sender]);
    require(_to != address(0));

    balances[_from] = balances[_from].sub(_value);
    balances[_to] = balances[_to].add(_value);
    allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);
    emit Transfer(_from, _to, _value);
    return true;
  }

  /**
   * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
   * Beware that changing an allowance with this method brings the risk that someone may use both the old
   * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
   * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
   * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
   * @param _spender The address which will spend the funds.
   * @param _value The amount of tokens to be spent.
   */
  function approve(address _spender, uint256 _value) public returns (bool) {
    allowed[msg.sender][_spender] = _value;
    emit Approval(msg.sender, _spender, _value);
    return true;
  }

  /**
   * @dev Function to check the amount of tokens that an owner allowed to a spender.
   * @param _owner address The address which owns the funds.
   * @param _spender address The address which will spend the funds.
   * @return A uint256 specifying the amount of tokens still available for the spender.
   */
  function allowance(
    address _owner,
    address _spender
   )
    public
    view
    returns (uint256)
  {
    return allowed[_owner][_spender];
  }

  /**
   * @dev Increase the amount of tokens that an owner allowed to a spender.
   * approve should be called when allowed[_spender] == 0. To increment
   * allowed value is better to use this function to avoid 2 calls (and wait until
   * the first transaction is mined)
   * From MonolithDAO Token.sol
   * @param _spender The address which will spend the funds.
   * @param _addedValue The amount of tokens to increase the allowance by.
   */
  function increaseApproval(
    address _spender,
    uint256 _addedValue
  )
    public
    returns (bool)
  {
    allowed[msg.sender][_spender] = (
      allowed[msg.sender][_spender].add(_addedValue));
    emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
    return true;
  }

  /**
   * @dev Decrease the amount of tokens that an owner allowed to a spender.
   * approve should be called when allowed[_spender] == 0. To decrement
   * allowed value is better to use this function to avoid 2 calls (and wait until
   * the first transaction is mined)
   * From MonolithDAO Token.sol
   * @param _spender The address which will spend the funds.
   * @param _subtractedValue The amount of tokens to decrease the allowance by.
   */
  function decreaseApproval(
    address _spender,
    uint256 _subtractedValue
  )
    public
    returns (bool)
  {
    uint256 oldValue = allowed[msg.sender][_spender];
    if (_subtractedValue >= oldValue) {
      allowed[msg.sender][_spender] = 0;
    } else {
      allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);
    }
    emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
    return true;
  }

}

// File: contracts\GameCoin.sol

contract GameCoin is StandardToken {
    string public constant name = "GameCoin";

    string public constant symbol = "GC";

    uint8 public constant decimals = 0;

    bool public isGameCoin = true;

    /**
   * @dev Constructor that gives msg.sender all of existing tokens.
   */
    constructor(address[] owners) public {
        for (uint256 i = 0; i < owners.length; i++) {
            _mint(owners[i], 2 * 10 ** 6);
        }
    }

    /**
     * @dev Internal function that mints an amount of the token and assigns it to
     * an account. This encapsulates the modification of balances such that the
     * proper events are emitted.
     * @param _account The account that will receive the created tokens.
     * @param _amount The amount that will be created.
     */
    function _mint(address _account, uint256 _amount) internal {
        require(_account != 0);
        totalSupply_ = totalSupply_.add(_amount);
        balances[_account] = balances[_account].add(_amount);
        emit Transfer(address(0), _account, _amount);
    }
}

// File: contracts\PresaleGacha.sol

contract PresaleGacha {

    uint32 internal constant CLASS_NONE = 0;
    uint32 internal constant CLASS_CHARACTER = 1;
    uint32 internal constant CLASS_CHEST = 2;
    uint32 internal constant CLASS_MELEE = 3;
    uint32 internal constant CLASS_RANGED = 4;
    uint32 internal constant CLASS_ARMOR = 5;
    uint32 internal constant CLASS_HELMET = 6;
    uint32 internal constant CLASS_LEGS = 7;
    uint32 internal constant CLASS_GLOVES = 8;
    uint32 internal constant CLASS_BOOTS = 9;
    uint32 internal constant CLASS_NECKLACE = 10;
    uint32 internal constant CLASS_MODS = 11;
    uint32 internal constant CLASS_TROPHY = 12;

    uint32 internal constant TYPE_CHEST_NONE = 0;
    uint32 internal constant TYPE_CHEST_APPRENTICE = 1;
    uint32 internal constant TYPE_CHEST_WARRIOR = 2;
    uint32 internal constant TYPE_CHEST_GLADIATOR = 3;
    uint32 internal constant TYPE_CHEST_WARLORD = 4;
    uint32 internal constant TYPE_CHEST_TOKEN_PACK = 5;
    uint32 internal constant TYPE_CHEST_INVESTOR_PACK = 6;

    uint32 internal constant TYPE_RANGED_PRESALE_RIFLE = 1;
    uint32 internal constant TYPE_ARMOR_PRESALE_ARMOR = 1;
    uint32 internal constant TYPE_LEGS_PRESALE_LEGS = 1;
    uint32 internal constant TYPE_BOOTS_PRESALE_BOOTS = 1;
    uint32 internal constant TYPE_GLOVES_PRESALE_GLOVES = 1;
    uint32 internal constant TYPE_HELMET_PRESALE_HELMET = 1;
    uint32 internal constant TYPE_NECKLACE_PRESALE_NECKLACE = 1;
    uint32 internal constant TYPE_MODES_PRESALE_MODES = 1;

    uint32 internal constant NAME_NONE = 0;
    uint32 internal constant NAME_COSMIC = 1;
    uint32 internal constant NAME_FUSION = 2;
    uint32 internal constant NAME_CRIMSON = 3;
    uint32 internal constant NAME_SHINING = 4;
    uint32 internal constant NAME_ANCIENT = 5;

    uint32 internal constant RARITY_NONE = 0;
    uint32 internal constant RARITY_COMMON = 1;
    uint32 internal constant RARITY_RARE = 2;
    uint32 internal constant RARITY_EPIC = 3;
    uint32 internal constant RARITY_LEGENDARY = 4;
    uint32 internal constant RARITY_UNIQUE = 5;

    struct ChestItem {
        uint32 _class;
        uint32 _type;
        uint32 _rarity;
        uint32 _tier;
        uint32 _name;
    }

    mapping(uint256 => ChestItem) chestItems;

    mapping(uint32 => uint32) apprenticeChestProbability;
    mapping(uint32 => uint32) warriorChestProbability;
    mapping(uint32 => uint32) gladiatorChestProbability;
    mapping(uint32 => uint32) warlordChestProbability;

    constructor () public {
        chestItems[0] = ChestItem(CLASS_RANGED, TYPE_RANGED_PRESALE_RIFLE, RARITY_NONE, 0, NAME_NONE);
        chestItems[1] = ChestItem(CLASS_ARMOR, TYPE_ARMOR_PRESALE_ARMOR, RARITY_NONE, 0, NAME_NONE);
        chestItems[2] = ChestItem(CLASS_LEGS, TYPE_LEGS_PRESALE_LEGS, RARITY_NONE, 0, NAME_NONE);
        chestItems[3] = ChestItem(CLASS_BOOTS, TYPE_BOOTS_PRESALE_BOOTS, RARITY_NONE, 0, NAME_NONE);
        chestItems[4] = ChestItem(CLASS_GLOVES, TYPE_GLOVES_PRESALE_GLOVES, RARITY_NONE, 0, NAME_NONE);
        chestItems[5] = ChestItem(CLASS_HELMET, TYPE_HELMET_PRESALE_HELMET, RARITY_NONE, 0, NAME_NONE);
        chestItems[6] = ChestItem(CLASS_NECKLACE, TYPE_NECKLACE_PRESALE_NECKLACE, RARITY_NONE, 0, NAME_NONE);
        chestItems[7] = ChestItem(CLASS_MODS, TYPE_MODES_PRESALE_MODES, RARITY_NONE, 0, NAME_NONE);

        apprenticeChestProbability[0] = 60;
        apprenticeChestProbability[1] = 29;
        apprenticeChestProbability[2] = 5;
        apprenticeChestProbability[3] = 3;
        apprenticeChestProbability[4] = 2;
        apprenticeChestProbability[5] = 1;

        warriorChestProbability[0] = 10;
        warriorChestProbability[1] = 20;
        warriorChestProbability[2] = 15;
        warriorChestProbability[3] = 25;
        warriorChestProbability[4] = 25;
        warriorChestProbability[5] = 5;

        gladiatorChestProbability[0] = 15;
        gladiatorChestProbability[1] = 15;
        gladiatorChestProbability[2] = 20;
        gladiatorChestProbability[3] = 20;
        gladiatorChestProbability[4] = 18;
        gladiatorChestProbability[5] = 12;

        warlordChestProbability[0] = 10;
        warlordChestProbability[1] = 30;
        warlordChestProbability[2] = 60;
    }

    function getTier(uint32 _type, uint256 _id) internal pure returns (uint32){
        if (_type == TYPE_CHEST_APPRENTICE) {
            return (_id == 0 || _id == 3) ? 3 : (_id == 1 || _id == 4) ? 4 : 5;
        } else if (_type == TYPE_CHEST_WARRIOR) {
            return (_id == 0 || _id == 3 || _id == 5) ? 4 : (_id == 1 || _id == 4) ? 5 : 3;
        } else if (_type == TYPE_CHEST_GLADIATOR) {
            return (_id == 0 || _id == 3 || _id == 5) ? 5 : (_id == 2 || _id == 4) ? 5 : 3;
        } else if (_type == TYPE_CHEST_WARLORD) {
            return (_id == 1) ? 4 : 5;
        } else {
            require(false);
        }
    }

    function getRarity(uint32 _type, uint256 _id) internal pure returns (uint32) {
        if (_type == TYPE_CHEST_APPRENTICE) {
            return _id < 3 ? RARITY_RARE : RARITY_EPIC;
        } else if (_type == TYPE_CHEST_WARRIOR) {
            return _id < 2 ? RARITY_RARE : (_id > 1 && _id < 5) ? RARITY_EPIC : RARITY_LEGENDARY;
        } else if (_type == TYPE_CHEST_GLADIATOR) {
            return _id == 0 ? RARITY_RARE : (_id > 0 && _id < 4) ? RARITY_EPIC : RARITY_LEGENDARY;
        } else if (_type == TYPE_CHEST_WARLORD) {
            return (_id == 0) ? RARITY_EPIC : RARITY_LEGENDARY;
        } else {
            require(false);
        }
    }

    function isApprenticeChest(uint256 _identifier) internal pure returns (bool) {
        return ItemUtils.getType(_identifier) == TYPE_CHEST_APPRENTICE;
    }

    function isWarriorChest(uint256 _identifier) internal pure returns (bool) {
        return ItemUtils.getType(_identifier) == TYPE_CHEST_WARRIOR;
    }

    function isGladiatorChest(uint256 _identifier) internal pure returns (bool) {
        return ItemUtils.getType(_identifier) == TYPE_CHEST_GLADIATOR;
    }

    function isWarlordChest(uint256 _identifier) internal pure returns (bool) {
        return ItemUtils.getType(_identifier) == TYPE_CHEST_WARLORD;
    }

    function getApprenticeDistributedRandom(uint256 rnd) internal view returns (uint256) {
        uint256 tempDist = 0;
        for (uint8 i = 0; i < 6; i++) {
            tempDist += apprenticeChestProbability[i];
            if (rnd <= tempDist) {
                return i;
            }
        }
        return 0;
    }

    function getWarriorDistributedRandom(uint256 rnd) internal view returns (uint256) {
        uint256 tempDist = 0;
        for (uint8 i = 0; i < 6; i++) {
            tempDist += warriorChestProbability[i];
            if (rnd <= tempDist) {
                return i;
            }
        }
        return 0;
    }

    function getGladiatorDistributedRandom(uint256 rnd) internal view returns (uint256) {
        uint256 tempDist = 0;
        for (uint8 i = 0; i < 6; i++) {
            tempDist += gladiatorChestProbability[i];
            if (rnd <= tempDist) {
                return i;
            }
        }
        return 0;
    }

    function getWarlordDistributedRandom(uint256 rnd) internal view returns (uint256) {
        uint256 tempDist = 0;
        for (uint8 i = 0; i < 3; i++) {
            tempDist += warlordChestProbability[i];
            if (rnd <= tempDist) {
                return i;
            }
        }
        return 0;
    }
}

// File: contracts\introspection\ERC165.sol

/**
 * @title ERC165
 * @dev https://github.com/ethereum/EIPs/blob/master/EIPS/eip-165.md
 */
interface ERC165 {

  /**
   * @notice Query if a contract implements an interface
   * @param _interfaceId The interface identifier, as specified in ERC-165
   * @dev Interface identification is specified in ERC-165. This function
   * uses less than 30,000 gas.
   */
  function supportsInterface(bytes4 _interfaceId)
    external
    view
    returns (bool);
}

// File: contracts\token\ERC721\ERC721Basic.sol

/**
 * @title ERC721 Non-Fungible Token Standard basic interface
 * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
 */
contract ERC721Basic is ERC165 {

  bytes4 internal constant InterfaceId_ERC721 = 0x80ac58cd;
  /*
   * 0x80ac58cd ===
   *   bytes4(keccak256('balanceOf(address)')) ^
   *   bytes4(keccak256('ownerOf(uint256)')) ^
   *   bytes4(keccak256('approve(address,uint256)')) ^
   *   bytes4(keccak256('getApproved(uint256)')) ^
   *   bytes4(keccak256('setApprovalForAll(address,bool)')) ^
   *   bytes4(keccak256('isApprovedForAll(address,address)')) ^
   *   bytes4(keccak256('transferFrom(address,address,uint256)')) ^
   *   bytes4(keccak256('safeTransferFrom(address,address,uint256)')) ^
   *   bytes4(keccak256('safeTransferFrom(address,address,uint256,bytes)'))
   */

  bytes4 internal constant InterfaceId_ERC721Exists = 0x4f558e79;
  /*
   * 0x4f558e79 ===
   *   bytes4(keccak256('exists(uint256)'))
   */

  bytes4 internal constant InterfaceId_ERC721Enumerable = 0x780e9d63;
  /**
   * 0x780e9d63 ===
   *   bytes4(keccak256('totalSupply()')) ^
   *   bytes4(keccak256('tokenOfOwnerByIndex(address,uint256)')) ^
   *   bytes4(keccak256('tokenByIndex(uint256)'))
   */

  bytes4 internal constant InterfaceId_ERC721Metadata = 0x5b5e139f;
  /**
   * 0x5b5e139f ===
   *   bytes4(keccak256('name()')) ^
   *   bytes4(keccak256('symbol()')) ^
   *   bytes4(keccak256('tokenURI(uint256)'))
   */

  event Transfer(
    address indexed _from,
    address indexed _to,
    uint256 indexed _tokenId
  );
  event Approval(
    address indexed _owner,
    address indexed _approved,
    uint256 indexed _tokenId
  );
  event ApprovalForAll(
    address indexed _owner,
    address indexed _operator,
    bool _approved
  );

  function balanceOf(address _owner) public view returns (uint256 _balance);
  function ownerOf(uint256 _tokenId) public view returns (address _owner);
  function exists(uint256 _tokenId) public view returns (bool _exists);

  function approve(address _to, uint256 _tokenId) public;
  function getApproved(uint256 _tokenId)
    public view returns (address _operator);

  function setApprovalForAll(address _operator, bool _approved) public;
  function isApprovedForAll(address _owner, address _operator)
    public view returns (bool);

  function transferFrom(address _from, address _to, uint256 _tokenId) public;
  function safeTransferFrom(address _from, address _to, uint256 _tokenId)
    public;

  function safeTransferFrom(
    address _from,
    address _to,
    uint256 _tokenId,
    bytes _data
  )
    public;
}

// File: contracts\token\ERC721\ERC721.sol

/**
 * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 * @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
 */
contract ERC721Enumerable is ERC721Basic {
  function totalSupply() public view returns (uint256);
  function tokenOfOwnerByIndex(
    address _owner,
    uint256 _index
  )
    public
    view
    returns (uint256 _tokenId);

  function tokenByIndex(uint256 _index) public view returns (uint256);
}


/**
 * @title ERC-721 Non-Fungible Token Standard, optional metadata extension
 * @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
 */
contract ERC721Metadata is ERC721Basic {
  function name() external view returns (string _name);
  function symbol() external view returns (string _symbol);
  function tokenURI(uint256 _tokenId) public view returns (string);
}


/**
 * @title ERC-721 Non-Fungible Token Standard, full implementation interface
 * @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
 */
contract ERC721 is ERC721Basic, ERC721Enumerable, ERC721Metadata {
}

// File: contracts\token\ERC721\ERC721Receiver.sol

/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC721 asset contracts.
 */
contract ERC721Receiver {
  /**
   * @dev Magic value to be returned upon successful reception of an NFT
   *  Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`,
   *  which can be also obtained as `ERC721Receiver(0).onERC721Received.selector`
   */
  bytes4 internal constant ERC721_RECEIVED = 0x150b7a02;

  /**
   * @notice Handle the receipt of an NFT
   * @dev The ERC721 smart contract calls this function on the recipient
   * after a `safetransfer`. This function MAY throw to revert and reject the
   * transfer. Return of other than the magic value MUST result in the
   * transaction being reverted.
   * Note: the contract address is always the message sender.
   * @param _operator The address which called `safeTransferFrom` function
   * @param _from The address which previously owned the token
   * @param _tokenId The NFT identifier which is being transferred
   * @param _data Additional data with no specified format
   * @return `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
   */
  function onERC721Received(
    address _operator,
    address _from,
    uint256 _tokenId,
    bytes _data
  )
    public
    returns(bytes4);
}

// File: contracts\introspection\SupportsInterfaceWithLookup.sol

/**
 * @title SupportsInterfaceWithLookup
 * @author Matt Condon (@shrugs)
 * @dev Implements ERC165 using a lookup table.
 */
contract SupportsInterfaceWithLookup is ERC165 {

  bytes4 public constant InterfaceId_ERC165 = 0x01ffc9a7;
  /**
   * 0x01ffc9a7 ===
   *   bytes4(keccak256('supportsInterface(bytes4)'))
   */

  /**
   * @dev a mapping of interface id to whether or not it's supported
   */
  mapping(bytes4 => bool) internal supportedInterfaces;

  /**
   * @dev A contract implementing SupportsInterfaceWithLookup
   * implement ERC165 itself
   */
  constructor()
    public
  {
    _registerInterface(InterfaceId_ERC165);
  }

  /**
   * @dev implement supportsInterface(bytes4) using a lookup table
   */
  function supportsInterface(bytes4 _interfaceId)
    external
    view
    returns (bool)
  {
    return supportedInterfaces[_interfaceId];
  }

  /**
   * @dev private method for registering an interface
   */
  function _registerInterface(bytes4 _interfaceId)
    internal
  {
    require(_interfaceId != 0xffffffff);
    supportedInterfaces[_interfaceId] = true;
  }
}

// File: contracts\utils\AddressUtils.sol

/**
 * Utility library of inline functions on addresses
 */
library AddressUtils {

  /**
   * Returns whether the target address is a contract
   * @dev This function will return false if invoked during the constructor of a contract,
   * as the code is not actually created until after the constructor finishes.
   * @param _addr address to check
   * @return whether the target address is a contract
   */
  function isContract(address _addr) internal view returns (bool) {
    uint256 size;
    // XXX Currently there is no better way to check if there is a contract in an address
    // than to check the size of the code at that address.
    // See https://ethereum.stackexchange.com/a/14016/36603
    // for more details about how this works.
    // TODO Check this again before the Serenity release, because all addresses will be
    // contracts then.
    // solium-disable-next-line security/no-inline-assembly
    assembly { size := extcodesize(_addr) }
    return size > 0;
  }

}

// File: contracts\token\ERC721\ERC721BasicToken.sol

/**
 * @title ERC721 Non-Fungible Token Standard basic implementation
 * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
 */
contract ERC721BasicToken is SupportsInterfaceWithLookup, ERC721Basic {

  using SafeMath for uint256;
  using AddressUtils for address;

  // Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
  // which can be also obtained as `ERC721Receiver(0).onERC721Received.selector`
  bytes4 private constant ERC721_RECEIVED = 0x150b7a02;

  // Mapping from token ID to owner
  mapping (uint256 => address) internal tokenOwner;

  // Mapping from token ID to approved address
  mapping (uint256 => address) internal tokenApprovals;

  // Mapping from owner to number of owned token
  mapping (address => uint256) internal ownedTokensCount;

  // Mapping from owner to operator approvals
  mapping (address => mapping (address => bool)) internal operatorApprovals;

  constructor()
    public
  {
    // register the supported interfaces to conform to ERC721 via ERC165
    _registerInterface(InterfaceId_ERC721);
    _registerInterface(InterfaceId_ERC721Exists);
  }

  /**
   * @dev Gets the balance of the specified address
   * @param _owner address to query the balance of
   * @return uint256 representing the amount owned by the passed address
   */
  function balanceOf(address _owner) public view returns (uint256) {
    require(_owner != address(0));
    return ownedTokensCount[_owner];
  }

  /**
   * @dev Gets the owner of the specified token ID
   * @param _tokenId uint256 ID of the token to query the owner of
   * @return owner address currently marked as the owner of the given token ID
   */
  function ownerOf(uint256 _tokenId) public view returns (address) {
    address owner = tokenOwner[_tokenId];
    require(owner != address(0));
    return owner;
  }

  /**
   * @dev Returns whether the specified token exists
   * @param _tokenId uint256 ID of the token to query the existence of
   * @return whether the token exists
   */
  function exists(uint256 _tokenId) public view returns (bool) {
    address owner = tokenOwner[_tokenId];
    return owner != address(0);
  }

  /**
   * @dev Approves another address to transfer the given token ID
   * The zero address indicates there is no approved address.
   * There can only be one approved address per token at a given time.
   * Can only be called by the token owner or an approved operator.
   * @param _to address to be approved for the given token ID
   * @param _tokenId uint256 ID of the token to be approved
   */
  function approve(address _to, uint256 _tokenId) public {
    address owner = ownerOf(_tokenId);
    require(_to != owner);
    require(msg.sender == owner || isApprovedForAll(owner, msg.sender));

    tokenApprovals[_tokenId] = _to;
    emit Approval(owner, _to, _tokenId);
  }

  /**
   * @dev Gets the approved address for a token ID, or zero if no address set
   * @param _tokenId uint256 ID of the token to query the approval of
   * @return address currently approved for the given token ID
   */
  function getApproved(uint256 _tokenId) public view returns (address) {
    return tokenApprovals[_tokenId];
  }

  /**
   * @dev Sets or unsets the approval of a given operator
   * An operator is allowed to transfer all tokens of the sender on their behalf
   * @param _to operator address to set the approval
   * @param _approved representing the status of the approval to be set
   */
  function setApprovalForAll(address _to, bool _approved) public {
    require(_to != msg.sender);
    operatorApprovals[msg.sender][_to] = _approved;
    emit ApprovalForAll(msg.sender, _to, _approved);
  }

  /**
   * @dev Tells whether an operator is approved by a given owner
   * @param _owner owner address which you want to query the approval of
   * @param _operator operator address which you want to query the approval of
   * @return bool whether the given operator is approved by the given owner
   */
  function isApprovedForAll(
    address _owner,
    address _operator
  )
    public
    view
    returns (bool)
  {
    return operatorApprovals[_owner][_operator];
  }

  /**
   * @dev Transfers the ownership of a given token ID to another address
   * Usage of this method is discouraged, use `safeTransferFrom` whenever possible
   * Requires the msg sender to be the owner, approved, or operator
   * @param _from current owner of the token
   * @param _to address to receive the ownership of the given token ID
   * @param _tokenId uint256 ID of the token to be transferred
  */
  function transferFrom(
    address _from,
    address _to,
    uint256 _tokenId
  )
    public
  {
    require(isApprovedOrOwner(msg.sender, _tokenId));
    require(_from != address(0));
    require(_to != address(0));

    clearApproval(_from, _tokenId);
    removeTokenFrom(_from, _tokenId);
    addTokenTo(_to, _tokenId);

    emit Transfer(_from, _to, _tokenId);
  }

  /**
   * @dev Safely transfers the ownership of a given token ID to another address
   * If the target address is a contract, it must implement `onERC721Received`,
   * which is called upon a safe transfer, and return the magic value
   * `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`; otherwise,
   * the transfer is reverted.
   *
   * Requires the msg sender to be the owner, approved, or operator
   * @param _from current owner of the token
   * @param _to address to receive the ownership of the given token ID
   * @param _tokenId uint256 ID of the token to be transferred
  */
  function safeTransferFrom(
    address _from,
    address _to,
    uint256 _tokenId
  )
    public
  {
    // solium-disable-next-line arg-overflow
    safeTransferFrom(_from, _to, _tokenId, "");
  }

  /**
   * @dev Safely transfers the ownership of a given token ID to another address
   * If the target address is a contract, it must implement `onERC721Received`,
   * which is called upon a safe transfer, and return the magic value
   * `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`; otherwise,
   * the transfer is reverted.
   * Requires the msg sender to be the owner, approved, or operator
   * @param _from current owner of the token
   * @param _to address to receive the ownership of the given token ID
   * @param _tokenId uint256 ID of the token to be transferred
   * @param _data bytes data to send along with a safe transfer check
   */
  function safeTransferFrom(
    address _from,
    address _to,
    uint256 _tokenId,
    bytes _data
  )
    public
  {
    transferFrom(_from, _to, _tokenId);
    // solium-disable-next-line arg-overflow
    require(checkAndCallSafeTransfer(_from, _to, _tokenId, _data));
  }

  /**
   * @dev Returns whether the given spender can transfer a given token ID
   * @param _spender address of the spender to query
   * @param _tokenId uint256 ID of the token to be transferred
   * @return bool whether the msg.sender is approved for the given token ID,
   *  is an operator of the owner, or is the owner of the token
   */
  function isApprovedOrOwner(
    address _spender,
    uint256 _tokenId
  )
    internal
    view
    returns (bool)
  {
    address owner = ownerOf(_tokenId);
    // Disable solium check because of
    // https://github.com/duaraghav8/Solium/issues/175
    // solium-disable-next-line operator-whitespace
    return (
      _spender == owner ||
      getApproved(_tokenId) == _spender ||
      isApprovedForAll(owner, _spender)
    );
  }

  /**
   * @dev Internal function to mint a new token
   * Reverts if the given token ID already exists
   * @param _to The address that will own the minted token
   * @param _tokenId uint256 ID of the token to be minted by the msg.sender
   */
  function _mint(address _to, uint256 _tokenId) internal {
    require(_to != address(0));
    addTokenTo(_to, _tokenId);
    emit Transfer(address(0), _to, _tokenId);
  }

  /**
   * @dev Internal function to burn a specific token
   * Reverts if the token does not exist
   * @param _tokenId uint256 ID of the token being burned by the msg.sender
   */
  function _burn(address _owner, uint256 _tokenId) internal {
    clearApproval(_owner, _tokenId);
    removeTokenFrom(_owner, _tokenId);
    emit Transfer(_owner, address(0), _tokenId);
  }

  /**
   * @dev Internal function to clear current approval of a given token ID
   * Reverts if the given address is not indeed the owner of the token
   * @param _owner owner of the token
   * @param _tokenId uint256 ID of the token to be transferred
   */
  function clearApproval(address _owner, uint256 _tokenId) internal {
    require(ownerOf(_tokenId) == _owner);
    if (tokenApprovals[_tokenId] != address(0)) {
      tokenApprovals[_tokenId] = address(0);
    }
  }

  /**
   * @dev Internal function to add a token ID to the list of a given address
   * @param _to address representing the new owner of the given token ID
   * @param _tokenId uint256 ID of the token to be added to the tokens list of the given address
   */
  function addTokenTo(address _to, uint256 _tokenId) internal {
    require(tokenOwner[_tokenId] == address(0));
    tokenOwner[_tokenId] = _to;
    ownedTokensCount[_to] = ownedTokensCount[_to].add(1);
  }

  /**
   * @dev Internal function to remove a token ID from the list of a given address
   * @param _from address representing the previous owner of the given token ID
   * @param _tokenId uint256 ID of the token to be removed from the tokens list of the given address
   */
  function removeTokenFrom(address _from, uint256 _tokenId) internal {
    require(ownerOf(_tokenId) == _from);
    ownedTokensCount[_from] = ownedTokensCount[_from].sub(1);
    tokenOwner[_tokenId] = address(0);
  }

  /**
   * @dev Internal function to invoke `onERC721Received` on a target address
   * The call is not executed if the target address is not a contract
   * @param _from address representing the previous owner of the given token ID
   * @param _to target address that will receive the tokens
   * @param _tokenId uint256 ID of the token to be transferred
   * @param _data bytes optional data to send along with the call
   * @return whether the call correctly returned the expected magic value
   */
  function checkAndCallSafeTransfer(
    address _from,
    address _to,
    uint256 _tokenId,
    bytes _data
  )
    internal
    returns (bool)
  {
    if (!_to.isContract()) {
      return true;
    }
    bytes4 retval = ERC721Receiver(_to).onERC721Received(
      msg.sender, _from, _tokenId, _data);
    return (retval == ERC721_RECEIVED);
  }
}

// File: contracts\token\ERC721\ERC721Token.sol

/**
 * @title Full ERC721 Token
 * This implementation includes all the required and some optional functionality of the ERC721 standard
 * Moreover, it includes approve all functionality using operator terminology
 * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
 */
contract ERC721Token is SupportsInterfaceWithLookup, ERC721BasicToken, ERC721 {

  // Token name
  string internal name_;

  // Token symbol
  string internal symbol_;

  // Mapping from owner to list of owned token IDs
  mapping(address => uint256[]) internal ownedTokens;

  // Mapping from token ID to index of the owner tokens list
  mapping(uint256 => uint256) internal ownedTokensIndex;

  // Array with all token ids, used for enumeration
  uint256[] internal allTokens;

  // Mapping from token id to position in the allTokens array
  mapping(uint256 => uint256) internal allTokensIndex;

  /**
   * @dev Constructor function
   */
  constructor(string _name, string _symbol) public {
    name_ = _name;
    symbol_ = _symbol;

    // register the supported interfaces to conform to ERC721 via ERC165
    _registerInterface(InterfaceId_ERC721Enumerable);
    _registerInterface(InterfaceId_ERC721Metadata);
  }

  /**
   * @dev Gets the token name
   * @return string representing the token name
   */
  function name() external view returns (string) {
    return name_;
  }

  /**
   * @dev Gets the token symbol
   * @return string representing the token symbol
   */
  function symbol() external view returns (string) {
    return symbol_;
  }

  /**
   * @dev Gets the token ID at a given index of the tokens list of the requested owner
   * @param _owner address owning the tokens list to be accessed
   * @param _index uint256 representing the index to be accessed of the requested tokens list
   * @return uint256 token ID at the given index of the tokens list owned by the requested address
   */
  function tokenOfOwnerByIndex(
    address _owner,
    uint256 _index
  )
    public
    view
    returns (uint256)
  {
    require(_index < balanceOf(_owner));
    return ownedTokens[_owner][_index];
  }

  /**
   * @dev Gets the total amount of tokens stored by the contract
   * @return uint256 representing the total amount of tokens
   */
  function totalSupply() public view returns (uint256) {
    return allTokens.length;
  }

  /**
   * @dev Gets the token ID at a given index of all the tokens in this contract
   * Reverts if the index is greater or equal to the total number of tokens
   * @param _index uint256 representing the index to be accessed of the tokens list
   * @return uint256 token ID at the given index of the tokens list
   */
  function tokenByIndex(uint256 _index) public view returns (uint256) {
    require(_index < totalSupply());
    return allTokens[_index];
  }


  /**
   * @dev Internal function to add a token ID to the list of a given address
   * @param _to address representing the new owner of the given token ID
   * @param _tokenId uint256 ID of the token to be added to the tokens list of the given address
   */
  function addTokenTo(address _to, uint256 _tokenId) internal {
    super.addTokenTo(_to, _tokenId);
    uint256 length = ownedTokens[_to].length;
    ownedTokens[_to].push(_tokenId);
    ownedTokensIndex[_tokenId] = length;
  }

  /**
   * @dev Internal function to remove a token ID from the list of a given address
   * @param _from address representing the previous owner of the given token ID
   * @param _tokenId uint256 ID of the token to be removed from the tokens list of the given address
   */
  function removeTokenFrom(address _from, uint256 _tokenId) internal {
    super.removeTokenFrom(_from, _tokenId);

    // To prevent a gap in the array, we store the last token in the index of the token to delete, and
    // then delete the last slot.
    uint256 tokenIndex = ownedTokensIndex[_tokenId];
    uint256 lastTokenIndex = ownedTokens[_from].length.sub(1);
    uint256 lastToken = ownedTokens[_from][lastTokenIndex];

    ownedTokens[_from][tokenIndex] = lastToken;
    // This also deletes the contents at the last position of the array
    ownedTokens[_from].length--;

    // Note that this will handle single-element arrays. In that case, both tokenIndex and lastTokenIndex are going to
    // be zero. Then we can make sure that we will remove _tokenId from the ownedTokens list since we are first swapping
    // the lastToken to the first position, and then dropping the element placed in the last position of the list

    ownedTokensIndex[_tokenId] = 0;
    ownedTokensIndex[lastToken] = tokenIndex;
  }

  /**
   * @dev Internal function to mint a new token
   * Reverts if the given token ID already exists
   * @param _to address the beneficiary that will own the minted token
   * @param _tokenId uint256 ID of the token to be minted by the msg.sender
   */
  function _mint(address _to, uint256 _tokenId) internal {
    super._mint(_to, _tokenId);

    allTokensIndex[_tokenId] = allTokens.length;
    allTokens.push(_tokenId);
  }

  /**
   * @dev Internal function to burn a specific token
   * Reverts if the token does not exist
   * @param _owner owner of the token to burn
   * @param _tokenId uint256 ID of the token being burned by the msg.sender
   */
  function _burn(address _owner, uint256 _tokenId) internal {
    super._burn(_owner, _tokenId);

    // Reorg all tokens array
    uint256 tokenIndex = allTokensIndex[_tokenId];
    uint256 lastTokenIndex = allTokens.length.sub(1);
    uint256 lastToken = allTokens[lastTokenIndex];

    allTokens[tokenIndex] = lastToken;
    allTokens[lastTokenIndex] = 0;

    allTokens.length--;
    allTokensIndex[_tokenId] = 0;
    allTokensIndex[lastToken] = tokenIndex;
  }

}

// File: contracts\GlitchGoonsItem.sol

contract GlitchGoonsItem is PresaleGacha, ERC721Token, Ownable {
    string public constant name = "GlitchGoons";

    string public constant symbol = "GG";

    uint256 internal id;
    string internal tokenUriPref = "https://static.glitch-goons.com/metadata/gg/";

    struct PresalePack {
        uint32 available;
        uint32 gameCoin;
        uint256 price;
    }

    PresalePack tokenPack;
    PresalePack investorPack;
    PresalePack apprenticeChest;
    PresalePack warriorChest;
    PresalePack gladiatorChest;
    PresalePack warlordChest;

    uint256 private closingTime;
    uint256 private openingTime;

    GameCoin gameCoinContract;

    constructor (address _emitter, address _administrator, address _gameCoin, uint256 _openingTime, uint256 _closingTime)
    ERC721Token(name, symbol)
    public {
        setEmitter(_emitter);
        setAdministrator(_administrator);

        GameCoin gameCoinCandidate = GameCoin(_gameCoin);
        require(gameCoinCandidate.isGameCoin());
        gameCoinContract = gameCoinCandidate;

        tokenPack = PresalePack(50, 4000, 10 ether);
        investorPack = PresalePack(1, 10 ** 6, 500 ether);

        apprenticeChest = PresalePack(550, 207, .5 ether);
        warriorChest = PresalePack(200, 717, 1.75 ether);
        gladiatorChest = PresalePack(80, 1405, 3.5 ether);
        warlordChest = PresalePack(35, 3890, 10 ether);

        closingTime = _closingTime;
        openingTime = _openingTime;
    }

    function addItemToInternal(address _to, uint256 _class, uint256 _type, uint256 _rarity, uint256 _tier, uint256 _name, uint256 _region) internal {
        uint256 identity = ItemUtils.createItem(_class, _type, _rarity, _tier, _name, _region);
        identity = ItemUtils.setUID(identity, ++id);
        _mint(_to, identity);
    }

    function addItemTo(address _to, uint256 _class, uint256 _type, uint256 _rarity, uint256 _tier, uint256 _name, uint256 _region) external onlyEmitter {
        addItemToInternal(_to, _class, _type, _rarity, _tier, _name, _region);
    }

    function buyTokenPack(uint256 _region) external onlyWhileOpen canBuyPack(tokenPack) payable {
        addItemToInternal(msg.sender, CLASS_CHEST, TYPE_CHEST_TOKEN_PACK, RARITY_NONE, 0, NAME_NONE, _region);
        tokenPack.available--;
        administrator.transfer(msg.value);
    }

    function buyInvestorPack(uint256 _region) external onlyWhileOpen canBuyPack(investorPack) payable {
        addItemToInternal(msg.sender, CLASS_CHEST, TYPE_CHEST_INVESTOR_PACK, RARITY_NONE, 0, NAME_NONE, _region);
        investorPack.available--;
        administrator.transfer(msg.value);
    }

    function buyApprenticeChest(uint256 _region) external onlyWhileOpen canBuyPack(apprenticeChest) payable {
        addItemToInternal(msg.sender, CLASS_CHEST, TYPE_CHEST_APPRENTICE, RARITY_NONE, 0, NAME_NONE, _region);
        apprenticeChest.available--;
        administrator.transfer(msg.value);
    }

    function buyWarriorChest(uint256 _region) external onlyWhileOpen canBuyPack(warriorChest) payable {
        addItemToInternal(msg.sender, CLASS_CHEST, TYPE_CHEST_WARRIOR, RARITY_NONE, 0, NAME_NONE, _region);
        warriorChest.available--;
        administrator.transfer(msg.value);
    }

    function buyGladiatorChest(uint256 _region) external onlyWhileOpen canBuyPack(gladiatorChest) payable {
        addItemToInternal(msg.sender, CLASS_CHEST, TYPE_CHEST_GLADIATOR, RARITY_NONE, 0, NAME_NONE, _region);
        gladiatorChest.available--;
        administrator.transfer(msg.value);
    }

    function buyWarlordChest(uint256 _region) external onlyWhileOpen canBuyPack(warlordChest) payable {
        addItemToInternal(msg.sender, CLASS_CHEST, TYPE_CHEST_WARLORD, RARITY_NONE, 0, NAME_NONE, _region);
        warlordChest.available--;
        administrator.transfer(msg.value);
    }

    function openChest(uint256 _identifier) external onlyChestOwner(_identifier) {
        uint256 _type = ItemUtils.getType(_identifier);

        if (_type == TYPE_CHEST_TOKEN_PACK) {
            transferTokens(tokenPack);
        } else if (_type == TYPE_CHEST_INVESTOR_PACK) {
            transferTokens(investorPack);
        } else {
            uint256 blockNum = block.number;

            for (uint i = 0; i < 5; i++) {
                uint256 hash = uint256(keccak256(abi.encodePacked(_identifier, blockNum, i, block.coinbase, block.timestamp, block.difficulty)));
                blockNum--;
                uint256 rnd = hash % 101;
                uint32 _tier;
                uint32 _rarity;
                uint256 _id;

                if (isApprenticeChest(_identifier)) {
                    _id = getApprenticeDistributedRandom(rnd);
                    _rarity = getRarity(TYPE_CHEST_APPRENTICE, _id);
                    _tier = getTier(TYPE_CHEST_APPRENTICE, _id);
                } else if (isWarriorChest(_identifier)) {
                    _id = getWarriorDistributedRandom(rnd);
                    _rarity = getRarity(TYPE_CHEST_WARRIOR, _id);
                    _tier = getTier(TYPE_CHEST_WARRIOR, _id);
                } else if (isGladiatorChest(_identifier)) {
                    _id = getGladiatorDistributedRandom(rnd);
                    _rarity = getRarity(TYPE_CHEST_GLADIATOR, _id);
                    _tier = getTier(TYPE_CHEST_GLADIATOR, _id);
                } else if (isWarlordChest(_identifier)) {
                    _id = getWarlordDistributedRandom(rnd);
                    _rarity = getRarity(TYPE_CHEST_WARLORD, _id);
                    _tier = getTier(TYPE_CHEST_WARLORD, _id);
                } else {
                    require(false);
                }

                ChestItem storage chestItem = chestItems[hash % 8];
                uint256 _region = ItemUtils.getRegion(_identifier);
                uint256 _name = 1 + hash % 5;
                if (i == 0) {
                    if (isWarriorChest(_identifier)) {
                        addItemToInternal(msg.sender, chestItem._class, chestItem._type, RARITY_RARE, 3, _name, _region);
                    } else if (isGladiatorChest(_identifier)) {
                        addItemToInternal(msg.sender, chestItem._class, chestItem._type, RARITY_RARE, 5, _name, _region);
                    } else if (isWarlordChest(_identifier)) {
                        addItemToInternal(msg.sender, chestItem._class, chestItem._type, RARITY_LEGENDARY, 5, _name, _region);
                    } else {
                        addItemToInternal(msg.sender, chestItem._class, chestItem._type, _rarity, _tier, _name, _region);
                    }
                } else {
                    addItemToInternal(msg.sender, chestItem._class, chestItem._type, _rarity, _tier, _name, _region);
                }
            }
        }

        _burn(msg.sender, _identifier);
    }

    function getTokenPacksAvailable() view public returns (uint256) {
        return tokenPack.available;
    }

    function getTokenPackPrice() view public returns (uint256) {
        return tokenPack.price;
    }

    function getInvestorPacksAvailable() view public returns (uint256) {
        return investorPack.available;
    }

    function getInvestorPackPrice() view public returns (uint256) {
        return investorPack.price;
    }

    function getApprenticeChestAvailable() view public returns (uint256) {
        return apprenticeChest.available;
    }

    function getApprenticeChestPrice() view public returns (uint256) {
        return apprenticeChest.price;
    }

    function getWarriorChestAvailable() view public returns (uint256) {
        return warriorChest.available;
    }

    function getWarriorChestPrice() view public returns (uint256) {
        return warriorChest.price;
    }

    function getGladiatorChestAvailable() view public returns (uint256) {
        return gladiatorChest.available;
    }

    function getGladiatorChestPrice() view public returns (uint256) {
        return gladiatorChest.price;
    }

    function getWarlordChestAvailable() view public returns (uint256) {
        return warlordChest.available;
    }

    function getWarlordChestPrice() view public returns (uint256) {
        return warlordChest.price;
    }

    /**
    * @dev Reverts if not in presale time range.
    */
    modifier onlyWhileOpen {
        require(isOpen());
        _;
    }

    modifier canBuyPack(PresalePack pack) {
        require(msg.value == pack.price);
        require(pack.available > 0);
        _;
    }

    modifier onlyChestOwner(uint256 _identity) {
        require(ownerOf(_identity) == msg.sender);
        require(ItemUtils.getClass(_identity) == CLASS_CHEST);
        _;
    }

    /**
    * @return true if the presale is open, false otherwise.
    */
    function isOpen() public view returns (bool) {
        return block.timestamp >= openingTime && block.timestamp <= closingTime;
    }

    function getClosingTime() public view returns (uint256) {
        return closingTime;
    }

    function getOpeningTime() public view returns (uint256) {
        return openingTime;
    }

    function transferTokens(PresalePack pack) internal {
        require(gameCoinContract.balanceOf(address(this)) >= pack.gameCoin);
        gameCoinContract.transfer(msg.sender, pack.gameCoin);
    }

    function tokenURI(uint256 _tokenId) public view returns (string) {
        require(exists(_tokenId));
        return string(abi.encodePacked(tokenUriPref, StringUtils.uint2str(ItemUtils.getUID(_tokenId)), ".json"));
    }

    function setTokenUriPref(string _uri) public onlyAdministrator {
        tokenUriPref = _uri;
    }
}

    Contract ABI  
[{"constant":true,"inputs":[],"name":"getWarriorChestAvailable","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_interfaceId","type":"bytes4"}],"name":"supportsInterface","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":true,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_tokenId","type":"uint256"}],"name":"approve","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"InterfaceId_ERC165","outputs":[{"name":"","type":"bytes4"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getWarriorChestPrice","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_region","type":"uint256"}],"name":"buyApprenticeChest","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getClosingTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getWarlordChestPrice","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"isOpen","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getWarlordChestAvailable","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"exists","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getApprenticeChestAvailable","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getGladiatorChestAvailable","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_identifier","type":"uint256"}],"name":"openChest","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_emitter","type":"address"},{"name":"_administrator","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_class","type":"uint256"},{"name":"_type","type":"uint256"},{"name":"_rarity","type":"uint256"},{"name":"_tier","type":"uint256"},{"name":"_name","type":"uint256"},{"name":"_region","type":"uint256"}],"name":"addItemTo","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":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_tokenId","type":"uint256"},{"name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getApprenticeChestPrice","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_region","type":"uint256"}],"name":"buyGladiatorChest","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"_region","type":"uint256"}],"name":"buyTokenPack","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getGladiatorChestPrice","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getOpeningTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getTokenPackPrice","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_uri","type":"string"}],"name":"setTokenUriPref","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_region","type":"uint256"}],"name":"buyWarriorChest","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"_region","type":"uint256"}],"name":"buyWarlordChest","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"_region","type":"uint256"}],"name":"buyInvestorPack","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"getInvestorPacksAvailable","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getInvestorPackPrice","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getTokenPacksAvailable","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_emitter","type":"address"},{"name":"_administrator","type":"address"},{"name":"_gameCoin","type":"address"},{"name":"_openingTime","type":"uint256"},{"name":"_closingTime","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_from","type":"address"},{"indexed":true,"name":"_to","type":"address"},{"indexed":true,"name":"_tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_owner","type":"address"},{"indexed":true,"name":"_approved","type":"address"},{"indexed":true,"name":"_tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_owner","type":"address"},{"indexed":true,"name":"_operator","type":"address"},{"indexed":false,"name":"_approved","type":"bool"}],"name":"ApprovalForAll","type":"event"}]

  Contract Creation Code Switch To Opcodes View
60e0604052602c60808190527f68747470733a2f2f7374617469632e676c697463682d676f6f6e732e636f6d2f60a09081527f6d657461646174612f67672f000000000000000000000000000000000000000060c052620000649160139190620013b6565b503480156200007257600080fd5b5060405160a08062003a7c833981018060405281019080805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919050505060006040805190810160405280600b81526020017f476c69746368476f6f6e730000000000000000000000000000000000000000008152506040805190810160405280600281526020017f474700000000000000000000000000000000000000000000000000000000000081525060a060405190810160405280600463ffffffff168152602001600163ffffffff168152602001600063ffffffff168152602001600063ffffffff168152602001600063ffffffff1681525060008080815260200190815260200160002060008201518160000160006101000a81548163ffffffff021916908363ffffffff16021790555060208201518160000160046101000a81548163ffffffff021916908363ffffffff16021790555060408201518160000160086101000a81548163ffffffff021916908363ffffffff160217905550606082015181600001600c6101000a81548163ffffffff021916908363ffffffff16021790555060808201518160000160106101000a81548163ffffffff021916908363ffffffff16021790555090505060a060405190810160405280600563ffffffff168152602001600163ffffffff168152602001600063ffffffff168152602001600063ffffffff168152602001600063ffffffff168152506000806001815260200190815260200160002060008201518160000160006101000a81548163ffffffff021916908363ffffffff16021790555060208201518160000160046101000a81548163ffffffff021916908363ffffffff16021790555060408201518160000160086101000a81548163ffffffff021916908363ffffffff160217905550606082015181600001600c6101000a81548163ffffffff021916908363ffffffff16021790555060808201518160000160106101000a81548163ffffffff021916908363ffffffff16021790555090505060a060405190810160405280600763ffffffff168152602001600163ffffffff168152602001600063ffffffff168152602001600063ffffffff168152602001600063ffffffff168152506000806002815260200190815260200160002060008201518160000160006101000a81548163ffffffff021916908363ffffffff16021790555060208201518160000160046101000a81548163ffffffff021916908363ffffffff16021790555060408201518160000160086101000a81548163ffffffff021916908363ffffffff160217905550606082015181600001600c6101000a81548163ffffffff021916908363ffffffff16021790555060808201518160000160106101000a81548163ffffffff021916908363ffffffff16021790555090505060a060405190810160405280600963ffffffff168152602001600163ffffffff168152602001600063ffffffff168152602001600063ffffffff168152602001600063ffffffff168152506000806003815260200190815260200160002060008201518160000160006101000a81548163ffffffff021916908363ffffffff16021790555060208201518160000160046101000a81548163ffffffff021916908363ffffffff16021790555060408201518160000160086101000a81548163ffffffff021916908363ffffffff160217905550606082015181600001600c6101000a81548163ffffffff021916908363ffffffff16021790555060808201518160000160106101000a81548163ffffffff021916908363ffffffff16021790555090505060a060405190810160405280600863ffffffff168152602001600163ffffffff168152602001600063ffffffff168152602001600063ffffffff168152602001600063ffffffff168152506000806004815260200190815260200160002060008201518160000160006101000a81548163ffffffff021916908363ffffffff16021790555060208201518160000160046101000a81548163ffffffff021916908363ffffffff16021790555060408201518160000160086101000a81548163ffffffff021916908363ffffffff160217905550606082015181600001600c6101000a81548163ffffffff021916908363ffffffff16021790555060808201518160000160106101000a81548163ffffffff021916908363ffffffff16021790555090505060a060405190810160405280600663ffffffff168152602001600163ffffffff168152602001600063ffffffff168152602001600063ffffffff168152602001600063ffffffff168152506000806005815260200190815260200160002060008201518160000160006101000a81548163ffffffff021916908363ffffffff16021790555060208201518160000160046101000a81548163ffffffff021916908363ffffffff16021790555060408201518160000160086101000a81548163ffffffff021916908363ffffffff160217905550606082015181600001600c6101000a81548163ffffffff021916908363ffffffff16021790555060808201518160000160106101000a81548163ffffffff021916908363ffffffff16021790555090505060a060405190810160405280600a63ffffffff168152602001600163ffffffff168152602001600063ffffffff168152602001600063ffffffff168152602001600063ffffffff168152506000806006815260200190815260200160002060008201518160000160006101000a81548163ffffffff021916908363ffffffff16021790555060208201518160000160046101000a81548163ffffffff021916908363ffffffff16021790555060408201518160000160086101000a81548163ffffffff021916908363ffffffff160217905550606082015181600001600c6101000a81548163ffffffff021916908363ffffffff16021790555060808201518160000160106101000a81548163ffffffff021916908363ffffffff16021790555090505060a060405190810160405280600b63ffffffff168152602001600163ffffffff168152602001600063ffffffff168152602001600063ffffffff168152602001600063ffffffff168152506000806007815260200190815260200160002060008201518160000160006101000a81548163ffffffff021916908363ffffffff16021790555060208201518160000160046101000a81548163ffffffff021916908363ffffffff16021790555060408201518160000160086101000a81548163ffffffff021916908363ffffffff160217905550606082015181600001600c6101000a81548163ffffffff021916908363ffffffff16021790555060808201518160000160106101000a81548163ffffffff021916908363ffffffff160217905550905050603c600160008063ffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff160217905550601d60016000600163ffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff160217905550600560016000600263ffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff160217905550600360016000600363ffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff160217905550600260016000600463ffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff1602179055506001806000600563ffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff160217905550600a600260008063ffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff160217905550601460026000600163ffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff160217905550600f60026000600263ffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff160217905550601960026000600363ffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff160217905550601960026000600463ffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff160217905550600560026000600563ffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff160217905550600f600360008063ffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff160217905550600f60036000600163ffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff160217905550601460036000600263ffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff160217905550601460036000600363ffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff160217905550601260036000600463ffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff160217905550600c60036000600563ffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff160217905550600a600460008063ffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff160217905550601e60046000600163ffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff160217905550603c60046000600263ffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff16021790555062000f456301ffc9a77c010000000000000000000000000000000000000000000000000000000002620012ab640100000000026401000000009004565b62000f797f80ac58cd00000000000000000000000000000000000000000000000000000000640100000000620012ab810204565b62000fad7f4f558e7900000000000000000000000000000000000000000000000000000000640100000000620012ab810204565b815162000fc290600a906020850190620013b6565b50805162000fd890600b906020840190620013b6565b506200100d7f780e9d6300000000000000000000000000000000000000000000000000000000640100000000620012ab810204565b620010417f5b5e139f00000000000000000000000000000000000000000000000000000000640100000000620012ab810204565b50506200105d8662001318640100000000026401000000009004565b620010718564010000000062001367810204565b83905080600160a060020a03166371d21ce16040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015620010cc57600080fd5b505af1158015620010e1573d6000803e3d6000fd5b505050506040513d6020811015620010f857600080fd5b505115156200110657600080fd5b60228054600160a060020a031916600160a060020a039290921691909117905560408051606080820183526032808352610fa0602080850191909152678ac7230489e800009385018490526014805463ffffffff1990811690931767ffffffff0000000019908116650fa000000000179091556015859055855180850187526001808252620f424082850152681b1ae4d6e2ef5000009188018290526016805486169091178316660f4240000000001790556017558551808501875261022680825260cf828501526706f05b59d3b20000918801829052601880548616909117831664cf000000001790556019558551808501875260c88082526102cd828501526718493fba64ef0000918801829052601a8054861690911783166502cd00000000179055601b5585518085018752605080825261057d828501526730927f74c9de0000918801829052601c80548616909117831665057d00000000179055601d55855193840186526023808552610f328584015293909501849052601e8054909216909217909316650f320000000017909255601f5555602155506200145b915050565b7fffffffff000000000000000000000000000000000000000000000000000000008082161415620012db57600080fd5b7fffffffff00000000000000000000000000000000000000000000000000000000166000908152600560205260409020805460ff19166001179055565b600160a060020a03811615156200132e57600080fd5b601054600160a060020a0316156200134557600080fd5b60108054600160a060020a031916600160a060020a0392909216919091179055565b600160a060020a03811615156200137d57600080fd5b601154600160a060020a0316156200139457600080fd5b60118054600160a060020a031916600160a060020a0392909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620013f957805160ff191683800117855562001429565b8280016001018555821562001429579182015b82811115620014295782518255916020019190600101906200140c565b50620014379291506200143b565b5090565b6200145891905b8082111562001437576000815560010162001442565b90565b612611806200146b6000396000f30060806040526004361061020d5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041662405351811461021257806301ffc9a71461023957806306fdde031461026f578063081812fc146102f9578063095ea7b31461032d57806318160ddd1461035357806319fa8f501461036857806320c0b4931461039a57806323b872dd146103af57806324f3c639146103d95780632f745c59146103e45780632f9cb9aa14610408578063302579c61461041d57806342842e0e1461043257806347535d7b1461045c5780634bfa798a146104715780634f558e79146104865780634f6ccce71461049e578063547c165f146104b6578063604f90a8146104cb5780636075eb7d146104e05780636352211e146104f85780636d435421146105105780636ebbfd5a1461053757806370a082311461056a57806395d89b411461058b578063a22cb465146105a0578063b88d4fde146105c6578063b900a87014610635578063bec6eb151461064a578063c632197914610655578063c87b56dd14610660578063d023d2bd14610678578063d74635731461068d578063dfb8a38d146106a2578063e985e9c5146106b7578063e9f29b7b146106de578063ea77d01a14610737578063f45e8dc414610742578063f797b6171461074d578063f81de22814610758578063fb8bc2971461076d578063ff249bb014610782575b600080fd5b34801561021e57600080fd5b50610227610797565b60408051918252519081900360200190f35b34801561024557600080fd5b5061025b600160e060020a0319600435166107a4565b604080519115158252519081900360200190f35b34801561027b57600080fd5b506102846107c3565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102be5781810151838201526020016102a6565b50505050905090810190601f1680156102eb5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561030557600080fd5b506103116004356107fa565b60408051600160a060020a039092168252519081900360200190f35b34801561033957600080fd5b50610351600160a060020a0360043516602435610815565b005b34801561035f57600080fd5b506102276108cb565b34801561037457600080fd5b5061037d6108d1565b60408051600160e060020a03199092168252519081900360200190f35b3480156103a657600080fd5b506102276108f5565b3480156103bb57600080fd5b50610351600160a060020a03600435811690602435166044356108fb565b61035160043561099e565b3480156103f057600080fd5b50610227600160a060020a0360043516602435610a72565b34801561041457600080fd5b50610227610ac0565b34801561042957600080fd5b50610227610ac6565b34801561043e57600080fd5b50610351600160a060020a0360043581169060243516604435610acc565b34801561046857600080fd5b5061025b610ae8565b34801561047d57600080fd5b50610227610b03565b34801561049257600080fd5b5061025b600435610b0f565b3480156104aa57600080fd5b50610227600435610b2c565b3480156104c257600080fd5b50610227610b61565b3480156104d757600080fd5b50610227610b6d565b3480156104ec57600080fd5b50610351600435610b79565b34801561050457600080fd5b50610311600435610f4b565b34801561051c57600080fd5b50610351600160a060020a0360043581169060243516610f6f565b34801561054357600080fd5b50610351600160a060020a036004351660243560443560643560843560a43560c43561101f565b34801561057657600080fd5b50610227600160a060020a036004351661104e565b34801561059757600080fd5b50610284611081565b3480156105ac57600080fd5b50610351600160a060020a036004351660243515156110b8565b3480156105d257600080fd5b50604080516020601f60643560048181013592830184900484028501840190955281845261035194600160a060020a03813581169560248035909216956044359536956084940191819084018382808284375094975061113c9650505050505050565b34801561064157600080fd5b50610227611164565b61035160043561116a565b610351600435611239565b34801561066c57600080fd5b50610284600435611308565b34801561068457600080fd5b5061022761141d565b34801561069957600080fd5b50610227611423565b3480156106ae57600080fd5b50610227611429565b3480156106c357600080fd5b5061025b600160a060020a036004358116906024351661142f565b3480156106ea57600080fd5b506040805160206004803580820135601f810184900484028501840190955284845261035194369492936024939284019190819084018382808284375094975061145d9650505050505050565b61035160043561148b565b610351600435611559565b610351600435611628565b34801561076457600080fd5b506102276116f7565b34801561077957600080fd5b50610227611703565b34801561078e57600080fd5b50610227611709565b601a5463ffffffff165b90565b600160e060020a03191660009081526005602052604090205460ff1690565b60408051808201909152600b81527f476c69746368476f6f6e73000000000000000000000000000000000000000000602082015281565b600090815260076020526040902054600160a060020a031690565b600061082082610f4b565b9050600160a060020a03838116908216141561083b57600080fd5b33600160a060020a03821614806108575750610857813361142f565b151561086257600080fd5b600082815260076020526040808220805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600e5490565b7f01ffc9a70000000000000000000000000000000000000000000000000000000081565b601b5490565b6109053382611715565b151561091057600080fd5b600160a060020a038316151561092557600080fd5b600160a060020a038216151561093a57600080fd5b6109448382611774565b61094e83826117e3565b61095882826118ea565b8082600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b6109a6610ae8565b15156109b157600080fd5b6040805160608101825260185463ffffffff80821683526401000000009091041660208201526019549181018290529034146109ec57600080fd5b8051600063ffffffff90911611610a0257600080fd5b610a1433600260016000808088611933565b6018805460001963ffffffff808316919091011663ffffffff19909116179055601154604051600160a060020a03909116903480156108fc02916000818181858888f19350505050158015610a6d573d6000803e3d6000fd5b505050565b6000610a7d8361104e565b8210610a8857600080fd5b600160a060020a0383166000908152600c60205260409020805483908110610aac57fe5b906000526020600020015490505b92915050565b60205490565b601f5490565b610a6d838383602060405190810160405280600081525061113c565b60006021544210158015610afe57506020544211155b905090565b601e5463ffffffff1690565b600090815260066020526040902054600160a060020a0316151590565b6000610b366108cb565b8210610b4157600080fd5b600e805483908110610b4f57fe5b90600052602060002001549050919050565b60185463ffffffff1690565b601c5463ffffffff1690565b6000808080808080808080808b33610b9082610f4b565b600160a060020a031614610ba357600080fd5b6002610bae82611973565b14610bb857600080fd5b610bc18d611995565b9b5060058c1415610c0a576040805160608101825260145463ffffffff808216835264010000000090910416602082015260155491810191909152610c05906119ad565b610f32565b60068c1415610c4c576040805160608101825260165463ffffffff808216835264010000000090910416602082015260175491810191909152610c05906119ad565b439a50600099505b60058a1015610f32578c8b8b4142446040516020018087815260200186815260200185815260200184600160a060020a0316600160a060020a03166c0100000000000000000000000002815260140183815260200182815260200196505050505050506040516020818303038152906040526040518082805190602001908083835b60208310610cf55780518252601f199092019160209182019101610cd6565b5181516000196020949094036101000a8401908116901991909116179052604051939091018390039092209e9091019d9b50606592508b9150610d359050565b069750610d418d611af5565b15610d7057610d4f88611b09565b9450610d5c600186611b5e565b9550610d69600186611c15565b9650610e03565b610d798d611d24565b15610da157610d8788611d31565b9450610d94600286611b5e565b9550610d69600286611c15565b610daa8d611d7a565b15610dd257610db888611d87565b9450610dc5600386611b5e565b9550610d69600386611c15565b610ddb8d611dd0565b1561020d57610de988611ddd565b9450610df6600486611b5e565b9550610d69600486611c15565b6007891660009081526020819052604090209350610e208d611e26565b9250600160058a06019150891515610efe57610e3b8d611d24565b15610e6a578354610e6590339063ffffffff80821691640100000000900416600260038789611933565b610ef9565b610e738d611d7a565b15610e9d578354610e6590339063ffffffff80821691640100000000900416600260058789611933565b610ea68d611dd0565b15610ed0578354610e6590339063ffffffff80821691640100000000900416600460058789611933565b8354610ef990339063ffffffff8082169164010000000090048116908a8116908c168789611933565b610f27565b8354610f2790339063ffffffff8082169164010000000090048116908a8116908c168789611933565b600190990198610c54565b610f3c338e611e43565b50505050505050505050505050565b600081815260066020526040812054600160a060020a0316801515610aba57600080fd5b601154600160a060020a03163314610f8657600080fd5b600160a060020a038281169082161415610f9f57600080fd5b601054600160a060020a0383811691161415610fba57600080fd5b600160a060020a0382161515610fcf57600080fd5b600160a060020a0381161515610fe457600080fd5b60108054600160a060020a0393841673ffffffffffffffffffffffffffffffffffffffff199182161790915560118054929093169116179055565b601054600160a060020a0316331461103657600080fd5b61104587878787878787611933565b50505050505050565b6000600160a060020a038216151561106557600080fd5b50600160a060020a031660009081526008602052604090205490565b60408051808201909152600281527f4747000000000000000000000000000000000000000000000000000000000000602082015281565b600160a060020a0382163314156110ce57600080fd5b336000818152600960209081526040808320600160a060020a03871680855290835292819020805460ff1916861515908117909155815190815290519293927f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31929181900390910190a35050565b6111478484846108fb565b61115384848484611eff565b151561115e57600080fd5b50505050565b60195490565b611172610ae8565b151561117d57600080fd5b60408051606081018252601c5463ffffffff8082168352640100000000909104166020820152601d549181018290529034146111b857600080fd5b8051600063ffffffff909116116111ce57600080fd5b6111e033600260036000808088611933565b601c805460001963ffffffff808316919091011663ffffffff19909116179055601154604051600160a060020a03909116903480156108fc02916000818181858888f19350505050158015610a6d573d6000803e3d6000fd5b611241610ae8565b151561124c57600080fd5b6040805160608101825260145463ffffffff808216835264010000000090910416602082015260155491810182905290341461128757600080fd5b8051600063ffffffff9091161161129d57600080fd5b6112af33600260056000808088611933565b6014805460001963ffffffff808316919091011663ffffffff19909116179055601154604051600160a060020a03909116903480156108fc02916000818181858888f19350505050158015610a6d573d6000803e3d6000fd5b606061131382610b0f565b151561131e57600080fd5b601361133161132c8461206c565b61207c565b604051602001808380546001816001161561010002031660029004801561138f5780601f1061136d57610100808354040283529182019161138f565b820191906000526020600020905b81548152906001019060200180831161137b575b5050825160208401908083835b602083106113bb5780518252601f19909201916020918201910161139c565b5181516020939093036101000a60001901801990911692169190911790527f2e6a736f6e00000000000000000000000000000000000000000000000000000092019182525060408051808303601a190181526005909201905295945050505050565b601d5490565b60215490565b60155490565b600160a060020a03918216600090815260096020908152604080832093909416825291909152205460ff1690565b601154600160a060020a0316331461147457600080fd5b805161148790601390602084019061252d565b5050565b611493610ae8565b151561149e57600080fd5b60408051606081018252601a5463ffffffff8082168352640100000000909104166020820152601b549181018290529034146114d957600080fd5b8051600063ffffffff909116116114ef57600080fd5b611500336002806000808088611933565b601a805460001963ffffffff808316919091011663ffffffff19909116179055601154604051600160a060020a03909116903480156108fc02916000818181858888f19350505050158015610a6d573d6000803e3d6000fd5b611561610ae8565b151561156c57600080fd5b60408051606081018252601e5463ffffffff8082168352640100000000909104166020820152601f549181018290529034146115a757600080fd5b8051600063ffffffff909116116115bd57600080fd5b6115cf33600260046000808088611933565b601e805460001963ffffffff808316919091011663ffffffff19909116179055601154604051600160a060020a03909116903480156108fc02916000818181858888f19350505050158015610a6d573d6000803e3d6000fd5b611630610ae8565b151561163b57600080fd5b6040805160608101825260165463ffffffff808216835264010000000090910416602082015260175491810182905290341461167657600080fd5b8051600063ffffffff9091161161168c57600080fd5b61169e33600260066000808088611933565b6016805460001963ffffffff808316919091011663ffffffff19909116179055601154604051600160a060020a03909116903480156108fc02916000818181858888f19350505050158015610a6d573d6000803e3d6000fd5b60165463ffffffff1690565b60175490565b60145463ffffffff1690565b60008061172183610f4b565b905080600160a060020a031684600160a060020a0316148061175c575083600160a060020a0316611751846107fa565b600160a060020a0316145b8061176c575061176c818561142f565b949350505050565b81600160a060020a031661178782610f4b565b600160a060020a03161461179a57600080fd5b600081815260076020526040902054600160a060020a031615611487576000908152600760205260409020805473ffffffffffffffffffffffffffffffffffffffff1916905550565b60008060006117f285856121a3565b6000848152600d6020908152604080832054600160a060020a0389168452600c9092529091205490935061182d90600163ffffffff61223916565b600160a060020a0386166000908152600c602052604090208054919350908390811061185557fe5b9060005260206000200154905080600c600087600160a060020a0316600160a060020a031681526020019081526020016000208481548110151561189557fe5b6000918252602080832090910192909255600160a060020a0387168152600c909152604090208054906118cc9060001983016125ab565b506000938452600d6020526040808520859055908452909220555050565b60006118f6838361224b565b50600160a060020a039091166000908152600c6020908152604080832080546001810182559084528284208101859055938352600d909152902055565b60006119438787878787876122dc565b905061195d8160126000815460010191905081905561232f565b90506119698882612355565b5050505050505050565b600064100000000065400000000000835b0681151561198e57fe5b0492915050565b60006540000000000067010000000000000083611984565b602080820151602254604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905163ffffffff90931693600160a060020a03909216926370a08231926024808401939192918290030181600087803b158015611a1f57600080fd5b505af1158015611a33573d6000803e3d6000fd5b505050506040513d6020811015611a4957600080fd5b50511015611a5657600080fd5b602254602080830151604080517fa9059cbb00000000000000000000000000000000000000000000000000000000815233600482015263ffffffff909216602483015251600160a060020a039093169263a9059cbb926044808401939192918290030181600087803b158015611acb57600080fd5b505af1158015611adf573d6000803e3d6000fd5b505050506040513d6020811015610a6d57600080fd5b60006001611b0283611995565b1492915050565b600080805b60068160ff161015611b525760ff811660009081526001602052604090205463ffffffff169190910190818411611b4a578060ff169250611b57565b600101611b0e565b600092505b5050919050565b600063ffffffff831660011415611b885760038210611b7e576003611b81565b60025b9050610aba565b63ffffffff831660021415611bc25760028210611b7e57600182118015611baf5750600582105b611bba576004611bbd565b60035b611b81565b63ffffffff831660031415611bf1578115611b7e57600082118015611baf575060048210611bba576004611bbd565b63ffffffff83166004141561020d578115611c0d576004611b81565b506003610aba565b600063ffffffff831660011415611c6657811580611c335750816003145b611c59578160011480611c465750816004145b611c51576005611c54565b60045b611c5c565b60035b60ff169050610aba565b63ffffffff831660021415611cba57811580611c825750816003145b80611c8d5750816005145b611cb2578160011480611ca05750816004145b611cab576003611c54565b6005611c5c565b506004610aba565b63ffffffff831660031415611d0657811580611cd65750816003145b80611ce15750816005145b611cfe578160021480611ca0575081600414611cab576003611c54565b506005610aba565b63ffffffff83166004141561020d5781600114611cb2576005611c5c565b60006002611b0283611995565b600080805b60068160ff161015611b525760ff811660009081526002602052604090205463ffffffff169190910190818411611d72578060ff169250611b57565b600101611d36565b60006003611b0283611995565b600080805b60068160ff161015611b525760ff811660009081526003602052604090205463ffffffff169190910190818411611dc8578060ff169250611b57565b600101611d8c565b60006004611b0283611995565b600080805b60038160ff161015611b525760ff811660009081526004602052604090205463ffffffff169190910190818411611e1e578060ff169250611b57565b600101611de2565b600068400000000000000000694000000000000000000083611984565b6000806000611e5285856123a4565b6000848152600f6020526040902054600e54909350611e7890600163ffffffff61223916565b9150600e82815481101515611e8957fe5b9060005260206000200154905080600e84815481101515611ea657fe5b6000918252602082200191909155600e805484908110611ec257fe5b600091825260209091200155600e805490611ee19060001983016125ab565b506000938452600f6020526040808520859055908452909220555050565b600080611f1485600160a060020a03166123f4565b1515611f235760019150612063565b6040517f150b7a020000000000000000000000000000000000000000000000000000000081523360048201818152600160a060020a03898116602485015260448401889052608060648501908152875160848601528751918a169463150b7a0294938c938b938b93909160a490910190602085019080838360005b83811015611fb6578181015183820152602001611f9e565b50505050905090810190601f168015611fe35780820380516001836020036101000a031916815260200191505b5095505050505050602060405180830381600087803b15801561200557600080fd5b505af1158015612019573d6000803e3d6000fd5b505050506040513d602081101561202f57600080fd5b5051600160e060020a031981167f150b7a020000000000000000000000000000000000000000000000000000000014925090505b50949350505050565b6000600164010000000083611984565b606060008082818515156120c55760408051808201909152600181527f30000000000000000000000000000000000000000000000000000000000000006020820152945061219a565b8593505b83156120e057600190920191600a840493506120c9565b826040519080825280601f01601f19166020018201604052801561210e578160200160208202803883390190505b5091505060001982015b85156121965781516000198201917f01000000000000000000000000000000000000000000000000000000000000006030600a8a06010291849190811061215b57fe5b9060200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a86049550612118565b8194505b50505050919050565b81600160a060020a03166121b682610f4b565b600160a060020a0316146121c957600080fd5b600160a060020a0382166000908152600860205260409020546121f390600163ffffffff61223916565b600160a060020a03909216600090815260086020908152604080832094909455918152600690915220805473ffffffffffffffffffffffffffffffffffffffff19169055565b60008282111561224557fe5b50900390565b600081815260066020526040902054600160a060020a03161561226d57600080fd5b6000818152600660209081526040808320805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038716908117909155835260089091529020546122bc9060016123fc565b600160a060020a0390921660009081526008602052604090209190915550565b60006122e88188612409565b90506122f48187612429565b9050612300818661244a565b905061230c8185612469565b9050612318818461248b565b905061232481836124ad565b979650505050505050565b6000640100000000821061234257600080fd5b61234e838360016124cd565b9392505050565b61235f82826124d2565b600e80546000838152600f60205260408120829055600182018355919091527fbb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c3fd015550565b6123ae8282611774565b6123b882826117e3565b6040518190600090600160a060020a038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6000903b1190565b81810182811015610aba57fe5b6000610400821061241957600080fd5b61234e83836410000000006124cd565b6000610400821061243957600080fd5b61234e8383654000000000006124cd565b60006010821061245957600080fd5b61234e83836401000000006124cd565b60006080821061247857600080fd5b61234e83836701000000000000006124cd565b60006080821061249a57600080fd5b61234e83836780000000000000006124cd565b600061010082106124bd57600080fd5b61234e8383684000000000000000005b020190565b600160a060020a03821615156124e757600080fd5b6124f182826118ea565b6040518190600160a060020a038416906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061256e57805160ff191683800117855561259b565b8280016001018555821561259b579182015b8281111561259b578251825591602001919060010190612580565b506125a79291506125cb565b5090565b815481835581811115610a6d57600083815260209020610a6d9181019083015b6107a191905b808211156125a757600081556001016125d15600a165627a7a723058209a0d7177f59d461dece63eaa523c21fe4b9d08281b70f2033ccd2034bae7835a00290000000000000000000000005d6806d2fe789e4203d43fdaa627884b8b1ebea2000000000000000000000000f6cc2894f9537d84288ce241e6ba9443b4392aef00000000000000000000000018337c61e4f16a2e474c0d6124d85c522c26bbdd000000000000000000000000000000000000000000000000000000005bcd1300000000000000000000000000000000000000000000000000000000005be8c280

    Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000005d6806d2fe789e4203d43fdaa627884b8b1ebea2000000000000000000000000f6cc2894f9537d84288ce241e6ba9443b4392aef00000000000000000000000018337c61e4f16a2e474c0d6124d85c522c26bbdd000000000000000000000000000000000000000000000000000000005bcd1300000000000000000000000000000000000000000000000000000000005be8c280

-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 0000000000000000000000005d6806d2fe789e4203d43fdaa627884b8b1ebea2
Arg [1] : 000000000000000000000000f6cc2894f9537d84288ce241e6ba9443b4392aef
Arg [2] : 00000000000000000000000018337c61e4f16a2e474c0d6124d85c522c26bbdd
Arg [3] : 000000000000000000000000000000000000000000000000000000005bcd1300
Arg [4] : 000000000000000000000000000000000000000000000000000000005be8c280


   Swarm Source:
bzzr://9a0d7177f59d461dece63eaa523c21fe4b9d08281b70f2033ccd2034bae7835a

 

View All
Block Age transaction Difficulty GasUsed Reward
View All
Block Age UncleNumber Difficulty GasUsed Reward
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.