Contract Address Details

0x409AC0A8e5c0CF6cF9443D7964feE5715d32521b

Contract Name
EWCNFTAuctionHouse
Creator
0x0690c9–bbca57 at 0x066570–a544f6
Balance
0 EWT ( )
Tokens
Fetching tokens...
Transactions
102 Transactions
Transfers
107 Transfers
Gas Used
13,575,547
Last Balance Update
33392012
Contract name:
EWCNFTAuctionHouse




Optimization enabled
false
Compiler version
v0.5.17+commit.d19bba13




EVM Version
default




Verified at
2023-02-11T17:19:44.651487Z

Contract source code

// File: nftauction/IERC165.sol


pragma solidity ^0.5.17;

/**
 * @title IERC165
 * @dev https://eips.ethereum.org/EIPS/eip-165
 */
interface IERC165 {
    /**
     * @notice Query if a contract implements an interface
     * @param interfaceId The interface identifier, as specified in ERC-165
     * @dev Interface identification is specified in ERC-165. This function
     * uses less than 30,000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}
// File: nftauction/IERC721.sol


pragma solidity ^0.5.17;


/**
 * @title ERC721 Non-Fungible Token Standard basic interface
 * @dev see https://eips.ethereum.org/EIPS/eip-721
 */
contract IERC721 is IERC165 {
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    function balanceOf(address owner) public view returns (uint256 balance);
    function ownerOf(uint256 tokenId) public view returns (address owner);

    function approve(address to, uint256 tokenId) public;
    function getApproved(uint256 tokenId) public view returns (address operator);

    function setApprovalForAll(address operator, bool _approved) public;
    function isApprovedForAll(address owner, address operator) public view returns (bool);

    function transferFrom(address from, address to, uint256 tokenId) public;
    function safeTransferFrom(address from, address to, uint256 tokenId) public;

    function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public;
}
// File: nftauction/Ownable.sol


pragma solidity ^0.5.17;
/**
 * @title Ownable
 * @dev The Ownable contract has an owner address, and provides basic authorization control
 * functions, this simplifies the implementation of "user permissions".
 */
contract Ownable {
  address public owner;


  event OwnershipRenounced(address indexed previousOwner);
  event OwnershipTransferred(
    address indexed previousOwner,
    address indexed newOwner
  );


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

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

  /**
   * @dev Allows the current owner to relinquish control of the contract.
   * @notice Renouncing to ownership will leave the contract without an owner.
   * It will not be possible to call the functions with the `onlyOwner`
   * modifier anymore.
   */
  function renounceOwnership() public onlyOwner {
    emit OwnershipRenounced(owner);
    owner = address(0);
  }

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

  /**
   * @dev Transfers control of the contract to a newOwner.
   * @param _newOwner The address to transfer ownership to.
   */
  function _transferOwnership(address _newOwner) internal {
    require(_newOwner != address(0));
    emit OwnershipTransferred(owner, _newOwner);
    owner = _newOwner;
  }
}
// File: nftauction/AddressUtils.sol


pragma solidity ^0.5.17;
/**
 * Utility library of inline functions on addresses
 */
library AddressUtils {

  /**
   * Returns whether the target address is a contract
   * @dev This function will return false if invoked during the constructor of a contract,
   *  as the code is not actually created until after the constructor finishes.
   * @param addr address to check
   * @return whether the target address is a contract
   */
  function isContract(address addr) internal view returns (bool) {
    uint256 size;
    // XXX Currently there is no better way to check if there is a contract in an address
    // than to check the size of the code at that address.
    // See https://ethereum.stackexchange.com/a/14016/36603
    // for more details about how this works.
    // TODO Check this again before the Serenity release, because all addresses will be
    // contracts then.
    assembly { size := extcodesize(addr) }  // solium-disable-line security/no-inline-assembly
    return size > 0;
  }

}
// File: nftauction/SafeMath.sol


pragma solidity ^0.5.17;
library SafeMath {
  function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
    if (a == 0) {
      return 0;
    }
    c = a * b;
    assert(c / a == b);
    return c;
  }

  function div(uint256 a, uint256 b) internal pure returns (uint256) {
    // assert(b > 0); // Solidity automatically throws when dividing by 0
    // uint256 c = a / b;
    // assert(a == b * c + a % b); // There is no case in which this doesn't hold
    return a / b;
  }

