Contract Overview
My Name Tag:
Not Available, login to update
[ Download CSV Export ]
Contract Name:
NitroNFMStaking
Compiler Version
v0.8.4+commit.c7e474f2
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.4; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/utils/Address.sol"; contract NitroNFMStaking is Ownable, Pausable, ReentrancyGuard { using Array for uint256[]; using Address for address; bytes private EMPTY = ""; bytes4 private constant _ERC721_RECEIVED = 0x150b7a02; mapping(address => bool) public accptedCollections; struct UserInfo { // wallet -> collection -> tokenId mapping(address => mapping(address => uint256[])) stake; // collection -> tokenId -> status mapping(address => mapping(uint256 => bool)) status; // collection -> noOfNFMs mapping(address => uint256) noOfNFMsStaked; // No.of Stakes by user uint256 netstake; } mapping(address => UserInfo) internal userInfo; event NFMStaked( address collection, uint256 tokenId, address stakedBy, uint256 stakedAt ); event NFMUnStaked( address collection, uint256 tokenId, address stakedBy, uint256 unStakedAt ); event CollectionUpdated( address collection, bool status, address addedBy, uint256 updatedOn ); event EmergencyWithdrawn( address collection, address to, uint256 tokenId, address calledBy, uint256 calledOn ); function stake(address collection, uint256 tokenId) external nonReentrant whenNotPaused { require( IERC721(collection).ownerOf(tokenId) == msg.sender, "Stake:: Only owner can stake" ); require(accptedCollections[collection], "Stake:: Invalid Collection"); address wallet = msg.sender; stakeSafeTransfer(wallet, address(this), collection, tokenId); UserInfo storage user = userInfo[wallet]; user.stake[wallet][collection].push(tokenId); user.status[collection][tokenId] = true; user.noOfNFMsStaked[collection] = user.noOfNFMsStaked[collection] + 1; emit NFMStaked(collection, tokenId, wallet, block.timestamp); } function unStake(address collection, uint256 tokenId) external nonReentrant whenNotPaused { require( IERC721(collection).ownerOf(tokenId) == address(this), "UnStake:: Have you staked this NFT?" ); address wallet = msg.sender; UserInfo storage user = userInfo[wallet]; require( getNFMStakeStatus(wallet, collection, tokenId), "UnStake:: Already unstaked" ); user.noOfNFMsStaked[collection] = user.noOfNFMsStaked[collection] - 1; user.status[collection][tokenId] = false; user.stake[wallet][collection].removeElement(tokenId); unStakeSafeTransfer(wallet, collection, tokenId); emit NFMUnStaked(collection, tokenId, wallet, block.timestamp); } function pause() external onlyOwner { _pause(); } function unpause() external onlyOwner { _unpause(); } function addCollection(address newCollection, bool status) external onlyOwner { require(newCollection != address(0), "Invalid Collection"); accptedCollections[newCollection] = status; emit CollectionUpdated( newCollection, status, msg.sender, block.timestamp ); } // Can be used by admin, during emergency situation to withdraw NFMs // Once this is used, can't be used to stake and unstake for anything function emergencyWithdrawal( address collection, uint256 tokenId, address to ) external nonReentrant onlyOwner { require( IERC721(collection).ownerOf(tokenId) == address(this), "EmergencyWithdrawal:: Is it staked NFT?" ); _pause(); IERC721(collection).safeTransferFrom(address(this), to, tokenId); emit EmergencyWithdrawn( collection, to, tokenId, msg.sender, block.timestamp ); } function stakeSafeTransfer( address from, address to, address collection, uint256 tokenId ) internal { IERC721(collection).transferFrom(from, to, tokenId); } function unStakeSafeTransfer( address to, address collection, uint256 tokenId ) internal { IERC721(collection).safeTransferFrom(address(this), to, tokenId); } function getNFMStakeStatus( address stakedBy, address collection, uint256 tokenId ) public view returns (bool) { UserInfo storage user = userInfo[stakedBy]; return user.status[collection][tokenId]; } function getNoOfNFMsStakedByCollectionByUser( address stakedBy, address collection ) public view returns (uint256[] memory) { UserInfo storage user = userInfo[stakedBy]; return user.stake[stakedBy][collection]; } } library Array { function removeElement(uint256[] storage _array, uint256 _element) internal { for (uint256 i; i < _array.length; i++) { if (_array[i] == _element) { _array[i] = _array[_array.length - 1]; _array.pop(); break; } } } }
// 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); }
// 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; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns 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); /** * @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; }
// 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; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(!paused(), "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { require(paused(), "Pausable: not paused"); _; } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
{ "remappings": [], "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "istanbul", "libraries": {}, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"collection","type":"address"},{"indexed":false,"internalType":"bool","name":"status","type":"bool"},{"indexed":false,"internalType":"address","name":"addedBy","type":"address"},{"indexed":false,"internalType":"uint256","name":"updatedOn","type":"uint256"}],"name":"CollectionUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"collection","type":"address"},{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"address","name":"calledBy","type":"address"},{"indexed":false,"internalType":"uint256","name":"calledOn","type":"uint256"}],"name":"EmergencyWithdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"collection","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"address","name":"stakedBy","type":"address"},{"indexed":false,"internalType":"uint256","name":"stakedAt","type":"uint256"}],"name":"NFMStaked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"collection","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"address","name":"stakedBy","type":"address"},{"indexed":false,"internalType":"uint256","name":"unStakedAt","type":"uint256"}],"name":"NFMUnStaked","type":"event"},{"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":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"accptedCollections","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newCollection","type":"address"},{"internalType":"bool","name":"status","type":"bool"}],"name":"addCollection","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"collection","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"emergencyWithdrawal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"stakedBy","type":"address"},{"internalType":"address","name":"collection","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getNFMStakeStatus","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"stakedBy","type":"address"},{"internalType":"address","name":"collection","type":"address"}],"name":"getNoOfNFMsStakedByCollectionByUser","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"collection","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"collection","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"unStake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60a06040819052600060808190526200001b916002916200009c565b503480156200002957600080fd5b5062000035336200004c565b6000805460ff60a01b19169055600180556200017f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b828054620000aa9062000142565b90600052602060002090601f016020900481019282620000ce576000855562000119565b82601f10620000e957805160ff191683800117855562000119565b8280016001018555821562000119579182015b8281111562000119578251825591602001919060010190620000fc565b50620001279291506200012b565b5090565b5b808211156200012757600081556001016200012c565b600181811c908216806200015757607f821691505b602082108114156200017957634e487b7160e01b600052602260045260246000fd5b50919050565b6111b8806200018f6000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063715018a61161008c5780638da5cb5b116100665780638da5cb5b14610191578063adc9772e146101ac578063d9393814146101bf578063f2fde38b146101d257600080fd5b8063715018a61461015e5780637d3d37b5146101665780638456cb591461018957600080fd5b80631be5c701146100d457806320409250146100fc57806337eb7615146101115780633d96c494146101245780633f4ba83a146101445780635c975abb1461014c575b600080fd5b6100e76100e2366004610f56565b6101e5565b60405190151581526020015b60405180910390f35b61010f61010a366004610ff2565b61021e565b005b61010f61011f366004610f96565b61042a565b610137610132366004610f1e565b61050f565b6040516100f39190611033565b61010f610590565b600054600160a01b900460ff166100e7565b61010f6105c4565b6100e7610174366004610edf565b60036020526000908152604090205460ff1681565b61010f6105f8565b6000546040516001600160a01b0390911681526020016100f3565b61010f6101ba366004610fc7565b61062a565b61010f6101cd366004610fc7565b6108af565b61010f6101e0366004610edf565b610b1c565b6001600160a01b039283166000908152600460209081526040808320949095168252600190930183528381209181529152205460ff1690565b6002600154141561024a5760405162461bcd60e51b8152600401610241906110d6565b60405180910390fd5b60026001556000546001600160a01b031633146102795760405162461bcd60e51b8152600401610241906110a1565b6040516331a9108f60e11b81526004810183905230906001600160a01b03851690636352211e9060240160206040518083038186803b1580156102bb57600080fd5b505afa1580156102cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102f39190610f02565b6001600160a01b0316146103595760405162461bcd60e51b815260206004820152602760248201527f456d657267656e63795769746864726177616c3a3a204973206974207374616b6044820152666564204e46543f60c81b6064820152608401610241565b610361610bb7565b604051632142170760e11b81523060048201526001600160a01b038281166024830152604482018490528416906342842e0e90606401600060405180830381600087803b1580156103b157600080fd5b505af11580156103c5573d6000803e3d6000fd5b5050604080516001600160a01b038088168252851660208201529081018590523360608201524260808201527fb9f7c88b58a0578351cbf58e2b9c681c4c182d635256b701c943fc15b716f176925060a001905060405180910390a150506001805550565b6000546001600160a01b031633146104545760405162461bcd60e51b8152600401610241906110a1565b6001600160a01b03821661049f5760405162461bcd60e51b815260206004820152601260248201527124b73b30b634b21021b7b63632b1ba34b7b760711b6044820152606401610241565b6001600160a01b038216600081815260036020908152604091829020805460ff191685151590811790915582519384529083015233908201524260608201527f9ee860bd5ab1a6b82ac2d57a63a779dbac102b4b21068b2f62093dc7070905c09060800160405180910390a15050565b6001600160a01b0380831660009081526004602090815260408083208083528184209486168452938252918290208054835181840281018401909452808452606094939283018282801561058257602002820191906000526020600020905b81548152602001906001019080831161056e575b505050505091505092915050565b6000546001600160a01b031633146105ba5760405162461bcd60e51b8152600401610241906110a1565b6105c2610c39565b565b6000546001600160a01b031633146105ee5760405162461bcd60e51b8152600401610241906110a1565b6105c26000610cbd565b6000546001600160a01b031633146106225760405162461bcd60e51b8152600401610241906110a1565b6105c2610bb7565b6002600154141561064d5760405162461bcd60e51b8152600401610241906110d6565b6002600155600054600160a01b900460ff161561067c5760405162461bcd60e51b815260040161024190611077565b6040516331a9108f60e11b81526004810182905233906001600160a01b03841690636352211e9060240160206040518083038186803b1580156106be57600080fd5b505afa1580156106d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f69190610f02565b6001600160a01b03161461074c5760405162461bcd60e51b815260206004820152601c60248201527f5374616b653a3a204f6e6c79206f776e65722063616e207374616b65000000006044820152606401610241565b6001600160a01b03821660009081526003602052604090205460ff166107b45760405162461bcd60e51b815260206004820152601a60248201527f5374616b653a3a20496e76616c696420436f6c6c656374696f6e0000000000006044820152606401610241565b336107c181308585610d0d565b6001600160a01b0380821660009081526004602090815260408083208083528184209488168085529483528184208054600181810183559186528486200188905585855280820184528285208886528452828520805460ff19168217905594845260028101909252909120549091610839919061110d565b6001600160a01b038581166000818152600285016020908152604091829020949094558051918252928101869052908416918101919091524260608201527fc579f6fab82ed3362b98fbe7576e1eb95d7b36183da0b948f3802aa6ee8331cf906080015b60405180910390a15050600180555050565b600260015414156108d25760405162461bcd60e51b8152600401610241906110d6565b6002600155600054600160a01b900460ff16156109015760405162461bcd60e51b815260040161024190611077565b6040516331a9108f60e11b81526004810182905230906001600160a01b03841690636352211e9060240160206040518083038186803b15801561094357600080fd5b505afa158015610957573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061097b9190610f02565b6001600160a01b0316146109dd5760405162461bcd60e51b815260206004820152602360248201527f556e5374616b653a3a204861766520796f75207374616b65642074686973204e60448201526246543f60e81b6064820152608401610241565b3360008181526004602052604090206109f78285856101e5565b610a435760405162461bcd60e51b815260206004820152601a60248201527f556e5374616b653a3a20416c726561647920756e7374616b65640000000000006044820152606401610241565b6001600160a01b0384166000908152600282016020526040902054610a6a90600190611125565b6001600160a01b0380861660008181526002850160209081526040808320959095556001860181528482208883528152848220805460ff191690559286168152848352838120918152915220610ac09084610d7d565b610acb828585610e72565b604080516001600160a01b038087168252602082018690528416918101919091524260608201527fe892ce27ff3dbb6b3243ab8909f88149f865b95a88a7d480d381b9830f916bcc9060800161089d565b6000546001600160a01b03163314610b465760405162461bcd60e51b8152600401610241906110a1565b6001600160a01b038116610bab5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610241565b610bb481610cbd565b50565b600054600160a01b900460ff1615610be15760405162461bcd60e51b815260040161024190611077565b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610c1c3390565b6040516001600160a01b03909116815260200160405180910390a1565b600054600160a01b900460ff16610c895760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610241565b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33610c1c565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516323b872dd60e01b81526001600160a01b0385811660048301528481166024830152604482018390528316906323b872dd90606401600060405180830381600087803b158015610d5f57600080fd5b505af1158015610d73573d6000803e3d6000fd5b5050505050505050565b60005b8254811015610e6d5781838281548110610daa57634e487b7160e01b600052603260045260246000fd5b90600052602060002001541415610e5b5782548390610dcb90600190611125565b81548110610de957634e487b7160e01b600052603260045260246000fd5b9060005260206000200154838281548110610e1457634e487b7160e01b600052603260045260246000fd5b906000526020600020018190555082805480610e4057634e487b7160e01b600052603160045260246000fd5b60019003818190600052602060002001600090559055505050565b80610e658161113c565b915050610d80565b505050565b604051632142170760e11b81523060048201526001600160a01b038481166024830152604482018390528316906342842e0e90606401600060405180830381600087803b158015610ec257600080fd5b505af1158015610ed6573d6000803e3d6000fd5b50505050505050565b600060208284031215610ef0578081fd5b8135610efb8161116d565b9392505050565b600060208284031215610f13578081fd5b8151610efb8161116d565b60008060408385031215610f30578081fd5b8235610f3b8161116d565b91506020830135610f4b8161116d565b809150509250929050565b600080600060608486031215610f6a578081fd5b8335610f758161116d565b92506020840135610f858161116d565b929592945050506040919091013590565b60008060408385031215610fa8578182fd5b8235610fb38161116d565b915060208301358015158114610f4b578182fd5b60008060408385031215610fd9578182fd5b8235610fe48161116d565b946020939093013593505050565b600080600060608486031215611006578283fd5b83356110118161116d565b92506020840135915060408401356110288161116d565b809150509250925092565b6020808252825182820181905260009190848201906040850190845b8181101561106b5783518352928401929184019160010161104f565b50909695505050505050565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6000821982111561112057611120611157565b500190565b60008282101561113757611137611157565b500390565b600060001982141561115057611150611157565b5060010190565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b0381168114610bb457600080fdfea2646970667358221220744dca1b035b7356625355ac3721e77888e8308e98c7d0b44e746fc5e1cf8e4064736f6c63430008040033
Age | Block | Fee Address | BC Fee Address | Voting Power | Jailed | Incoming |
---|
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.