Contract 0xB908cAB7Cfb2DD8Af24EE7B1daBBB5D63a8d9f75

 
 
Txn Hash
Method
Block
From
To
Value
0x1f960c966ae6bc150991052cbc221c579082cab79cd7a871e4f7a12c2f10ff85Add Base Stats71935792019-02-08 15:22:381325 days 11 hrs ago0xb6052a08ffad405ce2bffd714c580447afe20c80 IN  0xb908cab7cfb2dd8af24ee7b1dabbb5d63a8d9f750 Ether0.001690868
0x2f68c58fb3774f32457209ee961fa0b451d1203e20e43c61241ba9da07c27398Add Base Stats71935772019-02-08 15:21:581325 days 11 hrs ago0xb6052a08ffad405ce2bffd714c580447afe20c80 IN  0xb908cab7cfb2dd8af24ee7b1dabbb5d63a8d9f750 Ether0.001690868
0x34d33413262491b385d6076f831b45c021452b1fae114e540f58c1af43fbec3bAdd Base Stats71935742019-02-08 15:21:151325 days 11 hrs ago0xb6052a08ffad405ce2bffd714c580447afe20c80 IN  0xb908cab7cfb2dd8af24ee7b1dabbb5d63a8d9f750 Ether0.001690868
0xf393a3acd840aa70c9b3cd493cb3c1ce652c10ed5be604d5cefe3e7ea2f1df10Add Base Stats71935712019-02-08 15:20:051325 days 11 hrs ago0xb6052a08ffad405ce2bffd714c580447afe20c80 IN  0xb908cab7cfb2dd8af24ee7b1dabbb5d63a8d9f750 Ether0.001690868
0xc0bf7215631bb27a50dd4273e923452f8279151ef5bcecc003e398d2838bbcccAdd Base Stats71935652019-02-08 15:18:021325 days 11 hrs ago0xb6052a08ffad405ce2bffd714c580447afe20c80 IN  0xb908cab7cfb2dd8af24ee7b1dabbb5d63a8d9f750 Ether0.0021135810
0x1df4833cfa6f0cc8aff03653c1777a4a422bd3820b1e60f1a230d1bb88ddc884Add Base Stats62843422018-09-06 20:50:101480 days 6 hrs ago0xb6052a08ffad405ce2bffd714c580447afe20c80 IN  0xb908cab7cfb2dd8af24ee7b1dabbb5d63a8d9f750 Ether0.000634073
0x29ce00be35174d260aca47ee79bb42fe5f26e743f67b2b7ce51d2100e4b887f9Add Base Stats62843182018-09-06 20:44:261480 days 6 hrs ago0xb6052a08ffad405ce2bffd714c580447afe20c80 IN  0xb908cab7cfb2dd8af24ee7b1dabbb5d63a8d9f750 Ether0.000634073
0x57326f1597e1e5df68a8a77f19e624419c65cbb48b57c117e9265dd623abea68Add Base Stats62843162018-09-06 20:43:541480 days 6 hrs ago0xb6052a08ffad405ce2bffd714c580447afe20c80 IN  0xb908cab7cfb2dd8af24ee7b1dabbb5d63a8d9f750 Ether0.000634073
0x8979aa64287f610ed5a376f8161ecbb6f9d32a344e20b710817eae45cc72bc43Add Base Stats62843162018-09-06 20:43:541480 days 6 hrs ago0xb6052a08ffad405ce2bffd714c580447afe20c80 IN  0xb908cab7cfb2dd8af24ee7b1dabbb5d63a8d9f750 Ether0.000634073
0x254a68a942a819fb162260f49a65d9752d3b2e7abc3a7bc057c8759f137002eeAdd Base Stats62843102018-09-06 20:42:461480 days 6 hrs ago0xb6052a08ffad405ce2bffd714c580447afe20c80 IN  0xb908cab7cfb2dd8af24ee7b1dabbb5d63a8d9f750 Ether0.000634073
0x707bb0f81f0ae51dc20fc419c701b556d429bb0c1d9c13f0927fca859f61fec5Add Base Stats53698572018-04-02 23:48:211637 days 3 hrs ago0xb6052a08ffad405ce2bffd714c580447afe20c80 IN  0xb908cab7cfb2dd8af24ee7b1dabbb5d63a8d9f750 Ether0.0042233220
0xcd3d693733011b6f11cab6347725b35f748a37a25eb6bde75781195a76f2e7b5Add Base Stats52004792018-03-05 11:07:221665 days 16 hrs ago0xb6052a08ffad405ce2bffd714c580447afe20c80 IN  0xb908cab7cfb2dd8af24ee7b1dabbb5d63a8d9f750 Ether0.0042271620
0x781d5d835b077daf2d3ba5d6a0116d97b7dacb40877decef59376e9ed6d29554Add Base Stats52004752018-03-05 11:06:211665 days 16 hrs ago0xb6052a08ffad405ce2bffd714c580447afe20c80 IN  0xb908cab7cfb2dd8af24ee7b1dabbb5d63a8d9f750 Ether0.0042258820
0xc7d5d74b27800c3387998289ced67e73629dfce752eb18cfdc89cdf51cf008b9Add Base Stats52004682018-03-05 11:05:021665 days 16 hrs ago0xb6052a08ffad405ce2bffd714c580447afe20c80 IN  0xb908cab7cfb2dd8af24ee7b1dabbb5d63a8d9f750 Ether0.0042271620
0xf4abc299beda58945cc1b64ba5687d1ac998e2292300ae680a4b8fc067748c1dAdd Base Stats52004662018-03-05 11:04:351665 days 16 hrs ago0xb6052a08ffad405ce2bffd714c580447afe20c80 IN  0xb908cab7cfb2dd8af24ee7b1dabbb5d63a8d9f750 Ether0.0042271620
0x73ce64bea2ac17d8c22bdc9a737c33e3b476c95f0fef0fc5083cb581c81bfa66Add Base Stats52004622018-03-05 11:03:271665 days 16 hrs ago0xb6052a08ffad405ce2bffd714c580447afe20c80 IN  0xb908cab7cfb2dd8af24ee7b1dabbb5d63a8d9f750 Ether0.0042271620
0x4fc2a404019f111b465ef274109e1c3053de20737cbe12f916369af9473bbaf6Add Base Stats52004602018-03-05 11:02:481665 days 16 hrs ago0xb6052a08ffad405ce2bffd714c580447afe20c80 IN  0xb908cab7cfb2dd8af24ee7b1dabbb5d63a8d9f750 Ether0.0042271620
0xb907e0be0d599e2a02322f141e38a2032c30556398de0404935ded2c6d85f45cAdd Base Stats52004442018-03-05 10:57:221665 days 16 hrs ago0xb6052a08ffad405ce2bffd714c580447afe20c80 IN  0xb908cab7cfb2dd8af24ee7b1dabbb5d63a8d9f750 Ether0.0042271620
0x2a6a6de55d216c34ae43519c3e3a8f2155c05c99d49efcf03b1182ee464cc276Add Base Stats51446302018-02-23 23:08:031675 days 4 hrs ago0xb6052a08ffad405ce2bffd714c580447afe20c80 IN  0xb908cab7cfb2dd8af24ee7b1dabbb5d63a8d9f750 Ether0.0027476513
0x0adb2315000dd95c50554c2adb947ab414c6725207e298a7bcd930556243dcc6Add Base Stats51072042018-02-17 14:43:291681 days 12 hrs ago0xb6052a08ffad405ce2bffd714c580447afe20c80 IN  0xb908cab7cfb2dd8af24ee7b1dabbb5d63a8d9f750 Ether0.0021129410
0x4c04ab594c320d885b26c409f31269e3713f071d502f8c56c2d676e3ab31b3ebAdd Base Stats51071722018-02-17 14:35:401681 days 12 hrs ago0xb6052a08ffad405ce2bffd714c580447afe20c80 IN  0xb908cab7cfb2dd8af24ee7b1dabbb5d63a8d9f750 Ether0.0021135810
0xa200a7db5f9dc0614d1c2792cb2dc4ce76776ca7180081c0c4d44b4177c6e2bd0x6060604051068672018-02-17 13:19:371681 days 13 hrs ago0xb6052a08ffad405ce2bffd714c580447afe20c80 IN  Create: MonsterCreatorInterface0 Ether0.016484565
[ Download CSV Export 
View more zero value Internal Transactions in Advanced View mode
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
MonsterCreatorInterface

Compiler Version
v0.4.18+commit.9cf6e910

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2018-02-17
*/

pragma solidity ^0.4.18;

/// @title Interface for contracts conforming to ERC-721: Deed Standard
/// @author William Entriken (https://phor.net), et. al.
/// @dev Specification at https://github.com/ethereum/eips/XXXFinalUrlXXX
interface ERC721 {

    // COMPLIANCE WITH ERC-165 (DRAFT) /////////////////////////////////////////

    /// @dev ERC-165 (draft) interface signature for itself
    // bytes4 internal constant INTERFACE_SIGNATURE_ERC165 = // 0x01ffc9a7
    //     bytes4(keccak256('supportsInterface(bytes4)'));

    /// @dev ERC-165 (draft) interface signature for ERC721
    // bytes4 internal constant INTERFACE_SIGNATURE_ERC721 = // 0xda671b9b
    //     bytes4(keccak256('ownerOf(uint256)')) ^
    //     bytes4(keccak256('countOfDeeds()')) ^
    //     bytes4(keccak256('countOfDeedsByOwner(address)')) ^
    //     bytes4(keccak256('deedOfOwnerByIndex(address,uint256)')) ^
    //     bytes4(keccak256('approve(address,uint256)')) ^
    //     bytes4(keccak256('takeOwnership(uint256)'));

    /// @notice Query a contract to see if it supports a certain interface
    /// @dev Returns `true` the interface is supported and `false` otherwise,
    ///  returns `true` for INTERFACE_SIGNATURE_ERC165 and
    ///  INTERFACE_SIGNATURE_ERC721, see ERC-165 for other interface signatures.
    function supportsInterface(bytes4 _interfaceID) external pure returns (bool);

    // PUBLIC QUERY FUNCTIONS //////////////////////////////////////////////////

    /// @notice Find the owner of a deed
    /// @param _deedId The identifier for a deed we are inspecting
    /// @dev Deeds assigned to zero address are considered invalid, and
    ///  queries about them do throw.
    /// @return The non-zero address of the owner of deed `_deedId`, or `throw`
    ///  if deed `_deedId` is not tracked by this contract
    function ownerOf(uint256 _deedId) external view returns (address _owner);

    /// @notice Count deeds tracked by this contract
    /// @return A count of valid deeds tracked by this contract, where each one of
    ///  them has an assigned and queryable owner not equal to the zero address
    function countOfDeeds() external view returns (uint256 _count);

    /// @notice Count all deeds assigned to an owner
    /// @dev Throws if `_owner` is the zero address, representing invalid deeds.
    /// @param _owner An address where we are interested in deeds owned by them
    /// @return The number of deeds owned by `_owner`, possibly zero
    function countOfDeedsByOwner(address _owner) external view returns (uint256 _count);

    /// @notice Enumerate deeds assigned to an owner
    /// @dev Throws if `_index` >= `countOfDeedsByOwner(_owner)` or if
    ///  `_owner` is the zero address, representing invalid deeds.
    /// @param _owner An address where we are interested in deeds owned by them
    /// @param _index A counter less than `countOfDeedsByOwner(_owner)`
    /// @return The identifier for the `_index`th deed assigned to `_owner`,
    ///   (sort order not specified)
    function deedOfOwnerByIndex(address _owner, uint256 _index) external view returns (uint256 _deedId);

    // TRANSFER MECHANISM //////////////////////////////////////////////////////

    /// @dev This event emits when ownership of any deed changes by any
    ///  mechanism. This event emits when deeds are created (`from` == 0) and
    ///  destroyed (`to` == 0). Exception: during contract creation, any
    ///  transfers may occur without emitting `Transfer`. At the time of any transfer,
    ///  the "approved taker" is implicitly reset to the zero address.
    event Transfer(address indexed from, address indexed to, uint256 indexed deedId);

    /// @dev The Approve event emits to log the "approved taker" for a deed -- whether
    ///  set for the first time, reaffirmed by setting the same value, or setting to
    ///  a new value. The "approved taker" is the zero address if nobody can take the
    ///  deed now or it is an address if that address can call `takeOwnership` to attempt
    ///  taking the deed. Any change to the "approved taker" for a deed SHALL cause
    ///  Approve to emit. However, an exception, the Approve event will not emit when
    ///  Transfer emits, this is because Transfer implicitly denotes the "approved taker"
    ///  is reset to the zero address.
    event Approval(address indexed owner, address indexed approved, uint256 indexed deedId);

    /// @notice Set the "approved taker" for your deed, or revoke approval by
    ///  setting the zero address. You may `approve` any number of times while
    ///  the deed is assigned to you, only the most recent approval matters. Emits
    ///  an Approval event.
    /// @dev Throws if `msg.sender` does not own deed `_deedId` or if `_to` ==
    ///  `msg.sender` or if `_deedId` is not a valid deed.
    /// @param _deedId The deed for which you are granting approval
    function approve(address _to, uint256 _deedId) external payable;

    /// @notice Become owner of a deed for which you are currently approved
    /// @dev Throws if `msg.sender` is not approved to become the owner of
    ///  `deedId` or if `msg.sender` currently owns `_deedId` or if `_deedId is not a
    ///  valid deed.
    /// @param _deedId The deed that is being transferred
    function takeOwnership(uint256 _deedId) external payable;
}

contract Ownable {
    address public owner;

    /**
    * @dev The Ownable constructor sets the original `owner` of the contract to the sender
    * account.
    */
    function Ownable() public {
        owner = msg.sender;
    }

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

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

contract MonsterAccessControl {
    event ContractUpgrade(address newContract);

     // The addresses of the accounts (or contracts) that can execute actions within each roles.
    address public adminAddress;

    /// @dev Access modifier for CEO-only functionality
    modifier onlyAdmin() {
        require(msg.sender == adminAddress);
        _;
    }
}

// This contract stores all data on the blockchain
// only our other contracts can interact with this
// the data here will be valid for all eternity even if other contracts get updated
// this way we can make sure that our Monsters have a hard-coded value attached to them
// that no one including us can change(!)
contract MonstersData {
    address coreContract;

    struct Monster {
        // timestamp of block when this monster was spawned/created
        uint64 birthTime;

        // generation number
        // gen0 is the very first generation - the later monster spawn the less likely they are to have
        // special attributes and stats
        uint16 generation;

        uint16 mID; // this id (from 1 to 151) is responsible for everything visually like showing the real deal!
        bool tradeable;

        // breeding
        bool female;

        // is this monster exceptionally rare?
        bool shiny;
    }

    // lv1 base stats
    struct MonsterBaseStats {
        uint16 hp;
        uint16 attack;
        uint16 defense;
        uint16 spAttack;
        uint16 spDefense;
        uint16 speed;
    }

    struct Trainer {
        // timestamp of block when this player/trainer was created
        uint64 birthTime;

        // add username
        string username;

        // current area in the "world"
        uint16 currArea;

        address owner;
    }

    // take timestamp of block this game was created on the blockchain
    uint64 creationBlock = uint64(now);
}

contract MonstersBase is MonsterAccessControl, MonstersData {
    /// @dev Transfer event as defined in current draft of ERC721. Emitted every time a monster
    ///  ownership is assigned, including births.
    event Transfer(address from, address to, uint256 tokenId);

    bool lockedMonsterCreator = false;

    MonsterAuction public monsterAuction;
    MonsterCreatorInterface public monsterCreator;

    function setMonsterCreatorAddress(address _address) external onlyAdmin {
        // only set this once so we (the devs) can't cheat!
        require(!lockedMonsterCreator);
        MonsterCreatorInterface candidateContract = MonsterCreatorInterface(_address);

        monsterCreator = candidateContract;
        lockedMonsterCreator = true;
    }

    // An approximation of currently how many seconds are in between blocks.
    uint256 public secondsPerBlock = 15;

    // array containing all monsters in existence
    Monster[] monsters;

    uint8[] areas;
    uint8 areaIndex = 0;

    mapping(address => Trainer) public addressToTrainer;
    /// @dev A mapping from monster IDs to the address that owns them. All monster have
    ///  some valid owner address, even gen0 monster are created with a non-zero owner.
    mapping (uint256 => address) public monsterIndexToOwner;
    // @dev A mapping from owner address to count of tokens that address owns.
    // Used internally inside balanceOf() to resolve ownership count.
    mapping (address => uint256) ownershipTokenCount;
    mapping (uint256 => address) public monsterIndexToApproved;
    mapping (uint256 => string) public monsterIdToNickname;
    mapping (uint256 => bool) public monsterIdToTradeable;
    mapping (uint256 => uint256) public monsterIdToGeneration;
    
    mapping (uint256 => uint8[7]) public monsterIdToIVs;

    // adds new area to world
    function _createArea() internal {
        areaIndex++;
        areas.push(areaIndex);
    }

    function _createMonster(uint256 _generation, address _owner, uint256 _mID, bool _tradeable,
        bool _female, bool _shiny) internal returns (uint)
    {

        Monster memory _monster = Monster({
            generation: uint16(_generation),
            birthTime: uint64(now),
            mID: uint16(_mID),
            tradeable: _tradeable,
            female: _female,
            shiny: _shiny
        });

        uint256 newMonsterId = monsters.push(_monster) - 1;

        require(newMonsterId == uint256(uint32(newMonsterId)));

        monsterIdToNickname[newMonsterId] = "";

        _transfer(0, _owner, newMonsterId);

        return newMonsterId;
    }

    function _createTrainer(string _username, uint16 _starterId, address _owner) internal returns (uint mon) {
        Trainer memory _trainer = Trainer({
            birthTime: uint64(now),
            username: string(_username),
             // sets to first area!,
            currArea: uint16(1),
            owner: address(_owner)
        });

        addressToTrainer[_owner] = _trainer;

        bool gender = monsterCreator.getMonsterGender();

        // starters cannot be traded and are not shiny
        if (_starterId == 1) {
            mon = _createMonster(0, _owner, 1, false, gender, false);
        } else if (_starterId == 2) {
            mon = _createMonster(0, _owner, 4, false, gender, false);
        } else if (_starterId == 3) {
            mon = _createMonster(0, _owner, 7, false, gender, false);
        }
    }

    function _moveToArea(uint16 _newArea, address player) internal {
        addressToTrainer[player].currArea = _newArea;
    }

    // assigns ownership of monster to address
    function _transfer(address _from, address _to, uint256 _tokenId) internal {
        ownershipTokenCount[_to]++;
        monsterIndexToOwner[_tokenId] = _to;

        if (_from != address(0)) {
            ownershipTokenCount[_from]--;

            // clear any previously approved ownership exchange
            delete monsterIndexToApproved[_tokenId];
        }

        // Emit Transfer event
        Transfer(_from, _to, _tokenId);
    }

    // Only admin can fix how many seconds per blocks are currently observed.
    function setSecondsPerBlock(uint256 secs) external onlyAdmin {
        //require(secs < cooldowns[0]);
        secondsPerBlock = secs;
    }
}

contract MonsterOwnership is MonstersBase, ERC721 {
    function _owns(address _claimant, uint256 _tokenId) internal view returns (bool) {
        return monsterIndexToOwner[_tokenId] == _claimant;
    }

    function _isTradeable(uint256 _tokenId) public view returns (bool) {
        return monsterIdToTradeable[_tokenId];
    }

    /// @dev Checks if a given address currently has transferApproval for a particular monster.
    /// @param _claimant the address we are confirming monster is approved for.
    /// @param _tokenId monster id, only valid when > 0
    function _approvedFor(address _claimant, uint256 _tokenId) internal view returns (bool) {
        return monsterIndexToApproved[_tokenId] == _claimant;
    }

    function balanceOf(address _owner) public view returns (uint256 count) {
        return ownershipTokenCount[_owner];
    }

    function transfer(address _to, uint256 _tokenId) public payable {
        transferFrom(msg.sender, _to, _tokenId);
    }

    function transferFrom(address _from, address _to, uint256 _tokenId) public payable {
        require(monsterIdToTradeable[_tokenId]);
        // Safety check to prevent against an unexpected 0x0 default.
        require(_to != address(0));
        // Disallow transfers to this contract to prevent accidental misuse.
        // The contract should never own any monsters (except very briefly
        // after a gen0 monster is created and before it goes on auction).
        require(_to != address(this));
        // Check for approval and valid ownership
        
        require(_owns(_from, _tokenId));
        // checks if _to was aproved
        require(_from == msg.sender || msg.sender == address(monsterAuction) || _approvedFor(_to, _tokenId));

        // Reassign ownership (also clears pending approvals and emits Transfer event).
        _transfer(_from, _to, _tokenId);
    }

    function totalSupply() public view returns (uint) {
        return monsters.length;
    }

    function tokensOfOwner(address _owner) public view returns (uint256[] ownerTokens) {
        uint256 tokenCount = balanceOf(_owner);

        if (tokenCount > 0) {
            uint256[] memory result = new uint256[](tokenCount);
            uint256 totalMonsters = totalSupply();
            uint256 resultIndex = 0;

            uint256 monsterId;

            for (monsterId = 0; monsterId <= totalMonsters; monsterId++) {
                if (monsterIndexToOwner[monsterId] == _owner) {
                    result[resultIndex] = monsterId;
                    resultIndex++;
                }
            }

            return result;
        }

        return new uint256[](0);
    }

    bytes4 internal constant INTERFACE_SIGNATURE_ERC165 =
        bytes4(keccak256("supportsInterface(bytes4)"));

    bytes4 internal constant INTERFACE_SIGNATURE_ERC721 =
        bytes4(keccak256("ownerOf(uint256)")) ^
        bytes4(keccak256("countOfDeeds()")) ^
        bytes4(keccak256("countOfDeedsByOwner(address)")) ^
        bytes4(keccak256("deedOfOwnerByIndex(address,uint256)")) ^
        bytes4(keccak256("approve(address,uint256)")) ^
        bytes4(keccak256("takeOwnership(uint256)"));

    function supportsInterface(bytes4 _interfaceID) external pure returns (bool) {
        return _interfaceID == INTERFACE_SIGNATURE_ERC165 || _interfaceID == INTERFACE_SIGNATURE_ERC721;
    }

    function ownerOf(uint256 _deedId) external view returns (address _owner) {
        var owner = monsterIndexToOwner[_deedId];
        require(owner != address(0));
        return owner;
    }

    function _approve(uint256 _tokenId, address _approved) internal {
        monsterIndexToApproved[_tokenId] = _approved;
    }

    function countOfDeeds() external view returns (uint256 _count) {
        return totalSupply();
    }

    function countOfDeedsByOwner(address _owner) external view returns (uint256 _count) {
        var arr = tokensOfOwner(_owner);
        return arr.length;
    }

    function deedOfOwnerByIndex(address _owner, uint256 _index) external view returns (uint256 _deedId) {
        return tokensOfOwner(_owner)[_index];
    }

    function approve(address _to, uint256 _tokenId) external payable {
        // Only an owner can grant transfer approval.
        require(_owns(msg.sender, _tokenId));

        // Register the approval (replacing any previous approval).
        monsterIndexToApproved[_tokenId] = _to;

        // Emit approval event.
        Approval(msg.sender, _to, _tokenId);
    }

    function takeOwnership(uint256 _deedId) external payable {
        transferFrom(this.ownerOf(_deedId), msg.sender, _deedId);
    }
}

contract MonsterAuctionBase {

    // Reference to contract tracking NFT ownership
    MonsterOwnership public nonFungibleContract;
    ChainMonstersCore public core;

    struct Auction {
        // current owner
        address seller;
        // price in wei
        uint256 price;
        // time when auction started
        uint64 startedAt;
        uint256 id;
    }

    // Cut owner takes on each auction, measured in basis points (1/100 of a percent).
    // Values 0-10,000 map to 0%-100%
    uint256 public ownerCut;

    // Map from token ID to their corresponding auction.
    mapping(uint256 => Auction) tokenIdToAuction;
    mapping(uint256 => address) public auctionIdToSeller;
    mapping (address => uint256) public ownershipAuctionCount;

    event AuctionCreated(uint256 tokenId, uint256 price, uint256 uID, address seller);
    event AuctionSuccessful(uint256 tokenId, uint256 price, address newOwner, uint256 uID);
    event AuctionCancelled(uint256 tokenId, uint256 uID);

    function _transfer(address _receiver, uint256 _tokenId) internal {
        // it will throw if transfer fails
        nonFungibleContract.transfer(_receiver, _tokenId);
    }

    function _addAuction(uint256 _tokenId, Auction _auction) internal {
        tokenIdToAuction[_tokenId] = _auction;

        AuctionCreated(
            uint256(_tokenId),
            uint256(_auction.price),
            uint256(_auction.id),
            address(_auction.seller)
        );
    }

    function _cancelAuction(uint256 _tokenId, address _seller) internal {
        Auction storage _auction = tokenIdToAuction[_tokenId];

        uint256 uID = _auction.id;

        _removeAuction(_tokenId);
        ownershipAuctionCount[_seller]--;
        _transfer(_seller, _tokenId);

        AuctionCancelled(_tokenId, uID);
    }

    function _buy(uint256 _tokenId, uint256 _bidAmount) internal returns (uint256) {
        Auction storage auction = tokenIdToAuction[_tokenId];

        require(_isOnAuction(auction));

        uint256 price = auction.price;
        require(_bidAmount >= price);

        address seller = auction.seller;
        uint256 uID = auction.id;

        // Auction Bid looks fine! so remove
        _removeAuction(_tokenId);

        ownershipAuctionCount[seller]--;

        if (price > 0) {
            uint256 auctioneerCut = _computeCut(price);
            uint256 sellerProceeds = price - auctioneerCut;

            // NOTE: Doing a transfer() in the middle of a complex
            // method like this is generally discouraged because of
            // reentrancy attacks and DoS attacks if the seller is
            // a contract with an invalid fallback function. We explicitly
            // guard against reentrancy attacks by removing the auction
            // before calling transfer(), and the only thing the seller
            // can DoS is the sale of their own asset! (And if it's an
            // accident, they can call cancelAuction(). )
            if (seller != address(core)) {
                seller.transfer(sellerProceeds);
            }
        }

        // Calculate any excess funds included with the bid. If the excess
        // is anything worth worrying about, transfer it back to bidder.
        // NOTE: We checked above that the bid amount is greater than or
        // equal to the price so this cannot underflow.
        uint256 bidExcess = _bidAmount - price;

        // Return the funds. Similar to the previous transfer, this is
        // not susceptible to a re-entry attack because the auction is
        // removed before any transfers occur.
        msg.sender.transfer(bidExcess);

        // Tell the world!
        AuctionSuccessful(_tokenId, price, msg.sender, uID);

        return price;
    }

    function _removeAuction(uint256 _tokenId) internal {
        delete tokenIdToAuction[_tokenId];
    }

    function _isOnAuction(Auction storage _auction) internal view returns (bool) {
        return (_auction.startedAt > 0);
    }

     function _computeCut(uint256 _price) internal view returns (uint256) {
        // NOTE: We don't use SafeMath (or similar) in this function because
        //  all of our entry functions carefully cap the maximum values for
        //  currency (at 128-bits), and ownerCut <= 10000 (see the require()
        //  statement in the ClockAuction constructor). The result of this
        //  function is always guaranteed to be <= _price.
        return _price * ownerCut / 10000;
    }
}

contract MonsterAuction is  MonsterAuctionBase, Ownable {
    bool public isMonsterAuction = true;
    uint256 public auctionIndex = 0;

    function MonsterAuction(address _nftAddress, uint256 _cut) public {
        require(_cut <= 10000);
        ownerCut = _cut;

        var candidateContract = MonsterOwnership(_nftAddress);

        nonFungibleContract = candidateContract;
        ChainMonstersCore candidateCoreContract = ChainMonstersCore(_nftAddress);
        core = candidateCoreContract;
    }

    // only possible to decrease ownerCut!
    function setOwnerCut(uint256 _cut) external onlyOwner {
        require(_cut <= ownerCut);
        ownerCut = _cut;
    }

    function _owns(address _claimant, uint256 _tokenId) internal view returns (bool) {
        return (nonFungibleContract.ownerOf(_tokenId) == _claimant);
    }

    function _escrow(address _owner, uint256 _tokenId) internal {
        // it will throw if transfer fails
        nonFungibleContract.transferFrom(_owner, this, _tokenId);
    }

    function withdrawBalance() external onlyOwner {
        uint256 balance = this.balance;
        owner.transfer(balance);
    }

    function tokensInAuctionsOfOwner(address _owner) external view returns(uint256[] auctionTokens) {
        uint256 numAuctions = ownershipAuctionCount[_owner];

        uint256[] memory result = new uint256[](numAuctions);
        uint256 totalAuctions = core.totalSupply();
        uint256 resultIndex = 0;

        uint256 auctionId;

        for (auctionId = 0; auctionId <= totalAuctions; auctionId++) {
            Auction storage auction = tokenIdToAuction[auctionId];
            if (auction.seller == _owner) {
                result[resultIndex] = auctionId;
                resultIndex++;
            }
        }

        return result;
    }

    function createAuction(uint256 _tokenId, uint256 _price, address _seller) external {
        require(_seller != address(0));
        require(_price == uint256(_price));
        require(core._isTradeable(_tokenId));
        require(_owns(msg.sender, _tokenId));

        
        _escrow(msg.sender, _tokenId);

        Auction memory auction = Auction(
            _seller,
            uint256(_price),
            uint64(now),
            uint256(auctionIndex)
        );

        auctionIdToSeller[auctionIndex] = _seller;
        ownershipAuctionCount[_seller]++;

        auctionIndex++;
        _addAuction(_tokenId, auction);
    }

    function buy(uint256 _tokenId) external payable {
        //delete auctionIdToSeller[_tokenId];
        // buy will throw if the bid or funds transfer fails
        _buy (_tokenId, msg.value);
        _transfer(msg.sender, _tokenId);
    }

    function cancelAuction(uint256 _tokenId) external {
        Auction storage auction = tokenIdToAuction[_tokenId];
        require(_isOnAuction(auction));

        address seller = auction.seller;
        require(msg.sender == seller);

        _cancelAuction(_tokenId, seller);
    }

    function getAuction(uint256 _tokenId) external view returns (address seller, uint256 price, uint256 startedAt) {
        Auction storage auction = tokenIdToAuction[_tokenId];
        require(_isOnAuction(auction));

        return (
            auction.seller,
            auction.price,
            auction.startedAt
        );
    }

    function getPrice(uint256 _tokenId) external view returns (uint256) {
        Auction storage auction = tokenIdToAuction[_tokenId];
        require(_isOnAuction(auction));
        return auction.price;
    }
}

contract ChainMonstersAuction is MonsterOwnership {
    bool lockedMonsterAuction = false;

    function setMonsterAuctionAddress(address _address) external onlyAdmin {
        require(!lockedMonsterAuction);
        MonsterAuction candidateContract = MonsterAuction(_address);

        require(candidateContract.isMonsterAuction());

        monsterAuction = candidateContract;
        lockedMonsterAuction = true;
    }

    uint256 public constant PROMO_CREATION_LIMIT = 5000;
    uint256 public constant GEN0_CREATION_LIMIT = 5000;

    // Counts the number of monster the contract owner has created.
    uint256 public promoCreatedCount;
    uint256 public gen0CreatedCount;

    // its stats are completely dependent on the spawn alghorithm
    function createPromoMonster(uint256 _mId, address _owner) external onlyAdmin {
        // during generation we have to keep in mind that we have only 10,000 tokens available
        // which have to be divided by 151 monsters, some rarer than others
        // see WhitePaper for gen0/promo monster plan
        
        // sanity check that this monster ID is actually in game yet
        require(monsterCreator.baseStats(_mId, 1) > 0);
        
        require(promoCreatedCount < PROMO_CREATION_LIMIT);

        promoCreatedCount++;

        uint8[7] memory ivs = uint8[7](monsterCreator.getGen0IVs());

        bool gender = monsterCreator.getMonsterGender();
        
        bool shiny = false;
        if (ivs[6] == 1) {
            shiny = true;
        }
        uint256 monsterId = _createMonster(0, _owner, _mId, true, gender, shiny);
        monsterIdToTradeable[monsterId] = true;

        monsterIdToIVs[monsterId] = ivs;
    }

    function createGen0Auction(uint256 _mId, uint256 price) external onlyAdmin {
         // sanity check that this monster ID is actually in game yet
        require(monsterCreator.baseStats(_mId, 1) > 0);
        
        require(gen0CreatedCount < GEN0_CREATION_LIMIT);

        uint8[7] memory ivs = uint8[7](monsterCreator.getGen0IVs());

        bool gender = monsterCreator.getMonsterGender();
        
        bool shiny = false;
        if (ivs[6] == 1) {
            shiny = true;
        }
        
        uint256 monsterId = _createMonster(0, this, _mId, true, gender, shiny);
        monsterIdToTradeable[monsterId] = true;

        _approve(monsterId, monsterAuction);

        monsterIdToIVs[monsterId] = ivs;

        monsterAuction.createAuction(monsterId, price, address(this));

        gen0CreatedCount++;
    }
}

// used during launch for world championship
// can and will be upgraded during development with new battle system!
// this is just to give players something to do and test their monsters
// also demonstrates how we can build up more mechanics on top of our locked core contract!
contract MonsterChampionship is Ownable {

    bool public isMonsterChampionship = true;

    ChainMonstersCore core;

    // list of top ten
    address[10] topTen;

    // holds the address current "world" champion
    address public currChampion;

    mapping (address => uint256) public addressToPowerlevel;
    mapping (uint256 => address) public rankToAddress;

    // try to beat every other player in the top10 with your strongest monster!
    // effectively looping through all top10 players, beating them one by one
    // and if strong enough placing your in the top10 as well
    function contestChampion(uint256 _tokenId) external {
        uint maxIndex = 9;

        // fail tx if player is already champion!
        // in theory players could increase their powerlevel by contesting themselves but
        // this check stops that from happening so other players have the chance to
        // become the temporary champion!
        if (currChampion == msg.sender) {
            revert();
        }

        require(core.isTrainer(msg.sender));
        require(core.monsterIndexToOwner(_tokenId) == msg.sender);

        uint myPowerlevel = 10; // todo add calculation method to this contract!

        // checks if this transaction is useless
        // since we can't fight against ourself!
        // also stops reentrancy attacks
        require(myPowerlevel > addressToPowerlevel[msg.sender]);

        uint myRank = 0;

        for (uint i = 0; i <= maxIndex; i++) {
            if (myPowerlevel > addressToPowerlevel[topTen[i]]) {
                // you have beaten this one so increase temporary rank
                myRank = i;

                if (myRank == maxIndex) {
                    currChampion = msg.sender;
                }
            }
        }

        addressToPowerlevel[msg.sender] = myPowerlevel;

        address[10] storage newTopTen = topTen;

        if (currChampion == msg.sender) {
            for (uint j = 0; j < maxIndex; j++) {
                // remove ourselves from this list in case
                if (newTopTen[j] == msg.sender) {
                    newTopTen[j] = 0x0;
                    break;
                }
            }
        }

        for (uint x = 0; x <= myRank; x++) {
            if (x == myRank) {
                newTopTen[x] = msg.sender;
            } else {
                if (x < maxIndex)
                    newTopTen[x] = topTen[x+1];
            }
        }

        topTen = newTopTen;
    }

    function getTopPlayers() external view returns (address[10] players) {
        players = topTen;
    }

    function MonsterChampionship(address coreContract) public {
        core = ChainMonstersCore(coreContract);
    }

    function withdrawBalance() external onlyOwner {
        uint256 balance = this.balance;
        owner.transfer(balance);
    }
}


// where the not-so-much "hidden" magic happens
contract MonsterCreatorInterface is Ownable {
    uint8 public lockedMonsterStatsCount = 0;
    uint nonce = 0;

    function rand(uint16 min, uint16 max) public returns (uint16) {
        nonce++;
        uint16 result = (uint16(keccak256(block.blockhash(block.number-1), nonce))%max);

        if (result < min) {
            result = result+min;
        }

        return result;
    }

    mapping(uint256 => uint8[8]) public baseStats;

    function addBaseStats(uint256 _mId, uint8[8] data) external onlyOwner {
        // lock" the stats down forever
        // since hp is never going to be 0 this is a valid check
        // so we have to be extra careful when adding new baseStats!
        require(data[0] > 0);
        require(baseStats[_mId][0] == 0);
        baseStats[_mId] = data;
    }

    function _addBaseStats(uint256 _mId, uint8[8] data) internal {
        baseStats[_mId] = data;
        lockedMonsterStatsCount++;
    }

    function MonsterCreatorInterface() public {
       // these monsters are already down and "locked" down stats/design wise
        _addBaseStats(1, [45, 49, 49, 65, 65, 45, 12, 4]);
        _addBaseStats(2, [60, 62, 63, 80, 80, 60, 12, 4]);
        _addBaseStats(3, [80, 82, 83, 100, 100, 80, 12, 4]);
        _addBaseStats(4, [39, 52, 43, 60, 50, 65, 10, 6]);
        _addBaseStats(5, [58, 64, 58, 80, 65, 80, 10, 6]);
        _addBaseStats(6, [78, 84, 78, 109, 85, 100, 10, 6]);
        _addBaseStats(7, [44, 48, 65, 50, 64, 43, 11, 14]);
        _addBaseStats(8, [59, 63, 80, 65, 80, 58, 11, 14]);
        _addBaseStats(9, [79, 83, 100, 85, 105, 78, 11, 14]);
        _addBaseStats(10, [40, 35, 30, 20, 20, 50, 7, 4]);

        _addBaseStats(149, [55, 50, 45, 135, 95, 120, 8, 14]);
        _addBaseStats(150, [91, 134, 95, 100, 100, 80, 2, 5]);
        _addBaseStats(151, [100, 100, 100, 100, 100, 100, 5, 19]);
    }

    // this serves as a lookup for new monsters to be generated since all monsters
    // of the same id share the base stats
    // also makes it possible to only store the monsterId on core and change this one
    // during evolution process to save gas and additional transactions
    function getMonsterStats( uint256 _mID) external constant returns(uint8[8] stats) {
        stats[0] = baseStats[_mID][0];
        stats[1] = baseStats[_mID][1];
        stats[2] = baseStats[_mID][2];
        stats[3] = baseStats[_mID][3];
        stats[4] = baseStats[_mID][4];
        stats[5] = baseStats[_mID][5];
        stats[6] = baseStats[_mID][6];
        stats[7] = baseStats[_mID][7];
    }

    function getMonsterGender () external returns(bool female) {
        uint16 femaleChance = rand(0, 100);

        if (femaleChance >= 50) {
            female = true;
        }
    }

    // generates randomized IVs for a new monster
    function getMonsterIVs() external returns(uint8[7] ivs) {
        bool shiny = false;

        uint16 chance = rand(1, 8192);

        if (chance == 42) {
            shiny = true;
        }

        // IVs range between 0 and 31
        // stat range modified for shiny monsters!
        if (shiny) {
            ivs[0] = uint8(rand(10, 31));
            ivs[1] = uint8(rand(10, 31));
            ivs[2] = uint8(rand(10, 31));
            ivs[3] = uint8(rand(10, 31));
            ivs[4] = uint8(rand(10, 31));
            ivs[5] = uint8(rand(10, 31));
            ivs[6] = 1;

        } else {
            ivs[0] = uint8(rand(0, 31));
            ivs[1] = uint8(rand(0, 31));
            ivs[2] = uint8(rand(0, 31));
            ivs[3] = uint8(rand(0, 31));
            ivs[4] = uint8(rand(0, 31));
            ivs[5] = uint8(rand(0, 31));
            ivs[6] = 0;
        }
    }

    // gen0 monsters profit from shiny boost while shiny gen0s have potentially even higher IVs!
    // further increasing the rarity by also doubling the shiny chance!
    function getGen0IVs() external returns (uint8[7] ivs) {
        bool shiny = false;

        uint16 chance = rand(1, 4096);

        if (chance == 42) {
            shiny = true;
        }

        if (shiny) {
            ivs[0] = uint8(rand(15, 31));
            ivs[1] = uint8(rand(15, 31));
            ivs[2] = uint8(rand(15, 31));
            ivs[3] = uint8(rand(15, 31));
            ivs[4] = uint8(rand(15, 31));
            ivs[5] = uint8(rand(15, 31));
            ivs[6] = 1;
        } else {
            ivs[0] = uint8(rand(10, 31));
            ivs[1] = uint8(rand(10, 31));
            ivs[2] = uint8(rand(10, 31));
            ivs[3] = uint8(rand(10, 31));
            ivs[4] = uint8(rand(10, 31));
            ivs[5] = uint8(rand(10, 31));
            ivs[6] = 0;
        }
    }

    function withdrawBalance() external onlyOwner {
        uint256 balance = this.balance;
        owner.transfer(balance);
    }
}

contract GameLogicContract {
    bool public isGameLogicContract = true;

    function GameLogicContract() public {

    }
}


contract OmegaContract {
    bool public isOmegaContract = true;

    function OmegaContract() public {

    }
}

contract ChainMonstersCore is ChainMonstersAuction, Ownable {
    // using a bool to enable us to prepare the game
    bool hasLaunched = false;

    // this address will hold future gamelogic in place
    address gameContract;

    // this contract
    address omegaContract;

    function ChainMonstersCore() public {
        adminAddress = msg.sender;

        _createArea(); // area 1
        _createArea(); // area 2
    }

    // we don't know the exact interfaces yet so use the lockedMonsterStats value to determine if the game is "ready"
    // see WhitePaper for explaination for our upgrade and development roadmap
    function setGameLogicContract(address _candidateContract) external onlyOwner {
        require(monsterCreator.lockedMonsterStatsCount() == 151);

        require(GameLogicContract(_candidateContract).isGameLogicContract());

        gameContract = _candidateContract;
    }

    function setOmegaContract(address _candidateContract) external onlyOwner {
        require(OmegaContract(_candidateContract).isOmegaContract());
        omegaContract = _candidateContract;
    }

    // omega contract takes care of all neccessary checks so assume that this is correct(!)
    function evolveMonster(uint256 _tokenId, uint16 _toMonsterId) external {
        require(msg.sender == omegaContract);

        // retrieve current monster struct
        Monster storage mon = monsters[_tokenId];

        // evolving only changes monster ID since this is responsible for base Stats
        // an evolved monster keeps its gender, generation, IVs and EVs
        mon.mID = _toMonsterId;
    }

    // only callable by gameContract after the full game is launched
    // since all additional monsters after the promo/gen0 ones need to use this coreContract
    // contract as well we have to prepare this core for our future updates where
    // players can freely roam the world and hunt ChainMonsters thus generating more
    function spawnMonster(uint256 _mId, address _owner) external {
        require(msg.sender == gameContract);

        uint8[7] memory ivs = uint8[7](monsterCreator.getMonsterIVs());

        bool gender = monsterCreator.getMonsterGender();

        bool shiny = false;
        if (ivs[6] == 1) {
            shiny = true;
        }
        
        // important to note that the IV generators do not use Gen0 methods and are Generation 1
        // this means there won't be more than the 10,000 Gen0 monsters sold during the development through the marketplace
        uint256 monsterId = _createMonster(1, _owner, _mId, false, gender, shiny);
        monsterIdToTradeable[monsterId] = true;

        monsterIdToIVs[monsterId] = ivs;
    }

    // used to add playable content to the game
    // monsters will only spawn in certain areas so some are locked on release
    // due to the game being in active development on "launch"
    // each monster has a maximum number of 3 areas where it can appear
    function createArea() public onlyAdmin {
        _createArea();
    }

    function createTrainer(string _username, uint16 _starterId) public {
        require(hasLaunched);

        // only one trainer/account per ethereum address
        require(addressToTrainer[msg.sender].owner == 0);

        // valid input check
        require(_starterId == 1 || _starterId == 2 || _starterId == 3);

        uint256 mon = _createTrainer(_username, _starterId, msg.sender);

        // due to stack limitations we have to assign the IVs here:
        monsterIdToIVs[mon] = monsterCreator.getMonsterIVs();
    }

    function changeUsername(string _name) public {
        require(addressToTrainer[msg.sender].owner == msg.sender);
        addressToTrainer[msg.sender].username = _name;
    }

    function changeMonsterNickname(uint256 _tokenId, string _name) public {
        // users won't be able to rename a monster that is part of an auction
        require(_owns(msg.sender, _tokenId));

        // some string checks...?
        monsterIdToNickname[_tokenId] = _name;
    }

    function moveToArea(uint16 _newArea) public {
        require(addressToTrainer[msg.sender].currArea > 0);

        // never allow anyone to move to area 0 or below since this is used
        // to determine if a trainer profile exists in another method!
        require(_newArea > 0);

        // make sure that this area exists yet!
        require(areas.length >= _newArea);

        // when player is not stuck doing something else he can move freely!
        _moveToArea(_newArea, msg.sender);
    }

    // to be changed to retrieve current stats!
    function getMonster(uint256 _id) external view returns (
        uint256 birthTime, uint256 generation, uint8[8] stats,
        uint256 mID, bool tradeable, uint256 uID)
    {
        Monster storage mon = monsters[_id];
        birthTime = uint256(mon.birthTime);
        generation = mon.generation; // hardcoding due to stack too deep error
        mID = uint256(mon.mID);
        tradeable = bool(mon.tradeable);

        // these values are retrieved from monsterCreator
        stats = uint8[8](monsterCreator.getMonsterStats(uint256(mon.mID)));

        // hack to overcome solidity's stack limitation in monster struct....
        uID = _id;
    }

    function isTrainer(address _check) external view returns (bool isTrainer) {
        Trainer storage trainer = addressToTrainer[_check];

        return (trainer.currArea > 0);
    }

    function withdrawBalance() external onlyOwner {
        uint256 balance = this.balance;

        owner.transfer(balance);
    }

    // after we have setup everything we can unlock the game
    // for public
    function launchGame() external onlyOwner {
        hasLaunched = true;
    }
}

Contract Security Audit

Contract ABI

[{"constant":false,"inputs":[],"name":"getGen0IVs","outputs":[{"name":"ivs","type":"uint8[7]"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"withdrawBalance","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"getMonsterGender","outputs":[{"name":"female","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"lockedMonsterStatsCount","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_mId","type":"uint256"},{"name":"data","type":"uint8[8]"}],"name":"addBaseStats","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"},{"name":"","type":"uint256"}],"name":"baseStats","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"getMonsterIVs","outputs":[{"name":"ivs","type":"uint8[7]"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"min","type":"uint16"},{"name":"max","type":"uint16"}],"name":"rand","outputs":[{"name":"","type":"uint16"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_mID","type":"uint256"}],"name":"getMonsterStats","outputs":[{"name":"stats","type":"uint8[8]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"}]

