false
false
0

Contract Address Details

0x39f8E6ECc31e0549c48bdb968e6C352F22Cbc844

Contract Name
NFTMulticlassBiddableAuction
Creator
0x552e41–633d77 at 0x4691dd–d61661
Balance
0 CLO
Tokens
Fetching tokens...
Transactions
15 Transactions
Transfers
2 Transfers
Gas Used
1,130,054
Last Balance Update
16292601
Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
Contract name:
NFTMulticlassBiddableAuction




Optimization enabled
true
Compiler version
v0.8.12+commit.f00d7308




Optimization runs
1000
EVM Version
default




Verified at
2024-09-26T15:33:31.384750Z

Contract source code

// SPDX-License-Identifier: GPL

pragma solidity ^0.8.0;

abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }
}

abstract contract Ownable is Context {
    address internal _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);
    }
}

interface ArtefinNFT {
    function mintWithClass(uint256 classId) external returns (uint256 _newTokenID);
    function transfer(address _to, uint256 _tokenId, bytes calldata _data) external returns (bool);
    function addPropertyWithContent(uint256 _tokenId, string calldata _content) external;
}

contract ActivatedByOwner is Ownable {
    bool public active = true;

    function setActive(bool _active) public  onlyOwner
    {
        active = _active;
    }

    modifier onlyActive
    {
        require(active, "This contract is deactivated by owner");
        _;
    }
}