  function sub(uint256 a, uint256 b) internal pure returns (uint256) {
    assert(b <= a);
    return a - b;
  }

  function add(uint256 a, uint256 b) internal pure returns (uint256 c) {
    c = a + b;
    assert(c >= a);
    return c;
  }
}
// File: nftauction/ERC721.sol


pragma solidity ^0.5.17;




contract ERC721Receiver {
  bytes4 constant ERC721_RECEIVED = 0xf0b9e5ba;

  function onERC721Received(address _from, uint256 _tokenId, bytes memory _data) public returns(bytes4);
}


contract ERC721Interface {
    // events
    event Transfer(address indexed _from, address indexed _to, uint256 _tokenId);
    event Approval(address indexed _owner, address indexed _approved, uint256 _tokenId);
    event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved);

    // interface
    function balanceOf(address _owner) public view returns (uint256);
    function ownerOf(uint256 _tokenId) public view returns (address);
    function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes memory data) public;
    function safeTransferFrom(address _from, address _to, uint256 _tokenId) public;
    function transferFrom(address _from, address _to, uint256 _tokenId) public;
    function approve(address _approved, uint256 _tokenId) public;
    function setApprovalForAll(address _operator, bool _approved) public;
    function getApproved(uint256 _tokenId) public view returns (address);
    function isApprovedForAll(address _owner, address _operator) public view returns (bool);
}

contract ERC721 is ERC721Interface {
    using SafeMath for uint256;
    using AddressUtils for address;

    // Equals to `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))`
    // which can be also obtained as `ERC721Receiver(0).onERC721Received.selector`
    bytes4 constant ERC721_RECEIVED = 0xf0b9e5ba;

    // who owns which NFT
    mapping(uint256 => address) internal tokenOwner;

    // how many NFT an owner has (ownerAddress => tokenCounter)
    mapping (address => uint256) internal ownedTokensCount;

    // which account is approved to transfer a NFT (tokenId => approvedAddress)
    mapping (uint256 => address) internal tokenApprovals;

    // Mapping from owner to operator approvals
    // address "A" allows address "B" to operate all A's assets
    mapping (address => mapping (address => bool)) internal operatorApprovals;


    modifier canTransfer(uint256 _tokenId) {
        require(isApprovedOrOwner(msg.sender, _tokenId));
        _;
    }

    function isApprovedOrOwner(address _spender, uint256 _tokenId) internal view returns (bool) {
        address owner = ownerOf(_tokenId);
        return _spender == owner || getApproved(_tokenId) == _spender || isApprovedForAll(owner, _spender);
    }

    function balanceOf(address _owner) public view returns (uint256) {
        require(_owner != address(0));
        return ownedTokensCount[_owner];
    }

    function ownerOf(uint256 _tokenId) public view returns (address) {
        address owner = tokenOwner[_tokenId];
        require(owner != address(0));
        return owner;
    }

    function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes memory data) public {
        // if target address is a contract, make sure it supports ERC721 interface
        if (_to.isContract()) {
            bytes4 retval = ERC721Receiver(_to).onERC721Received(_from, _tokenId, data);
            require(retval == ERC721_RECEIVED);
        }
        transferFrom(_from, _to, _tokenId);
    }

    function safeTransferFrom(address _from, address _to, uint256 _tokenId) public {
        safeTransferFrom(_from, _to, _tokenId, "");
    }

    function clearApproval(address _owner, uint256 _tokenId) internal {
        require(ownerOf(_tokenId) == _owner);
        if (tokenApprovals[_tokenId] != address(0)) {
            tokenApprovals[_tokenId] = address(0);
            emit Approval(_owner, address(0), _tokenId);
        }
    }

    function removeTokenFrom(address _from, uint256 _tokenId) internal {
        require(ownerOf(_tokenId) == _from);
        ownedTokensCount[_from] = ownedTokensCount[_from].sub(1);
        tokenOwner[_tokenId] = address(0);
    }

    function addTokenTo(address _to, uint256 _tokenId) internal {
        require(tokenOwner[_tokenId] == address(0));
        tokenOwner[_tokenId] = _to;
        ownedTokensCount[_to] = ownedTokensCount[_to].add(1);
    }

    function transferFrom(address _from, address _to, uint256 _tokenId) public canTransfer(_tokenId) {
        require(_from != address(0));
        require(_to != address(0));

        clearApproval(_from, _tokenId);
        removeTokenFrom(_from, _tokenId);
        addTokenTo(_to, _tokenId);

        emit Transfer(_from, _to, _tokenId);
    }

    function approve(address _approved, uint256 _tokenId) public {
        address owner = ownerOf(_tokenId);
        require(_approved != owner);
        require(msg.sender == owner || isApprovedForAll(owner, msg.sender));

        if (getApproved(_tokenId) != address(0) || _approved != address(0)) {
            tokenApprovals[_tokenId] = _approved;
            emit Approval(owner, _approved, _tokenId);
        }
    }

    function setApprovalForAll(address _operator, bool _approved) public {
        require(_operator != msg.sender);
        operatorApprovals[msg.sender][_operator] = _approved;
        emit ApprovalForAll(msg.sender, _operator, _approved);
    }

    function getApproved(uint256 _tokenId) public view returns (address) {
        return tokenApprovals[_tokenId];
    }

    function isApprovedForAll(address _owner, address _operator) public view returns (bool) {
        return operatorApprovals[_owner][_operator];
    }

    function onERC721Received(address, uint256, bytes memory) public pure returns (bytes4) {
        return ERC721_RECEIVED;
    }
}
// File: nftauction/ERC20.sol


