ETH Price: $3,458.11 (+1.55%)
Gas: 8 Gwei

Contract

0x1bEE172F6b235eD37DF5E4Eff6A1D34f7dFf4c63
 

Overview

ETH Balance

0.00003531618475402 ETH

Eth Value

$0.12 (@ $3,458.11/ETH)

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Withdraw200079742024-06-03 1:20:2344 days ago1717377623IN
0x1bEE172F...f7dFf4c63
0 ETH0.0015049413.426662
Withdraw200079702024-06-03 1:19:3544 days ago1717377575IN
0x1bEE172F...f7dFf4c63
0 ETH0.0014283312.32112864
Get Eth Rewards200079672024-06-03 1:18:5944 days ago1717377539IN
0x1bEE172F...f7dFf4c63
0 ETH0.0014401212.54533183
Get Eth Rewards197090052024-04-22 5:58:5986 days ago1713765539IN
0x1bEE172F...f7dFf4c63
0 ETH0.000755756.58425234
Withdraw196990372024-04-20 20:33:3587 days ago1713645215IN
0x1bEE172F...f7dFf4c63
0 ETH0.00086347.44851567
Withdraw196701872024-04-16 19:40:4791 days ago1713296447IN
0x1bEE172F...f7dFf4c63
0 ETH0.00094189.57064825
Withdraw196701862024-04-16 19:40:3591 days ago1713296435IN
0x1bEE172F...f7dFf4c63
0 ETH0.000935239.32091282
Withdraw196701842024-04-16 19:40:1191 days ago1713296411IN
0x1bEE172F...f7dFf4c63
0 ETH0.000931479.11013961
Withdraw196701812024-04-16 19:39:3591 days ago1713296375IN
0x1bEE172F...f7dFf4c63
0 ETH0.0012529610.80829648
Get Eth Rewards196701792024-04-16 19:39:1191 days ago1713296351IN
0x1bEE172F...f7dFf4c63
0 ETH0.0009820810.80808147
Withdraw196660822024-04-16 5:52:3592 days ago1713246755IN
0x1bEE172F...f7dFf4c63
0 ETH0.000837517.62446683
Withdraw196554512024-04-14 18:06:2393 days ago1713117983IN
0x1bEE172F...f7dFf4c63
0 ETH0.0012654912.37695793
Withdraw196554462024-04-14 18:05:2393 days ago1713117923IN
0x1bEE172F...f7dFf4c63
0 ETH0.001291212.48489732
Withdraw196554432024-04-14 18:04:4793 days ago1713117887IN
0x1bEE172F...f7dFf4c63
0 ETH0.0014256413.78118278
Withdraw196554212024-04-14 18:00:1193 days ago1713117611IN
0x1bEE172F...f7dFf4c63
0 ETH0.0012915512.786779
Withdraw196319972024-04-11 11:10:5997 days ago1712833859IN
0x1bEE172F...f7dFf4c63
0 ETH0.0016557615.07355658
Withdraw196227622024-04-10 4:11:2398 days ago1712722283IN
0x1bEE172F...f7dFf4c63
0 ETH0.0013140213.66559443
Withdraw196227602024-04-10 4:10:5998 days ago1712722259IN
0x1bEE172F...f7dFf4c63
0 ETH0.001653714.79590155
Get Eth Rewards196194262024-04-09 16:58:5998 days ago1712681939IN
0x1bEE172F...f7dFf4c63
0 ETH0.0027667743.58368036
Withdraw196141412024-04-08 23:12:2399 days ago1712617943IN
0x1bEE172F...f7dFf4c63
0 ETH0.0023043123.961846
Withdraw196141352024-04-08 23:11:1199 days ago1712617871IN
0x1bEE172F...f7dFf4c63
0 ETH0.0027250723.97020899
Withdraw196092962024-04-08 6:54:11100 days ago1712559251IN
0x1bEE172F...f7dFf4c63
0 ETH0.0013751312.09591329
Withdraw196086932024-04-08 4:52:47100 days ago1712551967IN
0x1bEE172F...f7dFf4c63
0 ETH0.0011482111.94113713
Withdraw196086902024-04-08 4:52:11100 days ago1712551931IN
0x1bEE172F...f7dFf4c63
0 ETH0.0014021512.09631508
Withdraw196016522024-04-07 5:12:11101 days ago1712466731IN
0x1bEE172F...f7dFf4c63
0 ETH0.001065569.50669387
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
200079672024-06-03 1:18:5944 days ago1717377539
0x1bEE172F...f7dFf4c63
0 ETH
197090052024-04-22 5:58:5986 days ago1713765539
0x1bEE172F...f7dFf4c63
0 ETH
196701792024-04-16 19:39:1191 days ago1713296351
0x1bEE172F...f7dFf4c63
0 ETH
196194262024-04-09 16:58:5998 days ago1712681939
0x1bEE172F...f7dFf4c63
0 ETH
195848722024-04-04 20:47:35103 days ago1712263655
0x1bEE172F...f7dFf4c63
0 ETH
195838122024-04-04 17:13:59103 days ago1712250839
0x1bEE172F...f7dFf4c63
0 ETH
195782932024-04-03 22:41:59104 days ago1712184119
0x1bEE172F...f7dFf4c63
0 ETH
195774102024-04-03 19:44:11104 days ago1712173451
0x1bEE172F...f7dFf4c63
0 ETH
195701142024-04-02 19:14:11105 days ago1712085251
0x1bEE172F...f7dFf4c63
0 ETH
195635412024-04-01 21:05:35106 days ago1712005535
0x1bEE172F...f7dFf4c63
0 ETH
195634032024-04-01 20:37:35106 days ago1712003855
0x1bEE172F...f7dFf4c63
0 ETH
195528102024-03-31 8:51:35108 days ago1711875095
0x1bEE172F...f7dFf4c63
0.00167836 ETH
195483942024-03-30 17:58:23108 days ago1711821503
0x1bEE172F...f7dFf4c63
0.00255814 ETH
195416772024-03-29 19:16:59109 days ago1711739819
0x1bEE172F...f7dFf4c63
0.02639241 ETH
195406472024-03-29 15:48:35109 days ago1711727315
0x1bEE172F...f7dFf4c63
0.03470008 ETH
195406452024-03-29 15:48:11109 days ago1711727291
0x1bEE172F...f7dFf4c63
0.03469933 ETH
195406422024-03-29 15:47:35109 days ago1711727255
0x1bEE172F...f7dFf4c63
0.0346982 ETH
195406362024-03-29 15:46:23109 days ago1711727183
0x1bEE172F...f7dFf4c63
0.03469595 ETH
195406312024-03-29 15:45:23109 days ago1711727123
0x1bEE172F...f7dFf4c63
0.03469407 ETH
195406242024-03-29 15:43:59109 days ago1711727039
0x1bEE172F...f7dFf4c63
0.03469144 ETH
195402302024-03-29 14:23:59109 days ago1711722239
0x1bEE172F...f7dFf4c63
0.01614376 ETH
195392692024-03-29 11:08:59110 days ago1711710539
0x1bEE172F...f7dFf4c63
0.04008289 ETH
195392542024-03-29 11:05:59110 days ago1711710359
0x1bEE172F...f7dFf4c63
0.04007703 ETH
195392492024-03-29 11:04:59110 days ago1711710299
0x1bEE172F...f7dFf4c63
0.04007605 ETH
195372502024-03-29 4:21:59110 days ago1711686119
0x1bEE172F...f7dFf4c63
0.08326713 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
SyntaxNodeStaking

