ETH Price: $1,811.23 (+10.76%)

Contract

0x86CB1a6F17EcC8A6D27BedE6F9DE5081fF9A99e8
 

Overview

ETH Balance

0 ETH

ETH Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Set Buyback Addr...7943222024-03-14 6:40:59405 days ago1710398459IN
0x86CB1a6F...1fF9A99e8
0 ETH00.00000026
Grant Role7303302024-03-12 19:07:55406 days ago1710270475IN
0x86CB1a6F...1fF9A99e8
0 ETH00.00000026
0x608060407302792024-03-12 19:06:13406 days ago1710270373IN
 Create: Referral
0 ETH00.00000026
VIEW ADVANCED FILTER

Latest 25 internal transactions (View All)

Parent Transaction Hash Block From To
58849212024-07-10 2:47:37287 days ago1720579657
0x86CB1a6F...1fF9A99e8
0.00228258 ETH
58849212024-07-10 2:47:37287 days ago1720579657
0x86CB1a6F...1fF9A99e8
0.00228258 ETH
58848292024-07-10 2:44:33287 days ago1720579473
0x86CB1a6F...1fF9A99e8
0.00228258 ETH
58848292024-07-10 2:44:33287 days ago1720579473
0x86CB1a6F...1fF9A99e8
0.00228258 ETH
55547222024-07-02 11:20:59295 days ago1719919259
0x86CB1a6F...1fF9A99e8
0.00406094 ETH
55547222024-07-02 11:20:59295 days ago1719919259
0x86CB1a6F...1fF9A99e8
0.00406094 ETH
53383552024-06-27 11:08:45300 days ago1719486525
0x86CB1a6F...1fF9A99e8
0.00206433 ETH
53383552024-06-27 11:08:45300 days ago1719486525
0x86CB1a6F...1fF9A99e8
0.00206433 ETH
53212382024-06-27 1:38:11300 days ago1719452291
0x86CB1a6F...1fF9A99e8
0.00207219 ETH
53212382024-06-27 1:38:11300 days ago1719452291
0x86CB1a6F...1fF9A99e8
0.00207219 ETH
53211892024-06-27 1:36:33300 days ago1719452193
0x86CB1a6F...1fF9A99e8
0.00207219 ETH
53211892024-06-27 1:36:33300 days ago1719452193
0x86CB1a6F...1fF9A99e8
0.00207219 ETH
53211452024-06-27 1:35:05300 days ago1719452105
0x86CB1a6F...1fF9A99e8
0.00207219 ETH
53211452024-06-27 1:35:05300 days ago1719452105
0x86CB1a6F...1fF9A99e8
0.00207219 ETH
53210822024-06-27 1:32:59300 days ago1719451979
0x86CB1a6F...1fF9A99e8
0.00207219 ETH
53210822024-06-27 1:32:59300 days ago1719451979
0x86CB1a6F...1fF9A99e8
0.00207219 ETH
53210142024-06-27 1:30:43300 days ago1719451843
0x86CB1a6F...1fF9A99e8
0.00207219 ETH
53210142024-06-27 1:30:43300 days ago1719451843
0x86CB1a6F...1fF9A99e8
0.00207219 ETH
53209502024-06-27 1:28:35300 days ago1719451715
0x86CB1a6F...1fF9A99e8
0.00207219 ETH
53209502024-06-27 1:28:35300 days ago1719451715
0x86CB1a6F...1fF9A99e8
0.00207219 ETH
49521712024-06-18 12:35:57308 days ago1718714157
0x86CB1a6F...1fF9A99e8
0.00206003 ETH
49521712024-06-18 12:35:57308 days ago1718714157
0x86CB1a6F...1fF9A99e8
0.00206003 ETH
47292192024-06-13 8:44:13314 days ago1718268253
0x86CB1a6F...1fF9A99e8
0.00398698 ETH
47292192024-06-13 8:44:13314 days ago1718268253
0x86CB1a6F...1fF9A99e8
0.00398698 ETH
45222032024-06-08 13:43:41318 days ago1717854221
0x86CB1a6F...1fF9A99e8
0.00190206 ETH
View All Internal Transactions

Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Referral

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 1200 runs

Other Settings:
default evmVersion
File 1 of 12 : Referral.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;

import { AccessControl } from "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import {Withdrawable} from '../utils/Withdrawable.sol';

