Contract 0xbd4b50bbf385195c410a625681ff29d439ba61f3

 

Contract Overview

Etheremon_Trade2
Balance:
0.19995535 Ether

EtherValue:
$25.36 (@ $126.82/ETH)
TxHash Block Age From To Value [TxFee]
0x98a1e81109811698a2e594a6a87506f14642c00d4cd2e77fa7a58d7841cc0a79(pending)24 mins ago0x0f76962a1064a5d7b1da01c2d8f903c1878d88f6  IN  0xbd4b50bbf385195c410a625681ff29d439ba61f30 Ether(Pending)
0xede07467a07ee434a9351a09cd2e24704c7971ae9ac01a766667688b55b3f70f(pending)12 hrs 56 mins ago0x1604b0f5fd6798d8b67f256e55bd6a1539c64f85  IN  0xbd4b50bbf385195c410a625681ff29d439ba61f30 Ether(Pending)
0x55f89bbe518a2d4d5d20667bc58ed2bba494abf66b3e7dfc48f65917cb8534ec72322791 hr 20 mins ago0x8253fece15c38abe4c67fe3301e4be471ee9a1dc  IN   Etheremon_Trade20 Ether0.00040101
0xb17f5cbb0c5081f529006f7dacf4172b4afb026f1fd565ae90189fce9185e88972322771 hr 20 mins ago0x8253fece15c38abe4c67fe3301e4be471ee9a1dc  IN   Etheremon_Trade20 Ether0.000401202
0xfa53d44edb1245a377ced8934b2bd7e7a0c7525c9747cc7fee716823565f92d672320042 hrs 52 mins ago0xb8a30df5e4b9e588ea920e6d8de7d99c2ac0f058  IN   Etheremon_Trade20 Ether0.000174065
0x5108a8dc421940fe6524550f9513b9fb2c60b94676d0f4d1faf6e3c1514b4ddc72318273 hrs 47 mins ago0xbe356d2fa2e47ee2a716a4bd08c80af36af70b37  IN   Etheremon_Trade20 Ether0.00080202
0xe1eb8a2ad0a5548617fb1a54e687a362044c4730efbaaffd0448b81a6bca1b5272318193 hrs 50 mins ago0x2fef65e4d69a38bf0dd074079f367cdf176ec0de  IN   Etheremon_Trade20 Ether0.00066835
0x2ad665069f40ee883b152c31d754fac220bb3d5a800d5cee6f0421ab61b44c1072315845 hrs 13 mins ago0xafcca1c3ab0cdae459de987b98604f0e3ca2c39f  IN   Etheremon_Trade20 Ether0.000278504
0xed554de3c075933e57928d206554a3ba8e793d4c62181b3ed70ee961ec0ba03c72315835 hrs 13 mins ago0xb61ce2b4347bf9a028611f98dbdc8658a47457a2  IN   Etheremon_Trade20 Ether0.00034813
0x8f824792addf8301f18e30df2e5b9b0a234a847e7221423ea9d308a58b3c258072315805 hrs 15 mins ago0xafcca1c3ab0cdae459de987b98604f0e3ca2c39f  IN   Etheremon_Trade20 Ether0.000278504
0x237abc82a3f5e8c0d9e8664e94585d762bf4e16205244a36cb2974fbef32e51872315775 hrs 16 mins ago0xafcca1c3ab0cdae459de987b98604f0e3ca2c39f  IN   Etheremon_Trade20 Ether0.000278504
0x3a68b4bd65f98d09cc0f71506820ddaa6d0c8bcf09d595b65f1c701e56df81d272314466 hrs 5 mins ago0xf467aa729236c24a415679bf62150fd61e229409  IN   Etheremon_Trade20 Ether0.00066867
0x968671776ff3bc9f0aa900f98ad20eac36c1bf9f953cc2ed93f78f61b7cdc21f72314306 hrs 10 mins ago0x391939867c24924b7dce21c05bebc609b37e9eb1  IN   Etheremon_Trade20 Ether0.000139252
0x3f12b1341bb9aab76eab7db83c23edffb7cc5c64ca8a424782b4155bac7f8f5a72314206 hrs 14 mins ago0x391939867c24924b7dce21c05bebc609b37e9eb1  IN   Etheremon_Trade20 Ether0.00075189375
0xc1c35e4fdfd14a8b891c2cf5fbfb772a2e12edb89e12448a16c28ef52671208372313416 hrs 41 mins ago0x9fb0065cf636a2bd2ff0e6c95763a73e9d1df5d3  IN   Etheremon_Trade20 Ether0.000401202
0x3e06ae29b265edeab4b2db59c8b67802556c552a0c65a07ca44650932e57880072313416 hrs 41 mins ago0x391939867c24924b7dce21c05bebc609b37e9eb1  IN   Etheremon_Trade20 Ether0.000174065
0xf382e8ced51a368960704784688a6184fd09ec62cbe4008664708cfefbba9c2972313186 hrs 50 mins ago0x9fb0065cf636a2bd2ff0e6c95763a73e9d1df5d3  IN   Etheremon_Trade20 Ether0.000139252
0x89dd2f36637701dfb048e0f262e7cc4219d8ace71cf2c619b94c944a299224b272313146 hrs 52 mins ago0xafcca1c3ab0cdae459de987b98604f0e3ca2c39f  IN   Etheremon_Trade20 Ether0.00066867
0xe54c55376dea932052b46f16af26f2748930ff557c10382b042f10e9c7aa26e972313126 hrs 53 mins ago0xf467aa729236c24a415679bf62150fd61e229409  IN   Etheremon_Trade20 Ether0.00066867
0x2789749c2aa9991d28b588d7bee3648653f4ff812854fe9e56e69af01215cd8172313126 hrs 53 mins ago0xafcca1c3ab0cdae459de987b98604f0e3ca2c39f  IN   Etheremon_Trade20 Ether0.00066867
0x3dcfa89a8a020644a513408a499899beb2122b20315c8c3b394f9369f55634cc72313126 hrs 53 mins ago0xafcca1c3ab0cdae459de987b98604f0e3ca2c39f  IN   Etheremon_Trade20 Ether0.00066867
0x6dc66a3f3960bd30c489151ab74cb660562e2d7aa2ad1bb0c23a16bae7baca1d72313086 hrs 54 mins ago0xf467aa729236c24a415679bf62150fd61e229409  IN   Etheremon_Trade20 Ether0.000174065
0x545f16385c0958d3c3e6e5a1c99cec6489255a9aeed580bcac5e48a6d51cbdda72313076 hrs 55 mins ago0xdc74d3d9f85a82c72e9513619cadf6b6e0366ce2  IN   Etheremon_Trade20 Ether0.00066867
0x47b04c9cdfc7cb311d64e007ef1d0fd8148386a45d9504e8b27178cfc21d29ac72312976 hrs 58 mins ago0xf467aa729236c24a415679bf62150fd61e229409  IN   Etheremon_Trade20 Ether0.000174065
0x8595c83e8002f290d8ea4eb8dae7b3642fc88a5ecc7685f1989823d9fc25e23972312817 hrs 4 mins ago0xdc74d3d9f85a82c72e9513619cadf6b6e0366ce2  IN   Etheremon_Trade20 Ether0.000174065
[ Download CSV Export 

Latest 25 Internal Transaction, Click here to view more Internal Transactions as a result of Contract Execution

Parent TxHash Block Age From To Value
0xa01aa54158901cb236055192dae562861f63f00fe7653cf61f8c535eb13be785723072010 hrs 20 mins ago0xbd4b50bbf385195c410a625681ff29d439ba61f30x391939867c24924b7dce21c05bebc609b37e9eb10.0873 Ether
0xfee4908931429ac55f2637259a1552d2942ae484517db2ce64138d9157d1dc78722942117 hrs 45 mins ago0xbd4b50bbf385195c410a625681ff29d439ba61f30xb9a4dca69b6907483d6c04ea5d1283292267a9e90.1164 Ether
0xce1320a4e23c2486a9efde764bc99351277adf6cbcf778d8f8b8ece22a11820b722930518 hrs 25 mins ago0xbd4b50bbf385195c410a625681ff29d439ba61f30x2e0ce20ab9c3227c48db076a95ccd1ed13ae3a150.01164 Ether
0xeb6a6a24c504753143da53f366ee3d81714cfeb51b4bdd9eddc2c103404a1374722850722 hrs 58 mins ago0xbd4b50bbf385195c410a625681ff29d439ba61f30x25eb699c5d92874dceacf42b3b97a8f796c8389d0.009215 Ether
0x5fa990a4f9f836d59f7e211222fe0be8d8d695f3df2148d75b632e6fb50c0cd0722850522 hrs 59 mins ago0xbd4b50bbf385195c410a625681ff29d439ba61f30x1c832dd1b92c9385dd0bdc50a7fb29b433dc495d0.00776 Ether
0x18d6e61180ebb0b28497bb03d0ef08346928e7b76c716aa2ecef34e631983f24722850522 hrs 59 mins ago0xbd4b50bbf385195c410a625681ff29d439ba61f30xf98a39456903cfde206603bdd1e1d4227dbe12430.0097 Ether
0xe3355106f14b90543d12e52295b90a4a277d26f18acb7139262b23880cf0c33672279361 day 2 hrs ago0xbd4b50bbf385195c410a625681ff29d439ba61f30xb5db6cb03cedec9d03b41d0d55ce5ad55c92732d0.005626 Ether
0xee06a4ba55aba0d027a356b1391bbccc27e9d363c9fc504f0aeedfb31bc77e2f72279201 day 2 hrs ago0xbd4b50bbf385195c410a625681ff29d439ba61f30xa9a4aa445810c7491cb5bdce0ac29db76381d6990.00485 Ether
0x0938f79a2abe19c8e39ed6b11224ffc903a0e22026b364d2940d33572efea56272279091 day 2 hrs ago0xbd4b50bbf385195c410a625681ff29d439ba61f30xa6fe83dcf28cc982818656ba680e03416824d5e40.00388 Ether
0xde59fe9b2cd56e3f168a878bac9127b4d2e0646b139bd84d12c059457e7ed1f772273471 day 5 hrs ago0xbd4b50bbf385195c410a625681ff29d439ba61f30x372693d494d554e37dbbc5d0768ecff0ba15a02e0.0679 Ether
0xa9f8f8e428d6933c4eabbae823d0e942c474f13acea0740b185222286cdded6072272791 day 5 hrs ago0xbd4b50bbf385195c410a625681ff29d439ba61f30xf796b8fb98c7c98fd4b5424ced013820d1f2ee760.5529 Ether
0x6b43b83111376245edaaf755017d75d3cdd05cc1b6c9cd8c3fdf04b49bf8572672272461 day 6 hrs ago0xbd4b50bbf385195c410a625681ff29d439ba61f30x49aad95cc1cb1ec051e7e102aa71a8fc918dbdd30.08245 Ether
0x229387990f863122003acafd2dbe382ef812148d457be51284bab65537a1e3f972272451 day 6 hrs ago0xbd4b50bbf385195c410a625681ff29d439ba61f30x0f76962a1064a5d7b1da01c2d8f903c1878d88f60.1455 Ether
0xf55ba0043036dfcf49fc81c2ca96a833f411fed274bcf2b2411c7d18e4c81ced72272431 day 6 hrs ago0xbd4b50bbf385195c410a625681ff29d439ba61f30x0f76962a1064a5d7b1da01c2d8f903c1878d88f60.14453 Ether
0xf924394f5a98467231ac16c530eb5ae540b8580fca38f11e4cfbf5a5daf14b5d72272061 day 6 hrs ago0xbd4b50bbf385195c410a625681ff29d439ba61f30x1604b0f5fd6798d8b67f256e55bd6a1539c64f850.1261 Ether
0xf7c43f49e8816759bace71e03b5ff7b38cc4a0804e2fe174c258319c77e4543672271951 day 6 hrs ago0xbd4b50bbf385195c410a625681ff29d439ba61f30x2de07e2589e1105bad6278531492ba962776d0fd0.02716 Ether
0xab1e2b3aec280147d0c7dfd8830b2717de2fed575b1e1543df5a88d7f11b8cbb72271451 day 6 hrs ago0xbd4b50bbf385195c410a625681ff29d439ba61f30xd768daff5aeffc055d334b5f4db1bf401a84d12e0.0194 Ether
0x8602892f8db227dc3136a19cb1b6b92af92ae0710fd6a9c40012e693b3fe8f7272271311 day 6 hrs ago0xbd4b50bbf385195c410a625681ff29d439ba61f30x946e985c5088e1cdf162e34954a39cd7404a30460.01455 Ether
0xc4788f42bf41e22e9e44bfcd12af6ccaa29c6332f57503667274e6c6eea6cc7972271271 day 6 hrs ago0xbd4b50bbf385195c410a625681ff29d439ba61f30x1c832dd1b92c9385dd0bdc50a7fb29b433dc495d0.01164 Ether
0x533670f42dfc53205c2b9cf45ad82ccd0767460dda6fc276ac23fca527a8310172270051 day 7 hrs ago0xbd4b50bbf385195c410a625681ff29d439ba61f30x02f7d4a989dc50aae5ee89f3e435199bdf4695d60.2425 Ether
0x887cbbc0940d6b53a4211c8d16bbc74d65f5489f19d0791c2150b941e60db69f72267541 day 8 hrs ago0xbd4b50bbf385195c410a625681ff29d439ba61f30xfa7b07b6de964d022c832f20ced2dac16384b7aa0.002813 Ether
0x58a2850598d7bb6d3f5fc44e6b535354bce746b198006408061fccf6b07f418b72267521 day 8 hrs ago0xbd4b50bbf385195c410a625681ff29d439ba61f30xa6fe83dcf28cc982818656ba680e03416824d5e40.003201 Ether
0xf2c7164765f7f2ca8937b736181b9a32f7e1324888283c93589ed6e64b727fac72267511 day 8 hrs ago0xbd4b50bbf385195c410a625681ff29d439ba61f30xeeb5e091f35668a2145595555f9cc67d46f964a80.004268 Ether
0xf97320026570d622d04b584b1faa1ec1da1701bb75286f5d0283d05b4bcbf0cb72264381 day 10 hrs ago0xbd4b50bbf385195c410a625681ff29d439ba61f30x0d88f5f9711834dfcaa83a2be9dd960fb718eae70.00388 Ether
0xbc81d3c2d24851dbccd08ab35b140fb0e826c2f53b0f6fabf09291cebb969a3372254221 day 16 hrs ago0xbd4b50bbf385195c410a625681ff29d439ba61f30x5f265e7459e7f7a9baf05e3d7f03447bcde99d120.02813 Ether
[ Download CSV Export 
Warning: The compiled contract might be susceptible to ExpExponentCleanup (medium/high-severity), EventStructWrongData (very low-severity), NestedArrayFunctionCallDecoder (medium-severity) Solidity Compiler Bugs.

Contract Source Code Verified (Exact Match)
Contract Name: EtheremonTrade
Compiler Version: v0.4.19+commit.c4cbbb05
Optimization Enabled: Yes
Runs (Optimizer):  200


Contract Source Code
pragma solidity ^0.4.16;

// copyright [email protected]

contract SafeMath {

    /* function assert(bool assertion) internal { */
    /*   if (!assertion) { */
    /*     throw; */
    /*   } */
    /* }      // assert no longer needed once solidity is on 0.4.10 */

    function safeAdd(uint256 x, uint256 y) pure internal returns(uint256) {
      uint256 z = x + y;
      assert((z >= x) && (z >= y));
      return z;
    }

    function safeSubtract(uint256 x, uint256 y) pure internal returns(uint256) {
      assert(x >= y);
      uint256 z = x - y;
      return z;
    }

    function safeMult(uint256 x, uint256 y) pure internal returns(uint256) {
      uint256 z = x * y;
      assert((x == 0)||(z/x == y));
      return z;
    }

}

contract BasicAccessControl {
    address public owner;
    // address[] public moderators;
    uint16 public totalModerators = 0;
    mapping (address => bool) public moderators;
    bool public isMaintaining = false;

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

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

    modifier onlyModerators() {
        require(msg.sender == owner || moderators[msg.sender] == true);
        _;
    }

    modifier isActive {
        require(!isMaintaining);
        _;
    }

    function ChangeOwner(address _newOwner) onlyOwner public {
        if (_newOwner != address(0)) {
            owner = _newOwner;
        }
    }


    function AddModerator(address _newModerator) onlyOwner public {
        if (moderators[_newModerator] == false) {
            moderators[_newModerator] = true;
            totalModerators += 1;
        }
    }
    
    function RemoveModerator(address _oldModerator) onlyOwner public {
        if (moderators[_oldModerator] == true) {
            moderators[_oldModerator] = false;
            totalModerators -= 1;
        }
    }

    function UpdateMaintaining(bool _isMaintaining) onlyOwner public {
        isMaintaining = _isMaintaining;
    }
}

contract EtheremonEnum {

    enum ResultCode {
        SUCCESS,
        ERROR_CLASS_NOT_FOUND,
        ERROR_LOW_BALANCE,
        ERROR_SEND_FAIL,
        ERROR_NOT_TRAINER,
        ERROR_NOT_ENOUGH_MONEY,
        ERROR_INVALID_AMOUNT,
        ERROR_OBJ_NOT_FOUND,
        ERROR_OBJ_INVALID_OWNERSHIP
    }
    
    enum ArrayType {
        CLASS_TYPE,
        STAT_STEP,
        STAT_START,
        STAT_BASE,
        OBJ_SKILL
    }
}

contract EtheremonDataBase is EtheremonEnum, BasicAccessControl, SafeMath {
    
    uint64 public totalMonster;
    uint32 public totalClass;
    
    // write
    function addElementToArrayType(ArrayType _type, uint64 _id, uint8 _value) onlyModerators public returns(uint);
    function removeElementOfArrayType(ArrayType _type, uint64 _id, uint8 _value) onlyModerators public returns(uint);
    function setMonsterClass(uint32 _classId, uint256 _price, uint256 _returnPrice, bool _catchable) onlyModerators public returns(uint32);
    function addMonsterObj(uint32 _classId, address _trainer, string _name) onlyModerators public returns(uint64);
    function setMonsterObj(uint64 _objId, string _name, uint32 _exp, uint32 _createIndex, uint32 _lastClaimIndex) onlyModerators public;
    function increaseMonsterExp(uint64 _objId, uint32 amount) onlyModerators public;
    function decreaseMonsterExp(uint64 _objId, uint32 amount) onlyModerators public;
    function removeMonsterIdMapping(address _trainer, uint64 _monsterId) onlyModerators public;
    function addMonsterIdMapping(address _trainer, uint64 _monsterId) onlyModerators public;
    function clearMonsterReturnBalance(uint64 _monsterId) onlyModerators public returns(uint256 amount);
    function collectAllReturnBalance(address _trainer) onlyModerators public returns(uint256 amount);
    function transferMonster(address _from, address _to, uint64 _monsterId) onlyModerators public returns(ResultCode);
    function addExtraBalance(address _trainer, uint256 _amount) onlyModerators public returns(uint256);
    function deductExtraBalance(address _trainer, uint256 _amount) onlyModerators public returns(uint256);
    function setExtraBalance(address _trainer, uint256 _amount) onlyModerators public;
    
    // read
    function getSizeArrayType(ArrayType _type, uint64 _id) constant public returns(uint);
    function getElementInArrayType(ArrayType _type, uint64 _id, uint _index) constant public returns(uint8);
    function getMonsterClass(uint32 _classId) constant public returns(uint32 classId, uint256 price, uint256 returnPrice, uint32 total, bool catchable);
    function getMonsterObj(uint64 _objId) constant public returns(uint64 objId, uint32 classId, address trainer, uint32 exp, uint32 createIndex, uint32 lastClaimIndex, uint createTime);
    function getMonsterName(uint64 _objId) constant public returns(string name);
    function getExtraBalance(address _trainer) constant public returns(uint256);
    function getMonsterDexSize(address _trainer) constant public returns(uint);
    function getMonsterObjId(address _trainer, uint index) constant public returns(uint64);
    function getExpectedBalance(address _trainer) constant public returns(uint256);
    function getMonsterReturn(uint64 _objId) constant public returns(uint256 current, uint256 total);
}

interface EtheremonBattleInterface {
    function isOnBattle(uint64 _objId) constant external returns(bool) ;
}

interface EtheremonMonsterNFTInterface {
   function triggerTransferEvent(address _from, address _to, uint _tokenId) external;
   function getMonsterCP(uint64 _monsterId) constant external returns(uint cp);
}

contract EtheremonTradeData is BasicAccessControl {
    struct BorrowItem {
        uint index;
        address owner;
        address borrower;
        uint price;
        bool lent;
        uint releaseTime;
        uint createTime;
    }
    
    struct SellingItem {
        uint index;
        uint price;
        uint createTime;
    }

    mapping(uint => SellingItem) public sellingDict; // monster id => item
    uint[] public sellingList; // monster id
    
    mapping(uint => BorrowItem) public borrowingDict;
    uint[] public borrowingList;

    mapping(address => uint[]) public lendingList;
    
    function removeSellingItem(uint _itemId) onlyModerators external {
        SellingItem storage item = sellingDict[_itemId];
        if (item.index == 0)
            return;
        
        if (item.index <= sellingList.length) {
            // Move an existing element into the vacated key slot.
            sellingDict[sellingList[sellingList.length-1]].index = item.index;
            sellingList[item.index-1] = sellingList[sellingList.length-1];
            sellingList.length -= 1;
            delete sellingDict[_itemId];
        }
    }
    
    function addSellingItem(uint _itemId, uint _price, uint _createTime) onlyModerators external {
        SellingItem storage item = sellingDict[_itemId];
        item.price = _price;
        item.createTime = _createTime;
        
        if (item.index == 0) {
            item.index = ++sellingList.length;
            sellingList[item.index - 1] = _itemId;
        }
    }
    
    function removeBorrowingItem(uint _itemId) onlyModerators external {
        BorrowItem storage item = borrowingDict[_itemId];
        if (item.index == 0)
            return;
        
        if (item.index <= borrowingList.length) {
            // Move an existing element into the vacated key slot.
            borrowingDict[borrowingList[borrowingList.length-1]].index = item.index;
            borrowingList[item.index-1] = borrowingList[borrowingList.length-1];
            borrowingList.length -= 1;
            delete borrowingDict[_itemId];
        }
    }

    function addBorrowingItem(address _owner, uint _itemId, uint _price, address _borrower, bool _lent, uint _releaseTime, uint _createTime) onlyModerators external {
        BorrowItem storage item = borrowingDict[_itemId];
        item.owner = _owner;
        item.borrower = _borrower;
        item.price = _price;
        item.lent = _lent;
        item.releaseTime = _releaseTime;
        item.createTime = _createTime;
        
        if (item.index == 0) {
            item.index = ++borrowingList.length;
            borrowingList[item.index - 1] = _itemId;
        }
    }
    
    function addItemLendingList(address _trainer, uint _objId) onlyModerators external {
        lendingList[_trainer].push(_objId);
    }
    
    function removeItemLendingList(address _trainer, uint _objId) onlyModerators external {
        uint foundIndex = 0;
        uint[] storage objList = lendingList[_trainer];
        for (; foundIndex < objList.length; foundIndex++) {
            if (objList[foundIndex] == _objId) {
                break;
            }
        }
        if (foundIndex < objList.length) {
            objList[foundIndex] = objList[objList.length-1];
            delete objList[objList.length-1];
            objList.length--;
        }
    }

    // read access
    function isOnBorrow(uint _objId) constant external returns(bool) {
        return (borrowingDict[_objId].index > 0);
    }
    
    function isOnSell(uint _objId) constant external returns(bool) {
        return (sellingDict[_objId].index > 0);
    }
    
    function isOnLent(uint _objId) constant external returns(bool) {
        return borrowingDict[_objId].lent;
    }
    
    function getSellPrice(uint _objId) constant external returns(uint) {
        return sellingDict[_objId].price;
    }
    
    function isOnTrade(uint _objId) constant external returns(bool) {
        return ((borrowingDict[_objId].index > 0) || (sellingDict[_objId].index > 0)); 
    }
    
    function getBorrowBasicInfo(uint _objId) constant external returns(address owner, bool lent) {
        BorrowItem storage borrowItem = borrowingDict[_objId];
        return (borrowItem.owner, borrowItem.lent);
    }
    
    function getBorrowInfo(uint _objId) constant external returns(uint index, address owner, address borrower, uint price, bool lent, uint createTime, uint releaseTime) {
        BorrowItem storage borrowItem = borrowingDict[_objId];
        return (borrowItem.index, borrowItem.owner, borrowItem.borrower, borrowItem.price, borrowItem.lent, borrowItem.createTime, borrowItem.releaseTime);
    }
    
    function getSellInfo(uint _objId) constant external returns(uint index, uint price, uint createTime) {
        SellingItem storage item = sellingDict[_objId];
        return (item.index, item.price, item.createTime);
    }
    
    function getTotalSellingItem() constant external returns(uint) {
        return sellingList.length;
    }
    
    function getTotalBorrowingItem() constant external returns(uint) {
        return borrowingList.length;
    }
    
    function getTotalLendingItem(address _trainer) constant external returns(uint) {
        return lendingList[_trainer].length;
    }
    
    function getSellingInfoByIndex(uint _index) constant external returns(uint objId, uint price, uint createTime) {
        objId = sellingList[_index];
        SellingItem storage item = sellingDict[objId];
        price = item.price;
        createTime = item.createTime;
    }
    
    function getBorrowInfoByIndex(uint _index) constant external returns(uint objId, address owner, address borrower, uint price, bool lent, uint createTime, uint releaseTime) {
        objId = borrowingList[_index];
        BorrowItem storage borrowItem = borrowingDict[objId];
        return (objId, borrowItem.owner, borrowItem.borrower, borrowItem.price, borrowItem.lent, borrowItem.createTime, borrowItem.releaseTime);
    }
    
    function getLendingObjId(address _trainer, uint _index) constant external returns(uint) {
        return lendingList[_trainer][_index];
    }
    
    function getLendingInfo(address _trainer, uint _index) constant external returns(uint objId, address owner, address borrower, uint price, bool lent, uint createTime, uint releaseTime) {
        objId = lendingList[_trainer][_index];
        BorrowItem storage borrowItem = borrowingDict[objId];
        return (objId, borrowItem.owner, borrowItem.borrower, borrowItem.price, borrowItem.lent, borrowItem.createTime, borrowItem.releaseTime);
    }
    
    function getTradingInfo(uint _objId) constant external returns(uint sellingPrice, uint lendingPrice, bool lent, uint releaseTime, address owner, address borrower) {
        SellingItem storage item = sellingDict[_objId];
        sellingPrice = item.price;
        BorrowItem storage borrowItem = borrowingDict[_objId];
        lendingPrice = borrowItem.price;
        lent = borrowItem.lent;
        releaseTime = borrowItem.releaseTime;
        owner = borrowItem.owner;
        borrower = borrower;
    }
}

contract EtheremonTrade is EtheremonEnum, BasicAccessControl, SafeMath {
    
    uint8 constant public GEN0_NO = 24;

    struct MonsterClassAcc {
        uint32 classId;
        uint256 price;
        uint256 returnPrice;
        uint32 total;
        bool catchable;
    }

    struct MonsterObjAcc {
        uint64 monsterId;
        uint32 classId;
        address trainer;
        string name;
        uint32 exp;
        uint32 createIndex;
        uint32 lastClaimIndex;
        uint createTime;
    }
    
    // Gen0 has return price & no longer can be caught when this contract is deployed
    struct Gen0Config {
        uint32 classId;
        uint256 originalPrice;
        uint256 returnPrice;
        uint32 total; // total caught (not count those from eggs)
    }
    
    struct BorrowItem {
        uint index;
        address owner;
        address borrower;
        uint price;
        bool lent;
        uint releaseTime;
        uint createTime;
    }
    
    // data contract
    address public dataContract;
    address public battleContract;
    address public tradingMonDataContract;
    address public monsterNFTContract;
    
    mapping(uint32 => Gen0Config) public gen0Config;
    
    // trading fee
    uint16 public tradingFeePercentage = 3;
    
    // event
    event EventPlaceSellOrder(address indexed seller, uint objId, uint price);
    event EventRemoveSellOrder(address indexed seller, uint objId);
    event EventCompleteSellOrder(address indexed seller, address indexed buyer, uint objId, uint price);
    event EventOfferBorrowingItem(address indexed lender, uint objId, uint price, uint releaseTime);
    event EventRemoveOfferBorrowingItem(address indexed lender, uint objId);
    event EventAcceptBorrowItem(address indexed lender, address indexed borrower, uint objId, uint price);
    event EventGetBackItem(address indexed lender, address indexed borrower, uint objId);
    
    // constructor
    function EtheremonTrade(address _dataContract, address _battleContract, address _tradingMonDataContract, address _monsterNFTContract) public {
        dataContract = _dataContract;
        battleContract = _battleContract;
        tradingMonDataContract = _tradingMonDataContract;
        monsterNFTContract = _monsterNFTContract;
    }
    
     // admin & moderators
    function setOriginalPriceGen0() onlyModerators public {
        gen0Config[1] = Gen0Config(1, 0.3 ether, 0.003 ether, 374);
        gen0Config[2] = Gen0Config(2, 0.3 ether, 0.003 ether, 408);
        gen0Config[3] = Gen0Config(3, 0.3 ether, 0.003 ether, 373);
        gen0Config[4] = Gen0Config(4, 0.2 ether, 0.002 ether, 437);
        gen0Config[5] = Gen0Config(5, 0.1 ether, 0.001 ether, 497);
        gen0Config[6] = Gen0Config(6, 0.3 ether, 0.003 ether, 380); 
        gen0Config[7] = Gen0Config(7, 0.2 ether, 0.002 ether, 345);
        gen0Config[8] = Gen0Config(8, 0.1 ether, 0.001 ether, 518); 
        gen0Config[9] = Gen0Config(9, 0.1 ether, 0.001 ether, 447);
        gen0Config[10] = Gen0Config(10, 0.2 ether, 0.002 ether, 380); 
        gen0Config[11] = Gen0Config(11, 0.2 ether, 0.002 ether, 354);
        gen0Config[12] = Gen0Config(12, 0.2 ether, 0.002 ether, 346);
        gen0Config[13] = Gen0Config(13, 0.2 ether, 0.002 ether, 351); 
        gen0Config[14] = Gen0Config(14, 0.2 ether, 0.002 ether, 338);
        gen0Config[15] = Gen0Config(15, 0.2 ether, 0.002 ether, 341);
        gen0Config[16] = Gen0Config(16, 0.35 ether, 0.0035 ether, 384);
        gen0Config[17] = Gen0Config(17, 1 ether, 0.01 ether, 305); 
        gen0Config[18] = Gen0Config(18, 0.1 ether, 0.001 ether, 427);
        gen0Config[19] = Gen0Config(19, 1 ether, 0.01 ether, 304);
        gen0Config[20] = Gen0Config(20, 0.4 ether, 0.05 ether, 82);
        gen0Config[21] = Gen0Config(21, 1, 1, 123);
        gen0Config[22] = Gen0Config(22, 0.2 ether, 0.001 ether, 468);
        gen0Config[23] = Gen0Config(23, 0.5 ether, 0.0025 ether, 302);
        gen0Config[24] = Gen0Config(24, 1 ether, 0.005 ether, 195);
    }
    
    function setContract(address _dataContract, address _battleContract, address _tradingMonDataContract, address _monsterNFTContract) onlyModerators public {
        dataContract = _dataContract;
        battleContract = _battleContract;
        tradingMonDataContract = _tradingMonDataContract;
        monsterNFTContract = _monsterNFTContract;
    }
    
    function updateConfig(uint16 _fee) onlyModerators public {
        tradingFeePercentage = _fee;
    }
    
    function withdrawEther(address _sendTo, uint _amount) onlyModerators public {
        // no user money is kept in this contract, only trasaction fee
        if (_amount > this.balance) {
            revert();
        }
        _sendTo.transfer(_amount);
    }

    function _triggerNFTEvent(address _from, address _to, uint _objId) internal {
        EtheremonMonsterNFTInterface monsterNFT = EtheremonMonsterNFTInterface(monsterNFTContract);
        monsterNFT.triggerTransferEvent(_from, _to, _objId);
    }
    
    // public
    function placeSellOrder(uint _objId, uint _price) isActive external {
        if (_price == 0)
            revert();
        
        // not on borrowing
        EtheremonTradeData monTradeData = EtheremonTradeData(tradingMonDataContract);
        if (monTradeData.isOnBorrow(_objId))
            revert();

        // not on battle 
        EtheremonBattleInterface battle = EtheremonBattleInterface(battleContract);
        if (battle.isOnBattle(uint64(_objId)))
            revert();
        
        // check ownership
        EtheremonDataBase data = EtheremonDataBase(dataContract);
        MonsterObjAcc memory obj;
        (obj.monsterId, obj.classId, obj.trainer, obj.exp, obj.createIndex, obj.lastClaimIndex, obj.createTime) = data.getMonsterObj(uint64(_objId));

        if (obj.trainer != msg.sender) {
            revert();
        }
        
        monTradeData.addSellingItem(_objId, _price, block.timestamp);
        EventPlaceSellOrder(msg.sender, _objId, _price);
    }
    
    function removeSellOrder(uint _objId) isActive external {
        // check ownership
        EtheremonDataBase data = EtheremonDataBase(dataContract);
        MonsterObjAcc memory obj;
        (obj.monsterId, obj.classId, obj.trainer, obj.exp, obj.createIndex, obj.lastClaimIndex, obj.createTime) = data.getMonsterObj(uint64(_objId));

        if (obj.trainer != msg.sender) {
            revert();
        }
        
        EtheremonTradeData monTradeData = EtheremonTradeData(tradingMonDataContract);
        monTradeData.removeSellingItem(_objId);
        
        EventRemoveSellOrder(msg.sender, _objId);
    }
    
    function buyItem(uint _objId) isActive external payable {
        // check item is valid to sell
        EtheremonTradeData monTradeData = EtheremonTradeData(tradingMonDataContract);
        uint requestPrice = monTradeData.getSellPrice(_objId);
        if (requestPrice == 0 || msg.value != requestPrice) {
            revert();
        }

        // check obj
        EtheremonDataBase data = EtheremonDataBase(dataContract);
        MonsterObjAcc memory obj;
        (obj.monsterId, obj.classId, obj.trainer, obj.exp, obj.createIndex, obj.lastClaimIndex, obj.createTime) = data.getMonsterObj(uint64(_objId));
        // can not buy from yourself
        if (obj.monsterId == 0 || obj.trainer == msg.sender) {
            revert();
        }
        
        EtheremonMonsterNFTInterface monsterNFT = EtheremonMonsterNFTInterface(monsterNFTContract);

        uint fee = requestPrice * tradingFeePercentage / 100;
        monTradeData.removeSellingItem(_objId);
        
        // transfer owner
        data.removeMonsterIdMapping(obj.trainer, obj.monsterId);
        data.addMonsterIdMapping(msg.sender, obj.monsterId);
        monsterNFT.triggerTransferEvent(obj.trainer, msg.sender, _objId);
        
        // transfer money
        obj.trainer.transfer(safeSubtract(requestPrice, fee));
        
        EventCompleteSellOrder(obj.trainer, msg.sender, _objId, requestPrice);
    }
    
    function offerBorrowingItem(uint _objId, uint _price, uint _releaseTime) isActive external {
        EtheremonTradeData monTradeData = EtheremonTradeData(tradingMonDataContract);
        if (monTradeData.isOnSell(_objId) || monTradeData.isOnLent(_objId)) revert();

         // check ownership
        EtheremonDataBase data = EtheremonDataBase(dataContract);
        MonsterObjAcc memory obj;
        (obj.monsterId, obj.classId, obj.trainer, obj.exp, obj.createIndex, obj.lastClaimIndex, obj.createTime) = data.getMonsterObj(uint64(_objId));

        if (obj.trainer != msg.sender) {
            revert();
        }

        // not on battle 
        EtheremonBattleInterface battle = EtheremonBattleInterface(battleContract);
        if (battle.isOnBattle(obj.monsterId))
            revert();
        
        monTradeData.addBorrowingItem(msg.sender, _objId, _price, address(0), false, _releaseTime, block.timestamp);
        EventOfferBorrowingItem(msg.sender, _objId, _price, _releaseTime);
    }
    
    function removeBorrowingOfferItem(uint _objId) isActive external {
        EtheremonTradeData monTradeData = EtheremonTradeData(tradingMonDataContract);
        address owner;
        bool lent;
        (owner, lent) = monTradeData.getBorrowBasicInfo(_objId);
        if (owner != msg.sender || lent == true)
            revert();
        
        monTradeData.removeBorrowingItem(_objId);
        EventRemoveOfferBorrowingItem(msg.sender, _objId);
    }
    
    function borrowItem(uint _objId) isActive external payable {
        EtheremonTradeData monTradeData = EtheremonTradeData(tradingMonDataContract);
        BorrowItem memory borrowItem;
        (borrowItem.index, borrowItem.owner, borrowItem.borrower, borrowItem.price, borrowItem.lent, borrowItem.createTime, borrowItem.releaseTime) = monTradeData.getBorrowInfo(_objId);
        if (borrowItem.index == 0 || borrowItem.lent == true) revert();
        if (borrowItem.owner == msg.sender) revert(); // can not borrow from yourself
        if (borrowItem.price != msg.value)
            revert();

        // check obj
        EtheremonDataBase data = EtheremonDataBase(dataContract);
        MonsterObjAcc memory obj;
        (obj.monsterId, obj.classId, obj.trainer, obj.exp, obj.createIndex, obj.lastClaimIndex, obj.createTime) = data.getMonsterObj(uint64(_objId));
        if (obj.trainer != borrowItem.owner) {
            revert();
        }
        
        // update borrow data
        monTradeData.addBorrowingItem(borrowItem.owner, _objId, borrowItem.price, msg.sender, true, (borrowItem.releaseTime + block.timestamp), borrowItem.createTime);
        
        data.removeMonsterIdMapping(obj.trainer, obj.monsterId);
        data.addMonsterIdMapping(msg.sender, obj.monsterId);
        _triggerNFTEvent(obj.trainer, msg.sender, _objId);
        
        obj.trainer.transfer(safeSubtract(borrowItem.price, borrowItem.price * tradingFeePercentage / 100));
        monTradeData.addItemLendingList(obj.trainer, _objId);
        EventAcceptBorrowItem(obj.trainer, msg.sender, _objId, borrowItem.price);
    }
    
    function getBackLendingItem(uint64 _objId) isActive external {
        EtheremonTradeData monTradeData = EtheremonTradeData(tradingMonDataContract);
        BorrowItem memory borrowItem;
        (borrowItem.index, borrowItem.owner, borrowItem.borrower, borrowItem.price, borrowItem.lent, borrowItem.createTime, borrowItem.releaseTime) = monTradeData.getBorrowInfo(_objId);
        
        if (borrowItem.index == 0)
            revert();
        if (borrowItem.lent == false)
            revert();
        if (borrowItem.releaseTime > block.timestamp)
            revert();
        
        if (msg.sender != borrowItem.owner)
            revert();
        
        monTradeData.removeBorrowingItem(_objId);
        
        EtheremonDataBase data = EtheremonDataBase(dataContract);
        data.removeMonsterIdMapping(borrowItem.borrower, _objId);
        data.addMonsterIdMapping(msg.sender, _objId);
        EtheremonMonsterNFTInterface monsterNFT = EtheremonMonsterNFTInterface(monsterNFTContract);
        monsterNFT.triggerTransferEvent(borrowItem.borrower, msg.sender, _objId);
        
        monTradeData.removeItemLendingList(msg.sender, _objId);
        EventGetBackItem(msg.sender, borrowItem.borrower, _objId);
    }
    
    // read access
    function getObjInfoWithBp(uint64 _objId) constant public returns(address owner, uint32 classId, uint32 exp, uint32 createIndex, uint bp) {
        EtheremonDataBase data = EtheremonDataBase(dataContract);
        MonsterObjAcc memory obj;
        (obj.monsterId, classId, owner, exp, createIndex, obj.lastClaimIndex, obj.createTime) = data.getMonsterObj(_objId);
        EtheremonMonsterNFTInterface monsterNFT = EtheremonMonsterNFTInterface(monsterNFTContract);
        bp = monsterNFT.getMonsterCP(_objId);
    }
    
    function getTotalSellingMonsters() constant external returns(uint) {
        EtheremonTradeData monTradeData = EtheremonTradeData(tradingMonDataContract);
        return monTradeData.getTotalSellingItem();
    }
    
    function getTotalBorrowingMonsters() constant external returns(uint) {
        EtheremonTradeData monTradeData = EtheremonTradeData(tradingMonDataContract);
        return monTradeData.getTotalBorrowingItem();
    }

    function getSellingItem(uint _index) constant external returns(uint objId, uint32 classId, uint32 exp, uint bp, address trainer, uint32 createIndex, uint256 price, uint createTime) {
        EtheremonTradeData monTradeData = EtheremonTradeData(tradingMonDataContract);
        (objId, price, createTime) = monTradeData.getSellingInfoByIndex(_index);
        if (objId > 0) {
            (trainer, classId, exp, createIndex, bp) = getObjInfoWithBp(uint64(objId));
        }
    }
    
    function getSellingItemByObjId(uint64 _objId) constant external returns(uint32 classId, uint32 exp, uint bp, address trainer, uint32 createIndex, uint256 price, uint createTime) {
        EtheremonTradeData monTradeData = EtheremonTradeData(tradingMonDataContract);
        uint index;
        (index, price, createTime) = monTradeData.getSellInfo(_objId);
        if (price > 0) {
            (trainer, classId, exp, createIndex, bp) = getObjInfoWithBp(_objId);
        }
    }

    function getBorrowingItem(uint _index) constant external returns(uint objId, address owner, address borrower, 
        uint256 price, bool lent, uint createTime, uint releaseTime) {
        EtheremonTradeData monTradeData = EtheremonTradeData(tradingMonDataContract);    
        (objId, owner, borrower, price, lent, createTime, releaseTime) = monTradeData.getBorrowInfoByIndex(_index);
    }
    
    function getBorrowingItemByObjId(uint64 _objId) constant external returns(uint index, address owner, address borrower, 
        uint256 price, bool lent, uint createTime, uint releaseTime) {
        EtheremonTradeData monTradeData = EtheremonTradeData(tradingMonDataContract);    
        (index, owner, borrower, price, lent, createTime, releaseTime) = monTradeData.getBorrowInfo(_objId);
    }
    
    
    function getLendingItemLength(address _trainer) constant external returns(uint) {
        EtheremonTradeData monTradeData = EtheremonTradeData(tradingMonDataContract);    
        return monTradeData.getTotalLendingItem(_trainer);
    }
    
    function getLendingItemInfo(address _trainer, uint _index) constant external returns(uint objId, address owner, address borrower, 
        uint256 price, bool lent, uint createTime, uint releaseTime) {
        EtheremonTradeData monTradeData = EtheremonTradeData(tradingMonDataContract);
        (objId, owner, borrower, price, lent, createTime, releaseTime) = monTradeData.getLendingInfo(_trainer, _index);
    }
    
    function getTradingInfo(uint _objId) constant external returns(address owner, address borrower, uint256 sellingPrice, uint256 lendingPrice, bool lent, uint releaseTime) {
        EtheremonTradeData monTradeData = EtheremonTradeData(tradingMonDataContract);
        (sellingPrice, lendingPrice, lent, releaseTime, owner, borrower) = monTradeData.getTradingInfo(_objId);
    }
    
    function isOnTrading(uint _objId) constant external returns(bool) {
        EtheremonTradeData monTradeData = EtheremonTradeData(tradingMonDataContract);
        return monTradeData.isOnTrade(_objId);
    }
}

Contract ABI
[{"constant":false,"inputs":[{"name":"_objId","type":"uint256"}],"name":"removeSellOrder","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"dataContract","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint32"}],"name":"gen0Config","outputs":[{"name":"classId","type":"uint32"},{"name":"originalPrice","type":"uint256"},{"name":"returnPrice","type":"uint256"},{"name":"total","type":"uint32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_objId","type":"uint64"}],"name":"getSellingItemByObjId","outputs":[{"name":"classId","type":"uint32"},{"name":"exp","type":"uint32"},{"name":"bp","type":"uint256"},{"name":"trainer","type":"address"},{"name":"createIndex","type":"uint32"},{"name":"price","type":"uint256"},{"name":"createTime","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"moderators","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getTotalBorrowingMonsters","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_objId","type":"uint256"},{"name":"_price","type":"uint256"},{"name":"_releaseTime","type":"uint256"}],"name":"offerBorrowingItem","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_objId","type":"uint256"}],"name":"removeBorrowingOfferItem","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"monsterNFTContract","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"battleContract","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_isMaintaining","type":"bool"}],"name":"UpdateMaintaining","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_objId","type":"uint64"}],"name":"getBackLendingItem","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalModerators","outputs":[{"name":"","type":"uint16"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_objId","type":"uint64"}],"name":"getBorrowingItemByObjId","outputs":[{"name":"index","type":"uint256"},{"name":"owner","type":"address"},{"name":"borrower","type":"address"},{"name":"price","type":"uint256"},{"name":"lent","type":"bool"},{"name":"createTime","type":"uint256"},{"name":"releaseTime","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_sendTo","type":"address"},{"name":"_amount","type":"uint256"}],"name":"withdrawEther","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_dataContract","type":"address"},{"name":"_battleContract","type":"address"},{"name":"_tradingMonDataContract","type":"address"},{"name":"_monsterNFTContract","type":"address"}],"name":"setContract","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"setOriginalPriceGen0","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_objId","type":"uint256"}],"name":"isOnTrading","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_newModerator","type":"address"}],"name":"AddModerator","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"GEN0_NO","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"tradingMonDataContract","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_index","type":"uint256"}],"name":"getSellingItem","outputs":[{"name":"objId","type":"uint256"},{"name":"classId","type":"uint32"},{"name":"exp","type":"uint32"},{"name":"bp","type":"uint256"},{"name":"trainer","type":"address"},{"name":"createIndex","type":"uint32"},{"name":"price","type":"uint256"},{"name":"createTime","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getTotalSellingMonsters","outputs":[{"name":"","type":"uint256"}],"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":"_fee","type":"uint16"}],"name":"updateConfig","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_objId","type":"uint256"},{"name":"_price","type":"uint256"}],"name":"placeSellOrder","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_trainer","type":"address"},{"name":"_index","type":"uint256"}],"name":"getLendingItemInfo","outputs":[{"name":"objId","type":"uint256"},{"name":"owner","type":"address"},{"name":"borrower","type":"address"},{"name":"price","type":"uint256"},{"name":"lent","type":"bool"},{"name":"createTime","type":"uint256"},{"name":"releaseTime","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"tradingFeePercentage","outputs":[{"name":"","type":"uint16"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_oldModerator","type":"address"}],"name":"RemoveModerator","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_trainer","type":"address"}],"name":"getLendingItemLength","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_objId","type":"uint256"}],"name":"getTradingInfo","outputs":[{"name":"owner","type":"address"},{"name":"borrower","type":"address"},{"name":"sellingPrice","type":"uint256"},{"name":"lendingPrice","type":"uint256"},{"name":"lent","type":"bool"},{"name":"releaseTime","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_objId","type":"uint256"}],"name":"buyItem","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"_objId","type":"uint256"}],"name":"borrowItem","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"isMaintaining","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_newOwner","type":"address"}],"name":"ChangeOwner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_objId","type":"uint64"}],"name":"getObjInfoWithBp","outputs":[{"name":"owner","type":"address"},{"name":"classId","type":"uint32"},{"name":"exp","type":"uint32"},{"name":"createIndex","type":"uint32"},{"name":"bp","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_index","type":"uint256"}],"name":"getBorrowingItem","outputs":[{"name":"objId","type":"uint256"},{"name":"owner","type":"address"},{"name":"borrower","type":"address"},{"name":"price","type":"uint256"},{"name":"lent","type":"bool"},{"name":"createTime","type":"uint256"},{"name":"releaseTime","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_dataContract","type":"address"},{"name":"_battleContract","type":"address"},{"name":"_tradingMonDataContract","type":"address"},{"name":"_monsterNFTContract","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"seller","type":"address"},{"indexed":false,"name":"objId","type":"uint256"},{"indexed":false,"name":"price","type":"uint256"}],"name":"EventPlaceSellOrder","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"seller","type":"address"},{"indexed":false,"name":"objId","type":"uint256"}],"name":"EventRemoveSellOrder","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"seller","type":"address"},{"indexed":true,"name":"buyer","type":"address"},{"indexed":false,"name":"objId","type":"uint256"},{"indexed":false,"name":"price","type":"uint256"}],"name":"EventCompleteSellOrder","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"lender","type":"address"},{"indexed":false,"name":"objId","type":"uint256"},{"indexed":false,"name":"price","type":"uint256"},{"indexed":false,"name":"releaseTime","type":"uint256"}],"name":"EventOfferBorrowingItem","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"lender","type":"address"},{"indexed":false,"name":"objId","type":"uint256"}],"name":"EventRemoveOfferBorrowingItem","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"lender","type":"address"},{"indexed":true,"name":"borrower","type":"address"},{"indexed":false,"name":"objId","type":"uint256"},{"indexed":false,"name":"price","type":"uint256"}],"name":"EventAcceptBorrowItem","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"lender","type":"address"},{"indexed":true,"name":"borrower","type":"address"},{"indexed":false,"name":"objId","type":"uint256"}],"name":"EventGetBackItem","type":"event"}]

