ETH Price: $2,696.71 (-0.25%)

Contract

0x3FAf5EC3B197d77Af93D4155bF96Cef9E0cFcc8b
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Claim Rewards201681632024-06-25 10:40:59234 days ago1719312059IN
0x3FAf5EC3...9E0cFcc8b
0 ETH0.000178393.10280509
Withdraw198174052024-05-07 9:50:35284 days ago1715075435IN
0x3FAf5EC3...9E0cFcc8b
0 ETH0.0012716.07478788
Withdraw191146512024-01-29 20:45:59382 days ago1706561159IN
0x3FAf5EC3...9E0cFcc8b
0 ETH0.0026144812.48996179
Withdraw189526862024-01-07 3:53:47405 days ago1704599627IN
0x3FAf5EC3...9E0cFcc8b
0 ETH0.0027065219.08339091
Claim Rewards189230302024-01-02 23:41:23409 days ago1704238883IN
0x3FAf5EC3...9E0cFcc8b
0 ETH0.000953814.17396148
Claim Rewards181997402023-09-23 16:35:11510 days ago1695486911IN
0x3FAf5EC3...9E0cFcc8b
0 ETH0.000599678.91144039
Deposit181992452023-09-23 14:54:47510 days ago1695480887IN
0x3FAf5EC3...9E0cFcc8b
0 ETH0.001212316.80973759
Claim Rewards181395572023-09-15 5:30:11519 days ago1694755811IN
0x3FAf5EC3...9E0cFcc8b
0 ETH0.000571488.49248933
Claim Rewards177597702023-07-24 1:45:11572 days ago1690163111IN
0x3FAf5EC3...9E0cFcc8b
0 ETH0.0010068717.51201771
Claim Rewards177181742023-07-18 5:57:11578 days ago1689659831IN
0x3FAf5EC3...9E0cFcc8b
0 ETH0.0007359812.80066321
Claim Rewards177162522023-07-17 23:28:35578 days ago1689636515IN
0x3FAf5EC3...9E0cFcc8b
0 ETH0.001496815.89138874
Deposit173572142023-05-28 11:27:11628 days ago1685273231IN
0x3FAf5EC3...9E0cFcc8b
0 ETH0.0048019324.6094056
Withdraw169219812023-03-27 23:27:59690 days ago1679959679IN
0x3FAf5EC3...9E0cFcc8b
0 ETH0.0030511321.51324898
Claim Rewards168614522023-03-19 11:24:47698 days ago1679225087IN
0x3FAf5EC3...9E0cFcc8b
0 ETH0.0013986412.02850044
Claim Rewards167137132023-02-26 16:52:47719 days ago1677430367IN
0x3FAf5EC3...9E0cFcc8b
0 ETH0.0015589520.22248733
Claim Rewards167048192023-02-25 10:51:11720 days ago1677322271IN
0x3FAf5EC3...9E0cFcc8b
0 ETH0.0010761318.71671671
Deposit166623432023-02-19 11:29:35726 days ago1676806175IN
0x3FAf5EC3...9E0cFcc8b
0 ETH0.0033708920.94685916
Claim Rewards166010172023-02-10 21:22:59735 days ago1676064179IN
0x3FAf5EC3...9E0cFcc8b
0 ETH0.0015133122.48844085
Claim Rewards165911382023-02-09 12:16:59736 days ago1675945019IN
0x3FAf5EC3...9E0cFcc8b
0 ETH0.0026832223.07592644
Claim Rewards163461342023-01-06 7:04:47771 days ago1672988687IN
0x3FAf5EC3...9E0cFcc8b
0 ETH0.0007934313.79988439
Claim Rewards163341762023-01-04 14:59:23772 days ago1672844363IN
0x3FAf5EC3...9E0cFcc8b
0 ETH0.0018581115.97994374
Claim Rewards163336422023-01-04 13:11:47772 days ago1672837907IN
0x3FAf5EC3...9E0cFcc8b
0 ETH0.0009242916.07575294
Claim Rewards163261832023-01-03 12:13:23773 days ago1672748003IN
0x3FAf5EC3...9E0cFcc8b
0 ETH0.0011702315.18016806
Claim Rewards163143702023-01-01 20:40:59775 days ago1672605659IN
0x3FAf5EC3...9E0cFcc8b
0 ETH0.0007991213.89880667
Claim Rewards163132682023-01-01 17:00:11775 days ago1672592411IN
0x3FAf5EC3...9E0cFcc8b
0 ETH0.00086415.02722383
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:
GenesisRoarStaking

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
No with 200 runs

Other Settings:
byzantium EvmVersion
File 1 of 11 : GenesisRoarStaking.sol
// SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";
import "@openzeppelin/contracts/utils/math/Math.sol";
import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";

