Sponsored Link:   PAVOCOIN - IoT blockchain for the AgTech ecosystem. Bringing together IoT, blockchain, and agriculture. Join now!
Contract Overview
Balance: 0 Ether
Ether Value: $0
Transactions: 1 txn
 Latest 1 txn


TxHash Age From To Value [TxFee]
0xbb5caf7735c71855a32286cbea65e519b1f6da42a10f65c48c78a941b20ae8085 days 5 hrs ago0x553489ea2e3e2c3aa13a574dfe3e4bb5a53a64b3  IN    Contract Creation0 Ether0.0063718
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
View All
ParentTxHash Block Age From To Value
Contract Source Code Verified (Exact match)
Contract Name: DataAuction
Compiler Version: v0.4.21+commit.dfe3193c
Optimization Enabled: Yes
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts

/* ==================================================================== */
/* Copyright (c) 2018 The ether.online Project.  All rights reserved.
/* 
/* https://ether.online  The first RPG game of blockchain 
/*  
/* authors [email protected]   
/*         [email protected]            
/* ==================================================================== */

pragma solidity ^0.4.20;

contract AccessAdmin {
    bool public isPaused = false;
    address public addrAdmin;  

    event AdminTransferred(address indexed preAdmin, address indexed newAdmin);

    function AccessAdmin() public {
        addrAdmin = msg.sender;
    }  


    modifier onlyAdmin() {
        require(msg.sender == addrAdmin);
        _;
    }

    modifier whenNotPaused() {
        require(!isPaused);
        _;
    }

    modifier whenPaused {
        require(isPaused);
        _;
    }

    function setAdmin(address _newAdmin) external onlyAdmin {
        require(_newAdmin != address(0));
        AdminTransferred(addrAdmin, _newAdmin);
        addrAdmin = _newAdmin;
    }

    function doPause() external onlyAdmin whenNotPaused {
        isPaused = true;
    }

    function doUnpause() external onlyAdmin whenPaused {
        isPaused = false;
    }
}

contract AccessService is AccessAdmin {
    address public addrService;
    address public addrFinance;

    modifier onlyService() {
        require(msg.sender == addrService);
        _;
    }

    modifier onlyFinance() {
        require(msg.sender == addrFinance);
        _;
    }

    function setService(address _newService) external {
        require(msg.sender == addrService || msg.sender == addrAdmin);
        require(_newService != address(0));
        addrService = _newService;
    }

    function setFinance(address _newFinance) external {
        require(msg.sender == addrFinance || msg.sender == addrAdmin);
        require(_newFinance != address(0));
        addrFinance = _newFinance;
    }

    function withdraw(address _target, uint256 _amount) 
        external 
    {
        require(msg.sender == addrFinance || msg.sender == addrAdmin);
        require(_amount > 0);
        address receiver = _target == address(0) ? addrFinance : _target;
        uint256 balance = this.balance;
        if (_amount < balance) {
            receiver.transfer(_amount);
        } else {
            receiver.transfer(this.balance);
        }      
    }
}

interface IDataMining {
    function getRecommender(address _target) external view returns(address);
    function subFreeMineral(address _target) external returns(bool);
}

interface IDataEquip {
    function isEquiped(address _target, uint256 _tokenId) external view returns(bool);
    function isEquipedAny2(address _target, uint256 _tokenId1, uint256 _tokenId2) external view returns(bool);
    function isEquipedAny3(address _target, uint256 _tokenId1, uint256 _tokenId2, uint256 _tokenId3) external view returns(bool);
}

interface IDataAuction {
    function isOnSale(uint256 _tokenId) external view returns(bool);
    function isOnSaleAny2(uint256 _tokenId1, uint256 _tokenId2) external view returns(bool);
    function isOnSaleAny3(uint256 _tokenId1, uint256 _tokenId2, uint256 _tokenId3) external view returns(bool);
}

