ETH Price: $1,809.90 (-11.41%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Claim Food155506892022-09-17 3:40:23905 days ago1663386023IN
0x1Fa97A52...d3e2b89dA
0 ETH0.000732757.96997938
Stake NFT153841412022-08-21 13:07:07932 days ago1661087227IN
0x1Fa97A52...d3e2b89dA
0 ETH0.0014173710.94423536
Stake NFT153841052022-08-21 12:59:21932 days ago1661086761IN
0x1Fa97A52...d3e2b89dA
0 ETH0.001131357.48723338
Claim Food153746922022-08-20 1:18:17934 days ago1660958297IN
0x1Fa97A52...d3e2b89dA
0 ETH0.000529517.07534463
Claim Food153377032022-08-14 4:50:07939 days ago1660452607IN
0x1Fa97A52...d3e2b89dA
0 ETH0.000487116.50879274
Stake NFT153376952022-08-14 4:48:07939 days ago1660452487IN
0x1Fa97A52...d3e2b89dA
0 ETH0.000656435.83973926
Claim Food153113442022-08-10 1:00:58944 days ago1660093258IN
0x1Fa97A52...d3e2b89dA
0 ETH0.0009237612.3431902
Claim Food153087772022-08-09 15:23:23944 days ago1660058603IN
0x1Fa97A52...d3e2b89dA
0 ETH0.001593821.29614895
Claim Food152970632022-08-07 19:20:08946 days ago1659900008IN
0x1Fa97A52...d3e2b89dA
0 ETH0.0007976310.6579143
Claim Food152936962022-08-07 6:59:48946 days ago1659855588IN
0x1Fa97A52...d3e2b89dA
0 ETH0.000346894.6351745
Claim Food152788992022-08-04 23:53:45949 days ago1659657225IN
0x1Fa97A52...d3e2b89dA
0 ETH0.0008423211.2550105
Claim Food152692832022-08-03 11:49:17950 days ago1659527357IN
0x1Fa97A52...d3e2b89dA
0 ETH0.0007963710.64105301
Stake NFT152691382022-08-03 11:15:41950 days ago1659525341IN
0x1Fa97A52...d3e2b89dA
0 ETH0.001437729.51481013
Claim Food152667872022-08-03 2:12:28950 days ago1659492748IN
0x1Fa97A52...d3e2b89dA
0 ETH0.000683367.43271529
Claim Food152664342022-08-03 0:53:00951 days ago1659487980IN
0x1Fa97A52...d3e2b89dA
0 ETH0.000607856.61137815
Claim Food152622722022-08-02 9:26:08951 days ago1659432368IN
0x1Fa97A52...d3e2b89dA
0 ETH0.000575297.68700279
Claim Food152617102022-08-02 7:23:09951 days ago1659424989IN
0x1Fa97A52...d3e2b89dA
0 ETH0.000639426.9548009
Stake NFT152616962022-08-02 7:21:04951 days ago1659424864IN
0x1Fa97A52...d3e2b89dA
0 ETH0.001326988.78196407
Claim Food152514382022-07-31 16:56:25953 days ago1659286585IN
0x1Fa97A52...d3e2b89dA
0 ETH0.000705379.42507581
Claim Food152491352022-07-31 8:28:59953 days ago1659256139IN
0x1Fa97A52...d3e2b89dA
0 ETH0.000534257.13868528
Claim Food152436312022-07-30 11:56:17954 days ago1659182177IN
0x1Fa97A52...d3e2b89dA
0 ETH0.000461785.02271477
Stake NFT152433532022-07-30 10:51:11954 days ago1659178271IN
0x1Fa97A52...d3e2b89dA
0 ETH0.001140857.55015527
Claim Food152432262022-07-30 10:25:13954 days ago1659176713IN
0x1Fa97A52...d3e2b89dA
0 ETH0.000554867.41398108
Claim Food152425722022-07-30 7:56:55954 days ago1659167815IN
0x1Fa97A52...d3e2b89dA
0 ETH0.000613756.67561929
Stake NFT152411612022-07-30 2:30:48954 days ago1659148248IN
0x1Fa97A52...d3e2b89dA
0 ETH0.001349168.92870889
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Nest_Q

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion
File 1 of 14 : Nest_Q.sol
// SPDX-License-Identifier: UNLISENCED
pragma solidity >=0.8.4;

import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";
import "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";
import "@openzeppelin/contracts/access/Ownable.sol";


contract Nest_Q is ReentrancyGuard, ERC1155Holder, Ownable {
    using SafeERC20 for IERC20;
    IERC20 private token;
    IERC1155 private nft;

    uint256 constant oneMonthInSeconds = 2629743;
    address public POOL = 0x075Eb3011f6aa1a605A1493c66448fb0C6022Ab2;
    uint256 public REWARD_FOOD = 1158;
    bool public stakingIsActive = false;

    struct StakingItem {
        address owner;
        uint256 tokenId;
        uint256 amount;
        uint256 stakingStartTimeStamp;
    }
    // owner => tokenID => item
    mapping(address => mapping(uint256 => StakingItem)) public stakedNFTs;
    mapping(address => uint256) private stakedAmount;
    uint256 private totalStakedAmount;

    event Staked(
        address indexed owner,
        uint256 tokenId,
        uint256 amount,
        uint256 time
    );

    event Unstaked(
        address indexed owner,
        uint256 indexed tokenId,
        uint256 indexed amount,
        uint256 time
    );

    constructor(IERC20 _tokenAddress, IERC1155 _nftAddress) {
        require(
            address(_tokenAddress) != address(0) &&
                address(_nftAddress) != address(0),
            "Contract addresses cannot be zero address."
        );
        token = _tokenAddress;
        nft = _nftAddress;
    }

    function calculateStakedTimeInSeconds(uint256 _timestamp)
        private
        view
        returns (uint256)
    {
        return (block.timestamp - _timestamp);
    }

    function stakeNFT(uint256 _amount) external {
        require(stakingIsActive, "Staking is pause");
        uint256 _tokenId = 0;

        //Requirement
        require( nft.balanceOf(msg.sender, _tokenId) >= _amount, "you dont have enough balance" );
        require( nft.isApprovedForAll(msg.sender, address(this)) == true, "this contract is not approved by you to do transactions" );
        

        if ( stakedAmount[msg.sender] > 0 ) {
            //To get the staking block time
            uint256 timestamp = stakedNFTs[msg.sender][_tokenId].stakingStartTimeStamp;
            uint256 stakingPeriodTime = calculateStakedTimeInSeconds(timestamp);

            //Calculating Reward and send to holder
            uint256 reward = REWARD_FOOD * stakingPeriodTime * stakedAmount[msg.sender];

            //Transfer reward and reset reward
            token.transferFrom(POOL, msg.sender, reward);
            reward = 0;
        }

        //Sending NFT to contract
        nft.safeTransferFrom(msg.sender, address(this), _tokenId, _amount, "");

        //Adding total amount of NFT
        stakedAmount[msg.sender] = stakedAmount[msg.sender] + _amount;
        totalStakedAmount = totalStakedAmount + _amount;

        //Reset the stacking block time
        uint256 currentTime = block.timestamp; // current block time stamp in seconds

        //create new nft item
        stakedNFTs[msg.sender][_tokenId] = StakingItem(
            msg.sender,
            _tokenId,
            stakedAmount[msg.sender],
            currentTime
        );

        //emit staked event
        emit Staked(msg.sender, _tokenId, _amount, currentTime);
    }

    function unStakeNFT(uint256 _amount) external {
        require(stakingIsActive, "Staking is pause");
        uint256 _tokenId = 0;

        //Requirement
        require( stakedNFTs[msg.sender][_tokenId].owner == msg.sender );
        require( stakedAmount[msg.sender] >= _amount, "you dont have enough staked NFTS" );
        require( nft.isApprovedForAll(msg.sender, address(this)) == true, "this contract is not approved by you to do transactions" );

        //To get the staking block time
        uint256 timestamp = stakedNFTs[msg.sender][_tokenId].stakingStartTimeStamp;
        uint256 stakingPeriodTime = calculateStakedTimeInSeconds(timestamp);

        //Calculating Reward and send to holder
        uint256 reward = REWARD_FOOD * stakingPeriodTime * stakedAmount[msg.sender];

        //Transfer reward and reset reward
        token.transferFrom(POOL, msg.sender, reward);
        reward = 0;

        //send nft back to the owner and deduct the amount
        nft.safeTransferFrom(address(this), msg.sender, _tokenId, _amount, "");
        stakedAmount[msg.sender] = stakedAmount[msg.sender] - _amount;
        totalStakedAmount = totalStakedAmount - _amount;

        //Reset the stacking time
        uint256 currentTime = block.timestamp; // current block time stamp in seconds
        stakedNFTs[msg.sender][_tokenId].stakingStartTimeStamp = currentTime;

        //emit unstaked event
        emit Unstaked(msg.sender, _tokenId, _amount, stakingPeriodTime);
    }


    function claimFood() external {
        require(stakingIsActive, "Staking is pause");
        uint256 _tokenId = 0;
        uint256 _amount = stakedAmount[msg.sender];

        //Requirement
        require( stakedNFTs[msg.sender][_tokenId].owner == msg.sender );
        require( stakedAmount[msg.sender] >= _amount, "you dont have enough staked NFTS" );
        require( nft.isApprovedForAll(msg.sender, address(this)) == true, "this contract is not approved by you to do transactions" );

        //To get the staking block time
        uint256 timestamp = stakedNFTs[msg.sender][_tokenId].stakingStartTimeStamp;
        uint256 stakingPeriodTime = calculateStakedTimeInSeconds(timestamp);

        //Calculating Reward and send to holder
        uint256 reward = REWARD_FOOD * stakingPeriodTime * stakedAmount[msg.sender];

        //Transfer reward and reset reward
        token.transferFrom(POOL, msg.sender, reward);
        reward = 0;

        //Reset the stacking block time to current
        uint256 currentTime = block.timestamp; // current block time stamp in seconds
        stakedNFTs[msg.sender][_tokenId].stakingStartTimeStamp = currentTime;        
    }

    function balance() public view returns (uint256) {
        uint256 _tokenId = 0;

        //Requirement
        require(stakedNFTs[msg.sender][_tokenId].owner == msg.sender);

        //To get the staking block time
        uint256 timestamp = stakedNFTs[msg.sender][_tokenId].stakingStartTimeStamp;
        uint256 stakingPeriodTime = calculateStakedTimeInSeconds(timestamp);


        //Calculating Reward and send to holder
        uint256 reward = REWARD_FOOD * stakingPeriodTime * stakedAmount[msg.sender];

        return reward;
    }

    function getTotalStakedAmount() public view returns (uint256) {
        return totalStakedAmount;
    }

    function getUserStakedAmount() public view returns (uint256) {
        return stakedAmount[msg.sender];
    }

    // Update FOOD Reward
    function setFoodPrice(uint _newPrice) external onlyOwner {
        REWARD_FOOD = _newPrice;
    }

    // Update POOL Address
    function setPoolAdd(address _newAddress) external onlyOwner {
        POOL = _newAddress;
    }

    function Pause() public onlyOwner {
        stakingIsActive = !stakingIsActive;
    }

    function emerTrans(uint256 _amount, address receiver) external onlyOwner{
        require(!stakingIsActive, "Please pause the contract");
        uint256 _tokenId = 0;

        //Requirement
        require( totalStakedAmount >= _amount, "Not enough staked Queens" );

        //send nft back to the owner and deduct the amount
        nft.safeTransferFrom(address(this), receiver, _tokenId, _amount, "");
        totalStakedAmount = totalStakedAmount - _amount;
    }

}

File 2 of 14 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (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 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 3 of 14 : ERC1155Holder.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/utils/ERC1155Holder.sol)

pragma solidity ^0.8.0;

import "./ERC1155Receiver.sol";

/**
 * Simple implementation of `ERC1155Receiver` that will allow a contract to hold ERC1155 tokens.
 *
 * IMPORTANT: When inheriting this contract, you must include a way to use the received tokens, otherwise they will be
 * stuck.
 *
 * @dev _Available since v3.1._
 */
contract ERC1155Holder is ERC1155Receiver {
    function onERC1155Received(
        address,
        address,
        uint256,
        uint256,
        bytes memory
    ) public virtual override returns (bytes4) {
        return this.onERC1155Received.selector;
    }

    function onERC1155BatchReceived(
        address,
        address,
        uint256[] memory,
        uint256[] memory,
        bytes memory
    ) public virtual override returns (bytes4) {
        return this.onERC1155BatchReceived.selector;
    }
}

File 4 of 14 : IERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Required interface of an ERC1155 compliant contract, as defined in the
 * https://eips.ethereum.org/EIPS/eip-1155[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155 is IERC165 {
    /**
     * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.
     */
    event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);

    /**
     * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all
     * transfers.
     */
    event TransferBatch(
        address indexed operator,
        address indexed from,
        address indexed to,
        uint256[] ids,
        uint256[] values
    );

    /**
     * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to
     * `approved`.
     */
    event ApprovalForAll(address indexed account, address indexed operator, bool approved);

    /**
     * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.
     *
     * If an {URI} event was emitted for `id`, the standard
     * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value
     * returned by {IERC1155MetadataURI-uri}.
     */
    event URI(string value, uint256 indexed id);

    /**
     * @dev Returns the amount of tokens of token type `id` owned by `account`.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(address account, uint256 id) external view returns (uint256);

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)
        external
        view
        returns (uint256[] memory);

    /**
     * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,
     *
     * Emits an {ApprovalForAll} event.
     *
     * Requirements:
     *
     * - `operator` cannot be the caller.
     */
    function setApprovalForAll(address operator, bool approved) external;

    /**
     * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.
     *
     * See {setApprovalForAll}.
     */
    function isApprovedForAll(address account, address operator) external view returns (bool);

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.
     * - `from` must have a balance of tokens of type `id` of at least `amount`.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes calldata data
    ) external;

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] calldata ids,
        uint256[] calldata amounts,
        bytes calldata data
    ) external;
}