contract GenesisRoarStaking is Ownable, ERC721Holder, Pausable {
    using EnumerableSet for EnumerableSet.UintSet;

    IERC721 public genesisLeadersContractInstance;

    IERC20 public roarTokenContractInstance;

    // Number of tokens per block. There are approx 6k blocks per day and 10 tokens are represented by 10^19 (after considering decimals).
    uint256 public rate;

    // Expiration block number.
    uint256 public expirationBlockNumber;

    // Mapping of address to token numbers deposited
    mapping(address => EnumerableSet.UintSet) private _deposits;

    // Mapping of address -> token -> block number
    mapping(address => mapping(uint256 => uint256)) public _depositBlocks;

    constructor(address genesisLeadersContractAddress, uint256 initialRate, uint256 numberOfExpirationBlocks, address roarTokenAddress) {
        genesisLeadersContractInstance = IERC721(genesisLeadersContractAddress);
        rate = initialRate;
        expirationBlockNumber = block.number + numberOfExpirationBlocks;
        roarTokenContractInstance = IERC20(roarTokenAddress);
        _pause();
    }

    function setAddresses(address genesisLeadersContractAddress, address roarTokenAddress) public onlyOwner {
        genesisLeadersContractInstance = IERC721(genesisLeadersContractAddress);
        roarTokenContractInstance = IERC20(roarTokenAddress);
    }

    function setRate(uint256 newRate) public onlyOwner {
        rate = newRate;
    }

    function setExpiration(uint256 numberOfExpirationBlocks) public onlyOwner {
        expirationBlockNumber = block.number + numberOfExpirationBlocks;
    }

    function pause() public onlyOwner {
        _pause();
    }

    function unpause() public onlyOwner {
        _unpause();
    }

    function depositsOf(address owner) external view returns (uint256[] memory) {
        EnumerableSet.UintSet storage depositSet = _deposits[owner];
        uint256[] memory tokenIds = new uint256[](depositSet.length());

        for (uint256 i; i < depositSet.length(); i++) {
            tokenIds[i] = depositSet.at(i);
        }

        return tokenIds;
    }

    function hasDeposits(address owner, uint256[] memory tokenIds) external view returns (bool) {
        EnumerableSet.UintSet storage depositSet = _deposits[owner];

        for (uint256 i = 0; i < tokenIds.length; i++) {
            if (! depositSet.contains(tokenIds[i])) {
                return false;
            }
        }

        return true;
    }

    function hasDepositsOrOwns(address owner, uint256[] memory tokenIds) external view returns (bool) {
        EnumerableSet.UintSet storage depositSet = _deposits[owner];

        for (uint256 i = 0; i < tokenIds.length; i++) {
            if (! depositSet.contains(tokenIds[i]) && genesisLeadersContractInstance.ownerOf(tokenIds[i]) != owner) {
                return false;
            }
        }

        return true;
    }

    function calculateRewards(address owner, uint256[] memory tokenIds) external view returns (uint256) {
        uint256 reward = 0;

        for (uint256 i; i < tokenIds.length; i++) {
            reward += calculateReward(owner, tokenIds[i]);
        }

        return reward;
    }

    function calculateReward(address owner, uint256 tokenId) public view returns (uint256) {
        require(Math.min(block.number, expirationBlockNumber) >= _depositBlocks[owner][tokenId], "Invalid block numbers");

        return rate * 
            (_deposits[owner].contains(tokenId) ? 1 : 0) * 
            (Math.min(block.number, expirationBlockNumber) - _depositBlocks[owner][tokenId]);
    }

    function claimRewards(uint256[] calldata tokenIds) public whenNotPaused {
        uint256 reward = 0;
        uint256 currentBlock = Math.min(block.number, expirationBlockNumber);

        for (uint256 i; i < tokenIds.length; i++) {
            reward += calculateReward(msg.sender, tokenIds[i]);
            _depositBlocks[msg.sender][tokenIds[i]] = currentBlock;
        }

        if (reward > 0) {
            roarTokenContractInstance.transfer(msg.sender, reward);
        }
    }

    function deposit(uint256[] calldata tokenIds) external whenNotPaused {
        require(msg.sender != address(genesisLeadersContractInstance), "Invalid address");
        uint256 currentBlock = Math.min(block.number, expirationBlockNumber);

        for (uint256 i = 0; i < tokenIds.length; i++) {
            genesisLeadersContractInstance.safeTransferFrom(msg.sender, address(this), tokenIds[i], "");

            _deposits[msg.sender].add(tokenIds[i]);
            _depositBlocks[msg.sender][tokenIds[i]] = currentBlock;
        }
    }

    function withdraw(uint256[] calldata tokenIds) external whenNotPaused {
        claimRewards(tokenIds);

        for (uint256 i; i < tokenIds.length; i++) {
            require(_deposits[msg.sender].contains(tokenIds[i]), "This token has not been deposited");

            _deposits[msg.sender].remove(tokenIds[i]);

            genesisLeadersContractInstance.safeTransferFrom(address(this), msg.sender, tokenIds[i], "");
        }
    }

    function withdrawTokens(uint256 tokenAmount) external onlyOwner {
        roarTokenContractInstance.transfer(msg.sender, tokenAmount);
    }
}

File 2 of 11 : 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 () {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), 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 {
        emit OwnershipTransferred(_owner, address(0));
        _owner = 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");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

File 3 of 11 : Pausable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract Pausable is Context {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor () {
        _paused = false;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        require(!paused(), "Pausable: paused");
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        require(paused(), "Pausable: not paused");
        _;
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

File 4 of 11 : 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 5 of 11 : 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 6 of 11 : 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 7 of 11 : 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 8 of 11 : 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) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

File 9 of 11 : 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 10 of 11 : 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, so we distribute
        return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2);
    }
}

