ETH Price: $3,109.38 (-0.98%)

Contract

0x03F91b070cAf6A5586D61674E2b2947FB85327f9
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Unstake191100712024-01-29 5:22:59294 days ago1706505779IN
0x03F91b07...FB85327f9
0 ETH0.00104128.90582821
Unstake191100662024-01-29 5:21:59294 days ago1706505719IN
0x03F91b07...FB85327f9
0 ETH0.001353738.37701947
Unstake185579552023-11-12 19:35:59371 days ago1699817759IN
0x03F91b07...FB85327f9
0 ETH0.0047824832.68669599
Unstake185021792023-11-05 0:16:11379 days ago1699143371IN
0x03F91b07...FB85327f9
0 ETH0.00326215.23233206
Unstake181297242023-09-13 20:21:11431 days ago1694636471IN
0x03F91b07...FB85327f9
0 ETH0.0003916414.52097653
Unstake181297232023-09-13 20:20:59431 days ago1694636459IN
0x03F91b07...FB85327f9
0 ETH0.0120015114.51497173
Unstake180213632023-08-29 16:08:11446 days ago1693325291IN
0x03F91b07...FB85327f9
0 ETH0.0163452876.32633899
Unstake178462102023-08-05 3:53:11471 days ago1691207591IN
0x03F91b07...FB85327f9
0 ETH0.0020519514.02444111
Unstake175426332023-06-23 13:42:23513 days ago1687527743IN
0x03F91b07...FB85327f9
0 ETH0.0023893316.33028468
Unstake173406112023-05-26 3:29:35542 days ago1685071775IN
0x03F91b07...FB85327f9
0 ETH0.0055465225.9002085
Unstake173318462023-05-24 21:55:23543 days ago1684965323IN
0x03F91b07...FB85327f9
0 ETH0.0146714434.63946628
Unstake173082962023-05-21 14:20:59546 days ago1684678859IN
0x03F91b07...FB85327f9
0 ETH0.0051794835.40290521
Unstake172915492023-05-19 5:45:11549 days ago1684475111IN
0x03F91b07...FB85327f9
0 ETH0.0074760434.91033879
Unstake172617302023-05-15 0:46:35553 days ago1684111595IN
0x03F91b07...FB85327f9
0 ETH0.000961637.87795253
Unstake172617292023-05-15 0:46:23553 days ago1684111583IN
0x03F91b07...FB85327f9
0 ETH0.0142626940.29487308
Unstake171824522023-05-03 20:05:59564 days ago1683144359IN
0x03F91b07...FB85327f9
0 ETH0.0166559977.77725323
Unstake170335222023-04-12 17:53:23585 days ago1681322003IN
0x03F91b07...FB85327f9
0 ETH0.0043820929.95012099
Unstake170212052023-04-11 0:04:59587 days ago1681171499IN
0x03F91b07...FB85327f9
0 ETH0.0038584318.01746333
Unstake169992662023-04-07 21:28:59590 days ago1680902939IN
0x03F91b07...FB85327f9
0 ETH0.0032912722.49475754
Unstake169809842023-04-05 7:02:59593 days ago1680678179IN
0x03F91b07...FB85327f9
0 ETH0.004124128.18688385
Unstake169770942023-04-04 17:49:11593 days ago1680630551IN
0x03F91b07...FB85327f9
0 ETH0.0036558231.1165506
Unstake169564072023-04-01 19:34:47596 days ago1680377687IN
0x03F91b07...FB85327f9
0 ETH0.0047938122.38530699
Unstake169365232023-03-30 0:33:23599 days ago1680136403IN
0x03F91b07...FB85327f9
0 ETH0.003289422.48194303
Unstake169345602023-03-29 17:55:35599 days ago1680112535IN
0x03F91b07...FB85327f9
0 ETH0.0009883540.00940443
Unstake169345502023-03-29 17:53:23599 days ago1680112403IN
0x03F91b07...FB85327f9
0 ETH0.0058663140.09425726
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:
TokenRewardStaking

Compiler Version
v0.8.12+commit.f00d7308

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 10 : TokenRewardStaking.sol
//
// Made by: Omicron Blockchain Solutions
//          https://omicronblockchain.com
//



// SPDX-License-Identifier: UNLICENSED
pragma solidity =0.8.12;

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

/**
 * @notice Staking contract that allows NFT users
 *         to temporarily lock their NFTs to earn
 *         ERC-20 token rewards
 *
 * The NFTs are locked inside this contract for the
 * duration of the staking period while allowing the
 * user to unstake at any time
 *
 * While the NFTs are staked, they are technically
 * owned by this contract and cannot be moved or placed
 * on any marketplace
 *
 * The contract allows users to stake and unstake multiple
 * NFTs efficiently, in one transaction
 *
 * Staking rewards are paid out to users once
 * they unstake their NFTs and are calculated
 * based on a rounded down number of days the NFTs
 * were staken for
 *
 * Some of the rarest NFTs are boosted by the contract
 * owner to receive bigger staking rewards
 *
 * @dev Features a contract owner that is able to change
 *      the daily rewards, the boosted NFT list and the
 *      boosted NFT daily rewards
 */