File 5 of 14 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../extensions/draft-IERC20Permit.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));
        }
    }

    function safePermit(
        IERC20Permit token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

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

File 6 of 14 : 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);
}

File 7 of 14 : 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;
    }
}

File 8 of 14 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.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
                /// @solidity memory-safe-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 9 of 14 : draft-IERC20Permit.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

File 10 of 14 : ERC1155Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/utils/ERC1155Receiver.sol)

pragma solidity ^0.8.0;

import "../IERC1155Receiver.sol";
import "../../../utils/introspection/ERC165.sol";

/**
 * @dev _Available since v3.1._
 */
abstract contract ERC1155Receiver is ERC165, IERC1155Receiver {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
        return interfaceId == type(IERC1155Receiver).interfaceId || super.supportsInterface(interfaceId);
    }
}

File 11 of 14 : 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);
}

File 12 of 14 : 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;
    }
}

File 13 of 14 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

File 14 of 14 : IERC1155Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev _Available since v3.1._
 */
interface IERC1155Receiver is IERC165 {
    /**
     * @dev Handles the receipt of a single ERC1155 token type. This function is
     * called at the end of a `safeTransferFrom` after the balance has been updated.
     *
     * NOTE: To accept the transfer, this must return
     * `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`
     * (i.e. 0xf23a6e61, or its own function selector).
     *
     * @param operator The address which initiated the transfer (i.e. msg.sender)
     * @param from The address which previously owned the token
     * @param id The ID of the token being transferred
     * @param value The amount of tokens being transferred
     * @param data Additional data with no specified format
     * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed
     */
    function onERC1155Received(
        address operator,
        address from,
        uint256 id,
        uint256 value,
        bytes calldata data
    ) external returns (bytes4);