contract NFTMulticlassBiddableAuction is ActivatedByOwner {

    event AuctionCreated(uint256 indexed tokenClassAuctionID, uint256 timestamp);
    event NFTContractSet(address indexed newNFTContract, address indexed oldNFTContract);
    event RevenueWithdrawal(uint256 amount);
    event RoundEnd(uint256 indexed tokenClassAuctionID, address indexed winner, uint256 indexed acquiredTokenID);
    event NewRound(uint256 indexed tokenClassAuctionID, uint256 indexed startTimestamp, uint256 indexed endTimestamp);
    event Bid (uint256 bid, address bidder);

    address public nft_contract;

    struct NFTBiddableAuctionClass
    {
        uint256 max_supply;
        uint256 amount_sold;
        uint256 start_timestamp;
        uint256 duration;
        uint256 min_priceInWei;
        uint256 highest_bid;
        address winner;
        string winners_name;
        string[] configuratin_properties;
    }

    struct NFTBidClass
    {
        uint256 classID;
        address owner;
        uint256 bid_amount;
        uint256 bid_timestamp;
    }

    mapping (uint256 => NFTBidClass) public bids; // Mapping all bids
    uint256 public nextBidIndex = 0; //Bids index

    mapping (uint256 => NFTBiddableAuctionClass) public auctions; // Mapping from classID (at NFT contract) to set of variables
                                                                  //  defining the auction for this token class.
    uint256 public revenue_amount; // total amount of revenue

    address payable public revenue = payable(0x01000B5fE61411C466b70631d7fF070187179Bbf); // This address has the rights to withdraw funds from the auction.

    constructor()
    {
        _owner = msg.sender;
    }

    function createNFTAuction(
        uint256 _classID, 
        uint256 _max_supply, 
        uint256 _start_timestamp, 
        uint256 _duration, 
        uint256 _minPriceInWEI,
        uint256 _already_sold 
    ) public onlyOwner
    {
        auctions[_classID].max_supply      = _max_supply;
        auctions[_classID].amount_sold     = _already_sold;
        auctions[_classID].start_timestamp = _start_timestamp;
        auctions[_classID].duration        = _duration;
        auctions[_classID].min_priceInWei  = _minPriceInWEI;
        auctions[_classID].winner          = owner();

        emit AuctionCreated(_classID, block.timestamp);
    }

    function setRevenueAddress(address payable _revenue_address) public onlyOwner {
        revenue = _revenue_address;
    }

    function setNFTContract(address _nftContract) public onlyOwner
    {
        emit NFTContractSet(nft_contract, _nftContract);

        nft_contract = _nftContract;
    }
    
    function bidOnNFT(uint256 _classID,string memory _name) public payable onlyActive
    {

        uint256 _bid = msg.value;

        require(_bid >= auctions[_classID].min_priceInWei, "Min price criteria is not met");
        require(auctions[_classID].start_timestamp < block.timestamp, "Auction did not start yet");

        if(auctions[_classID].start_timestamp + auctions[_classID].duration < block.timestamp)
        {
            endRound(_classID);
            payable(msg.sender).transfer(_bid - auctions[_classID].min_priceInWei);
            _bid = auctions[_classID].min_priceInWei;
        }

        require(auctions[_classID].max_supply > auctions[_classID].amount_sold, "All NFTs of this artwork are already sold");

        require(
            _bid >= auctions[_classID].highest_bid + auctions[_classID].highest_bid/20 && 
            _bid >= auctions[_classID].highest_bid + 1e18,
            "Does not outbid current winner by 5%"
        );
        require(auctions[_classID].min_priceInWei != 0, "Min price is not configured by the owner");

        payable(auctions[_classID].winner).transfer(auctions[_classID].highest_bid);

        auctions[_classID].winner      = msg.sender;
        auctions[_classID].winners_name = _name;
        auctions[_classID].highest_bid = _bid;

        bids[nextBidIndex].classID = _classID;
        bids[nextBidIndex].owner = msg.sender;
        bids[nextBidIndex].bid_amount = _bid;
        bids[nextBidIndex].bid_timestamp = block.timestamp;

        nextBidIndex++;

        emit Bid (_bid, msg.sender);
    }

    function resetRound(uint256 _classID) internal
    {
        auctions[_classID].winner          = owner();
        auctions[_classID].highest_bid     = 0;
        auctions[_classID].start_timestamp = block.timestamp + 600;

        emit NewRound(_classID, auctions[_classID].start_timestamp, auctions[_classID].start_timestamp + auctions[_classID].duration);
    }

    function endRound(uint256 _classID) public
    {
        require(block.timestamp > auctions[_classID].start_timestamp + auctions[_classID].duration, "Auction is still in progress");
        require(auctions[_classID].max_supply > auctions[_classID].amount_sold, "All NFTs of this artwork are already sold");
        auctions[_classID].amount_sold++;

        uint256 _mintedId = ArtefinNFT(nft_contract).mintWithClass(_classID);
        configureNFT(_mintedId, _classID);

        ArtefinNFT(nft_contract).transfer(auctions[_classID].winner, _mintedId, "");

        emit RoundEnd(_classID, auctions[_classID].winner, _mintedId);
        revenue_amount += auctions[_classID].highest_bid;

        if(auctions[_classID].amount_sold != auctions[_classID].max_supply)
        {
            resetRound(_classID);
        }
    }

    function configureNFT(uint256 _tokenId, uint256 _classId) internal
    {
        //Add Serial Number to the created Token
        uint256 tokenSerialNumber = auctions[_classId].amount_sold;
        ArtefinNFT(nft_contract).addPropertyWithContent(_tokenId, toString(tokenSerialNumber));
    }

    function withdrawRevenue() public onlyOwner
    {
        require(msg.sender == revenue, "This action requires revenue permission");

        uint256 toPay = revenue_amount;

        revenue_amount = 0;

        revenue.transfer(toPay);

        emit RevenueWithdrawal(toPay);
    }

    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Strings.sol#L15-L35

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }
}
        

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","inputs":[]},{"type":"event","name":"AuctionCreated","inputs":[{"type":"uint256","name":"tokenClassAuctionID","internalType":"uint256","indexed":true},{"type":"uint256","name":"timestamp","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"Bid","inputs":[{"type":"uint256","name":"bid","internalType":"uint256","indexed":false},{"type":"address","name":"bidder","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"NFTContractSet","inputs":[{"type":"address","name":"newNFTContract","internalType":"address","indexed":true},{"type":"address","name":"oldNFTContract","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"NewRound","inputs":[{"type":"uint256","name":"tokenClassAuctionID","internalType":"uint256","indexed":true},{"type":"uint256","name":"startTimestamp","internalType":"uint256","indexed":true},{"type":"uint256","name":"endTimestamp","internalType":"uint256","indexed":true}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":true},{"type":"address","name":"newOwner","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"RevenueWithdrawal","inputs":[{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"RoundEnd","inputs":[{"type":"uint256","name":"tokenClassAuctionID","internalType":"uint256","indexed":true},{"type":"address","name":"winner","internalType":"address","indexed":true},{"type":"uint256","name":"acquiredTokenID","internalType":"uint256","indexed":true}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"active","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"max_supply","internalType":"uint256"},{"type":"uint256","name":"amount_sold","internalType":"uint256"},{"type":"uint256","name":"start_timestamp","internalType":"uint256"},{"type":"uint256","name":"duration","internalType":"uint256"},{"type":"uint256","name":"min_priceInWei","internalType":"uint256"},{"type":"uint256","name":"highest_bid","internalType":"uint256"},{"type":"address","name":"winner","internalType":"address"},{"type":"string","name":"winners_name","internalType":"string"}],"name":"auctions","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"payable","outputs":[],"name":"bidOnNFT","inputs":[{"type":"uint256","name":"_classID","internalType":"uint256"},{"type":"string","name":"_name","internalType":"string"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"classID","internalType":"uint256"},{"type":"address","name":"owner","internalType":"address"},{"type":"uint256","name":"bid_amount","internalType":"uint256"},{"type":"uint256","name":"bid_timestamp","internalType":"uint256"}],"name":"bids","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"createNFTAuction","inputs":[{"type":"uint256","name":"_classID","internalType":"uint256"},{"type":"uint256","name":"_max_supply","internalType":"uint256"},{"type":"uint256","name":"_start_timestamp","internalType":"uint256"},{"type":"uint256","name":"_duration","internalType":"uint256"},{"type":"uint256","name":"_minPriceInWEI","internalType":"uint256"},{"type":"uint256","name":"_already_sold","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"endRound","inputs":[{"type":"uint256","name":"_classID","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"nextBidIndex","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"nft_contract","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address payable"}],"name":"revenue","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"revenue_amount","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setActive","inputs":[{"type":"bool","name":"_active","internalType":"bool"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setNFTContract","inputs":[{"type":"address","name":"_nftContract","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setRevenueAddress","inputs":[{"type":"address","name":"_revenue_address","internalType":"address payable"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"withdrawRevenue","inputs":[]}]
              

Contract Creation Code

Verify & Publish
0x60806040526000805460ff60a01b1916600160a01b178155600355600680546001600160a01b0319167301000b5fe61411c466b70631d7ff070187179bbf17905534801561004c57600080fd5b50600080546001600160a01b031916331790556117ef8061006e6000396000f3fe6080604052600436106100f35760003560e01c80635a1e6ca11161008a578063a7ccabdf11610059578063a7ccabdf146102f1578063acec338a14610311578063f2fde38b14610331578063fcdcdeee1461035157600080fd5b80635a1e6ca11461028a5780638da5cb5b146102aa578063973adfb7146102c8578063982f45e2146102db57600080fd5b806345338d63116100c657806345338d63146101ff5780634e055c47146102215780634f573cb214610241578063571a26a01461025657600080fd5b806302fb0c5e146100f857806322efda771461012e5780633e9491a2146101525780634423c5f11461018a575b600080fd5b34801561010457600080fd5b5060005461011990600160a01b900460ff1681565b60405190151581526020015b60405180910390f35b34801561013a57600080fd5b5061014460035481565b604051908152602001610125565b34801561015e57600080fd5b50600654610172906001600160a01b031681565b6040516001600160a01b039091168152602001610125565b34801561019657600080fd5b506101d76101a5366004611447565b6002602081905260009182526040909120805460018201549282015460039092015490926001600160a01b0316919084565b604080519485526001600160a01b039093166020850152918301526060820152608001610125565b34801561020b57600080fd5b5061021f61021a366004611475565b610371565b005b34801561022d57600080fd5b5061021f61023c366004611499565b6103f2565b34801561024d57600080fd5b5061021f6104da565b34801561026257600080fd5b50610276610271366004611447565b610630565b604051610125989796959493929190611529565b34801561029657600080fd5b5061021f6102a5366004611447565b610709565b3480156102b657600080fd5b506000546001600160a01b0316610172565b61021f6102d6366004611595565b6109f4565b3480156102e757600080fd5b5061014460055481565b3480156102fd57600080fd5b5061021f61030c366004611475565b610ed3565b34801561031d57600080fd5b5061021f61032c36600461165e565b610f89565b34801561033d57600080fd5b5061021f61034c366004611475565b61101c565b34801561035d57600080fd5b50600154610172906001600160a01b031681565b6000546001600160a01b031633146103d05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b600680546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b0316331461044c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103c7565b60008681526004602081815260408084208981556001810186905560028101899055600381018890559283018690559254600690920180546001600160a01b0319166001600160a01b03909316929092179091558151428152915188927fe00a2da3a0f34a566402a244ab7ec63f8ab7472591cb18edf3269aa00461a41092908290030190a2505050505050565b6000546001600160a01b031633146105345760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103c7565b6006546001600160a01b031633146105b45760405162461bcd60e51b815260206004820152602760248201527f5468697320616374696f6e20726571756972657320726576656e75652070657260448201527f6d697373696f6e0000000000000000000000000000000000000000000000000060648201526084016103c7565b6005805460009182905560065460405191926001600160a01b039091169183156108fc0291849190818181858888f193505050501580156105f9573d6000803e3d6000fd5b506040518181527f3449177c5be4aca5ea828acefea3213c1a52e1ad402fd9571d234a265e6d63119060200160405180910390a150565b600460208190526000918252604090912080546001820154600283015460038401549484015460058501546006860154600787018054969895979496939492936001600160a01b0390921692916106869061167b565b80601f01602080910402602001604051908101604052809291908181526020018280546106b29061167b565b80156106ff5780601f106106d4576101008083540402835291602001916106ff565b820191906000526020600020905b8154815290600101906020018083116106e257829003601f168201915b5050505050905088565b6000818152600460205260409020600381015460029091015461072c91906116cc565b421161077a5760405162461bcd60e51b815260206004820152601c60248201527f41756374696f6e206973207374696c6c20696e2070726f67726573730000000060448201526064016103c7565b600081815260046020526040902060018101549054116107ee5760405162461bcd60e51b815260206004820152602960248201527f416c6c204e465473206f66207468697320617274776f726b2061726520616c726044820152681958591e481cdbdb1960ba1b60648201526084016103c7565b600081815260046020526040812060010180549161080b836116e4565b90915550506001546040517f3c65b3eb000000000000000000000000000000000000000000000000000000008152600481018390526000916001600160a01b031690633c65b3eb906024016020604051808303816000875af1158015610875573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061089991906116ff565b90506108a581836110fe565b60015460008381526004602081905260408083206006015490517fbe45fd620000000000000000000000000000000000000000000000000000000081526001600160a01b03918216928101929092526024820185905260606044830152606482019290925291169063be45fd62906084016020604051808303816000875af1158015610935573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109599190611718565b5060008281526004602052604080822060060154905183926001600160a01b039092169185917fa49385eb61e4f439063d5c00de2ab7a1fff06ca35f6f06fb634d21a2e8ad32799190a4600082815260046020526040812060059081015481549092906109c79084906116cc565b909155505060008281526004602052604090208054600190910154146109f0576109f082611180565b5050565b600054600160a01b900460ff16610a735760405162461bcd60e51b815260206004820152602560248201527f5468697320636f6e74726163742069732064656163746976617465642062792060448201527f6f776e657200000000000000000000000000000000000000000000000000000060648201526084016103c7565b600082815260046020819052604090912001543490811015610ad75760405162461bcd60e51b815260206004820152601d60248201527f4d696e207072696365206372697465726961206973206e6f74206d657400000060448201526064016103c7565b6000838152600460205260409020600201544211610b375760405162461bcd60e51b815260206004820152601960248201527f41756374696f6e20646964206e6f74207374617274207965740000000000000060448201526064016103c7565b600083815260046020526040902060038101546002909101544291610b5b916116cc565b1015610bcb57610b6a83610709565b6000838152600460208190526040909120015433906108fc90610b8d9084611735565b6040518115909202916000818181858888f19350505050158015610bb5573d6000803e3d6000fd5b5050600082815260046020819052604090912001545b60008381526004602052604090206001810154905411610c3f5760405162461bcd60e51b815260206004820152602960248201527f416c6c204e465473206f66207468697320617274776f726b2061726520616c726044820152681958591e481cdbdb1960ba1b60648201526084016103c7565b600083815260046020526040902060050154610c5d90601490611762565b600084815260046020526040902060050154610c7991906116cc565b8110158015610cab5750600083815260046020526040902060050154610ca790670de0b6b3a76400006116cc565b8110155b610d1c5760405162461bcd60e51b8152602060048201526024808201527f446f6573206e6f74206f75746269642063757272656e742077696e6e6572206260448201527f792035250000000000000000000000000000000000000000000000000000000060648201526084016103c7565b60008381526004602081905260409091200154610da15760405162461bcd60e51b815260206004820152602860248201527f4d696e207072696365206973206e6f7420636f6e66696775726564206279207460448201527f6865206f776e657200000000000000000000000000000000000000000000000060648201526084016103c7565b600083815260046020526040808220600681015460059091015491516001600160a01b039091169282156108fc02929190818181858888f19350505050158015610def573d6000803e3d6000fd5b5060008381526004602090815260409091206006810180546001600160a01b031916331790558351610e29926007909201918501906113ae565b5060008381526004602090815260408083206005018490556003805484526002928390528184208790558054845281842060010180546001600160a01b03191633179055805484528184209092018490558154835282204290820155805491610e91836116e4565b9091555050604080518281523360208201527fd88316c1b83cbeed61627b1084e3de7ced6b85ee432bd3b1dbdb7180005a6556910160405180910390a1505050565b6000546001600160a01b03163314610f2d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103c7565b6001546040516001600160a01b038084169216907f048be79eb9eed95d1a5143dcb6b4b7a5ac915c1decaebd1bd13f267a3cc2dbba90600090a3600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610fe35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103c7565b60008054911515600160a01b027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff909216919091179055565b6000546001600160a01b031633146110765760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103c7565b6001600160a01b0381166110f25760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016103c7565b6110fb81611224565b50565b600081815260046020526040902060019081015490546001600160a01b031663290e008c8461112c84611274565b6040518363ffffffff1660e01b8152600401611149929190611776565b600060405180830381600087803b15801561116357600080fd5b505af1158015611177573d6000803e3d6000fd5b50505050505050565b600080548282526004602052604082206006810180546001600160a01b0319166001600160a01b0390931692909217909155600501556111c2426102586116cc565b600082815260046020526040902060028101829055600301546111e4916116cc565b600082815260046020526040808220600201549051909184917f5aec57d81928b24d30b1a2aec0d23d693412c37d7ec106b5d8259413716bb1f49190a450565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6060816112b457505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b81156112de57806112c8816116e4565b91506112d79050600a83611762565b91506112b8565b60008167ffffffffffffffff8111156112f9576112f961157f565b6040519080825280601f01601f191660200182016040528015611323576020820181803683370190505b5090505b84156113a657611338600183611735565b9150611345600a8661178f565b6113509060306116cc565b60f81b818381518110611365576113656117a3565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535061139f600a86611762565b9450611327565b949350505050565b8280546113ba9061167b565b90600052602060002090601f0160209004810192826113dc5760008555611422565b82601f106113f557805160ff1916838001178555611422565b82800160010185558215611422579182015b82811115611422578251825591602001919060010190611407565b5061142e929150611432565b5090565b5b8082111561142e5760008155600101611433565b60006020828403121561145957600080fd5b5035919050565b6001600160a01b03811681146110fb57600080fd5b60006020828403121561148757600080fd5b813561149281611460565b9392505050565b60008060008060008060c087890312156114b257600080fd5b505084359660208601359650604086013595606081013595506080810135945060a0013592509050565b6000815180845260005b81811015611502576020818501810151868301820152016114e6565b81811115611514576000602083870101525b50601f01601f19169290920160200192915050565b60006101008a83528960208401528860408401528760608401528660808401528560a08401526001600160a01b03851660c08401528060e0840152611570818401856114dc565b9b9a5050505050505050505050565b634e487b7160e01b600052604160045260246000fd5b600080604083850312156115a857600080fd5b82359150602083013567ffffffffffffffff808211156115c757600080fd5b818501915085601f8301126115db57600080fd5b8135818111156115ed576115ed61157f565b604051601f8201601f19908116603f011681019083821181831017156116155761161561157f565b8160405282815288602084870101111561162e57600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b80151581146110fb57600080fd5b60006020828403121561167057600080fd5b813561149281611650565b600181811c9082168061168f57607f821691505b602082108114156116b057634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b600082198211156116df576116df6116b6565b500190565b60006000198214156116f8576116f86116b6565b5060010190565b60006020828403121561171157600080fd5b5051919050565b60006020828403121561172a57600080fd5b815161149281611650565b600082821015611747576117476116b6565b500390565b634e487b7160e01b600052601260045260246000fd5b6000826117715761177161174c565b500490565b8281526040602082015260006113a660408301846114dc565b60008261179e5761179e61174c565b500690565b634e487b7160e01b600052603260045260246000fdfea2646970667358221220b6dd96f0dfdec970f86e16602f66530990166379ac2840582a02e080a90ad14f64736f6c634300080c0033

Deployed ByteCode

0x6080604052600436106100f35760003560e01c80635a1e6ca11161008a578063a7ccabdf11610059578063a7ccabdf146102f1578063acec338a14610311578063f2fde38b14610331578063fcdcdeee1461035157600080fd5b80635a1e6ca11461028a5780638da5cb5b146102aa578063973adfb7146102c8578063982f45e2146102db57600080fd5b806345338d63116100c657806345338d63146101ff5780634e055c47146102215780634f573cb214610241578063571a26a01461025657600080fd5b806302fb0c5e146100f857806322efda771461012e5780633e9491a2146101525780634423c5f11461018a575b600080fd5b34801561010457600080fd5b5060005461011990600160a01b900460ff1681565b60405190151581526020015b60405180910390f35b34801561013a57600080fd5b5061014460035481565b604051908152602001610125565b34801561015e57600080fd5b50600654610172906001600160a01b031681565b6040516001600160a01b039091168152602001610125565b34801561019657600080fd5b506101d76101a5366004611447565b6002602081905260009182526040909120805460018201549282015460039092015490926001600160a01b0316919084565b604080519485526001600160a01b039093166020850152918301526060820152608001610125565b34801561020b57600080fd5b5061021f61021a366004611475565b610371565b005b34801561022d57600080fd5b5061021f61023c366004611499565b6103f2565b34801561024d57600080fd5b5061021f6104da565b34801561026257600080fd5b50610276610271366004611447565b610630565b604051610125989796959493929190611529565b34801561029657600080fd5b5061021f6102a5366004611447565b610709565b3480156102b657600080fd5b506000546001600160a01b0316610172565b61021f6102d6366004611595565b6109f4565b3480156102e757600080fd5b5061014460055481565b3480156102fd57600080fd5b5061021f61030c366004611475565b610ed3565b34801561031d57600080fd5b5061021f61032c36600461165e565b610f89565b34801561033d57600080fd5b5061021f61034c366004611475565b61101c565b34801561035d57600080fd5b50600154610172906001600160a01b031681565b6000546001600160a01b031633146103d05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b600680546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b0316331461044c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103c7565b60008681526004602081815260408084208981556001810186905560028101899055600381018890559283018690559254600690920180546001600160a01b0319166001600160a01b03909316929092179091558151428152915188927fe00a2da3a0f34a566402a244ab7ec63f8ab7472591cb18edf3269aa00461a41092908290030190a2505050505050565b6000546001600160a01b031633146105345760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103c7565b6006546001600160a01b031633146105b45760405162461bcd60e51b815260206004820152602760248201527f5468697320616374696f6e20726571756972657320726576656e75652070657260448201527f6d697373696f6e0000000000000000000000000000000000000000000000000060648201526084016103c7565b6005805460009182905560065460405191926001600160a01b039091169183156108fc0291849190818181858888f193505050501580156105f9573d6000803e3d6000fd5b506040518181527f3449177c5be4aca5ea828acefea3213c1a52e1ad402fd9571d234a265e6d63119060200160405180910390a150565b600460208190526000918252604090912080546001820154600283015460038401549484015460058501546006860154600787018054969895979496939492936001600160a01b0390921692916106869061167b565b80601f01602080910402602001604051908101604052809291908181526020018280546106b29061167b565b80156106ff5780601f106106d4576101008083540402835291602001916106ff565b820191906000526020600020905b8154815290600101906020018083116106e257829003601f168201915b5050505050905088565b6000818152600460205260409020600381015460029091015461072c91906116cc565b421161077a5760405162461bcd60e51b815260206004820152601c60248201527f41756374696f6e206973207374696c6c20696e2070726f67726573730000000060448201526064016103c7565b600081815260046020526040902060018101549054116107ee5760405162461bcd60e51b815260206004820152602960248201527f416c6c204e465473206f66207468697320617274776f726b2061726520616c726044820152681958591e481cdbdb1960ba1b60648201526084016103c7565b600081815260046020526040812060010180549161080b836116e4565b90915550506001546040517f3c65b3eb000000000000000000000000000000000000000000000000000000008152600481018390526000916001600160a01b031690633c65b3eb906024016020604051808303816000875af1158015610875573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061089991906116ff565b90506108a581836110fe565b60015460008381526004602081905260408083206006015490517fbe45fd620000000000000000000000000000000000000000000000000000000081526001600160a01b03918216928101929092526024820185905260606044830152606482019290925291169063be45fd62906084016020604051808303816000875af1158015610935573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109599190611718565b5060008281526004602052604080822060060154905183926001600160a01b039092169185917fa49385eb61e4f439063d5c00de2ab7a1fff06ca35f6f06fb634d21a2e8ad32799190a4600082815260046020526040812060059081015481549092906109c79084906116cc565b909155505060008281526004602052604090208054600190910154146109f0576109f082611180565b5050565b600054600160a01b900460ff16610a735760405162461bcd60e51b815260206004820152602560248201527f5468697320636f6e74726163742069732064656163746976617465642062792060448201527f6f776e657200000000000000000000000000000000000000000000000000000060648201526084016103c7565b600082815260046020819052604090912001543490811015610ad75760405162461bcd60e51b815260206004820152601d60248201527f4d696e207072696365206372697465726961206973206e6f74206d657400000060448201526064016103c7565b6000838152600460205260409020600201544211610b375760405162461bcd60e51b815260206004820152601960248201527f41756374696f6e20646964206e6f74207374617274207965740000000000000060448201526064016103c7565b600083815260046020526040902060038101546002909101544291610b5b916116cc565b1015610bcb57610b6a83610709565b6000838152600460208190526040909120015433906108fc90610b8d9084611735565b6040518115909202916000818181858888f19350505050158015610bb5573d6000803e3d6000fd5b5050600082815260046020819052604090912001545b60008381526004602052604090206001810154905411610c3f5760405162461bcd60e51b815260206004820152602960248201527f416c6c204e465473206f66207468697320617274776f726b2061726520616c726044820152681958591e481cdbdb1960ba1b60648201526084016103c7565b600083815260046020526040902060050154610c5d90601490611762565b600084815260046020526040902060050154610c7991906116cc565b8110158015610cab5750600083815260046020526040902060050154610ca790670de0b6b3a76400006116cc565b8110155b610d1c5760405162461bcd60e51b8152602060048201526024808201527f446f6573206e6f74206f75746269642063757272656e742077696e6e6572206260448201527f792035250000000000000000000000000000000000000000000000000000000060648201526084016103c7565b60008381526004602081905260409091200154610da15760405162461bcd60e51b815260206004820152602860248201527f4d696e207072696365206973206e6f7420636f6e66696775726564206279207460448201527f6865206f776e657200000000000000000000000000000000000000000000000060648201526084016103c7565b600083815260046020526040808220600681015460059091015491516001600160a01b039091169282156108fc02929190818181858888f19350505050158015610def573d6000803e3d6000fd5b5060008381526004602090815260409091206006810180546001600160a01b031916331790558351610e29926007909201918501906113ae565b5060008381526004602090815260408083206005018490556003805484526002928390528184208790558054845281842060010180546001600160a01b03191633179055805484528184209092018490558154835282204290820155805491610e91836116e4565b9091555050604080518281523360208201527fd88316c1b83cbeed61627b1084e3de7ced6b85ee432bd3b1dbdb7180005a6556910160405180910390a1505050565b6000546001600160a01b03163314610f2d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103c7565b6001546040516001600160a01b038084169216907f048be79eb9eed95d1a5143dcb6b4b7a5ac915c1decaebd1bd13f267a3cc2dbba90600090a3600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610fe35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103c7565b60008054911515600160a01b027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff909216919091179055565b6000546001600160a01b031633146110765760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103c7565b6001600160a01b0381166110f25760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016103c7565b6110fb81611224565b50565b600081815260046020526040902060019081015490546001600160a01b031663290e008c8461112c84611274565b6040518363ffffffff1660e01b8152600401611149929190611776565b600060405180830381600087803b15801561116357600080fd5b505af1158015611177573d6000803e3d6000fd5b50505050505050565b600080548282526004602052604082206006810180546001600160a01b0319166001600160a01b0390931692909217909155600501556111c2426102586116cc565b600082815260046020526040902060028101829055600301546111e4916116cc565b600082815260046020526040808220600201549051909184917f5aec57d81928b24d30b1a2aec0d23d693412c37d7ec106b5d8259413716bb1f49190a450565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6060816112b457505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b81156112de57806112c8816116e4565b91506112d79050600a83611762565b91506112b8565b60008167ffffffffffffffff8111156112f9576112f961157f565b6040519080825280601f01601f191660200182016040528015611323576020820181803683370190505b5090505b84156113a657611338600183611735565b9150611345600a8661178f565b6113509060306116cc565b60f81b818381518110611365576113656117a3565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535061139f600a86611762565b9450611327565b949350505050565b8280546113ba9061167b565b90600052602060002090601f0160209004810192826113dc5760008555611422565b82601f106113f557805160ff1916838001178555611422565b82800160010185558215611422579182015b82811115611422578251825591602001919060010190611407565b5061142e929150611432565b5090565b5b8082111561142e5760008155600101611433565b60006020828403121561145957600080fd5b5035919050565b6001600160a01b03811681146110fb57600080fd5b60006020828403121561148757600080fd5b813561149281611460565b9392505050565b60008060008060008060c087890312156114b257600080fd5b505084359660208601359650604086013595606081013595506080810135945060a0013592509050565b6000815180845260005b81811015611502576020818501810151868301820152016114e6565b81811115611514576000602083870101525b50601f01601f19169290920160200192915050565b60006101008a83528960208401528860408401528760608401528660808401528560a08401526001600160a01b03851660c08401528060e0840152611570818401856114dc565b9b9a5050505050505050505050565b634e487b7160e01b600052604160045260246000fd5b600080604083850312156115a857600080fd5b82359150602083013567ffffffffffffffff808211156115c757600080fd5b818501915085601f8301126115db57600080fd5b8135818111156115ed576115ed61157f565b604051601f8201601f19908116603f011681019083821181831017156116155761161561157f565b8160405282815288602084870101111561162e57600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b80151581146110fb57600080fd5b60006020828403121561167057600080fd5b813561149281611650565b600181811c9082168061168f57607f821691505b602082108114156116b057634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b600082198211156116df576116df6116b6565b500190565b60006000198214156116f8576116f86116b6565b5060010190565b60006020828403121561171157600080fd5b5051919050565b60006020828403121561172a57600080fd5b815161149281611650565b600082821015611747576117476116b6565b500390565b634e487b7160e01b600052601260045260246000fd5b6000826117715761177161174c565b500490565b8281526040602082015260006113a660408301846114dc565b60008261179e5761179e61174c565b500690565b634e487b7160e01b600052603260045260246000fdfea2646970667358221220b6dd96f0dfdec970f86e16602f66530990166379ac2840582a02e080a90ad14f64736f6c634300080c0033