Compiler Version
v0.8.20+commit.a1b79de6

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion
File 1 of 7 : SyntaxNodeStaking.sol
// SPDX-License-Identifier: unlicense
pragma solidity ^0.8.20;

import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";

contract SyntaxNodeStaking is Ownable, ERC721Holder {

    struct NftInfo {
        uint256 tokenId;
        uint256 unlockTime;
        uint256 claimedReward;
        uint256 claimableReward;
    }
    struct stakeData {
        address user;
        uint256 stakeDuration;
        uint256 lastClaimTime;
        uint256 claimedReward;
    }

    IERC721 public syntaxNode;
    uint256 public rewardRate;
    uint256 public stakeDuration;

    mapping(address => uint256) public userClaimedRewards;
    mapping(uint256 => stakeData) public stakedInfo;
    mapping(address => uint256[]) private userNftsStaked;

    constructor() Ownable(msg.sender) {
        syntaxNode = IERC721(0xE2870Ad60442bd6f5634CA2E00a1Eb23cEA9786e);
        stakeDuration = 15 days;
    }

    function stakeNFT(uint256[] memory _ids) external {
        require(_ids.length != 0, "zero length");

        for (uint256 i; i < _ids.length;) 
        {
            syntaxNode.transferFrom(msg.sender, address(this), _ids[i]);
            stakedInfo[_ids[i]].user = msg.sender;
            stakedInfo[_ids[i]].lastClaimTime = block.timestamp;
            userNftsStaked[msg.sender].push(_ids[i]);
            unchecked {
            stakedInfo[_ids[i]].stakeDuration = block.timestamp + stakeDuration;
                i++;
            }
        }
    }

    function withdraw(uint256 _tokenId) external {
        require(stakedInfo[_tokenId].user == msg.sender, "caller is not owner");
        require(stakedInfo[_tokenId].stakeDuration < block.timestamp, "stake duration not ended");

        syntaxNode.transferFrom(address(this), msg.sender, _tokenId);
        
        delete stakedInfo[_tokenId];
        uint256[] storage stakedNfts = userNftsStaked[msg.sender];
        uint256 length = userNftsStaked[msg.sender].length;
        for (uint256 i = 0; i < length; i++) {
            if (stakedNfts[i] == _tokenId) {
                // Move the last element to the current index
                stakedNfts[i] = stakedNfts[length - 1];
                // Remove the last element
                stakedNfts.pop();
                return;
            }
        }
        // Throw an error if the NFT ID was not found
        revert("NFT ID not found");
    }

    function getEthRewards(uint256[] memory _tokenIds) external {
        uint256 availableRewards;
        for (uint256 i; i < _tokenIds.length; ) {
            require(stakedInfo[_tokenIds[i]].user == msg.sender, "caller is not owner");
            uint256 tokenReward = getRewards(_tokenIds[i]);
            availableRewards += tokenReward;
            stakedInfo[_tokenIds[i]].lastClaimTime = block.timestamp;
            stakedInfo[_tokenIds[i]].claimedReward += tokenReward;

            unchecked {
                i++;
            }
        }
        userClaimedRewards[msg.sender] += availableRewards;
        if (availableRewards != 0) {
            (bool success, ) = payable(_msgSender()).call{value: availableRewards}(
                ""
            );
            require(success, "Reward transfer failed.");
        }
    }

    function setNFTAdd(address _tokenAdd) external onlyOwner {
        require(_tokenAdd != address(0), "zero address");
        syntaxNode = IERC721(_tokenAdd);
    }

    function setRewardRate(uint256 _rps) external onlyOwner {
        require(_rps != 0, "zero rps");
        rewardRate = _rps;
    }

    function getRewards(uint256 _tokenId) public view returns (uint256) {
        if(stakedInfo[_tokenId].user == address(0)) {
            return 0; 
        }
        uint256 rewardDuration = block.timestamp -
            stakedInfo[_tokenId].lastClaimTime;

        return rewardDuration * rewardRate;
    }

    function getUserNftsInfo(address _account)
        external
        view
        returns (NftInfo[] memory)
    {
        require(_account != address(0), "zero address");
        uint256 userStakesLength = userNftsStaked[_account].length;
        NftInfo[] memory userNftsInfo = new NftInfo[](userStakesLength);

        if (userStakesLength != 0) {
            for (uint256 i = 0; i < userStakesLength; i++) {
                uint256 claimableReward = getRewards(userNftsStaked[_account][i]);
                userNftsInfo[i] = NftInfo(
                    userNftsStaked[_account][i],
                    stakedInfo[userNftsStaked[_account][i]].stakeDuration,
                    stakedInfo[userNftsStaked[_account][i]].claimedReward,
                    claimableReward

                );
            }
        }

        return userNftsInfo;
    }

    function getUserStakes(address user) public view returns(uint256[] memory) {
        return userNftsStaked[user];
    }
    receive() external payable {}
}

