Contract Address Details

0xe2Db77D6D0bF020a798CaF82A87B4073603533ac

Contract Name
DeadHeadzNFTStake
Creator
0xacd320–1fac21 at 0x4d55be–941d0d
Balance
0.24 Doge
Tokens
Fetching tokens...
Transactions
50 Transactions
Transfers
66 Transfers
Gas Used
5,511,016
Last Balance Update
10089105
Contract name:
DeadHeadzNFTStake




Optimization enabled
false
Compiler version
v0.8.17+commit.8df45f5f




EVM Version
default




Verified at
2022-10-01T11:21:18.462717Z

Constructor Arguments

000000000000000000000000b58904a0328abacf05b288e51a578471a8317b700000000000000000000000000398c92971e98f49b84fa5ede6bb102ec113f7e500000000000000000000000000000000000000000000000000148f478ee505ed0000000000000000000000000000000000000000000000000011c37937e08000

Arg [0] (address) : 0xb58904a0328abacf05b288e51a578471a8317b70
Arg [1] (address) : 0x0398c92971e98f49b84fa5ede6bb102ec113f7e5
Arg [2] (uint256) : 5787037037037037
Arg [3] (uint256) : 5000000000000000

              

Contract source code

// File: @openzeppelin/contracts/utils/introspection/IERC165.sol


// 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);
}

// File: @openzeppelin/contracts/token/ERC721/IERC721.sol


// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;


