BERA Price: $3.69 (+0.24%)

Contract

0xa3c745C0B16D767cDBe906d935d90Fd216c2910E

Overview

BERA Balance

Berachain LogoBerachain LogoBerachain Logo0 BERA

BERA Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Stake NF Ts40796062025-04-23 8:53:062 hrs ago1745398386IN
0xa3c745C0...216c2910E
0 BERA0.000000210.00092293
Stake NF Ts40640272025-04-23 0:20:0310 hrs ago1745367603IN
0xa3c745C0...216c2910E
0 BERA0.000000020.00010106
Unstake NF Ts40598092025-04-22 22:01:2013 hrs ago1745359280IN
0xa3c745C0...216c2910E
0 BERA0.000000010.00010001
Stake NF Ts40597972025-04-22 22:00:5613 hrs ago1745359256IN
0xa3c745C0...216c2910E
0 BERA0.000000020.00010001
Unstake NF Ts40597882025-04-22 22:00:3913 hrs ago1745359239IN
0xa3c745C0...216c2910E
0 BERA0.000000010.00010001
Stake NF Ts40589342025-04-22 21:32:3113 hrs ago1745357551IN
0xa3c745C0...216c2910E
0 BERA0.000000110.00050001
Stake NF Ts40588532025-04-22 21:29:4613 hrs ago1745357386IN
0xa3c745C0...216c2910E
0 BERA0.000000110.00050001
Stake NF Ts40408692025-04-22 11:42:3423 hrs ago1745322154IN
0xa3c745C0...216c2910E
0 BERA0.000035490.15
Unstake NF Ts40343562025-04-22 8:11:2827 hrs ago1745309488IN
0xa3c745C0...216c2910E
0 BERA00.00000005
Unstake NF Ts40343552025-04-22 8:11:2527 hrs ago1745309485IN
0xa3c745C0...216c2910E
0 BERA00.00000005
Stake NF Ts39924372025-04-21 9:16:102 days ago1745226970IN
0xa3c745C0...216c2910E
0 BERA00.000001
Stake NF Ts39921502025-04-21 9:05:512 days ago1745226351IN
0xa3c745C0...216c2910E
0 BERA0.000036120.09151749
Stake NF Ts39882012025-04-21 6:57:152 days ago1745218635IN
0xa3c745C0...216c2910E
0 BERA0.000118310.50000001
Stake NF Ts39853892025-04-21 5:25:372 days ago1745213137IN
0xa3c745C0...216c2910E
0 BERA0.00000010.0005
Stake NF Ts39482402025-04-20 9:13:043 days ago1745140384IN
0xa3c745C0...216c2910E
0 BERA0.000000350.00150796
Stake NF Ts39452512025-04-20 7:33:583 days ago1745134438IN
0xa3c745C0...216c2910E
0 BERA0.000000410.00176427
Stake NF Ts39385152025-04-20 3:52:053 days ago1745121125IN
0xa3c745C0...216c2910E
0 BERA0.000000420.00192468
Stake NF Ts39379122025-04-20 3:32:123 days ago1745119932IN
0xa3c745C0...216c2910E
0 BERA0.000000470.00198789
Stake NF Ts39140162025-04-19 14:16:483 days ago1745072208IN
0xa3c745C0...216c2910E
0 BERA0.000000510.00215874
Stake NF Ts38887322025-04-19 0:26:474 days ago1745022407IN
0xa3c745C0...216c2910E
0 BERA0.000000330.00142871
Unstake NF Ts38830112025-04-18 21:17:574 days ago1745011077IN
0xa3c745C0...216c2910E
0 BERA0.000000130.00101017
Unstake NF Ts38721902025-04-18 15:20:554 days ago1744989655IN
0xa3c745C0...216c2910E
0 BERA0.000004450.03428
Stake NF Ts38683692025-04-18 13:15:064 days ago1744982106IN
0xa3c745C0...216c2910E
0 BERA0.000001820.00772777
Stake NF Ts38614722025-04-18 9:28:015 days ago1744968481IN
0xa3c745C0...216c2910E
0 BERA0.000000550.00233408
Stake NF Ts38502682025-04-18 3:17:235 days ago1744946243IN
0xa3c745C0...216c2910E
0 BERA0.000003790.009623
View all transactions

