Contract Overview | Etheremon_Trade2
Balance: 1.4152485 Ether
Ether Value: $290.64 (@ $205.36/ETH)
Transactions: 5601 txns
 Latest 25 txns From a total of 5601 Transactions
(+3 PendingTxns)

TxHash Age From To Value [TxFee]
0xdcb6b566de4e930888465adc340e28a12c2e5ea9423ba2153dce249ab270b3ea(pending)0xf875b5d526ed04d3b1aa34c889ff923327db0a86  IN  0xbd4b50bbf385195c410a625681ff29d439ba61f30.033 Ether(Pending)
0x31188d03ce97596d5930f1770886244197a4b06d0b34b3f85a4651a71a4df1ac(pending)0xaa03413791e5ab79fbb7add2089ff79345f48dd9  IN  0xbd4b50bbf385195c410a625681ff29d439ba61f30 Ether(Pending)
0xefed97bee1a72a49f51f15e0553737586bce0c5dd775dcfe53996d99b50d6e2c(pending)0xf875b5d526ed04d3b1aa34c889ff923327db0a86  IN  0xbd4b50bbf385195c410a625681ff29d439ba61f30.03 Ether(Pending)
0x30a15923e3a41d790a65ad12b7e03ececbc0cf874eae75f40ef0f36aa075ab05 14 secs ago0xbc8697ea4f56b09bb675dcb63cdcdae9ce61c79d  IN   Etheremon_Trade20.03 Ether0.00052708
0xe6c69f6aa1d269bb34c366a27ec887a93ec2528cf7269370df3453f64c2426a46 mins ago0xbc8697ea4f56b09bb675dcb63cdcdae9ce61c79d  IN   Etheremon_Trade20.11 Ether0.00085423
0xebf8b49e68deea5f4adc0be38f1872805c8202614c82db343d36ffb0d89738cf6 mins ago0xbc8697ea4f56b09bb675dcb63cdcdae9ce61c79d  IN   Etheremon_Trade20.08 Ether0.00077383
0x884f251174491ad7fd7a39d45df12cea42d84b8c6d0becffb68f93c0d0130b268 mins ago0xbc8697ea4f56b09bb675dcb63cdcdae9ce61c79d  IN   Etheremon_Trade20.08 Ether0.00068593
0x2fe9484b639ea20e1279a5ee916ffbe57362835ec02fbbd4e62f6ef9da5646db25 mins ago0xf875b5d526ed04d3b1aa34c889ff923327db0a86  IN   Etheremon_Trade20.03 Ether0.000404178
0xf4b0d5de410fddacbb1a5b1c781367eb6ef48b6597b276720e8ed81edc69674b32 mins ago0xaa03413791e5ab79fbb7add2089ff79345f48dd9  IN   Etheremon_Trade20 Ether0.00208605
0x672ada9ab397843be7999943de96c9bbb965e0bfff1a0d1a898b4035c125174644 mins ago0x8e5d30f161ba3ebb09dc3c1f06515656af34baa1  IN   Etheremon_Trade20 Ether0.0004438988
0x03e4d51244105358c792df7f3877f4ade50b2a57f8c06a2add8341b62bf1e5a344 mins ago0xc552563d9a01261ab91560ee84a6da252d22cc88  IN   Etheremon_Trade20 Ether0.0005696622
0x5da1a76fe25eb17f56ed7b84d6166964251e09644306697f9ebc6a34b5b7705a46 mins ago0xa813e1506aecf2a0926b9a7b9dc012ff8c1b6983  IN   Etheremon_Trade20 Ether0.00069503
0xa555db3bd6556236bb534006ec75ab6e8340cd093a79a852f5c38740e317032e47 mins ago0x242d0c57a9ff0391ff7fd3a050cf7edb4f821050  IN   Etheremon_Trade20 Ether0.000834036
0xc669605edecb45afb9ebbe339b14f4f2085023bb96712bee50be38e4e839734949 mins ago0xee80db4997098b2b517223636f15d51a61f3549b  IN   Etheremon_Trade20 Ether0.0005696622
0x9ff30a4830257734da45ea16a0289ae59907972c768e826df350428557c17bb41 hr 8 mins ago0xee80db4997098b2b517223636f15d51a61f3549b  IN   Etheremon_Trade20 Ether0.0001427333
0x4ffab4fca39d25a1a8ab62829fe40a926357b9d941426ae24ad109706df0523b1 hr 9 mins ago0xf875b5d526ed04d3b1aa34c889ff923327db0a86  IN   Etheremon_Trade20.035 Ether0.000339969
0xb4a3bd0e1ebf061680f746b64301845020dafb98872270a53dfd10c9d54100b81 hr 40 mins ago0xf875b5d526ed04d3b1aa34c889ff923327db0a86  IN   Etheremon_Trade20.027 Ether0.000348558
0xa97ea01df59912c90b936a2ded871c9d8943c7141fb40a792723c368a8d039772 hrs 3 mins ago0xf875b5d526ed04d3b1aa34c889ff923327db0a86  IN   Etheremon_Trade20.025 Ether0.000353868
0xd2899b4b34ae1da89ece746413eb3d79434beaf087062b118cabc60ec4f39c772 hrs 13 mins ago0x84dc4405c9a505c8c57787002a35289506f8dc3e  IN   Etheremon_Trade20 Ether0.000460262766
0x50e467f4a5f69c75c91ed49a28a9895270a2ff814128dd9ab6948b2a83f153072 hrs 30 mins ago0x2d70cd414482b0d3a79660198a4345131be0ebb9  IN   Etheremon_Trade20 Ether0.000208878
0x02d6bb11f3f0c09eaacbe085fdbca26da6cb9cd1eedb5dd89db93a1706e472f62 hrs 34 mins ago0x33d3c029fd119ebb90df20c3427a97074637bf7c  IN   Etheremon_Trade20.5 Ether0.0006634316
0x6d388b406939eb80109b7f761bef7e6e77035304fb7b5d2381a5a52cacecf9512 hrs 36 mins ago0x33d3c029fd119ebb90df20c3427a97074637bf7c  IN   Etheremon_Trade20.45 Ether0.0008644296
0xa6d5eb0534ec51da54df11a3c1dd99a22b897c20ac3e243b637e00fd5b8306882 hrs 37 mins ago0x946e985c5088e1cdf162e34954a39cd7404a3046  IN   Etheremon_Trade20 Ether0.0008618372
0xb2f1487d8d91b6dcd031e598ed8bafc4d1309800205247fdc5fefd37e03ee8ce2 hrs 47 mins ago0xf796b8fb98c7c98fd4b5424ced013820d1f2ee76  IN   Etheremon_Trade20.32 Ether0.0006275672
0xa0500ace1e9ba771fc0e6c6b9e5efc6019a0f820de40df299cccd0368aac390d2 hrs 48 mins ago0xf796b8fb98c7c98fd4b5424ced013820d1f2ee76  IN   Etheremon_Trade20.31 Ether0.0006270472
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
 Latest 25 Internal Txns, Click Here To View More View All