Contract Creation Code
60606040526000805460a060020a61ffff02191690556002805460ff191690556007805461ffff19166003179055341561003857600080fd5b604051608080613c808339810160405280805191906020018051919060200180519190602001805160008054600160a060020a03338116600160a060020a031992831617909255600280549883166101000261010060a860020a031990991698909817909755600380549682169688169690961790955560048054948616948716949094179093555050600580549290911691909216179055613ba0806100e06000396000f3006060604052600436106101b35763ffffffff60e060020a6000350416630559c11481146101b85780630d668818146101d05780630daf4151146101ff5780630e5aaffc1461024c57806314d0f1ba146102bc57806317880b67146102ef57806327e90a7e146103145780632f6dc6b3146103305780633dd287d414610346578063423b1ca31461035957806348ef5aa81461036c5780634eb4fe80146103845780634efb023e146103a45780634f99a96e146103ce578063522f68151461043a578063615dbebb1461045c57806366ba26701461048d578063677f768d146104a05780636c81fd6d146104b657806373d65c00146104d55780637e27133f146104fe5780638426a4521461051157806385ff96a7146105815780638da5cb5b1461059457806398cdf0ca146105a7578063a4406bcd146105c1578063ad4e39f3146105da578063b2356ad4146105fc578063b85d62751461060f578063c73437541461062e578063cc4999ea1461064d578063e7fb74c7146106a7578063ee422f13146106b2578063ee4e4416146106bd578063f2853292146106d0578063f9a3e07d146106ef578063faa5369d14610751575b600080fd5b34156101c357600080fd5b6101ce600435610767565b005b34156101db57600080fd5b6101e3610927565b604051600160a060020a03909116815260200160405180910390f35b341561020a57600080fd5b61021b63ffffffff6004351661093b565b60405163ffffffff948516815260208101939093526040808401929092529092166060820152608001905180910390f35b341561025757600080fd5b61026c67ffffffffffffffff6004351661096a565b60405163ffffffff97881681529587166020870152604080870195909552600160a060020a0390931660608601529416608084015260a083019390935260c082019290925260e001905180910390f35b34156102c757600080fd5b6102db600160a060020a0360043516610a31565b604051901515815260200160405180910390f35b34156102fa57600080fd5b610302610a46565b60405190815260200160405180910390f35b341561031f57600080fd5b6101ce600435602435604435610ab0565b341561033b57600080fd5b6101ce600435610e30565b341561035157600080fd5b6101e3610f8d565b341561036457600080fd5b6101e3610f9c565b341561037757600080fd5b6101ce6004351515610fab565b341561038f57600080fd5b6101ce67ffffffffffffffff60043516610fd9565b34156103af57600080fd5b6103b76113c0565b60405161ffff909116815260200160405180910390f35b34156103d957600080fd5b6103ee67ffffffffffffffff600435166113e2565b604051968752600160a060020a0395861660208801529390941660408087019190915260608601929092521515608085015260a084019290925260c083015260e0909101905180910390f35b341561044557600080fd5b6101ce600160a060020a03600435166024356114b2565b341561046757600080fd5b6101ce600160a060020a0360043581169060243581169060443581169060643516611544565b341561049857600080fd5b6101ce6115fd565b34156104ab57600080fd5b6102db6004356126c7565b34156104c157600080fd5b6101ce600160a060020a036004351661273c565b34156104e057600080fd5b6104e86127e6565b60405160ff909116815260200160405180910390f35b341561050957600080fd5b6101e36127eb565b341561051c57600080fd5b6105276004356127fa565b60405197885263ffffffff96871660208901529486166040808901919091526060880194909452600160a060020a03909216608087015290931660a085015260c084019290925260e0830152610100909101905180910390f35b341561058c57600080fd5b6103026128b8565b341561059f57600080fd5b6101e3612903565b34156105b257600080fd5b6101ce61ffff60043516612912565b34156105cc57600080fd5b6101ce600435602435612970565b34156105e557600080fd5b6103ee600160a060020a0360043516602435612c4b565b341561060757600080fd5b6103b7612d21565b341561061a57600080fd5b6101ce600160a060020a0360043516612d2b565b341561063957600080fd5b610302600160a060020a0360043516612dd5565b341561065857600080fd5b610663600435612e31565b604051600160a060020a03968716815294909516602085015260408085019390935260608401919091521515608083015260a082019290925260c001905180910390f35b6101ce600435612edd565b6101ce600435613318565b34156106c857600080fd5b6102db613826565b34156106db57600080fd5b6101ce600160a060020a036004351661382f565b34156106fa57600080fd5b61070f67ffffffffffffffff60043516613886565b604051600160a060020a03909516855263ffffffff938416602086015291831660408086019190915292166060840152608083015260a0909101905180910390f35b341561075c57600080fd5b6103ee6004356139e8565b6000610771613ada565b60025460009060ff161561078457600080fd5b6002546101009004600160a060020a0316925082630720246085600060405160e0015260405160e060020a63ffffffff841602815267ffffffffffffffff909116600482015260240160e060405180830381600087803b15156107e657600080fd5b6102c65a03f115156107f757600080fd5b505050604051805190602001805190602001805190602001805190602001805190602001805190602001805160e08a01525063ffffffff90811660c089015290811660a08801529081166080870152600160a060020a03918216604087019081529216602086015267ffffffffffffffff9092168452339091169051600160a060020a03161461088657600080fd5b50600454600160a060020a03168063067002ce8560405160e060020a63ffffffff84160281526004810191909152602401600060405180830381600087803b15156108d057600080fd5b6102c65a03f115156108e157600080fd5b50505033600160a060020a03167f5e3b2818238e34ce5e09ea1caf84df69e3121cf9d3e6d3ccb44afa165dcf7c238560405190815260200160405180910390a250505050565b6002546101009004600160a060020a031681565b600660205260009081526040902080546001820154600283015460039093015463ffffffff9283169391921684565b600454600090819081908190819081908190600160a060020a0316818163e9bc63f78b836040516060015260405160e060020a63ffffffff841602815267ffffffffffffffff9091166004820152602401606060405180830381600087803b15156109d457600080fd5b6102c65a03f115156109e557600080fd5b5050506040518051906020018051906020018051919650909450909150506000841115610a2457610a158a613886565b929c50909a5090985090965094505b5050919395979092949650565b60016020526000908152604090205460ff1681565b600454600090600160a060020a0316806220338583604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515610a9057600080fd5b6102c65a03f11515610aa157600080fd5b50505060405180519250505090565b600080610abb613ada565b60025460009060ff1615610ace57600080fd5b600454600160a060020a031693508363542c8f378860006040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b1515610b2257600080fd5b6102c65a03f11515610b3357600080fd5b5050506040518051905080610bae575083600160a060020a0316633a060bc98860006040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b1515610b9257600080fd5b6102c65a03f11515610ba357600080fd5b505050604051805190505b15610bb857600080fd5b6002546101009004600160a060020a0316925082630720246088600060405160e0015260405160e060020a63ffffffff841602815267ffffffffffffffff909116600482015260240160e060405180830381600087803b1515610c1a57600080fd5b6102c65a03f11515610c2b57600080fd5b505050604051805190602001805190602001805190602001805190602001805190602001805190602001805160e08a01525063ffffffff90811660c089015290811660a08801529081166080870152600160a060020a03918216604087019081529216602086015267ffffffffffffffff9092168452339091169051600160a060020a031614610cba57600080fd5b50600354600160a060020a0316806335f097f3835160006040516020015260405160e060020a63ffffffff841602815267ffffffffffffffff9091166004820152602401602060405180830381600087803b1515610d1757600080fd5b6102c65a03f11515610d2857600080fd5b5050506040518051905015610d3c57600080fd5b83600160a060020a031663a18e0ce43389896000808b4260405160e060020a63ffffffff8a16028152600160a060020a03978816600482015260248101969096526044860194909452919094166064840152921515608483015260a482019290925260c481019190915260e401600060405180830381600087803b1515610dc257600080fd5b6102c65a03f11515610dd357600080fd5b50505033600160a060020a03167fb663c085fbea38e62b747399d2382848a59381222e56339f222b5ef6c10a489588888860405180848152602001838152602001828152602001935050505060405180910390a250505050505050565b6002546000908190819060ff1615610e4757600080fd5b600454600160a060020a031692508263e40906ed8560006040516040015260405160e060020a63ffffffff841602815260048101919091526024016040805180830381600087803b1515610e9a57600080fd5b6102c65a03f11515610eab57600080fd5b50505060405180519060200180519050809250819350505033600160a060020a031682600160a060020a0316141580610ee657506001811515145b15610ef057600080fd5b82600160a060020a03166329da3b4d8560405160e060020a63ffffffff84160281526004810191909152602401600060405180830381600087803b1515610f3657600080fd5b6102c65a03f11515610f4757600080fd5b50505033600160a060020a03167f7fdce2a001e343c4e897863ce0647872b5ff9d179c3d7aa9e6a28a94eb7c0e158560405190815260200160405180910390a250505050565b600554600160a060020a031681565b600354600160a060020a031681565b60005433600160a060020a03908116911614610fc657600080fd5b6002805460ff1916911515919091179055565b6000610fe3613b26565b600254600090819060ff1615610ff857600080fd5b600454600160a060020a0316935083630e13736886600060405160e0015260405160e060020a63ffffffff841602815267ffffffffffffffff909116600482015260240160e060405180830381600087803b151561105557600080fd5b6102c65a03f1151561106657600080fd5b505050604051805190602001805190602001805190602001805190602001805190602001805190602001805160a08b01525060c0890152151560808801526060870152600160a060020a0390811660408701521660208501528352825115156110ce57600080fd5b826080015115156110de57600080fd5b428360a0015111156110ef57600080fd5b8260200151600160a060020a031633600160a060020a031614151561111357600080fd5b83600160a060020a03166329da3b4d8660405160e060020a63ffffffff841602815267ffffffffffffffff9091166004820152602401600060405180830381600087803b151561116257600080fd5b6102c65a03f1151561117357600080fd5b50506002546101009004600160a060020a031692508290506360c6ccb260408501518760405160e060020a63ffffffff8516028152600160a060020a03909216600483015267ffffffffffffffff166024820152604401600060405180830381600087803b15156111e357600080fd5b6102c65a03f115156111f457600080fd5b50505081600160a060020a0316639248019e338760405160e060020a63ffffffff8516028152600160a060020a03909216600483015267ffffffffffffffff166024820152604401600060405180830381600087803b151561125557600080fd5b6102c65a03f1151561126657600080fd5b5050600554600160a060020a0316915081905063c463b0086040850151338860405160e060020a63ffffffff8616028152600160a060020a03938416600482015291909216602482015267ffffffffffffffff9091166044820152606401600060405180830381600087803b15156112dd57600080fd5b6102c65a03f115156112ee57600080fd5b50505083600160a060020a031663770c6bde338760405160e060020a63ffffffff8516028152600160a060020a03909216600483015267ffffffffffffffff166024820152604401600060405180830381600087803b151561134f57600080fd5b6102c65a03f1151561136057600080fd5b5050508260400151600160a060020a031633600160a060020a03167f5ac3d58a9aee148e0e65022b260237441447fdc7ebae1524effd9065721a15888760405167ffffffffffffffff909116815260200160405180910390a35050505050565b60005474010000000000000000000000000000000000000000900461ffff1681565b600454600090819081908190819081908190600160a060020a031680630e1373688a8460405160e0015260405160e060020a63ffffffff841602815267ffffffffffffffff909116600482015260240160e060405180830381600087803b151561144b57600080fd5b6102c65a03f1151561145c57600080fd5b50505060405180519060200180519060200180519060200180519060200180519060200180519060200180519050809850819950829a50839b50849c50859d50869e505050505050505050919395979092949650565b60005433600160a060020a03908116911614806114ed5750600160a060020a03331660009081526001602081905260409091205460ff161515145b15156114f857600080fd5b30600160a060020a03163181111561150f57600080fd5b600160a060020a03821681156108fc0282604051600060405180830381858888f19350505050151561154057600080fd5b5050565b60005433600160a060020a039081169116148061157f5750600160a060020a03331660009081526001602081905260409091205460ff161515145b151561158a57600080fd5b60028054600160a060020a039586166101000274ffffffffffffffffffffffffffffffffffffffff00199091161790556003805493851673ffffffffffffffffffffffffffffffffffffffff19948516179055600480549285169284169290921790915560058054919093169116179055565b60005433600160a060020a03908116911614806116385750600160a060020a03331660009081526001602081905260409091205460ff161515145b151561164357600080fd5b608060405190810160409081526001808352670429d069189e0000602080850191909152660aa87bee538000928401929092526101766060840152600052600690527f3e5fec24aa4dc4e5aee2e025e51e1392c72a2500577559fae9665c6d52bd6a318151815463ffffffff191663ffffffff9190911617815560208201518160010155604082015181600201556060820151600391909101805463ffffffff191663ffffffff90921691909117905550608060405190810160409081526002808352670429d069189e0000602080850191909152660aa87bee538000928401929092526101986060840152600052600690527f8819ef417987f8ae7a81f42cdfb18815282fe989326fbff903d13cf0e03ace298151815463ffffffff191663ffffffff9190911617815560208201518160010155604082015181600201556060820151600391909101805463ffffffff191663ffffffff90921691909117905550608060405190810160409081526003808352670429d069189e0000602080850191909152660aa87bee538000928401929092526101756060840152600052600690527f75f96ab15d697e93042dc45b5c896c4b27e89bb6eaf39475c5c371cb2513f7d28151815463ffffffff191663ffffffff9190911617815560208201518160010155604082015181600201556060820151600391909101805463ffffffff191663ffffffff909216919091179055506080604051908101604090815260048083526702c68af0bb14000060208085019190915266071afd498d0000928401929092526101b56060840152600052600690527fc5069e24aaadb2addc3e52e868fcf3f4f8acf5a87e24300992fd4540c2a87eed8151815463ffffffff191663ffffffff9190911617815560208201518160010155604082015181600201556060820151600391909101805463ffffffff191663ffffffff9092169190911790555060806040519081016040908152600580835267016345785d8a000060208085019190915266038d7ea4c68000928401929092526101f16060840152600052600690527fbfd358e93f18da3ed276c3afdbdba00b8f0b6008a03476a6a86bd6320ee6938b8151815463ffffffff191663ffffffff9190911617815560208201518160010155604082015181600201556060820151600391909101805463ffffffff191663ffffffff90921691909117905550608060405190810160409081526006808352670429d069189e0000602080850191909152660aa87bee5380009284019290925261017c6060840152600081905290527f697b2bd7bb2984c4e0dc14c79c987d37818484a62958b9c45a0e8b962f20650f8151815463ffffffff191663ffffffff9190911617815560208201518160010155604082015181600201556060820151600391909101805463ffffffff191663ffffffff909216919091179055506080604051908101604090815260078083526702c68af0bb14000060208085019190915266071afd498d0000928401929092526101596060840152600052600690527f4ced6d0d36392b04cc5d8761b1327b3bbba6e1089c77f60a9a9ca18e05e4f00e8151815463ffffffff191663ffffffff9190911617815560208201518160010155604082015181600201556060820151600391909101805463ffffffff191663ffffffff9092169190911790555060806040519081016040908152600880835267016345785d8a000060208085019190915266038d7ea4c68000928401929092526102066060840152600052600690527fb8d683c9d414f481826f3e7fe14b3ac6ae8c73450778287390c4bb8cb9f2e80b8151815463ffffffff191663ffffffff9190911617815560208201518160010155604082015181600201556060820151600391909101805463ffffffff191663ffffffff9092169190911790555060806040519081016040908152600980835267016345785d8a000060208085019190915266038d7ea4c68000928401929092526101bf6060840152600052600690527fca4d0c6c94a9477136dd41a99cc19ecbe441c8f6609efe7c6fa65be007a473238151815463ffffffff191663ffffffff9190911617815560208201518160010155604082015181600201556060820151600391909101805463ffffffff191663ffffffff9092169190911790555060806040519081016040908152600a8083526702c68af0bb14000060208085019190915266071afd498d00009284019290925261017c6060840152600052600690527f4da38fc8e544afc56a4c2a17752b8ddb67d8e23ac4583c9029d2e2d1dbe6c9888151815463ffffffff191663ffffffff9190911617815560208201518160010155604082015181600201556060820151600391909101805463ffffffff191663ffffffff9092169190911790555060806040519081016040908152600b8083526702c68af0bb14000060208085019190915266071afd498d0000928401929092526101626060840152600052600690527f85291c2e7881182c13e19eca9b58927ebfdc2c5d04882018eeb33d8241d357118151815463ffffffff191663ffffffff9190911617815560208201518160010155604082015181600201556060820151600391909101805463ffffffff191663ffffffff9092169190911790555060806040519081016040908152600c8083526702c68af0bb14000060208085019190915266071afd498d00009284019290925261015a6060840152600052600690527f0b94fa1b86997cc1f1148bfbe25b674e8cefc7cc6f976aa8d7c7966bd4cca3478151815463ffffffff191663ffffffff9190911617815560208201518160010155604082015181600201556060820151600391909101805463ffffffff191663ffffffff9092169190911790555060806040519081016040908152600d8083526702c68af0bb14000060208085019190915266071afd498d00009284019290925261015f6060840152600052600690527f248457bacb20e239ae314d8db91c0f270e453c28ee138c84f97aea6cfcf9a4998151815463ffffffff191663ffffffff9190911617815560208201518160010155604082015181600201556060820151600391909101805463ffffffff191663ffffffff9092169190911790555060806040519081016040908152600e8083526702c68af0bb14000060208085019190915266071afd498d0000928401929092526101526060840152600052600690527faca6cdb4b5fe0ec50731a73f714dd191dc1911bfeb3f9eeb9e94ed0f6065ef8d8151815463ffffffff191663ffffffff9190911617815560208201518160010155604082015181600201556060820151600391909101805463ffffffff191663ffffffff9092169190911790555060806040519081016040908152600f8083526702c68af0bb14000060208085019190915266071afd498d0000928401929092526101556060840152600052600690527ff130046d53bc87538ab17e4752ba5f5082985eecc06ccb932c5a55e8242dd5028151815463ffffffff191663ffffffff9190911617815560208201518160010155604082015181600201556060820151600391909101805463ffffffff191663ffffffff909216919091179055506080604051908101604090815260108083526704db732547630000602080850191909152660c6f3b40b6c000928401929092526101806060840152600052600690527f6fac4587033fa036e2426ad0134940d3a683633cc2b2b7862f39195344f163d18151815463ffffffff191663ffffffff9190911617815560208201518160010155604082015181600201556060820151600391909101805463ffffffff191663ffffffff90921691909117905550608060405190810160409081526011808352670de0b6b3a7640000602080850191909152662386f26fc10000928401929092526101316060840152600052600690527f84a4048ee77615560f9afb39551a46e123dd0dd6c928af241dc565271d0325698151815463ffffffff191663ffffffff9190911617815560208201518160010155604082015181600201556060820151600391909101805463ffffffff191663ffffffff9092169190911790555060806040519081016040908152601280835267016345785d8a000060208085019190915266038d7ea4c68000928401929092526101ab6060840152600052600690527fee4750d043edce57577a49a1f0c4b389e3b8c38c27dc693bc6b7154c072807718151815463ffffffff191663ffffffff9190911617815560208201518160010155604082015181600201556060820151600391909101805463ffffffff191663ffffffff90921691909117905550608060405190810160409081526013808352670de0b6b3a7640000602080850191909152662386f26fc10000928401929092526101306060840152600052600690527fb72a5233413dd9985e70abb239a7ba917e489fbf2ece87f523c6e26971cc821f8151815463ffffffff191663ffffffff9190911617815560208201518160010155604082015181600201556060820151600391909101805463ffffffff191663ffffffff9092169190911790555060806040519081016040908152601480835267058d15e17628000060208085019190915266b1a2bc2ec500009284019290925260526060840152600052600690527f098d468efb4f874d617491296c759dc9ae46efb517fe36bcf30699ad3f714c0f8151815463ffffffff191663ffffffff9190911617815560208201518160010155604082015181600201556060820151600391909101805463ffffffff191663ffffffff909216919091179055506080604051908101604090815260158083526001602080850182905292840152607b6060840152600052600690527feda6feebfb4ffb7de2d0dc45a13b92dc953c2ed6ee96fa7fe8179e7c4266747f8151815463ffffffff191663ffffffff9190911617815560208201518160010155604082015181600201556060820151600391909101805463ffffffff191663ffffffff909216919091179055506080604051908101604090815260168083526702c68af0bb14000060208085019190915266038d7ea4c68000928401929092526101d46060840152600052600690527f7d35cc2b0520994422695eb24e3bf4f74e9cba2704cae72ecd9ec54409a56afb8151815463ffffffff191663ffffffff9190911617815560208201518160010155604082015181600201556060820151600391909101805463ffffffff191663ffffffff909216919091179055506080604051908101604090815260178083526706f05b59d3b200006020808501919091526608e1bc9bf040009284019290925261012e6060840152600052600690527f84f72166cd6dc886f96a4867c4575af2a636c629c04227c9418bfffa7a09a9ed8151815463ffffffff191663ffffffff9190911617815560208201518160010155604082015181600201556060820151600391909101805463ffffffff191663ffffffff90921691909117905550608060405190810160409081526018808352670de0b6b3a76400006020808501919091526611c37937e080009284019290925260c36060840152600052600690527f7ca528807b45d0675df0059116d2304ca9c7f495d9ab623cd80c79f11948b8568151815463ffffffff191663ffffffff9190911617815560208201518160010155604082015181600201556060820151600391909101805463ffffffff191663ffffffff90921691909117905550565b600454600090600160a060020a03168063ff510ad884846040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b151561271b57600080fd5b6102c65a03f1151561272c57600080fd5b5050506040518051949350505050565b60005433600160a060020a0390811691161461275757600080fd5b600160a060020a03811660009081526001602052604090205460ff1615156127e357600160a060020a03811660009081526001602081905260408220805460ff191682179055815461ffff7401000000000000000000000000000000000000000080830482169093011690910275ffff0000000000000000000000000000000000000000199091161790555b50565b601881565b600454600160a060020a031681565b6004546000908190819081908190819081908190600160a060020a03168063488f1e438b846040516060015260405160e060020a63ffffffff84160281526004810191909152602401606060405180830381600087803b151561285c57600080fd5b6102c65a03f1151561286d57600080fd5b5050506040518051906020018051906020018051929b509094509092505060008911156128ac5761289d89613886565b929b5090995090975090955093505b50919395975091939597565b600454600090600160a060020a03168063654470fc83604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515610a9057600080fd5b600054600160a060020a031681565b60005433600160a060020a039081169116148061294d5750600160a060020a03331660009081526001602081905260409091205460ff161515145b151561295857600080fd5b6007805461ffff191661ffff92909216919091179055565b600080600061297d613ada565b60025460ff161561298d57600080fd5b84151561299957600080fd5b600454600160a060020a0316935083639cbb165e8760006040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b15156129ed57600080fd5b6102c65a03f115156129fe57600080fd5b5050506040518051905015612a1257600080fd5b600354600160a060020a03169250826335f097f38760006040516020015260405160e060020a63ffffffff841602815267ffffffffffffffff9091166004820152602401602060405180830381600087803b1515612a6f57600080fd5b6102c65a03f11515612a8057600080fd5b5050506040518051905015612a9457600080fd5b6002546101009004600160a060020a0316915081630720246087600060405160e0015260405160e060020a63ffffffff841602815267ffffffffffffffff909116600482015260240160e060405180830381600087803b1515612af657600080fd5b6102c65a03f11515612b0757600080fd5b505050604051805190602001805190602001805190602001805190602001805190602001805190602001805160e08901525063ffffffff90811660c088015290811660a08701529081166080860152600160a060020a03918216604086019081529216602085015267ffffffffffffffff9092168352339091169051600160a060020a031614612b9657600080fd5b83600160a060020a031663f797ac0e87874260405160e060020a63ffffffff8616028152600481019390935260248301919091526044820152606401600060405180830381600087803b1515612beb57600080fd5b6102c65a03f11515612bfc57600080fd5b50505033600160a060020a03167f0a89884fbe620f3f10c082b012f4e476204fa9fefe182904fd4f20dd110643f1878760405191825260208201526040908101905180910390a2505050505050565b600454600090819081908190819081908190600160a060020a031680634afd8a198b8b8560405160e0015260405160e060020a63ffffffff8516028152600160a060020a039092166004830152602482015260440160e060405180830381600087803b1515612cb957600080fd5b6102c65a03f11515612cca57600080fd5b50505060405180519060200180519060200180519060200180519060200180519060200180519060200180519050809850819950829a50839b50849c50859d50869e50505050505050505092959891949750929550565b60075461ffff1681565b60005433600160a060020a03908116911614612d4657600080fd5b600160a060020a03811660009081526001602081905260409091205460ff16151514156127e357600160a060020a03166000908152600160205260408120805460ff19169055805475ffff0000000000000000000000000000000000000000198116740100000000000000000000000000000000000000009182900461ffff9081166000190116909102179055565b600454600090600160a060020a031680631008a2a584846040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b151561271b57600080fd5b60045460009081908190819081908190600160a060020a03168063cc4999ea898460405160c0015260405160e060020a63ffffffff8416028152600481019190915260240160c060405180830381600087803b1515612e8f57600080fd5b6102c65a03f11515612ea057600080fd5b5050506040518051906020018051906020018051906020018051906020018051906020018051919e919d50949b5092995090975095509350505050565b6000806000612eea613ada565b600254600090819060ff1615612eff57600080fd5b600454600160a060020a031695508563ba730e538860006040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b1515612f5357600080fd5b6102c65a03f11515612f6457600080fd5b5050506040518051955050841580612f7c5750843414155b15612f8657600080fd5b6002546101009004600160a060020a0316935083630720246088600060405160e0015260405160e060020a63ffffffff841602815267ffffffffffffffff909116600482015260240160e060405180830381600087803b1515612fe857600080fd5b6102c65a03f11515612ff957600080fd5b505050604051805190602001805190602001805190602001805190602001805190602001805190602001805160e08b01525063ffffffff90811660c08a015290811660a08901529081166080880152600160a060020a03909116604087015216602085015267ffffffffffffffff168352825167ffffffffffffffff161580613097575033600160a060020a03168360400151600160a060020a0316145b156130a157600080fd5b600554600754600160a060020a03909116925060649061ffff16860204905085600160a060020a031663067002ce8860405160e060020a63ffffffff84160281526004810191909152602401600060405180830381600087803b151561310657600080fd5b6102c65a03f1151561311757600080fd5b50505083600160a060020a03166360c6ccb28460400151855160405160e060020a63ffffffff8516028152600160a060020a03909216600483015267ffffffffffffffff166024820152604401600060405180830381600087803b151561317d57600080fd5b6102c65a03f1151561318e57600080fd5b505050600160a060020a038416639248019e33855160405160e060020a63ffffffff8516028152600160a060020a03909216600483015267ffffffffffffffff166024820152604401600060405180830381600087803b15156131f057600080fd5b6102c65a03f1151561320157600080fd5b50505081600160a060020a031663c463b0088460400151338a60405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401600060405180830381600087803b151561326957600080fd5b6102c65a03f1151561327a57600080fd5b5050508260400151600160a060020a03166108fc6132988784613a48565b9081150290604051600060405180830381858888f1935050505015156132bd57600080fd5b33600160a060020a03168360400151600160a060020a03167f690b390bfec452b9fc546ccbb1fb061fdf10737cccfdfc3dde842773b44b7813898860405191825260208201526040908101905180910390a350505050505050565b6000613322613b26565b600061332c613ada565b60025460ff161561333c57600080fd5b600454600160a060020a0316935083630e13736886600060405160e0015260405160e060020a63ffffffff8416028152600481019190915260240160e060405180830381600087803b151561339057600080fd5b6102c65a03f115156133a157600080fd5b505050604051805190602001805190602001805190602001805190602001805190602001805190602001805160a08b01525060c0890152151560808801526060870152600160a060020a0390811660408701521660208501528352825115806134105750826080015115156001145b1561341a57600080fd5b33600160a060020a03168360200151600160a060020a0316141561343d57600080fd5b3483606001511461344d57600080fd5b6002546101009004600160a060020a0316915081630720246086600060405160e0015260405160e060020a63ffffffff841602815267ffffffffffffffff909116600482015260240160e060405180830381600087803b15156134af57600080fd5b6102c65a03f115156134c057600080fd5b505050604051805190602001805190602001805190602001805190602001805190602001805190602001805160e08901525063ffffffff90811660c088015290811660a08701529081166080860152600160a060020a0390911660408501521660208084019190915267ffffffffffffffff9091168252830151600160a060020a03168160400151600160a060020a03161461355b57600080fd5b83600160a060020a031663a18e0ce48460200151878660600151336001428a60a00151018a60c0015160405160e060020a63ffffffff8a16028152600160a060020a03978816600482015260248101969096526044860194909452919094166064840152921515608483015260a482019290925260c481019190915260e401600060405180830381600087803b15156135f357600080fd5b6102c65a03f1151561360457600080fd5b50505081600160a060020a03166360c6ccb28260400151835160405160e060020a63ffffffff8516028152600160a060020a03909216600483015267ffffffffffffffff166024820152604401600060405180830381600087803b151561366a57600080fd5b6102c65a03f1151561367b57600080fd5b505050600160a060020a038216639248019e33835160405160e060020a63ffffffff8516028152600160a060020a03909216600483015267ffffffffffffffff166024820152604401600060405180830381600087803b15156136dd57600080fd5b6102c65a03f115156136ee57600080fd5b50505061370081604001513387613a5c565b8060400151600160a060020a03166108fc613738856060015160075460649061ffff1660608901510281151561373257fe5b04613a48565b9081150290604051600060405180830381858888f19350505050151561375d57600080fd5b83600160a060020a0316635004817482604001518760405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b15156137b557600080fd5b6102c65a03f115156137c657600080fd5b50505033600160a060020a03168160400151600160a060020a03167f07231bc4467c1477cfded7197882f724714d8a598b8481746571e18f792cd22387866060015160405191825260208201526040908101905180910390a35050505050565b60025460ff1681565b60005433600160a060020a0390811691161461384a57600080fd5b600160a060020a038116156127e35760008054600160a060020a03831673ffffffffffffffffffffffffffffffffffffffff1990911617905550565b600080600080600080613897613ada565b6002546101009004600160a060020a0316915060008263072024608a8360405160e0015260405160e060020a63ffffffff841602815267ffffffffffffffff909116600482015260240160e060405180830381600087803b15156138fa57600080fd5b6102c65a03f1151561390b57600080fd5b505050604051805190602001805190602001805190602001805190602001805190602001805190602001805160e08a01525063ffffffff1660c088015267ffffffffffffffff9094168652600554919b50919950909750909550600160a060020a0316905080630672859b8a60006040516020015260405160e060020a63ffffffff841602815267ffffffffffffffff9091166004820152602401602060405180830381600087803b15156139bf57600080fd5b6102c65a03f115156139d057600080fd5b50505060405180519050935050505091939590929450565b600454600090819081908190819081908190600160a060020a031680639e5b241a8a8460405160e0015260405160e060020a63ffffffff8416028152600481019190915260240160e060405180830381600087803b151561144b57600080fd5b60008082841015613a5557fe5b5050900390565b600554600160a060020a03168063c463b00885858560405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401600060405180830381600087803b1515613ac057600080fd5b6102c65a03f11515613ad157600080fd5b50505050505050565b61010060405190810160409081526000808352602083018190529082015260608101613b04613b62565b8152600060208201819052604082018190526060820181905260809091015290565b60e06040519081016040908152600080835260208301819052908201819052606082018190526080820181905260a0820181905260c082015290565b602060405190810160405260008152905600a165627a7a7230582095eddb17385cb44c4242e63f996e414bec1eedfcefba0863e82049b07de2fe010029000000000000000000000000abc1c404424bdf24c19a5cc5ef8f47781d18eb3e000000000000000000000000022c635044ba01ced1e098bc32e62a954147f2de0000000000000000000000009a376e31f1947c468ca904b4307c8970667e0ec20000000000000000000000005d00d312e171be5342067c09bae883f9bcb2003b


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

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 000000000000000000000000abc1c404424bdf24c19a5cc5ef8f47781d18eb3e
Arg [1] : 000000000000000000000000022c635044ba01ced1e098bc32e62a954147f2de
Arg [2] : 0000000000000000000000009a376e31f1947c468ca904b4307c8970667e0ec2
Arg [3] : 0000000000000000000000005d00d312e171be5342067c09bae883f9bcb2003b


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