Address Details
contract

0x0d1EF730924a825D9780560bCee88CD41F70A79a

Contract Name
Auction
Creator
0xf48ece–cd07ba at 0x55e813–ff7a2d
Balance
0 CELO ( )
Locked CELO Balance
0.00 CELO
Voting CELO Balance
0.00 CELO
Pending Unlocked Gold
0.00 CELO
Tokens
Fetching tokens...
Transactions
2 Transactions
Transfers
2 Transfers
Gas Used
305,482
Last Balance Update
11621115
This contract has been verified via Sourcify. View contract in Sourcify repository
Contract name:
Auction




Optimization enabled
true
Compiler version
v0.8.4+commit.c7e474f2




Optimization runs
200
EVM Version
istanbul




Verified at
2022-05-25T07:45:55.106946Z

project:/contracts/Auction.sol

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

// Importing OpenZeppelin's contracts
import "@openzeppelin/contracts/utils/math/Math.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";


contract Auction is ERC721Holder, Ownable, ReentrancyGuard {

    using Math for uint256;
    using SafeMath for uint256;
    using SafeERC20 for IERC20;
    IERC20 private erc20Token;

    // static
    uint256 public immutable floorPrice;
    uint256 public immutable startTime;
    uint256 public immutable endTime;
    address private immutable beneficiary;
    uint256 private immutable tokenIssue;
    uint256 private immutable redeemQty;
    uint256 private immutable feePercent;

    // state
    bool public canceled;
    bool public ended;
    bool private fundCollected;
    uint256 public highestBindingBid;
    address public highestBidder;
    address[] private bidders;   
    mapping(address => uint256) public fundsByBidder;        
    mapping(address => bool) public rewardCollected;        
    mapping(uint256 => uint256) public tokenRedeemed;
    uint256[] private tokensAllowed;

    // events
    event LogBid(address bidder, uint256 bid, address highestBidder, uint256 highestBid, uint256 highestBindingBid);
    event LogWithdrawal(address withdrawalAccount, uint256 amount);
    event LogCanceled(bool success);
    event LogRefund(address sender, uint256 amount);
    event FundCollected(bool success, uint256 merchantFee, uint256 marketplaceFee);
    event TokenCollected(address winner, uint256 tokenId);
    event Received(address sender, uint256 amount);
    event TokenRedeemed(uint tokenId, uint256 redeemedTotal);

    //trigger when deploy
    constructor(IERC20 _erc20Token, address _beneficiary, uint256 _floorPrice, uint256 _startTime, uint256 _endTime, uint256 _tokenIssue, uint256 _feePercent, uint256 _redeemQty)
    {
        require(_startTime > 1000000000, 'Auction start timestamp is not in seconds!');
        require(_endTime > block.timestamp, 'Auction end timestamp can not be the past!');
        require(_beneficiary != address(0x0), 'Beneficiary address is not correct!');
        erc20Token = _erc20Token;
        beneficiary = _beneficiary;
        floorPrice = etherToWei(_floorPrice);
        startTime = _startTime;
        endTime = _endTime;
        tokenIssue = _tokenIssue;
        feePercent = _feePercent;
        redeemQty = _redeemQty;
    }

    // bid on NFD
    function placeBid(uint256 amount) external payable
        nonReentrant
        onlyAfterStart
        onlyBeforeEnd
        onlyNotCanceled
        onlyNotBeneficiary
    {   
        
        require(amount > 0, 'Bid value can not be 0');
        require(erc20Token.balanceOf(_msgSender()) >= amount, 'Insufficiant ERC20 token balance!'); 
        require(erc20Token.allowance(_msgSender(), address(this)) >= amount, 'Approve ERC20 tokens first!');      

        // calculate the user's total bid based on the current amount they've sent to the contract
        // plus whatever has been sent with this transaction
        uint newBid = fundsByBidder[_msgSender()].add(amount);

        // reject payments of less than floor price
        require(newBid >= floorPrice, 'Bid Token amount too low!, amount should be above floor price');
        // if the user isn't even willing to overbid the highest bid, there's nothing for us
        // to do except revert the transaction.
        require(newBid > highestBindingBid, 'Please overbid the highest binding bid!');
        // grab the previous highest bid (before updating fundsByBidder, in case _msgSender() is the
        // highestBidder and is just increasing their maximum bid).
        uint highestBid = fundsByBidder[highestBidder];

        fundsByBidder[_msgSender()] = newBid;

        if(newBid <= highestBid) {
            // if the user has overbid the highestBindingBid but not the highestBid, we simply
            // increase the highestBindingBid and leave highestBidder alone.

            // note that this case is impossible if _msgSender() == highestBidder because you can never
            // bid less Celo than you've already bid.

            highestBindingBid = newBid.min(highestBid);
        } else {
            // if _msgSender() is already the highest bidder, they must simply be wanting to raise
            // their maximum bid, in which case we shouldn't increase the highestBindingBid.

            // if the user is NOT highestBidder, and has overbid highestBid completely, we set them
            // as the new highestBidder and recalculate highestBindingBid.

            if (_msgSender() != highestBidder) {
                highestBidder = _msgSender();
                highestBindingBid = newBid.min(highestBid);
            }
            highestBid = newBid;                   
        }
        bidders.push(_msgSender());  
        // ERC20 token transfer from bidder to current contract address
        erc20Token.safeTransferFrom(_msgSender(), address(this), amount);
        emit LogBid(_msgSender(), amount, highestBidder, highestBid, highestBindingBid);
    }

    function withdraw() external
        nonReentrant
        onlyHasCanceled
        onlyNotBeneficiary
        onlyBidder
    {
        address withdrawalAccount;
        uint256 withdrawalAmount;        

        withdrawalAccount = _msgSender();
        withdrawalAmount = fundsByBidder[withdrawalAccount];

        require(withdrawalAmount > 0, 'You have already withdrawal your funds!');
        fundsByBidder[withdrawalAccount] -= withdrawalAmount;

        //withdraw the ERC20 tokens paid for bid
        erc20Token.transfer(withdrawalAccount, withdrawalAmount);
        emit LogWithdrawal(withdrawalAccount, withdrawalAmount);
    }

    function getHighestBid() public       
        view returns (uint256)
    {
        return fundsByBidder[highestBidder];
    }

    function getMyBid() public
        view returns (uint256)
    {
        return fundsByBidder[_msgSender()];
    }

    function getAuctionStatus() public
        onlyOwner
        view returns (string memory )
    {
        if( canceled ) return 'canceled';
        if( block.timestamp > endTime ) return 'ended';
        if( block.timestamp < startTime ) return 'not-started';
        return 'running';
    }

    function getTokenReddemCount(uint256 _tokenId) public
        view returns (uint256)
    {
        return tokenRedeemed[_tokenId];
    }

    function getFeePercent() external 
        onlyOwner      
        view returns (uint256)
    {
        return feePercent;
    }

    function tokenList() external 
        onlyOwner
        onlyCompleted
        view returns (uint256[] memory) 
    {
        return tokensAllowed;
    }

    function bidderList() external 
        onlyOwner
        onlyAfterStart
        view returns (address[] memory) 
    {
        return bidders;
    }

    function winnerList() public
        onlyOwner
        view returns (address[] memory)
    {
        return _winnerList();
    }

    function etherToWei(uint valueEther) internal pure returns (uint)
    {
       return valueEther*(10**18);
    }

    function onERC721Received(
        address,
        address,
        uint256 _tokenId,
        bytes memory
    ) public virtual override returns (bytes4) {

        require(tokenIssue > tokensAllowed.length, 'Token allowance has reached the maximum!');
        tokensAllowed.push(_tokenId);
        return this.onERC721Received.selector;
    }

    function redeemNFD(uint256 _tokenId) external virtual
        onlyOwner
        onlyCompleted
    {   
        bool tokenAllowed;
        for( uint256 i = 0; i < tokensAllowed.length; i++ ) 
        {
            if(tokensAllowed[i] == _tokenId) {
                tokenAllowed = true;
                break;
            }
        }
        require(tokenAllowed, 'Token is not allowed for redeemed!');
        require( redeemQty > tokenRedeemed[_tokenId], "User have reached the maximum allowance!");
        tokenRedeemed[_tokenId] = tokenRedeemed[_tokenId].add(1);
        emit TokenRedeemed( _tokenId,  tokenRedeemed[_tokenId]);        
    }

    function _winnerList() internal virtual
        onlyCompleted
        view returns (address[] memory) 
    {        
      
        require(bidders.length > 0, 'No bidder found, winner list can not be generate!');
        uint256 maxWinners = bidders.length < tokenIssue ? bidders.length : tokenIssue;
        address[] memory winners = new address[](maxWinners);
        for (uint256 i = 1; i <= maxWinners; i++) 
        {           
            uint256 j = bidders.length.sub(i);
            uint256 k = i.sub(1);
            bool isAlreadyWinner;
            for( uint256 l = 0; l < winners.length; l++ ) 
            {
                if(winners[l] == bidders[j]) {
                    isAlreadyWinner = true;
                    break;
                }
            }
            if(!isAlreadyWinner) winners[k] = bidders[j];
        }        
        return winners;
    }

    function cancelAuction() external
        nonReentrant
        onlyOwner
        onlyBeforeEnd
        onlyNotCanceled
        returns (bool success)
    {
        canceled = true;
        emit LogCanceled(true);
        return true;
    }

    function refund() external
        nonReentrant
        onlyNotBeneficiary
        onlyCompleted
        onlyBidder
        onlyNonWinner
    {
        uint256 withdrawalAmount = fundsByBidder[_msgSender()];
        require(withdrawalAmount > 0, 'You already have refund back!');
        fundsByBidder[_msgSender()] -= withdrawalAmount;
        
        //refund the ERC20 tokens to bidder, paid for bid but not become winner
        erc20Token.transfer(_msgSender(), withdrawalAmount);
        emit LogRefund(_msgSender(), withdrawalAmount);
    }

    function collectToken(uint _tokenId, address _virtuousToken) external
        nonReentrant
        onlyNotBeneficiary
        onlyCompleted
        onlyWinner
        onlyRewardNotCollected
    {   
        IERC721 virtuousToken = IERC721(_virtuousToken);
        require(virtuousToken.balanceOf(address(this)) > 0, "Caller must own nft");
        require(virtuousToken.ownerOf(_tokenId) == address(this), "You must own the token");
        rewardCollected[_msgSender()] = true;
        virtuousToken.safeTransferFrom(address(this), _msgSender(), _tokenId);
        emit TokenCollected( _msgSender(),  _tokenId);
    }

    function collectFund() external
        nonReentrant
        onlyBeneficiaryOrOwner
        onlyNotCollected
    {   
        address[] memory winners = _winnerList();
        uint256 merchantFund;
        uint256 marketplaceRoyalty;
        for( uint256 i = 0; i < winners.length; i++ ) 
        {
            uint256 amount = fundsByBidder[winners[i]];                   
            uint256 marketplaceFee = amount.div(100).mul(feePercent);
            marketplaceRoyalty.add(marketplaceFee);
            uint256 merchantFee = amount.sub(marketplaceFee);
            merchantFund.add(merchantFee);            
            fundsByBidder[winners[i]] -= amount;
        }
        erc20Token.transfer(beneficiary, merchantFund);
        erc20Token.transfer(owner(), marketplaceRoyalty);
        fundCollected = true;
        emit FundCollected(true, merchantFund, marketplaceRoyalty);
    }

    function analyseFund() public
        onlyBeneficiaryOrOwner
        view returns (uint256 marketplace, uint256 merchant)
    {   
        address[] memory winners = _winnerList();
        uint256 merchantFund;
        uint256 marketplaceRoyalty;
        for( uint256 i = 0; i < winners.length; i++ ) 
        {
            uint256 amount = fundsByBidder[winners[i]];                   
            uint256 marketplaceFee = amount.div(100).mul(feePercent);
            marketplaceRoyalty.add(marketplaceFee);
            uint256 merchantFee = amount.sub(marketplaceFee);
            merchantFund.add(merchantFee);            
        }
        return ( marketplaceRoyalty, merchantFund);
    }

    receive() external payable 
    {
        emit Received(_msgSender(), msg.value);
    }

    fallback() external payable {
        emit Received(_msgSender(), msg.value);
    }

    modifier onlyNotBeneficiary {
        if (_msgSender() == beneficiary) revert('Beneficiary can not perform the action!');
        _;
    }

    modifier onlyBeneficiaryOrOwner {
        require( _msgSender() == beneficiary || _msgSender() == owner(), 'Beneficiary / Owner can only perform the action!');
        _;
    }

    modifier onlyAfterStart {
        if (block.timestamp < startTime) revert('Auction yet not start!');
        _;
    }

    modifier onlyBeforeEnd {
        if (block.timestamp > endTime) revert('Auction already ended!');
        _;
    }

    modifier onlyNotCanceled {
        if (canceled) revert('Auction already canceled!');
        _;
    }

    modifier onlyHasCanceled {
        if (!canceled) revert('Auction is not canceled!');
        _;
    }

    modifier onlyCompleted {
        require(block.timestamp > endTime && !canceled, "Auction is not ended yet!");
        _;
    }

    modifier onlyNotCollected {
        require(!fundCollected, "Funds already collected!");
        _;
    }

    modifier onlyBidder {
        require(fundsByBidder[_msgSender()] > 0, 'You are not a valid bidder!');
        _;
    }

    modifier onlyNonWinner {
        address[] memory winners = _winnerList();
        for( uint256 i = 0; i < winners.length; i++ ) {
            if( _msgSender() == winners[i] ){
                revert('You are winner, you can not perform this action!');
            }
        }
        _;
    }

    modifier onlyWinner {
        address[] memory winners = _winnerList();
        bool isWinner;
        for( uint256 i = 0; i < winners.length; i++ ) {
            if( _msgSender() == winners[i] ){
                isWinner = true;
                break;
            }
        }
        require(isWinner, 'You are not a winner!');
        _;
    }

    modifier onlyRewardNotCollected {
        require(!rewardCollected[_msgSender()], 'You have already collected your token!');
        _;
    }
}
        

