ETH Price: $3,386.76 (+1.17%)

Contract

0x33caA8f6881b20CDeD1d18578D8194Cb62Af737b
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Unstake214139062024-12-16 8:32:597 days ago1734337979IN
0x33caA8f6...b62Af737b
0 ETH0.00092669.57249391
Withdraw Reward210097972024-10-20 22:33:1164 days ago1729463591IN
0x33caA8f6...b62Af737b
0 ETH0.000530389.96999229
Withdraw Reward210002842024-10-19 14:42:4765 days ago1729348967IN
0x33caA8f6...b62Af737b
0 ETH0.0015806129.66177544
Withdraw Reward210002272024-10-19 14:31:2365 days ago1729348283IN
0x33caA8f6...b62Af737b
0 ETH0.0018864726.8376805
Unstake210002212024-10-19 14:30:1165 days ago1729348211IN
0x33caA8f6...b62Af737b
0 ETH0.0015115123.77762653
Unstake210002192024-10-19 14:29:4765 days ago1729348187IN
0x33caA8f6...b62Af737b
0 ETH0.0015660624.6395724
Unstake210002142024-10-19 14:28:4765 days ago1729348127IN
0x33caA8f6...b62Af737b
0 ETH0.0017077726.88356423
Unstake210001732024-10-19 14:20:3565 days ago1729347635IN
0x33caA8f6...b62Af737b
0 ETH0.001331420.96996906
Unstake210001512024-10-19 14:15:5965 days ago1729347359IN
0x33caA8f6...b62Af737b
0 ETH0.001559519.35085223
Withdraw Reward206853602024-09-05 15:43:59109 days ago1725551039IN
0x33caA8f6...b62Af737b
0 ETH0.000373127.01227126
Unstake203540912024-07-21 9:43:11155 days ago1721554991IN
0x33caA8f6...b62Af737b
0 ETH0.000795233.0807297
Withdraw Reward203540532024-07-21 9:35:35155 days ago1721554535IN
0x33caA8f6...b62Af737b
0 ETH0.000339384.82783269
Unstake202653122024-07-09 0:19:11168 days ago1720484351IN
0x33caA8f6...b62Af737b
0 ETH0.000120491.99275632
Unstake202653122024-07-09 0:19:11168 days ago1720484351IN
0x33caA8f6...b62Af737b
0 ETH0.000126651.99275632
Unstake202653102024-07-09 0:18:35168 days ago1720484315IN
0x33caA8f6...b62Af737b
0 ETH0.000119141.97034003
Unstake202653102024-07-09 0:18:35168 days ago1720484315IN
0x33caA8f6...b62Af737b
0 ETH0.000125091.97034003
Unstake202653092024-07-09 0:18:23168 days ago1720484303IN
0x33caA8f6...b62Af737b
0 ETH0.000121162.00373357
Unstake202653092024-07-09 0:18:23168 days ago1720484303IN
0x33caA8f6...b62Af737b
0 ETH0.000127212.00373357
Unstake202653082024-07-09 0:18:11168 days ago1720484291IN
0x33caA8f6...b62Af737b
0 ETH0.000118851.96560296
Unstake202653082024-07-09 0:18:11168 days ago1720484291IN
0x33caA8f6...b62Af737b
0 ETH0.000124791.96560296
Unstake202653072024-07-09 0:17:59168 days ago1720484279IN
0x33caA8f6...b62Af737b
0 ETH0.000137752.27822213
Unstake202653072024-07-09 0:17:59168 days ago1720484279IN
0x33caA8f6...b62Af737b
0 ETH0.000144642.27822213
Unstake202653062024-07-09 0:17:47168 days ago1720484267IN
0x33caA8f6...b62Af737b
0 ETH0.00014692.31381046
Unstake202653052024-07-09 0:17:35168 days ago1720484255IN
0x33caA8f6...b62Af737b
0 ETH0.000136372.25538516
Unstake202653052024-07-09 0:17:35168 days ago1720484255IN
0x33caA8f6...b62Af737b
0 ETH0.000138762.18562243
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
EFStakingPool

Compiler Version
v0.8.3+commit.8d00100c

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 13 : EFStakingPool.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.3;

import "./IERC20UtilityToken.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/utils/math/Math.sol";