contract DataAuction is IDataAuction, AccessAdmin {
    IDataAuction public ethAuction;
    IDataAuction public platAuction;

    function DataAuction(address _ethAddr, address _platAddr) public {
        ethAuction = IDataAuction(_ethAddr);
        platAuction = IDataAuction(_platAddr);
    }

    function setEthAuction(address _ethAddr) external onlyAdmin {
        ethAuction = IDataAuction(_ethAddr);
    }

    function setPlatAuction(address _platAddr) external onlyAdmin {
        platAuction = IDataAuction(_platAddr);
    }

    function isOnSale(uint256 _tokenId) external view returns(bool) {
        if (address(ethAuction) != address(0) && ethAuction.isOnSale(_tokenId)) {
            return true;   
        }
        if (address(platAuction) != address(0) && platAuction.isOnSale(_tokenId)) {
            return true;   
        }
    }

    function isOnSaleAny2(uint256 _tokenId1, uint256 _tokenId2) external view returns(bool) {
        if (address(ethAuction) != address(0) && ethAuction.isOnSaleAny2(_tokenId1, _tokenId2)) {
            return true;   
        }
        if (address(platAuction) != address(0) && platAuction.isOnSaleAny2(_tokenId1, _tokenId2)) {
            return true;   
        }
        return false;
    }

    function isOnSaleAny3(uint256 _tokenId1, uint256 _tokenId2, uint256 _tokenId3) external view returns(bool) {
        if (address(ethAuction) != address(0) && ethAuction.isOnSaleAny3(_tokenId1, _tokenId2, _tokenId3)) {
            return true;   
        }
        if (address(platAuction) != address(0) && platAuction.isOnSaleAny3(_tokenId1, _tokenId2, _tokenId3)) {
            return true;   
        }
        return false;
    }
}

    Contract ABI  
[{"constant":false,"inputs":[{"name":"_platAddr","type":"address"}],"name":"setPlatAuction","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"doUnpause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_ethAddr","type":"address"}],"name":"setEthAuction","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"doPause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_newAdmin","type":"address"}],"name":"setAdmin","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_tokenId1","type":"uint256"},{"name":"_tokenId2","type":"uint256"}],"name":"isOnSaleAny2","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"platAuction","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isPaused","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"addrAdmin","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ethAuction","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"isOnSale","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_tokenId1","type":"uint256"},{"name":"_tokenId2","type":"uint256"},{"name":"_tokenId3","type":"uint256"}],"name":"isOnSaleAny3","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_ethAddr","type":"address"},{"name":"_platAddr","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"preAdmin","type":"address"},{"indexed":true,"name":"newAdmin","type":"address"}],"name":"AdminTransferred","type":"event"}]

  Contract Creation Code Switch To Opcodes View