File 11 of 11 : 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;

            // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs
            // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.

            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) {
        require(set._values.length > index, "EnumerableSet: index out of bounds");
        return set._values[index];
    }

    // 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);
    }

    // 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))));
    }


    // 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));
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"genesisLeadersContractAddress","type":"address"},{"internalType":"uint256","name":"initialRate","type":"uint256"},{"internalType":"uint256","name":"numberOfExpirationBlocks","type":"uint256"},{"internalType":"address","name":"roarTokenAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"_depositBlocks","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"calculateReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"calculateRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"claimRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"depositsOf","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"expirationBlockNumber","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"genesisLeadersContractInstance","outputs":[{"internalType":"contract IERC721","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"hasDeposits","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"hasDepositsOrOwns","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"roarTokenContractInstance","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"genesisLeadersContractAddress","type":"address"},{"internalType":"address","name":"roarTokenAddress","type":"address"}],"name":"setAddresses","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"numberOfExpirationBlocks","type":"uint256"}],"name":"setExpiration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newRate","type":"uint256"}],"name":"setRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenAmount","type":"uint256"}],"name":"withdrawTokens","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b50604051620030cc380380620030cc833981810160405281019062000037919062000357565b600062000052620001ca640100000000026401000000009004565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35060008060146101000a81548160ff02191690831515021790555083600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550826003819055508143620001609190620003f8565b60048190555080600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550620001c0620001d2640100000000026401000000009004565b5050505062000506565b600033905090565b620001eb6200029c640100000000026401000000009004565b156200022e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200022590620004b6565b60405180910390fd5b6001600060146101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25862000283620001ca640100000000026401000000009004565b604051620002929190620004e9565b60405180910390a1565b60008060149054906101000a900460ff16905090565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620002e482620002b7565b9050919050565b620002f681620002d7565b81146200030257600080fd5b50565b6000815190506200031681620002eb565b92915050565b6000819050919050565b62000331816200031c565b81146200033d57600080fd5b50565b600081519050620003518162000326565b92915050565b60008060008060808587031215620003745762000373620002b2565b5b6000620003848782880162000305565b9450506020620003978782880162000340565b9350506040620003aa8782880162000340565b9250506060620003bd8782880162000305565b91505092959194509250565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600062000405826200031c565b915062000412836200031c565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156200044a5762000449620003c9565b5b828201905092915050565b600082825260208201905092915050565b7f5061757361626c653a2070617573656400000000000000000000000000000000600082015250565b60006200049e60108362000455565b9150620004ab8262000466565b602082019050919050565b60006020820190508181036000830152620004d1816200048f565b9050919050565b620004e381620002d7565b82525050565b6000602082019050620005006000830184620004d8565b92915050565b612bb680620005166000396000f3fe608060405234801561001057600080fd5b5060043610610175576000357c0100000000000000000000000000000000000000000000000000000000900480635eac6239116100e0578063983d95ce11610099578063983d95ce14610396578063abb91ef5146103b2578063b343ae14146103e2578063c01195c914610412578063e3a9db1a14610430578063f2fde38b1461046057610175565b80635eac62391461030e5780636486035a1461032a578063715018a6146103485780638456cb59146103525780638da5cb5b1461035c57806390107afe1461037a57610175565b80633f4ba83a116101325780633f4ba83a146102605780634fb9c7c91461026a578063515a20ba1461029a57806356e2e0f1146102b6578063598b8e71146102d45780635c975abb146102f057610175565b8063068c526f1461017a578063150b7a02146101aa5780631852e8d9146101da5780632c4e722e1461020a578063315a095d1461022857806334fcf43714610244575b600080fd5b610194600480360381019061018f9190611f12565b61047c565b6040516101a19190611f7d565b60405180910390f35b6101c460048036038101906101bf919061204d565b6104de565b6040516101d1919061210b565b60405180910390f35b6101f460048036038101906101ef9190612126565b61050e565b6040516102019190611f7d565b60405180910390f35b610212610696565b60405161021f9190611f7d565b60405180910390f35b610242600480360381019061023d9190612166565b61069c565b005b61025e60048036038101906102599190612166565b6107e7565b005b61026861086d565b005b610284600480360381019061027f9190611f12565b6108f3565b60405161029191906121ae565b60405180910390f35b6102b460048036038101906102af9190612166565b610ab9565b005b6102be610b4a565b6040516102cb9190611f7d565b60405180910390f35b6102ee60048036038101906102e99190612224565b610b50565b005b6102f8610dff565b60405161030591906121ae565b60405180910390f35b61032860048036038101906103239190612224565b610e15565b005b61033261100a565b60405161033f91906122d0565b60405180910390f35b610350611030565b005b61035a61116a565b005b6103646111f0565b60405161037191906122fa565b60405180910390f35b610394600480360381019061038f9190612315565b611219565b005b6103b060048036038101906103ab9190612224565b61131b565b005b6103cc60048036038101906103c79190611f12565b61156d565b6040516103d991906121ae565b60405180910390f35b6103fc60048036038101906103f79190612126565b611619565b6040516104099190611f7d565b60405180910390f35b61041a61163e565b6040516104279190612376565b60405180910390f35b61044a60048036038101906104459190612391565b611664565b604051610457919061247c565b60405180910390f35b61047a60048036038101906104759190612391565b611761565b005b6000806000905060005b83518110156104d3576104b3858583815181106104a6576104a561249e565b5b602002602001015161050e565b826104be91906124fc565b915080806104cb90612552565b915050610486565b508091505092915050565b600063150b7a027c0100000000000000000000000000000000000000000000000000000000029050949350505050565b6000600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008381526020019081526020016000205461056d4360045461190a565b10156105ae576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105a5906125f8565b60405180910390fd5b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008381526020019081526020016000205461060b4360045461190a565b6106159190612618565b61066683600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002061192390919063ffffffff16565b610671576000610674565b60015b60ff16600354610684919061264c565b61068e919061264c565b905092915050565b60035481565b6106a461193d565b73ffffffffffffffffffffffffffffffffffffffff166106c26111f0565b73ffffffffffffffffffffffffffffffffffffffff1614610718576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161070f906126f2565b60405180910390fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401610791929190612712565b602060405180830381600087803b1580156107ab57600080fd5b505af11580156107bf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107e39190612767565b5050565b6107ef61193d565b73ffffffffffffffffffffffffffffffffffffffff1661080d6111f0565b73ffffffffffffffffffffffffffffffffffffffff1614610863576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085a906126f2565b60405180910390fd5b8060038190555050565b61087561193d565b73ffffffffffffffffffffffffffffffffffffffff166108936111f0565b73ffffffffffffffffffffffffffffffffffffffff16146108e9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108e0906126f2565b60405180910390fd5b6108f1611945565b565b600080600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905060005b8351811015610aac576109708482815181106109595761095861249e565b5b60200260200101518361192390919063ffffffff16565b158015610a8957508473ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e8684815181106109e0576109df61249e565b5b60200260200101516040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401610a209190611f7d565b60206040518083038186803b158015610a3857600080fd5b505afa158015610a4c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a7091906127a9565b73ffffffffffffffffffffffffffffffffffffffff1614155b15610a9957600092505050610ab3565b8080610aa490612552565b91505061093a565b5060019150505b92915050565b610ac161193d565b73ffffffffffffffffffffffffffffffffffffffff16610adf6111f0565b73ffffffffffffffffffffffffffffffffffffffff1614610b35576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b2c906126f2565b60405180910390fd5b8043610b4191906124fc565b60048190555050565b60045481565b610b58610dff565b15610b98576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b8f90612822565b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610c29576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c209061288e565b60405180910390fd5b6000610c374360045461190a565b905060005b83839050811015610df957600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b88d4fde3330878786818110610c9a57610c9961249e565b5b905060200201356040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401610cdb939291906128e5565b600060405180830381600087803b158015610cf557600080fd5b505af1158015610d09573d6000803e3d6000fd5b50505050610d77848483818110610d2357610d2261249e565b5b90506020020135600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206119e690919063ffffffff16565b5081600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000868685818110610dcd57610dcc61249e565b5b905060200201358152602001908152602001600020819055508080610df190612552565b915050610c3c565b50505050565b60008060149054906101000a900460ff16905090565b610e1d610dff565b15610e5d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e5490612822565b60405180910390fd5b600080610e6c4360045461190a565b905060005b84849050811015610f2d57610e9f33868684818110610e9357610e9261249e565b5b9050602002013561050e565b83610eaa91906124fc565b925081600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000878785818110610f0157610f0061249e565b5b905060200201358152602001908152602001600020819055508080610f2590612552565b915050610e71565b50600082111561100457600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33846040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401610fb0929190612712565b602060405180830381600087803b158015610fca57600080fd5b505af1158015610fde573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110029190612767565b505b50505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61103861193d565b73ffffffffffffffffffffffffffffffffffffffff166110566111f0565b73ffffffffffffffffffffffffffffffffffffffff16146110ac576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110a3906126f2565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b61117261193d565b73ffffffffffffffffffffffffffffffffffffffff166111906111f0565b73ffffffffffffffffffffffffffffffffffffffff16146111e6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111dd906126f2565b60405180910390fd5b6111ee611a00565b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b61122161193d565b73ffffffffffffffffffffffffffffffffffffffff1661123f6111f0565b73ffffffffffffffffffffffffffffffffffffffff1614611295576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161128c906126f2565b60405180910390fd5b81600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b611323610dff565b15611363576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161135a90612822565b60405180910390fd5b61136d8282610e15565b60005b82829050811015611568576113e58383838181106113915761139061249e565b5b90506020020135600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002061192390919063ffffffff16565b611424576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161141b906129a1565b60405180910390fd5b61148e83838381811061143a5761143961249e565b5b90506020020135600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611aa390919063ffffffff16565b50600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b88d4fde30338686868181106114e2576114e161249e565b5b905060200201356040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401611523939291906128e5565b600060405180830381600087803b15801561153d57600080fd5b505af1158015611551573d6000803e3d6000fd5b50505050808061156090612552565b915050611370565b505050565b600080600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905060005b835181101561160c576115ea8482815181106115d3576115d261249e565b5b60200260200101518361192390919063ffffffff16565b6115f957600092505050611613565b808061160490612552565b9150506115b4565b5060019150505b92915050565b6006602052816000526040600020602052806000526040600020600091509150505481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60606000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905060006116b482611abd565b67ffffffffffffffff8111156116cd576116cc611d99565b5b6040519080825280602002602001820160405280156116fb5781602001602082028036833780820191505090505b50905060005b61170a83611abd565b811015611756576117248184611ad290919063ffffffff16565b8282815181106117375761173661249e565b5b602002602001018181525050808061174e90612552565b915050611701565b508092505050919050565b61176961193d565b73ffffffffffffffffffffffffffffffffffffffff166117876111f0565b73ffffffffffffffffffffffffffffffffffffffff16146117dd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117d4906126f2565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561184d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161184490612a33565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000818310611919578161191b565b825b905092915050565b60006119358360000183600102611aed565b905092915050565b600033905090565b61194d610dff565b61198c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161198390612a9f565b60405180910390fd5b60008060146101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6119cf61193d565b6040516119dc91906122fa565b60405180910390a1565b60006119f88360000183600102611b10565b905092915050565b611a08610dff565b15611a48576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a3f90612822565b60405180910390fd5b6001600060146101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611a8c61193d565b604051611a9991906122fa565b60405180910390a1565b6000611ab58360000183600102611b80565b905092915050565b6000611acb82600001611c8c565b9050919050565b6000611ae18360000183611c9d565b60019004905092915050565b600080836001016000848152602001908152602001600020541415905092915050565b6000611b1c8383611aed565b611b75578260000182908060018154018082558091505060019003906000526020600020016000909190919091505582600001805490508360010160008481526020019081526020016000208190555060019050611b7a565b600090505b92915050565b60008083600101600084815260200190815260200160002054905060008114611c80576000600182611bb29190612618565b9050600060018660000180549050611bca9190612618565b90506000866000018281548110611be457611be361249e565b5b9060005260206000200154905080876000018481548110611c0857611c0761249e565b5b9060005260206000200181905550838760010160008381526020019081526020016000208190555086600001805480611c4457611c43612abf565b5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050611c86565b60009150505b92915050565b600081600001805490509050919050565b600081836000018054905011611ce8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cdf90612b60565b60405180910390fd5b826000018281548110611cfe57611cfd61249e565b5b9060005260206000200154905092915050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611d5082611d25565b9050919050565b611d6081611d45565b8114611d6b57600080fd5b50565b600081359050611d7d81611d57565b92915050565b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b611dd182611d88565b810181811067ffffffffffffffff82111715611df057611def611d99565b5b80604052505050565b6000611e03611d11565b9050611e0f8282611dc8565b919050565b600067ffffffffffffffff821115611e2f57611e2e611d99565b5b602082029050602081019050919050565b600080fd5b6000819050919050565b611e5881611e45565b8114611e6357600080fd5b50565b600081359050611e7581611e4f565b92915050565b6000611e8e611e8984611e14565b611df9565b90508083825260208201905060208402830185811115611eb157611eb0611e40565b5b835b81811015611eda5780611ec68882611e66565b845260208401935050602081019050611eb3565b5050509392505050565b600082601f830112611ef957611ef8611d83565b5b8135611f09848260208601611e7b565b91505092915050565b60008060408385031215611f2957611f28611d1b565b5b6000611f3785828601611d6e565b925050602083013567ffffffffffffffff811115611f5857611f57611d20565b5b611f6485828601611ee4565b9150509250929050565b611f7781611e45565b82525050565b6000602082019050611f926000830184611f6e565b92915050565b600080fd5b600067ffffffffffffffff821115611fb857611fb7611d99565b5b611fc182611d88565b9050602081019050919050565b82818337600083830152505050565b6000611ff0611feb84611f9d565b611df9565b90508281526020810184848401111561200c5761200b611f98565b5b612017848285611fce565b509392505050565b600082601f83011261203457612033611d83565b5b8135612044848260208601611fdd565b91505092915050565b6000806000806080858703121561206757612066611d1b565b5b600061207587828801611d6e565b945050602061208687828801611d6e565b935050604061209787828801611e66565b925050606085013567ffffffffffffffff8111156120b8576120b7611d20565b5b6120c48782880161201f565b91505092959194509250565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b612105816120d0565b82525050565b600060208201905061212060008301846120fc565b92915050565b6000806040838503121561213d5761213c611d1b565b5b600061214b85828601611d6e565b925050602061215c85828601611e66565b9150509250929050565b60006020828403121561217c5761217b611d1b565b5b600061218a84828501611e66565b91505092915050565b60008115159050919050565b6121a881612193565b82525050565b60006020820190506121c3600083018461219f565b92915050565b600080fd5b60008083601f8401126121e4576121e3611d83565b5b8235905067ffffffffffffffff811115612201576122006121c9565b5b60208301915083602082028301111561221d5761221c611e40565b5b9250929050565b6000806020838503121561223b5761223a611d1b565b5b600083013567ffffffffffffffff81111561225957612258611d20565b5b612265858286016121ce565b92509250509250929050565b6000819050919050565b600061229661229161228c84611d25565b612271565b611d25565b9050919050565b60006122a88261227b565b9050919050565b60006122ba8261229d565b9050919050565b6122ca816122af565b82525050565b60006020820190506122e560008301846122c1565b92915050565b6122f481611d45565b82525050565b600060208201905061230f60008301846122eb565b92915050565b6000806040838503121561232c5761232b611d1b565b5b600061233a85828601611d6e565b925050602061234b85828601611d6e565b9150509250929050565b60006123608261229d565b9050919050565b61237081612355565b82525050565b600060208201905061238b6000830184612367565b92915050565b6000602082840312156123a7576123a6611d1b565b5b60006123b584828501611d6e565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6123f381611e45565b82525050565b600061240583836123ea565b60208301905092915050565b6000602082019050919050565b6000612429826123be565b61243381856123c9565b935061243e836123da565b8060005b8381101561246f57815161245688826123f9565b975061246183612411565b925050600181019050612442565b5085935050505092915050565b60006020820190508181036000830152612496818461241e565b905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061250782611e45565b915061251283611e45565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115612547576125466124cd565b5b828201905092915050565b600061255d82611e45565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156125905761258f6124cd565b5b600182019050919050565b600082825260208201905092915050565b7f496e76616c696420626c6f636b206e756d626572730000000000000000000000600082015250565b60006125e260158361259b565b91506125ed826125ac565b602082019050919050565b60006020820190508181036000830152612611816125d5565b9050919050565b600061262382611e45565b915061262e83611e45565b925082821015612641576126406124cd565b5b828203905092915050565b600061265782611e45565b915061266283611e45565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561269b5761269a6124cd565b5b828202905092915050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006126dc60208361259b565b91506126e7826126a6565b602082019050919050565b6000602082019050818103600083015261270b816126cf565b9050919050565b600060408201905061272760008301856122eb565b6127346020830184611f6e565b9392505050565b61274481612193565b811461274f57600080fd5b50565b6000815190506127618161273b565b92915050565b60006020828403121561277d5761277c611d1b565b5b600061278b84828501612752565b91505092915050565b6000815190506127a381611d57565b92915050565b6000602082840312156127bf576127be611d1b565b5b60006127cd84828501612794565b91505092915050565b7f5061757361626c653a2070617573656400000000000000000000000000000000600082015250565b600061280c60108361259b565b9150612817826127d6565b602082019050919050565b6000602082019050818103600083015261283b816127ff565b9050919050565b7f496e76616c696420616464726573730000000000000000000000000000000000600082015250565b6000612878600f8361259b565b915061288382612842565b602082019050919050565b600060208201905081810360008301526128a78161286b565b9050919050565b600082825260208201905092915050565b50565b60006128cf6000836128ae565b91506128da826128bf565b600082019050919050565b60006080820190506128fa60008301866122eb565b61290760208301856122eb565b6129146040830184611f6e565b8181036060830152612925816128c2565b9050949350505050565b7f5468697320746f6b656e20686173206e6f74206265656e206465706f7369746560008201527f6400000000000000000000000000000000000000000000000000000000000000602082015250565b600061298b60218361259b565b91506129968261292f565b604082019050919050565b600060208201905081810360008301526129ba8161297e565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000612a1d60268361259b565b9150612a28826129c1565b604082019050919050565b60006020820190508181036000830152612a4c81612a10565b9050919050565b7f5061757361626c653a206e6f7420706175736564000000000000000000000000600082015250565b6000612a8960148361259b565b9150612a9482612a53565b602082019050919050565b60006020820190508181036000830152612ab881612a7c565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f456e756d657261626c655365743a20696e646578206f7574206f6620626f756e60008201527f6473000000000000000000000000000000000000000000000000000000000000602082015250565b6000612b4a60228361259b565b9150612b5582612aee565b604082019050919050565b60006020820190508181036000830152612b7981612b3d565b905091905056fea26469706673582212202a6d17e257e50695ae275a5790a2b8abc676482061126ace166849b6cebe44da64736f6c6343000809003300000000000000000000000047d989965498ebae3590091f7758b86b8e706345000000000000000000000000000000000000000000000000003b363eba41aaaa00000000000000000000000000000000000000000000000000000000014e2ae0000000000000000000000000cbba83a4d3f35d294a26012ac54e9ab6627da018