60606040526000805460a060020a60ff021916815560015534156200002357600080fd5b60008054600160a060020a03191633600160a060020a03161790556200009c60016101006040519081016040908152602d80835260316020840181905291830191909152604160608301819052608083015260a0820152600c60c0820152600460e082015264010000000062000825620004f182021704565b620000fa60026101006040519081016040908152603c808352603e6020840152603f91830191909152605060608301819052608083015260a0820152600c60c0820152600460e082015264010000000062000825620004f182021704565b6200015860036101006040519081016040908152605080835260526020840152605391830191909152606460608301819052608083015260a0820152600c60c0820152600460e082015264010000000062000825620004f182021704565b620001b4600461010060405190810160409081526027825260346020830152602b90820152603c606082015260326080820152604160a0820152600a60c0820152600660e082015264010000000062000825620004f182021704565b6200020f60056101006040519081016040908152603a80835260208301829052908201526050606082018190526041608083015260a0820152600a60c0820152600660e082015264010000000062000825620004f182021704565b6200026a60066101006040519081016040908152604e8083526054602084015290820152606d606082015260556080820152606460a0820152600a60c0820152600660e082015264010000000062000825620004f182021704565b620002c460076101006040519081016040908152602c825260306020830152604181830152603260608301526080820152602b60a0820152600b60c0820152600e60e082015264010000000062000825620004f182021704565b6200032060086101006040519081016040908152603b8252603f60208301526050908201819052604160608301526080820152603a60a0820152600b60c0820152600e60e082015264010000000062000825620004f182021704565b6200037c60096101006040519081016040908152604f8252605360208301526064908201526055606082015260696080820152604e60a0820152600b60c0820152600e60e082015264010000000062000825620004f182021704565b620003d8600a61010060405190810160409081526028825260236020830152601e908201526014606082018190526080820152603260a0820152600760c0820152600460e082015264010000000062000825620004f182021704565b62000434609561010060405190810160409081526037825260326020830152602d9082015260876060820152605f6080820152607860a0820152600860c0820152600e60e082015264010000000062000825620004f182021704565b6200049060966101006040519081016040908152605b825260866020830152605f908201526064606082018190526080820152605060a0820152600260c0820152600560e082015264010000000062000825620004f182021704565b620004eb60976101006040519081016040908152606480835260208301819052908201819052606082018190526080820181905260a0820152600560c0820152601360e082015264010000000062000825620004f182021704565b62000608565b60008281526002602052604090206200050d908260086200054a565b505060008054600160ff74010000000000000000000000000000000000000000808404821692909201160260a060020a60ff021990911617905550565b600183019183908215620005d25791602002820160005b83821115620005a157835183826101000a81548160ff021916908360ff160217905550926020019260010160208160000104928301926001030262000561565b8015620005d05782816101000a81549060ff0219169055600101602081600001049283019260010302620005a1565b505b50620005e0929150620005e4565b5090565b6200060591905b80821115620005e057805460ff19168155600101620005eb565b90565b61090a80620006186000396000f3006060604052600436106100ae5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663342ba8de81146100b35780635fd8c710146100fe5780636827b9db146101135780637afa0c661461013a5780638da5cb5b146101635780638ea0926a1461019257806391cee1fd146101aa578063a3848b1a146101c3578063afac8ed3146101d6578063c841df4f1461020d578063f2fde38b1461023e575b600080fd5b34156100be57600080fd5b6100c661025d565b604051808260e080838360005b838110156100eb5780820151838201526020016100d3565b5050505090500191505060405180910390f35b341561010957600080fd5b610111610392565b005b341561011e57600080fd5b6101266103ea565b604051901515815260200160405180910390f35b341561014557600080fd5b61014d610410565b60405160ff909116815260200160405180910390f35b341561016e57600080fd5b610176610431565b604051600160a060020a03909116815260200160405180910390f35b341561019d57600080fd5b6101116004356024610440565b34156101b557600080fd5b61014d6004356024356104a7565b34156101ce57600080fd5b6100c66104dd565b34156101e157600080fd5b6101f661ffff600435811690602435166105e5565b60405161ffff909116815260200160405180910390f35b341561021857600080fd5b610223600435610643565b604051808261010080838360008151838201526020016100d3565b341561024957600080fd5b610111600160a060020a03600435166106d8565b61026561072f565b60008061027560016110006105e5565b90508061ffff16602a141561028957600191505b81156103105761029b600f601f6105e5565b60ff1683526102ac600f601f6105e5565b60ff1660208401526102c0600f601f6105e5565b60ff1660408401526102d4600f601f6105e5565b60ff1660608401526102e8600f601f6105e5565b60ff1660808401526102fc600f601f6105e5565b60ff1660a0840152600160c084015261038d565b61031c600a601f6105e5565b60ff16835261032d600a601f6105e5565b60ff166020840152610341600a601f6105e5565b60ff166040840152610355600a601f6105e5565b60ff166060840152610369600a601f6105e5565b60ff16608084015261037d600a601f6105e5565b60ff1660a0840152600060c08401525b505090565b6000805433600160a060020a039081169116146103ae57600080fd5b50600054600160a060020a0330811631911681156108fc0282604051600060405180830381858888f1935050505015156103e757600080fd5b50565b6000806103f9600060646105e5565b9050603261ffff82161061040c57600191505b5090565b60005474010000000000000000000000000000000000000000900460ff1681565b600054600160a060020a031681565b60005433600160a060020a0390811691161461045b57600080fd5b600060ff8235161161046c57600080fd5b60008281526002602052604090205460ff161561048857600080fd5b60008281526002602052604090206104a290826008610757565b505050565b600260205260008281526040902081600881106104c057fe5b60209182820401919006915091509054906101000a900460ff1681565b6104e561072f565b6000806104f560016120006105e5565b90508061ffff16602a141561050957600191505b811561057c5761051b600a601f6105e5565b60ff16835261052c600a601f6105e5565b60ff166020840152610540600a601f6105e5565b60ff166040840152610554600a601f6105e5565b60ff166060840152610568600a601f6105e5565b60ff1660808401526102fc600a601f6105e5565b6105886000601f6105e5565b60ff1683526105996000601f6105e5565b60ff1660208401526105ad6000601f6105e5565b60ff1660408401526105c16000601f6105e5565b60ff1660608401526105d56000601f6105e5565b60ff16608084015261037d6000601f5b60018054810190819055600090819061ffff8416906000194301409060405191825260208201526040908101905190819003902061ffff1681151561062657fe5b0690508361ffff168161ffff16101561063c5783015b9392505050565b61064b6107e9565b60008281526002602081815260408084205460ff808216875261010082048116878501526201000082048116928701929092526301000000810482166060870152640100000000810482166080870152650100000000008104821660a087015266010000000000008104821660c0870152959093525267010000000000000090920490911660e082015290565b60005433600160a060020a039081169116146106f357600080fd5b600160a060020a038116156103e75760008054600160a060020a03831673ffffffffffffffffffffffffffffffffffffffff1990911617905550565b60e06040519081016040526007815b60008152600019909101906020018161073e5790505090565b6001830191839082156107dd5791602002820160005b838211156107ae57833560ff1683826101000a81548160ff021916908360ff160217905550926020019260010160208160000104928301926001030261076d565b80156107db5782816101000a81549060ff02191690556001016020816000010492830192600103026107ae565b505b5061040c929150610804565b6101006040519081016040526000815260076020820161073e565b61082291905b8082111561040c57805460ff1916815560010161080a565b90565b600082815260026020526040902061083f9082600861088a565b505060008054600160ff74010000000000000000000000000000000000000000808404821692909201160274ff00000000000000000000000000000000000000001990911617905550565b6001830191839082156107dd5791602002820160005b838211156107ae57835183826101000a81548160ff021916908360ff16021790555092602001926001016020816000010492830192600103026108a05600a165627a7a72305820f2f94574b14eb10e0d03e79a6be09a3334475fdcf5b346b2aa6e719acb9f2fd10029

Swarm Source

bzzr://f2f94574b14eb10e0d03e79a6be09a3334475fdcf5b346b2aa6e719acb9f2fd1
Block Transaction Difficulty Gas Used Reward
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.