pragma solidity ^0.5.17;



contract ERC20Interface {
  function totalSupply() public view returns (uint256);
  function balanceOf(address who) public view returns (uint256);
  function transfer(address to, uint256 value) public returns (bool);
  function allowance(address owner, address spender) public view returns (uint256);
  function transferFrom(address from, address to, uint256 value) public returns (bool);
  function approve(address spender, uint256 value) public returns (bool);

  event Approval(address indexed owner, address indexed spender, uint256 value);
  event Transfer(address indexed from, address indexed to, uint256 value);
}

contract ERC20 is ERC20Interface {

    // who owns how many tokens
    mapping(address => uint256) balances;

    // account "A" allows account "B" to extract "X" amount
    mapping(address => mapping(address => uint256)) internal allowed;

    function balanceOf(address who) public view returns (uint256) {
        return balances[who];
    }

    function transfer(address to, uint256 value) public returns (bool) {
        require(to != address(0));
        require(balances[msg.sender] >= value);

        balances[msg.sender] = SafeMath.sub(balances[msg.sender], value);
        balances[to] = SafeMath.add(balances[to], value);

        emit Transfer(msg.sender, to, value);
        return true;
    }

    function allowance(address owner, address spender) public view returns (uint256) {
        return allowed[owner][spender];
    }

    function transferFrom(address from, address to, uint256 value) public returns (bool) {
        require(from != address(0));
        require(balances[from] >= value);
        require(allowed[from][msg.sender] >= value);

        balances[from] = SafeMath.sub(balances[from], value);
        balances[to] = SafeMath.add(balances[to], value);
        allowed[from][msg.sender] = SafeMath.sub(allowed[from][msg.sender], value);

        emit Transfer(from, to, value);
        return true;
    }

    function approve(address spender, uint256 value) public returns (bool) {
        allowed[msg.sender][spender] = value;

        emit Approval(msg.sender, spender, value);
        return true;
    }
}
// File: nftauction/auction.sol


pragma solidity ^0.5.17;