/**
 * @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 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);
}

// File: @openzeppelin/contracts/token/ERC721/IERC721Receiver.sol


// 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);
}

// File: @openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol


// OpenZeppelin Contracts v4.4.1 (token/ERC721/utils/ERC721Holder.sol)

pragma solidity ^0.8.0;


/**
 * @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;
    }
}

// File: @openzeppelin/contracts/utils/Context.sol


// 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;
    }
}

// File: @openzeppelin/contracts/access/Ownable.sol


// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;


/**
 * @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 Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        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);
    }
}

// File: @openzeppelin/contracts/token/ERC20/IERC20.sol


// 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);
}

// File: default_workspace/DeadHeadzNFTStake.sol


pragma solidity ^0.8.17;





contract DeadHeadzNFTStake is ERC721Holder, Ownable {
    address public token;
    address public nft;
    uint256 public emission_rate;
    uint256 public price;
    mapping(uint256 => address) public tokenOwnerOf;
    mapping(uint256 => uint256) public tokenStakedAt;

    constructor(address _token, address _nft, uint256 _emission_rate, uint256 _price) {
        token = _token;
        nft = _nft;
        emission_rate = _emission_rate;
        price = _price;
    }

    function newToken(address _token) external onlyOwner() {
        token = _token;
    }

    function newNft(address _nft) external onlyOwner() {
        nft = _nft;
    }

    function newEmissionRate(uint256 _emission_rate) external onlyOwner() {
        emission_rate = _emission_rate;
    }

    function newPrice(uint256 _price) external onlyOwner() {
        price = _price;
    }

    function stake(uint256 tokenId) external payable {
        require(msg.value >= price, "Not enough WDOGE sent, check price");
        IERC721(nft).safeTransferFrom(msg.sender, address(this), tokenId);
        tokenOwnerOf[tokenId] = msg.sender;
        tokenStakedAt[tokenId] = block.timestamp;
    }

    function calculateTokens(uint256 tokenId) public view returns (uint256) {
        uint256 timeElapsed = block.timestamp - tokenStakedAt[tokenId];
        return timeElapsed * emission_rate;
    }

    function unstake(uint256 tokenId) external payable {
        require(tokenOwnerOf[tokenId] == msg.sender, "You can't unstake");
        require(msg.value >= price, "Not enough WDOGE sent, check price");
        require(IERC20(token).balanceOf(address(this)) >= calculateTokens(tokenId));
        IERC20(token).transfer(msg.sender, calculateTokens(tokenId));
        IERC721(nft).transferFrom(address(this), msg.sender, tokenId);
        delete tokenOwnerOf[tokenId];
        delete tokenStakedAt[tokenId];
    }

    function withdrawTokens() external onlyOwner {
        uint256 balance = IERC20(token).balanceOf(address(this));
        IERC20(token).transfer(msg.sender, balance);
    }

    function transferValue(address payable _to) external onlyOwner {
        uint256 amount = address(this).balance;
        (bool success, ) = _to.call{value: amount}("");
        require(success, "Failed to send WDOGE");
    }
}
        

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"_token","internalType":"address"},{"type":"address","name":"_nft","internalType":"address"},{"type":"uint256","name":"_emission_rate","internalType":"uint256"},{"type":"uint256","name":"_price","internalType":"uint256"}]},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":true},{"type":"address","name":"newOwner","internalType":"address","indexed":true}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"calculateTokens","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"emission_rate","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"newEmissionRate","inputs":[{"type":"uint256","name":"_emission_rate","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"newNft","inputs":[{"type":"address","name":"_nft","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"newPrice","inputs":[{"type":"uint256","name":"_price","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"newToken","inputs":[{"type":"address","name":"_token","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"nft","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":"","internalType":"uint256"},{"type":"bytes","name":"","internalType":"bytes"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"price","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"payable","outputs":[],"name":"stake","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"token","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"tokenOwnerOf","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"tokenStakedAt","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferValue","inputs":[{"type":"address","name":"_to","internalType":"address payable"}]},{"type":"function","stateMutability":"payable","outputs":[],"name":"unstake","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"withdrawTokens","inputs":[]}]
            

Contract Creation Code

0x60806040523480156200001157600080fd5b50604051620019c9380380620019c9833981810160405281019062000037919062000262565b620000576200004b620000f160201b60201c565b620000f960201b60201c565b83600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550816003819055508060048190555050505050620002d4565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620001ef82620001c2565b9050919050565b6200020181620001e2565b81146200020d57600080fd5b50565b6000815190506200022181620001f6565b92915050565b6000819050919050565b6200023c8162000227565b81146200024857600080fd5b50565b6000815190506200025c8162000231565b92915050565b600080600080608085870312156200027f576200027e620001bd565b5b60006200028f8782880162000210565b9450506020620002a28782880162000210565b9350506040620002b5878288016200024b565b9250506060620002c8878288016200024b565b91505092959194509250565b6116e580620002e46000396000f3fe6080604052600436106101145760003560e01c80638d8f2adb116100a0578063ebd51a7611610064578063ebd51a7614610371578063f14a424f1461039a578063f2fde38b146103c3578063fc0c546a146103ec578063fe72ac7f1461041757610114565b80638d8f2adb146102bf5780638da5cb5b146102d6578063990c9fd914610301578063a035b1fe1461032a578063a694fc3a1461035557610114565b80633a93dd09116100e75780633a93dd09146101d857806347ccca0214610203578063715018a61461022e57806371aa60fd1461024557806389885a591461028257610114565b8063150b7a02146101195780631e4198e01461015657806324bf238c1461017f5780632e17de78146101bc575b600080fd5b34801561012557600080fd5b50610140600480360381019061013b9190611052565b610440565b60405161014d9190611110565b60405180910390f35b34801561016257600080fd5b5061017d60048036038101906101789190611169565b610454565b005b34801561018b57600080fd5b506101a660048036038101906101a19190611196565b610512565b6040516101b391906111d2565b60405180910390f35b6101d660048036038101906101d19190611196565b61052a565b005b3480156101e457600080fd5b506101ed61084a565b6040516101fa91906111d2565b60405180910390f35b34801561020f57600080fd5b50610218610850565b60405161022591906111fc565b60405180910390f35b34801561023a57600080fd5b50610243610876565b005b34801561025157600080fd5b5061026c60048036038101906102679190611196565b61088a565b60405161027991906111d2565b60405180910390f35b34801561028e57600080fd5b506102a960048036038101906102a49190611196565b6108c4565b6040516102b691906111fc565b60405180910390f35b3480156102cb57600080fd5b506102d46108f7565b005b3480156102e257600080fd5b506102eb610a43565b6040516102f891906111fc565b60405180910390f35b34801561030d57600080fd5b5061032860048036038101906103239190611196565b610a6c565b005b34801561033657600080fd5b5061033f610a7e565b60405161034c91906111d2565b60405180910390f35b61036f600480360381019061036a9190611196565b610a84565b005b34801561037d57600080fd5b5061039860048036038101906103939190611217565b610bc7565b005b3480156103a657600080fd5b506103c160048036038101906103bc9190611217565b610c13565b005b3480156103cf57600080fd5b506103ea60048036038101906103e59190611217565b610c5f565b005b3480156103f857600080fd5b50610401610ce2565b60405161040e91906111fc565b60405180910390f35b34801561042357600080fd5b5061043e60048036038101906104399190611196565b610d08565b005b600063150b7a0260e01b9050949350505050565b61045c610d1a565b600047905060008273ffffffffffffffffffffffffffffffffffffffff168260405161048790611275565b60006040518083038185875af1925050503d80600081146104c4576040519150601f19603f3d011682016040523d82523d6000602084013e6104c9565b606091505b505090508061050d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610504906112e7565b60405180910390fd5b505050565b60066020528060005260406000206000915090505481565b3373ffffffffffffffffffffffffffffffffffffffff166005600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105cb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105c290611353565b60405180910390fd5b600454341015610610576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610607906113e5565b60405180910390fd5b6106198161088a565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b815260040161067491906111fc565b602060405180830381865afa158015610691573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106b5919061141a565b10156106c057600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb336107088461088a565b6040518363ffffffff1660e01b8152600401610725929190611447565b6020604051808303816000875af1158015610744573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061076891906114a8565b50600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3033846040518463ffffffff1660e01b81526004016107c8939291906114d5565b600060405180830381600087803b1580156107e257600080fd5b505af11580156107f6573d6000803e3d6000fd5b505050506005600082815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055600660008281526020019081526020016000206000905550565b60035481565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61087e610d1a565b6108886000610d98565b565b6000806006600084815260200190815260200160002054426108ac919061153b565b9050600354816108bc919061156f565b915050919050565b60056020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6108ff610d1a565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b815260040161095c91906111fc565b602060405180830381865afa158015610979573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061099d919061141a565b9050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836040518363ffffffff1660e01b81526004016109fc929190611447565b6020604051808303816000875af1158015610a1b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a3f91906114a8565b5050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610a74610d1a565b8060038190555050565b60045481565b600454341015610ac9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ac0906113e5565b60405180910390fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166342842e0e3330846040518463ffffffff1660e01b8152600401610b28939291906114d5565b600060405180830381600087803b158015610b4257600080fd5b505af1158015610b56573d6000803e3d6000fd5b50505050336005600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555042600660008381526020019081526020016000208190555050565b610bcf610d1a565b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b610c1b610d1a565b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b610c67610d1a565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610cd6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ccd90611623565b60405180910390fd5b610cdf81610d98565b50565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610d10610d1a565b8060048190555050565b610d22610e5c565b73ffffffffffffffffffffffffffffffffffffffff16610d40610a43565b73ffffffffffffffffffffffffffffffffffffffff1614610d96576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d8d9061168f565b60405180910390fd5b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600033905090565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610ea382610e78565b9050919050565b610eb381610e98565b8114610ebe57600080fd5b50565b600081359050610ed081610eaa565b92915050565b6000819050919050565b610ee981610ed6565b8114610ef457600080fd5b50565b600081359050610f0681610ee0565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610f5f82610f16565b810181811067ffffffffffffffff82111715610f7e57610f7d610f27565b5b80604052505050565b6000610f91610e64565b9050610f9d8282610f56565b919050565b600067ffffffffffffffff821115610fbd57610fbc610f27565b5b610fc682610f16565b9050602081019050919050565b82818337600083830152505050565b6000610ff5610ff084610fa2565b610f87565b90508281526020810184848401111561101157611010610f11565b5b61101c848285610fd3565b509392505050565b600082601f83011261103957611038610f0c565b5b8135611049848260208601610fe2565b91505092915050565b6000806000806080858703121561106c5761106b610e6e565b5b600061107a87828801610ec1565b945050602061108b87828801610ec1565b935050604061109c87828801610ef7565b925050606085013567ffffffffffffffff8111156110bd576110bc610e73565b5b6110c987828801611024565b91505092959194509250565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61110a816110d5565b82525050565b60006020820190506111256000830184611101565b92915050565b600061113682610e78565b9050919050565b6111468161112b565b811461115157600080fd5b50565b6000813590506111638161113d565b92915050565b60006020828403121561117f5761117e610e6e565b5b600061118d84828501611154565b91505092915050565b6000602082840312156111ac576111ab610e6e565b5b60006111ba84828501610ef7565b91505092915050565b6111cc81610ed6565b82525050565b60006020820190506111e760008301846111c3565b92915050565b6111f681610e98565b82525050565b600060208201905061121160008301846111ed565b92915050565b60006020828403121561122d5761122c610e6e565b5b600061123b84828501610ec1565b91505092915050565b600081905092915050565b50565b600061125f600083611244565b915061126a8261124f565b600082019050919050565b600061128082611252565b9150819050919050565b600082825260208201905092915050565b7f4661696c656420746f2073656e642057444f4745000000000000000000000000600082015250565b60006112d160148361128a565b91506112dc8261129b565b602082019050919050565b60006020820190508181036000830152611300816112c4565b9050919050565b7f596f752063616e277420756e7374616b65000000000000000000000000000000600082015250565b600061133d60118361128a565b915061134882611307565b602082019050919050565b6000602082019050818103600083015261136c81611330565b9050919050565b7f4e6f7420656e6f7567682057444f47452073656e742c20636865636b2070726960008201527f6365000000000000000000000000000000000000000000000000000000000000602082015250565b60006113cf60228361128a565b91506113da82611373565b604082019050919050565b600060208201905081810360008301526113fe816113c2565b9050919050565b60008151905061141481610ee0565b92915050565b6000602082840312156114305761142f610e6e565b5b600061143e84828501611405565b91505092915050565b600060408201905061145c60008301856111ed565b61146960208301846111c3565b9392505050565b60008115159050919050565b61148581611470565b811461149057600080fd5b50565b6000815190506114a28161147c565b92915050565b6000602082840312156114be576114bd610e6e565b5b60006114cc84828501611493565b91505092915050565b60006060820190506114ea60008301866111ed565b6114f760208301856111ed565b61150460408301846111c3565b949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061154682610ed6565b915061155183610ed6565b92508282039050818111156115695761156861150c565b5b92915050565b600061157a82610ed6565b915061158583610ed6565b925082820261159381610ed6565b915082820484148315176115aa576115a961150c565b5b5092915050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b600061160d60268361128a565b9150611618826115b1565b604082019050919050565b6000602082019050818103600083015261163c81611600565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b600061167960208361128a565b915061168482611643565b602082019050919050565b600060208201905081810360008301526116a88161166c565b905091905056fea26469706673582212205ff58af48e1803b9f8d05c9fb68b3a77aa56f68296bd64e1fc1f1fb6c8660a2064736f6c63430008110033000000000000000000000000b58904a0328abacf05b288e51a578471a8317b700000000000000000000000000398c92971e98f49b84fa5ede6bb102ec113f7e500000000000000000000000000000000000000000000000000148f478ee505ed0000000000000000000000000000000000000000000000000011c37937e08000

Deployed ByteCode

0x6080604052600436106101145760003560e01c80638d8f2adb116100a0578063ebd51a7611610064578063ebd51a7614610371578063f14a424f1461039a578063f2fde38b146103c3578063fc0c546a146103ec578063fe72ac7f1461041757610114565b80638d8f2adb146102bf5780638da5cb5b146102d6578063990c9fd914610301578063a035b1fe1461032a578063a694fc3a1461035557610114565b80633a93dd09116100e75780633a93dd09146101d857806347ccca0214610203578063715018a61461022e57806371aa60fd1461024557806389885a591461028257610114565b8063150b7a02146101195780631e4198e01461015657806324bf238c1461017f5780632e17de78146101bc575b600080fd5b34801561012557600080fd5b50610140600480360381019061013b9190611052565b610440565b60405161014d9190611110565b60405180910390f35b34801561016257600080fd5b5061017d60048036038101906101789190611169565b610454565b005b34801561018b57600080fd5b506101a660048036038101906101a19190611196565b610512565b6040516101b391906111d2565b60405180910390f35b6101d660048036038101906101d19190611196565b61052a565b005b3480156101e457600080fd5b506101ed61084a565b6040516101fa91906111d2565b60405180910390f35b34801561020f57600080fd5b50610218610850565b60405161022591906111fc565b60405180910390f35b34801561023a57600080fd5b50610243610876565b005b34801561025157600080fd5b5061026c60048036038101906102679190611196565b61088a565b60405161027991906111d2565b60405180910390f35b34801561028e57600080fd5b506102a960048036038101906102a49190611196565b6108c4565b6040516102b691906111fc565b60405180910390f35b3480156102cb57600080fd5b506102d46108f7565b005b3480156102e257600080fd5b506102eb610a43565b6040516102f891906111fc565b60405180910390f35b34801561030d57600080fd5b5061032860048036038101906103239190611196565b610a6c565b005b34801561033657600080fd5b5061033f610a7e565b60405161034c91906111d2565b60405180910390f35b61036f600480360381019061036a9190611196565b610a84565b005b34801561037d57600080fd5b5061039860048036038101906103939190611217565b610bc7565b005b3480156103a657600080fd5b506103c160048036038101906103bc9190611217565b610c13565b005b3480156103cf57600080fd5b506103ea60048036038101906103e59190611217565b610c5f565b005b3480156103f857600080fd5b50610401610ce2565b60405161040e91906111fc565b60405180910390f35b34801561042357600080fd5b5061043e60048036038101906104399190611196565b610d08565b005b600063150b7a0260e01b9050949350505050565b61045c610d1a565b600047905060008273ffffffffffffffffffffffffffffffffffffffff168260405161048790611275565b60006040518083038185875af1925050503d80600081146104c4576040519150601f19603f3d011682016040523d82523d6000602084013e6104c9565b606091505b505090508061050d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610504906112e7565b60405180910390fd5b505050565b60066020528060005260406000206000915090505481565b3373ffffffffffffffffffffffffffffffffffffffff166005600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105cb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105c290611353565b60405180910390fd5b600454341015610610576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610607906113e5565b60405180910390fd5b6106198161088a565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b815260040161067491906111fc565b602060405180830381865afa158015610691573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106b5919061141a565b10156106c057600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb336107088461088a565b6040518363ffffffff1660e01b8152600401610725929190611447565b6020604051808303816000875af1158015610744573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061076891906114a8565b50600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3033846040518463ffffffff1660e01b81526004016107c8939291906114d5565b600060405180830381600087803b1580156107e257600080fd5b505af11580156107f6573d6000803e3d6000fd5b505050506005600082815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055600660008281526020019081526020016000206000905550565b60035481565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61087e610d1a565b6108886000610d98565b565b6000806006600084815260200190815260200160002054426108ac919061153b565b9050600354816108bc919061156f565b915050919050565b60056020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6108ff610d1a565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b815260040161095c91906111fc565b602060405180830381865afa158015610979573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061099d919061141a565b9050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836040518363ffffffff1660e01b81526004016109fc929190611447565b6020604051808303816000875af1158015610a1b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a3f91906114a8565b5050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610a74610d1a565b8060038190555050565b60045481565b600454341015610ac9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ac0906113e5565b60405180910390fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166342842e0e3330846040518463ffffffff1660e01b8152600401610b28939291906114d5565b600060405180830381600087803b158015610b4257600080fd5b505af1158015610b56573d6000803e3d6000fd5b50505050336005600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555042600660008381526020019081526020016000208190555050565b610bcf610d1a565b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b610c1b610d1a565b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b610c67610d1a565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610cd6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ccd90611623565b60405180910390fd5b610cdf81610d98565b50565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610d10610d1a565b8060048190555050565b610d22610e5c565b73ffffffffffffffffffffffffffffffffffffffff16610d40610a43565b73ffffffffffffffffffffffffffffffffffffffff1614610d96576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d8d9061168f565b60405180910390fd5b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600033905090565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610ea382610e78565b9050919050565b610eb381610e98565b8114610ebe57600080fd5b50565b600081359050610ed081610eaa565b92915050565b6000819050919050565b610ee981610ed6565b8114610ef457600080fd5b50565b600081359050610f0681610ee0565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610f5f82610f16565b810181811067ffffffffffffffff82111715610f7e57610f7d610f27565b5b80604052505050565b6000610f91610e64565b9050610f9d8282610f56565b919050565b600067ffffffffffffffff821115610fbd57610fbc610f27565b5b610fc682610f16565b9050602081019050919050565b82818337600083830152505050565b6000610ff5610ff084610fa2565b610f87565b90508281526020810184848401111561101157611010610f11565b5b61101c848285610fd3565b509392505050565b600082601f83011261103957611038610f0c565b5b8135611049848260208601610fe2565b91505092915050565b6000806000806080858703121561106c5761106b610e6e565b5b600061107a87828801610ec1565b945050602061108b87828801610ec1565b935050604061109c87828801610ef7565b925050606085013567ffffffffffffffff8111156110bd576110bc610e73565b5b6110c987828801611024565b91505092959194509250565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61110a816110d5565b82525050565b60006020820190506111256000830184611101565b92915050565b600061113682610e78565b9050919050565b6111468161112b565b811461115157600080fd5b50565b6000813590506111638161113d565b92915050565b60006020828403121561117f5761117e610e6e565b5b600061118d84828501611154565b91505092915050565b6000602082840312156111ac576111ab610e6e565b5b60006111ba84828501610ef7565b91505092915050565b6111cc81610ed6565b82525050565b60006020820190506111e760008301846111c3565b92915050565b6111f681610e98565b82525050565b600060208201905061121160008301846111ed565b92915050565b60006020828403121561122d5761122c610e6e565b5b600061123b84828501610ec1565b91505092915050565b600081905092915050565b50565b600061125f600083611244565b915061126a8261124f565b600082019050919050565b600061128082611252565b9150819050919050565b600082825260208201905092915050565b7f4661696c656420746f2073656e642057444f4745000000000000000000000000600082015250565b60006112d160148361128a565b91506112dc8261129b565b602082019050919050565b60006020820190508181036000830152611300816112c4565b9050919050565b7f596f752063616e277420756e7374616b65000000000000000000000000000000600082015250565b600061133d60118361128a565b915061134882611307565b602082019050919050565b6000602082019050818103600083015261136c81611330565b9050919050565b7f4e6f7420656e6f7567682057444f47452073656e742c20636865636b2070726960008201527f6365000000000000000000000000000000000000000000000000000000000000602082015250565b60006113cf60228361128a565b91506113da82611373565b604082019050919050565b600060208201905081810360008301526113fe816113c2565b9050919050565b60008151905061141481610ee0565b92915050565b6000602082840312156114305761142f610e6e565b5b600061143e84828501611405565b91505092915050565b600060408201905061145c60008301856111ed565b61146960208301846111c3565b9392505050565b60008115159050919050565b61148581611470565b811461149057600080fd5b50565b6000815190506114a28161147c565b92915050565b6000602082840312156114be576114bd610e6e565b5b60006114cc84828501611493565b91505092915050565b60006060820190506114ea60008301866111ed565b6114f760208301856111ed565b61150460408301846111c3565b949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061154682610ed6565b915061155183610ed6565b92508282039050818111156115695761156861150c565b5b92915050565b600061157a82610ed6565b915061158583610ed6565b925082820261159381610ed6565b915082820484148315176115aa576115a961150c565b5b5092915050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b600061160d60268361128a565b9150611618826115b1565b604082019050919050565b6000602082019050818103600083015261163c81611600565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b600061167960208361128a565b915061168482611643565b602082019050919050565b600060208201905081810360008301526116a88161166c565b905091905056fea26469706673582212205ff58af48e1803b9f8d05c9fb68b3a77aa56f68296bd64e1fc1f1fb6c8660a2064736f6c63430008110033