Deployed Bytecode

0x608060405234801561001057600080fd5b5060043610610175576000357c0100000000000000000000000000000000000000000000000000000000900480635eac6239116100e0578063983d95ce11610099578063983d95ce14610396578063abb91ef5146103b2578063b343ae14146103e2578063c01195c914610412578063e3a9db1a14610430578063f2fde38b1461046057610175565b80635eac62391461030e5780636486035a1461032a578063715018a6146103485780638456cb59146103525780638da5cb5b1461035c57806390107afe1461037a57610175565b80633f4ba83a116101325780633f4ba83a146102605780634fb9c7c91461026a578063515a20ba1461029a57806356e2e0f1146102b6578063598b8e71146102d45780635c975abb146102f057610175565b8063068c526f1461017a578063150b7a02146101aa5780631852e8d9146101da5780632c4e722e1461020a578063315a095d1461022857806334fcf43714610244575b600080fd5b610194600480360381019061018f9190611f12565b61047c565b6040516101a19190611f7d565b60405180910390f35b6101c460048036038101906101bf919061204d565b6104de565b6040516101d1919061210b565b60405180910390f35b6101f460048036038101906101ef9190612126565b61050e565b6040516102019190611f7d565b60405180910390f35b610212610696565b60405161021f9190611f7d565b60405180910390f35b610242600480360381019061023d9190612166565b61069c565b005b61025e60048036038101906102599190612166565b6107e7565b005b61026861086d565b005b610284600480360381019061027f9190611f12565b6108f3565b60405161029191906121ae565b60405180910390f35b6102b460048036038101906102af9190612166565b610ab9565b005b6102be610b4a565b6040516102cb9190611f7d565b60405180910390f35b6102ee60048036038101906102e99190612224565b610b50565b005b6102f8610dff565b60405161030591906121ae565b60405180910390f35b61032860048036038101906103239190612224565b610e15565b005b61033261100a565b60405161033f91906122d0565b60405180910390f35b610350611030565b005b61035a61116a565b005b6103646111f0565b60405161037191906122fa565b60405180910390f35b610394600480360381019061038f9190612315565b611219565b005b6103b060048036038101906103ab9190612224565b61131b565b005b6103cc60048036038101906103c79190611f12565b61156d565b6040516103d991906121ae565b60405180910390f35b6103fc60048036038101906103f79190612126565b611619565b6040516104099190611f7d565b60405180910390f35b61041a61163e565b6040516104279190612376565b60405180910390f35b61044a60048036038101906104459190612391565b611664565b604051610457919061247c565b60405180910390f35b61047a60048036038101906104759190612391565b611761565b005b6000806000905060005b83518110156104d3576104b3858583815181106104a6576104a561249e565b5b602002602001015161050e565b826104be91906124fc565b915080806104cb90612552565b915050610486565b508091505092915050565b600063150b7a027c0100000000000000000000000000000000000000000000000000000000029050949350505050565b6000600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008381526020019081526020016000205461056d4360045461190a565b10156105ae576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105a5906125f8565b60405180910390fd5b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008381526020019081526020016000205461060b4360045461190a565b6106159190612618565b61066683600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002061192390919063ffffffff16565b610671576000610674565b60015b60ff16600354610684919061264c565b61068e919061264c565b905092915050565b60035481565b6106a461193d565b73ffffffffffffffffffffffffffffffffffffffff166106c26111f0565b73ffffffffffffffffffffffffffffffffffffffff1614610718576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161070f906126f2565b60405180910390fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401610791929190612712565b602060405180830381600087803b1580156107ab57600080fd5b505af11580156107bf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107e39190612767565b5050565b6107ef61193d565b73ffffffffffffffffffffffffffffffffffffffff1661080d6111f0565b73ffffffffffffffffffffffffffffffffffffffff1614610863576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085a906126f2565b60405180910390fd5b8060038190555050565b61087561193d565b73ffffffffffffffffffffffffffffffffffffffff166108936111f0565b73ffffffffffffffffffffffffffffffffffffffff16146108e9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108e0906126f2565b60405180910390fd5b6108f1611945565b565b600080600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905060005b8351811015610aac576109708482815181106109595761095861249e565b5b60200260200101518361192390919063ffffffff16565b158015610a8957508473ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e8684815181106109e0576109df61249e565b5b60200260200101516040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401610a209190611f7d565b60206040518083038186803b158015610a3857600080fd5b505afa158015610a4c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a7091906127a9565b73ffffffffffffffffffffffffffffffffffffffff1614155b15610a9957600092505050610ab3565b8080610aa490612552565b91505061093a565b5060019150505b92915050565b610ac161193d565b73ffffffffffffffffffffffffffffffffffffffff16610adf6111f0565b73ffffffffffffffffffffffffffffffffffffffff1614610b35576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b2c906126f2565b60405180910390fd5b8043610b4191906124fc565b60048190555050565b60045481565b610b58610dff565b15610b98576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b8f90612822565b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610c29576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c209061288e565b60405180910390fd5b6000610c374360045461190a565b905060005b83839050811015610df957600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b88d4fde3330878786818110610c9a57610c9961249e565b5b905060200201356040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401610cdb939291906128e5565b600060405180830381600087803b158015610cf557600080fd5b505af1158015610d09573d6000803e3d6000fd5b50505050610d77848483818110610d2357610d2261249e565b5b90506020020135600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206119e690919063ffffffff16565b5081600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000868685818110610dcd57610dcc61249e565b5b905060200201358152602001908152602001600020819055508080610df190612552565b915050610c3c565b50505050565b60008060149054906101000a900460ff16905090565b610e1d610dff565b15610e5d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e5490612822565b60405180910390fd5b600080610e6c4360045461190a565b905060005b84849050811015610f2d57610e9f33868684818110610e9357610e9261249e565b5b9050602002013561050e565b83610eaa91906124fc565b925081600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000878785818110610f0157610f0061249e565b5b905060200201358152602001908152602001600020819055508080610f2590612552565b915050610e71565b50600082111561100457600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33846040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401610fb0929190612712565b602060405180830381600087803b158015610fca57600080fd5b505af1158015610fde573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110029190612767565b505b50505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61103861193d565b73ffffffffffffffffffffffffffffffffffffffff166110566111f0565b73ffffffffffffffffffffffffffffffffffffffff16146110ac576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110a3906126f2565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b61117261193d565b73ffffffffffffffffffffffffffffffffffffffff166111906111f0565b73ffffffffffffffffffffffffffffffffffffffff16146111e6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111dd906126f2565b60405180910390fd5b6111ee611a00565b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b61122161193d565b73ffffffffffffffffffffffffffffffffffffffff1661123f6111f0565b73ffffffffffffffffffffffffffffffffffffffff1614611295576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161128c906126f2565b60405180910390fd5b81600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b611323610dff565b15611363576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161135a90612822565b60405180910390fd5b61136d8282610e15565b60005b82829050811015611568576113e58383838181106113915761139061249e565b5b90506020020135600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002061192390919063ffffffff16565b611424576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161141b906129a1565b60405180910390fd5b61148e83838381811061143a5761143961249e565b5b90506020020135600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611aa390919063ffffffff16565b50600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b88d4fde30338686868181106114e2576114e161249e565b5b905060200201356040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401611523939291906128e5565b600060405180830381600087803b15801561153d57600080fd5b505af1158015611551573d6000803e3d6000fd5b50505050808061156090612552565b915050611370565b505050565b600080600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905060005b835181101561160c576115ea8482815181106115d3576115d261249e565b5b60200260200101518361192390919063ffffffff16565b6115f957600092505050611613565b808061160490612552565b9150506115b4565b5060019150505b92915050565b6006602052816000526040600020602052806000526040600020600091509150505481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60606000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905060006116b482611abd565b67ffffffffffffffff8111156116cd576116cc611d99565b5b6040519080825280602002602001820160405280156116fb5781602001602082028036833780820191505090505b50905060005b61170a83611abd565b811015611756576117248184611ad290919063ffffffff16565b8282815181106117375761173661249e565b5b602002602001018181525050808061174e90612552565b915050611701565b508092505050919050565b61176961193d565b73ffffffffffffffffffffffffffffffffffffffff166117876111f0565b73ffffffffffffffffffffffffffffffffffffffff16146117dd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117d4906126f2565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561184d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161184490612a33565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000818310611919578161191b565b825b905092915050565b60006119358360000183600102611aed565b905092915050565b600033905090565b61194d610dff565b61198c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161198390612a9f565b60405180910390fd5b60008060146101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6119cf61193d565b6040516119dc91906122fa565b60405180910390a1565b60006119f88360000183600102611b10565b905092915050565b611a08610dff565b15611a48576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a3f90612822565b60405180910390fd5b6001600060146101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611a8c61193d565b604051611a9991906122fa565b60405180910390a1565b6000611ab58360000183600102611b80565b905092915050565b6000611acb82600001611c8c565b9050919050565b6000611ae18360000183611c9d565b60019004905092915050565b600080836001016000848152602001908152602001600020541415905092915050565b6000611b1c8383611aed565b611b75578260000182908060018154018082558091505060019003906000526020600020016000909190919091505582600001805490508360010160008481526020019081526020016000208190555060019050611b7a565b600090505b92915050565b60008083600101600084815260200190815260200160002054905060008114611c80576000600182611bb29190612618565b9050600060018660000180549050611bca9190612618565b90506000866000018281548110611be457611be361249e565b5b9060005260206000200154905080876000018481548110611c0857611c0761249e565b5b9060005260206000200181905550838760010160008381526020019081526020016000208190555086600001805480611c4457611c43612abf565b5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050611c86565b60009150505b92915050565b600081600001805490509050919050565b600081836000018054905011611ce8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cdf90612b60565b60405180910390fd5b826000018281548110611cfe57611cfd61249e565b5b9060005260206000200154905092915050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611d5082611d25565b9050919050565b611d6081611d45565b8114611d6b57600080fd5b50565b600081359050611d7d81611d57565b92915050565b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b611dd182611d88565b810181811067ffffffffffffffff82111715611df057611def611d99565b5b80604052505050565b6000611e03611d11565b9050611e0f8282611dc8565b919050565b600067ffffffffffffffff821115611e2f57611e2e611d99565b5b602082029050602081019050919050565b600080fd5b6000819050919050565b611e5881611e45565b8114611e6357600080fd5b50565b600081359050611e7581611e4f565b92915050565b6000611e8e611e8984611e14565b611df9565b90508083825260208201905060208402830185811115611eb157611eb0611e40565b5b835b81811015611eda5780611ec68882611e66565b845260208401935050602081019050611eb3565b5050509392505050565b600082601f830112611ef957611ef8611d83565b5b8135611f09848260208601611e7b565b91505092915050565b60008060408385031215611f2957611f28611d1b565b5b6000611f3785828601611d6e565b925050602083013567ffffffffffffffff811115611f5857611f57611d20565b5b611f6485828601611ee4565b9150509250929050565b611f7781611e45565b82525050565b6000602082019050611f926000830184611f6e565b92915050565b600080fd5b600067ffffffffffffffff821115611fb857611fb7611d99565b5b611fc182611d88565b9050602081019050919050565b82818337600083830152505050565b6000611ff0611feb84611f9d565b611df9565b90508281526020810184848401111561200c5761200b611f98565b5b612017848285611fce565b509392505050565b600082601f83011261203457612033611d83565b5b8135612044848260208601611fdd565b91505092915050565b6000806000806080858703121561206757612066611d1b565b5b600061207587828801611d6e565b945050602061208687828801611d6e565b935050604061209787828801611e66565b925050606085013567ffffffffffffffff8111156120b8576120b7611d20565b5b6120c48782880161201f565b91505092959194509250565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b612105816120d0565b82525050565b600060208201905061212060008301846120fc565b92915050565b6000806040838503121561213d5761213c611d1b565b5b600061214b85828601611d6e565b925050602061215c85828601611e66565b9150509250929050565b60006020828403121561217c5761217b611d1b565b5b600061218a84828501611e66565b91505092915050565b60008115159050919050565b6121a881612193565b82525050565b60006020820190506121c3600083018461219f565b92915050565b600080fd5b60008083601f8401126121e4576121e3611d83565b5b8235905067ffffffffffffffff811115612201576122006121c9565b5b60208301915083602082028301111561221d5761221c611e40565b5b9250929050565b6000806020838503121561223b5761223a611d1b565b5b600083013567ffffffffffffffff81111561225957612258611d20565b5b612265858286016121ce565b92509250509250929050565b6000819050919050565b600061229661229161228c84611d25565b612271565b611d25565b9050919050565b60006122a88261227b565b9050919050565b60006122ba8261229d565b9050919050565b6122ca816122af565b82525050565b60006020820190506122e560008301846122c1565b92915050565b6122f481611d45565b82525050565b600060208201905061230f60008301846122eb565b92915050565b6000806040838503121561232c5761232b611d1b565b5b600061233a85828601611d6e565b925050602061234b85828601611d6e565b9150509250929050565b60006123608261229d565b9050919050565b61237081612355565b82525050565b600060208201905061238b6000830184612367565b92915050565b6000602082840312156123a7576123a6611d1b565b5b60006123b584828501611d6e565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6123f381611e45565b82525050565b600061240583836123ea565b60208301905092915050565b6000602082019050919050565b6000612429826123be565b61243381856123c9565b935061243e836123da565b8060005b8381101561246f57815161245688826123f9565b975061246183612411565b925050600181019050612442565b5085935050505092915050565b60006020820190508181036000830152612496818461241e565b905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061250782611e45565b915061251283611e45565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115612547576125466124cd565b5b828201905092915050565b600061255d82611e45565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156125905761258f6124cd565b5b600182019050919050565b600082825260208201905092915050565b7f496e76616c696420626c6f636b206e756d626572730000000000000000000000600082015250565b60006125e260158361259b565b91506125ed826125ac565b602082019050919050565b60006020820190508181036000830152612611816125d5565b9050919050565b600061262382611e45565b915061262e83611e45565b925082821015612641576126406124cd565b5b828203905092915050565b600061265782611e45565b915061266283611e45565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561269b5761269a6124cd565b5b828202905092915050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006126dc60208361259b565b91506126e7826126a6565b602082019050919050565b6000602082019050818103600083015261270b816126cf565b9050919050565b600060408201905061272760008301856122eb565b6127346020830184611f6e565b9392505050565b61274481612193565b811461274f57600080fd5b50565b6000815190506127618161273b565b92915050565b60006020828403121561277d5761277c611d1b565b5b600061278b84828501612752565b91505092915050565b6000815190506127a381611d57565b92915050565b6000602082840312156127bf576127be611d1b565b5b60006127cd84828501612794565b91505092915050565b7f5061757361626c653a2070617573656400000000000000000000000000000000600082015250565b600061280c60108361259b565b9150612817826127d6565b602082019050919050565b6000602082019050818103600083015261283b816127ff565b9050919050565b7f496e76616c696420616464726573730000000000000000000000000000000000600082015250565b6000612878600f8361259b565b915061288382612842565b602082019050919050565b600060208201905081810360008301526128a78161286b565b9050919050565b600082825260208201905092915050565b50565b60006128cf6000836128ae565b91506128da826128bf565b600082019050919050565b60006080820190506128fa60008301866122eb565b61290760208301856122eb565b6129146040830184611f6e565b8181036060830152612925816128c2565b9050949350505050565b7f5468697320746f6b656e20686173206e6f74206265656e206465706f7369746560008201527f6400000000000000000000000000000000000000000000000000000000000000602082015250565b600061298b60218361259b565b91506129968261292f565b604082019050919050565b600060208201905081810360008301526129ba8161297e565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000612a1d60268361259b565b9150612a28826129c1565b604082019050919050565b60006020820190508181036000830152612a4c81612a10565b9050919050565b7f5061757361626c653a206e6f7420706175736564000000000000000000000000600082015250565b6000612a8960148361259b565b9150612a9482612a53565b602082019050919050565b60006020820190508181036000830152612ab881612a7c565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f456e756d657261626c655365743a20696e646578206f7574206f6620626f756e60008201527f6473000000000000000000000000000000000000000000000000000000000000602082015250565b6000612b4a60228361259b565b9150612b5582612aee565b604082019050919050565b60006020820190508181036000830152612b7981612b3d565b905091905056fea26469706673582212202a6d17e257e50695ae275a5790a2b8abc676482061126ace166849b6cebe44da64736f6c63430008090033

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

00000000000000000000000047d989965498ebae3590091f7758b86b8e706345000000000000000000000000000000000000000000000000003b363eba41aaaa00000000000000000000000000000000000000000000000000000000014e2ae0000000000000000000000000cbba83a4d3f35d294a26012ac54e9ab6627da018

-----Decoded View---------------
Arg [0] : genesisLeadersContractAddress (address): 0x47D989965498EBAe3590091F7758b86b8e706345
Arg [1] : initialRate (uint256): 16666666666666666
Arg [2] : numberOfExpirationBlocks (uint256): 21900000
Arg [3] : roarTokenAddress (address): 0xcbbA83a4d3F35D294A26012AC54e9ab6627da018

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 00000000000000000000000047d989965498ebae3590091f7758b86b8e706345
Arg [1] : 000000000000000000000000000000000000000000000000003b363eba41aaaa
Arg [2] : 00000000000000000000000000000000000000000000000000000000014e2ae0
Arg [3] : 000000000000000000000000cbba83a4d3f35d294a26012ac54e9ab6627da018


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.