contract Referral is AccessControl, Withdrawable {
  using SafeMath for uint;

  bytes32 public constant OPERATOR_ROLE = keccak256("OPERATOR_ROLE");

  /**
   * @dev Max referral level depth
   */
  uint8 constant MAX_REFER_DEPTH = 3;

  /**
   * @dev Max referee amount to bonus rate depth
   */
  uint8 constant MAX_REFEREE_BONUS_LEVEL = 3;


  /**
   * @dev The struct of account information
   * @param referrer The referrer addresss
   * @param reward The total referral reward of an address
   * @param referredCount The total referral amount of an address
   * @param lastActiveTimestamp The last active timestamp of an address
   */
  struct Account {
    address payable referrer;
    uint reward;
    uint referredCount;
    uint lastActiveTimestamp;
    bool noReferrer;
    bool referrerEnable;
  }

  /**
   * @dev The struct of referee amount to bonus rate
   * @param lowerBound The minial referee amount
   * @param rate The bonus rate for each referee amount
   */
  struct RefereeBonusRate {
    uint lowerBound;
    uint rate;
  }

  event SetNoReferer(address referee);
  event SetReferrerEnable(address referrer);
  event RegisteredReferer(address referee, address referrer);
  event RegisteredRefererFailed(address referee, address referrer, string reason);
  event PaidReferral(address from, address to, uint amount, uint level);
  event UpdatedUserLastActiveTime(address user, uint timestamp);

  mapping(address => Account) public accounts;

  address public buybackAddress;
  uint256[] levelRate;
  uint256 public referralBonus;
  uint256 public decimals;
  uint256 secondsUntilInactive;
  bool onlyRewardActiveReferrers;
  RefereeBonusRate[] refereeBonusRateMap;

  /**
   * @param _decimals The base decimals for float calc, for example 1000
   * @param _referralBonus The total referral bonus rate, which will divide by decimals. For example, If you will like to set as 5%, it can set as 50 when decimals is 1000.
   * @param _secondsUntilInactive The seconds that a user does not update will be seen as inactive.
   * @param _onlyRewardActiveReferrers The flag to enable not paying to inactive uplines.
   * @param _levelRate The bonus rate for each level, which will divide by decimals too. The max depth is MAX_REFER_DEPTH.
   * @param _refereeBonusRateMap The bonus rate mapping to each referree amount, which will divide by decimals too. The max depth is MAX_REFER_DEPTH.
   * The map should be pass as [<lower amount>, <rate>, ....]. For example, you should pass [1, 250, 5, 500, 10, 1000] when decimals is 1000 for the following case.
   *
   *  25%     50%     100%
   *   | ----- | ----- |----->
   *  1ppl    5ppl    10ppl
   *
   * @notice refereeBonusRateMap's lower amount should be ascending
   */
  constructor(
    uint _decimals,
    uint _referralBonus,
    uint _secondsUntilInactive,
    bool _onlyRewardActiveReferrers,
    uint256[] memory _levelRate,
    uint256[] memory _refereeBonusRateMap,
    address _buybackAddress
  ) {
    require(_levelRate.length > 0, "Referral level should be at least one");
    require(_levelRate.length <= MAX_REFER_DEPTH, "Exceeded max referral level depth");
    require(_refereeBonusRateMap.length % 2 == 0, "Referee Bonus Rate Map should be pass as [<lower amount>, <rate>, ....]");
    require(_refereeBonusRateMap.length / 2 <= MAX_REFEREE_BONUS_LEVEL, "Exceeded max referree bonus level depth");
    require(_referralBonus <= _decimals, "Referral bonus exceeds 100%");
    require(sum(_levelRate) <= _decimals, "Total level rate exceeds 100%");

    _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);
    decimals = _decimals;
    referralBonus = _referralBonus;
    secondsUntilInactive = _secondsUntilInactive;
    onlyRewardActiveReferrers = _onlyRewardActiveReferrers;
    levelRate = _levelRate;
    buybackAddress = _buybackAddress;

    // Set default referee amount rate as 1ppl -> 100% if rate map is empty.
    if (_refereeBonusRateMap.length == 0) {
      refereeBonusRateMap.push(RefereeBonusRate(1, decimals));
      return;
    }

    for (uint i; i < _refereeBonusRateMap.length; i += 2) {
      if (_refereeBonusRateMap[i+1] > decimals) {
        revert("One of referee bonus rate exceeds 100%");
      }
      // Cause we can't pass struct or nested array without enabling experimental ABIEncoderV2, use array to simulate it
      refereeBonusRateMap.push(RefereeBonusRate(_refereeBonusRateMap[i], _refereeBonusRateMap[i+1]));
    }
  }

  function sum(uint[] memory data) public pure returns (uint) {
    uint S;
    for(uint i;i < data.length;i++) {
      S += data[i];
    }
    return S;
  }


  /**
   * @dev Utils function for check whether an address has the referrer
   */
  function hasReferrer(address addr) public view returns(bool){
    return accounts[addr].referrer != address(0);
  }

  /**
   * @dev Get block timestamp with function for testing mock
   */
  function getTime() public view returns(uint256) {
    return block.timestamp; // solium-disable-line security/no-block-members
  }

  /**
   * @dev Given a user amount to calc in which rate period
   * @param amount The number of referrees
   */
  function getRefereeBonusRate(uint256 amount) public view returns(uint256) {
    uint rate = refereeBonusRateMap[0].rate;
    for(uint i = 1; i < refereeBonusRateMap.length; i++) {
      if (amount < refereeBonusRateMap[i].lowerBound) {
        break;
      }
      rate = refereeBonusRateMap[i].rate;
    }
    return rate;
  }

  function isCircularReference(address referrer, address referee) internal view returns(bool){
    address parent = referrer;

    for (uint i; i < levelRate.length; i++) {
      if (parent == address(0)) {
        break;
      }

      if (parent == referee) {
        return true;
      }

      parent = accounts[parent].referrer;
    }

    return false;
  }

  function calculateReferralAmount(uint256 amount) external view returns(uint256){
    return amount * referralBonus / decimals;
  }

  function setNoReferrer(address referee) external onlyRole(OPERATOR_ROLE) {
    if (accounts[referee].noReferrer == false && accounts[referee].referredCount == 0) {
      accounts[referee].noReferrer = true;
      emit SetNoReferer(referee);
    }
  }

  function setReferrerEnable(address referrer) external onlyRole(OPERATOR_ROLE) {
    if (accounts[referrer].referrerEnable == false) {
      accounts[referrer].referrerEnable = true;
      emit SetReferrerEnable(referrer);
    }
  }

  /**
   * @dev Add an address as referrer
   * @param referrer The address would set as referrer of msg.sender
   * @return whether success to add upline
   */
  function addReferrer(address payable referrer) external onlyRole(OPERATOR_ROLE) returns(bool){
    return _addReferrer(referrer, msg.sender);
  }

  function addReferrer(address payable referrer, address referee) external onlyRole(OPERATOR_ROLE) returns(bool){
    return _addReferrer(referrer, referee);
  }

  function _addReferrer(address payable referrer, address referee) internal returns(bool) {
    if (accounts[referee].noReferrer) {
      emit RegisteredRefererFailed(referee, referrer, "Referee already use platform before");
      return false;
    } else if (!accounts[referrer].referrerEnable) {
      emit RegisteredRefererFailed(referee, referrer, "Referrer is not enable");
      return false;
    } else if (referrer == address(0)) {
      emit RegisteredRefererFailed(referee, referrer, "Referrer cannot be 0x0 address");
      return false;
    } else if (isCircularReference(referrer, referee)) {
      emit RegisteredRefererFailed(referee, referrer, "Referee cannot be one of referrer uplines");
      return false;
    } else if (accounts[referee].referrer != address(0)) {
      emit RegisteredRefererFailed(referee, referrer, "Address have been registered upline");
      return false;
    }

    Account storage userAccount = accounts[referee];
    Account storage parentAccount = accounts[referrer];

    userAccount.referrer = referrer;
    userAccount.lastActiveTimestamp = getTime();
    parentAccount.referredCount = parentAccount.referredCount.add(1);

    emit RegisteredReferer(referee, referrer);
    return true;
  }

  /**
   * @dev This will calc and pay referral to uplines instantly
   * @param value The number tokens will be calculated in referral process
   * @return the total referral bonus paid
   */
  function payReferral(uint256 value) external onlyRole(OPERATOR_ROLE) returns(uint256){
    return _payReferral(value, msg.sender);
  }

  function payReferral(uint256 value, address referee) external onlyRole(OPERATOR_ROLE) returns(uint256){
    return _payReferral(value, referee);
  }

  function _payReferral(uint256 value, address referee) internal returns(uint256){
    uint bonusAmount = value.mul(referralBonus).div(decimals);
    Account memory userAccount = accounts[referee];
    uint totalReferal;

    for (uint i; i < levelRate.length; i++) {
      address payable parent = userAccount.referrer;
      Account storage parentAccount = accounts[userAccount.referrer];

      if (parent == address(0)) {
        break;
      }

      if(onlyRewardActiveReferrers && parentAccount.lastActiveTimestamp.add(secondsUntilInactive) >= getTime() || !onlyRewardActiveReferrers) {
        uint c = bonusAmount.mul(levelRate[i]).div(decimals);
        c = c.mul(getRefereeBonusRate(parentAccount.referredCount)).div(decimals);

        totalReferal = totalReferal.add(c);

        parentAccount.reward = parentAccount.reward.add(c);

        parent.transfer(c);
        emit PaidReferral(referee, parent, c, i + 1);
      }

      userAccount = parentAccount;
    }

    if (bonusAmount.sub(totalReferal) > 0) {
      payable(buybackAddress).transfer(bonusAmount.sub(totalReferal));
    }

    updateActiveTimestamp(referee);
    return totalReferal;
  }

  /**
   * @dev Developers should define what kind of actions are seens active. By default, payReferral will active msg.sender.
   * @param user The address would like to update active time
   */
  function updateActiveTimestamp(address user) internal {
    uint timestamp = getTime();
    accounts[user].lastActiveTimestamp = timestamp;
    emit UpdatedUserLastActiveTime(user, timestamp);
  }

  function setSecondsUntilInactive(uint _secondsUntilInactive) public onlyRole(DEFAULT_ADMIN_ROLE) {
    secondsUntilInactive = _secondsUntilInactive;
  }

  function setOnlyRewardAActiveReferrers(bool _onlyRewardActiveReferrers) public onlyRole(DEFAULT_ADMIN_ROLE) {
    onlyRewardActiveReferrers = _onlyRewardActiveReferrers;
  }

  function setBuybackAddress(address _buybackAddress) public onlyRole(DEFAULT_ADMIN_ROLE) {
    buybackAddress = _buybackAddress;
  }
}