contract EFStakingPool is AccessControl, ERC721Holder {
  
  bytes32 public constant BURNER_ROLE = keccak256("BURNER_ROLE");
  bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");

  struct AccountRewardVars {
    uint32 lastUpdated;
    uint128 pointsBalance;
    uint64 totalStaked;
  }

  mapping(address => AccountRewardVars) public accountRewardVars;
  mapping(address => mapping(uint256 => bool)) public stakedNFTs;

  uint256 public rewardEndTime;
  uint256 public rewardRate;
  address public nftContractAddress;
  IERC20UtilityToken public rewardToken;
  
  constructor(uint256 _rewardRate, uint256 _rewardEndTime, address _nftContractAddress, address rewardTokenAddress) {
    _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());
    rewardEndTime = _rewardEndTime;
    rewardRate = _rewardRate;
    nftContractAddress = _nftContractAddress;
    rewardToken = IERC20UtilityToken(rewardTokenAddress);
  }

  modifier onlyOwner() {
    require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "caller is not an owner");
    _;
  }

  modifier onlyBurner() {
    require(hasRole(BURNER_ROLE, _msgSender()), "caller is not a burner");
    _;
  }

  modifier onlyMinter() {
    require(hasRole(MINTER_ROLE, _msgSender()), "caller is not a minter");
    _;
  }

  
  function balanceUpdate(address _owner, uint256 _valueStakedDiff, bool isSubtracted) internal {
    AccountRewardVars memory _rewardVars = accountRewardVars[_owner];

    if (lastTimeRewardApplicable() > _rewardVars.lastUpdated) {
      uint256 reward = calculateReward(_rewardVars.totalStaked, lastTimeRewardApplicable() - _rewardVars.lastUpdated);
      _rewardVars.pointsBalance += uint128(reward);
    }

    if (_valueStakedDiff != 0) {
      if (isSubtracted) {
        _rewardVars.totalStaked -=  uint64(_valueStakedDiff);
      } else {
        _rewardVars.totalStaked +=  uint64(_valueStakedDiff);
      }
    }
    
    _rewardVars.lastUpdated = uint32(block.timestamp);

    accountRewardVars[_owner] = _rewardVars;
  }

  function getStaked(address _owner) 
    public view returns(uint256) {
      return accountRewardVars[_owner].totalStaked;
  }

  function getStakedTokens(address _address, uint256 _cardCount) 
    external view returns (uint256[] memory tokens) {

      uint256[] memory _amounts = new uint256[](_cardCount);
      uint256 count;
      for (uint256 i = 1; i <= _cardCount; i++) {
        bool isStaked = stakedNFTs[_address][i];
        if (isStaked) {
          _amounts[count] = i;
          count++;
        }
      }

      uint256[] memory _amounts2 = new uint256[](count);
      for (uint256 i = 0; i < count; i++) {
        _amounts2[i] = _amounts[i];
      }

      return _amounts2;
  }
  
  function balanceOf(address _owner)
    public view returns(uint256) {
      uint256 reward = 0;
      if (lastTimeRewardApplicable() > accountRewardVars[_owner].lastUpdated) {
        reward = calculateReward(accountRewardVars[_owner].totalStaked, lastTimeRewardApplicable() - accountRewardVars[_owner].lastUpdated);
      }
      return accountRewardVars[_owner].pointsBalance + reward;
  }

  function setReward(uint256 _rewardRate)
    external onlyOwner {
      rewardRate = _rewardRate;
  }

  function setRewardEndTime(uint256 _rewardEndTime)
    external onlyOwner {
    rewardEndTime = _rewardEndTime;
  }

  function lastTimeRewardApplicable() public view returns (uint256) {
    return Math.min(block.timestamp, rewardEndTime);
  }

  function stake(uint256[] memory _tokenId)
    external {

      uint256 addedStakingValue = 0;

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

        IERC721 tokenContract = IERC721(nftContractAddress);

        addedStakingValue += 1;

        tokenContract.safeTransferFrom(_msgSender(), address(this), _tokenId[i]);

        stakedNFTs[_msgSender()][_tokenId[i]] = true;
      }

      balanceUpdate(_msgSender(), addedStakingValue, false);
  }
  
  function unstake(uint256[] memory _tokenId)
    external {

      uint256 subtractedStakingValue = 0;

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

        require(stakedNFTs[_msgSender()][_tokenId[i]], 'not the owner');

        IERC721 tokenContract = IERC721(nftContractAddress);

        subtractedStakingValue += 1;

        tokenContract.safeTransferFrom(address(this), _msgSender(), _tokenId[i]);

        stakedNFTs[_msgSender()][_tokenId[i]] = false;
      }

      balanceUpdate(_msgSender(), subtractedStakingValue, true);
  }
  
  function mint(address[] calldata _addresses, uint256[] calldata _points) 
    external onlyMinter {
      for (uint256 i = 0; i < _addresses.length; i++) {
        accountRewardVars[_addresses[i]].pointsBalance += uint128(_points[i]);
      }
  }
  
  function burn(address _owner, uint256 _amount) 
    external onlyBurner {
      balanceUpdate(_owner, 0, false);
      accountRewardVars[_owner].pointsBalance -= uint128(_amount);
  }
    
  function calculateReward(uint256 _amount, uint256 _duration) 
    private view returns(uint256) {
      uint256 rewardPerToken = _amount > 3 ? 45 : (_amount == 3 ? 40 : (_amount == 2 ? 36 : 30));
      return (rewardPerToken * _duration * rewardRate * _amount) / 30;
  }

  function withdrawReward(uint256 _amount) 
    external {
      balanceUpdate(_msgSender(), 0, false);
      accountRewardVars[_msgSender()].pointsBalance -= uint128(_amount);
      rewardToken.mint(_msgSender(), _amount);
  }

  function supportsInterface(bytes4 interfaceId) 
    public virtual override(AccessControl) view returns (bool) {
        return interfaceId == type(IERC721Receiver).interfaceId
            || interfaceId == type(IAccessControl).interfaceId
            || super.supportsInterface(interfaceId);
  }

}