Parent Transaction Hash Block From To
View All Internal Transactions
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0x55d3B165...8F9382A89
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
NFTStaking

Compiler Version
v0.8.19+commit.7dd6d404

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 10 : stake.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {IERC721} from "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import {IERC721Enumerable} from "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol";
import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {ReentrancyGuard} from "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import {EnumerableSet} from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol";

// Struct to store token status information
struct TokenStatus {
    uint256 index;
    bool staked;
}

// Struct to store staked token information
struct StakedTokenInfo {
    uint256 tokenId;
    address stakerAddress;
}

contract NFTStaking is ERC721Holder, Ownable, ReentrancyGuard {
    using EnumerableSet for EnumerableSet.UintSet;

    // Custom errors
    error NotTokenOwner();
    error TokenAlreadyStaked();
    error TokenNotStakedByUser();
    error NoTokensToStake();
    error InvalidNFTContract();
    error ContractNotERC721();

    // Events
    event TokensStaked(address indexed user, uint256[] tokenIds);
    event TokensUnstaked(address indexed user, uint256[] tokenIds);

    // State variables
    IERC721Enumerable public immutable NFT_CONTRACT;
    
    // Mapping from user address to their staked token IDs
    mapping(address => EnumerableSet.UintSet) private _stakedTokens;
    
    // Mapping from token ID to staker address
    mapping(uint256 => address) private _tokenStaker;

    // Track all staked token IDs
    EnumerableSet.UintSet private _allStakedTokens;

    constructor(IERC721Enumerable _nftContract) {
        if (address(_nftContract) == address(0)) revert InvalidNFTContract();
        if (!IERC165(address(_nftContract)).supportsInterface(type(IERC721).interfaceId)) revert ContractNotERC721();
        NFT_CONTRACT = _nftContract;
    }

    function stakeNFTs(uint256[] calldata tokenIds) external nonReentrant {
        if (tokenIds.length == 0) revert NoTokensToStake();

        for (uint256 i = 0; i < tokenIds.length; i++) {

            if (_stakedTokens[msg.sender].contains(tokenIds[i])) revert TokenAlreadyStaked();

            if (NFT_CONTRACT.ownerOf(tokenIds[i]) != msg.sender) revert NotTokenOwner();
            
            // Transfer NFT to this contract
            NFT_CONTRACT.safeTransferFrom(msg.sender, address(this), tokenIds[i]);
            
            // Add token to user's staked tokens
            _stakedTokens[msg.sender].add(tokenIds[i]);
            
            // Add to all staked tokens
            _allStakedTokens.add(tokenIds[i]);
            
            // Record the staker of this token
            _tokenStaker[tokenIds[i]] = msg.sender;
        }

        emit TokensStaked(msg.sender, tokenIds);
    }

    function unstakeNFTs(uint256[] calldata tokenIds) external nonReentrant {
        if (tokenIds.length == 0) revert NoTokensToStake();

        for (uint256 i = 0; i < tokenIds.length; i++) {
            if (!_stakedTokens[msg.sender].contains(tokenIds[i])) revert TokenNotStakedByUser();
            
            // Transfer NFT back to user
            NFT_CONTRACT.safeTransferFrom(address(this), msg.sender, tokenIds[i]);

            // Remove token from user's staked tokens
            _stakedTokens[msg.sender].remove(tokenIds[i]);
            
            // Remove from all staked tokens
            _allStakedTokens.remove(tokenIds[i]);
            
            // Clear the staker record
            delete _tokenStaker[tokenIds[i]];
        }

        emit TokensUnstaked(msg.sender, tokenIds);
    }

    function getStaker(uint256 tokenId) external view returns (address) {
        return _tokenStaker[tokenId];
    }

    function getStakedTokens(address user) external view returns (uint256[] memory) {
        uint256 tokenCount = _stakedTokens[user].length();
        uint256[] memory tokens = new uint256[](tokenCount);
        
        for (uint256 i = 0; i < tokenCount; i++) {
            tokens[i] = _stakedTokens[user].at(i);
        }
        
        return tokens;
    }

    function getNFTsOwnedByUser(address user) external view returns (uint256[] memory) {
        uint256 balance = NFT_CONTRACT.balanceOf(user);
        uint256[] memory ownedTokens = new uint256[](balance);
        
        for (uint256 i = 0; i < balance; i++) {
            ownedTokens[i] = NFT_CONTRACT.tokenOfOwnerByIndex(user, i);
        }
        
        return ownedTokens;
    }

    function getStakedTokenCount(address user) external view returns (uint256) {
        return _stakedTokens[user].length();
    }

    function isStaked(uint256 tokenId) external view returns (bool) {
        return _tokenStaker[tokenId] != address(0);
    }

    function getAllTokensWithStakeStatus(address user) external view returns (TokenStatus[] memory) {
        // Get staked tokens
        uint256[] memory stakedTokens = this.getStakedTokens(user);
        // Get owned tokens
        uint256[] memory ownedTokens = this.getNFTsOwnedByUser(user);
        
        // Create array to store results
        TokenStatus[] memory allTokens = new TokenStatus[](stakedTokens.length + ownedTokens.length);
        uint256 totalTokens = 0;
        
        // Add staked tokens
        for (uint256 i = 0; i < stakedTokens.length; i++) {
            allTokens[totalTokens] = TokenStatus({
                index: stakedTokens[i],
                staked: true
            });
            totalTokens++;
        }
        
        // Add owned tokens
        for (uint256 i = 0; i < ownedTokens.length; i++) {
            bool isTokenStaked = false;
            // Check if this token is already in staked tokens
            for (uint256 j = 0; j < stakedTokens.length; j++) {
                if (ownedTokens[i] == stakedTokens[j]) {
                    isTokenStaked = true;
                    break;
                }
            }
            
            if (!isTokenStaked) {
                allTokens[totalTokens] = TokenStatus({
                    index: ownedTokens[i],
                    staked: false
                });
                totalTokens++;
            }
        }
        
        // Create a new array with the exact size
        TokenStatus[] memory result = new TokenStatus[](totalTokens);
        for (uint256 i = 0; i < totalTokens; i++) {
            result[i] = allTokens[i];
        }
        
        return result;
    }

    // Get all staked tokens with their staker addresses
    function getGlobalStakingInfo() external view returns (StakedTokenInfo[] memory) {
        uint256 tokenCount = _allStakedTokens.length();
        StakedTokenInfo[] memory tokens = new StakedTokenInfo[](tokenCount);
        
        for (uint256 i = 0; i < tokenCount; i++) {
            uint256 tokenId = _allStakedTokens.at(i);
            tokens[i] = StakedTokenInfo({
                tokenId: tokenId,
                stakerAddress: _tokenStaker[tokenId]
            });
        }
        
        return tokens;
    }

    // Get total number of staked tokens across all users
    function getGlobalStakingCount() external view returns (uint256) {
        return _allStakedTokens.length();
    }
}