    /**
     * @dev Handles the receipt of a multiple ERC1155 token types. This function
     * is called at the end of a `safeBatchTransferFrom` after the balances have
     * been updated.
     *
     * NOTE: To accept the transfer(s), this must return
     * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))`
     * (i.e. 0xbc197c81, or its own function selector).
     *
     * @param operator The address which initiated the batch transfer (i.e. msg.sender)
     * @param from The address which previously owned the token
     * @param ids An array containing ids of each token being transferred (order and length must match values array)
     * @param values An array containing amounts of each token being transferred (order and length must match ids array)
     * @param data Additional data with no specified format
     * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed
     */
    function onERC1155BatchReceived(
        address operator,
        address from,
        uint256[] calldata ids,
        uint256[] calldata values,
        bytes calldata data
    ) external returns (bytes4);
}

Settings
{
  "optimizer": {
    "enabled": false,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"contract IERC20","name":"_tokenAddress","type":"address"},{"internalType":"contract IERC1155","name":"_nftAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"}],"name":"Staked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"}],"name":"Unstaked","type":"event"},{"inputs":[],"name":"POOL","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"Pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"REWARD_FOOD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"balance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimFood","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"}],"name":"emerTrans","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getTotalStakedAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getUserStakedAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155BatchReceived","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newPrice","type":"uint256"}],"name":"setFoodPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newAddress","type":"address"}],"name":"setPoolAdd","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"stakeNFT","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"stakedNFTs","outputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"stakingStartTimeStamp","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakingIsActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"unStakeNFT","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405273075eb3011f6aa1a605a1493c66448fb0c6022ab2600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506104866005556000600660006101000a81548160ff0219169083151502179055503480156200008757600080fd5b5060405162002e2038038062002e208339818101604052810190620000ad919062000308565b6001600081905550620000d5620000c96200020c60201b60201c565b6200021460201b60201c565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614158015620001405750600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b62000182576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620001799062000370565b60405180910390fd5b81600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505062000482565b600033905090565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600081519050620002eb816200044e565b92915050565b600081519050620003028162000468565b92915050565b600080604083850312156200031c57600080fd5b60006200032c85828601620002f1565b92505060206200033f85828601620002da565b9150509250929050565b600062000358602a8362000392565b91506200036582620003ff565b604082019050919050565b600060208201905081810360008301526200038b8162000349565b9050919050565b600082825260208201905092915050565b6000620003b082620003df565b9050919050565b6000620003c482620003a3565b9050919050565b6000620003d882620003a3565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b7f436f6e7472616374206164647265737365732063616e6e6f74206265207a657260008201527f6f20616464726573732e00000000000000000000000000000000000000000000602082015250565b6200045981620003b7565b81146200046557600080fd5b50565b6200047381620003cb565b81146200047f57600080fd5b50565b61298e80620004926000396000f3fe608060405234801561001057600080fd5b506004361061012c5760003560e01c806386c22046116100ad578063b69ef8a811610071578063b69ef8a8146102bf578063bc197c81146102dd578063f23a6e611461030d578063f2fde38b1461033d578063f7060048146103595761012c565b806386c220461461022d5780638da5cb5b146102495780639f0f729d14610267578063a679c2ff14610285578063a8405861146102a15761012c565b80635183486a116100f45780635183486a146101c35780636985a022146101df5780636eb604e0146101e9578063715018a6146102055780637535d2461461020f5761012c565b806301ffc9a71461013157806338adb6f0146101615780633c02ee321461017f57806341aea69a1461019d5780634267d2d7146101a7575b600080fd5b61014b60048036038101906101469190611fc3565b61038c565b6040516101589190612332565b60405180910390f35b610169610406565b6040516101769190612468565b60405180910390f35b610187610410565b6040516101949190612332565b60405180910390f35b6101a5610423565b005b6101c160048036038101906101bc9190611fec565b6108d5565b005b6101dd60048036038101906101d89190611de7565b6108e7565b005b6101e7610933565b005b61020360048036038101906101fe9190611fec565b610967565b005b61020d61103d565b005b610217611051565b60405161022491906121f1565b60405180910390f35b6102476004803603810190610242919061203e565b611077565b005b6102516111c2565b60405161025e91906121f1565b60405180910390f35b61026f6111ec565b60405161027c9190612468565b60405180910390f35b61029f600480360381019061029a9190611fec565b611233565b005b6102a9611827565b6040516102b69190612468565b60405180910390f35b6102c761182d565b6040516102d49190612468565b60405180910390f35b6102f760048036038101906102f29190611e10565b6119aa565b604051610304919061234d565b60405180910390f35b61032760048036038101906103229190611ecf565b6119bf565b604051610334919061234d565b60405180910390f35b61035760048036038101906103529190611de7565b6119d4565b005b610373600480360381019061036e9190611f5e565b611a58565b60405161038394939291906122ed565b60405180910390f35b60007f4e2312e0000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806103ff57506103fe82611ab5565b5b9050919050565b6000600954905090565b600660009054906101000a900460ff1681565b600660009054906101000a900460ff16610472576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610469906123e8565b60405180910390fd5b600080600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490503373ffffffffffffffffffffffffffffffffffffffff16600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461056257600080fd5b80600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410156105e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105db906123a8565b60405180910390fd5b60011515600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e985e9c533306040518363ffffffff1660e01b815260040161064592919061220c565b60206040518083038186803b15801561065d57600080fd5b505afa158015610671573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106959190611f9a565b1515146106d7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106ce906123c8565b60405180910390fd5b6000600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000848152602001908152602001600020600301549050600061073a82611b1f565b90506000600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548260055461078c91906125b4565b61079691906125b4565b9050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1633846040518463ffffffff1660e01b815260040161081993929190612235565b602060405180830381600087803b15801561083357600080fd5b505af1158015610847573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061086b9190611f9a565b5060009050600042905080600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600088815260200190815260200160002060030181905550505050505050565b6108dd611b34565b8060058190555050565b6108ef611b34565b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b61093b611b34565b600660009054906101000a900460ff1615600660006101000a81548160ff021916908315150217905550565b600660009054906101000a900460ff166109b6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109ad906123e8565b60405180910390fd5b600081600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1662fdd58e33846040518363ffffffff1660e01b8152600401610a159291906122c4565b60206040518083038186803b158015610a2d57600080fd5b505afa158015610a41573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a659190612015565b1015610aa6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a9d90612428565b60405180910390fd5b60011515600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e985e9c533306040518363ffffffff1660e01b8152600401610b0792919061220c565b60206040518083038186803b158015610b1f57600080fd5b505afa158015610b33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b579190611f9a565b151514610b99576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b90906123c8565b60405180910390fd5b6000600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541115610d7e576000600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008381526020019081526020016000206003015490506000610c4482611b1f565b90506000600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482600554610c9691906125b4565b610ca091906125b4565b9050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1633846040518463ffffffff1660e01b8152600401610d2393929190612235565b602060405180830381600087803b158015610d3d57600080fd5b505af1158015610d51573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d759190611f9a565b50600090505050505b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f242432a333084866040518563ffffffff1660e01b8152600401610ddf949392919061226c565b600060405180830381600087803b158015610df957600080fd5b505af1158015610e0d573d6000803e3d6000fd5b5050505081600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610e5c919061255e565b600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081600954610ead919061255e565b600981905550600042905060405180608001604052803373ffffffffffffffffffffffffffffffffffffffff168152602001838152602001600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054815260200182815250600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506020820151816001015560408201518160020155606082015181600301559050503373ffffffffffffffffffffffffffffffffffffffff167fb4caaf29adda3eefee3ad552a8e85058589bf834c7466cae4ee58787f70589ed83858460405161103093929190612483565b60405180910390a2505050565b611045611b34565b61104f6000611bb2565b565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61107f611b34565b600660009054906101000a900460ff16156110cf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110c690612448565b60405180910390fd5b6000826009541015611116576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161110d90612368565b60405180910390fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f242432a308484876040518563ffffffff1660e01b8152600401611177949392919061226c565b600060405180830381600087803b15801561119157600080fd5b505af11580156111a5573d6000803e3d6000fd5b50505050826009546111b7919061260e565b600981905550505050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905090565b600660009054906101000a900460ff16611282576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611279906123e8565b60405180910390fd5b60003373ffffffffffffffffffffffffffffffffffffffff16600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461132f57600080fd5b81600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410156113b1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113a8906123a8565b60405180910390fd5b60011515600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e985e9c533306040518363ffffffff1660e01b815260040161141292919061220c565b60206040518083038186803b15801561142a57600080fd5b505afa15801561143e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114629190611f9a565b1515146114a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161149b906123c8565b60405180910390fd5b6000600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000838152602001908152602001600020600301549050600061150782611b1f565b90506000600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548260055461155991906125b4565b61156391906125b4565b9050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1633846040518463ffffffff1660e01b81526004016115e693929190612235565b602060405180830381600087803b15801561160057600080fd5b505af1158015611614573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116389190611f9a565b5060009050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f242432a303387896040518563ffffffff1660e01b815260040161169e949392919061226c565b600060405180830381600087803b1580156116b857600080fd5b505af11580156116cc573d6000803e3d6000fd5b5050505084600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461171b919061260e565b600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508460095461176c919061260e565b600981905550600042905080600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008781526020019081526020016000206003018190555085853373ffffffffffffffffffffffffffffffffffffffff167f204fccf0d92ed8d48f204adb39b2e81e92bad0dedb93f5716ca9478cfb57de00866040516118179190612468565b60405180910390a4505050505050565b60055481565b600080600090503373ffffffffffffffffffffffffffffffffffffffff16600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146118df57600080fd5b6000600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000838152602001908152602001600020600301549050600061194282611b1f565b90506000600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548260055461199491906125b4565b61199e91906125b4565b90508094505050505090565b600063bc197c8160e01b905095945050505050565b600063f23a6e6160e01b905095945050505050565b6119dc611b34565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611a4c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a4390612388565b60405180910390fd5b611a5581611bb2565b50565b6007602052816000526040600020602052806000526040600020600091509150508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010154908060020154908060030154905084565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b60008142611b2d919061260e565b9050919050565b611b3c611c78565b73ffffffffffffffffffffffffffffffffffffffff16611b5a6111c2565b73ffffffffffffffffffffffffffffffffffffffff1614611bb0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ba790612408565b60405180910390fd5b565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600033905090565b6000611c93611c8e846124df565b6124ba565b90508083825260208201905082856020860282011115611cb257600080fd5b60005b85811015611ce25781611cc88882611dbd565b845260208401935060208301925050600181019050611cb5565b5050509392505050565b6000611cff611cfa8461250b565b6124ba565b905082815260208101848484011115611d1757600080fd5b611d228482856126b6565b509392505050565b600081359050611d39816128fc565b92915050565b600082601f830112611d5057600080fd5b8135611d60848260208601611c80565b91505092915050565b600081519050611d7881612913565b92915050565b600081359050611d8d8161292a565b92915050565b600082601f830112611da457600080fd5b8135611db4848260208601611cec565b91505092915050565b600081359050611dcc81612941565b92915050565b600081519050611de181612941565b92915050565b600060208284031215611df957600080fd5b6000611e0784828501611d2a565b91505092915050565b600080600080600060a08688031215611e2857600080fd5b6000611e3688828901611d2a565b9550506020611e4788828901611d2a565b945050604086013567ffffffffffffffff811115611e6457600080fd5b611e7088828901611d3f565b935050606086013567ffffffffffffffff811115611e8d57600080fd5b611e9988828901611d3f565b925050608086013567ffffffffffffffff811115611eb657600080fd5b611ec288828901611d93565b9150509295509295909350565b600080600080600060a08688031215611ee757600080fd5b6000611ef588828901611d2a565b9550506020611f0688828901611d2a565b9450506040611f1788828901611dbd565b9350506060611f2888828901611dbd565b925050608086013567ffffffffffffffff811115611f4557600080fd5b611f5188828901611d93565b9150509295509295909350565b60008060408385031215611f7157600080fd5b6000611f7f85828601611d2a565b9250506020611f9085828601611dbd565b9150509250929050565b600060208284031215611fac57600080fd5b6000611fba84828501611d69565b91505092915050565b600060208284031215611fd557600080fd5b6000611fe384828501611d7e565b91505092915050565b600060208284031215611ffe57600080fd5b600061200c84828501611dbd565b91505092915050565b60006020828403121561202757600080fd5b600061203584828501611dd2565b91505092915050565b6000806040838503121561205157600080fd5b600061205f85828601611dbd565b925050602061207085828601611d2a565b9150509250929050565b61208381612642565b82525050565b61209281612654565b82525050565b6120a181612660565b82525050565b60006120b460188361254d565b91506120bf82612765565b602082019050919050565b60006120d760268361254d565b91506120e28261278e565b604082019050919050565b60006120fa60208361254d565b9150612105826127dd565b602082019050919050565b600061211d60378361254d565b915061212882612806565b604082019050919050565b600061214060108361254d565b915061214b82612855565b602082019050919050565b600061216360208361254d565b915061216e8261287e565b602082019050919050565b6000612186601c8361254d565b9150612191826128a7565b602082019050919050565b60006121a960198361254d565b91506121b4826128d0565b602082019050919050565b60006121cc60008361253c565b91506121d7826128f9565b600082019050919050565b6121eb816126ac565b82525050565b6000602082019050612206600083018461207a565b92915050565b6000604082019050612221600083018561207a565b61222e602083018461207a565b9392505050565b600060608201905061224a600083018661207a565b612257602083018561207a565b61226460408301846121e2565b949350505050565b600060a082019050612281600083018761207a565b61228e602083018661207a565b61229b60408301856121e2565b6122a860608301846121e2565b81810360808301526122b9816121bf565b905095945050505050565b60006040820190506122d9600083018561207a565b6122e660208301846121e2565b9392505050565b6000608082019050612302600083018761207a565b61230f60208301866121e2565b61231c60408301856121e2565b61232960608301846121e2565b95945050505050565b60006020820190506123476000830184612089565b92915050565b60006020820190506123626000830184612098565b92915050565b60006020820190508181036000830152612381816120a7565b9050919050565b600060208201905081810360008301526123a1816120ca565b9050919050565b600060208201905081810360008301526123c1816120ed565b9050919050565b600060208201905081810360008301526123e181612110565b9050919050565b6000602082019050818103600083015261240181612133565b9050919050565b6000602082019050818103600083015261242181612156565b9050919050565b6000602082019050818103600083015261244181612179565b9050919050565b600060208201905081810360008301526124618161219c565b9050919050565b600060208201905061247d60008301846121e2565b92915050565b600060608201905061249860008301866121e2565b6124a560208301856121e2565b6124b260408301846121e2565b949350505050565b60006124c46124d5565b90506124d082826126c5565b919050565b6000604051905090565b600067ffffffffffffffff8211156124fa576124f9612725565b5b602082029050602081019050919050565b600067ffffffffffffffff82111561252657612525612725565b5b61252f82612754565b9050602081019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000612569826126ac565b9150612574836126ac565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156125a9576125a86126f6565b5b828201905092915050565b60006125bf826126ac565b91506125ca836126ac565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612603576126026126f6565b5b828202905092915050565b6000612619826126ac565b9150612624836126ac565b925082821015612637576126366126f6565b5b828203905092915050565b600061264d8261268c565b9050919050565b60008115159050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b6126ce82612754565b810181811067ffffffffffffffff821117156126ed576126ec612725565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f4e6f7420656e6f756768207374616b656420517565656e730000000000000000600082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f796f7520646f6e74206861766520656e6f756768207374616b6564204e465453600082015250565b7f7468697320636f6e7472616374206973206e6f7420617070726f76656420627960008201527f20796f7520746f20646f207472616e73616374696f6e73000000000000000000602082015250565b7f5374616b696e6720697320706175736500000000000000000000000000000000600082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f796f7520646f6e74206861766520656e6f7567682062616c616e636500000000600082015250565b7f506c656173652070617573652074686520636f6e747261637400000000000000600082015250565b50565b61290581612642565b811461291057600080fd5b50565b61291c81612654565b811461292757600080fd5b50565b61293381612660565b811461293e57600080fd5b50565b61294a816126ac565b811461295557600080fd5b5056fea26469706673582212206b9a0fc39b408c13e63a5cb6ba4997a86ebd55d050488563bcc3e07c02ebe24764736f6c63430008040033000000000000000000000000fd4d9e9335625d1a7b3c3908988a8bc3f70c5c870000000000000000000000008752ec7703079b90184c03bbbc075d2e4787bd05

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061012c5760003560e01c806386c22046116100ad578063b69ef8a811610071578063b69ef8a8146102bf578063bc197c81146102dd578063f23a6e611461030d578063f2fde38b1461033d578063f7060048146103595761012c565b806386c220461461022d5780638da5cb5b146102495780639f0f729d14610267578063a679c2ff14610285578063a8405861146102a15761012c565b80635183486a116100f45780635183486a146101c35780636985a022146101df5780636eb604e0146101e9578063715018a6146102055780637535d2461461020f5761012c565b806301ffc9a71461013157806338adb6f0146101615780633c02ee321461017f57806341aea69a1461019d5780634267d2d7146101a7575b600080fd5b61014b60048036038101906101469190611fc3565b61038c565b6040516101589190612332565b60405180910390f35b610169610406565b6040516101769190612468565b60405180910390f35b610187610410565b6040516101949190612332565b60405180910390f35b6101a5610423565b005b6101c160048036038101906101bc9190611fec565b6108d5565b005b6101dd60048036038101906101d89190611de7565b6108e7565b005b6101e7610933565b005b61020360048036038101906101fe9190611fec565b610967565b005b61020d61103d565b005b610217611051565b60405161022491906121f1565b60405180910390f35b6102476004803603810190610242919061203e565b611077565b005b6102516111c2565b60405161025e91906121f1565b60405180910390f35b61026f6111ec565b60405161027c9190612468565b60405180910390f35b61029f600480360381019061029a9190611fec565b611233565b005b6102a9611827565b6040516102b69190612468565b60405180910390f35b6102c761182d565b6040516102d49190612468565b60405180910390f35b6102f760048036038101906102f29190611e10565b6119aa565b604051610304919061234d565b60405180910390f35b61032760048036038101906103229190611ecf565b6119bf565b604051610334919061234d565b60405180910390f35b61035760048036038101906103529190611de7565b6119d4565b005b610373600480360381019061036e9190611f5e565b611a58565b60405161038394939291906122ed565b60405180910390f35b60007f4e2312e0000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806103ff57506103fe82611ab5565b5b9050919050565b6000600954905090565b600660009054906101000a900460ff1681565b600660009054906101000a900460ff16610472576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610469906123e8565b60405180910390fd5b600080600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490503373ffffffffffffffffffffffffffffffffffffffff16600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461056257600080fd5b80600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410156105e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105db906123a8565b60405180910390fd5b60011515600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e985e9c533306040518363ffffffff1660e01b815260040161064592919061220c565b60206040518083038186803b15801561065d57600080fd5b505afa158015610671573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106959190611f9a565b1515146106d7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106ce906123c8565b60405180910390fd5b6000600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000848152602001908152602001600020600301549050600061073a82611b1f565b90506000600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548260055461078c91906125b4565b61079691906125b4565b9050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1633846040518463ffffffff1660e01b815260040161081993929190612235565b602060405180830381600087803b15801561083357600080fd5b505af1158015610847573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061086b9190611f9a565b5060009050600042905080600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600088815260200190815260200160002060030181905550505050505050565b6108dd611b34565b8060058190555050565b6108ef611b34565b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b61093b611b34565b600660009054906101000a900460ff1615600660006101000a81548160ff021916908315150217905550565b600660009054906101000a900460ff166109b6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109ad906123e8565b60405180910390fd5b600081600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1662fdd58e33846040518363ffffffff1660e01b8152600401610a159291906122c4565b60206040518083038186803b158015610a2d57600080fd5b505afa158015610a41573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a659190612015565b1015610aa6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a9d90612428565b60405180910390fd5b60011515600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e985e9c533306040518363ffffffff1660e01b8152600401610b0792919061220c565b60206040518083038186803b158015610b1f57600080fd5b505afa158015610b33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b579190611f9a565b151514610b99576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b90906123c8565b60405180910390fd5b6000600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541115610d7e576000600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008381526020019081526020016000206003015490506000610c4482611b1f565b90506000600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482600554610c9691906125b4565b610ca091906125b4565b9050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1633846040518463ffffffff1660e01b8152600401610d2393929190612235565b602060405180830381600087803b158015610d3d57600080fd5b505af1158015610d51573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d759190611f9a565b50600090505050505b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f242432a333084866040518563ffffffff1660e01b8152600401610ddf949392919061226c565b600060405180830381600087803b158015610df957600080fd5b505af1158015610e0d573d6000803e3d6000fd5b5050505081600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610e5c919061255e565b600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081600954610ead919061255e565b600981905550600042905060405180608001604052803373ffffffffffffffffffffffffffffffffffffffff168152602001838152602001600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054815260200182815250600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506020820151816001015560408201518160020155606082015181600301559050503373ffffffffffffffffffffffffffffffffffffffff167fb4caaf29adda3eefee3ad552a8e85058589bf834c7466cae4ee58787f70589ed83858460405161103093929190612483565b60405180910390a2505050565b611045611b34565b61104f6000611bb2565b565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61107f611b34565b600660009054906101000a900460ff16156110cf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110c690612448565b60405180910390fd5b6000826009541015611116576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161110d90612368565b60405180910390fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f242432a308484876040518563ffffffff1660e01b8152600401611177949392919061226c565b600060405180830381600087803b15801561119157600080fd5b505af11580156111a5573d6000803e3d6000fd5b50505050826009546111b7919061260e565b600981905550505050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905090565b600660009054906101000a900460ff16611282576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611279906123e8565b60405180910390fd5b60003373ffffffffffffffffffffffffffffffffffffffff16600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461132f57600080fd5b81600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410156113b1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113a8906123a8565b60405180910390fd5b60011515600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e985e9c533306040518363ffffffff1660e01b815260040161141292919061220c565b60206040518083038186803b15801561142a57600080fd5b505afa15801561143e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114629190611f9a565b1515146114a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161149b906123c8565b60405180910390fd5b6000600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000838152602001908152602001600020600301549050600061150782611b1f565b90506000600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548260055461155991906125b4565b61156391906125b4565b9050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1633846040518463ffffffff1660e01b81526004016115e693929190612235565b602060405180830381600087803b15801561160057600080fd5b505af1158015611614573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116389190611f9a565b5060009050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f242432a303387896040518563ffffffff1660e01b815260040161169e949392919061226c565b600060405180830381600087803b1580156116b857600080fd5b505af11580156116cc573d6000803e3d6000fd5b5050505084600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461171b919061260e565b600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508460095461176c919061260e565b600981905550600042905080600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008781526020019081526020016000206003018190555085853373ffffffffffffffffffffffffffffffffffffffff167f204fccf0d92ed8d48f204adb39b2e81e92bad0dedb93f5716ca9478cfb57de00866040516118179190612468565b60405180910390a4505050505050565b60055481565b600080600090503373ffffffffffffffffffffffffffffffffffffffff16600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146118df57600080fd5b6000600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000838152602001908152602001600020600301549050600061194282611b1f565b90506000600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548260055461199491906125b4565b61199e91906125b4565b90508094505050505090565b600063bc197c8160e01b905095945050505050565b600063f23a6e6160e01b905095945050505050565b6119dc611b34565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611a4c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a4390612388565b60405180910390fd5b611a5581611bb2565b50565b6007602052816000526040600020602052806000526040600020600091509150508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010154908060020154908060030154905084565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b60008142611b2d919061260e565b9050919050565b611b3c611c78565b73ffffffffffffffffffffffffffffffffffffffff16611b5a6111c2565b73ffffffffffffffffffffffffffffffffffffffff1614611bb0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ba790612408565b60405180910390fd5b565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600033905090565b6000611c93611c8e846124df565b6124ba565b90508083825260208201905082856020860282011115611cb257600080fd5b60005b85811015611ce25781611cc88882611dbd565b845260208401935060208301925050600181019050611cb5565b5050509392505050565b6000611cff611cfa8461250b565b6124ba565b905082815260208101848484011115611d1757600080fd5b611d228482856126b6565b509392505050565b600081359050611d39816128fc565b92915050565b600082601f830112611d5057600080fd5b8135611d60848260208601611c80565b91505092915050565b600081519050611d7881612913565b92915050565b600081359050611d8d8161292a565b92915050565b600082601f830112611da457600080fd5b8135611db4848260208601611cec565b91505092915050565b600081359050611dcc81612941565b92915050565b600081519050611de181612941565b92915050565b600060208284031215611df957600080fd5b6000611e0784828501611d2a565b91505092915050565b600080600080600060a08688031215611e2857600080fd5b6000611e3688828901611d2a565b9550506020611e4788828901611d2a565b945050604086013567ffffffffffffffff811115611e6457600080fd5b611e7088828901611d3f565b935050606086013567ffffffffffffffff811115611e8d57600080fd5b611e9988828901611d3f565b925050608086013567ffffffffffffffff811115611eb657600080fd5b611ec288828901611d93565b9150509295509295909350565b600080600080600060a08688031215611ee757600080fd5b6000611ef588828901611d2a565b9550506020611f0688828901611d2a565b9450506040611f1788828901611dbd565b9350506060611f2888828901611dbd565b925050608086013567ffffffffffffffff811115611f4557600080fd5b611f5188828901611d93565b9150509295509295909350565b60008060408385031215611f7157600080fd5b6000611f7f85828601611d2a565b9250506020611f9085828601611dbd565b9150509250929050565b600060208284031215611fac57600080fd5b6000611fba84828501611d69565b91505092915050565b600060208284031215611fd557600080fd5b6000611fe384828501611d7e565b91505092915050565b600060208284031215611ffe57600080fd5b600061200c84828501611dbd565b91505092915050565b60006020828403121561202757600080fd5b600061203584828501611dd2565b91505092915050565b6000806040838503121561205157600080fd5b600061205f85828601611dbd565b925050602061207085828601611d2a565b9150509250929050565b61208381612642565b82525050565b61209281612654565b82525050565b6120a181612660565b82525050565b60006120b460188361254d565b91506120bf82612765565b602082019050919050565b60006120d760268361254d565b91506120e28261278e565b604082019050919050565b60006120fa60208361254d565b9150612105826127dd565b602082019050919050565b600061211d60378361254d565b915061212882612806565b604082019050919050565b600061214060108361254d565b915061214b82612855565b602082019050919050565b600061216360208361254d565b915061216e8261287e565b602082019050919050565b6000612186601c8361254d565b9150612191826128a7565b602082019050919050565b60006121a960198361254d565b91506121b4826128d0565b602082019050919050565b60006121cc60008361253c565b91506121d7826128f9565b600082019050919050565b6121eb816126ac565b82525050565b6000602082019050612206600083018461207a565b92915050565b6000604082019050612221600083018561207a565b61222e602083018461207a565b9392505050565b600060608201905061224a600083018661207a565b612257602083018561207a565b61226460408301846121e2565b949350505050565b600060a082019050612281600083018761207a565b61228e602083018661207a565b61229b60408301856121e2565b6122a860608301846121e2565b81810360808301526122b9816121bf565b905095945050505050565b60006040820190506122d9600083018561207a565b6122e660208301846121e2565b9392505050565b6000608082019050612302600083018761207a565b61230f60208301866121e2565b61231c60408301856121e2565b61232960608301846121e2565b95945050505050565b60006020820190506123476000830184612089565b92915050565b60006020820190506123626000830184612098565b92915050565b60006020820190508181036000830152612381816120a7565b9050919050565b600060208201905081810360008301526123a1816120ca565b9050919050565b600060208201905081810360008301526123c1816120ed565b9050919050565b600060208201905081810360008301526123e181612110565b9050919050565b6000602082019050818103600083015261240181612133565b9050919050565b6000602082019050818103600083015261242181612156565b9050919050565b6000602082019050818103600083015261244181612179565b9050919050565b600060208201905081810360008301526124618161219c565b9050919050565b600060208201905061247d60008301846121e2565b92915050565b600060608201905061249860008301866121e2565b6124a560208301856121e2565b6124b260408301846121e2565b949350505050565b60006124c46124d5565b90506124d082826126c5565b919050565b6000604051905090565b600067ffffffffffffffff8211156124fa576124f9612725565b5b602082029050602081019050919050565b600067ffffffffffffffff82111561252657612525612725565b5b61252f82612754565b9050602081019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000612569826126ac565b9150612574836126ac565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156125a9576125a86126f6565b5b828201905092915050565b60006125bf826126ac565b91506125ca836126ac565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612603576126026126f6565b5b828202905092915050565b6000612619826126ac565b9150612624836126ac565b925082821015612637576126366126f6565b5b828203905092915050565b600061264d8261268c565b9050919050565b60008115159050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b6126ce82612754565b810181811067ffffffffffffffff821117156126ed576126ec612725565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f4e6f7420656e6f756768207374616b656420517565656e730000000000000000600082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f796f7520646f6e74206861766520656e6f756768207374616b6564204e465453600082015250565b7f7468697320636f6e7472616374206973206e6f7420617070726f76656420627960008201527f20796f7520746f20646f207472616e73616374696f6e73000000000000000000602082015250565b7f5374616b696e6720697320706175736500000000000000000000000000000000600082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f796f7520646f6e74206861766520656e6f7567682062616c616e636500000000600082015250565b7f506c656173652070617573652074686520636f6e747261637400000000000000600082015250565b50565b61290581612642565b811461291057600080fd5b50565b61291c81612654565b811461292757600080fd5b50565b61293381612660565b811461293e57600080fd5b50565b61294a816126ac565b811461295557600080fd5b5056fea26469706673582212206b9a0fc39b408c13e63a5cb6ba4997a86ebd55d050488563bcc3e07c02ebe24764736f6c63430008040033

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

000000000000000000000000fd4d9e9335625d1a7b3c3908988a8bc3f70c5c870000000000000000000000008752ec7703079b90184c03bbbc075d2e4787bd05

-----Decoded View---------------
Arg [0] : _tokenAddress (address): 0xfd4d9E9335625D1A7b3C3908988a8Bc3F70C5c87
Arg [1] : _nftAddress (address): 0x8752ec7703079b90184c03bBBc075d2E4787bD05

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000fd4d9e9335625d1a7b3c3908988a8bc3f70c5c87
Arg [1] : 0000000000000000000000008752ec7703079b90184c03bbbc075d2e4787bd05


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.