File 2 of 13 : IERC20UtilityToken.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.3;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

interface IERC20UtilityToken is IERC20 {
  function mint(address to, uint256 amount) external;
  function burn(address account, uint256 amount) external;
}

File 3 of 13 : Math.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a >= b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow.
        return (a & b) + (a ^ b) / 2;
    }

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds up instead
     * of rounding down.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a / b + (a % b == 0 ? 0 : 1);
    }
}

File 4 of 13 : IERC165.sol
// SPDX-License-Identifier: MIT

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 5 of 13 : ERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

File 6 of 13 : Strings.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _HEX_SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }
}

File 7 of 13 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

File 8 of 13 : ERC721Holder.sol
// SPDX-License-Identifier: MIT

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 9 of 13 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

File 10 of 13 : IERC721.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

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

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

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

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

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

File 11 of 13 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

File 12 of 13 : IAccessControl.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {AccessControl-_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) external;
}

File 13 of 13 : AccessControl.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IAccessControl.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it.
 */
abstract contract AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
        mapping(address => bool) members;
        bytes32 adminRole;
    }

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with a standardized message including the required role.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     *
     * _Available since v4.1._
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role, _msgSender());
        _;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);
    }

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view override returns (bool) {
        return _roles[role].members[account];
    }

    /**
     * @dev Revert with a standard message if `account` is missing `role`.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     */
    function _checkRole(bytes32 role, address account) internal view {
        if (!hasRole(role, account)) {
            revert(
                string(
                    abi.encodePacked(
                        "AccessControl: account ",
                        Strings.toHexString(uint160(account), 20),
                        " is missing role ",
                        Strings.toHexString(uint256(role), 32)
                    )
                )
            );
        }
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view override returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) public virtual override {
        require(account == _msgSender(), "AccessControl: can only renounce roles for self");

        _revokeRole(role, account);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event. Note that unlike {grantRole}, this function doesn't perform any
     * checks on the calling account.
     *
     * [WARNING]
     * ====
     * This function should only be called from the constructor when setting
     * up the initial roles for the system.
     *
     * Using this function in any other way is effectively circumventing the admin
     * system imposed by {AccessControl}.
     * ====
     */
    function _setupRole(bytes32 role, address account) internal virtual {
        _grantRole(role, account);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        bytes32 previousAdminRole = getRoleAdmin(role);
        _roles[role].adminRole = adminRole;
        emit RoleAdminChanged(role, previousAdminRole, adminRole);
    }

    function _grantRole(bytes32 role, address account) private {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    function _revokeRole(bytes32 role, address account) private {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"uint256","name":"_rewardRate","type":"uint256"},{"internalType":"uint256","name":"_rewardEndTime","type":"uint256"},{"internalType":"address","name":"_nftContractAddress","type":"address"},{"internalType":"address","name":"rewardTokenAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"inputs":[],"name":"BURNER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINTER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"accountRewardVars","outputs":[{"internalType":"uint32","name":"lastUpdated","type":"uint32"},{"internalType":"uint128","name":"pointsBalance","type":"uint128"},{"internalType":"uint64","name":"totalStaked","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"getStaked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"uint256","name":"_cardCount","type":"uint256"}],"name":"getStakedTokens","outputs":[{"internalType":"uint256[]","name":"tokens","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastTimeRewardApplicable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_addresses","type":"address[]"},{"internalType":"uint256[]","name":"_points","type":"uint256[]"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"nftContractAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"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":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardEndTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardToken","outputs":[{"internalType":"contract IERC20UtilityToken","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rewardRate","type":"uint256"}],"name":"setReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rewardEndTime","type":"uint256"}],"name":"setRewardEndTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_tokenId","type":"uint256[]"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"stakedNFTs","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_tokenId","type":"uint256[]"}],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawReward","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b5060405162001c6538038062001c6583398101604081905262000034916200014c565b620000416000336200007f565b600392909255600492909255600580546001600160a01b039384166001600160a01b0319918216179091556006805492909316911617905562000196565b6200008b82826200008f565b5050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff166200008b576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620000eb3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b80516001600160a01b03811681146200014757600080fd5b919050565b6000806000806080858703121562000162578384fd5b84519350602085015192506200017b604086016200012f565b91506200018b606086016200012f565b905092959194509250565b611abf80620001a66000396000f3fe608060405234801561001057600080fd5b50600436106101a95760003560e01c80637b0a47ee116100f9578063d539139311610097578063e467f7e011610071578063e467f7e014610461578063f5bfbd1314610474578063f706004814610494578063f7c618c1146104c2576101a9565b8063d539139314610414578063d547741f1461043b578063e449f3411461044e576101a9565b806391d14854116100d357806391d14854146103bb5780639dc29fac146103ce578063a217fddf146103e1578063aae282e1146103e9576101a9565b80637b0a47ee1461032e57806380faa57d146103375780638117fbc71461033f576101a9565b8063293be4561161016657806337e9f64a1161014057806337e9f64a146102c6578063399080ec146102cf578063523a3f081461030857806370a082311461031b576101a9565b8063293be4561461028d5780632f2ff15d146102a057806336568abe146102b3576101a9565b8063018413e7146101ae57806301ffc9a7146101c35780630fbf0a93146101eb578063150b7a02146101fe578063248a9ca314610235578063282c51f314610266575b600080fd5b6101c16101bc366004611771565b6104d5565b005b6101d66101d13660046117b4565b61052f565b60405190151581526020015b60405180910390f35b6101c16101f93660046116ca565b610577565b61021c61020c366004611582565b630a85bd0160e11b949350505050565b6040516001600160e01b031990911681526020016101e2565b610258610243366004611771565b60009081526020819052604090206001015490565b6040519081526020016101e2565b6102587f3c11d16cbaffd01df69ce1c404f6340ee057498f5f00246190ea54220576a84881565b6101c161029b366004611771565b6106e1565b6101c16102ae366004611789565b610736565b6101c16102c1366004611789565b610762565b61025860035481565b6102586102dd366004611568565b6001600160a01b0316600090815260016020526040902054600160a01b90046001600160401b031690565b6101c1610316366004611771565b6107dc565b610258610329366004611568565b6108b8565b61025860045481565b610258610970565b61038861034d366004611568565b60016020526000908152604090205463ffffffff811690600160201b81046001600160801b031690600160a01b90046001600160401b031683565b6040805163ffffffff90941684526001600160801b0390921660208401526001600160401b0316908201526060016101e2565b6101d66103c9366004611789565b610983565b6101c16103dc366004611639565b6109ac565b610258600081565b6005546103fc906001600160a01b031681565b6040516001600160a01b0390911681526020016101e2565b6102587f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b6101c1610449366004611789565b610a8a565b6101c161045c3660046116ca565b610ab0565b6101c161046f366004611662565b610ca4565b610487610482366004611639565b610dee565b6040516101e29190611851565b6101d66104a2366004611639565b600260209081526000928352604080842090915290825290205460ff1681565b6006546103fc906001600160a01b031681565b6104e06000336103c9565b61052a5760405162461bcd60e51b815260206004820152601660248201527531b0b63632b91034b9903737ba1030b71037bbb732b960511b60448201526064015b60405180910390fd5b600355565b60006001600160e01b03198216630a85bd0160e11b148061056057506001600160e01b03198216637965db0b60e01b145b8061056f575061056f82610f99565b90505b919050565b6000805b82518110156106d0576005546001600160a01b031661059b600184611923565b92506001600160a01b0381166342842e0e33308786815181106105ce57634e487b7160e01b600052603260045260246000fd5b60209081029190910101516040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401600060405180830381600087803b15801561062857600080fd5b505af115801561063c573d6000803e3d6000fd5b5050505060016002600061064d3390565b6001600160a01b03166001600160a01b03168152602001908152602001600020600086858151811061068f57634e487b7160e01b600052603260045260246000fd5b6020026020010151815260200190815260200160002060006101000a81548160ff0219169083151502179055505080806106c890611a42565b91505061057b565b506106dd33826000610fce565b5050565b6106ec6000336103c9565b6107315760405162461bcd60e51b815260206004820152601660248201527531b0b63632b91034b9903737ba1030b71037bbb732b960511b6044820152606401610521565b600455565b60008281526020819052604090206001015461075381335b611152565b61075d83836111b6565b505050565b6001600160a01b03811633146107d25760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610521565b6106dd828261123a565b6107e833600080610fce565b336000908152600160205260409020805482919060049061081a908490600160201b90046001600160801b031661199c565b82546001600160801b039182166101009390930a9283029190920219909116179055506006546001600160a01b03166340c10f196108553390565b6040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260248101849052604401600060405180830381600087803b15801561089d57600080fd5b505af11580156108b1573d6000803e3d6000fd5b5050505050565b6001600160a01b038116600090815260016020526040812054819063ffffffff166108e1610970565b1115610935576001600160a01b038316600090815260016020526040902054610932906001600160401b03600160a01b8204169063ffffffff16610923610970565b61092d91906119c4565b61129f565b90505b6001600160a01b038316600090815260016020526040902054610969908290600160201b90046001600160801b0316611923565b9392505050565b600061097e42600354611311565b905090565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6109d67f3c11d16cbaffd01df69ce1c404f6340ee057498f5f00246190ea54220576a848336103c9565b610a1b5760405162461bcd60e51b815260206004820152601660248201527531b0b63632b91034b9903737ba103090313ab93732b960511b6044820152606401610521565b610a2782600080610fce565b6001600160a01b03821660009081526001602052604090208054829190600490610a62908490600160201b90046001600160801b031661199c565b92506101000a8154816001600160801b0302191690836001600160801b031602179055505050565b600082815260208190526040902060010154610aa6813361074e565b61075d838361123a565b6000805b8251811015610c97573360009081526002602052604081208451909190859084908110610af157634e487b7160e01b600052603260045260246000fd5b60209081029190910181015182528101919091526040016000205460ff16610b4b5760405162461bcd60e51b815260206004820152600d60248201526c3737ba103a34329037bbb732b960991b6044820152606401610521565b6005546001600160a01b0316610b62600184611923565b92506001600160a01b0381166342842e0e3033878681518110610b9557634e487b7160e01b600052603260045260246000fd5b60209081029190910101516040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401600060405180830381600087803b158015610bef57600080fd5b505af1158015610c03573d6000803e3d6000fd5b50505050600060026000610c143390565b6001600160a01b03166001600160a01b031681526020019081526020016000206000868581518110610c5657634e487b7160e01b600052603260045260246000fd5b6020026020010151815260200190815260200160002060006101000a81548160ff021916908315150217905550508080610c8f90611a42565b915050610ab4565b506106dd33826001610fce565b610cce7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6336103c9565b610d135760405162461bcd60e51b815260206004820152601660248201527531b0b63632b91034b9903737ba10309036b4b73a32b960511b6044820152606401610521565b60005b838110156108b157828282818110610d3e57634e487b7160e01b600052603260045260246000fd5b9050602002013560016000878785818110610d6957634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610d7e9190611568565b6001600160a01b0316815260208101919091526040016000208054600490610db7908490600160201b90046001600160801b03166118f8565b92506101000a8154816001600160801b0302191690836001600160801b031602179055508080610de690611a42565b915050610d16565b60606000826001600160401b03811115610e1857634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610e41578160200160208202803683370190505b509050600060015b848111610eca576001600160a01b038616600090815260026020908152604080832084845290915290205460ff168015610eb75781848481518110610e9e57634e487b7160e01b600052603260045260246000fd5b602090810291909101015282610eb381611a42565b9350505b5080610ec281611a42565b915050610e49565b506000816001600160401b03811115610ef357634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610f1c578160200160208202803683370190505b50905060005b82811015610f8f57838181518110610f4a57634e487b7160e01b600052603260045260246000fd5b6020026020010151828281518110610f7257634e487b7160e01b600052603260045260246000fd5b602090810291909101015280610f8781611a42565b915050610f22565b5095945050505050565b60006001600160e01b03198216637965db0b60e01b148061056f57506301ffc9a760e01b6001600160e01b031983161461056f565b6001600160a01b0383166000908152600160209081526040918290208251606081018452905463ffffffff8116808352600160201b82046001600160801b031693830193909352600160a01b90046001600160401b031692810192909252611034610970565b111561108257600061106082604001516001600160401b0316836000015163ffffffff16610923610970565b9050808260200181815161107491906118f8565b6001600160801b0316905250505b82156110d05781156110b15782816040018181516110a091906119db565b6001600160401b03169052506110d0565b82816040018181516110c3919061193b565b6001600160401b03169052505b63ffffffff42811682526001600160a01b03909416600090815260016020908152604091829020835181549285015193909401516001600160401b0316600160a01b0267ffffffffffffffff60a01b196001600160801b03909416600160201b026001600160a01b031990931694909716939093171716939093179092555050565b61115c8282610983565b6106dd57611174816001600160a01b03166014611327565b61117f836020611327565b6040516020016111909291906117dc565b60408051601f198184030181529082905262461bcd60e51b825261052191600401611895565b6111c08282610983565b6106dd576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556111f63390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6112448282610983565b156106dd576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600080600384116112d157836003146112c957836002146112c157601e6112c4565b60245b6112cc565b60285b6112d4565b602d5b60ff169050601e8460045485846112eb919061197d565b6112f5919061197d565b6112ff919061197d565b611309919061195d565b949350505050565b60008183106113205781610969565b5090919050565b6060600061133683600261197d565b611341906002611923565b6001600160401b0381111561136657634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015611390576020820181803683370190505b509050600360fc1b816000815181106113b957634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106113f657634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600061141a84600261197d565b611425906001611923565b90505b60018111156114b9576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061146757634e487b7160e01b600052603260045260246000fd5b1a60f81b82828151811061148b57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c936114b281611a2b565b9050611428565b5083156109695760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610521565b80356001600160a01b038116811461057257600080fd5b60008083601f840112611530578182fd5b5081356001600160401b03811115611546578182fd5b6020830191508360208260051b850101111561156157600080fd5b9250929050565b600060208284031215611579578081fd5b61096982611508565b60008060008060808587031215611597578283fd5b6115a085611508565b935060206115af818701611508565b93506040860135925060608601356001600160401b03808211156115d1578384fd5b818801915088601f8301126115e4578384fd5b8135818111156115f6576115f6611a73565b611608601f8201601f191685016118c8565b9150808252898482850101111561161d578485fd5b8084840185840137810190920192909252939692955090935050565b6000806040838503121561164b578182fd5b61165483611508565b946020939093013593505050565b60008060008060408587031215611677578384fd5b84356001600160401b038082111561168d578586fd5b6116998883890161151f565b909650945060208701359150808211156116b1578384fd5b506116be8782880161151f565b95989497509550505050565b600060208083850312156116dc578182fd5b82356001600160401b03808211156116f2578384fd5b818501915085601f830112611705578384fd5b81358181111561171757611717611a73565b8060051b91506117288483016118c8565b8181528481019084860184860187018a1015611742578788fd5b8795505b83861015611764578035835260019590950194918601918601611746565b5098975050505050505050565b600060208284031215611782578081fd5b5035919050565b6000806040838503121561179b578182fd5b823591506117ab60208401611508565b90509250929050565b6000602082840312156117c5578081fd5b81356001600160e01b031981168114610969578182fd5b60007f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000825283516118148160178501602088016119fb565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516118458160288401602088016119fb565b01602801949350505050565b6020808252825182820181905260009190848201906040850190845b818110156118895783518352928401929184019160010161186d565b50909695505050505050565b60006020825282518060208401526118b48160408501602087016119fb565b601f01601f19169190910160400192915050565b604051601f8201601f191681016001600160401b03811182821017156118f0576118f0611a73565b604052919050565b60006001600160801b0380831681851680830382111561191a5761191a611a5d565b01949350505050565b6000821982111561193657611936611a5d565b500190565b60006001600160401b0380831681851680830382111561191a5761191a611a5d565b60008261197857634e487b7160e01b81526012600452602481fd5b500490565b600081600019048311821515161561199757611997611a5d565b500290565b60006001600160801b03838116908316818110156119bc576119bc611a5d565b039392505050565b6000828210156119d6576119d6611a5d565b500390565b60006001600160401b03838116908316818110156119bc576119bc611a5d565b60005b83811015611a165781810151838201526020016119fe565b83811115611a25576000848401525b50505050565b600081611a3a57611a3a611a5d565b506000190190565b6000600019821415611a5657611a56611a5d565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fdfea2646970667358221220a1396c9871789b097cc53762825b1a283fb09d870fdb20ff32903c1215fa352664736f6c6343000803003300000000000000000000000000000000000000000000000000000a86cc92e3a400000000000000000000000000000000000000000000000000000f761ef61000000000000000000000000000d49eccf40689095ad9e8334d8407f037e2cf5e420000000000000000000000009874ddf774aafd901f5e3b3a3d871abb8c349001

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101a95760003560e01c80637b0a47ee116100f9578063d539139311610097578063e467f7e011610071578063e467f7e014610461578063f5bfbd1314610474578063f706004814610494578063f7c618c1146104c2576101a9565b8063d539139314610414578063d547741f1461043b578063e449f3411461044e576101a9565b806391d14854116100d357806391d14854146103bb5780639dc29fac146103ce578063a217fddf146103e1578063aae282e1146103e9576101a9565b80637b0a47ee1461032e57806380faa57d146103375780638117fbc71461033f576101a9565b8063293be4561161016657806337e9f64a1161014057806337e9f64a146102c6578063399080ec146102cf578063523a3f081461030857806370a082311461031b576101a9565b8063293be4561461028d5780632f2ff15d146102a057806336568abe146102b3576101a9565b8063018413e7146101ae57806301ffc9a7146101c35780630fbf0a93146101eb578063150b7a02146101fe578063248a9ca314610235578063282c51f314610266575b600080fd5b6101c16101bc366004611771565b6104d5565b005b6101d66101d13660046117b4565b61052f565b60405190151581526020015b60405180910390f35b6101c16101f93660046116ca565b610577565b61021c61020c366004611582565b630a85bd0160e11b949350505050565b6040516001600160e01b031990911681526020016101e2565b610258610243366004611771565b60009081526020819052604090206001015490565b6040519081526020016101e2565b6102587f3c11d16cbaffd01df69ce1c404f6340ee057498f5f00246190ea54220576a84881565b6101c161029b366004611771565b6106e1565b6101c16102ae366004611789565b610736565b6101c16102c1366004611789565b610762565b61025860035481565b6102586102dd366004611568565b6001600160a01b0316600090815260016020526040902054600160a01b90046001600160401b031690565b6101c1610316366004611771565b6107dc565b610258610329366004611568565b6108b8565b61025860045481565b610258610970565b61038861034d366004611568565b60016020526000908152604090205463ffffffff811690600160201b81046001600160801b031690600160a01b90046001600160401b031683565b6040805163ffffffff90941684526001600160801b0390921660208401526001600160401b0316908201526060016101e2565b6101d66103c9366004611789565b610983565b6101c16103dc366004611639565b6109ac565b610258600081565b6005546103fc906001600160a01b031681565b6040516001600160a01b0390911681526020016101e2565b6102587f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b6101c1610449366004611789565b610a8a565b6101c161045c3660046116ca565b610ab0565b6101c161046f366004611662565b610ca4565b610487610482366004611639565b610dee565b6040516101e29190611851565b6101d66104a2366004611639565b600260209081526000928352604080842090915290825290205460ff1681565b6006546103fc906001600160a01b031681565b6104e06000336103c9565b61052a5760405162461bcd60e51b815260206004820152601660248201527531b0b63632b91034b9903737ba1030b71037bbb732b960511b60448201526064015b60405180910390fd5b600355565b60006001600160e01b03198216630a85bd0160e11b148061056057506001600160e01b03198216637965db0b60e01b145b8061056f575061056f82610f99565b90505b919050565b6000805b82518110156106d0576005546001600160a01b031661059b600184611923565b92506001600160a01b0381166342842e0e33308786815181106105ce57634e487b7160e01b600052603260045260246000fd5b60209081029190910101516040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401600060405180830381600087803b15801561062857600080fd5b505af115801561063c573d6000803e3d6000fd5b5050505060016002600061064d3390565b6001600160a01b03166001600160a01b03168152602001908152602001600020600086858151811061068f57634e487b7160e01b600052603260045260246000fd5b6020026020010151815260200190815260200160002060006101000a81548160ff0219169083151502179055505080806106c890611a42565b91505061057b565b506106dd33826000610fce565b5050565b6106ec6000336103c9565b6107315760405162461bcd60e51b815260206004820152601660248201527531b0b63632b91034b9903737ba1030b71037bbb732b960511b6044820152606401610521565b600455565b60008281526020819052604090206001015461075381335b611152565b61075d83836111b6565b505050565b6001600160a01b03811633146107d25760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610521565b6106dd828261123a565b6107e833600080610fce565b336000908152600160205260409020805482919060049061081a908490600160201b90046001600160801b031661199c565b82546001600160801b039182166101009390930a9283029190920219909116179055506006546001600160a01b03166340c10f196108553390565b6040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260248101849052604401600060405180830381600087803b15801561089d57600080fd5b505af11580156108b1573d6000803e3d6000fd5b5050505050565b6001600160a01b038116600090815260016020526040812054819063ffffffff166108e1610970565b1115610935576001600160a01b038316600090815260016020526040902054610932906001600160401b03600160a01b8204169063ffffffff16610923610970565b61092d91906119c4565b61129f565b90505b6001600160a01b038316600090815260016020526040902054610969908290600160201b90046001600160801b0316611923565b9392505050565b600061097e42600354611311565b905090565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6109d67f3c11d16cbaffd01df69ce1c404f6340ee057498f5f00246190ea54220576a848336103c9565b610a1b5760405162461bcd60e51b815260206004820152601660248201527531b0b63632b91034b9903737ba103090313ab93732b960511b6044820152606401610521565b610a2782600080610fce565b6001600160a01b03821660009081526001602052604090208054829190600490610a62908490600160201b90046001600160801b031661199c565b92506101000a8154816001600160801b0302191690836001600160801b031602179055505050565b600082815260208190526040902060010154610aa6813361074e565b61075d838361123a565b6000805b8251811015610c97573360009081526002602052604081208451909190859084908110610af157634e487b7160e01b600052603260045260246000fd5b60209081029190910181015182528101919091526040016000205460ff16610b4b5760405162461bcd60e51b815260206004820152600d60248201526c3737ba103a34329037bbb732b960991b6044820152606401610521565b6005546001600160a01b0316610b62600184611923565b92506001600160a01b0381166342842e0e3033878681518110610b9557634e487b7160e01b600052603260045260246000fd5b60209081029190910101516040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401600060405180830381600087803b158015610bef57600080fd5b505af1158015610c03573d6000803e3d6000fd5b50505050600060026000610c143390565b6001600160a01b03166001600160a01b031681526020019081526020016000206000868581518110610c5657634e487b7160e01b600052603260045260246000fd5b6020026020010151815260200190815260200160002060006101000a81548160ff021916908315150217905550508080610c8f90611a42565b915050610ab4565b506106dd33826001610fce565b610cce7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6336103c9565b610d135760405162461bcd60e51b815260206004820152601660248201527531b0b63632b91034b9903737ba10309036b4b73a32b960511b6044820152606401610521565b60005b838110156108b157828282818110610d3e57634e487b7160e01b600052603260045260246000fd5b9050602002013560016000878785818110610d6957634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610d7e9190611568565b6001600160a01b0316815260208101919091526040016000208054600490610db7908490600160201b90046001600160801b03166118f8565b92506101000a8154816001600160801b0302191690836001600160801b031602179055508080610de690611a42565b915050610d16565b60606000826001600160401b03811115610e1857634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610e41578160200160208202803683370190505b509050600060015b848111610eca576001600160a01b038616600090815260026020908152604080832084845290915290205460ff168015610eb75781848481518110610e9e57634e487b7160e01b600052603260045260246000fd5b602090810291909101015282610eb381611a42565b9350505b5080610ec281611a42565b915050610e49565b506000816001600160401b03811115610ef357634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610f1c578160200160208202803683370190505b50905060005b82811015610f8f57838181518110610f4a57634e487b7160e01b600052603260045260246000fd5b6020026020010151828281518110610f7257634e487b7160e01b600052603260045260246000fd5b602090810291909101015280610f8781611a42565b915050610f22565b5095945050505050565b60006001600160e01b03198216637965db0b60e01b148061056f57506301ffc9a760e01b6001600160e01b031983161461056f565b6001600160a01b0383166000908152600160209081526040918290208251606081018452905463ffffffff8116808352600160201b82046001600160801b031693830193909352600160a01b90046001600160401b031692810192909252611034610970565b111561108257600061106082604001516001600160401b0316836000015163ffffffff16610923610970565b9050808260200181815161107491906118f8565b6001600160801b0316905250505b82156110d05781156110b15782816040018181516110a091906119db565b6001600160401b03169052506110d0565b82816040018181516110c3919061193b565b6001600160401b03169052505b63ffffffff42811682526001600160a01b03909416600090815260016020908152604091829020835181549285015193909401516001600160401b0316600160a01b0267ffffffffffffffff60a01b196001600160801b03909416600160201b026001600160a01b031990931694909716939093171716939093179092555050565b61115c8282610983565b6106dd57611174816001600160a01b03166014611327565b61117f836020611327565b6040516020016111909291906117dc565b60408051601f198184030181529082905262461bcd60e51b825261052191600401611895565b6111c08282610983565b6106dd576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556111f63390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6112448282610983565b156106dd576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600080600384116112d157836003146112c957836002146112c157601e6112c4565b60245b6112cc565b60285b6112d4565b602d5b60ff169050601e8460045485846112eb919061197d565b6112f5919061197d565b6112ff919061197d565b611309919061195d565b949350505050565b60008183106113205781610969565b5090919050565b6060600061133683600261197d565b611341906002611923565b6001600160401b0381111561136657634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015611390576020820181803683370190505b509050600360fc1b816000815181106113b957634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106113f657634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600061141a84600261197d565b611425906001611923565b90505b60018111156114b9576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061146757634e487b7160e01b600052603260045260246000fd5b1a60f81b82828151811061148b57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c936114b281611a2b565b9050611428565b5083156109695760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610521565b80356001600160a01b038116811461057257600080fd5b60008083601f840112611530578182fd5b5081356001600160401b03811115611546578182fd5b6020830191508360208260051b850101111561156157600080fd5b9250929050565b600060208284031215611579578081fd5b61096982611508565b60008060008060808587031215611597578283fd5b6115a085611508565b935060206115af818701611508565b93506040860135925060608601356001600160401b03808211156115d1578384fd5b818801915088601f8301126115e4578384fd5b8135818111156115f6576115f6611a73565b611608601f8201601f191685016118c8565b9150808252898482850101111561161d578485fd5b8084840185840137810190920192909252939692955090935050565b6000806040838503121561164b578182fd5b61165483611508565b946020939093013593505050565b60008060008060408587031215611677578384fd5b84356001600160401b038082111561168d578586fd5b6116998883890161151f565b909650945060208701359150808211156116b1578384fd5b506116be8782880161151f565b95989497509550505050565b600060208083850312156116dc578182fd5b82356001600160401b03808211156116f2578384fd5b818501915085601f830112611705578384fd5b81358181111561171757611717611a73565b8060051b91506117288483016118c8565b8181528481019084860184860187018a1015611742578788fd5b8795505b83861015611764578035835260019590950194918601918601611746565b5098975050505050505050565b600060208284031215611782578081fd5b5035919050565b6000806040838503121561179b578182fd5b823591506117ab60208401611508565b90509250929050565b6000602082840312156117c5578081fd5b81356001600160e01b031981168114610969578182fd5b60007f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000825283516118148160178501602088016119fb565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516118458160288401602088016119fb565b01602801949350505050565b6020808252825182820181905260009190848201906040850190845b818110156118895783518352928401929184019160010161186d565b50909695505050505050565b60006020825282518060208401526118b48160408501602087016119fb565b601f01601f19169190910160400192915050565b604051601f8201601f191681016001600160401b03811182821017156118f0576118f0611a73565b604052919050565b60006001600160801b0380831681851680830382111561191a5761191a611a5d565b01949350505050565b6000821982111561193657611936611a5d565b500190565b60006001600160401b0380831681851680830382111561191a5761191a611a5d565b60008261197857634e487b7160e01b81526012600452602481fd5b500490565b600081600019048311821515161561199757611997611a5d565b500290565b60006001600160801b03838116908316818110156119bc576119bc611a5d565b039392505050565b6000828210156119d6576119d6611a5d565b500390565b60006001600160401b03838116908316818110156119bc576119bc611a5d565b60005b83811015611a165781810151838201526020016119fe565b83811115611a25576000848401525b50505050565b600081611a3a57611a3a611a5d565b506000190190565b6000600019821415611a5657611a56611a5d565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fdfea2646970667358221220a1396c9871789b097cc53762825b1a283fb09d870fdb20ff32903c1215fa352664736f6c63430008030033

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

00000000000000000000000000000000000000000000000000000a86cc92e3a400000000000000000000000000000000000000000000000000000f761ef61000000000000000000000000000d49eccf40689095ad9e8334d8407f037e2cf5e420000000000000000000000009874ddf774aafd901f5e3b3a3d871abb8c349001

-----Decoded View---------------
Arg [0] : _rewardRate (uint256): 11574074074020
Arg [1] : _rewardEndTime (uint256): 17000000000000
Arg [2] : _nftContractAddress (address): 0xd49eCCf40689095AD9e8334d8407f037E2cF5e42
Arg [3] : rewardTokenAddress (address): 0x9874ddf774AaFD901F5E3B3A3D871ABB8c349001

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000a86cc92e3a4
Arg [1] : 00000000000000000000000000000000000000000000000000000f761ef61000
Arg [2] : 000000000000000000000000d49eccf40689095ad9e8334d8407f037e2cf5e42
Arg [3] : 0000000000000000000000009874ddf774aafd901f5e3b3a3d871abb8c349001


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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

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