File 2 of 7 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)

pragma solidity ^0.8.20;

import {Context} from "../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.
 *
 * The initial owner is set to the address provided by the deployer. 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;

    /**
     * @dev The caller account is not authorized to perform an operation.
     */
    error OwnableUnauthorizedAccount(address account);

    /**
     * @dev The owner is not a valid owner account. (eg. `address(0)`)
     */
    error OwnableInvalidOwner(address owner);

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.
     */
    constructor(address initialOwner) {
        if (initialOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(initialOwner);
    }

    /**
     * @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 {
        if (owner() != _msgSender()) {
            revert OwnableUnauthorizedAccount(_msgSender());
        }
    }

    /**
     * @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 {
        if (newOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _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 7 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.20;

import {IERC165} from "../../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 address zero.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool approved) external;

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

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

File 4 of 7 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.20;

/**
 * @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 5 of 7 : ERC721Holder.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/utils/ERC721Holder.sol)

pragma solidity ^0.8.20;

import {IERC721Receiver} from "../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}.
 */
abstract contract ERC721Holder is IERC721Receiver {
    /**
     * @dev See {IERC721Receiver-onERC721Received}.
     *
     * Always returns `IERC721Receiver.onERC721Received.selector`.
     */
    function onERC721Received(address, address, uint256, bytes memory) public virtual returns (bytes4) {
        return this.onERC721Received.selector;
    }
}

File 6 of 7 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)