File 2 of 12 : AccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/AccessControl.sol)

pragma solidity ^0.8.0;

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

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

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

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

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

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

    /**
     * @dev Revert with a standard message if `_msgSender()` is missing `role`.
     * Overriding this function changes the behavior of the {onlyRole} modifier.
     *
     * Format of the revert message is described in {_checkRole}.
     *
     * _Available since v4.6._
     */
    function _checkRole(bytes32 role) internal view virtual {
        _checkRole(role, _msgSender());
    }

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

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

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

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

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

        _revokeRole(role, account);
    }

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

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

    /**
     * @dev Grants `role` to `account`.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleGranted} event.
     */
    function _grantRole(bytes32 role, address account) internal virtual {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleRevoked} event.
     */
    function _revokeRole(bytes32 role, address account) internal virtual {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

File 3 of 12 : IAccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

File 4 of 12 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @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);

    /**
     * @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 `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, 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 `from` to `to` 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 from, address to, uint256 amount) external returns (bool);
}

File 5 of 12 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)

pragma solidity ^0.8.0;

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

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

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

File 6 of 12 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

File 7 of 12 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

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

File 8 of 12 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    enum Rounding {
        Down, // Toward negative infinity
        Up, // Toward infinity
        Zero // Toward zero
    }

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

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

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

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

    /**
     * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
     * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
     * with further edits by Uniswap Labs also under MIT license.
     */
    function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {
        unchecked {
            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
            // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
            // variables such that product = prod1 * 2^256 + prod0.
            uint256 prod0; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(x, y, not(0))
                prod0 := mul(x, y)
                prod1 := sub(sub(mm, prod0), lt(mm, prod0))
            }

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                // Solidity will revert if denominator == 0, unlike the div opcode on its own.
                // The surrounding unchecked block does not change this fact.
                // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            require(denominator > prod1, "Math: mulDiv overflow");

            ///////////////////////////////////////////////
            // 512 by 256 division.
            ///////////////////////////////////////////////

            // Make division exact by subtracting the remainder from [prod1 prod0].
            uint256 remainder;
            assembly {
                // Compute remainder using mulmod.
                remainder := mulmod(x, y, denominator)

                // Subtract 256 bit number from 512 bit number.
                prod1 := sub(prod1, gt(remainder, prod0))
                prod0 := sub(prod0, remainder)
            }

            // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.
            // See https://cs.stackexchange.com/q/138556/92363.

            // Does not overflow because the denominator cannot be zero at this stage in the function.
            uint256 twos = denominator & (~denominator + 1);
            assembly {
                // Divide denominator by twos.
                denominator := div(denominator, twos)

                // Divide [prod1 prod0] by twos.
                prod0 := div(prod0, twos)

                // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
                twos := add(div(sub(0, twos), twos), 1)
            }

            // Shift in bits from prod1 into prod0.
            prod0 |= prod1 * twos;

            // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
            // four bits. That is, denominator * inv = 1 mod 2^4.
            uint256 inverse = (3 * denominator) ^ 2;

            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works
            // in modular arithmetic, doubling the correct bits in each step.
            inverse *= 2 - denominator * inverse; // inverse mod 2^8
            inverse *= 2 - denominator * inverse; // inverse mod 2^16
            inverse *= 2 - denominator * inverse; // inverse mod 2^32
            inverse *= 2 - denominator * inverse; // inverse mod 2^64
            inverse *= 2 - denominator * inverse; // inverse mod 2^128
            inverse *= 2 - denominator * inverse; // inverse mod 2^256

            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
            // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
            // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
            // is no longer required.
            result = prod0 * inverse;
            return result;
        }
    }

    /**
     * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
     */
    function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {
        uint256 result = mulDiv(x, y, denominator);
        if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
            result += 1;
        }
        return result;
    }

    /**
     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.
     *
     * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
     */
    function sqrt(uint256 a) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }

        // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
        //
        // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
        // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
        //
        // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
        // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
        // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
        //
        // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
        uint256 result = 1 << (log2(a) >> 1);

        // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
        // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
        // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
        // into the expected uint128 result.
        unchecked {
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            return min(result, a / result);
        }
    }

    /**
     * @notice Calculates sqrt(a), following the selected rounding direction.
     */
    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = sqrt(a);
            return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 2, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 128;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 64;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 32;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 16;
            }
            if (value >> 8 > 0) {
                value >>= 8;
                result += 8;
            }
            if (value >> 4 > 0) {
                value >>= 4;
                result += 4;
            }
            if (value >> 2 > 0) {
                value >>= 2;
                result += 2;
            }
            if (value >> 1 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log2(value);
            return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 10, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >= 10 ** 64) {
                value /= 10 ** 64;
                result += 64;
            }
            if (value >= 10 ** 32) {
                value /= 10 ** 32;
                result += 32;
            }
            if (value >= 10 ** 16) {
                value /= 10 ** 16;
                result += 16;
            }
            if (value >= 10 ** 8) {
                value /= 10 ** 8;
                result += 8;
            }
            if (value >= 10 ** 4) {
                value /= 10 ** 4;
                result += 4;
            }
            if (value >= 10 ** 2) {
                value /= 10 ** 2;
                result += 2;
            }
            if (value >= 10 ** 1) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log10(value);
            return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 256, rounded down, of a positive value.
     * Returns 0 if given 0.
     *
     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
     */
    function log256(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 16;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 8;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 4;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 2;
            }
            if (value >> 8 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 256, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log256(value);
            return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);
        }
    }
}

File 9 of 12 : SafeMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/SafeMath.sol)

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
            // benefit is lost if 'b' is also tested.
            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
            if (a == 0) return (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        return a + b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        return a * b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        unchecked {
            require(b <= a, errorMessage);
            return a - b;
        }
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a / b;
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

File 10 of 12 : SignedMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)

pragma solidity ^0.8.0;

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

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

    /**
     * @dev Returns the average of two signed numbers without overflow.
     * The result is rounded towards zero.
     */
    function average(int256 a, int256 b) internal pure returns (int256) {
        // Formula from the book "Hacker's Delight"
        int256 x = (a & b) + ((a ^ b) >> 1);
        return x + (int256(uint256(x) >> 255) & (a ^ b));
    }

    /**
     * @dev Returns the absolute unsigned value of a signed value.
     */
    function abs(int256 n) internal pure returns (uint256) {
        unchecked {
            // must be unchecked in order to support `n = type(int256).min`
            return uint256(n >= 0 ? n : -n);
        }
    }
}