ParentTxHash Block Age From To Value
0x30a15923e3a41d790a65ad12b7e03ececbc0cf874eae75f40ef0f36aa075ab056550390 14 secs ago0xbd4b50bbf385195c410a625681ff29d439ba61f30x44b92ce1993431327ff20fe7997a1164094a45990.0291 Ether
0xe6c69f6aa1d269bb34c366a27ec887a93ec2528cf7269370df3453f64c2426a465503616 mins ago0xbd4b50bbf385195c410a625681ff29d439ba61f30x05bd458b7c3fdbd6e1fb151bace8807e3935f0610.1067 Ether
0xebf8b49e68deea5f4adc0be38f1872805c8202614c82db343d36ffb0d89738cf65503616 mins ago0xbd4b50bbf385195c410a625681ff29d439ba61f30x05bd458b7c3fdbd6e1fb151bace8807e3935f0610.0776 Ether
0x884f251174491ad7fd7a39d45df12cea42d84b8c6d0becffb68f93c0d0130b2665503528 mins ago0xbd4b50bbf385195c410a625681ff29d439ba61f30x44b92ce1993431327ff20fe7997a1164094a45990.0776 Ether
0x2fe9484b639ea20e1279a5ee916ffbe57362835ec02fbbd4e62f6ef9da5646db655027425 mins ago0xbd4b50bbf385195c410a625681ff29d439ba61f30x44b92ce1993431327ff20fe7997a1164094a45990.0291 Ether
0x4ffab4fca39d25a1a8ab62829fe40a926357b9d941426ae24ad109706df0523b65500871 hr 9 mins ago0xbd4b50bbf385195c410a625681ff29d439ba61f30x44b92ce1993431327ff20fe7997a1164094a45990.03395 Ether
0xb4a3bd0e1ebf061680f746b64301845020dafb98872270a53dfd10c9d54100b865499511 hr 40 mins ago0xbd4b50bbf385195c410a625681ff29d439ba61f30x44b92ce1993431327ff20fe7997a1164094a45990.02619 Ether
0xa97ea01df59912c90b936a2ded871c9d8943c7141fb40a792723c368a8d0397765498642 hrs 3 mins ago0xbd4b50bbf385195c410a625681ff29d439ba61f30x44b92ce1993431327ff20fe7997a1164094a45990.02425 Ether
0x02d6bb11f3f0c09eaacbe085fdbca26da6cb9cd1eedb5dd89db93a1706e472f665497242 hrs 34 mins ago0xbd4b50bbf385195c410a625681ff29d439ba61f30xf8856124ea157d6f26472e38224ee6744ad13af30.485 Ether
0x6d388b406939eb80109b7f761bef7e6e77035304fb7b5d2381a5a52cacecf95165497152 hrs 36 mins ago0xbd4b50bbf385195c410a625681ff29d439ba61f30xf8856124ea157d6f26472e38224ee6744ad13af30.4365 Ether
0xb2f1487d8d91b6dcd031e598ed8bafc4d1309800205247fdc5fefd37e03ee8ce65496682 hrs 47 mins ago0xbd4b50bbf385195c410a625681ff29d439ba61f30xf23f57782f5df1746ad078f204a3cce60694079d0.3104 Ether
0xa0500ace1e9ba771fc0e6c6b9e5efc6019a0f820de40df299cccd0368aac390d65496662 hrs 48 mins ago0xbd4b50bbf385195c410a625681ff29d439ba61f30x39a4b72ca79469a210836cbea6c8630e8a76a9d40.3007 Ether
0x197236082abfe36db51f6d36b2d74f8d2427d8f8a65afa436d697b9e244c575e65496642 hrs 49 mins ago0xbd4b50bbf385195c410a625681ff29d439ba61f30x12c08b4708495b5dfde1084dff45688b4cc13ebc0.29585 Ether
0xd954a536b8eefa8214ab913534d8e787091d1a7f48652525b10bf0ebb6c73dd865496622 hrs 49 mins ago0xbd4b50bbf385195c410a625681ff29d439ba61f30x99a811e5c62add613975456292f836115aea01640.291 Ether
0x12ce1c08b52581c592dca69fd99f1041c3fcbb8488456a44b67db5f64990bcf465496582 hrs 50 mins ago0xbd4b50bbf385195c410a625681ff29d439ba61f30x798fc047b8628533d70544a24a9ea37f92c88b640.28906 Ether
0x83f555ceede47ee5b67acaf476ce8237ff8f93352ea5bc568606d7a0f6ec328465495693 hrs 11 mins ago0xbd4b50bbf385195c410a625681ff29d439ba61f30x057dc43af6187a931e78a56b3293912a5b42e5ec0.00388 Ether
0x497b959989961dfe2c14d0f86f4865dea9eba5421d66d04623e271a88345c41c65494343 hrs 39 mins ago0xbd4b50bbf385195c410a625681ff29d439ba61f30x56320ac9f51cc2bf4837f3b401d91aed0ada044d0.07469 Ether
0x635956238e6bfa0898bafd6f2b18fe44040829e9ed4df3280d066829bcf30d9b65494333 hrs 39 mins ago0xbd4b50bbf385195c410a625681ff29d439ba61f30xa2103181a4571db128e052e73f5a5ce7356f31600.050925 Ether
0x4efbf6d2c65dac846de1c429e6b1768a38eca1ae5d7178c7b653df34f6cfb2f065489375 hrs 40 mins ago0xbd4b50bbf385195c410a625681ff29d439ba61f30xc66279677de897291cacc6b2855f718eee8345680.02328 Ether
0xc726b43bb710f231e75a579f8314fbd2c35ad63b936bc7b391257fa46e2123d365484957 hrs 25 mins ago0xbd4b50bbf385195c410a625681ff29d439ba61f30x8cdea15f8536e65a443efd518bcdd7c22ac267ef0.005335 Ether
0x64617976fceb8d8e24abfeacc4dd0318a546edc9dca25b80c15403f1bbe2e6e365484917 hrs 26 mins ago0xbd4b50bbf385195c410a625681ff29d439ba61f30x8cdea15f8536e65a443efd518bcdd7c22ac267ef0.004365 Ether
0xb88639784dd52f0ab6b2f4f11cc1c558513d3fc3705af333e482eba2e2e0ea8465484777 hrs 30 mins ago0xbd4b50bbf385195c410a625681ff29d439ba61f30x125a3e5bf4a1b1dbfbfaa1540aaa3b39febdb5130.00388 Ether
0xae2a38c1d34ce4dbf2da6c4632d1f53a45a15dfe4e48a1f6aa8155b3ecc030c565484687 hrs 32 mins ago0xbd4b50bbf385195c410a625681ff29d439ba61f30x946e985c5088e1cdf162e34954a39cd7404a30460.01261 Ether
0x1d0e8d0077b2449b829437e0e2a20951c368d20d17aa3a8d050079a169d66db165478819 hrs 52 mins ago0xbd4b50bbf385195c410a625681ff29d439ba61f30x4ce15b37851a4448a28899062906a02e51dee2670.24153 Ether
0xd587a977b31b5f71df58dc79a317a40e4fec022553c81a2ea8eed595f0c6fc1665478799 hrs 52 mins ago0xbd4b50bbf385195c410a625681ff29d439ba61f30xa694b9151ddaa05efb50a635b585256aa382a0cf0.24153 Ether
[ Download CSV Export  ] 
Warning: The Compiled Contract might be susceptible to ExpExponentCleanup (medium/high-severity), EventStructWrongData (very low-severity), NestedArrayFunctionCallDecoder (medium-severity) SolidityCompiler Bugs.

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



  Contract Source Code   Find Similiar Contracts

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 Switch To Opcodes View
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

 

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