/_openzeppelin/contracts/access/Ownable.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}
          

/_openzeppelin/contracts/security/ReentrancyGuard.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}
          

/_openzeppelin/contracts/token/ERC20/IERC20.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) external returns (bool);
}
          

/_openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}
          

/_openzeppelin/contracts/token/ERC721/IERC721.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165.sol";

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721 is IERC165 {
    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
     */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
     */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of tokens in ``owner``'s account.
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes calldata data
    ) external;

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external;

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool _approved) external;

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);
}
          

/_openzeppelin/contracts/token/ERC721/IERC721Receiver.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC721 asset contracts.
 */
interface IERC721Receiver {
    /**
     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
     * by `operator` from `from`, this function is called.
     *
     * It must return its Solidity selector to confirm the token transfer.
     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
     *
     * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}
          

/_openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/utils/ERC721Holder.sol)

pragma solidity ^0.8.0;

import "../IERC721Receiver.sol";

/**
 * @dev Implementation of the {IERC721Receiver} interface.
 *
 * Accepts all token transfers.
 * Make sure the contract is able to use its token with {IERC721-safeTransferFrom}, {IERC721-approve} or {IERC721-setApprovalForAll}.
 */
contract ERC721Holder is IERC721Receiver {
    /**
     * @dev See {IERC721Receiver-onERC721Received}.
     *
     * Always returns `IERC721Receiver.onERC721Received.selector`.
     */
    function onERC721Received(
        address,
        address,
        uint256,
        bytes memory
    ) public virtual override returns (bytes4) {
        return this.onERC721Received.selector;
    }
}
          

/_openzeppelin/contracts/utils/Address.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}
          

/_openzeppelin/contracts/utils/Context.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}
          

/_openzeppelin/contracts/utils/introspection/IERC165.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}
          

/_openzeppelin/contracts/utils/math/Math.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a >= b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow.
        return (a & b) + (a ^ b) / 2;
    }

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds up instead
     * of rounding down.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a / b + (a % b == 0 ? 0 : 1);
    }
}
          

