账户
0x84...2be1
0x84...2be1

0x84...2be1

$500
此合同的源代码已经过验证!
合同元数据
编译器
0.8.24+commit.e11b9ed9
语言
Solidity
合同源代码
文件 1 的 1:NFTStakeContract.sol
// File: @openzeppelin/contracts/utils/ReentrancyGuard.sol


// OpenZeppelin Contracts (last updated v5.0.0) (utils/ReentrancyGuard.sol)

pragma solidity ^0.8.20;

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

    /**
     * @dev Unauthorized reentrant call.
     */
    error ReentrancyGuardReentrantCall();

    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() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be NOT_ENTERED
        if (_status == ENTERED) {
            revert ReentrancyGuardReentrantCall();
        }

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

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

    /**
     * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
     * `nonReentrant` function in the call stack.
     */
    function _reentrancyGuardEntered() internal view returns (bool) {
        return _status == ENTERED;
    }
}

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


// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)

pragma solidity ^0.8.20;

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

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


// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.20;


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

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

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

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

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

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

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

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721
     * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
     * understand this adds an external call which potentially creates a reentrancy vulnerability.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 tokenId) external;

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

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

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

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

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


// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.20;

/**
 * @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 value of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

    /**
     * @dev Moves a `value` amount of 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 value) 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 a `value` amount of tokens 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 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the
     * allowance mechanism. `value` 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 value) external returns (bool);
}

// File: Stake.sol


pragma solidity ^0.8.24;




/// @title NFTStakeContract
/// @dev This contract allows users to stake and unstake NFTs from BrewRiders and Sense of Shapes collections.
/// @author 777SenseLabs

contract NFTStakeContract is ReentrancyGuard {
    address public owner;
    address public brewRiders;
    address public senseOfShapes;
    uint256 public claimDuration = 7 days; // 1 week
    uint256 public totalStakeNFT;
    
    struct StakeInfo {
        uint16[] tokenIds;
        uint256[] timestamps;
    }
    
    mapping(address => mapping(address => StakeInfo)) stakes;

    event Staked(
        address indexed staker,
        address indexed nftContract,
        uint16[] tokenIds,
        uint256[] timestamps
    );

    event Unstaked(
        address indexed staker,
        address indexed nftContract,
        uint16 tokenId,
        uint256 timestamp
    );

    /// @dev Sets the owner and NFT contract addresses.
    constructor(address _brewRiders) {
        owner = msg.sender;
        brewRiders = _brewRiders;
    }

    /// @dev Modifier to ensure that the NFT contract address is either BrewRiders or Sense of Shapes.
    modifier onlySupportedNFT(address nftContract) {
        require(
            nftContract == brewRiders || nftContract == senseOfShapes,
            "Unsupported NFT contract"
        );
        require(nftContract != address(0), "NFT contract address not set");
        _;
    }

    /// @dev Modifier to ensure that only the owner can call specific functions.
    modifier onlyOwner() {
        require(
            msg.sender == owner,
            "Only contract owner can perform this action"
        );
        _;
    }

    /// @dev Allows a user to stake multiple NFTs from the supported NFT collections.
    /// @param nftContract The address of the NFT collection.
    /// @param tokenIds The IDs of the tokens from the specified NFT collection to be staked.
    function stake(
        address nftContract,
        uint16[] calldata tokenIds
    ) external onlySupportedNFT(nftContract) nonReentrant {
        _stakeNFTs(nftContract, tokenIds);
    }

    /// @dev Internal function to stake NFTs for a specific collection.
    function _stakeNFTs(
        address nftContract,
        uint16[] calldata tokenIds
    ) internal {
        StakeInfo storage stakeInfo = stakes[msg.sender][nftContract];
        for (uint16 i = 0; i < tokenIds.length; i++) {
            require(
                IERC721(nftContract).ownerOf(tokenIds[i]) == msg.sender,
                "You are not the owner of this NFT"
            );
            stakeInfo.tokenIds.push(tokenIds[i]);
            stakeInfo.timestamps.push(block.timestamp);
        }
        totalStakeNFT += tokenIds.length;
        for (uint16 i = 0; i < tokenIds.length; i++) {
            IERC721(nftContract).transferFrom(
                msg.sender,
                address(this),
                tokenIds[i]
            );
        }
        emit Staked(msg.sender, nftContract, tokenIds, stakeInfo.timestamps);
    }

    /// @dev Allows a user to unstake multiple NFTs from the supported NFT collection.
    /// @param nftContract The address of the NFT collection.
    /// @param tokenIds The IDs of the tokens to be unstaked.
    function unstake(
        address nftContract,
        uint16[] calldata tokenIds
    ) external onlySupportedNFT(nftContract) nonReentrant {
        for (uint16 j = 0; j < tokenIds.length; j++) {
            StakeInfo storage stakeInfo = stakes[msg.sender][nftContract];
            require(stakeInfo.tokenIds.length > 0, "No NFT staked");

            bool found = false;
            for (uint16 i = 0; i < stakeInfo.tokenIds.length; i++) {
                if (stakeInfo.tokenIds[i] == tokenIds[j]) {
                    stakeInfo.tokenIds[i] = stakeInfo.tokenIds[
                        stakeInfo.tokenIds.length - 1
                    ];
                    stakeInfo.tokenIds.pop();
                    stakeInfo.timestamps[i] = stakeInfo.timestamps[
                        stakeInfo.timestamps.length - 1
                    ];
                    stakeInfo.timestamps.pop();
                    found = true;
                    break;
                }
            }
            require(found, "Token not found among staked NFTs");
        }
        totalStakeNFT -= tokenIds.length;
        for (uint16 j = 0; j < tokenIds.length; j++) {
            IERC721(nftContract).transferFrom(
                address(this),
                msg.sender,
                tokenIds[j]
            );
            emit Unstaked(msg.sender, nftContract, tokenIds[j], block.timestamp);
        }
    }

    /// @dev Returns the stake info for a specific user and NFT collections.
    /// @param user The address of the user.
    /// @return brewRidersTokenIds The array of token IDs staked by the user in BrewRiders collection
    /// @return brewRidersTimestamps The array of timestamps when the tokens were staked in BrewRiders collection.
    /// @return senseOfShapesTokenIds The array of token IDs staked by the user in Sense of Shapes collection.
    /// @return senseOfShapesTimestamps The array of timestamps when the tokens were staked in Sense of Shapes collection.
    function getStakeInfo(
        address user
    )
        external
        view
        returns (
            uint16[] memory brewRidersTokenIds,
            uint256[] memory brewRidersTimestamps,
            uint16[] memory senseOfShapesTokenIds,
            uint256[] memory senseOfShapesTimestamps
        )
    {
        StakeInfo storage brewRidersStakeInfo = stakes[user][brewRiders];
        StakeInfo storage senseOfShapesStakeInfo = stakes[user][senseOfShapes];

        return (
            brewRidersStakeInfo.tokenIds,
            brewRidersStakeInfo.timestamps,
            senseOfShapesStakeInfo.tokenIds,
            senseOfShapesStakeInfo.timestamps
        );
    }

    /// @dev Allows the contract owner to update the addresses of BrewRiders and Sense of Shapes contracts.
    /// @param _brewRiders The new address of BrewRiders contract.
    /// @param _senseOfShapes The new address of Sense of Shapes contract.
    function updateNFTContracts(
        address _brewRiders,
        address _senseOfShapes
    ) external onlyOwner {
        brewRiders = _brewRiders;
        senseOfShapes = _senseOfShapes;
    }

    /// @dev Allows the contract owner to update the duration for unstaking NFTs.
    /// @param _claimDuration The new duration for unstaking NFTs.
    function updateUnstakeDuration(uint256 _claimDuration) external onlyOwner {
        claimDuration = _claimDuration;
    }

    /// @dev Returns whether an NFT has been staked for the required duration.
    /// @param staker The address of the user who staked the NFT.
    /// @param nftContract The address of the NFT collection.
    /// @param tokenId The ID of the token to check.
    /// @return true if the NFT has been staked for the required duration, false otherwise.
    function isStakeDurationReached(
        address staker,
        address nftContract,
        uint16 tokenId
    ) public view onlySupportedNFT(nftContract) returns (bool) {
        StakeInfo storage stakeInfo = stakes[staker][nftContract];
        for (uint16 i = 0; i < stakeInfo.tokenIds.length; i++) {
            if (stakeInfo.tokenIds[i] == tokenId) {
                return
                    block.timestamp >= stakeInfo.timestamps[i] + claimDuration;
            }
        }
        return false;
    }

    /// @dev Transfers the ownership of the contract to a new address.
    /// @param newOwner The address of the new owner.
    function transferOwnership(address newOwner) external onlyOwner {
        require(newOwner != address(0), "Invalid address");
        owner = newOwner;
    }

    /// @dev Allows the contract owner to withdraw tokens from the contract.
    /// @param tokenAddress The address of the token to be withdrawn.
    /// @param amount The amount of tokens to be withdrawn.
    function ownerWithdraw(
        address tokenAddress,
        uint256 amount
    ) external onlyOwner nonReentrant {
        if (isERC20(tokenAddress)) {
            require(
                amount <= IERC20(tokenAddress).balanceOf(address(this)),
                "Not enough balance in the contract"
            );
            require(IERC20(tokenAddress).transfer(owner, amount), "Transfer failed");
        } else if (isERC721(tokenAddress)) {
            revert(
                "ERC721 tokens cannot be withdrawn by the contract owner to prevent potential manipulation of users' NFTs"
            );
        } else {
            revert("Unsupported token type");
        }
    }

    /// @dev Checks if a given address represents an ERC20 token contract.
    /// @param tokenAddress The address to be checked.
    /// @return true if the address represents an ERC20 token contract, false otherwise.
    function isERC20(address tokenAddress) internal view returns (bool) {
        uint256 size;
        assembly {
            size := extcodesize(tokenAddress)
        }
        return size > 0 && IERC20(tokenAddress).totalSupply() > 0;
    }

    /// @dev Checks if a given address represents an ERC721 token contract.
    /// @param tokenAddress The address to be checked.
    /// @return true if the address represents an ERC721 token contract, false otherwise.
    function isERC721(address tokenAddress) internal view returns (bool) {
        uint256 size;
        assembly {
            size := extcodesize(tokenAddress)
        }
        return size > 0 && IERC721(tokenAddress).supportsInterface(0x80ac58cd);
    }

    /// @dev Returns NFTs that have been staked for a duration longer than claimDuration.
    /// @param user The address of the user.
    /// @return brewRidersNFTs The array of token IDs staked by the user in BrewRiders collection for a duration longer than claimDuration.
    /// @return senseOfShapesNFTs The array of token IDs staked by the user in Sense of Shapes collection for a duration longer than claimDuration.
    function getStakedNFTsWithClaimDuration(
        address user
    )
        external
        view
        returns (uint16[] memory brewRidersNFTs, uint16[] memory senseOfShapesNFTs)
    {
        StakeInfo storage brewRidersStakeInfo = stakes[user][brewRiders];
        StakeInfo storage senseOfShapesStakeInfo = stakes[user][senseOfShapes];

        uint16[] memory _brewRidersNFTs = new uint16[](
            brewRidersStakeInfo.tokenIds.length
        );
        uint16[] memory _senseOfShapesNFTs = new uint16[](
            senseOfShapesStakeInfo.tokenIds.length
        );

        uint16 brewRidersCount = 0;
        uint16 senseOfShapesCount = 0;

        for (uint16 i = 0; i < brewRidersStakeInfo.tokenIds.length; i++) {
            if (
                block.timestamp >=
                brewRidersStakeInfo.timestamps[i] + claimDuration
            ) {
                _brewRidersNFTs[brewRidersCount] = brewRidersStakeInfo.tokenIds[
                    i
                ];
                brewRidersCount++;
            }
        }

        for (uint16 i = 0; i < senseOfShapesStakeInfo.tokenIds.length; i++) {
            if (
                block.timestamp >=
                senseOfShapesStakeInfo.timestamps[i] + claimDuration
            ) {
                _senseOfShapesNFTs[senseOfShapesCount] = senseOfShapesStakeInfo.tokenIds[i];
                senseOfShapesCount++;
            }
        }

        // Resize arrays to fit the actual count
        assembly {
            mstore(_brewRidersNFTs, brewRidersCount)
            mstore(_senseOfShapesNFTs, senseOfShapesCount)
        }

        return (_brewRidersNFTs, _senseOfShapesNFTs);
    }
}
设置
{
  "compilationTarget": {
    "NFTStakeContract.sol": "NFTStakeContract"
  },
  "evmVersion": "shanghai",
  "libraries": {},
  "metadata": {
    "bytecodeHash": "ipfs"
  },
  "optimizer": {
    "enabled": false,
    "runs": 200
  },
  "remappings": []
}
ABI
[{"inputs":[{"internalType":"address","name":"_brewRiders","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"staker","type":"address"},{"indexed":true,"internalType":"address","name":"nftContract","type":"address"},{"indexed":false,"internalType":"uint16[]","name":"tokenIds","type":"uint16[]"},{"indexed":false,"internalType":"uint256[]","name":"timestamps","type":"uint256[]"}],"name":"Staked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"staker","type":"address"},{"indexed":true,"internalType":"address","name":"nftContract","type":"address"},{"indexed":false,"internalType":"uint16","name":"tokenId","type":"uint16"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"Unstaked","type":"event"},{"inputs":[],"name":"brewRiders","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getStakeInfo","outputs":[{"internalType":"uint16[]","name":"brewRidersTokenIds","type":"uint16[]"},{"internalType":"uint256[]","name":"brewRidersTimestamps","type":"uint256[]"},{"internalType":"uint16[]","name":"senseOfShapesTokenIds","type":"uint16[]"},{"internalType":"uint256[]","name":"senseOfShapesTimestamps","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getStakedNFTsWithClaimDuration","outputs":[{"internalType":"uint16[]","name":"brewRidersNFTs","type":"uint16[]"},{"internalType":"uint16[]","name":"senseOfShapesNFTs","type":"uint16[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"staker","type":"address"},{"internalType":"address","name":"nftContract","type":"address"},{"internalType":"uint16","name":"tokenId","type":"uint16"}],"name":"isStakeDurationReached","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ownerWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"senseOfShapes","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"nftContract","type":"address"},{"internalType":"uint16[]","name":"tokenIds","type":"uint16[]"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalStakeNFT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"nftContract","type":"address"},{"internalType":"uint16[]","name":"tokenIds","type":"uint16[]"}],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_brewRiders","type":"address"},{"internalType":"address","name":"_senseOfShapes","type":"address"}],"name":"updateNFTContracts","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_claimDuration","type":"uint256"}],"name":"updateUnstakeDuration","outputs":[],"stateMutability":"nonpayable","type":"function"}]