60606040526000805460ff19169055341561001957600080fd5b604051604080610804833981016040528080519190602001805160008054600160a060020a033381166101000261010060a860020a03199092169190911790915560018054958216600160a060020a031996871617905560028054919092169416939093179092555050610772806100926000396000f3006060604052600436106100a05763ffffffff60e060020a6000350416630ac313e081146100a557806330efb8d3146100c6578063535c69b6146100d957806367d0661d146100f8578063704b6c021461010b578063a5c464b31461012a578063a9615f5914610157578063b187bd2614610186578063bfae2f0e14610199578063c95acadd146101ac578063f0f2805f146101bf578063f3b42c40146101d5575b600080fd5b34156100b057600080fd5b6100c4600160a060020a03600435166101f1565b005b34156100d157600080fd5b6100c4610240565b34156100e457600080fd5b6100c4600160a060020a036004351661027d565b341561010357600080fd5b6100c46102cc565b341561011657600080fd5b6100c4600160a060020a036004351661030b565b341561013557600080fd5b6101436004356024356103b6565b604051901515815260200160405180910390f35b341561016257600080fd5b61016a6104d3565b604051600160a060020a03909116815260200160405180910390f35b341561019157600080fd5b6101436104e2565b34156101a457600080fd5b61016a6104eb565b34156101b757600080fd5b61016a6104ff565b34156101ca57600080fd5b61014360043561050e565b34156101e057600080fd5b610143600435602435604435610616565b60005433600160a060020a03908116610100909204161461021157600080fd5b6002805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60005433600160a060020a03908116610100909204161461026057600080fd5b60005460ff16151561027157600080fd5b6000805460ff19169055565b60005433600160a060020a03908116610100909204161461029d57600080fd5b6001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60005433600160a060020a0390811661010090920416146102ec57600080fd5b60005460ff16156102fc57600080fd5b6000805460ff19166001179055565b60005433600160a060020a03908116610100909204161461032b57600080fd5b600160a060020a038116151561034057600080fd5b600054600160a060020a03808316916101009004167ff8ccb027dfcd135e000e9d45e6cc2d662578a8825d4c45b5e32e0adf67e79ec660405160405180910390a360008054600160a060020a039092166101000274ffffffffffffffffffffffffffffffffffffffff0019909216919091179055565b600154600090600160a060020a0316158015906104345750600154600160a060020a031663a5c464b3848460405160e060020a63ffffffff851602815260048101929092526024820152604401602060405180830381600087803b151561041c57600080fd5b5af1151561042957600080fd5b505050604051805190505b15610441575060016104cd565b600254600160a060020a0316158015906104bc5750600254600160a060020a031663a5c464b3848460405160e060020a63ffffffff851602815260048101929092526024820152604401602060405180830381600087803b15156104a457600080fd5b5af115156104b157600080fd5b505050604051805190505b156104c9575060016104cd565b5060005b92915050565b600254600160a060020a031681565b60005460ff1681565b6000546101009004600160a060020a031681565b600154600160a060020a031681565b600154600090600160a060020a0316158015906105865750600154600160a060020a031663f0f2805f8360405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b151561056e57600080fd5b5af1151561057b57600080fd5b505050604051805190505b1561059357506001610611565b600254600160a060020a0316158015906106085750600254600160a060020a031663f0f2805f8360405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b15156105f057600080fd5b5af115156105fd57600080fd5b505050604051805190505b15610611575060015b919050565b600154600090600160a060020a03161580159061069d5750600154600160a060020a031663f3b42c4085858560405160e060020a63ffffffff8616028152600481019390935260248301919091526044820152606401602060405180830381600087803b151561068557600080fd5b5af1151561069257600080fd5b505050604051805190505b156106aa5750600161073f565b600254600160a060020a03161580159061072e5750600254600160a060020a031663f3b42c4085858560405160e060020a63ffffffff8616028152600481019390935260248301919091526044820152606401602060405180830381600087803b151561071657600080fd5b5af1151561072357600080fd5b505050604051805190505b1561073b5750600161073f565b5060005b93925050505600a165627a7a72305820eb43f54d934f3aab4789f9b3c07d454ee95661d29295b3f479d0f797932d2de00029000000000000000000000000eae08961bf8bfe92879b1455c96893e313c8d858000000000000000000000000841c87a11832d1d2386ffab3bfd0e999c6a7a338

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

-----Decoded View---------------
Found 2 constructor arguments :
Arg [0] : 000000000000000000000000eae08961bf8bfe92879b1455c96893e313c8d858
Arg [1] : 000000000000000000000000841c87a11832d1d2386ffab3bfd0e999c6a7a338


   Swarm Source:
bzzr://eb43f54d934f3aab4789f9b3c07d454ee95661d29295b3f479d0f797932d2de0

 

View All
Block Age txn Difficulty GasUsed Reward
View All
Block Age UncleNumber Difficulty GasUsed Reward
Make sure to use the "downvote" button for any spammy posts, and the "upvote" for interesting conversations.