pragma solidity ^0.8.20;

/**
 * @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 7 of 7 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)

pragma solidity ^0.8.20;

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

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

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","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"},{"inputs":[{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"}],"name":"getEthRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"getUserNftsInfo","outputs":[{"components":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"unlockTime","type":"uint256"},{"internalType":"uint256","name":"claimedReward","type":"uint256"},{"internalType":"uint256","name":"claimableReward","type":"uint256"}],"internalType":"struct SyntaxNodeStaking.NftInfo[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getUserStakes","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"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":[],"name":"rewardRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenAdd","type":"address"}],"name":"setNFTAdd","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rps","type":"uint256"}],"name":"setRewardRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakeDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_ids","type":"uint256[]"}],"name":"stakeNFT","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"stakedInfo","outputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"stakeDuration","type":"uint256"},{"internalType":"uint256","name":"lastClaimTime","type":"uint256"},{"internalType":"uint256","name":"claimedReward","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"syntaxNode","outputs":[{"internalType":"contract IERC721","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userClaimedRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

608060405234801561001057600080fd5b50338061003757604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b61004081610073565b50600180546001600160a01b03191673e2870ad60442bd6f5634ca2e00a1eb23cea9786e1790556213c6806003556100c3565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b611285806100d26000396000f3fe6080604052600436106101015760003560e01c80637b0a47ee11610095578063b1907abb11610064578063b1907abb146102d3578063c0d8012c146102f3578063cf797f1014610313578063d2de0c5414610340578063f2fde38b146103b657600080fd5b80637b0a47ee1461023e578063842e2981146102545780638da5cb5b146102815780639e447fc6146102b357600080fd5b806320b4a532116100d157806320b4a532146101d35780632e1a7d4d146101f357806340f02ab614610213578063715018a61461022957600080fd5b8062f1197c1461010d57806303702ac81461014d578063150b7a021461016f578063182c5744146101b357600080fd5b3661010857005b600080fd5b34801561011957600080fd5b5061013a610128366004610f28565b60046020526000908152604090205481565b6040519081526020015b60405180910390f35b34801561015957600080fd5b5061016d610168366004610f8a565b6103d6565b005b34801561017b57600080fd5b5061019a61018a366004611030565b630a85bd0160e11b949350505050565b6040516001600160e01b03199091168152602001610144565b3480156101bf57600080fd5b5061016d6101ce366004610f8a565b6105eb565b3480156101df57600080fd5b5061016d6101ee366004610f28565b6107fd565b3480156101ff57600080fd5b5061016d61020e3660046110f0565b61086c565b34801561021f57600080fd5b5061013a60035481565b34801561023557600080fd5b5061016d610ac1565b34801561024a57600080fd5b5061013a60025481565b34801561026057600080fd5b5061027461026f366004610f28565b610ad5565b6040516101449190611109565b34801561028d57600080fd5b506000546001600160a01b03165b6040516001600160a01b039091168152602001610144565b3480156102bf57600080fd5b5061016d6102ce3660046110f0565b610b41565b3480156102df57600080fd5b5060015461029b906001600160a01b031681565b3480156102ff57600080fd5b5061013a61030e3660046110f0565b610b89565b34801561031f57600080fd5b5061033361032e366004610f28565b610be0565b604051610144919061114d565b34801561034c57600080fd5b5061038c61035b3660046110f0565b60056020526000908152604090208054600182015460028301546003909301546001600160a01b0390921692909184565b604080516001600160a01b0390951685526020850193909352918301526060820152608001610144565b3480156103c257600080fd5b5061016d6103d1366004610f28565b610e51565b6000805b825181101561052257336001600160a01b031660056000858481518110610403576104036111b1565b6020908102919091018101518252810191909152604001600020546001600160a01b03161461046f5760405162461bcd60e51b815260206004820152601360248201527231b0b63632b91034b9903737ba1037bbb732b960691b60448201526064015b60405180910390fd5b6000610493848381518110610486576104866111b1565b6020026020010151610b89565b905061049f81846111dd565b925042600560008685815181106104b8576104b86111b1565b602002602001015181526020019081526020016000206002018190555080600560008685815181106104ec576104ec6111b1565b60200260200101518152602001908152602001600020600301600082825461051491906111dd565b9091555050506001016103da565b5033600090815260046020526040812080548392906105429084906111dd565b909155505080156105e757604051600090339083908381818185875af1925050503d806000811461058f576040519150601f19603f3d011682016040523d82523d6000602084013e610594565b606091505b50509050806105e55760405162461bcd60e51b815260206004820152601760248201527f526577617264207472616e73666572206661696c65642e0000000000000000006044820152606401610466565b505b5050565b805160000361062a5760405162461bcd60e51b815260206004820152600b60248201526a0f4cae4de40d8cadccee8d60ab1b6044820152606401610466565b60005b81518110156105e75760015482516001600160a01b03909116906323b872dd9033903090869086908110610663576106636111b1565b60209081029190910101516040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401600060405180830381600087803b1580156106bd57600080fd5b505af11580156106d1573d6000803e3d6000fd5b5050505033600560008484815181106106ec576106ec6111b1565b6020026020010151815260200190815260200160002060000160006101000a8154816001600160a01b0302191690836001600160a01b031602179055504260056000848481518110610740576107406111b1565b602002602001015181526020019081526020016000206002018190555060066000336001600160a01b03166001600160a01b03168152602001908152602001600020828281518110610794576107946111b1565b6020908102919091018101518254600181018455600093845291832090910155600354835142909101916005918590859081106107d3576107d36111b1565b6020026020010151815260200190815260200160002060010181905550808060010191505061062d565b610805610e8f565b6001600160a01b03811661084a5760405162461bcd60e51b815260206004820152600c60248201526b7a65726f206164647265737360a01b6044820152606401610466565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000818152600560205260409020546001600160a01b031633146108c85760405162461bcd60e51b815260206004820152601360248201527231b0b63632b91034b9903737ba1037bbb732b960691b6044820152606401610466565b60008181526005602052604090206001015442116109285760405162461bcd60e51b815260206004820152601860248201527f7374616b65206475726174696f6e206e6f7420656e64656400000000000000006044820152606401610466565b6001546040516323b872dd60e01b8152306004820152336024820152604481018390526001600160a01b03909116906323b872dd90606401600060405180830381600087803b15801561097a57600080fd5b505af115801561098e573d6000803e3d6000fd5b505050600082815260056020908152604080832080546001600160a01b03191681556001810184905560028101849055600301839055338352600690915281208054909250905b81811015610a8557838382815481106109f0576109f06111b1565b906000526020600020015403610a735782610a0c6001846111f6565b81548110610a1c57610a1c6111b1565b9060005260206000200154838281548110610a3957610a396111b1565b906000526020600020018190555082805480610a5757610a57611209565b6001900381819060005260206000200160009055905550505050565b80610a7d8161121f565b9150506109d5565b5060405162461bcd60e51b815260206004820152601060248201526f139195081251081b9bdd08199bdd5b9960821b6044820152606401610466565b610ac9610e8f565b610ad36000610ebc565b565b6001600160a01b038116600090815260066020908152604091829020805483518184028101840190945280845260609392830182828015610b3557602002820191906000526020600020905b815481526020019060010190808311610b21575b50505050509050919050565b610b49610e8f565b80600003610b845760405162461bcd60e51b81526020600482015260086024820152677a65726f2072707360c01b6044820152606401610466565b600255565b6000818152600560205260408120546001600160a01b0316610bad57506000919050565b600082815260056020526040812060020154610bc990426111f6565b905060025481610bd99190611238565b9392505050565b60606001600160a01b038216610c275760405162461bcd60e51b815260206004820152600c60248201526b7a65726f206164647265737360a01b6044820152606401610466565b6001600160a01b038216600090815260066020526040812054908167ffffffffffffffff811115610c5a57610c5a610f43565b604051908082528060200260200182016040528015610cb657816020015b610ca36040518060800160405280600081526020016000815260200160008152602001600081525090565b815260200190600190039081610c785790505b5090508115610bd95760005b82811015610e49576001600160a01b03851660009081526006602052604081208054610d09919084908110610cf957610cf96111b1565b9060005260206000200154610b89565b9050604051806080016040528060066000896001600160a01b03166001600160a01b031681526020019081526020016000208481548110610d4c57610d4c6111b1565b9060005260206000200154815260200160056000600660008b6001600160a01b03166001600160a01b031681526020019081526020016000208681548110610d9657610d966111b1565b9060005260206000200154815260200190815260200160002060010154815260200160056000600660008b6001600160a01b03166001600160a01b031681526020019081526020016000208681548110610df257610df26111b1565b9060005260206000200154815260200190815260200160002060030154815260200182815250838381518110610e2a57610e2a6111b1565b6020026020010181905250508080610e419061121f565b915050610cc2565b509392505050565b610e59610e8f565b6001600160a01b038116610e8357604051631e4fbdf760e01b815260006004820152602401610466565b610e8c81610ebc565b50565b6000546001600160a01b03163314610ad35760405163118cdaa760e01b8152336004820152602401610466565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80356001600160a01b0381168114610f2357600080fd5b919050565b600060208284031215610f3a57600080fd5b610bd982610f0c565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610f8257610f82610f43565b604052919050565b60006020808385031215610f9d57600080fd5b823567ffffffffffffffff80821115610fb557600080fd5b818501915085601f830112610fc957600080fd5b813581811115610fdb57610fdb610f43565b8060051b9150610fec848301610f59565b818152918301840191848101908884111561100657600080fd5b938501935b838510156110245784358252938501939085019061100b565b98975050505050505050565b6000806000806080858703121561104657600080fd5b61104f85610f0c565b9350602061105e818701610f0c565b935060408601359250606086013567ffffffffffffffff8082111561108257600080fd5b818801915088601f83011261109657600080fd5b8135818111156110a8576110a8610f43565b6110ba601f8201601f19168501610f59565b915080825289848285010111156110d057600080fd5b808484018584013760008482840101525080935050505092959194509250565b60006020828403121561110257600080fd5b5035919050565b6020808252825182820181905260009190848201906040850190845b8181101561114157835183529284019291840191600101611125565b50909695505050505050565b602080825282518282018190526000919060409081850190868401855b828110156111a45781518051855286810151878601528581015186860152606090810151908501526080909301929085019060010161116a565b5091979650505050505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b808201808211156111f0576111f06111c7565b92915050565b818103818111156111f0576111f06111c7565b634e487b7160e01b600052603160045260246000fd5b600060018201611231576112316111c7565b5060010190565b80820281158282048414176111f0576111f06111c756fea2646970667358221220b47f0c9ab8091d2a96a126b1b8f38d1975cf28df7bfb0944ebeefe9eca4d53a564736f6c63430008140033

Deployed Bytecode

0x6080604052600436106101015760003560e01c80637b0a47ee11610095578063b1907abb11610064578063b1907abb146102d3578063c0d8012c146102f3578063cf797f1014610313578063d2de0c5414610340578063f2fde38b146103b657600080fd5b80637b0a47ee1461023e578063842e2981146102545780638da5cb5b146102815780639e447fc6146102b357600080fd5b806320b4a532116100d157806320b4a532146101d35780632e1a7d4d146101f357806340f02ab614610213578063715018a61461022957600080fd5b8062f1197c1461010d57806303702ac81461014d578063150b7a021461016f578063182c5744146101b357600080fd5b3661010857005b600080fd5b34801561011957600080fd5b5061013a610128366004610f28565b60046020526000908152604090205481565b6040519081526020015b60405180910390f35b34801561015957600080fd5b5061016d610168366004610f8a565b6103d6565b005b34801561017b57600080fd5b5061019a61018a366004611030565b630a85bd0160e11b949350505050565b6040516001600160e01b03199091168152602001610144565b3480156101bf57600080fd5b5061016d6101ce366004610f8a565b6105eb565b3480156101df57600080fd5b5061016d6101ee366004610f28565b6107fd565b3480156101ff57600080fd5b5061016d61020e3660046110f0565b61086c565b34801561021f57600080fd5b5061013a60035481565b34801561023557600080fd5b5061016d610ac1565b34801561024a57600080fd5b5061013a60025481565b34801561026057600080fd5b5061027461026f366004610f28565b610ad5565b6040516101449190611109565b34801561028d57600080fd5b506000546001600160a01b03165b6040516001600160a01b039091168152602001610144565b3480156102bf57600080fd5b5061016d6102ce3660046110f0565b610b41565b3480156102df57600080fd5b5060015461029b906001600160a01b031681565b3480156102ff57600080fd5b5061013a61030e3660046110f0565b610b89565b34801561031f57600080fd5b5061033361032e366004610f28565b610be0565b604051610144919061114d565b34801561034c57600080fd5b5061038c61035b3660046110f0565b60056020526000908152604090208054600182015460028301546003909301546001600160a01b0390921692909184565b604080516001600160a01b0390951685526020850193909352918301526060820152608001610144565b3480156103c257600080fd5b5061016d6103d1366004610f28565b610e51565b6000805b825181101561052257336001600160a01b031660056000858481518110610403576104036111b1565b6020908102919091018101518252810191909152604001600020546001600160a01b03161461046f5760405162461bcd60e51b815260206004820152601360248201527231b0b63632b91034b9903737ba1037bbb732b960691b60448201526064015b60405180910390fd5b6000610493848381518110610486576104866111b1565b6020026020010151610b89565b905061049f81846111dd565b925042600560008685815181106104b8576104b86111b1565b602002602001015181526020019081526020016000206002018190555080600560008685815181106104ec576104ec6111b1565b60200260200101518152602001908152602001600020600301600082825461051491906111dd565b9091555050506001016103da565b5033600090815260046020526040812080548392906105429084906111dd565b909155505080156105e757604051600090339083908381818185875af1925050503d806000811461058f576040519150601f19603f3d011682016040523d82523d6000602084013e610594565b606091505b50509050806105e55760405162461bcd60e51b815260206004820152601760248201527f526577617264207472616e73666572206661696c65642e0000000000000000006044820152606401610466565b505b5050565b805160000361062a5760405162461bcd60e51b815260206004820152600b60248201526a0f4cae4de40d8cadccee8d60ab1b6044820152606401610466565b60005b81518110156105e75760015482516001600160a01b03909116906323b872dd9033903090869086908110610663576106636111b1565b60209081029190910101516040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401600060405180830381600087803b1580156106bd57600080fd5b505af11580156106d1573d6000803e3d6000fd5b5050505033600560008484815181106106ec576106ec6111b1565b6020026020010151815260200190815260200160002060000160006101000a8154816001600160a01b0302191690836001600160a01b031602179055504260056000848481518110610740576107406111b1565b602002602001015181526020019081526020016000206002018190555060066000336001600160a01b03166001600160a01b03168152602001908152602001600020828281518110610794576107946111b1565b6020908102919091018101518254600181018455600093845291832090910155600354835142909101916005918590859081106107d3576107d36111b1565b6020026020010151815260200190815260200160002060010181905550808060010191505061062d565b610805610e8f565b6001600160a01b03811661084a5760405162461bcd60e51b815260206004820152600c60248201526b7a65726f206164647265737360a01b6044820152606401610466565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000818152600560205260409020546001600160a01b031633146108c85760405162461bcd60e51b815260206004820152601360248201527231b0b63632b91034b9903737ba1037bbb732b960691b6044820152606401610466565b60008181526005602052604090206001015442116109285760405162461bcd60e51b815260206004820152601860248201527f7374616b65206475726174696f6e206e6f7420656e64656400000000000000006044820152606401610466565b6001546040516323b872dd60e01b8152306004820152336024820152604481018390526001600160a01b03909116906323b872dd90606401600060405180830381600087803b15801561097a57600080fd5b505af115801561098e573d6000803e3d6000fd5b505050600082815260056020908152604080832080546001600160a01b03191681556001810184905560028101849055600301839055338352600690915281208054909250905b81811015610a8557838382815481106109f0576109f06111b1565b906000526020600020015403610a735782610a0c6001846111f6565b81548110610a1c57610a1c6111b1565b9060005260206000200154838281548110610a3957610a396111b1565b906000526020600020018190555082805480610a5757610a57611209565b6001900381819060005260206000200160009055905550505050565b80610a7d8161121f565b9150506109d5565b5060405162461bcd60e51b815260206004820152601060248201526f139195081251081b9bdd08199bdd5b9960821b6044820152606401610466565b610ac9610e8f565b610ad36000610ebc565b565b6001600160a01b038116600090815260066020908152604091829020805483518184028101840190945280845260609392830182828015610b3557602002820191906000526020600020905b815481526020019060010190808311610b21575b50505050509050919050565b610b49610e8f565b80600003610b845760405162461bcd60e51b81526020600482015260086024820152677a65726f2072707360c01b6044820152606401610466565b600255565b6000818152600560205260408120546001600160a01b0316610bad57506000919050565b600082815260056020526040812060020154610bc990426111f6565b905060025481610bd99190611238565b9392505050565b60606001600160a01b038216610c275760405162461bcd60e51b815260206004820152600c60248201526b7a65726f206164647265737360a01b6044820152606401610466565b6001600160a01b038216600090815260066020526040812054908167ffffffffffffffff811115610c5a57610c5a610f43565b604051908082528060200260200182016040528015610cb657816020015b610ca36040518060800160405280600081526020016000815260200160008152602001600081525090565b815260200190600190039081610c785790505b5090508115610bd95760005b82811015610e49576001600160a01b03851660009081526006602052604081208054610d09919084908110610cf957610cf96111b1565b9060005260206000200154610b89565b9050604051806080016040528060066000896001600160a01b03166001600160a01b031681526020019081526020016000208481548110610d4c57610d4c6111b1565b9060005260206000200154815260200160056000600660008b6001600160a01b03166001600160a01b031681526020019081526020016000208681548110610d9657610d966111b1565b9060005260206000200154815260200190815260200160002060010154815260200160056000600660008b6001600160a01b03166001600160a01b031681526020019081526020016000208681548110610df257610df26111b1565b9060005260206000200154815260200190815260200160002060030154815260200182815250838381518110610e2a57610e2a6111b1565b6020026020010181905250508080610e419061121f565b915050610cc2565b509392505050565b610e59610e8f565b6001600160a01b038116610e8357604051631e4fbdf760e01b815260006004820152602401610466565b610e8c81610ebc565b50565b6000546001600160a01b03163314610ad35760405163118cdaa760e01b8152336004820152602401610466565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80356001600160a01b0381168114610f2357600080fd5b919050565b600060208284031215610f3a57600080fd5b610bd982610f0c565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610f8257610f82610f43565b604052919050565b60006020808385031215610f9d57600080fd5b823567ffffffffffffffff80821115610fb557600080fd5b818501915085601f830112610fc957600080fd5b813581811115610fdb57610fdb610f43565b8060051b9150610fec848301610f59565b818152918301840191848101908884111561100657600080fd5b938501935b838510156110245784358252938501939085019061100b565b98975050505050505050565b6000806000806080858703121561104657600080fd5b61104f85610f0c565b9350602061105e818701610f0c565b935060408601359250606086013567ffffffffffffffff8082111561108257600080fd5b818801915088601f83011261109657600080fd5b8135818111156110a8576110a8610f43565b6110ba601f8201601f19168501610f59565b915080825289848285010111156110d057600080fd5b808484018584013760008482840101525080935050505092959194509250565b60006020828403121561110257600080fd5b5035919050565b6020808252825182820181905260009190848201906040850190845b8181101561114157835183529284019291840191600101611125565b50909695505050505050565b602080825282518282018190526000919060409081850190868401855b828110156111a45781518051855286810151878601528581015186860152606090810151908501526080909301929085019060010161116a565b5091979650505050505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b808201808211156111f0576111f06111c7565b92915050565b818103818111156111f0576111f06111c7565b634e487b7160e01b600052603160045260246000fd5b600060018201611231576112316111c7565b5060010190565b80820281158282048414176111f0576111f06111c756fea2646970667358221220b47f0c9ab8091d2a96a126b1b8f38d1975cf28df7bfb0944ebeefe9eca4d53a564736f6c63430008140033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
[ Download: CSV Export  ]
[ 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.