contract EWCNFTAuctionHouse is Ownable {
    mapping(address => bool) public authorized;
    using SafeMath for uint256;
    using AddressUtils for address;

    uint256 public saleFee = 100; // 1% sale fee
    address public saleFeeWalletAddress = 0x2A8B5A587F60c0EE39d85df41590BAD8c2aCB55e;

    event AuctionCreated(
        uint256 _index, address _asset, uint256 _assetId, address _token, 
        address _creator, uint256 _startPrice, uint256 _startTime, uint256 _duration, 
        uint256 _currentBidAmount, address _currentBidOwner, uint256 _bidCount
    );
    event AuctionBid(uint256 _index, address _bidder, uint256 _amount, uint256 _bidCount);
    event ClaimTokens(uint256 _index, address _tokensClaimer);
    event ClaimAsset(uint256 _index, address _assetClaimer);

    enum Status { pending, active, finished }
    struct Auction {
        address assetAddress;
        uint256 assetId;
        address tokenAddress;
        address creator;
        uint256 startPrice;
        uint256 startTime;
        uint256 duration;
        uint256 currentBidAmount;
        address currentBidOwner;
        uint256 bidCount;
    }
    Auction[] public auctions;

    modifier onlyAuthorized() {
        require(authorized[msg.sender] || owner == msg.sender);
        _;
    }

    function addAuthorized(address _toAdd) onlyAuthorized public {
        require(_toAdd != address(0));
        authorized[_toAdd] = true;
    }

    function removeAuthorized(address _toRemove) onlyAuthorized public {
        require(_toRemove != address(0));
        require(_toRemove != msg.sender);
        authorized[_toRemove] = false;
    }

    function setSaleFee(uint256 _newSaleFee) public onlyAuthorized {
        saleFee = _newSaleFee;
    }

    function setSaleFeeWalletAddress(address _newAddress) public onlyAuthorized {
        saleFeeWalletAddress = _newAddress;
    }

    function createAuction(address _assetAddress,
                           uint256 _assetId,
                           address _tokenAddress,
                           uint256 _startPrice,
                           uint256 _startTime,
                           uint256 _duration) public returns (uint256) {

        require(_assetAddress.isContract());
        ERC721 asset = ERC721(_assetAddress);
        require(asset.ownerOf(_assetId) == msg.sender);
        require(asset.getApproved(_assetId) == address(this));
        asset.transferFrom(msg.sender, address(this), _assetId);

        require(_tokenAddress.isContract());

        if (_startTime == 0) { _startTime = now; }

        Auction memory auction = Auction({
            creator: msg.sender,
            assetAddress: _assetAddress,
            assetId: _assetId,
            tokenAddress: _tokenAddress,
            startPrice: _startPrice,
            startTime: _startTime,
            duration: _duration,
            currentBidAmount: 0,
            currentBidOwner: address(0),
            bidCount: 0
        });
        uint256 index = auctions.push(auction) - 1;

        emit AuctionCreated(
            index, auction.assetAddress, auction.assetId, auction.tokenAddress, 
            auction.creator, auction.startPrice, auction.startTime, auction.duration,
            auction.currentBidAmount, auction.currentBidOwner, auction.bidCount
        );

        return index;
    }

    function bid(uint256 auctionIndex, uint256 amount) public {
        Auction storage auction = auctions[auctionIndex];
        require(auction.creator != address(0));
        require(isActive(auctionIndex));

        require(amount >= auction.startPrice);
        require(amount > auction.currentBidAmount);
        ERC20 token = ERC20(auction.tokenAddress);
        token.transferFrom(msg.sender, address(this), amount);
        if (auction.currentBidAmount != 0) {
            token.transfer(
                auction.currentBidOwner,
                auction.currentBidAmount
            );
        }
        auction.currentBidAmount = amount;
        auction.currentBidOwner = msg.sender;
        auction.bidCount = auction.bidCount.add(1);
        
        emit AuctionBid(auctionIndex, msg.sender, amount, auction.bidCount);
    }

    function getTotalAuctions() public view returns (uint256) { return auctions.length; }

    function isActive(uint256 index) public view returns (bool) { return getStatus(index) == Status.active; }

    function isFinished(uint256 index) public view returns (bool) { return getStatus(index) == Status.finished; }

    function getStatus(uint256 index) public view returns (Status) {
        Auction storage auction = auctions[index];
        if (now < auction.startTime) {
            return Status.pending;
        } else if (now < auction.startTime.add(auction.duration)) {
            return Status.active;
        } else {
            return Status.finished;
        }
    }

    function getCurrentBidOwner(uint256 auctionIndex) public view returns (address) { return auctions[auctionIndex].currentBidOwner; }

    function getCurrentBidAmount(uint256 auctionIndex) public view returns (uint256) { return auctions[auctionIndex].currentBidAmount; }

    function getBidCount(uint256 auctionIndex) public view returns (uint256) { return auctions[auctionIndex].bidCount; }

    function getWinner(uint256 auctionIndex) public view returns (address) {
        require(isFinished(auctionIndex));
        Auction storage auction = auctions[auctionIndex];
        if (auction.currentBidOwner == address(0)) {
            return auctions[auctionIndex].creator;
        }
        else {
            return auctions[auctionIndex].currentBidOwner;
        }
    }

    function claimTokens(uint256 auctionIndex) public {
        require(isFinished(auctionIndex));
        Auction storage auction = auctions[auctionIndex];

        require(auction.creator == msg.sender);
        ERC20 token = ERC20(auction.tokenAddress);
        require(token.transfer(auction.creator, (auction.currentBidAmount) - ((auction.currentBidAmount) * saleFee / 10000)));
        require(token.transfer(saleFeeWalletAddress, (auction.currentBidAmount) * saleFee / 10000 ));

        emit ClaimTokens(auctionIndex, auction.creator);
    }

    function claimAsset(uint256 auctionIndex) public {
        require(isFinished(auctionIndex));
        Auction storage auction = auctions[auctionIndex];

        address winner = getWinner(auctionIndex);
        require(winner == msg.sender);

        ERC721 asset = ERC721(auction.assetAddress);
        asset.transferFrom(address(this), winner, auction.assetId);

        emit ClaimAsset(auctionIndex, winner);
    }

    // withdraw function for erc721 tokens if a nft is sent by accident to this contract, also for emergency bug cases / recovery
    function withdrawERC721(address _tokenContract, address _from, address _to, uint256 _tokenId) public payable onlyAuthorized {
        IERC721 tokenContract = IERC721(_tokenContract);
        
        tokenContract.transferFrom(_from, _to, _tokenId);
    }
    
}
        