File 11 of 12 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

import "./math/Math.sol";
import "./math/SignedMath.sol";

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _SYMBOLS = "0123456789abcdef";
    uint8 private constant _ADDRESS_LENGTH = 20;

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        unchecked {
            uint256 length = Math.log10(value) + 1;
            string memory buffer = new string(length);
            uint256 ptr;
            /// @solidity memory-safe-assembly
            assembly {
                ptr := add(buffer, add(32, length))
            }
            while (true) {
                ptr--;
                /// @solidity memory-safe-assembly
                assembly {
                    mstore8(ptr, byte(mod(value, 10), _SYMBOLS))
                }
                value /= 10;
                if (value == 0) break;
            }
            return buffer;
        }
    }

    /**
     * @dev Converts a `int256` to its ASCII `string` decimal representation.
     */
    function toString(int256 value) internal pure returns (string memory) {
        return string(abi.encodePacked(value < 0 ? "-" : "", toString(SignedMath.abs(value))));
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        unchecked {
            return toHexString(value, Math.log256(value) + 1);
        }
    }

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

    /**
     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
     */
    function toHexString(address addr) internal pure returns (string memory) {
        return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
    }

    /**
     * @dev Returns true if the two strings are equal.
     */
    function equal(string memory a, string memory b) internal pure returns (bool) {
        return keccak256(bytes(a)) == keccak256(bytes(b));
    }
}

File 12 of 12 : Withdrawable.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import { AccessControl } from "@openzeppelin/contracts/access/AccessControl.sol";
import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";