contract TokenRewardStaking is ERC721Holder, Ownable {
  using EnumerableSet for EnumerableSet.UintSet;

  /**
   * @notice Stores the ERC-20 token that will
   *         be paid out to NFT holders for staking
   */
  IMintableERC20 public immutable erc20;

  /**
   * @notice Stores the ERC-721 token that will
   *         be staken to receive ERC-20 rewards
   */
  IERC721 public immutable erc721;

  /**
   * @notice Amount of tokens earned for each
   *         day (24 hours) the token was staked for
   *
   * @dev Can be changed by contract owner via setDailyRewards()
   */
  uint128 public dailyRewards;

  /**
   * @notice Some NFTs are boosted to receive bigger token
   *         rewards. This multiplier shows how much more
   *         they will receive
   *
   * E.g. dailyRewardBoostMultiplier = 10 means that the boosted
   * NFTs will receive 10 times the dailyRewards
   *
   * @dev Can be changed by contract owner via setDailyRewardBoostMultiplier()
   */
  uint128 public dailyRewardBoostMultiplier;

  /**
   * @notice Boosted NFTs contained in this list
   *         earn bigger daily rewards
   *
   * @dev We use an EnumerableSet to store this data
   *      instead of an array to be able to query in
   *      O(1) complexity
   *
   ** @dev Can be changed by contract owner via setBoostedNftIds()
   */
  EnumerableSet.UintSet private boostedNftIds;

  /**
   * @notice Stores ownership information for staked
   *         NFTs
   */
  mapping(uint256 => address) public ownerOf;

  /**
   * @notice Stores time staking started for staked
   *         NFTs
   */
  mapping(uint256 => uint256) public stakedAt;

  /**
   * @dev Stores the staked tokens of an address
   */
  mapping(address => EnumerableSet.UintSet) private stakedTokens;

  /**
   * @dev Sets initialization variables which cannot be
   *      changed in the future
   *
   * @param _erc20Address address of erc20 rewards token
   * @param _erc721Address address of erc721 token to be staken for rewards
   * @param _dailyRewards daily amount of tokens to be paid to stakers for every day
   *                       they have staken an NFT
   * @param _boostedNftIds boosted NFTs receive bigger rewards
   * @param _dailyRewardBoostMultiplier multiplier of rewards for boosted NFTs
   */
  constructor(
    address _erc20Address,
    address _erc721Address,
    uint128 _dailyRewards,
    uint256[] memory _boostedNftIds,
    uint128 _dailyRewardBoostMultiplier
  ) {
    erc20 = IMintableERC20(_erc20Address);
    erc721 = IERC721(_erc721Address);
    setDailyRewards(_dailyRewards);
    setBoostedNftIds(_boostedNftIds);
    setDailyRewardBoostMultiplier(_dailyRewardBoostMultiplier);
  }

  /**
   * @dev Emitted every time a token is staked
   *
   * Emitted in stake()
   *
   * @param by address that staked the NFT
   * @param time block timestamp the NFT were staked at
   * @param tokenId token ID of NFT that was staken
   */
  event Staked(address indexed by, uint256 indexed tokenId, uint256 time);

  /**
   * @dev Emitted every time a token is unstaked
   *
   * Emitted in unstake()
   *
   * @param by address that unstaked the NFT
   * @param time block timestamp the NFT were staked at
   * @param tokenId token ID of NFT that was unstaken
   * @param stakedAt when the NFT initially staked at
   * @param reward how many tokens user got for the
   *               staking of the NFT
   */
  event Unstaked(address indexed by, uint256 indexed tokenId, uint256 time, uint256 stakedAt, uint256 reward);

  /**
   * @dev Emitted when the boosted NFT ids is changed
   *
   * Emitted in setDailyReward()
   *
   * @param by address that changed the daily reward
   * @param oldDailyRewards old daily reward
   * @param newDailyRewards new daily reward in effect
   */
  event DailyRewardsChanged(address indexed by, uint128 oldDailyRewards, uint128 newDailyRewards);

  /**
   * @dev Emitted when the boosted NFT daily reward
   *      multiplier is changed
   *
   * Emitted in setDailyRewardBoostMultiplier()
   *
   * @param by address that changed the daily reward boost multiplier
   * @param oldDailyRewardBoostMultiplier old daily reward boost multiplier
   * @param newDailyRewardBoostMultiplier new daily reward boost multiplier
   */
  event DailyRewardBoostMultiplierChanged(
    address indexed by,
    uint128 oldDailyRewardBoostMultiplier,
    uint128 newDailyRewardBoostMultiplier
  );

  /**
   * @dev Emitted when the boosted NFT ids change
   *
   * Emitted in setBoostedNftIds()
   *
   * @param by address that changed the boosted NFT ids
   * @param oldBoostedNftIds old boosted NFT ids
   * @param newBoostedNftIds new boosted NFT ids
   */
  event BoostedNftIdsChanged(address indexed by, uint256[] oldBoostedNftIds, uint256[] newBoostedNftIds);

  /**
   * @notice Checks whether a token is boosted to receive
   *         bigger staking rewards
   *
   * @param _tokenId ID of token to check
   * @return whether the token is boosted
   */
  function isBoostedToken(uint256 _tokenId) public view returns (bool) {
    return boostedNftIds.contains(_tokenId);
  }

  /**
   * @notice Changes the daily reward in erc20 tokens received
   *         for every NFT staked
   *
   * @dev Restricted to contract owner
   *
   * @param _newDailyRewards the new daily reward in erc20 tokens
   */
  function setDailyRewards(uint128 _newDailyRewards) public onlyOwner {
    // Emit event
    emit DailyRewardsChanged(msg.sender, dailyRewards, _newDailyRewards);

    // Change storage variable
    dailyRewards = _newDailyRewards;
  }

  /**
   * @notice Changes the daily reward boost multiplier for
   *         boosted NFTs
   *
   * @dev Restricted to contract owner
   *
   * @param _newDailyRewardBoostMultiplier the new daily reward boost multiplier
   */
  function setDailyRewardBoostMultiplier(uint128 _newDailyRewardBoostMultiplier) public onlyOwner {
    // Emit event
    emit DailyRewardBoostMultiplierChanged(msg.sender, dailyRewardBoostMultiplier, _newDailyRewardBoostMultiplier);

    // Change storage variable
    dailyRewardBoostMultiplier = _newDailyRewardBoostMultiplier;
  }

  /**
   * @notice Changes the boosted NFT ids that receive
   *         a bigger daily reward
   *
   * @dev Restricted to contract owner
   *
   * @param _newBoostedNftIds the new boosted NFT ids
   */
  function setBoostedNftIds(uint256[] memory _newBoostedNftIds) public onlyOwner {
    // Create array to store old boosted NFTs and emit
    // event later
    uint256[] memory oldBoostedNftIds = new uint256[](boostedNftIds.length());

    // Empty boosted NFT ids set
    for (uint256 i = 0; boostedNftIds.length() > 0; i++) {
      // Get a value from the set
      // Since set length is > 0 it is guaranteed
      // that there is a value at index 0
      uint256 value = boostedNftIds.at(0);

      // Remove the value
      boostedNftIds.remove(value);

      // Store the value to the old boosted NFT ids
      // list to later emit event
      oldBoostedNftIds[i] = value;
    }

    // Emit event
    emit BoostedNftIdsChanged(msg.sender, oldBoostedNftIds, _newBoostedNftIds);

    // Enumerate new boosted NFT ids
    for (uint256 i = 0; i < _newBoostedNftIds.length; i++) {
      uint256 boostedNftId = _newBoostedNftIds[i];

      // Add boosted NFT id to set
      boostedNftIds.add(boostedNftId);
    }
  }

  /**
   * @notice Calculates all the NFTs currently staken by
   *         an address
   *
   * @dev This is an auxiliary function to help with integration
   *      and is not used anywhere in the smart contract login
   *
   * @param _owner address to search staked tokens of
   * @return an array of token IDs of NFTs that are currently staken
   */
  function tokensStakedByOwner(address _owner) external view returns (uint256[] memory) {
    // Cache the length of the staked tokens set for the owner
    uint256 stakedTokensLength = stakedTokens[_owner].length();

    // Create an empty array to store the result
    // Should be the same length as the staked tokens
    // set
    uint256[] memory tokenIds = new uint256[](stakedTokensLength);

    // Copy set values to array
    for (uint256 i = 0; i < stakedTokensLength; i++) {
      tokenIds[i] = stakedTokens[_owner].at(i);
    }

    // Return array result
    return tokenIds;
  }

  /**
   * @notice Calculates the rewards that would be earned by
   *         the user for each an NFT if he was to unstake it at
   *         the current block
   *
   * @param _tokenId token ID of NFT rewards are to be calculated for
   * @return the amount of rewards for the input staken NFT
   */
  function currentRewardsOf(uint256 _tokenId) public view returns (uint256) {
    // Verify NFT is staked
    require(stakedAt[_tokenId] != 0, "not staked");

    // Get current token ID staking time by calculating the
    // delta between the current block time(`block.timestamp`)
    // and the time the token was initially staked(`stakedAt[tokenId]`)
    uint256 stakingTime = block.timestamp - stakedAt[_tokenId];

    // `stakingTime` is the staking time in seconds
    // Calculate the staking time in days by:
    //   * dividing by 60 (seconds in a minute)
    //   * dividing by 60 (minutes in an hour)
    //   * dividing by 24 (hours in a day)
    // This will yield the (rounded down) staking
    // time in days
    uint256 stakingDays = stakingTime / 60 / 60 / 24;

    // Calculate reward for token by multiplying
    // rounded down number of staked days by daily
    // rewards variable
    uint256 reward = stakingDays * dailyRewards;

    // If the NFT is boosted
    if (isBoostedToken(_tokenId)) {
      // Multiply the reward
      reward *= dailyRewardBoostMultiplier;
    }

    // Return reward
    return reward;
  }

  /**
   * @notice Stake NFTs to start earning ERC-20
   *         token rewards
   *
   * The ERC-20 token rewards will be paid out
   * when the NFTs are unstaken
   *
   * @dev Sender must first approve this contract
   *      to transfer NFTs on his behalf and NFT
   *      ownership is transferred to this contract
   *      for the duration of the staking
   *
   * @param _tokenIds token IDs of NFTs to be staken
   */
  function stake(uint256[] memory _tokenIds) public {
    // Ensure at least one token ID was sent
    require(_tokenIds.length > 0, "no token IDs sent");

    // Enumerate sent token IDs
    for (uint256 i = 0; i < _tokenIds.length; i++) {
      // Get token ID
      uint256 tokenId = _tokenIds[i];

      // Store NFT owner
      ownerOf[tokenId] = msg.sender;

      // Add NFT to owner staked tokens
      stakedTokens[msg.sender].add(tokenId);

      // Store staking time as block timestamp the
      // the transaction was confirmed in
      stakedAt[tokenId] = block.timestamp;

      // Transfer token to staking contract
      // Will fail if the user does not own the
      // token or has not approved the staking
      // contract for transferring tokens on his
      // behalf
      erc721.safeTransferFrom(msg.sender, address(this), tokenId, "");

      // Emit event
      emit Staked(msg.sender, tokenId, stakedAt[tokenId]);
    }
  }

  /**
   * @notice Unstake NFTs to receive ERC-20 token rewards
   *
   * @dev Sender must have first staken the NFTs
   *
   * @param _tokenIds token IDs of NFTs to be unstaken
   */
  function unstake(uint256[] memory _tokenIds) public {
    // Ensure at least one token ID was sent
    require(_tokenIds.length > 0, "no token IDs sent");

    // Create a variable to store the total rewards for all
    // NFTs sent
    uint256 totalRewards = 0;

    // Enumerate sent token IDs
    for (uint256 i = 0; i < _tokenIds.length; i++) {
      // Get token ID
      uint256 tokenId = _tokenIds[i];

      // Verify sender is token ID owner
      // Will fail if token is not staked (owner is 0x0)
      require(ownerOf[tokenId] == msg.sender, "not token owner");

      // Calculate rewards for token ID. Will revert
      // if the token is not staken
      uint256 rewards = currentRewardsOf(tokenId);

      // Increase amount of total rewards
      // for all tokens sent
      totalRewards += rewards;

      // Emit event
      emit Unstaked(msg.sender, tokenId, block.timestamp, stakedAt[tokenId], rewards);

      // Reset `ownerOf` and `stakedAt`
      // for token
      ownerOf[tokenId] = address(0);
      stakedAt[tokenId] = 0;

      // Remove NFT from owner staked tokens
      stakedTokens[msg.sender].remove(tokenId);

      // Transfer NFT back to user
      erc721.transferFrom(address(this), msg.sender, tokenId);
    }

    // Mint total rewards for all sent NFTs
    // to user
    erc20.mint(msg.sender, totalRewards);
  }
}