Contract ABI

[{"type":"event","name":"AuctionBid","inputs":[{"type":"uint256","name":"_index","internalType":"uint256","indexed":false},{"type":"address","name":"_bidder","internalType":"address","indexed":false},{"type":"uint256","name":"_amount","internalType":"uint256","indexed":false},{"type":"uint256","name":"_bidCount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"AuctionCreated","inputs":[{"type":"uint256","name":"_index","internalType":"uint256","indexed":false},{"type":"address","name":"_asset","internalType":"address","indexed":false},{"type":"uint256","name":"_assetId","internalType":"uint256","indexed":false},{"type":"address","name":"_token","internalType":"address","indexed":false},{"type":"address","name":"_creator","internalType":"address","indexed":false},{"type":"uint256","name":"_startPrice","internalType":"uint256","indexed":false},{"type":"uint256","name":"_startTime","internalType":"uint256","indexed":false},{"type":"uint256","name":"_duration","internalType":"uint256","indexed":false},{"type":"uint256","name":"_currentBidAmount","internalType":"uint256","indexed":false},{"type":"address","name":"_currentBidOwner","internalType":"address","indexed":false},{"type":"uint256","name":"_bidCount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"ClaimAsset","inputs":[{"type":"uint256","name":"_index","internalType":"uint256","indexed":false},{"type":"address","name":"_assetClaimer","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"ClaimTokens","inputs":[{"type":"uint256","name":"_index","internalType":"uint256","indexed":false},{"type":"address","name":"_tokensClaimer","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"OwnershipRenounced","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":true},{"type":"address","name":"newOwner","internalType":"address","indexed":true}],"anonymous":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"addAuthorized","inputs":[{"type":"address","name":"_toAdd","internalType":"address"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"address","name":"assetAddress","internalType":"address"},{"type":"uint256","name":"assetId","internalType":"uint256"},{"type":"address","name":"tokenAddress","internalType":"address"},{"type":"address","name":"creator","internalType":"address"},{"type":"uint256","name":"startPrice","internalType":"uint256"},{"type":"uint256","name":"startTime","internalType":"uint256"},{"type":"uint256","name":"duration","internalType":"uint256"},{"type":"uint256","name":"currentBidAmount","internalType":"uint256"},{"type":"address","name":"currentBidOwner","internalType":"address"},{"type":"uint256","name":"bidCount","internalType":"uint256"}],"name":"auctions","inputs":[{"type":"uint256","name":"","internalType":"uint256"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"authorized","inputs":[{"type":"address","name":"","internalType":"address"}],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"bid","inputs":[{"type":"uint256","name":"auctionIndex","internalType":"uint256"},{"type":"uint256","name":"amount","internalType":"uint256"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"claimAsset","inputs":[{"type":"uint256","name":"auctionIndex","internalType":"uint256"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"claimTokens","inputs":[{"type":"uint256","name":"auctionIndex","internalType":"uint256"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"createAuction","inputs":[{"type":"address","name":"_assetAddress","internalType":"address"},{"type":"uint256","name":"_assetId","internalType":"uint256"},{"type":"address","name":"_tokenAddress","internalType":"address"},{"type":"uint256","name":"_startPrice","internalType":"uint256"},{"type":"uint256","name":"_startTime","internalType":"uint256"},{"type":"uint256","name":"_duration","internalType":"uint256"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getBidCount","inputs":[{"type":"uint256","name":"auctionIndex","internalType":"uint256"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getCurrentBidAmount","inputs":[{"type":"uint256","name":"auctionIndex","internalType":"uint256"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"address","name":"","internalType":"address"}],"name":"getCurrentBidOwner","inputs":[{"type":"uint256","name":"auctionIndex","internalType":"uint256"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint8","name":"","internalType":"enum EWCNFTAuctionHouse.Status"}],"name":"getStatus","inputs":[{"type":"uint256","name":"index","internalType":"uint256"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getTotalAuctions","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"address","name":"","internalType":"address"}],"name":"getWinner","inputs":[{"type":"uint256","name":"auctionIndex","internalType":"uint256"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isActive","inputs":[{"type":"uint256","name":"index","internalType":"uint256"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isFinished","inputs":[{"type":"uint256","name":"index","internalType":"uint256"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"removeAuthorized","inputs":[{"type":"address","name":"_toRemove","internalType":"address"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"renounceOwnership","inputs":[],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"saleFee","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"address","name":"","internalType":"address"}],"name":"saleFeeWalletAddress","inputs":[],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"setSaleFee","inputs":[{"type":"uint256","name":"_newSaleFee","internalType":"uint256"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"setSaleFeeWalletAddress","inputs":[{"type":"address","name":"_newAddress","internalType":"address"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"_newOwner","internalType":"address"}],"constant":false},{"type":"function","stateMutability":"payable","payable":true,"outputs":[],"name":"withdrawERC721","inputs":[{"type":"address","name":"_tokenContract","internalType":"address"},{"type":"address","name":"_from","internalType":"address"},{"type":"address","name":"_to","internalType":"address"},{"type":"uint256","name":"_tokenId","internalType":"uint256"}],"constant":false}]
            

Deployed ByteCode

0x60806040526004361061014b5760003560e01c8063715018a6116100b6578063b91816111161006f578063b91816111461084a578063bdcafc55146108b3578063cf1c316a146108ee578063d3c2a5921461093f578063e8ba65091461097a578063f2fde38b146109cd5761014b565b8063715018a614610668578063744d34111461067f57806382afd23b146106ce57806386b46073146107215780638da5cb5b1461079c5780639fedb7d6146107f35761014b565b806346e04a2f1161010857806346e04a2f146103ad578063485d7d94146103e8578063571a26a014610439578063598647f8146105775780635c622a0e146105bc5780636975846a146106195761014b565b806314ec410614610150578063178021e3146101fd5780633a690d32146102285780633ef14cc8146102b65780634129b2c9146102e1578063464cd86f1461035c575b600080fd5b34801561015c57600080fd5b506101e7600480360360c081101561017357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190505050610a1e565b6040518082815260200191505060405180910390f35b34801561020957600080fd5b50610212611088565b6040518082815260200191505060405180910390f35b6102b46004803603608081101561023e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061108e565b005b3480156102c257600080fd5b506102cb61121a565b6040518082815260200191505060405180910390f35b3480156102ed57600080fd5b5061031a6004803603602081101561030457600080fd5b8101908080359060200190929190505050611227565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561036857600080fd5b506103ab6004803603602081101561037f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611342565b005b3480156103b957600080fd5b506103e6600480360360208110156103d057600080fd5b8101908080359060200190929190505050611433565b005b3480156103f457600080fd5b506104376004803603602081101561040b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611785565b005b34801561044557600080fd5b506104726004803603602081101561045c57600080fd5b8101908080359060200190929190505050611900565b604051808b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018a81526020018973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019a505050505050505050505060405180910390f35b34801561058357600080fd5b506105ba6004803603604081101561059a57600080fd5b8101908080359060200190929190803590602001909291905050506119e1565b005b3480156105c857600080fd5b506105f5600480360360208110156105df57600080fd5b8101908080359060200190929190505050611d9a565b6040518082600281111561060557fe5b60ff16815260200191505060405180910390f35b34801561062557600080fd5b506106526004803603602081101561063c57600080fd5b8101908080359060200190929190505050611e07565b6040518082815260200191505060405180910390f35b34801561067457600080fd5b5061067d611e2f565b005b34801561068b57600080fd5b506106b8600480360360208110156106a257600080fd5b8101908080359060200190929190505050611f2f565b6040518082815260200191505060405180910390f35b3480156106da57600080fd5b50610707600480360360208110156106f157600080fd5b8101908080359060200190929190505050611f57565b604051808215151515815260200191505060405180910390f35b34801561072d57600080fd5b5061075a6004803603602081101561074457600080fd5b8101908080359060200190929190505050611f82565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156107a857600080fd5b506107b1611fca565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156107ff57600080fd5b50610808611fef565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561085657600080fd5b506108996004803603602081101561086d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612015565b604051808215151515815260200191505060405180910390f35b3480156108bf57600080fd5b506108ec600480360360208110156108d657600080fd5b8101908080359060200190929190505050612035565b005b3480156108fa57600080fd5b5061093d6004803603602081101561091157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506120ec565b005b34801561094b57600080fd5b506109786004803603602081101561096257600080fd5b810190808035906020019092919050505061222d565b005b34801561098657600080fd5b506109b36004803603602081101561099d57600080fd5b8101908080359060200190929190505050612414565b604051808215151515815260200191505060405180910390f35b3480156109d957600080fd5b50610a1c600480360360208110156109f057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061243e565b005b6000610a3f8773ffffffffffffffffffffffffffffffffffffffff166124a3565b610a4857600080fd5b60008790503373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16636352211e896040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610ab557600080fd5b505afa158015610ac9573d6000803e3d6000fd5b505050506040513d6020811015610adf57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614610b1057600080fd5b3073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1663081812fc896040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610b7857600080fd5b505afa158015610b8c573d6000803e3d6000fd5b505050506040513d6020811015610ba257600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614610bd357600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166323b872dd33308a6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050600060405180830381600087803b158015610c8e57600080fd5b505af1158015610ca2573d6000803e3d6000fd5b50505050610cc58673ffffffffffffffffffffffffffffffffffffffff166124a3565b610cce57600080fd5b6000841415610cdb574293505b610ce36125c8565b6040518061014001604052808a73ffffffffffffffffffffffffffffffffffffffff1681526020018981526020018873ffffffffffffffffffffffffffffffffffffffff1681526020013373ffffffffffffffffffffffffffffffffffffffff16815260200187815260200186815260200185815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff16815260200160008152509050600060016004839080600181540180825580915050906001820390600052602060002090600a02016000909192909190915060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506020820151816001015560408201518160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060608201518160030160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506080820151816004015560a0820151816005015560c0820151816006015560e082015181600701556101008201518160080160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610120820151816009015550500390507f4e86d82cd45b37b136a2eb68a68be6c7139237838d75e0abc25d56e152fd311f81836000015184602001518560400151866060015187608001518860a001518960c001518a60e001518b61010001518c6101200151604051808c81526020018b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018a81526020018973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019b50505050505050505050505060405180910390a18093505050509695505050505050565b60025481565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff168061113257503373ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b61113b57600080fd5b60008490508073ffffffffffffffffffffffffffffffffffffffff166323b872dd8585856040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050600060405180830381600087803b1580156111fb57600080fd5b505af115801561120f573d6000803e3d6000fd5b505050505050505050565b6000600480549050905090565b600061123282612414565b61123b57600080fd5b60006004838154811061124a57fe5b90600052602060002090600a02019050600073ffffffffffffffffffffffffffffffffffffffff168160080160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156112fa57600483815481106112c057fe5b90600052602060002090600a020160030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1691505061133d565b6004838154811061130757fe5b90600052602060002090600a020160080160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169150505b919050565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16806113e657503373ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b6113ef57600080fd5b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b61143c81612414565b61144557600080fd5b60006004828154811061145457fe5b90600052602060002090600a020190503373ffffffffffffffffffffffffffffffffffffffff168160030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146114c057600080fd5b60008160020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8360030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166127106002548660070154028161153d57fe5b048560070154036040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156115ad57600080fd5b505af11580156115c1573d6000803e3d6000fd5b505050506040513d60208110156115d757600080fd5b81019080805190602001909291905050506115f157600080fd5b8073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166127106002548660070154028161164357fe5b046040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156116ad57600080fd5b505af11580156116c1573d6000803e3d6000fd5b505050506040513d60208110156116d757600080fd5b81019080805190602001909291905050506116f157600080fd5b7fc68efec673149a06190a18394fd9a25abfaeebae7cdd08de4672fd0e7ec34f0d838360030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a1505050565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff168061182957503373ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b61183257600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561186c57600080fd5b3373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156118a557600080fd5b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b6004818154811061190d57fe5b90600052602060002090600a02016000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010154908060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060040154908060050154908060060154908060070154908060080160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690806009015490508a565b6000600483815481106119f057fe5b90600052602060002090600a02019050600073ffffffffffffffffffffffffffffffffffffffff168160030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415611a5e57600080fd5b611a6783611f57565b611a7057600080fd5b8060040154821015611a8157600080fd5b80600701548211611a9157600080fd5b60008160020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff166323b872dd3330866040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b158015611b7557600080fd5b505af1158015611b89573d6000803e3d6000fd5b505050506040513d6020811015611b9f57600080fd5b8101908080519060200190929190505050506000826007015414611ca9578073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8360080160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684600701546040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015611c6c57600080fd5b505af1158015611c80573d6000803e3d6000fd5b505050506040513d6020811015611c9657600080fd5b8101908080519060200190929190505050505b828260070181905550338260080160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550611d0d600183600901546124b690919063ffffffff16565b82600901819055507f730f2240d495ac23326a84377b898e338b57feddb6bba95ae0dfa2612ded8bca8433858560090154604051808581526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200182815260200194505050505060405180910390a150505050565b60008060048381548110611daa57fe5b90600052602060002090600a020190508060050154421015611dd0576000915050611e02565b611deb816006015482600501546124b690919063ffffffff16565b421015611dfc576001915050611e02565b60029150505b919050565b600060048281548110611e1657fe5b90600052602060002090600a0201600701549050919050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611e8857600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482060405160405180910390a260008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600060048281548110611f3e57fe5b90600052602060002090600a0201600901549050919050565b600060016002811115611f6657fe5b611f6f83611d9a565b6002811115611f7a57fe5b149050919050565b600060048281548110611f9157fe5b90600052602060002090600a020160080160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900460ff1681565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16806120d957503373ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b6120e257600080fd5b8060028190555050565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff168061219057503373ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b61219957600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156121d357600080fd5b60018060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b61223681612414565b61223f57600080fd5b60006004828154811061224e57fe5b90600052602060002090600a02019050600061226983611227565b90503373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146122a357600080fd5b60008260000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff166323b872dd308486600101546040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050600060405180830381600087803b15801561238b57600080fd5b505af115801561239f573d6000803e3d6000fd5b505050507fb40ad49671cc1653d81702ecac60a7d623f8f0d24b2493666a51062bfb4457588483604051808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a150505050565b600060028081111561242257fe5b61242b83611d9a565b600281111561243657fe5b149050919050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461249757600080fd5b6124a0816124d0565b50565b600080823b905060008111915050919050565b60008183019050828110156124c757fe5b80905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561250a57600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b604051806101400160405280600073ffffffffffffffffffffffffffffffffffffffff16815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff16815260200160008152602001600081526020016000815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff16815260200160008152509056fea265627a7a723158200ad25dc39e1aa0917aa6e880b6072f374322b964b23d98b14148d4ce1856b1d064736f6c63430005110032