contract Withdrawable is AccessControl {
    function withdraw(address payable to) public onlyRole(DEFAULT_ADMIN_ROLE) {
        to.transfer(address(this).balance);
    }

    function recoverFunds(address token, address to, uint256 amount) public onlyRole(DEFAULT_ADMIN_ROLE) {
        IERC20(token).transfer(to, amount);
    }

    receive() external payable {}
}

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

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"uint256","name":"_decimals","type":"uint256"},{"internalType":"uint256","name":"_referralBonus","type":"uint256"},{"internalType":"uint256","name":"_secondsUntilInactive","type":"uint256"},{"internalType":"bool","name":"_onlyRewardActiveReferrers","type":"bool"},{"internalType":"uint256[]","name":"_levelRate","type":"uint256[]"},{"internalType":"uint256[]","name":"_refereeBonusRateMap","type":"uint256[]"},{"internalType":"address","name":"_buybackAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"level","type":"uint256"}],"name":"PaidReferral","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"referee","type":"address"},{"indexed":false,"internalType":"address","name":"referrer","type":"address"}],"name":"RegisteredReferer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"referee","type":"address"},{"indexed":false,"internalType":"address","name":"referrer","type":"address"},{"indexed":false,"internalType":"string","name":"reason","type":"string"}],"name":"RegisteredRefererFailed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"referee","type":"address"}],"name":"SetNoReferer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"referrer","type":"address"}],"name":"SetReferrerEnable","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"UpdatedUserLastActiveTime","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OPERATOR_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"accounts","outputs":[{"internalType":"address payable","name":"referrer","type":"address"},{"internalType":"uint256","name":"reward","type":"uint256"},{"internalType":"uint256","name":"referredCount","type":"uint256"},{"internalType":"uint256","name":"lastActiveTimestamp","type":"uint256"},{"internalType":"bool","name":"noReferrer","type":"bool"},{"internalType":"bool","name":"referrerEnable","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"referrer","type":"address"},{"internalType":"address","name":"referee","type":"address"}],"name":"addReferrer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"referrer","type":"address"}],"name":"addReferrer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"buybackAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"calculateReferralAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"getRefereeBonusRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"hasReferrer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"name":"payReferral","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"address","name":"referee","type":"address"}],"name":"payReferral","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"recoverFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"referralBonus","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_buybackAddress","type":"address"}],"name":"setBuybackAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"referee","type":"address"}],"name":"setNoReferrer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_onlyRewardActiveReferrers","type":"bool"}],"name":"setOnlyRewardAActiveReferrers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"referrer","type":"address"}],"name":"setReferrerEnable","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_secondsUntilInactive","type":"uint256"}],"name":"setSecondsUntilInactive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"data","type":"uint256[]"}],"name":"sum","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"to","type":"address"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60806040523480156200001157600080fd5b50604051620024bd380380620024bd833981016040819052620000349162000702565b6000835111620000995760405162461bcd60e51b815260206004820152602560248201527f526566657272616c206c6576656c2073686f756c64206265206174206c65617360448201526474206f6e6560d81b60648201526084015b60405180910390fd5b825160031015620000f75760405162461bcd60e51b815260206004820152602160248201527f4578636565646564206d617820726566657272616c206c6576656c20646570746044820152600d60fb1b606482015260840162000090565b60028251620001079190620007dc565b156200018c5760405162461bcd60e51b815260206004820152604760248201527f5265666572656520426f6e75732052617465204d61702073686f756c6420626560448201527f2070617373206173205b3c6c6f77657220616d6f756e743e2c203c726174653e6064820152662c202e2e2e2e5d60c81b608482015260a40162000090565b81516003906200019f9060029062000809565b1115620001ff5760405162461bcd60e51b815260206004820152602760248201527f4578636565646564206d617820726566657272656520626f6e7573206c6576656044820152660d840c8cae0e8d60cb1b606482015260840162000090565b86861115620002515760405162461bcd60e51b815260206004820152601b60248201527f526566657272616c20626f6e7573206578636565647320313030250000000000604482015260640162000090565b866200025d84620004d5565b1115620002ad5760405162461bcd60e51b815260206004820152601d60248201527f546f74616c206c6576656c207261746520657863656564732031303025000000604482015260640162000090565b620002ba6000336200052d565b6005879055600486905560068590556007805460ff19168515151790558251620002ec906003906020860190620005e1565b50600280546001600160a01b0319166001600160a01b038316179055815160000362000390576040805180820190915260018082526005546020830190815260088054928301815560005291517ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee360029092029182015590517ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee490910155620004c8565b60005b8251811015620004c65760055483620003ae83600162000820565b81518110620003c157620003c162000836565b60200260200101511115620004285760405162461bcd60e51b815260206004820152602660248201527f4f6e65206f66207265666572656520626f6e757320726174652065786365656460448201526573203130302560d01b606482015260840162000090565b600860405180604001604052808584815181106200044a576200044a62000836565b602002602001015181526020018584600162000467919062000820565b815181106200047a576200047a62000836565b6020908102919091018101519091528254600181810185556000948552938290208351600292830290910190815592909101519190920155620004be908262000820565b905062000393565b505b5050505050505062000868565b60008060005b83518110156200052657838181518110620004fa57620004fa62000836565b6020026020010151826200050f919062000820565b9150806200051d816200084c565b915050620004db565b5092915050565b620005398282620005b6565b620005b2576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620005713390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff165b92915050565b8280548282559060005260206000209081019282156200061f579160200282015b828111156200061f57825182559160200191906001019062000602565b506200062d92915062000631565b5090565b5b808211156200062d576000815560010162000632565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200067057600080fd5b815160206001600160401b03808311156200068f576200068f62000648565b8260051b604051601f19603f83011681018181108482111715620006b757620006b762000648565b604052938452858101830193838101925087851115620006d657600080fd5b83870191505b84821015620006f757815183529183019190830190620006dc565b979650505050505050565b600080600080600080600060e0888a0312156200071e57600080fd5b875196506020880151955060408801519450606088015180151581146200074457600080fd5b60808901519094506001600160401b03808211156200076257600080fd5b620007708b838c016200065e565b945060a08a01519150808211156200078757600080fd5b50620007968a828b016200065e565b60c08a015190935090506001600160a01b0381168114620007b657600080fd5b8091505092959891949750929550565b634e487b7160e01b600052601260045260246000fd5b600082620007ee57620007ee620007c6565b500690565b634e487b7160e01b600052601160045260246000fd5b6000826200081b576200081b620007c6565b500490565b80820180821115620005db57620005db620007f3565b634e487b7160e01b600052603260045260246000fd5b600060018201620008615762000861620007f3565b5060010190565b611c4580620008786000396000f3fe6080604052600436106101bb5760003560e01c80635d3590d5116100ec578063cc2fbd661161008a578063d547741f11610064578063d547741f146105a3578063db1058a9146105c3578063f5b541a6146105e3578063fefa9bb11461061757600080fd5b8063cc2fbd6614610535578063ce7842f51461056d578063cf29e0c91461058357600080fd5b806387892629116100c6578063878926291461049c57806391d14854146104bc578063a217fddf14610500578063b94265b81461051557600080fd5b80635d3590d5146103c05780635e5c06e2146103e05780637e88880d1461047c57600080fd5b80632b74cdb01161015957806336568abe1161013357806336568abe1461034d578063447e78f51461036d57806351cff8d91461038d578063557ed1ba146103ad57600080fd5b80632b74cdb0146102f75780632f2ff15d14610317578063313ce5671461033757600080fd5b806318452cd81161019557806318452cd81461024c57806319e6d26f14610287578063248a9ca3146102a757806326c82ecd146102d757600080fd5b80630194db8e146101c757806301ffc9a7146101fa578063140421261461022a57600080fd5b366101c257005b600080fd5b3480156101d357600080fd5b506101e76101e236600461184a565b610637565b6040519081526020015b60405180910390f35b34801561020657600080fd5b5061021a610215366004611908565b610686565b60405190151581526020016101f1565b34801561023657600080fd5b5061024a61024536600461195f565b61071f565b005b34801561025857600080fd5b5061021a61026736600461195f565b6001600160a01b0390811660009081526001602052604090205416151590565b34801561029357600080fd5b506101e76102a236600461197c565b6107d7565b3480156102b357600080fd5b506101e76102c236600461197c565b60009081526020819052604090206001015490565b3480156102e357600080fd5b506101e76102f236600461197c565b610814565b34801561030357600080fd5b5061024a61031236600461195f565b610831565b34801561032357600080fd5b5061024a610332366004611995565b6108fd565b34801561034357600080fd5b506101e760055481565b34801561035957600080fd5b5061024a610368366004611995565b610927565b34801561037957600080fd5b5061024a61038836600461197c565b6109b4565b34801561039957600080fd5b5061024a6103a836600461195f565b6109c5565b3480156103b957600080fd5b50426101e7565b3480156103cc57600080fd5b5061024a6103db3660046119c5565b610a05565b3480156103ec57600080fd5b506104416103fb36600461195f565b6001602081905260009182526040909120805491810154600282015460038301546004909301546001600160a01b03909416939192909160ff8082169161010090041686565b604080516001600160a01b039097168752602087019590955293850192909252606084015215156080830152151560a082015260c0016101f1565b34801561048857600080fd5b5061024a61049736600461195f565b610aa3565b3480156104a857600080fd5b506101e76104b736600461197c565b610ade565b3480156104c857600080fd5b5061021a6104d7366004611995565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561050c57600080fd5b506101e7600081565b34801561052157600080fd5b5061021a610530366004611a06565b610b7f565b34801561054157600080fd5b50600254610555906001600160a01b031681565b6040516001600160a01b0390911681526020016101f1565b34801561057957600080fd5b506101e760045481565b34801561058f57600080fd5b506101e761059e366004611995565b610bbd565b3480156105af57600080fd5b5061024a6105be366004611995565b610bf3565b3480156105cf57600080fd5b5061024a6105de366004611a42565b610c18565b3480156105ef57600080fd5b506101e77f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b92981565b34801561062357600080fd5b5061021a61063236600461195f565b610c37565b60008060005b835181101561067f5783818151811061065857610658611a5f565b60200260200101518261066b9190611a8b565b91508061067781611a9e565b91505061063d565b5092915050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b00000000000000000000000000000000000000000000000000000000148061071957507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b7f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b92961074981610c6d565b6001600160a01b038216600090815260016020526040812060040154610100900460ff16151590036107d3576001600160a01b038216600081815260016020908152604091829020600401805461ff00191661010017905590519182527f79291f99b61ef2a3ef352e3383eea910f4c2d02f2247da847288acebc66f958691015b60405180910390a15b5050565b60007f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b92961080381610c6d565b61080d8333610c7a565b9392505050565b6000600554600454836108279190611ab7565b6107199190611ace565b7f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b92961085b81610c6d565b6001600160a01b03821660009081526001602052604090206004015460ff161580156108a057506001600160a01b038216600090815260016020526040902060020154155b156107d3576001600160a01b038216600081815260016020818152604092839020600401805460ff191690921790915590519182527f6de6fdf89d456cdf13716c5fb84613bcea7013779e6934b00b5a7d4b626e1d1891016107ca565b60008281526020819052604090206001015461091881610c6d565b6109228383610f55565b505050565b6001600160a01b03811633146109aa5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b6107d38282610ff3565b60006109bf81610c6d565b50600655565b60006109d081610c6d565b6040516001600160a01b038316904780156108fc02916000818181858888f19350505050158015610922573d6000803e3d6000fd5b6000610a1081610c6d565b6040517fa9059cbb0000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301526024820184905285169063a9059cbb906044016020604051808303816000875af1158015610a78573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a9c9190611af0565b5050505050565b6000610aae81610c6d565b506002805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6000806008600081548110610af557610af5611a5f565b90600052602060002090600202016001015490506000600190505b60085481101561067f5760088181548110610b2d57610b2d611a5f565b906000526020600020906002020160000154841061067f5760088181548110610b5857610b58611a5f565b90600052602060002090600202016001015491508080610b7790611a9e565b915050610b10565b60007f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b929610bab81610c6d565b610bb58484611072565b949350505050565b60007f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b929610be981610c6d565b610bb58484610c7a565b600082815260208190526040902060010154610c0e81610c6d565b6109228383610ff3565b6000610c2381610c6d565b506007805460ff1916911515919091179055565b60007f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b929610c6381610c6d565b61080d8333611072565b610c77813361147f565b50565b600080610c9e600554610c98600454876114f290919063ffffffff16565b906114fe565b6001600160a01b038085166000908152600160208181526040808420815160c081018352815490961686529283015491850191909152600282015490840152600381015460608401526004015460ff8082161515608085015261010090910416151560a083015291925090805b600354811015610eed5782516001600160a01b038116600081815260016020526040902090610d3b575050610eed565b60075460ff168015610d5d5750426006546003830154610d5a9161150a565b10155b80610d6b575060075460ff16155b15610e80576000610da8600554610c9860038781548110610d8e57610d8e611a5f565b90600052602060002001548a6114f290919063ffffffff16565b9050610dc7600554610c98610dc08560020154610ade565b84906114f2565b9050610dd3858261150a565b6001830154909550610de5908261150a565b60018301556040516001600160a01b0384169082156108fc029083906000818181858888f19350505050158015610e20573d6000803e3d6000fd5b507f3eb64e24c53fdbac5e2f9a92ef0865a35f6777db50dd26bc5d3f813e7ec44d05898483610e50886001611a8b565b604080516001600160a01b03958616815294909316602085015291830152606082015260800160405180910390a1505b6040805160c08101825282546001600160a01b03168152600183015460208201526002830154918101919091526003820154606082015260049091015460ff8082161515608084015261010090910416151560a08201529350819050610ee581611a9e565b915050610d0b565b506000610efa8483611516565b1115610f43576002546001600160a01b03166108fc610f198584611516565b6040518115909202916000818181858888f19350505050158015610f41573d6000803e3d6000fd5b505b610f4c85611522565b95945050505050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff166107d3576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055610faf3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16156107d3576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6001600160a01b03811660009081526001602052604081206004015460ff161561114157604080516001600160a01b0380851682528516602082015260609181018290526023918101919091527f5265666572656520616c72656164792075736520706c6174666f726d2062656660808201527f6f7265000000000000000000000000000000000000000000000000000000000060a08201527f63a04625ee50186097257e079ace9a312982f1976bdffa769db82a83c2ffc0069060c0015b60405180910390a1506000610719565b6001600160a01b038316600090815260016020526040902060040154610100900460ff166111e257604080516001600160a01b0380851682528516602082015260609181018290526016918101919091527f5265666572726572206973206e6f7420656e61626c650000000000000000000060808201527f63a04625ee50186097257e079ace9a312982f1976bdffa769db82a83c2ffc0069060a001611131565b6001600160a01b03831661126957604080516001600160a01b038085168252851660208201526060918101829052601e918101919091527f52656665727265722063616e6e6f74206265203078302061646472657373000060808201527f63a04625ee50186097257e079ace9a312982f1976bdffa769db82a83c2ffc0069060a001611131565b611273838361157c565b1561131757604080516001600160a01b0380851682528516602082015260609181018290526029918101919091527f526566657265652063616e6e6f74206265206f6e65206f66207265666572726560808201527f722075706c696e6573000000000000000000000000000000000000000000000060a08201527f63a04625ee50186097257e079ace9a312982f1976bdffa769db82a83c2ffc0069060c001611131565b6001600160a01b0382811660009081526001602052604090205416156113d657604080516001600160a01b0380851682528516602082015260609181018290526023918101919091527f416464726573732068617665206265656e20726567697374657265642075706c60808201527f696e65000000000000000000000000000000000000000000000000000000000060a08201527f63a04625ee50186097257e079ace9a312982f1976bdffa769db82a83c2ffc0069060c001611131565b6001600160a01b038281166000908152600160205260408082209286168083529120825473ffffffffffffffffffffffffffffffffffffffff19169091178255426003830155600281015461142c90600161150a565b6002820155604080516001600160a01b038087168252871660208201527ffaf63637882ff2d63ca76881cf92fb857130e36f350c926f9cc884b499b42b77910160405180910390a1506001949350505050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff166107d3576114b0816115f9565b6114bb83602061160b565b6040516020016114cc929190611b31565b60408051601f198184030181529082905262461bcd60e51b82526109a191600401611bb2565b600061080d8284611ab7565b600061080d8284611ace565b600061080d8284611a8b565b600061080d8284611be5565b6000426001600160a01b038316600081815260016020908152604091829020600301849055815192835282018390529192507f0186c8486ec4ff89359fec8af5f6a89cbdbaa26a8e9fe4bb2f15eb86b8513cb891016107ca565b600082815b6003548110156115ee576001600160a01b038216156115ee57836001600160a01b0316826001600160a01b0316036115be57600192505050610719565b6001600160a01b0391821660009081526001602052604090205490911690806115e681611a9e565b915050611581565b506000949350505050565b60606107196001600160a01b03831660145b6060600061161a836002611ab7565b611625906002611a8b565b67ffffffffffffffff81111561163d5761163d611834565b6040519080825280601f01601f191660200182016040528015611667576020820181803683370190505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061169e5761169e611a5f565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061170157611701611a5f565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600061173d846002611ab7565b611748906001611a8b565b90505b60018111156117e5577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061178957611789611a5f565b1a60f81b82828151811061179f5761179f611a5f565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c936117de81611bf8565b905061174b565b50831561080d5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016109a1565b634e487b7160e01b600052604160045260246000fd5b6000602080838503121561185d57600080fd5b823567ffffffffffffffff8082111561187557600080fd5b818501915085601f83011261188957600080fd5b81358181111561189b5761189b611834565b8060051b604051601f19603f830116810181811085821117156118c0576118c0611834565b6040529182528482019250838101850191888311156118de57600080fd5b938501935b828510156118fc578435845293850193928501926118e3565b98975050505050505050565b60006020828403121561191a57600080fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461080d57600080fd5b6001600160a01b0381168114610c7757600080fd5b60006020828403121561197157600080fd5b813561080d8161194a565b60006020828403121561198e57600080fd5b5035919050565b600080604083850312156119a857600080fd5b8235915060208301356119ba8161194a565b809150509250929050565b6000806000606084860312156119da57600080fd5b83356119e58161194a565b925060208401356119f58161194a565b929592945050506040919091013590565b60008060408385031215611a1957600080fd5b8235611a248161194a565b915060208301356119ba8161194a565b8015158114610c7757600080fd5b600060208284031215611a5457600080fd5b813561080d81611a34565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8082018082111561071957610719611a75565b600060018201611ab057611ab0611a75565b5060010190565b808202811582820484141761071957610719611a75565b600082611aeb57634e487b7160e01b600052601260045260246000fd5b500490565b600060208284031215611b0257600080fd5b815161080d81611a34565b60005b83811015611b28578181015183820152602001611b10565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351611b69816017850160208801611b0d565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351611ba6816028840160208801611b0d565b01602801949350505050565b6020815260008251806020840152611bd1816040850160208701611b0d565b601f01601f19169190910160400192915050565b8181038181111561071957610719611a75565b600081611c0757611c07611a75565b50600019019056fea2646970667358221220c4804bbb536f3e914079b4b617d366f317e3b72daaabb9258183d47d4df580f864736f6c63430008110033000000000000000000000000000000000000000000000000000000000098968000000000000000000000000000000000000000000000000000000000000aae600000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000056f9a000000000000000000000000000000000000000000000000000000000002ab980000000000000000000000000000000000000000000000000000000000016e360000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000989680

