Sponsored:   [Largest VC Funded] TEMCO, millions sold out in seconds. Join TEMCO's last presale at CoinBene!
Contract Overview | Etheremon_Trade2
Balance: 6.64881288 Ether
Ether Value: $552.78 (@ $83.14/ETH)
Transactions: 11279 txns
Misc:
Address Watch: Add To Watch List
Contract Creator: 0xe0a66218c40230967d4240d25f6220a28e52c7ffat txn 0x5545dfca931e60899a3fd6fe2f7da3c7fb5e3e80c98f9f1d5d656f4e9d8f29d5
 Latest 25 transactions from a total of 11279 transactions
(+6 PendingTxns)

TxHash Age From To Value [TxFee]
0x65b472b3debe09f5040d4ef55d92a96ba0a875c8a20385d73a021e6917d9c5f3(pending)0x58c7058a798971f7a515258dc48d282bf43fe310  IN  0xbd4b50bbf385195c410a625681ff29d439ba61f30 Ether(Pending)
0xa6e821a183bb9d569da0eadf764d18e8057afa23acfe17e7c9f5665bcbe7612b(pending)0xfc12d884e4ab95dcbb50fb984aa180eacd74a303  IN  0xbd4b50bbf385195c410a625681ff29d439ba61f30 Ether(Pending)
0x6da6378dfe1eae52df62f920b09710554d6605dbb2a638f21088db00542cecf4(pending)0xfe12008a6401e137b524e05050a43c7e72132d82  IN  0xbd4b50bbf385195c410a625681ff29d439ba61f30 Ether(Pending)
0x703f0cf78c25a237454f685d1021ba66f63135bed96b465c51a14262bc888a0b(pending)0xf875b5d526ed04d3b1aa34c889ff923327db0a86  IN  0xbd4b50bbf385195c410a625681ff29d439ba61f30 Ether(Pending)
0x76025d71bfc6723af0bea560d65abcca771e0a454147cfdf3eab6cbe8cb6dde8(pending)0x2e2a0906fb12ee584fefdc21fdfe8129f69abb3e  IN  0xbd4b50bbf385195c410a625681ff29d439ba61f30 Ether(Pending)
0xcc4f1a79997501d0d7ade86d3ce49d760a364bdabd94189263429ac619ee5eb6(pending)0x03befcf112049894df51b4532dfd50a292c7afeb  IN  0xbd4b50bbf385195c410a625681ff29d439ba61f30.018 Ether(Pending)
0x9a9077503b616a788f1ff060189c7777b418cbae318625692afada062600344247 mins ago0xee80db4997098b2b517223636f15d51a61f3549b  IN   Etheremon_Trade20 Ether0.000416826
0xd04985080df7c5c7daca26be99a2fa65973d1459683230ccec3c116e1678074748 mins ago0xee80db4997098b2b517223636f15d51a61f3549b  IN   Etheremon_Trade20 Ether0.000416826
0x055db515d446723d06659a75c850e0bdf2760335432c5d92afe8d3e35ccc50951 hr 6 mins ago0x19a7ecbbfceacb3d67fc69293baf42b2ec83b7cb  IN   Etheremon_Trade20.029 Ether0.000349132
0x6f85cd0781700670532cb49e570c71d5605a02cd7699deccc812121e2dbd23ab1 hr 44 mins ago0xa6fe83dcf28cc982818656ba680e03416824d5e4  IN   Etheremon_Trade20 Ether0.00033879888
0x421ae559ea5f39ede5e441d88f1f56d4c16d39929f83f24e0bf609f9771d42323 hrs 30 mins ago0x7ebc7e83cb2b43deafa82eb0ae8b5daea3fe9a13  IN   Etheremon_Trade20 Ether0.000486521
0xbf6b160fea8024cbb473504b0cd1e19c09a64030399915bce4fdf1edcc31fa2d3 hrs 49 mins ago0x7ebc7e83cb2b43deafa82eb0ae8b5daea3fe9a13  IN   Etheremon_Trade20 Ether0.0001218455
0xad73e629f5cedf8763e4e28c441207a45b89944a5fce1cf6a6a3e03985ce8ff24 hrs 12 mins ago0x325aae7ab680a0c6511079447a293f2aad3f38d6  IN   Etheremon_Trade20 Ether0.000486521
0xaae7d2d75a2a090a2aa48bcca64efc7a87f4a18e38c9021ee5ea2937825512804 hrs 23 mins ago0xb61ce2b4347bf9a028611f98dbdc8658a47457a2  IN   Etheremon_Trade20 Ether0.000208878
0xc41a7f4830eed4f4bcc5d3f3685d69db0b8a7dae225c7fe4a10ba4d0d524b19d4 hrs 24 mins ago0xb61ce2b4347bf9a028611f98dbdc8658a47457a2  IN   Etheremon_Trade20 Ether0.000834036
0x7601cd6522bb4b3fccdc980edc4a242e8b1fd1b449589778d96c62d627da58764 hrs 34 mins ago0xa5db9caae95f8059eaac6b742bbb7ebf422077d4  IN   Etheremon_Trade20 Ether0.00074796
0x6f186b402f7c748a0e1b1de495ac5062a6a6ce7e162c7ce5d81691f7c1db20764 hrs 34 mins ago0xb26efeef1d5cfbccfbe535086e68883575a65079  IN   Etheremon_Trade20 Ether0.000556024
0x2ed765cd0dd062ce61e8aeacdf70e968ea6d34d24ccc33a28a00b7ac5beca71b5 hrs 9 mins ago0x0c4d226cca34e10fa0b080de571b36935829ac08  IN   Etheremon_Trade20 Ether0.00096099
0xaaddacf14017adc6afa6301378415311d5543ad880409fd6ffc6f85a04c967d25 hrs 53 mins ago0x8e5d30f161ba3ebb09dc3c1f06515656af34baa1  IN   Etheremon_Trade20 Ether0.0005838252
0x13c56d807d40bd790fb648275271e56274cdb33c13b73a44b430d085d51723a65 hrs 59 mins ago0x8e5d30f161ba3ebb09dc3c1f06515656af34baa1  IN   Etheremon_Trade20 Ether0.0005838252
0x924a58963c45e331dbb08eea3b5c4f3cff8965fd1a452ce4214206d4091433956 hrs 1 min ago0xc552563d9a01261ab91560ee84a6da252d22cc88  IN   Etheremon_Trade20 Ether0.0001328334
0x728c2055636dbb7e064d1c210ea594a28d1fb10d940047ea28a100327769d6296 hrs 2 mins ago0xc552563d9a01261ab91560ee84a6da252d22cc88  IN   Etheremon_Trade20 Ether0.0001462146
0x44091c5a230275402555df37a39cde68e10ba26593518297b1e50630465eb3296 hrs 9 mins ago0xc552563d9a01261ab91560ee84a6da252d22cc88  IN   Etheremon_Trade20 Ether0.0001462146
0x649f497cb164337534ef6dfc9c7bf0fccf1cf71ed6aed8ef88e5234e3a9373276 hrs 46 mins ago0x19a7ecbbfceacb3d67fc69293baf42b2ec83b7cb  IN   Etheremon_Trade20.02 Ether0.000421264
0x27df0ff4e7e332184f607e501e2189723a561fc7da9bf541d5c21f0d681797526 hrs 47 mins ago0x19a7ecbbfceacb3d67fc69293baf42b2ec83b7cb  IN   Etheremon_Trade20.02 Ether0.000445664
[ 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
0x055db515d446723d06659a75c850e0bdf2760335432c5d92afe8d3e35ccc509568912041 hr 6 mins ago0xbd4b50bbf385195c410a625681ff29d439ba61f30x5baf04067280b4c59bffdb4e663f56a093a2a0c50.02813 Ether
0x649f497cb164337534ef6dfc9c7bf0fccf1cf71ed6aed8ef88e5234e3a93732768897946 hrs 46 mins ago0xbd4b50bbf385195c410a625681ff29d439ba61f30xc674d5f701bbd8a79315cd2434af18c75816856e0.0194 Ether
0x27df0ff4e7e332184f607e501e2189723a561fc7da9bf541d5c21f0d6817975268897926 hrs 47 mins ago0xbd4b50bbf385195c410a625681ff29d439ba61f30x946e985c5088e1cdf162e34954a39cd7404a30460.0194 Ether
0xa53badd83b41ce983c545823f4c39ac064a44b0d8491a3c9f0d1b0146932a6db688877410 hrs 50 mins ago0xbd4b50bbf385195c410a625681ff29d439ba61f30x6de7cac2d804133b551a02a4cb700098452940dd0.02231 Ether
0x0cb10be4bab9e19ecc4233f526aaae2601f80b09ffd5ed617d15f6c084285296688804713 hrs 38 mins ago0xbd4b50bbf385195c410a625681ff29d439ba61f30x492ab85d98b3b2979116c9a47b44f69d606b70450.0388 Ether
0xdcebb5d918813bb9cf00e6241766492001034a4a0d9e82574f7d7b3398acf5a6688744316 hrs 2 mins ago0xbd4b50bbf385195c410a625681ff29d439ba61f30xa6fe83dcf28cc982818656ba680e03416824d5e40.008245 Ether
0x51c63c0724dfecb2796230acd241ccb76e0f80cbf6d4265555d889e2f736e741688743116 hrs 5 mins ago0xbd4b50bbf385195c410a625681ff29d439ba61f30xff684104992bd26b6326bca4620d733526c0ddb10.005044 Ether
0x183134cb94304ad31c165abf1cf47c492613e9104b06d4f3fec9cda61bbb020f688742916 hrs 6 mins ago0xbd4b50bbf385195c410a625681ff29d439ba61f30xf767d647416626787e3c433c7c1d578f838bfd060.006014 Ether
0x095fa04e73bbdfefb22445255c24fdc29eb8b21c2168c3dbe5a6bc8643c914ac688722316 hrs 56 mins ago0xbd4b50bbf385195c410a625681ff29d439ba61f30x82f45b68d11762499d2542c30a7ad3a05074a9ad0.02425 Ether
0xcb2a160d06148ad3423851245b384316d65754058755a18e114c1d50548090a6688620320 hrs 54 mins ago0xbd4b50bbf385195c410a625681ff29d439ba61f30x8107be3d8da51a2369c9e9748cf56a568ec6721e0.003589 Ether
0xa743eda34f6bac7904e75bf3c09963737239e8699b92b1ee11d41a247457d9ab688603721 hrs 34 mins ago0xbd4b50bbf385195c410a625681ff29d439ba61f30xa806a4c9660e29c29465743e554e68b08a07d1130.0291 Ether
0x98ced30cc1a845bb45afc862e3ddbece753b350ffd93588f51ad2d294b0d9346688581322 hrs 25 mins ago0xbd4b50bbf385195c410a625681ff29d439ba61f30xcc21d51148bb976c64a2a1a8ea19a9f8c5c698950.00873 Ether
0x4109f3bad1ae00e96a47ae2a92783f66e31e2cb8fb9c5ccbbdf8c41b878c268c688574122 hrs 41 mins ago0xbd4b50bbf385195c410a625681ff29d439ba61f30xfa7b07b6de964d022c832f20ced2dac16384b7aa0.0679 Ether
0x8770f38182661c167f45203278a43ee0fffa82708ac316961160bcb902c33dee688573922 hrs 41 mins ago0xbd4b50bbf385195c410a625681ff29d439ba61f30x44b92ce1993431327ff20fe7997a1164094a45990.0485 Ether
0x88cb02bf5a50deff5ece656ccaf2f847fd5c1c3ce7935d99f3e11aca59bb2f48688572022 hrs 46 mins ago0xbd4b50bbf385195c410a625681ff29d439ba61f30x44b92ce1993431327ff20fe7997a1164094a45990.04365 Ether
0x49ea19f286999be9cf0d20607b93950a9829d8d078054701e1504c107d59e74368854241 day ago0xbd4b50bbf385195c410a625681ff29d439ba61f30x1d08b5667c9de15b5ab40f882d2bff6deae2c83d0.2134 Ether
0x02c05eb453aae5757aec354ba558f0ec18707d646ee471b90e60c45813f2561e68845371 day 3 hrs ago0xbd4b50bbf385195c410a625681ff29d439ba61f30x99a811e5c62add613975456292f836115aea01640.0291 Ether
0xf48c299bc0723a726f3e3774e84902356634fabc375023956e353b5082546f6768844351 day 4 hrs ago0xbd4b50bbf385195c410a625681ff29d439ba61f30x798fa50a44155df9bf72b36ba22f5c2ace19fdfe1.1155 Ether
0x8de21c252f039e41c45919a5ff902d8fb32a098bb42faa10c183b6fcc2aaec9968841821 day 5 hrs ago0xbd4b50bbf385195c410a625681ff29d439ba61f30xb5db6cb03cedec9d03b41d0d55ce5ad55c92732d0.004753 Ether
0x0df21ecfef33fb910286d3e123de02972b40e0fef17283500b51ca33bbf4950868841651 day 5 hrs ago0xbd4b50bbf385195c410a625681ff29d439ba61f30xf26716c00c66bef39b879908049f2bf8c53a92250.04753 Ether
0xea5ad401364f5d888465ba167d79bc8a0b96a9fc359c6e4b86e1d3578b4e908968839941 day 5 hrs ago0xbd4b50bbf385195c410a625681ff29d439ba61f30x99a811e5c62add613975456292f836115aea01640.00485 Ether
0x7495766ccf98cf76e8de7154d5b2f27d163a39cf4a3253dd2ac0b6952a4ed47f68839911 day 5 hrs ago0xbd4b50bbf385195c410a625681ff29d439ba61f30xff1a9252def51ede4489c05998f5e7cf8ad2c1b30.00485 Ether
0x317ae33578a5ac4fb9ecc81511a91350c7a3691ad2899145bbd9129a6415194468839851 day 5 hrs ago0xbd4b50bbf385195c410a625681ff29d439ba61f30x0d88f5f9711834dfcaa83a2be9dd960fb718eae70.00582 Ether
0x7968bad85df9e2e6bebf51bb2609322e3c4388de60dee530e72d3731cead069368836981 day 6 hrs ago0xbd4b50bbf385195c410a625681ff29d439ba61f30x492ab85d98b3b2979116c9a47b44f69d606b70450.03007 Ether
0xed4aaaaa581c4cb6a37881a121dc3ddda095200305d0507ea3922404205b965d68836961 day 6 hrs ago0xbd4b50bbf385195c410a625681ff29d439ba61f30x98c25d403b792cf0c46e2ac13bfb993371cb65370.02328 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.