File 2 of 10 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.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. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling 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 10 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (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() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be _NOT_ENTERED
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // 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 4 of 10 : IERC721Enumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol)

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Enumerable is IERC721 {
    /**
     * @dev Returns the total amount of tokens stored by the contract.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns a token ID owned by `owner` at a given `index` of its token list.
     * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256);

    /**
     * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
     * Use along with {totalSupply} to enumerate all tokens.
     */
    function tokenByIndex(uint256 index) external view returns (uint256);
}

File 5 of 10 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (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`.
     *
     * 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 caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool approved) external;

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

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

File 6 of 10 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC721 asset contracts.
 */
interface IERC721Receiver {
    /**
     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
     * by `operator` from `from`, this function is called.
     *
     * It must return its Solidity selector to confirm the token transfer.
     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
     *
     * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

File 7 of 10 : ERC721Holder.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/utils/ERC721Holder.sol)

pragma solidity ^0.8.0;

import "../IERC721Receiver.sol";

/**
 * @dev Implementation of the {IERC721Receiver} interface.
 *
 * Accepts all token transfers.
 * Make sure the contract is able to use its token with {IERC721-safeTransferFrom}, {IERC721-approve} or {IERC721-setApprovalForAll}.
 */
contract ERC721Holder is IERC721Receiver {
    /**
     * @dev See {IERC721Receiver-onERC721Received}.
     *
     * Always returns `IERC721Receiver.onERC721Received.selector`.
     */
    function onERC721Received(address, address, uint256, bytes memory) public virtual override returns (bytes4) {
        return this.onERC721Received.selector;
    }
}

File 8 of 10 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.4) (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;
    }

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}

File 9 of 10 : 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 10 of 10 : EnumerableSet.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)
// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.

pragma solidity ^0.8.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```solidity
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 *
 * [WARNING]
 * ====
 * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure
 * unusable.
 * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.
 *
 * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an
 * array of EnumerableSet.
 * ====
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;
        // Position of the value in the `values` array, plus 1 because index 0
        // means a value is not in the set.
        mapping(bytes32 => uint256) _indexes;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function _add(Set storage set, bytes32 value) private returns (bool) {
        if (!_contains(set, value)) {
            set._values.push(value);
            // The value is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            set._indexes[value] = set._values.length;
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function _remove(Set storage set, bytes32 value) private returns (bool) {
        // We read and store the value's index to prevent multiple reads from the same storage slot
        uint256 valueIndex = set._indexes[value];

        if (valueIndex != 0) {
            // Equivalent to contains(set, value)
            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in
            // the array, and then remove the last element (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 toDeleteIndex = valueIndex - 1;
            uint256 lastIndex = set._values.length - 1;

            if (lastIndex != toDeleteIndex) {
                bytes32 lastValue = set._values[lastIndex];

                // Move the last value to the index where the value to delete is
                set._values[toDeleteIndex] = lastValue;
                // Update the index for the moved value
                set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex
            }

            // Delete the slot where the moved value was stored
            set._values.pop();

            // Delete the index for the deleted slot
            delete set._indexes[value];

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function _contains(Set storage set, bytes32 value) private view returns (bool) {
        return set._indexes[value] != 0;
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function _length(Set storage set) private view returns (uint256) {
        return set._values.length;
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function _at(Set storage set, uint256 index) private view returns (bytes32) {
        return set._values[index];
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function _values(Set storage set) private view returns (bytes32[] memory) {
        return set._values;
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _add(set._inner, value);
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _remove(set._inner, value);
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
        return _contains(set._inner, value);
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(Bytes32Set storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
        return _at(set._inner, index);
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {
        bytes32[] memory store = _values(set._inner);
        bytes32[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(AddressSet storage set, address value) internal returns (bool) {
        return _add(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(AddressSet storage set, address value) internal returns (bool) {
        return _remove(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(AddressSet storage set, address value) internal view returns (bool) {
        return _contains(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(AddressSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(AddressSet storage set, uint256 index) internal view returns (address) {
        return address(uint160(uint256(_at(set._inner, index))));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(AddressSet storage set) internal view returns (address[] memory) {
        bytes32[] memory store = _values(set._inner);
        address[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(UintSet storage set, uint256 value) internal returns (bool) {
        return _add(set._inner, bytes32(value));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(UintSet storage set, uint256 value) internal returns (bool) {
        return _remove(set._inner, bytes32(value));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(UintSet storage set, uint256 value) internal view returns (bool) {
        return _contains(set._inner, bytes32(value));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(UintSet storage set, uint256 index) internal view returns (uint256) {
        return uint256(_at(set._inner, index));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(UintSet storage set) internal view returns (uint256[] memory) {
        bytes32[] memory store = _values(set._inner);
        uint256[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }
}

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

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"contract IERC721Enumerable","name":"_nftContract","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ContractNotERC721","type":"error"},{"inputs":[],"name":"InvalidNFTContract","type":"error"},{"inputs":[],"name":"NoTokensToStake","type":"error"},{"inputs":[],"name":"NotTokenOwner","type":"error"},{"inputs":[],"name":"TokenAlreadyStaked","type":"error"},{"inputs":[],"name":"TokenNotStakedByUser","type":"error"},{"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":"user","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"TokensStaked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"TokensUnstaked","type":"event"},{"inputs":[],"name":"NFT_CONTRACT","outputs":[{"internalType":"contract IERC721Enumerable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getAllTokensWithStakeStatus","outputs":[{"components":[{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"bool","name":"staked","type":"bool"}],"internalType":"struct TokenStatus[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getGlobalStakingCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getGlobalStakingInfo","outputs":[{"components":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"stakerAddress","type":"address"}],"internalType":"struct StakedTokenInfo[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getNFTsOwnedByUser","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getStakedTokenCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getStakedTokens","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getStaker","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"isStaked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","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":"tokenIds","type":"uint256[]"}],"name":"stakeNFTs","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"unstakeNFTs","outputs":[],"stateMutability":"nonpayable","type":"function"}]

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100f55760003560e01c8063715018a611610097578063cdb039cd11610066578063cdb039cd1461025c578063d5aff2301461026f578063e3c998fe14610282578063f2fde38b146102ab57600080fd5b8063715018a6146101f25780638da5cb5b146101fa5780639d1301321461020b578063baa51f861461022157600080fd5b80631fda9a02116100d35780631fda9a021461016b5780635414bc63146101aa57806363c28db1146101bf5780636d6f2327146101d257600080fd5b80630f48a482146100fa578063150b7a021461010f5780631589ee601461014b575b600080fd5b61010d610108366004611245565b6102be565b005b61012d61011d366004611316565b630a85bd0160e11b949350505050565b6040516001600160e01b031990911681526020015b60405180910390f35b61015e6101593660046113da565b6105da565b60405161014291906113f7565b6101927f0000000000000000000000006a98fd0da1fc9fbbfcc83c6ee7e9f5904299dbfb81565b6040516001600160a01b039091168152602001610142565b6101b2610786565b604051610142919061143b565b61015e6101cd3660046113da565b61087b565b6101e56101e03660046113da565b610945565b6040516101429190611493565b61010d610cbe565b6000546001600160a01b0316610192565b610213610cd2565b604051908152602001610142565b61024c61022f3660046114d7565b6000908152600360205260409020546001600160a01b0316151590565b6040519015158152602001610142565b61010d61026a366004611245565b610ce3565b61021361027d3660046113da565b610ee8565b6101926102903660046114d7565b6000908152600360205260409020546001600160a01b031690565b61010d6102b93660046113da565b610f0f565b6102c6610f8d565b60008190036102e85760405163598172d360e11b815260040160405180910390fd5b60005b8181101561058957610326838383818110610308576103086114f0565b33600090815260026020908152604090912093910201359050610fe6565b15610344576040516316e9ad8f60e01b815260040160405180910390fd5b337f0000000000000000000000006a98fd0da1fc9fbbfcc83c6ee7e9f5904299dbfb6001600160a01b0316636352211e858585818110610386576103866114f0565b905060200201356040518263ffffffff1660e01b81526004016103ab91815260200190565b602060405180830381865afa1580156103c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103ec9190611506565b6001600160a01b031614610413576040516359dc379f60e01b815260040160405180910390fd5b7f0000000000000000000000006a98fd0da1fc9fbbfcc83c6ee7e9f5904299dbfb6001600160a01b03166342842e0e3330868686818110610456576104566114f0565b6040516001600160e01b031960e088901b1681526001600160a01b03958616600482015294909316602485015250602090910201356044820152606401600060405180830381600087803b1580156104ad57600080fd5b505af11580156104c1573d6000803e3d6000fd5b505050506104f88383838181106104da576104da6114f0565b33600090815260026020908152604090912093910201359050611001565b5061052583838381811061050e5761050e6114f0565b90506020020135600461100190919063ffffffff16565b50336003600085858581811061053d5761053d6114f0565b90506020020135815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b03160217905550808061058190611539565b9150506102eb565b50336001600160a01b03167f540cd34f06460fd67aeca9d19e0a56cd3a7c1cde8dc2263f265b68b2ef3495d283836040516105c5929190611552565b60405180910390a26105d660018055565b5050565b6040516370a0823160e01b81526001600160a01b0382811660048301526060916000917f0000000000000000000000006a98fd0da1fc9fbbfcc83c6ee7e9f5904299dbfb16906370a0823190602401602060405180830381865afa158015610646573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061066a919061158b565b905060008167ffffffffffffffff811115610687576106876112cf565b6040519080825280602002602001820160405280156106b0578160200160208202803683370190505b50905060005b8281101561077e57604051632f745c5960e01b81526001600160a01b038681166004830152602482018390527f0000000000000000000000006a98fd0da1fc9fbbfcc83c6ee7e9f5904299dbfb1690632f745c5990604401602060405180830381865afa15801561072b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061074f919061158b565b828281518110610761576107616114f0565b60209081029190910101528061077681611539565b9150506106b6565b509392505050565b60606000610794600461100d565b905060008167ffffffffffffffff8111156107b1576107b16112cf565b6040519080825280602002602001820160405280156107f657816020015b60408051808201909152600080825260208201528152602001906001900390816107cf5790505b50905060005b82811015610874576000610811600483611017565b604080518082018252828152600083815260036020908152929020546001600160a01b031691810191909152845191925090849084908110610855576108556114f0565b602002602001018190525050808061086c90611539565b9150506107fc565b5092915050565b6001600160a01b0381166000908152600260205260408120606091906108a09061100d565b905060008167ffffffffffffffff8111156108bd576108bd6112cf565b6040519080825280602002602001820160405280156108e6578160200160208202803683370190505b50905060005b8281101561077e576001600160a01b03851660009081526002602052604090206109169082611017565b828281518110610928576109286114f0565b60209081029190910101528061093d81611539565b9150506108ec565b6040516363c28db160e01b81526001600160a01b038216600482015260609060009030906363c28db190602401600060405180830381865afa15801561098f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526109b791908101906115a4565b60405162ac4f7360e51b81526001600160a01b03851660048201529091506000903090631589ee6090602401600060405180830381865afa158015610a00573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610a2891908101906115a4565b9050600081518351610a3a919061164a565b67ffffffffffffffff811115610a5257610a526112cf565b604051908082528060200260200182016040528015610a9757816020015b6040805180820190915260008082526020820152815260200190600190039081610a705790505b5090506000805b8451811015610b16576040518060400160405280868381518110610ac457610ac46114f0565b6020026020010151815260200160011515815250838381518110610aea57610aea6114f0565b60200260200101819052508180610b0090611539565b9250508080610b0e90611539565b915050610a9e565b5060005b8351811015610bfa576000805b8651811015610b8457868181518110610b4257610b426114f0565b6020026020010151868481518110610b5c57610b5c6114f0565b602002602001015103610b725760019150610b84565b80610b7c81611539565b915050610b27565b5080610be7576040518060400160405280868481518110610ba757610ba76114f0565b6020026020010151815260200160001515815250848481518110610bcd57610bcd6114f0565b60200260200101819052508280610be390611539565b9350505b5080610bf281611539565b915050610b1a565b5060008167ffffffffffffffff811115610c1657610c166112cf565b604051908082528060200260200182016040528015610c5b57816020015b6040805180820190915260008082526020820152815260200190600190039081610c345790505b50905060005b82811015610cb357838181518110610c7b57610c7b6114f0565b6020026020010151828281518110610c9557610c956114f0565b60200260200101819052508080610cab90611539565b915050610c61565b509695505050505050565b610cc6611023565b610cd0600061107d565b565b6000610cde600461100d565b905090565b610ceb610f8d565b6000819003610d0d5760405163598172d360e11b815260040160405180910390fd5b60005b81811015610eac57610d2d838383818110610308576103086114f0565b610d4a5760405163035a7bf360e51b815260040160405180910390fd5b7f0000000000000000000000006a98fd0da1fc9fbbfcc83c6ee7e9f5904299dbfb6001600160a01b03166342842e0e3033868686818110610d8d57610d8d6114f0565b6040516001600160e01b031960e088901b1681526001600160a01b03958616600482015294909316602485015250602090910201356044820152606401600060405180830381600087803b158015610de457600080fd5b505af1158015610df8573d6000803e3d6000fd5b50505050610e2f838383818110610e1157610e116114f0565b336000908152600260209081526040909120939102013590506110cd565b50610e5c838383818110610e4557610e456114f0565b9050602002013560046110cd90919063ffffffff16565b5060036000848484818110610e7357610e736114f0565b6020908102929092013583525081019190915260400160002080546001600160a01b031916905580610ea481611539565b915050610d10565b50336001600160a01b03167fc312cf869b811d01530a10c2349045a8a4a198c06d5bffa4d4dba4d04b67dabe83836040516105c5929190611552565b6001600160a01b0381166000908152600260205260408120610f099061100d565b92915050565b610f17611023565b6001600160a01b038116610f815760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b610f8a8161107d565b50565b600260015403610fdf5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610f78565b6002600155565b600081815260018301602052604081205415155b9392505050565b6000610ffa83836110d9565b6000610f09825490565b6000610ffa8383611128565b6000546001600160a01b03163314610cd05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610f78565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000610ffa8383611152565b600081815260018301602052604081205461112057508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610f09565b506000610f09565b600082600001828154811061113f5761113f6114f0565b9060005260206000200154905092915050565b6000818152600183016020526040812054801561123b57600061117660018361165d565b855490915060009061118a9060019061165d565b90508181146111ef5760008660000182815481106111aa576111aa6114f0565b90600052602060002001549050808760000184815481106111cd576111cd6114f0565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061120057611200611670565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610f09565b6000915050610f09565b6000806020838503121561125857600080fd5b823567ffffffffffffffff8082111561127057600080fd5b818501915085601f83011261128457600080fd5b81358181111561129357600080fd5b8660208260051b85010111156112a857600080fd5b60209290920196919550909350505050565b6001600160a01b0381168114610f8a57600080fd5b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561130e5761130e6112cf565b604052919050565b6000806000806080858703121561132c57600080fd5b8435611337816112ba565b9350602085810135611348816112ba565b935060408601359250606086013567ffffffffffffffff8082111561136c57600080fd5b818801915088601f83011261138057600080fd5b813581811115611392576113926112cf565b6113a4601f8201601f191685016112e5565b915080825289848285010111156113ba57600080fd5b808484018584013760008482840101525080935050505092959194509250565b6000602082840312156113ec57600080fd5b8135610ffa816112ba565b6020808252825182820181905260009190848201906040850190845b8181101561142f57835183529284019291840191600101611413565b50909695505050505050565b602080825282518282018190526000919060409081850190868401855b82811015611486578151805185528601516001600160a01b0316868501529284019290850190600101611458565b5091979650505050505050565b602080825282518282018190526000919060409081850190868401855b828110156114865781518051855286015115158685015292840192908501906001016114b0565b6000602082840312156114e957600080fd5b5035919050565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561151857600080fd5b8151610ffa816112ba565b634e487b7160e01b600052601160045260246000fd5b60006001820161154b5761154b611523565b5060010190565b6020808252810182905260006001600160fb1b0383111561157257600080fd5b8260051b80856040850137919091016040019392505050565b60006020828403121561159d57600080fd5b5051919050565b600060208083850312156115b757600080fd5b825167ffffffffffffffff808211156115cf57600080fd5b818501915085601f8301126115e357600080fd5b8151818111156115f5576115f56112cf565b8060051b91506116068483016112e5565b818152918301840191848101908884111561162057600080fd5b938501935b8385101561163e57845182529385019390850190611625565b98975050505050505050565b80820180821115610f0957610f09611523565b81810381811115610f0957610f09611523565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220d69a2b9769e49c9ff5d9a7430432440369ac482e7ed56bab8801c0c252060c5364736f6c63430008130033

Block Transaction 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
[ 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.