Deployed Bytecode

0x6080604052600436106101bb5760003560e01c80635d3590d5116100ec578063cc2fbd661161008a578063d547741f11610064578063d547741f146105a3578063db1058a9146105c3578063f5b541a6146105e3578063fefa9bb11461061757600080fd5b8063cc2fbd6614610535578063ce7842f51461056d578063cf29e0c91461058357600080fd5b806387892629116100c6578063878926291461049c57806391d14854146104bc578063a217fddf14610500578063b94265b81461051557600080fd5b80635d3590d5146103c05780635e5c06e2146103e05780637e88880d1461047c57600080fd5b80632b74cdb01161015957806336568abe1161013357806336568abe1461034d578063447e78f51461036d57806351cff8d91461038d578063557ed1ba146103ad57600080fd5b80632b74cdb0146102f75780632f2ff15d14610317578063313ce5671461033757600080fd5b806318452cd81161019557806318452cd81461024c57806319e6d26f14610287578063248a9ca3146102a757806326c82ecd146102d757600080fd5b80630194db8e146101c757806301ffc9a7146101fa578063140421261461022a57600080fd5b366101c257005b600080fd5b3480156101d357600080fd5b506101e76101e236600461184a565b610637565b6040519081526020015b60405180910390f35b34801561020657600080fd5b5061021a610215366004611908565b610686565b60405190151581526020016101f1565b34801561023657600080fd5b5061024a61024536600461195f565b61071f565b005b34801561025857600080fd5b5061021a61026736600461195f565b6001600160a01b0390811660009081526001602052604090205416151590565b34801561029357600080fd5b506101e76102a236600461197c565b6107d7565b3480156102b357600080fd5b506101e76102c236600461197c565b60009081526020819052604090206001015490565b3480156102e357600080fd5b506101e76102f236600461197c565b610814565b34801561030357600080fd5b5061024a61031236600461195f565b610831565b34801561032357600080fd5b5061024a610332366004611995565b6108fd565b34801561034357600080fd5b506101e760055481565b34801561035957600080fd5b5061024a610368366004611995565b610927565b34801561037957600080fd5b5061024a61038836600461197c565b6109b4565b34801561039957600080fd5b5061024a6103a836600461195f565b6109c5565b3480156103b957600080fd5b50426101e7565b3480156103cc57600080fd5b5061024a6103db3660046119c5565b610a05565b3480156103ec57600080fd5b506104416103fb36600461195f565b6001602081905260009182526040909120805491810154600282015460038301546004909301546001600160a01b03909416939192909160ff8082169161010090041686565b604080516001600160a01b039097168752602087019590955293850192909252606084015215156080830152151560a082015260c0016101f1565b34801561048857600080fd5b5061024a61049736600461195f565b610aa3565b3480156104a857600080fd5b506101e76104b736600461197c565b610ade565b3480156104c857600080fd5b5061021a6104d7366004611995565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561050c57600080fd5b506101e7600081565b34801561052157600080fd5b5061021a610530366004611a06565b610b7f565b34801561054157600080fd5b50600254610555906001600160a01b031681565b6040516001600160a01b0390911681526020016101f1565b34801561057957600080fd5b506101e760045481565b34801561058f57600080fd5b506101e761059e366004611995565b610bbd565b3480156105af57600080fd5b5061024a6105be366004611995565b610bf3565b3480156105cf57600080fd5b5061024a6105de366004611a42565b610c18565b3480156105ef57600080fd5b506101e77f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b92981565b34801561062357600080fd5b5061021a61063236600461195f565b610c37565b60008060005b835181101561067f5783818151811061065857610658611a5f565b60200260200101518261066b9190611a8b565b91508061067781611a9e565b91505061063d565b5092915050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b00000000000000000000000000000000000000000000000000000000148061071957507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b7f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b92961074981610c6d565b6001600160a01b038216600090815260016020526040812060040154610100900460ff16151590036107d3576001600160a01b038216600081815260016020908152604091829020600401805461ff00191661010017905590519182527f79291f99b61ef2a3ef352e3383eea910f4c2d02f2247da847288acebc66f958691015b60405180910390a15b5050565b60007f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b92961080381610c6d565b61080d8333610c7a565b9392505050565b6000600554600454836108279190611ab7565b6107199190611ace565b7f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b92961085b81610c6d565b6001600160a01b03821660009081526001602052604090206004015460ff161580156108a057506001600160a01b038216600090815260016020526040902060020154155b156107d3576001600160a01b038216600081815260016020818152604092839020600401805460ff191690921790915590519182527f6de6fdf89d456cdf13716c5fb84613bcea7013779e6934b00b5a7d4b626e1d1891016107ca565b60008281526020819052604090206001015461091881610c6d565b6109228383610f55565b505050565b6001600160a01b03811633146109aa5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b6107d38282610ff3565b60006109bf81610c6d565b50600655565b60006109d081610c6d565b6040516001600160a01b038316904780156108fc02916000818181858888f19350505050158015610922573d6000803e3d6000fd5b6000610a1081610c6d565b6040517fa9059cbb0000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301526024820184905285169063a9059cbb906044016020604051808303816000875af1158015610a78573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a9c9190611af0565b5050505050565b6000610aae81610c6d565b506002805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6000806008600081548110610af557610af5611a5f565b90600052602060002090600202016001015490506000600190505b60085481101561067f5760088181548110610b2d57610b2d611a5f565b906000526020600020906002020160000154841061067f5760088181548110610b5857610b58611a5f565b90600052602060002090600202016001015491508080610b7790611a9e565b915050610b10565b60007f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b929610bab81610c6d565b610bb58484611072565b949350505050565b60007f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b929610be981610c6d565b610bb58484610c7a565b600082815260208190526040902060010154610c0e81610c6d565b6109228383610ff3565b6000610c2381610c6d565b506007805460ff1916911515919091179055565b60007f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b929610c6381610c6d565b61080d8333611072565b610c77813361147f565b50565b600080610c9e600554610c98600454876114f290919063ffffffff16565b906114fe565b6001600160a01b038085166000908152600160208181526040808420815160c081018352815490961686529283015491850191909152600282015490840152600381015460608401526004015460ff8082161515608085015261010090910416151560a083015291925090805b600354811015610eed5782516001600160a01b038116600081815260016020526040902090610d3b575050610eed565b60075460ff168015610d5d5750426006546003830154610d5a9161150a565b10155b80610d6b575060075460ff16155b15610e80576000610da8600554610c9860038781548110610d8e57610d8e611a5f565b90600052602060002001548a6114f290919063ffffffff16565b9050610dc7600554610c98610dc08560020154610ade565b84906114f2565b9050610dd3858261150a565b6001830154909550610de5908261150a565b60018301556040516001600160a01b0384169082156108fc029083906000818181858888f19350505050158015610e20573d6000803e3d6000fd5b507f3eb64e24c53fdbac5e2f9a92ef0865a35f6777db50dd26bc5d3f813e7ec44d05898483610e50886001611a8b565b604080516001600160a01b03958616815294909316602085015291830152606082015260800160405180910390a1505b6040805160c08101825282546001600160a01b03168152600183015460208201526002830154918101919091526003820154606082015260049091015460ff8082161515608084015261010090910416151560a08201529350819050610ee581611a9e565b915050610d0b565b506000610efa8483611516565b1115610f43576002546001600160a01b03166108fc610f198584611516565b6040518115909202916000818181858888f19350505050158015610f41573d6000803e3d6000fd5b505b610f4c85611522565b95945050505050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff166107d3576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055610faf3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16156107d3576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6001600160a01b03811660009081526001602052604081206004015460ff161561114157604080516001600160a01b0380851682528516602082015260609181018290526023918101919091527f5265666572656520616c72656164792075736520706c6174666f726d2062656660808201527f6f7265000000000000000000000000000000000000000000000000000000000060a08201527f63a04625ee50186097257e079ace9a312982f1976bdffa769db82a83c2ffc0069060c0015b60405180910390a1506000610719565b6001600160a01b038316600090815260016020526040902060040154610100900460ff166111e257604080516001600160a01b0380851682528516602082015260609181018290526016918101919091527f5265666572726572206973206e6f7420656e61626c650000000000000000000060808201527f63a04625ee50186097257e079ace9a312982f1976bdffa769db82a83c2ffc0069060a001611131565b6001600160a01b03831661126957604080516001600160a01b038085168252851660208201526060918101829052601e918101919091527f52656665727265722063616e6e6f74206265203078302061646472657373000060808201527f63a04625ee50186097257e079ace9a312982f1976bdffa769db82a83c2ffc0069060a001611131565b611273838361157c565b1561131757604080516001600160a01b0380851682528516602082015260609181018290526029918101919091527f526566657265652063616e6e6f74206265206f6e65206f66207265666572726560808201527f722075706c696e6573000000000000000000000000000000000000000000000060a08201527f63a04625ee50186097257e079ace9a312982f1976bdffa769db82a83c2ffc0069060c001611131565b6001600160a01b0382811660009081526001602052604090205416156113d657604080516001600160a01b0380851682528516602082015260609181018290526023918101919091527f416464726573732068617665206265656e20726567697374657265642075706c60808201527f696e65000000000000000000000000000000000000000000000000000000000060a08201527f63a04625ee50186097257e079ace9a312982f1976bdffa769db82a83c2ffc0069060c001611131565b6001600160a01b038281166000908152600160205260408082209286168083529120825473ffffffffffffffffffffffffffffffffffffffff19169091178255426003830155600281015461142c90600161150a565b6002820155604080516001600160a01b038087168252871660208201527ffaf63637882ff2d63ca76881cf92fb857130e36f350c926f9cc884b499b42b77910160405180910390a1506001949350505050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff166107d3576114b0816115f9565b6114bb83602061160b565b6040516020016114cc929190611b31565b60408051601f198184030181529082905262461bcd60e51b82526109a191600401611bb2565b600061080d8284611ab7565b600061080d8284611ace565b600061080d8284611a8b565b600061080d8284611be5565b6000426001600160a01b038316600081815260016020908152604091829020600301849055815192835282018390529192507f0186c8486ec4ff89359fec8af5f6a89cbdbaa26a8e9fe4bb2f15eb86b8513cb891016107ca565b600082815b6003548110156115ee576001600160a01b038216156115ee57836001600160a01b0316826001600160a01b0316036115be57600192505050610719565b6001600160a01b0391821660009081526001602052604090205490911690806115e681611a9e565b915050611581565b506000949350505050565b60606107196001600160a01b03831660145b6060600061161a836002611ab7565b611625906002611a8b565b67ffffffffffffffff81111561163d5761163d611834565b6040519080825280601f01601f191660200182016040528015611667576020820181803683370190505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061169e5761169e611a5f565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061170157611701611a5f565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600061173d846002611ab7565b611748906001611a8b565b90505b60018111156117e5577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061178957611789611a5f565b1a60f81b82828151811061179f5761179f611a5f565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c936117de81611bf8565b905061174b565b50831561080d5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016109a1565b634e487b7160e01b600052604160045260246000fd5b6000602080838503121561185d57600080fd5b823567ffffffffffffffff8082111561187557600080fd5b818501915085601f83011261188957600080fd5b81358181111561189b5761189b611834565b8060051b604051601f19603f830116810181811085821117156118c0576118c0611834565b6040529182528482019250838101850191888311156118de57600080fd5b938501935b828510156118fc578435845293850193928501926118e3565b98975050505050505050565b60006020828403121561191a57600080fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461080d57600080fd5b6001600160a01b0381168114610c7757600080fd5b60006020828403121561197157600080fd5b813561080d8161194a565b60006020828403121561198e57600080fd5b5035919050565b600080604083850312156119a857600080fd5b8235915060208301356119ba8161194a565b809150509250929050565b6000806000606084860312156119da57600080fd5b83356119e58161194a565b925060208401356119f58161194a565b929592945050506040919091013590565b60008060408385031215611a1957600080fd5b8235611a248161194a565b915060208301356119ba8161194a565b8015158114610c7757600080fd5b600060208284031215611a5457600080fd5b813561080d81611a34565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8082018082111561071957610719611a75565b600060018201611ab057611ab0611a75565b5060010190565b808202811582820484141761071957610719611a75565b600082611aeb57634e487b7160e01b600052601260045260246000fd5b500490565b600060208284031215611b0257600080fd5b815161080d81611a34565b60005b83811015611b28578181015183820152602001611b10565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351611b69816017850160208801611b0d565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351611ba6816028840160208801611b0d565b01602801949350505050565b6020815260008251806020840152611bd1816040850160208701611b0d565b601f01601f19169190910160400192915050565b8181038181111561071957610719611a75565b600081611c0757611c07611a75565b50600019019056fea2646970667358221220c4804bbb536f3e914079b4b617d366f317e3b72daaabb9258183d47d4df580f864736f6c63430008110033

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

000000000000000000000000000000000000000000000000000000000098968000000000000000000000000000000000000000000000000000000000000aae600000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000056f9a000000000000000000000000000000000000000000000000000000000002ab980000000000000000000000000000000000000000000000000000000000016e360000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000989680

-----Decoded View---------------
Arg [0] : _decimals (uint256): 10000000
Arg [1] : _referralBonus (uint256): 700000
Arg [2] : _secondsUntilInactive (uint256): 1
Arg [3] : _onlyRewardActiveReferrers (bool): False
Arg [4] : _levelRate (uint256[]): 5700000,2800000,1500000
Arg [5] : _refereeBonusRateMap (uint256[]): 1,10000000
Arg [6] : _buybackAddress (address): 0x0000000000000000000000000000000000000000

-----Encoded View---------------
14 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000989680
Arg [1] : 00000000000000000000000000000000000000000000000000000000000aae60
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [4] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000160
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [8] : 000000000000000000000000000000000000000000000000000000000056f9a0
Arg [9] : 00000000000000000000000000000000000000000000000000000000002ab980
Arg [10] : 000000000000000000000000000000000000000000000000000000000016e360
Arg [11] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [12] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [13] : 0000000000000000000000000000000000000000000000000000000000989680


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
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

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