File 2 of 10 : 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 3 of 10 : IMintableERC20.sol
//
// Made by: Omicron Blockchain Solutions
//          https://omicronblockchain.com
//



// SPDX-License-Identifier: UNLICENSED
pragma solidity =0.8.12;

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

/**
 * @notice ERC20-compliant interface with added
 *         function for minting new tokens to addresses
 *
 * See {IERC20}
 */
interface IMintableERC20 is IERC20 {
  /**
   * @dev Allows issuing new tokens to an address
   *
   * @dev Should have restricted access
   */
  function mint(address _to, uint256 _amount) external;
}

File 4 of 10 : 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 5 of 10 : EnumerableSet.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

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

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

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

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

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

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

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

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

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

            return true;
        } else {
            return false;
        }
    }

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

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

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

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

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

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

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

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

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

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

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

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

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

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

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

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

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

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

        assembly {
            result := store
        }

        return result;
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

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

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

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

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

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

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

        assembly {
            result := store
        }

        return result;
    }
}

File 6 of 10 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _setOwner(_msgSender());
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _setOwner(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _setOwner(newOwner);
    }

    function _setOwner(address newOwner) private {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 7 of 10 : 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 8 of 10 : 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 9 of 10 : 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 10 : 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;
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_erc20Address","type":"address"},{"internalType":"address","name":"_erc721Address","type":"address"},{"internalType":"uint128","name":"_dailyRewards","type":"uint128"},{"internalType":"uint256[]","name":"_boostedNftIds","type":"uint256[]"},{"internalType":"uint128","name":"_dailyRewardBoostMultiplier","type":"uint128"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"by","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"oldBoostedNftIds","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"newBoostedNftIds","type":"uint256[]"}],"name":"BoostedNftIdsChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"by","type":"address"},{"indexed":false,"internalType":"uint128","name":"oldDailyRewardBoostMultiplier","type":"uint128"},{"indexed":false,"internalType":"uint128","name":"newDailyRewardBoostMultiplier","type":"uint128"}],"name":"DailyRewardBoostMultiplierChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"by","type":"address"},{"indexed":false,"internalType":"uint128","name":"oldDailyRewards","type":"uint128"},{"indexed":false,"internalType":"uint128","name":"newDailyRewards","type":"uint128"}],"name":"DailyRewardsChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"by","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"}],"name":"Staked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"by","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"stakedAt","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"Unstaked","type":"event"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"currentRewardsOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"dailyRewardBoostMultiplier","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"dailyRewards","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"erc20","outputs":[{"internalType":"contract IMintableERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"erc721","outputs":[{"internalType":"contract IERC721","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"isBoostedToken","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_newBoostedNftIds","type":"uint256[]"}],"name":"setBoostedNftIds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint128","name":"_newDailyRewardBoostMultiplier","type":"uint128"}],"name":"setDailyRewardBoostMultiplier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint128","name":"_newDailyRewards","type":"uint128"}],"name":"setDailyRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"stakedAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"tokensStakedByOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"}],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60c06040523480156200001157600080fd5b5060405162001b4e38038062001b4e83398101604081905262000034916200063f565b6200003f336200007e565b6001600160a01b03808616608052841660a0526200005d83620000ce565b620000688262000188565b620000738162000375565b50505050506200083f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000546001600160a01b031633146200011d5760405162461bcd60e51b8152602060048201819052602482015260008051602062001b2e83398151915260448201526064015b60405180910390fd5b600154604080516001600160801b039283168152918316602083015233917f3bfbf35c57ea09408247d86ad23260a3590e9c1dac5c2152fc895d7b67e4ad5f910160405180910390a2600180546001600160801b0319166001600160801b0392909216919091179055565b6000546001600160a01b03163314620001d35760405162461bcd60e51b8152602060048201819052602482015260008051602062001b2e833981519152604482015260640162000114565b6000620001ec60026200042f60201b62000cd11760201c565b6001600160401b0381111562000206576200020662000629565b60405190808252806020026020018201604052801562000230578160200160208202803683370190505b50905060005b60006200024f60026200042f60201b62000cd11760201c565b1115620002c957600062000274600060026200044060201b62000cdb1790919060201c565b9050620002918160026200045560201b62000cee1790919060201c565b5080838381518110620002a857620002a862000756565b60209081029190910101525080620002c08162000782565b91505062000236565b50336001600160a01b03167f2b64405b2f240f38e5ff3949e6f0e1b2cc5d92b9fe1a6a234d052ad95dec253a828460405162000307929190620007dd565b60405180910390a260005b82518110156200037057600083828151811062000333576200033362000756565b60200260200101519050620003588160026200046360201b62000cfa1790919060201c565b50508080620003679062000782565b91505062000312565b505050565b6000546001600160a01b03163314620003c05760405162461bcd60e51b8152602060048201819052602482015260008051602062001b2e833981519152604482015260640162000114565b60015460408051600160801b9092046001600160801b0390811683528316602083015233917f53a4ad96b204073ea302be0cfa5c10ed97a61b1b540a15614777fd915489b282910160405180910390a2600180546001600160801b03928316600160801b029216919091179055565b60006200043a825490565b92915050565b60006200044e838362000471565b9392505050565b60006200044e83836200049e565b60006200044e8383620005a2565b60008260000182815481106200048b576200048b62000756565b9060005260206000200154905092915050565b6000818152600183016020526040812054801562000597576000620004c56001836200080f565b8554909150600090620004db906001906200080f565b905081811462000547576000866000018281548110620004ff57620004ff62000756565b906000526020600020015490508087600001848154811062000525576200052562000756565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806200055b576200055b62000829565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506200043a565b60009150506200043a565b6000818152600183016020526040812054620005eb575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556200043a565b5060006200043a565b80516001600160a01b03811681146200060c57600080fd5b919050565b80516001600160801b03811681146200060c57600080fd5b634e487b7160e01b600052604160045260246000fd5b600080600080600060a086880312156200065857600080fd5b6200066386620005f4565b9450602062000674818801620005f4565b9450620006846040880162000611565b60608801519094506001600160401b0380821115620006a257600080fd5b818901915089601f830112620006b757600080fd5b815181811115620006cc57620006cc62000629565b8060051b604051601f19603f83011681018181108582111715620006f457620006f462000629565b60405291825284820192508381018501918c8311156200071357600080fd5b938501935b82851015620007335784518452938501939285019262000718565b8097505050505050506200074a6080870162000611565b90509295509295909350565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006000198214156200079957620007996200076c565b5060010190565b600081518084526020808501945080840160005b83811015620007d257815187529582019590820190600101620007b4565b509495945050505050565b604081526000620007f26040830185620007a0565b8281036020840152620008068185620007a0565b95945050505050565b6000828210156200082457620008246200076c565b500390565b634e487b7160e01b600052603160045260246000fd5b60805160a0516112b46200087a600039600081816102af015281816105030152610b380152600081816102440152610bce01526112b46000f3fe608060405234801561001057600080fd5b50600436106101165760003560e01c80638da5cb5b116100a2578063c8bfef7711610071578063c8bfef77146102d1578063dc554e40146102e4578063dc5d2c9814610307578063e449f3411461031a578063f2fde38b1461032d57600080fd5b80638da5cb5b14610266578063a8acbad514610277578063b1449dee14610297578063bca6ce64146102aa57600080fd5b806348d8f3e8116100e957806348d8f3e8146101a35780634e692783146101d55780636352211e146101f6578063715018a614610237578063785e9e861461023f57600080fd5b8063030f04b81461011b5780630fbf0a9314610144578063150b7a02146101595780631748314214610190575b600080fd5b61012e610129366004610ef6565b610340565b60405161013b9190610f4c565b60405180910390f35b610157610152366004610fa6565b610412565b005b61017761016736600461104c565b630a85bd0160e11b949350505050565b6040516001600160e01b0319909116815260200161013b565b61015761019e366004610fa6565b6105cb565b6001546101bd90600160801b90046001600160801b031681565b6040516001600160801b03909116815260200161013b565b6101e86101e336600461110c565b610742565b60405190815260200161013b565b61021f61020436600461110c565b6004602052600090815260409020546001600160a01b031681565b6040516001600160a01b03909116815260200161013b565b61015761081d565b61021f7f000000000000000000000000000000000000000000000000000000000000000081565b6000546001600160a01b031661021f565b6101e861028536600461110c565b60056020526000908152604090205481565b6101576102a5366004611125565b610853565b61021f7f000000000000000000000000000000000000000000000000000000000000000081565b6001546101bd906001600160801b031681565b6102f76102f236600461110c565b6108f1565b604051901515815260200161013b565b610157610315366004611125565b610904565b610157610328366004610fa6565b61099d565b61015761033b366004610ef6565b610c36565b6001600160a01b03811660009081526006602052604081206060919061036590610cd1565b905060008167ffffffffffffffff81111561038257610382610f5f565b6040519080825280602002602001820160405280156103ab578160200160208202803683370190505b50905060005b8281101561040a576001600160a01b03851660009081526006602052604090206103db9082610cdb565b8282815181106103ed576103ed61114e565b6020908102919091010152806104028161117a565b9150506103b1565b509392505050565b600081511161045c5760405162461bcd60e51b81526020600482015260116024820152701b9bc81d1bdad95b8812511cc81cd95b9d607a1b60448201526064015b60405180910390fd5b60005b81518110156105c757600082828151811061047c5761047c61114e565b602090810291909101810151600081815260048352604080822080546001600160a01b0319163390811790915582526006909352919091209091506104c19082610cfa565b5060008181526005602052604080822042905551635c46a7ef60e11b8152336004820152306024820152604481018390526080606482015260848101919091527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063b88d4fde9060a401600060405180830381600087803b15801561054f57600080fd5b505af1158015610563573d6000803e3d6000fd5b5050506000828152600560205260409081902054905183925033917f1449c6dd7851abc30abf37f57715f492010519147cc2652fbc38202c18a6ee90916105ac91815260200190565b60405180910390a350806105bf8161117a565b91505061045f565b5050565b6000546001600160a01b031633146105f55760405162461bcd60e51b815260040161045390611195565b60006106016002610cd1565b67ffffffffffffffff81111561061957610619610f5f565b604051908082528060200260200182016040528015610642578160200160208202803683370190505b50905060005b60006106546002610cd1565b11156106a6576000610667600282610cdb565b9050610674600282610cee565b50808383815181106106885761068861114e565b6020908102919091010152508061069e8161117a565b915050610648565b50336001600160a01b03167f2b64405b2f240f38e5ff3949e6f0e1b2cc5d92b9fe1a6a234d052ad95dec253a82846040516106e29291906111ca565b60405180910390a260005b825181101561073d57600083828151811061070a5761070a61114e565b60200260200101519050610728816002610cfa90919063ffffffff16565b505080806107359061117a565b9150506106ed565b505050565b60008181526005602052604081205461078a5760405162461bcd60e51b815260206004820152600a6024820152691b9bdd081cdd185ad95960b21b6044820152606401610453565b6000828152600560205260408120546107a390426111f8565b905060006018603c6107b5818561120f565b6107bf919061120f565b6107c9919061120f565b6001549091506000906107e5906001600160801b031683611231565b90506107f0856108f1565b156108155760015461081290600160801b90046001600160801b031682611231565b90505b949350505050565b6000546001600160a01b031633146108475760405162461bcd60e51b815260040161045390611195565b6108516000610d06565b565b6000546001600160a01b0316331461087d5760405162461bcd60e51b815260040161045390611195565b600154604080516001600160801b039283168152918316602083015233917f3bfbf35c57ea09408247d86ad23260a3590e9c1dac5c2152fc895d7b67e4ad5f910160405180910390a2600180546fffffffffffffffffffffffffffffffff19166001600160801b0392909216919091179055565b60006108fe600283610d56565b92915050565b6000546001600160a01b0316331461092e5760405162461bcd60e51b815260040161045390611195565b60015460408051600160801b9092046001600160801b0390811683528316602083015233917f53a4ad96b204073ea302be0cfa5c10ed97a61b1b540a15614777fd915489b282910160405180910390a2600180546001600160801b03928316600160801b029216919091179055565b60008151116109e25760405162461bcd60e51b81526020600482015260116024820152701b9bc81d1bdad95b8812511cc81cd95b9d607a1b6044820152606401610453565b6000805b8251811015610bb1576000838281518110610a0357610a0361114e565b602090810291909101810151600081815260049092526040909120549091506001600160a01b03163314610a6b5760405162461bcd60e51b815260206004820152600f60248201526e3737ba103a37b5b2b71037bbb732b960891b6044820152606401610453565b6000610a7682610742565b9050610a828185611250565b60008381526005602090815260409182902054825142815291820152908101839052909450829033907fdcfd2b4017d03f7e541021db793b2f9b31e4acdee005f789e52853c390e3e9629060600160405180910390a3600082815260046020908152604080832080546001600160a01b03191690556005825280832083905533835260069091529020610b159083610cee565b506040516323b872dd60e01b8152306004820152336024820152604481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd90606401600060405180830381600087803b158015610b8457600080fd5b505af1158015610b98573d6000803e3d6000fd5b5050505050508080610ba99061117a565b9150506109e6565b506040516340c10f1960e01b8152336004820152602481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906340c10f1990604401600060405180830381600087803b158015610c1a57600080fd5b505af1158015610c2e573d6000803e3d6000fd5b505050505050565b6000546001600160a01b03163314610c605760405162461bcd60e51b815260040161045390611195565b6001600160a01b038116610cc55760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610453565b610cce81610d06565b50565b60006108fe825490565b6000610ce78383610d6e565b9392505050565b6000610ce78383610d98565b6000610ce78383610e8b565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008181526001830160205260408120541515610ce7565b6000826000018281548110610d8557610d8561114e565b9060005260206000200154905092915050565b60008181526001830160205260408120548015610e81576000610dbc6001836111f8565b8554909150600090610dd0906001906111f8565b9050818114610e35576000866000018281548110610df057610df061114e565b9060005260206000200154905080876000018481548110610e1357610e1361114e565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080610e4657610e46611268565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506108fe565b60009150506108fe565b6000818152600183016020526040812054610ed2575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556108fe565b5060006108fe565b80356001600160a01b0381168114610ef157600080fd5b919050565b600060208284031215610f0857600080fd5b610ce782610eda565b600081518084526020808501945080840160005b83811015610f4157815187529582019590820190600101610f25565b509495945050505050565b602081526000610ce76020830184610f11565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610f9e57610f9e610f5f565b604052919050565b60006020808385031215610fb957600080fd5b823567ffffffffffffffff80821115610fd157600080fd5b818501915085601f830112610fe557600080fd5b813581811115610ff757610ff7610f5f565b8060051b9150611008848301610f75565b818152918301840191848101908884111561102257600080fd5b938501935b8385101561104057843582529385019390850190611027565b98975050505050505050565b6000806000806080858703121561106257600080fd5b61106b85610eda565b9350602061107a818701610eda565b935060408601359250606086013567ffffffffffffffff8082111561109e57600080fd5b818801915088601f8301126110b257600080fd5b8135818111156110c4576110c4610f5f565b6110d6601f8201601f19168501610f75565b915080825289848285010111156110ec57600080fd5b808484018584013760008482840101525080935050505092959194509250565b60006020828403121561111e57600080fd5b5035919050565b60006020828403121561113757600080fd5b81356001600160801b0381168114610ce757600080fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060001982141561118e5761118e611164565b5060010190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6040815260006111dd6040830185610f11565b82810360208401526111ef8185610f11565b95945050505050565b60008282101561120a5761120a611164565b500390565b60008261122c57634e487b7160e01b600052601260045260246000fd5b500490565b600081600019048311821515161561124b5761124b611164565b500290565b6000821982111561126357611263611164565b500190565b634e487b7160e01b600052603160045260246000fdfea26469706673582212208a8367f95c0ffa8dd81841423863748ba79a7ee6b59e7fe65f6fbda1ed79ed2864736f6c634300080c00334f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65720000000000000000000000004e027d2357cd1ddb7c9913e5372d037b2c94aeb8000000000000000000000000977dc06b51e14277a5ac047b44c78dbcc60a372b0000000000000000000000000000000000000000000000008ac7230489e8000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101165760003560e01c80638da5cb5b116100a2578063c8bfef7711610071578063c8bfef77146102d1578063dc554e40146102e4578063dc5d2c9814610307578063e449f3411461031a578063f2fde38b1461032d57600080fd5b80638da5cb5b14610266578063a8acbad514610277578063b1449dee14610297578063bca6ce64146102aa57600080fd5b806348d8f3e8116100e957806348d8f3e8146101a35780634e692783146101d55780636352211e146101f6578063715018a614610237578063785e9e861461023f57600080fd5b8063030f04b81461011b5780630fbf0a9314610144578063150b7a02146101595780631748314214610190575b600080fd5b61012e610129366004610ef6565b610340565b60405161013b9190610f4c565b60405180910390f35b610157610152366004610fa6565b610412565b005b61017761016736600461104c565b630a85bd0160e11b949350505050565b6040516001600160e01b0319909116815260200161013b565b61015761019e366004610fa6565b6105cb565b6001546101bd90600160801b90046001600160801b031681565b6040516001600160801b03909116815260200161013b565b6101e86101e336600461110c565b610742565b60405190815260200161013b565b61021f61020436600461110c565b6004602052600090815260409020546001600160a01b031681565b6040516001600160a01b03909116815260200161013b565b61015761081d565b61021f7f0000000000000000000000004e027d2357cd1ddb7c9913e5372d037b2c94aeb881565b6000546001600160a01b031661021f565b6101e861028536600461110c565b60056020526000908152604090205481565b6101576102a5366004611125565b610853565b61021f7f000000000000000000000000977dc06b51e14277a5ac047b44c78dbcc60a372b81565b6001546101bd906001600160801b031681565b6102f76102f236600461110c565b6108f1565b604051901515815260200161013b565b610157610315366004611125565b610904565b610157610328366004610fa6565b61099d565b61015761033b366004610ef6565b610c36565b6001600160a01b03811660009081526006602052604081206060919061036590610cd1565b905060008167ffffffffffffffff81111561038257610382610f5f565b6040519080825280602002602001820160405280156103ab578160200160208202803683370190505b50905060005b8281101561040a576001600160a01b03851660009081526006602052604090206103db9082610cdb565b8282815181106103ed576103ed61114e565b6020908102919091010152806104028161117a565b9150506103b1565b509392505050565b600081511161045c5760405162461bcd60e51b81526020600482015260116024820152701b9bc81d1bdad95b8812511cc81cd95b9d607a1b60448201526064015b60405180910390fd5b60005b81518110156105c757600082828151811061047c5761047c61114e565b602090810291909101810151600081815260048352604080822080546001600160a01b0319163390811790915582526006909352919091209091506104c19082610cfa565b5060008181526005602052604080822042905551635c46a7ef60e11b8152336004820152306024820152604481018390526080606482015260848101919091527f000000000000000000000000977dc06b51e14277a5ac047b44c78dbcc60a372b6001600160a01b03169063b88d4fde9060a401600060405180830381600087803b15801561054f57600080fd5b505af1158015610563573d6000803e3d6000fd5b5050506000828152600560205260409081902054905183925033917f1449c6dd7851abc30abf37f57715f492010519147cc2652fbc38202c18a6ee90916105ac91815260200190565b60405180910390a350806105bf8161117a565b91505061045f565b5050565b6000546001600160a01b031633146105f55760405162461bcd60e51b815260040161045390611195565b60006106016002610cd1565b67ffffffffffffffff81111561061957610619610f5f565b604051908082528060200260200182016040528015610642578160200160208202803683370190505b50905060005b60006106546002610cd1565b11156106a6576000610667600282610cdb565b9050610674600282610cee565b50808383815181106106885761068861114e565b6020908102919091010152508061069e8161117a565b915050610648565b50336001600160a01b03167f2b64405b2f240f38e5ff3949e6f0e1b2cc5d92b9fe1a6a234d052ad95dec253a82846040516106e29291906111ca565b60405180910390a260005b825181101561073d57600083828151811061070a5761070a61114e565b60200260200101519050610728816002610cfa90919063ffffffff16565b505080806107359061117a565b9150506106ed565b505050565b60008181526005602052604081205461078a5760405162461bcd60e51b815260206004820152600a6024820152691b9bdd081cdd185ad95960b21b6044820152606401610453565b6000828152600560205260408120546107a390426111f8565b905060006018603c6107b5818561120f565b6107bf919061120f565b6107c9919061120f565b6001549091506000906107e5906001600160801b031683611231565b90506107f0856108f1565b156108155760015461081290600160801b90046001600160801b031682611231565b90505b949350505050565b6000546001600160a01b031633146108475760405162461bcd60e51b815260040161045390611195565b6108516000610d06565b565b6000546001600160a01b0316331461087d5760405162461bcd60e51b815260040161045390611195565b600154604080516001600160801b039283168152918316602083015233917f3bfbf35c57ea09408247d86ad23260a3590e9c1dac5c2152fc895d7b67e4ad5f910160405180910390a2600180546fffffffffffffffffffffffffffffffff19166001600160801b0392909216919091179055565b60006108fe600283610d56565b92915050565b6000546001600160a01b0316331461092e5760405162461bcd60e51b815260040161045390611195565b60015460408051600160801b9092046001600160801b0390811683528316602083015233917f53a4ad96b204073ea302be0cfa5c10ed97a61b1b540a15614777fd915489b282910160405180910390a2600180546001600160801b03928316600160801b029216919091179055565b60008151116109e25760405162461bcd60e51b81526020600482015260116024820152701b9bc81d1bdad95b8812511cc81cd95b9d607a1b6044820152606401610453565b6000805b8251811015610bb1576000838281518110610a0357610a0361114e565b602090810291909101810151600081815260049092526040909120549091506001600160a01b03163314610a6b5760405162461bcd60e51b815260206004820152600f60248201526e3737ba103a37b5b2b71037bbb732b960891b6044820152606401610453565b6000610a7682610742565b9050610a828185611250565b60008381526005602090815260409182902054825142815291820152908101839052909450829033907fdcfd2b4017d03f7e541021db793b2f9b31e4acdee005f789e52853c390e3e9629060600160405180910390a3600082815260046020908152604080832080546001600160a01b03191690556005825280832083905533835260069091529020610b159083610cee565b506040516323b872dd60e01b8152306004820152336024820152604481018390527f000000000000000000000000977dc06b51e14277a5ac047b44c78dbcc60a372b6001600160a01b0316906323b872dd90606401600060405180830381600087803b158015610b8457600080fd5b505af1158015610b98573d6000803e3d6000fd5b5050505050508080610ba99061117a565b9150506109e6565b506040516340c10f1960e01b8152336004820152602481018290527f0000000000000000000000004e027d2357cd1ddb7c9913e5372d037b2c94aeb86001600160a01b0316906340c10f1990604401600060405180830381600087803b158015610c1a57600080fd5b505af1158015610c2e573d6000803e3d6000fd5b505050505050565b6000546001600160a01b03163314610c605760405162461bcd60e51b815260040161045390611195565b6001600160a01b038116610cc55760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610453565b610cce81610d06565b50565b60006108fe825490565b6000610ce78383610d6e565b9392505050565b6000610ce78383610d98565b6000610ce78383610e8b565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008181526001830160205260408120541515610ce7565b6000826000018281548110610d8557610d8561114e565b9060005260206000200154905092915050565b60008181526001830160205260408120548015610e81576000610dbc6001836111f8565b8554909150600090610dd0906001906111f8565b9050818114610e35576000866000018281548110610df057610df061114e565b9060005260206000200154905080876000018481548110610e1357610e1361114e565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080610e4657610e46611268565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506108fe565b60009150506108fe565b6000818152600183016020526040812054610ed2575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556108fe565b5060006108fe565b80356001600160a01b0381168114610ef157600080fd5b919050565b600060208284031215610f0857600080fd5b610ce782610eda565b600081518084526020808501945080840160005b83811015610f4157815187529582019590820190600101610f25565b509495945050505050565b602081526000610ce76020830184610f11565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610f9e57610f9e610f5f565b604052919050565b60006020808385031215610fb957600080fd5b823567ffffffffffffffff80821115610fd157600080fd5b818501915085601f830112610fe557600080fd5b813581811115610ff757610ff7610f5f565b8060051b9150611008848301610f75565b818152918301840191848101908884111561102257600080fd5b938501935b8385101561104057843582529385019390850190611027565b98975050505050505050565b6000806000806080858703121561106257600080fd5b61106b85610eda565b9350602061107a818701610eda565b935060408601359250606086013567ffffffffffffffff8082111561109e57600080fd5b818801915088601f8301126110b257600080fd5b8135818111156110c4576110c4610f5f565b6110d6601f8201601f19168501610f75565b915080825289848285010111156110ec57600080fd5b808484018584013760008482840101525080935050505092959194509250565b60006020828403121561111e57600080fd5b5035919050565b60006020828403121561113757600080fd5b81356001600160801b0381168114610ce757600080fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060001982141561118e5761118e611164565b5060010190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6040815260006111dd6040830185610f11565b82810360208401526111ef8185610f11565b95945050505050565b60008282101561120a5761120a611164565b500390565b60008261122c57634e487b7160e01b600052601260045260246000fd5b500490565b600081600019048311821515161561124b5761124b611164565b500290565b6000821982111561126357611263611164565b500190565b634e487b7160e01b600052603160045260246000fdfea26469706673582212208a8367f95c0ffa8dd81841423863748ba79a7ee6b59e7fe65f6fbda1ed79ed2864736f6c634300080c0033

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

0000000000000000000000004e027d2357cd1ddb7c9913e5372d037b2c94aeb8000000000000000000000000977dc06b51e14277a5ac047b44c78dbcc60a372b0000000000000000000000000000000000000000000000008ac7230489e8000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _erc20Address (address): 0x4e027D2357Cd1DDB7c9913e5372D037B2C94aeB8
Arg [1] : _erc721Address (address): 0x977dc06b51E14277a5ac047B44c78DBCc60A372B
Arg [2] : _dailyRewards (uint128): 10000000000000000000

-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 0000000000000000000000004e027d2357cd1ddb7c9913e5372d037b2c94aeb8
Arg [1] : 000000000000000000000000977dc06b51e14277a5ac047b44c78dbcc60a372b
Arg [2] : 0000000000000000000000000000000000000000000000008ac7230489e80000
Arg [3] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000000


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.