/_openzeppelin/contracts/utils/math/SafeMath.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (utils/math/SafeMath.sol)

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
            // benefit is lost if 'b' is also tested.
            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
            if (a == 0) return (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        return a + b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        return a * b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b <= a, errorMessage);
            return a - b;
        }
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a / b;
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}
          

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"_erc20Token","internalType":"contract IERC20"},{"type":"address","name":"_beneficiary","internalType":"address"},{"type":"uint256","name":"_floorPrice","internalType":"uint256"},{"type":"uint256","name":"_startTime","internalType":"uint256"},{"type":"uint256","name":"_endTime","internalType":"uint256"},{"type":"uint256","name":"_tokenIssue","internalType":"uint256"},{"type":"uint256","name":"_feePercent","internalType":"uint256"},{"type":"uint256","name":"_redeemQty","internalType":"uint256"}]},{"type":"event","name":"FundCollected","inputs":[{"type":"bool","name":"success","internalType":"bool","indexed":false},{"type":"uint256","name":"merchantFee","internalType":"uint256","indexed":false},{"type":"uint256","name":"marketplaceFee","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"LogBid","inputs":[{"type":"address","name":"bidder","internalType":"address","indexed":false},{"type":"uint256","name":"bid","internalType":"uint256","indexed":false},{"type":"address","name":"highestBidder","internalType":"address","indexed":false},{"type":"uint256","name":"highestBid","internalType":"uint256","indexed":false},{"type":"uint256","name":"highestBindingBid","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"LogCanceled","inputs":[{"type":"bool","name":"success","internalType":"bool","indexed":false}],"anonymous":false},{"type":"event","name":"LogRefund","inputs":[{"type":"address","name":"sender","internalType":"address","indexed":false},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"LogWithdrawal","inputs":[{"type":"address","name":"withdrawalAccount","internalType":"address","indexed":false},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"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":"event","name":"Received","inputs":[{"type":"address","name":"sender","internalType":"address","indexed":false},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"TokenCollected","inputs":[{"type":"address","name":"winner","internalType":"address","indexed":false},{"type":"uint256","name":"tokenId","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"TokenRedeemed","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256","indexed":false},{"type":"uint256","name":"redeemedTotal","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"fallback","stateMutability":"payable"},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"marketplace","internalType":"uint256"},{"type":"uint256","name":"merchant","internalType":"uint256"}],"name":"analyseFund","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address[]","name":"","internalType":"address[]"}],"name":"bidderList","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"success","internalType":"bool"}],"name":"cancelAuction","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"canceled","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"collectFund","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"collectToken","inputs":[{"type":"uint256","name":"_tokenId","internalType":"uint256"},{"type":"address","name":"_virtuousToken","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"endTime","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"ended","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"floorPrice","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"fundsByBidder","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"getAuctionStatus","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getFeePercent","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getHighestBid","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getMyBid","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getTokenReddemCount","inputs":[{"type":"uint256","name":"_tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"highestBidder","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"highestBindingBid","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bytes4","name":"","internalType":"bytes4"}],"name":"onERC721Received","inputs":[{"type":"address","name":"","internalType":"address"},{"type":"address","name":"","internalType":"address"},{"type":"uint256","name":"_tokenId","internalType":"uint256"},{"type":"bytes","name":"","internalType":"bytes"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"payable","outputs":[],"name":"placeBid","inputs":[{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"redeemNFD","inputs":[{"type":"uint256","name":"_tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"refund","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"rewardCollected","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"startTime","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256[]","name":"","internalType":"uint256[]"}],"name":"tokenList","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"tokenRedeemed","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address[]","name":"","internalType":"address[]"}],"name":"winnerList","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"withdraw","inputs":[]},{"type":"receive","stateMutability":"payable"}]
              

Contract Creation Code

0x6101606040523480156200001257600080fd5b506040516200334438038062003344833981016040819052620000359162000241565b6200004033620001d5565b60018055633b9aca008511620000b05760405162461bcd60e51b815260206004820152602a60248201527f41756374696f6e2073746172742074696d657374616d70206973206e6f7420696044820152696e207365636f6e64732160b01b60648201526084015b60405180910390fd5b428411620001145760405162461bcd60e51b815260206004820152602a60248201527f41756374696f6e20656e642074696d657374616d702063616e206e6f742062656044820152692074686520706173742160b01b6064820152608401620000a7565b6001600160a01b038716620001785760405162461bcd60e51b815260206004820152602360248201527f42656e65666963696172792061646472657373206973206e6f7420636f72726560448201526263742160e81b6064820152608401620000a7565b600280546001600160a01b0319166001600160a01b038a16179055606087901b6001600160601b03191660e052620001b08662000225565b60805260a09490945260c09290925261010052610140526101205250620002fb915050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006200023b82670de0b6b3a7640000620002b6565b92915050565b600080600080600080600080610100898b0312156200025e578384fd5b88516200026b81620002e2565b60208a01519098506200027e81620002e2565b60408a015160608b015160808c015160a08d015160c08e015160e0909e01519c9f949e50929c919b909a509198509650945092505050565b6000816000190483118215151615620002dd57634e487b7160e01b81526011600452602481fd5b500290565b6001600160a01b0381168114620002f857600080fd5b50565b60805160a05160c05160e05160601c610100516101205161014051612f51620003f360003960008181610d34015281816122f901526123a0015260006117e7015260008181610ae801528181612525015261254b0152600081816106be01528181610c1501528181610e27015281816111550152818161139601528181611cb7015261222c01526000818161033e015281816106fe0152818161101b015281816113d6015281816116ce01528181611a5701528181611bf70152818161217e015261246101526000818161044201528181611063015281816119040152611b8e01526000818161052f0152611f260152612f516000f3fe6080604052600436106101d15760003560e01c80637b0e0820116100f75780639e2c58ca11610095578063ce10cf8011610064578063ce10cf80146105f2578063f28c40401461061f578063f2fde38b1461064c578063f5b56c561461066c5761021b565b80639e2c58ca146105645780639eb7d45a14610586578063b0954dee146105b0578063be74264d146105dd5761021b565b80638fa8b790116100d15780638fa8b790146104e857806391f90157146104fd5780639363c8121461051d5780639979ef45146105515761021b565b80637b0e08201461046457806384ddc67f146104945780638da5cb5b146104b65761021b565b80633ccfd60b1161016f57806369de83471161013e57806369de8347146103e6578063704416b414610406578063715018a61461041b57806378e97925146104305761021b565b80633ccfd60b1461036e5780633f9942ff146103835780634979440a146103a4578063590e1ae3146103d15761021b565b806315d6af8f116101ab57806315d6af8f146102d357806324d507fd146102f55780632e93be301461030a5780633197cbb61461032c5761021b565b80631257e2791461024257806312fa6feb14610264578063150b7a021461029a5761021b565b3661021b577f88a5966d370b9919b20f3e2c13ff65706f196a4e32cc2c12bf57088f88525874335b604080516001600160a01b0390921682523460208301520160405180910390a1005b7f88a5966d370b9919b20f3e2c13ff65706f196a4e32cc2c12bf57088f88525874336101f9565b34801561024e57600080fd5b5061026261025d366004612be8565b610682565b005b34801561027057600080fd5b5060025461028590600160a81b900460ff1681565b60405190151581526020015b60405180910390f35b3480156102a657600080fd5b506102ba6102b5366004612abf565b610ae0565b6040516001600160e01b03199091168152602001610291565b3480156102df57600080fd5b506102e8610ba8565b6040516102919190612c33565b34801561030157600080fd5b50610262610be2565b34801561031657600080fd5b5061031f610fb7565b6040516102919190612cb8565b34801561033857600080fd5b506103607f000000000000000000000000000000000000000000000000000000000000000081565b604051908152602001610291565b34801561037a57600080fd5b506102626110d1565b34801561038f57600080fd5b5060025461028590600160a01b900460ff1681565b3480156103b057600080fd5b506004546001600160a01b0316600090815260066020526040902054610360565b3480156103dd57600080fd5b50610262611363565b3480156103f257600080fd5b50610262610401366004612bb8565b6116a2565b34801561041257600080fd5b506102e86118d5565b34801561042757600080fd5b506102626119cb565b34801561043c57600080fd5b506103607f000000000000000000000000000000000000000000000000000000000000000081565b34801561047057600080fd5b5061028561047f366004612a87565b60076020526000908152604090205460ff1681565b3480156104a057600080fd5b5033600090815260066020526040902054610360565b3480156104c257600080fd5b506000546001600160a01b03165b6040516001600160a01b039091168152602001610291565b3480156104f457600080fd5b50610285611a01565b34801561050957600080fd5b506004546104d0906001600160a01b031681565b34801561052957600080fd5b506103607f000000000000000000000000000000000000000000000000000000000000000081565b61026261055f366004612bb8565b611b64565b34801561057057600080fd5b5061057961214f565b6040516102919190612c80565b34801561059257600080fd5b5061059b612226565b60408051928352602083019190915201610291565b3480156105bc57600080fd5b506103606105cb366004612bb8565b60086020526000908152604090205481565b3480156105e957600080fd5b50610360612372565b3480156105fe57600080fd5b5061036061060d366004612a87565b60066020526000908152604090205481565b34801561062b57600080fd5b5061036061063a366004612bb8565b60009081526008602052604090205490565b34801561065857600080fd5b50610262610667366004612a87565b6123c2565b34801561067857600080fd5b5061036060035481565b600260015414156106ae5760405162461bcd60e51b81526004016106a590612dee565b60405180910390fd5b6002600155336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614156106fc5760405162461bcd60e51b81526004016106a590612d72565b7f0000000000000000000000000000000000000000000000000000000000000000421180156107355750600254600160a01b900460ff16155b6107515760405162461bcd60e51b81526004016106a590612d3b565b600061075b61245d565b90506000805b82518110156107cc5782818151811061078a57634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166107a23390565b6001600160a01b031614156107ba57600191506107cc565b806107c481612ebf565b915050610761565b50806108125760405162461bcd60e51b8152602060048201526015602482015274596f7520617265206e6f7420612077696e6e65722160581b60448201526064016106a5565b3360009081526007602052604090205460ff16156108815760405162461bcd60e51b815260206004820152602660248201527f596f75206861766520616c726561647920636f6c6c656374656420796f757220604482015265746f6b656e2160d01b60648201526084016106a5565b6040516370a0823160e01b815230600482015283906000906001600160a01b038316906370a082319060240160206040518083038186803b1580156108c557600080fd5b505afa1580156108d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108fd9190612bd0565b116109405760405162461bcd60e51b815260206004820152601360248201527210d85b1b195c881b5d5cdd081bdddb881b999d606a1b60448201526064016106a5565b6040516331a9108f60e11b81526004810186905230906001600160a01b03831690636352211e9060240160206040518083038186803b15801561098257600080fd5b505afa158015610996573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ba9190612aa3565b6001600160a01b031614610a095760405162461bcd60e51b81526020600482015260166024820152752cb7ba9036bab9ba1037bbb7103a3432903a37b5b2b760511b60448201526064016106a5565b33600081815260076020526040808220805460ff191660011790558051632142170760e11b8152306004820152602481019390935260448301889052516001600160a01b038416926342842e0e92606480830193919282900301818387803b158015610a7457600080fd5b505af1158015610a88573d6000803e3d6000fd5b505050507f17b3a70c980ec7f4b25a351955fa92638e9757afd4216535ac95a0153857680d610ab43390565b604080516001600160a01b039092168252602082018890520160405180910390a1505060018055505050565b6009546000907f000000000000000000000000000000000000000000000000000000000000000011610b655760405162461bcd60e51b815260206004820152602860248201527f546f6b656e20616c6c6f77616e636520686173207265616368656420746865206044820152676d6178696d756d2160c01b60648201526084016106a5565b5050600980546001810182556000919091527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af015550630a85bd0160e11b919050565b6000546060906001600160a01b03163314610bd55760405162461bcd60e51b81526004016106a590612db9565b610bdd61245d565b905090565b60026001541415610c055760405162461bcd60e51b81526004016106a590612dee565b6002600155336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161480610c4b57506000546001600160a01b031633145b610c675760405162461bcd60e51b81526004016106a590612ceb565b600254600160b01b900460ff1615610cc15760405162461bcd60e51b815260206004820152601860248201527f46756e647320616c726561647920636f6c6c656374656421000000000000000060448201526064016106a5565b6000610ccb61245d565b905060008060005b8351811015610e0c57600060066000868481518110610d0257634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166001600160a01b031681526020019081526020016000205490506000610d6d7f0000000000000000000000000000000000000000000000000000000000000000610d6760648561273290919063ffffffff16565b90612745565b9050610d798482612751565b506000610d86838361275d565b9050610d928682612751565b508260066000898781518110610db857634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166001600160a01b031681526020019081526020016000206000828254610def9190612e7c565b925050819055505050508080610e0490612ebf565b915050610cd3565b5060025460405163a9059cbb60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152602482018590529091169063a9059cbb90604401602060405180830381600087803b158015610e7b57600080fd5b505af1158015610e8f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eb39190612b98565b506002546001600160a01b031663a9059cbb610ed76000546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260248101849052604401602060405180830381600087803b158015610f1f57600080fd5b505af1158015610f33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f579190612b98565b506002805460ff60b01b1916600160b01b1790556040805160018152602081018490529081018290527f582a7800ed1c170b70e8563d0d2c662ad875321806be2a1258f1d754112f8e1f906060015b60405180910390a150506001805550565b6000546060906001600160a01b03163314610fe45760405162461bcd60e51b81526004016106a590612db9565b600254600160a01b900460ff1615611019575060408051808201909152600881526718d85b98d95b195960c21b602082015290565b7f00000000000000000000000000000000000000000000000000000000000000004211156110615750604080518082019091526005815264195b99195960da1b602082015290565b7f00000000000000000000000000000000000000000000000000000000000000004210156110af575060408051808201909152600b81526a1b9bdd0b5cdd185c9d195960aa1b602082015290565b5060408051808201909152600781526672756e6e696e6760c81b602082015290565b600260015414156110f45760405162461bcd60e51b81526004016106a590612dee565b6002600181905554600160a01b900460ff166111525760405162461bcd60e51b815260206004820152601860248201527f41756374696f6e206973206e6f742063616e63656c656421000000000000000060448201526064016106a5565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316141561119b5760405162461bcd60e51b81526004016106a590612d72565b336000908152600660205260409020546111f75760405162461bcd60e51b815260206004820152601b60248201527f596f7520617265206e6f7420612076616c69642062696464657221000000000060448201526064016106a5565b33600081815260066020526040902054806112645760405162461bcd60e51b815260206004820152602760248201527f596f75206861766520616c7265616479207769746864726177616c20796f75726044820152662066756e64732160c81b60648201526084016106a5565b6001600160a01b0382166000908152600660205260408120805483929061128c908490612e7c565b909155505060025460405163a9059cbb60e01b81526001600160a01b038481166004830152602482018490529091169063a9059cbb90604401602060405180830381600087803b1580156112df57600080fd5b505af11580156112f3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113179190612b98565b50604080516001600160a01b0384168152602081018390527fb4214c8c54fc7442f36d3682f59aebaf09358a4431835b30efb29d52cf9e1e9191015b60405180910390a1505060018055565b600260015414156113865760405162461bcd60e51b81526004016106a590612dee565b6002600155336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614156113d45760405162461bcd60e51b81526004016106a590612d72565b7f00000000000000000000000000000000000000000000000000000000000000004211801561140d5750600254600160a01b900460ff16155b6114295760405162461bcd60e51b81526004016106a590612d3b565b336000908152600660205260409020546114855760405162461bcd60e51b815260206004820152601b60248201527f596f7520617265206e6f7420612076616c69642062696464657221000000000060448201526064016106a5565b600061148f61245d565b905060005b8151811015611557578181815181106114bd57634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166114d53390565b6001600160a01b031614156115455760405162461bcd60e51b815260206004820152603060248201527f596f75206172652077696e6e65722c20796f752063616e206e6f74207065726660448201526f6f726d207468697320616374696f6e2160801b60648201526084016106a5565b8061154f81612ebf565b915050611494565b5033600090815260066020526040902054806115b55760405162461bcd60e51b815260206004820152601d60248201527f596f7520616c7265616479206861766520726566756e64206261636b2100000060448201526064016106a5565b33600090815260066020526040812080548392906115d4908490612e7c565b90915550506002546001600160a01b031663a9059cbb336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260248101849052604401602060405180830381600087803b15801561163357600080fd5b505af1158015611647573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061166b9190612b98565b5060408051338152602081018390527fb6c0eca8138e097d71e2dd31e19a1266487f0553f170b7260ffe68bcbe9ff8a79101611353565b6000546001600160a01b031633146116cc5760405162461bcd60e51b81526004016106a590612db9565b7f0000000000000000000000000000000000000000000000000000000000000000421180156117055750600254600160a01b900460ff16155b6117215760405162461bcd60e51b81526004016106a590612d3b565b6000805b60095481101561177d57826009828154811061175157634e487b7160e01b600052603260045260246000fd5b9060005260206000200154141561176b576001915061177d565b8061177581612ebf565b915050611725565b50806117d65760405162461bcd60e51b815260206004820152602260248201527f546f6b656e206973206e6f7420616c6c6f77656420666f722072656465656d65604482015261642160f01b60648201526084016106a5565b6000828152600860205260409020547f0000000000000000000000000000000000000000000000000000000000000000116118645760405162461bcd60e51b815260206004820152602860248201527f557365722068617665207265616368656420746865206d6178696d756d20616c6044820152676c6f77616e63652160c01b60648201526084016106a5565b60008281526008602052604090205461187e906001612751565b60008381526008602052604090819020829055517f559dc6ea45ea5071b1480938c0df2cd88fca6c769bfc8aeebc7c38364ff1ed5e916118c991859190918252602082015260400190565b60405180910390a15050565b6000546060906001600160a01b031633146119025760405162461bcd60e51b81526004016106a590612db9565b7f000000000000000000000000000000000000000000000000000000000000000042101561196b5760405162461bcd60e51b815260206004820152601660248201527541756374696f6e20796574206e6f742073746172742160501b60448201526064016106a5565b60058054806020026020016040519081016040528092919081815260200182805480156119c157602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116119a3575b5050505050905090565b6000546001600160a01b031633146119f55760405162461bcd60e51b81526004016106a590612db9565b6119ff6000612769565b565b600060026001541415611a265760405162461bcd60e51b81526004016106a590612dee565b60026001556000546001600160a01b03163314611a555760405162461bcd60e51b81526004016106a590612db9565b7f0000000000000000000000000000000000000000000000000000000000000000421115611abe5760405162461bcd60e51b815260206004820152601660248201527541756374696f6e20616c726561647920656e6465642160501b60448201526064016106a5565b600254600160a01b900460ff1615611b145760405162461bcd60e51b815260206004820152601960248201527841756374696f6e20616c72656164792063616e63656c65642160381b60448201526064016106a5565b6002805460ff60a01b1916600160a01b179055604051600181527f1fd636bc86322e474244a9366e9b72f9e75d3ba45b442352c7f950c92a9808a59060200160405180910390a150600180805590565b60026001541415611b875760405162461bcd60e51b81526004016106a590612dee565b60026001557f0000000000000000000000000000000000000000000000000000000000000000421015611bf55760405162461bcd60e51b815260206004820152601660248201527541756374696f6e20796574206e6f742073746172742160501b60448201526064016106a5565b7f0000000000000000000000000000000000000000000000000000000000000000421115611c5e5760405162461bcd60e51b815260206004820152601660248201527541756374696f6e20616c726561647920656e6465642160501b60448201526064016106a5565b600254600160a01b900460ff1615611cb45760405162461bcd60e51b815260206004820152601960248201527841756374696f6e20616c72656164792063616e63656c65642160381b60448201526064016106a5565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03161415611cfd5760405162461bcd60e51b81526004016106a590612d72565b60008111611d465760405162461bcd60e51b815260206004820152601660248201527504269642076616c75652063616e206e6f7420626520360541b60448201526064016106a5565b60025481906001600160a01b03166370a08231336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260240160206040518083038186803b158015611d9957600080fd5b505afa158015611dad573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dd19190612bd0565b1015611e295760405162461bcd60e51b815260206004820152602160248201527f496e73756666696369616e7420455243323020746f6b656e2062616c616e63656044820152602160f81b60648201526084016106a5565b60025481906001600160a01b031663dd62ed3e336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015230602482015260440160206040518083038186803b158015611e8257600080fd5b505afa158015611e96573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611eba9190612bd0565b1015611f085760405162461bcd60e51b815260206004820152601b60248201527f417070726f766520455243323020746f6b656e7320666972737421000000000060448201526064016106a5565b33600090815260066020526040812054611f229083612751565b90507f0000000000000000000000000000000000000000000000000000000000000000811015611fba5760405162461bcd60e51b815260206004820152603d60248201527f42696420546f6b656e20616d6f756e7420746f6f206c6f77212c20616d6f756e60448201527f742073686f756c642062652061626f766520666c6f6f7220707269636500000060648201526084016106a5565b600354811161201b5760405162461bcd60e51b815260206004820152602760248201527f506c65617365206f7665726269642074686520686967686573742062696e64696044820152666e67206269642160c81b60648201526084016106a5565b6004546001600160a01b03166000908152600660205260408082205433835291208290558082116120585761205082826127b9565b600355612096565b6004546001600160a01b0316336001600160a01b03161461209357600480546001600160a01b0319163317905561208f82826127b9565b6003555b50805b600580546001810182556000919091527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00180546001600160a01b031916339081179091556002546120f6916001600160a01b03919091169030866127cf565b60045460035460408051338152602081018790526001600160a01b03909316908301526060820183905260808201527ff152f4ff5e488c55370a2d53925a55055228ebd8ec95bd0251bbb299e48786b09060a001610fa6565b6000546060906001600160a01b0316331461217c5760405162461bcd60e51b81526004016106a590612db9565b7f0000000000000000000000000000000000000000000000000000000000000000421180156121b55750600254600160a01b900460ff16155b6121d15760405162461bcd60e51b81526004016106a590612d3b565b60098054806020026020016040519081016040528092919081815260200182805480156119c157602002820191906000526020600020905b815481526020019060010190808311612209575050505050905090565b600080337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316148061226a57506000546001600160a01b031633145b6122865760405162461bcd60e51b81526004016106a590612ceb565b600061229061245d565b905060008060005b8351811015612368576000600660008684815181106122c757634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020549050600061232c7f0000000000000000000000000000000000000000000000000000000000000000610d6760648561273290919063ffffffff16565b90506123388482612751565b506000612345838361275d565b90506123518682612751565b50505050808061236090612ebf565b915050612298565b5093509150509091565b600080546001600160a01b0316331461239d5760405162461bcd60e51b81526004016106a590612db9565b507f000000000000000000000000000000000000000000000000000000000000000090565b6000546001600160a01b031633146123ec5760405162461bcd60e51b81526004016106a590612db9565b6001600160a01b0381166124515760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016106a5565b61245a81612769565b50565b60607f0000000000000000000000000000000000000000000000000000000000000000421180156124985750600254600160a01b900460ff16155b6124b45760405162461bcd60e51b81526004016106a590612d3b565b60055461251d5760405162461bcd60e51b815260206004820152603160248201527f4e6f2062696464657220666f756e642c2077696e6e6572206c6973742063616e604482015270206e6f742062652067656e65726174652160781b60648201526084016106a5565b6005546000907f00000000000000000000000000000000000000000000000000000000000000001161256f577f0000000000000000000000000000000000000000000000000000000000000000612573565b6005545b905060008167ffffffffffffffff81111561259e57634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156125c7578160200160208202803683370190505b50905060015b82811161272b576005546000906125e4908361275d565b905060006125f383600161275d565b90506000805b855181101561268f576005848154811061262357634e487b7160e01b600052603260045260246000fd5b60009182526020909120015486516001600160a01b039091169087908390811061265d57634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b0316141561267d576001915061268f565b8061268781612ebf565b9150506125f9565b508061271557600583815481106126b657634e487b7160e01b600052603260045260246000fd5b9060005260206000200160009054906101000a90046001600160a01b03168583815181106126f457634e487b7160e01b600052603260045260246000fd5b60200260200101906001600160a01b031690816001600160a01b0316815250505b505050808061272390612ebf565b9150506125cd565b5091505090565b600061273e8284612e3d565b9392505050565b600061273e8284612e5d565b600061273e8284612e25565b600061273e8284612e7c565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008183106127c8578161273e565b5090919050565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b17905261282990859061282f565b50505050565b6000612884826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166129069092919063ffffffff16565b80519091501561290157808060200190518101906128a29190612b98565b6129015760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016106a5565b505050565b6060612915848460008561291d565b949350505050565b60608247101561297e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016106a5565b6001600160a01b0385163b6129d55760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016106a5565b600080866001600160a01b031685876040516129f19190612c17565b60006040518083038185875af1925050503d8060008114612a2e576040519150601f19603f3d011682016040523d82523d6000602084013e612a33565b606091505b5091509150612a43828286612a4e565b979650505050505050565b60608315612a5d57508161273e565b825115612a6d5782518084602001fd5b8160405162461bcd60e51b81526004016106a59190612cb8565b600060208284031215612a98578081fd5b813561273e81612f06565b600060208284031215612ab4578081fd5b815161273e81612f06565b60008060008060808587031215612ad4578283fd5b8435612adf81612f06565b93506020850135612aef81612f06565b925060408501359150606085013567ffffffffffffffff80821115612b12578283fd5b818701915087601f830112612b25578283fd5b813581811115612b3757612b37612ef0565b604051601f8201601f19908116603f01168101908382118183101715612b5f57612b5f612ef0565b816040528281528a6020848701011115612b77578586fd5b82602086016020830137918201602001949094529598949750929550505050565b600060208284031215612ba9578081fd5b8151801515811461273e578182fd5b600060208284031215612bc9578081fd5b5035919050565b600060208284031215612be1578081fd5b5051919050565b60008060408385031215612bfa578182fd5b823591506020830135612c0c81612f06565b809150509250929050565b60008251612c29818460208701612e93565b9190910192915050565b6020808252825182820181905260009190848201906040850190845b81811015612c745783516001600160a01b031683529284019291840191600101612c4f565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b81811015612c7457835183529284019291840191600101612c9c565b6020815260008251806020840152612cd7816040850160208701612e93565b601f01601f19169190910160400192915050565b60208082526030908201527f42656e6566696369617279202f204f776e65722063616e206f6e6c792070657260408201526f666f726d2074686520616374696f6e2160801b606082015260800190565b60208082526019908201527f41756374696f6e206973206e6f7420656e646564207965742100000000000000604082015260600190565b60208082526027908201527f42656e65666963696172792063616e206e6f7420706572666f726d2074686520604082015266616374696f6e2160c81b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60008219821115612e3857612e38612eda565b500190565b600082612e5857634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615612e7757612e77612eda565b500290565b600082821015612e8e57612e8e612eda565b500390565b60005b83811015612eae578181015183820152602001612e96565b838111156128295750506000910152565b6000600019821415612ed357612ed3612eda565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461245a57600080fdfea2646970667358221220f4665792158c00c09feb568546294a509df84f2c4eecfbb69b3dbb3d50d61ac964736f6c63430008040033000000000000000000000000874069fa1eb16d44d622f2e0ca25eea172369bc10000000000000000000000005e52ef9f85d7db24dadbbd788c43157b7baf250f000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000628ddd9900000000000000000000000000000000000000000000000000000000628ddfa800000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000005000000000000000000000000000000000000000000000000000000000000000a

Deployed ByteCode

0x6080604052600436106101d15760003560e01c80637b0e0820116100f75780639e2c58ca11610095578063ce10cf8011610064578063ce10cf80146105f2578063f28c40401461061f578063f2fde38b1461064c578063f5b56c561461066c5761021b565b80639e2c58ca146105645780639eb7d45a14610586578063b0954dee146105b0578063be74264d146105dd5761021b565b80638fa8b790116100d15780638fa8b790146104e857806391f90157146104fd5780639363c8121461051d5780639979ef45146105515761021b565b80637b0e08201461046457806384ddc67f146104945780638da5cb5b146104b65761021b565b80633ccfd60b1161016f57806369de83471161013e57806369de8347146103e6578063704416b414610406578063715018a61461041b57806378e97925146104305761021b565b80633ccfd60b1461036e5780633f9942ff146103835780634979440a146103a4578063590e1ae3146103d15761021b565b806315d6af8f116101ab57806315d6af8f146102d357806324d507fd146102f55780632e93be301461030a5780633197cbb61461032c5761021b565b80631257e2791461024257806312fa6feb14610264578063150b7a021461029a5761021b565b3661021b577f88a5966d370b9919b20f3e2c13ff65706f196a4e32cc2c12bf57088f88525874335b604080516001600160a01b0390921682523460208301520160405180910390a1005b7f88a5966d370b9919b20f3e2c13ff65706f196a4e32cc2c12bf57088f88525874336101f9565b34801561024e57600080fd5b5061026261025d366004612be8565b610682565b005b34801561027057600080fd5b5060025461028590600160a81b900460ff1681565b60405190151581526020015b60405180910390f35b3480156102a657600080fd5b506102ba6102b5366004612abf565b610ae0565b6040516001600160e01b03199091168152602001610291565b3480156102df57600080fd5b506102e8610ba8565b6040516102919190612c33565b34801561030157600080fd5b50610262610be2565b34801561031657600080fd5b5061031f610fb7565b6040516102919190612cb8565b34801561033857600080fd5b506103607f00000000000000000000000000000000000000000000000000000000628ddfa881565b604051908152602001610291565b34801561037a57600080fd5b506102626110d1565b34801561038f57600080fd5b5060025461028590600160a01b900460ff1681565b3480156103b057600080fd5b506004546001600160a01b0316600090815260066020526040902054610360565b3480156103dd57600080fd5b50610262611363565b3480156103f257600080fd5b50610262610401366004612bb8565b6116a2565b34801561041257600080fd5b506102e86118d5565b34801561042757600080fd5b506102626119cb565b34801561043c57600080fd5b506103607f00000000000000000000000000000000000000000000000000000000628ddd9981565b34801561047057600080fd5b5061028561047f366004612a87565b60076020526000908152604090205460ff1681565b3480156104a057600080fd5b5033600090815260066020526040902054610360565b3480156104c257600080fd5b506000546001600160a01b03165b6040516001600160a01b039091168152602001610291565b3480156104f457600080fd5b50610285611a01565b34801561050957600080fd5b506004546104d0906001600160a01b031681565b34801561052957600080fd5b506103607f0000000000000000000000000000000000000000000000000de0b6b3a764000081565b61026261055f366004612bb8565b611b64565b34801561057057600080fd5b5061057961214f565b6040516102919190612c80565b34801561059257600080fd5b5061059b612226565b60408051928352602083019190915201610291565b3480156105bc57600080fd5b506103606105cb366004612bb8565b60086020526000908152604090205481565b3480156105e957600080fd5b50610360612372565b3480156105fe57600080fd5b5061036061060d366004612a87565b60066020526000908152604090205481565b34801561062b57600080fd5b5061036061063a366004612bb8565b60009081526008602052604090205490565b34801561065857600080fd5b50610262610667366004612a87565b6123c2565b34801561067857600080fd5b5061036060035481565b600260015414156106ae5760405162461bcd60e51b81526004016106a590612dee565b60405180910390fd5b6002600155336001600160a01b037f0000000000000000000000005e52ef9f85d7db24dadbbd788c43157b7baf250f1614156106fc5760405162461bcd60e51b81526004016106a590612d72565b7f00000000000000000000000000000000000000000000000000000000628ddfa8421180156107355750600254600160a01b900460ff16155b6107515760405162461bcd60e51b81526004016106a590612d3b565b600061075b61245d565b90506000805b82518110156107cc5782818151811061078a57634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166107a23390565b6001600160a01b031614156107ba57600191506107cc565b806107c481612ebf565b915050610761565b50806108125760405162461bcd60e51b8152602060048201526015602482015274596f7520617265206e6f7420612077696e6e65722160581b60448201526064016106a5565b3360009081526007602052604090205460ff16156108815760405162461bcd60e51b815260206004820152602660248201527f596f75206861766520616c726561647920636f6c6c656374656420796f757220604482015265746f6b656e2160d01b60648201526084016106a5565b6040516370a0823160e01b815230600482015283906000906001600160a01b038316906370a082319060240160206040518083038186803b1580156108c557600080fd5b505afa1580156108d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108fd9190612bd0565b116109405760405162461bcd60e51b815260206004820152601360248201527210d85b1b195c881b5d5cdd081bdddb881b999d606a1b60448201526064016106a5565b6040516331a9108f60e11b81526004810186905230906001600160a01b03831690636352211e9060240160206040518083038186803b15801561098257600080fd5b505afa158015610996573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ba9190612aa3565b6001600160a01b031614610a095760405162461bcd60e51b81526020600482015260166024820152752cb7ba9036bab9ba1037bbb7103a3432903a37b5b2b760511b60448201526064016106a5565b33600081815260076020526040808220805460ff191660011790558051632142170760e11b8152306004820152602481019390935260448301889052516001600160a01b038416926342842e0e92606480830193919282900301818387803b158015610a7457600080fd5b505af1158015610a88573d6000803e3d6000fd5b505050507f17b3a70c980ec7f4b25a351955fa92638e9757afd4216535ac95a0153857680d610ab43390565b604080516001600160a01b039092168252602082018890520160405180910390a1505060018055505050565b6009546000907f000000000000000000000000000000000000000000000000000000000000000311610b655760405162461bcd60e51b815260206004820152602860248201527f546f6b656e20616c6c6f77616e636520686173207265616368656420746865206044820152676d6178696d756d2160c01b60648201526084016106a5565b5050600980546001810182556000919091527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af015550630a85bd0160e11b919050565b6000546060906001600160a01b03163314610bd55760405162461bcd60e51b81526004016106a590612db9565b610bdd61245d565b905090565b60026001541415610c055760405162461bcd60e51b81526004016106a590612dee565b6002600155336001600160a01b037f0000000000000000000000005e52ef9f85d7db24dadbbd788c43157b7baf250f161480610c4b57506000546001600160a01b031633145b610c675760405162461bcd60e51b81526004016106a590612ceb565b600254600160b01b900460ff1615610cc15760405162461bcd60e51b815260206004820152601860248201527f46756e647320616c726561647920636f6c6c656374656421000000000000000060448201526064016106a5565b6000610ccb61245d565b905060008060005b8351811015610e0c57600060066000868481518110610d0257634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166001600160a01b031681526020019081526020016000205490506000610d6d7f0000000000000000000000000000000000000000000000000000000000000005610d6760648561273290919063ffffffff16565b90612745565b9050610d798482612751565b506000610d86838361275d565b9050610d928682612751565b508260066000898781518110610db857634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166001600160a01b031681526020019081526020016000206000828254610def9190612e7c565b925050819055505050508080610e0490612ebf565b915050610cd3565b5060025460405163a9059cbb60e01b81526001600160a01b037f0000000000000000000000005e52ef9f85d7db24dadbbd788c43157b7baf250f81166004830152602482018590529091169063a9059cbb90604401602060405180830381600087803b158015610e7b57600080fd5b505af1158015610e8f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eb39190612b98565b506002546001600160a01b031663a9059cbb610ed76000546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260248101849052604401602060405180830381600087803b158015610f1f57600080fd5b505af1158015610f33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f579190612b98565b506002805460ff60b01b1916600160b01b1790556040805160018152602081018490529081018290527f582a7800ed1c170b70e8563d0d2c662ad875321806be2a1258f1d754112f8e1f906060015b60405180910390a150506001805550565b6000546060906001600160a01b03163314610fe45760405162461bcd60e51b81526004016106a590612db9565b600254600160a01b900460ff1615611019575060408051808201909152600881526718d85b98d95b195960c21b602082015290565b7f00000000000000000000000000000000000000000000000000000000628ddfa84211156110615750604080518082019091526005815264195b99195960da1b602082015290565b7f00000000000000000000000000000000000000000000000000000000628ddd994210156110af575060408051808201909152600b81526a1b9bdd0b5cdd185c9d195960aa1b602082015290565b5060408051808201909152600781526672756e6e696e6760c81b602082015290565b600260015414156110f45760405162461bcd60e51b81526004016106a590612dee565b6002600181905554600160a01b900460ff166111525760405162461bcd60e51b815260206004820152601860248201527f41756374696f6e206973206e6f742063616e63656c656421000000000000000060448201526064016106a5565b337f0000000000000000000000005e52ef9f85d7db24dadbbd788c43157b7baf250f6001600160a01b0316141561119b5760405162461bcd60e51b81526004016106a590612d72565b336000908152600660205260409020546111f75760405162461bcd60e51b815260206004820152601b60248201527f596f7520617265206e6f7420612076616c69642062696464657221000000000060448201526064016106a5565b33600081815260066020526040902054806112645760405162461bcd60e51b815260206004820152602760248201527f596f75206861766520616c7265616479207769746864726177616c20796f75726044820152662066756e64732160c81b60648201526084016106a5565b6001600160a01b0382166000908152600660205260408120805483929061128c908490612e7c565b909155505060025460405163a9059cbb60e01b81526001600160a01b038481166004830152602482018490529091169063a9059cbb90604401602060405180830381600087803b1580156112df57600080fd5b505af11580156112f3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113179190612b98565b50604080516001600160a01b0384168152602081018390527fb4214c8c54fc7442f36d3682f59aebaf09358a4431835b30efb29d52cf9e1e9191015b60405180910390a1505060018055565b600260015414156113865760405162461bcd60e51b81526004016106a590612dee565b6002600155336001600160a01b037f0000000000000000000000005e52ef9f85d7db24dadbbd788c43157b7baf250f1614156113d45760405162461bcd60e51b81526004016106a590612d72565b7f00000000000000000000000000000000000000000000000000000000628ddfa84211801561140d5750600254600160a01b900460ff16155b6114295760405162461bcd60e51b81526004016106a590612d3b565b336000908152600660205260409020546114855760405162461bcd60e51b815260206004820152601b60248201527f596f7520617265206e6f7420612076616c69642062696464657221000000000060448201526064016106a5565b600061148f61245d565b905060005b8151811015611557578181815181106114bd57634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166114d53390565b6001600160a01b031614156115455760405162461bcd60e51b815260206004820152603060248201527f596f75206172652077696e6e65722c20796f752063616e206e6f74207065726660448201526f6f726d207468697320616374696f6e2160801b60648201526084016106a5565b8061154f81612ebf565b915050611494565b5033600090815260066020526040902054806115b55760405162461bcd60e51b815260206004820152601d60248201527f596f7520616c7265616479206861766520726566756e64206261636b2100000060448201526064016106a5565b33600090815260066020526040812080548392906115d4908490612e7c565b90915550506002546001600160a01b031663a9059cbb336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260248101849052604401602060405180830381600087803b15801561163357600080fd5b505af1158015611647573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061166b9190612b98565b5060408051338152602081018390527fb6c0eca8138e097d71e2dd31e19a1266487f0553f170b7260ffe68bcbe9ff8a79101611353565b6000546001600160a01b031633146116cc5760405162461bcd60e51b81526004016106a590612db9565b7f00000000000000000000000000000000000000000000000000000000628ddfa8421180156117055750600254600160a01b900460ff16155b6117215760405162461bcd60e51b81526004016106a590612d3b565b6000805b60095481101561177d57826009828154811061175157634e487b7160e01b600052603260045260246000fd5b9060005260206000200154141561176b576001915061177d565b8061177581612ebf565b915050611725565b50806117d65760405162461bcd60e51b815260206004820152602260248201527f546f6b656e206973206e6f7420616c6c6f77656420666f722072656465656d65604482015261642160f01b60648201526084016106a5565b6000828152600860205260409020547f000000000000000000000000000000000000000000000000000000000000000a116118645760405162461bcd60e51b815260206004820152602860248201527f557365722068617665207265616368656420746865206d6178696d756d20616c6044820152676c6f77616e63652160c01b60648201526084016106a5565b60008281526008602052604090205461187e906001612751565b60008381526008602052604090819020829055517f559dc6ea45ea5071b1480938c0df2cd88fca6c769bfc8aeebc7c38364ff1ed5e916118c991859190918252602082015260400190565b60405180910390a15050565b6000546060906001600160a01b031633146119025760405162461bcd60e51b81526004016106a590612db9565b7f00000000000000000000000000000000000000000000000000000000628ddd9942101561196b5760405162461bcd60e51b815260206004820152601660248201527541756374696f6e20796574206e6f742073746172742160501b60448201526064016106a5565b60058054806020026020016040519081016040528092919081815260200182805480156119c157602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116119a3575b5050505050905090565b6000546001600160a01b031633146119f55760405162461bcd60e51b81526004016106a590612db9565b6119ff6000612769565b565b600060026001541415611a265760405162461bcd60e51b81526004016106a590612dee565b60026001556000546001600160a01b03163314611a555760405162461bcd60e51b81526004016106a590612db9565b7f00000000000000000000000000000000000000000000000000000000628ddfa8421115611abe5760405162461bcd60e51b815260206004820152601660248201527541756374696f6e20616c726561647920656e6465642160501b60448201526064016106a5565b600254600160a01b900460ff1615611b145760405162461bcd60e51b815260206004820152601960248201527841756374696f6e20616c72656164792063616e63656c65642160381b60448201526064016106a5565b6002805460ff60a01b1916600160a01b179055604051600181527f1fd636bc86322e474244a9366e9b72f9e75d3ba45b442352c7f950c92a9808a59060200160405180910390a150600180805590565b60026001541415611b875760405162461bcd60e51b81526004016106a590612dee565b60026001557f00000000000000000000000000000000000000000000000000000000628ddd99421015611bf55760405162461bcd60e51b815260206004820152601660248201527541756374696f6e20796574206e6f742073746172742160501b60448201526064016106a5565b7f00000000000000000000000000000000000000000000000000000000628ddfa8421115611c5e5760405162461bcd60e51b815260206004820152601660248201527541756374696f6e20616c726561647920656e6465642160501b60448201526064016106a5565b600254600160a01b900460ff1615611cb45760405162461bcd60e51b815260206004820152601960248201527841756374696f6e20616c72656164792063616e63656c65642160381b60448201526064016106a5565b337f0000000000000000000000005e52ef9f85d7db24dadbbd788c43157b7baf250f6001600160a01b03161415611cfd5760405162461bcd60e51b81526004016106a590612d72565b60008111611d465760405162461bcd60e51b815260206004820152601660248201527504269642076616c75652063616e206e6f7420626520360541b60448201526064016106a5565b60025481906001600160a01b03166370a08231336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260240160206040518083038186803b158015611d9957600080fd5b505afa158015611dad573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dd19190612bd0565b1015611e295760405162461bcd60e51b815260206004820152602160248201527f496e73756666696369616e7420455243323020746f6b656e2062616c616e63656044820152602160f81b60648201526084016106a5565b60025481906001600160a01b031663dd62ed3e336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015230602482015260440160206040518083038186803b158015611e8257600080fd5b505afa158015611e96573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611eba9190612bd0565b1015611f085760405162461bcd60e51b815260206004820152601b60248201527f417070726f766520455243323020746f6b656e7320666972737421000000000060448201526064016106a5565b33600090815260066020526040812054611f229083612751565b90507f0000000000000000000000000000000000000000000000000de0b6b3a7640000811015611fba5760405162461bcd60e51b815260206004820152603d60248201527f42696420546f6b656e20616d6f756e7420746f6f206c6f77212c20616d6f756e60448201527f742073686f756c642062652061626f766520666c6f6f7220707269636500000060648201526084016106a5565b600354811161201b5760405162461bcd60e51b815260206004820152602760248201527f506c65617365206f7665726269642074686520686967686573742062696e64696044820152666e67206269642160c81b60648201526084016106a5565b6004546001600160a01b03166000908152600660205260408082205433835291208290558082116120585761205082826127b9565b600355612096565b6004546001600160a01b0316336001600160a01b03161461209357600480546001600160a01b0319163317905561208f82826127b9565b6003555b50805b600580546001810182556000919091527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00180546001600160a01b031916339081179091556002546120f6916001600160a01b03919091169030866127cf565b60045460035460408051338152602081018790526001600160a01b03909316908301526060820183905260808201527ff152f4ff5e488c55370a2d53925a55055228ebd8ec95bd0251bbb299e48786b09060a001610fa6565b6000546060906001600160a01b0316331461217c5760405162461bcd60e51b81526004016106a590612db9565b7f00000000000000000000000000000000000000000000000000000000628ddfa8421180156121b55750600254600160a01b900460ff16155b6121d15760405162461bcd60e51b81526004016106a590612d3b565b60098054806020026020016040519081016040528092919081815260200182805480156119c157602002820191906000526020600020905b815481526020019060010190808311612209575050505050905090565b600080337f0000000000000000000000005e52ef9f85d7db24dadbbd788c43157b7baf250f6001600160a01b0316148061226a57506000546001600160a01b031633145b6122865760405162461bcd60e51b81526004016106a590612ceb565b600061229061245d565b905060008060005b8351811015612368576000600660008684815181106122c757634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020549050600061232c7f0000000000000000000000000000000000000000000000000000000000000005610d6760648561273290919063ffffffff16565b90506123388482612751565b506000612345838361275d565b90506123518682612751565b50505050808061236090612ebf565b915050612298565b5093509150509091565b600080546001600160a01b0316331461239d5760405162461bcd60e51b81526004016106a590612db9565b507f000000000000000000000000000000000000000000000000000000000000000590565b6000546001600160a01b031633146123ec5760405162461bcd60e51b81526004016106a590612db9565b6001600160a01b0381166124515760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016106a5565b61245a81612769565b50565b60607f00000000000000000000000000000000000000000000000000000000628ddfa8421180156124985750600254600160a01b900460ff16155b6124b45760405162461bcd60e51b81526004016106a590612d3b565b60055461251d5760405162461bcd60e51b815260206004820152603160248201527f4e6f2062696464657220666f756e642c2077696e6e6572206c6973742063616e604482015270206e6f742062652067656e65726174652160781b60648201526084016106a5565b6005546000907f00000000000000000000000000000000000000000000000000000000000000031161256f577f0000000000000000000000000000000000000000000000000000000000000003612573565b6005545b905060008167ffffffffffffffff81111561259e57634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156125c7578160200160208202803683370190505b50905060015b82811161272b576005546000906125e4908361275d565b905060006125f383600161275d565b90506000805b855181101561268f576005848154811061262357634e487b7160e01b600052603260045260246000fd5b60009182526020909120015486516001600160a01b039091169087908390811061265d57634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b0316141561267d576001915061268f565b8061268781612ebf565b9150506125f9565b508061271557600583815481106126b657634e487b7160e01b600052603260045260246000fd5b9060005260206000200160009054906101000a90046001600160a01b03168583815181106126f457634e487b7160e01b600052603260045260246000fd5b60200260200101906001600160a01b031690816001600160a01b0316815250505b505050808061272390612ebf565b9150506125cd565b5091505090565b600061273e8284612e3d565b9392505050565b600061273e8284612e5d565b600061273e8284612e25565b600061273e8284612e7c565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008183106127c8578161273e565b5090919050565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b17905261282990859061282f565b50505050565b6000612884826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166129069092919063ffffffff16565b80519091501561290157808060200190518101906128a29190612b98565b6129015760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016106a5565b505050565b6060612915848460008561291d565b949350505050565b60608247101561297e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016106a5565b6001600160a01b0385163b6129d55760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016106a5565b600080866001600160a01b031685876040516129f19190612c17565b60006040518083038185875af1925050503d8060008114612a2e576040519150601f19603f3d011682016040523d82523d6000602084013e612a33565b606091505b5091509150612a43828286612a4e565b979650505050505050565b60608315612a5d57508161273e565b825115612a6d5782518084602001fd5b8160405162461bcd60e51b81526004016106a59190612cb8565b600060208284031215612a98578081fd5b813561273e81612f06565b600060208284031215612ab4578081fd5b815161273e81612f06565b60008060008060808587031215612ad4578283fd5b8435612adf81612f06565b93506020850135612aef81612f06565b925060408501359150606085013567ffffffffffffffff80821115612b12578283fd5b818701915087601f830112612b25578283fd5b813581811115612b3757612b37612ef0565b604051601f8201601f19908116603f01168101908382118183101715612b5f57612b5f612ef0565b816040528281528a6020848701011115612b77578586fd5b82602086016020830137918201602001949094529598949750929550505050565b600060208284031215612ba9578081fd5b8151801515811461273e578182fd5b600060208284031215612bc9578081fd5b5035919050565b600060208284031215612be1578081fd5b5051919050565b60008060408385031215612bfa578182fd5b823591506020830135612c0c81612f06565b809150509250929050565b60008251612c29818460208701612e93565b9190910192915050565b6020808252825182820181905260009190848201906040850190845b81811015612c745783516001600160a01b031683529284019291840191600101612c4f565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b81811015612c7457835183529284019291840191600101612c9c565b6020815260008251806020840152612cd7816040850160208701612e93565b601f01601f19169190910160400192915050565b60208082526030908201527f42656e6566696369617279202f204f776e65722063616e206f6e6c792070657260408201526f666f726d2074686520616374696f6e2160801b606082015260800190565b60208082526019908201527f41756374696f6e206973206e6f7420656e646564207965742100000000000000604082015260600190565b60208082526027908201527f42656e65666963696172792063616e206e6f7420706572666f726d2074686520604082015266616374696f6e2160c81b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60008219821115612e3857612e38612eda565b500190565b600082612e5857634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615612e7757612e77612eda565b500290565b600082821015612e8e57612e8e612eda565b500390565b60005b83811015612eae578181015183820152602001612e96565b838111156128295750506000910152565b6000600019821415612ed357612ed3612eda565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461245a57600080fdfea2646970667358221220f4665792158c00c09feb568546294a509df84f2c4eecfbb69b3dbb3d50d61ac964736f6c63430008040033