ETH Price: $2,952.26 (-1.94%)

Contract

0x00aa056a05A8e67602dE6F090f072089541E2678
 

Overview

ETH Balance

0 ETH

ETH Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Block
From
To
Transfer Ownersh...50389782024-06-20 12:49:31587 days ago1718887771IN
0x00aa056a...9541E2678
0 ETH0.000005360.18546902
Configure Blast ...50384682024-06-20 12:32:31587 days ago1718886751IN
0x00aa056a...9541E2678
0 ETH0.000059720.20891535

View more zero value Internal Transactions in Advanced View mode

Advanced mode:

Cross-Chain Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
StakingContractBlast

Compiler Version
v0.8.23+commit.f704f362

Optimization Enabled:
Yes with 800 runs

Other Settings:
paris EvmVersion
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.23;

import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/Pausable.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

import "./blast/IBlastPoints.sol";
import "./blast/IBlast.sol";
import "./blast/IERC20Rebasing.sol";

import "./staking/Misc.sol";

contract StakingContractBlast is Ownable, ReentrancyGuard, Pausable {
   constructor(ConstructorParams memory params) Ownable(params.superOwner) {
      _token = IERC20(params.tokenAddress);
      _tokenSymbol = params.tokenSymbol;
      _tokenDecimals = params.tokenDecimals;

      _period0Duration = params.period0Duration;
      _period1Duration = params.period1Duration;
      _period2Duration = params.period2Duration;

      _period0Price = params.period0Price;
      _period1Price = params.period1Price;
      _period2Price = params.period2Price;

      _period0MaxAmount = params.period0MaxAmount;
      _period1MaxAmount = params.period1MaxAmount;
      _period2MaxAmount = params.period2MaxAmount;

      _period0MaxAmountPerAccount = params.period0MaxAmountPerAccount;
      _period1MaxAmountPerAccount = params.period1MaxAmountPerAccount;
      _period2MaxAmountPerAccount = params.period2MaxAmountPerAccount;
   }

   // members ------------------------------------------------------

   IERC20 public immutable _token;
   string public _tokenSymbol;
   uint8 public immutable _tokenDecimals;

   uint64 public _period0Duration;
   uint64 public _period1Duration;
   uint64 public _period2Duration;
   uint256 public immutable _period0Price;
   uint256 public immutable _period1Price;
   uint256 public immutable _period2Price;
   uint256 public immutable _period0MaxAmount;
   uint256 public immutable _period1MaxAmount;
   uint256 public immutable _period2MaxAmount;
   uint256 public immutable _period0MaxAmountPerAccount;
   uint256 public immutable _period1MaxAmountPerAccount;
   uint256 public immutable _period2MaxAmountPerAccount;

   uint256 public _period0AmountsCounter;
   uint256 public _period1AmountsCounter;
   uint256 public _period2AmountsCounter;

   uint64 public _depositsCounter;
   uint256 public _allDepositsAmountCounter;

   address[] public _accounts;
   bytes32[] public _depositIds;

   mapping(address => uint256) public _period0AmountCounters;
   mapping(address => uint256) public _period1AmountCounters;
   mapping(address => uint256) public _period2AmountCounters;

   mapping(address => uint64) public _depositCounters;
   mapping(bytes32 => DepositInfo) public _deposits;

   IBlast public constant _BLAST = IBlast(0x4300000000000000000000000000000000000002);
   IERC20Rebasing public _USDB;
   IERC20Rebasing public _WETHB;
   address public _blastPointsAddress;
   address public _blastPointsOperator;

   // events -------------------------------------------------------

   event ClaimYieldAll(
      address indexed recipient,
      uint256 amountWETH,
      uint256 amountUSDB,
      uint256 amountGas
   );
   event ClaimGas(address indexed recipient, uint256 amount);
   event Deposit(
      address indexed account,
      string depositId,
      uint256 amount,
      uint64 createdAt,
      uint64 availableFrom
   );
   event Withdraw(address indexed account, string depositId, uint256 amount, uint64 createdAt);

   // functions ----------------------------------------------------

   function getCurrentTime() internal view returns (uint64) {
      return uint64(block.timestamp);
   }

   function getAccountsCount() public view returns (uint256) {
      return _accounts.length;
   }

   function getBasicStat() external view returns (BasicStat memory) {
      BasicStat memory res;
      res.allDepositsAmount = _allDepositsAmountCounter;
      res.period0MaxAmount = _period0MaxAmount;
      res.period0AmountsCounter = _period0AmountsCounter;
      res.period1MaxAmount = _period1MaxAmount;
      res.period1AmountsCounter = _period1AmountsCounter;
      res.period2MaxAmount = _period2MaxAmount;
      res.period2AmountsCounter = _period2AmountsCounter;

      return res;
   }

   /**
    * Return true if Account is already exists in account-list.
    *
    * @param account Account to check
    */
   function _accountExists(address account) private view returns (bool) {
      bool found = false;
      for (uint i = 0; i < _accounts.length; ++i) {
         if (_accounts[i] == account) {
            found = true;
            break;
         }
      }
      return found;
   }

   /**
    * Get all Account's Deposits.
    *
    * @param account Account for which information is needed
    */
   function getAccountDeposits(address account) public view returns (DepositInfo[] memory) {
      uint depositsCount = _depositCounters[account];
      if (depositsCount == 0) {
         DepositInfo[] memory resNull;
         return resNull;
      }

      DepositInfo[] memory res = new DepositInfo[](depositsCount);
      uint ii = 0;
      for (uint i = 0; i < _depositIds.length; ++i) {
         if (_deposits[_depositIds[i]]._owner == account) {
            res[ii] = _deposits[_depositIds[i]];
            ++ii;
         }
      }

      return res;
   }

   function getDepositsCount() public view returns (uint256) {
      return _depositIds.length;
   }

   /**
    * Called by User when it makes Deposit.
    *
    * @param amount the Amount of the Deposit
    * @param periodType The type of the Period (0 - 2) which will be used by Deposit
    */
   function deposit(uint256 amount, uint8 periodType) external whenNotPaused nonReentrant {
      address sender = _msgSender();

      require(periodType < 3, "periodType must be less than 3");
      require(
         _token.allowance(sender, address(this)) >= amount,
         "You must allow to use of funds by the Contract"
      );
      require(_token.balanceOf(sender) >= amount, "You don't have enough funds");

      if (periodType == 0) {
         require(amount == _period0Price, "Amount must be equal to _period0Price");
         if (_period0MaxAmount > 0) {
            require(
               (_period0AmountsCounter + amount) <= _period0MaxAmount,
               "The limit of the Period-0 has been reached"
            );
         }
         if (_period0MaxAmountPerAccount > 0) {
            require(
               (_period0AmountCounters[sender] + amount) <= _period0MaxAmountPerAccount,
               "You have reached the limit per account (Period-0)"
            );
         }
      } else if (periodType == 1) {
         require(amount == _period1Price, "Amount must be equal to _period1Price");
         if (_period1MaxAmount > 0) {
            require(
               (_period1AmountsCounter + amount) <= _period1MaxAmount,
               "The limit of the Period-1 has been reached"
            );
         }
         if (_period1MaxAmountPerAccount > 0) {
            require(
               (_period1AmountCounters[sender] + amount) <= _period1MaxAmountPerAccount,
               "You have reached the limit per account (Period-1)"
            );
         }
      } else if (periodType == 2) {
         require(amount == _period2Price, "Amount must be equal to _period2Price");
         if (_period2MaxAmount > 0) {
            require(
               (_period2AmountsCounter + amount) <= _period2MaxAmount,
               "The limit of the Period-2 has been reached"
            );
         }
         if (_period2MaxAmountPerAccount > 0) {
            require(
               (_period2AmountCounters[sender] + amount) <= _period2MaxAmountPerAccount,
               "You have reached the limit per account (Period-2)"
            );
         }
      }

      _token.transferFrom(sender, address(this), amount);

      if (!_accountExists(sender)) {
         _accounts.push(sender);
      }

      bytes32 depositId = bytes32(keccak256(abi.encodePacked(_msgSender(), block.number)));
      // regenerate ID
      if (_deposits[depositId]._id != 0) {
         depositId = bytes32(keccak256(abi.encodePacked(depositId)));
      }

      uint64 currentTime = getCurrentTime();
      DepositInfo memory dep = DepositInfo(
         depositId,
         sender,
         amount,
         periodType,
         currentTime,
         0,
         false
      );

      if (periodType == 0) {
         _period0AmountsCounter = _period0AmountsCounter + amount;
         _period0AmountCounters[sender] = _period0AmountCounters[sender] + amount;
         dep._availableFrom = currentTime + _period0Duration;
      } else if (periodType == 1) {
         _period1AmountsCounter = _period1AmountsCounter + amount;
         _period1AmountCounters[sender] = _period1AmountCounters[sender] + amount;
         dep._availableFrom = currentTime + _period1Duration;
      } else if (periodType == 2) {
         _period2AmountsCounter = _period2AmountsCounter + amount;
         _period2AmountCounters[sender] = _period2AmountCounters[sender] + amount;
         dep._availableFrom = currentTime + _period2Duration;
      }

      _deposits[depositId] = dep;

      _depositIds.push(depositId);
      _depositsCounter += 1;
      _depositCounters[sender] = _depositCounters[sender] + 1;
      _allDepositsAmountCounter += amount;

      emit Deposit(
         sender,
         string(abi.encodePacked(depositId)),
         amount,
         currentTime,
         dep._availableFrom
      );
   }

   /**
    * Called by User when it makes the Withdrawal.
    *
    * @param depositId the ID of the Deposit in the User's own
    */
   function withdraw(bytes32 depositId) external nonReentrant {
      address sender = _msgSender();

      DepositInfo memory dep = _deposits[depositId];
      uint256 amount = dep._amount;

      require(dep._withdrawn == false, "The Deposit has already been withdrawn");
      require(dep._owner == sender, "You're not the Owner of the Deposit");
      require(dep._availableFrom < getCurrentTime(), "you can't withdraw your Deposit yet");

      _token.transfer(sender, amount);

      if (dep._periodType == 0) {
         _period0AmountCounters[sender] = _period0AmountCounters[sender] - amount;
         _period0AmountsCounter = _period0AmountsCounter - amount;
      } else if (dep._periodType == 1) {
         _period1AmountCounters[sender] = _period1AmountCounters[sender] - amount;
         _period1AmountsCounter = _period1AmountsCounter - amount;
      } else if (dep._periodType == 2) {
         _period2AmountCounters[sender] = _period2AmountCounters[sender] - amount;
         _period2AmountsCounter = _period2AmountsCounter - amount;
      }

      _deposits[dep._id]._withdrawn = true;

      emit Withdraw(sender, string(abi.encodePacked(depositId)), amount, getCurrentTime());
   }

   /**
    * Called by user when he wants to update the Deposit's duration time.
    *
    * @param depositId the ID of the Deposit in the User's own
    */
   function updateDepositDuration(bytes32 depositId) external {
      address sender = _msgSender();

      DepositInfo memory dep = _deposits[depositId];
      require(dep._owner == sender, "You're not the Owner of the Deposit");

      uint64 duration = 0;
      if (dep._periodType == 0) {
         duration = _period0Duration;
      } else if (dep._periodType == 1) {
         duration = _period1Duration;
      } else if (dep._periodType == 2) {
         duration = _period2Duration;
      }

      _deposits[dep._id]._availableFrom = _deposits[dep._id]._createTime + duration;
   }

   /**
    * Called by the Contract's Owner to update the duration of the specific Period.
    *
    * @param periodType type of the period (0 - 2)
    * @param newDuration the duration in seconds of the period
    */
   function setPeriodDuration(uint8 periodType, uint64 newDuration) external onlyOwner {
      if (periodType == 0) {
         require(
            newDuration < _period0Duration,
            "newDuration must be less than current _period0Duration"
         );
         _period0Duration = newDuration;
      } else if (periodType == 1) {
         require(
            newDuration < _period1Duration,
            "newDuration must be less than current _period1Duration"
         );
         _period1Duration = newDuration;
      } else if (periodType == 2) {
         require(
            newDuration < _period2Duration,
            "newDuration must be less than current _period2Duration"
         );
         _period2Duration = newDuration;
      }
   }

   /**
    * Called by the Contract's Owner to pause the creation of Deposits
    */
   function pause() external onlyOwner {
      Pausable._pause();
   }

   /**
    * Called by the Contract's Owner to unpause the creation of Deposits
    */
   function unpause() external onlyOwner {
      Pausable._unpause();
   }

   // blast --------------------------------------------------------

   function configureBlastPoints(
      address blastUsdbYieldAddress,
      address blastWethbYieldAddress,
      address blastPointsAddress,
      address blastPointsOperator
   ) public onlyOwner {
      _BLAST.configureClaimableGas();
      _USDB = IERC20Rebasing(blastUsdbYieldAddress);
      _USDB.configure(IERC20Rebasing.YieldMode.CLAIMABLE);
      _WETHB = IERC20Rebasing(blastWethbYieldAddress);
      _WETHB.configure(IERC20Rebasing.YieldMode.CLAIMABLE);

      _blastPointsAddress = blastPointsAddress;
      _blastPointsOperator = blastPointsOperator;
      IBlastPoints(_blastPointsAddress).configurePointsOperator(_blastPointsOperator);
   }

   function configureBlastYieldModes(uint8 usdbYieldMode, uint8 wethbYieldMode) external onlyOwner {
      _USDB.configure(IERC20Rebasing.YieldMode(usdbYieldMode));
      _WETHB.configure(IERC20Rebasing.YieldMode(wethbYieldMode));
   }

   function claimYieldAll(
      address _recipient,
      uint256 _amountWETH,
      uint256 _amountUSDB
   ) external onlyOwner returns (uint256 amountWETH, uint256 amountUSDB, uint256 amountGas) {
      amountWETH = IERC20Rebasing(_WETHB).claim(_recipient, _amountWETH);
      amountUSDB = IERC20Rebasing(_USDB).claim(_recipient, _amountUSDB);
      amountGas = IBlast(_BLAST).claimMaxGas(address(this), _recipient);

      emit ClaimYieldAll(_recipient, amountWETH, amountUSDB, amountGas);
   }

   function claimGas(
      address _recipient,
      uint256 _minClaimRateBips
   ) external onlyOwner returns (uint256 amount) {
      if (_minClaimRateBips == 0) {
         amount = _BLAST.claimMaxGas(address(this), _recipient);
      } else {
         amount = _BLAST.claimGasAtMinClaimRate(address(this), _recipient, _minClaimRateBips);
      }

      emit ClaimGas(_recipient, amount);
   }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/AccessControl.sol)

pragma solidity ^0.8.20;

import {IAccessControl} from "./IAccessControl.sol";
import {Context} from "../utils/Context.sol";
import {ERC165} from "../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 account => bool) hasRole;
        bytes32 adminRole;
    }

    mapping(bytes32 role => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with an {AccessControlUnauthorizedAccount} error including the required role.
     */
    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 returns (bool) {
        return _roles[role].hasRole[account];
    }

    /**
     * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `_msgSender()`
     * is missing `role`. Overriding this function changes the behavior of the {onlyRole} modifier.
     */
    function _checkRole(bytes32 role) internal view virtual {
        _checkRole(role, _msgSender());
    }

    /**
     * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `account`
     * is missing `role`.
     */
    function _checkRole(bytes32 role, address account) internal view virtual {
        if (!hasRole(role, account)) {
            revert AccessControlUnauthorizedAccount(account, role);
        }
    }

    /**
     * @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 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 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 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 `callerConfirmation`.
     *
     * May emit a {RoleRevoked} event.
     */
    function renounceRole(bytes32 role, address callerConfirmation) public virtual {
        if (callerConfirmation != _msgSender()) {
            revert AccessControlBadConfirmation();
        }

        _revokeRole(role, callerConfirmation);
    }

    /**
     * @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 Attempts to grant `role` to `account` and returns a boolean indicating if `role` was granted.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleGranted} event.
     */
    function _grantRole(bytes32 role, address account) internal virtual returns (bool) {
        if (!hasRole(role, account)) {
            _roles[role].hasRole[account] = true;
            emit RoleGranted(role, account, _msgSender());
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Attempts to revoke `role` to `account` and returns a boolean indicating if `role` was revoked.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleRevoked} event.
     */
    function _revokeRole(bytes32 role, address account) internal virtual returns (bool) {
        if (hasRole(role, account)) {
            _roles[role].hasRole[account] = false;
            emit RoleRevoked(role, account, _msgSender());
            return true;
        } else {
            return false;
        }
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/IAccessControl.sol)

pragma solidity ^0.8.20;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    /**
     * @dev The `account` is missing a role.
     */
    error AccessControlUnauthorizedAccount(address account, bytes32 neededRole);

    /**
     * @dev The caller of a function is not the expected one.
     *
     * NOTE: Don't confuse with {AccessControlUnauthorizedAccount}.
     */
    error AccessControlBadConfirmation();

    /**
     * @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.
     */
    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 `callerConfirmation`.
     */
    function renounceRole(bytes32 role, address callerConfirmation) external;
}

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

pragma solidity ^0.8.20;

import {Context} from "../utils/Context.sol";

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

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

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

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

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        if (owner() != _msgSender()) {
            revert OwnableUnauthorizedAccount(_msgSender());
        }
    }

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

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        if (newOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.20;

/**
 * @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 value of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

    /**
     * @dev Moves a `value` amount of 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 value) 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 a `value` amount of tokens 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 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the
     * allowance mechanism. `value` 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 value) external returns (bool);
}

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

pragma solidity ^0.8.20;

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

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

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol)

pragma solidity ^0.8.20;

import {IERC165} from "./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);
 * }
 * ```
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)

pragma solidity ^0.8.20;

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Pausable.sol)

pragma solidity ^0.8.20;

import {Context} from "../utils/Context.sol";

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

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

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

    /**
     * @dev The operation failed because the contract is paused.
     */
    error EnforcedPause();

    /**
     * @dev The operation failed because the contract is not paused.
     */
    error ExpectedPause();

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

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

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

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

    /**
     * @dev Throws if the contract is paused.
     */
    function _requireNotPaused() internal view virtual {
        if (paused()) {
            revert EnforcedPause();
        }
    }

    /**
     * @dev Throws if the contract is not paused.
     */
    function _requirePaused() internal view virtual {
        if (!paused()) {
            revert ExpectedPause();
        }
    }

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

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/ReentrancyGuard.sol)

pragma solidity ^0.8.20;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant NOT_ENTERED = 1;
    uint256 private constant ENTERED = 2;

    uint256 private _status;

    /**
     * @dev Unauthorized reentrant call.
     */
    error ReentrancyGuardReentrantCall();

    constructor() {
        _status = NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be NOT_ENTERED
        if (_status == ENTERED) {
            revert ReentrancyGuardReentrantCall();
        }

        // Any calls to nonReentrant after this point will fail
        _status = ENTERED;
    }

    function _nonReentrantAfter() private {
        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = NOT_ENTERED;
    }

    /**
     * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
     * `nonReentrant` function in the call stack.
     */
    function _reentrancyGuardEntered() internal view returns (bool) {
        return _status == ENTERED;
    }
}

// SPDX-License-Identifier: MIT
pragma solidity >=0.5.0;

interface IBlast {
   enum YieldMode {
      AUTOMATIC,
      VOID,
      CLAIMABLE
   }

   enum GasMode {
      VOID,
      CLAIMABLE
   }

   // configure
   function configureContract(
      address contractAddress,
      YieldMode _yield,
      GasMode gasMode,
      address governor
   ) external;
   function configure(YieldMode _yield, GasMode gasMode, address governor) external;

   // base configuration options
   function configureClaimableYield() external;
   function configureClaimableYieldOnBehalf(address contractAddress) external;
   function configureAutomaticYield() external;
   function configureAutomaticYieldOnBehalf(address contractAddress) external;
   function configureVoidYield() external;
   function configureVoidYieldOnBehalf(address contractAddress) external;
   function configureClaimableGas() external;
   function configureClaimableGasOnBehalf(address contractAddress) external;
   function configureVoidGas() external;
   function configureVoidGasOnBehalf(address contractAddress) external;
   function configureGovernor(address _governor) external;
   function configureGovernorOnBehalf(address _newGovernor, address contractAddress) external;

   // claim yield
   function claimYield(
      address contractAddress,
      address recipientOfYield,
      uint256 amount
   ) external returns (uint256);
   function claimAllYield(
      address contractAddress,
      address recipientOfYield
   ) external returns (uint256);

   // claim gas
   function claimAllGas(address contractAddress, address recipientOfGas) external returns (uint256);
   function claimGasAtMinClaimRate(
      address contractAddress,
      address recipientOfGas,
      uint256 minClaimRateBips
   ) external returns (uint256);
   function claimMaxGas(address contractAddress, address recipientOfGas) external returns (uint256);
   function claimGas(
      address contractAddress,
      address recipientOfGas,
      uint256 gasToClaim,
      uint256 gasSecondsToConsume
   ) external returns (uint256);

   // read functions
   function readClaimableYield(address contractAddress) external view returns (uint256);
   function readYieldConfiguration(address contractAddress) external view returns (uint8);
   function readGasParams(
      address contractAddress
   )
      external
      view
      returns (uint256 etherSeconds, uint256 etherBalance, uint256 lastUpdated, GasMode);
}

// SPDX-License-Identifier: MIT
pragma solidity >=0.5.0;

interface IBlastPoints {
   function configurePointsOperator(address operator) external;
}

// SPDX-License-Identifier: MIT
pragma solidity >=0.5.0;

interface IERC20Rebasing {
   enum YieldMode {
      AUTOMATIC,
      VOID,
      CLAIMABLE
   }
   // changes the yield mode of the caller and update the balance
   // to reflect the configuration

   function configure(IERC20Rebasing.YieldMode) external returns (uint256);
   // "claimable" yield mode accounts can call this this claim their yield
   // to another address
   function claim(address recipient, uint256 amount) external returns (uint256);
   // read the claimable amount for an account
   function getClaimableAmount(address account) external view returns (uint256);
}

File 14 of 14 : Misc.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.23;

struct ConstructorParams {
   address superOwner;
   address tokenAddress;
   string tokenSymbol;
   uint8 tokenDecimals;
   uint64 period0Duration;
   uint64 period1Duration;
   uint64 period2Duration;
   uint256 period0Price;
   uint256 period1Price;
   uint256 period2Price;
   uint256 period0MaxAmount;
   uint256 period1MaxAmount;
   uint256 period2MaxAmount;
   uint256 period0MaxAmountPerAccount;
   uint256 period1MaxAmountPerAccount;
   uint256 period2MaxAmountPerAccount;
}

struct DepositInfo {
   bytes32 _id;
   address _owner;
   uint256 _amount;
   uint8 _periodType;
   uint64 _createTime;
   uint64 _availableFrom;
   bool _withdrawn;
}

struct BasicStat {
   uint256 allDepositsAmount;
   uint256 period0MaxAmount;
   uint256 period0AmountsCounter;
   uint256 period1MaxAmount;
   uint256 period1AmountsCounter;
   uint256 period2MaxAmount;
   uint256 period2AmountsCounter;
}

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

Contract Security Audit

Contract ABI

API
[{"inputs":[{"components":[{"internalType":"address","name":"superOwner","type":"address"},{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"string","name":"tokenSymbol","type":"string"},{"internalType":"uint8","name":"tokenDecimals","type":"uint8"},{"internalType":"uint64","name":"period0Duration","type":"uint64"},{"internalType":"uint64","name":"period1Duration","type":"uint64"},{"internalType":"uint64","name":"period2Duration","type":"uint64"},{"internalType":"uint256","name":"period0Price","type":"uint256"},{"internalType":"uint256","name":"period1Price","type":"uint256"},{"internalType":"uint256","name":"period2Price","type":"uint256"},{"internalType":"uint256","name":"period0MaxAmount","type":"uint256"},{"internalType":"uint256","name":"period1MaxAmount","type":"uint256"},{"internalType":"uint256","name":"period2MaxAmount","type":"uint256"},{"internalType":"uint256","name":"period0MaxAmountPerAccount","type":"uint256"},{"internalType":"uint256","name":"period1MaxAmountPerAccount","type":"uint256"},{"internalType":"uint256","name":"period2MaxAmountPerAccount","type":"uint256"}],"internalType":"struct ConstructorParams","name":"params","type":"tuple"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"EnforcedPause","type":"error"},{"inputs":[],"name":"ExpectedPause","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ClaimGas","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountWETH","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountUSDB","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountGas","type":"uint256"}],"name":"ClaimYieldAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"string","name":"depositId","type":"string"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint64","name":"createdAt","type":"uint64"},{"indexed":false,"internalType":"uint64","name":"availableFrom","type":"uint64"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"string","name":"depositId","type":"string"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint64","name":"createdAt","type":"uint64"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"_BLAST","outputs":[{"internalType":"contract IBlast","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_USDB","outputs":[{"internalType":"contract IERC20Rebasing","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_WETHB","outputs":[{"internalType":"contract IERC20Rebasing","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"_accounts","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_allDepositsAmountCounter","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_blastPointsAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_blastPointsOperator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"_depositCounters","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"_depositIds","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"_deposits","outputs":[{"internalType":"bytes32","name":"_id","type":"bytes32"},{"internalType":"address","name":"_owner","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint8","name":"_periodType","type":"uint8"},{"internalType":"uint64","name":"_createTime","type":"uint64"},{"internalType":"uint64","name":"_availableFrom","type":"uint64"},{"internalType":"bool","name":"_withdrawn","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_depositsCounter","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"_period0AmountCounters","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_period0AmountsCounter","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_period0Duration","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_period0MaxAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_period0MaxAmountPerAccount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_period0Price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"_period1AmountCounters","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_period1AmountsCounter","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_period1Duration","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_period1MaxAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_period1MaxAmountPerAccount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_period1Price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"_period2AmountCounters","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_period2AmountsCounter","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_period2Duration","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_period2MaxAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_period2MaxAmountPerAccount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_period2Price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_token","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_tokenDecimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_tokenSymbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"uint256","name":"_minClaimRateBips","type":"uint256"}],"name":"claimGas","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"uint256","name":"_amountWETH","type":"uint256"},{"internalType":"uint256","name":"_amountUSDB","type":"uint256"}],"name":"claimYieldAll","outputs":[{"internalType":"uint256","name":"amountWETH","type":"uint256"},{"internalType":"uint256","name":"amountUSDB","type":"uint256"},{"internalType":"uint256","name":"amountGas","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"blastUsdbYieldAddress","type":"address"},{"internalType":"address","name":"blastWethbYieldAddress","type":"address"},{"internalType":"address","name":"blastPointsAddress","type":"address"},{"internalType":"address","name":"blastPointsOperator","type":"address"}],"name":"configureBlastPoints","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"usdbYieldMode","type":"uint8"},{"internalType":"uint8","name":"wethbYieldMode","type":"uint8"}],"name":"configureBlastYieldModes","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint8","name":"periodType","type":"uint8"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getAccountDeposits","outputs":[{"components":[{"internalType":"bytes32","name":"_id","type":"bytes32"},{"internalType":"address","name":"_owner","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint8","name":"_periodType","type":"uint8"},{"internalType":"uint64","name":"_createTime","type":"uint64"},{"internalType":"uint64","name":"_availableFrom","type":"uint64"},{"internalType":"bool","name":"_withdrawn","type":"bool"}],"internalType":"struct DepositInfo[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAccountsCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBasicStat","outputs":[{"components":[{"internalType":"uint256","name":"allDepositsAmount","type":"uint256"},{"internalType":"uint256","name":"period0MaxAmount","type":"uint256"},{"internalType":"uint256","name":"period0AmountsCounter","type":"uint256"},{"internalType":"uint256","name":"period1MaxAmount","type":"uint256"},{"internalType":"uint256","name":"period1AmountsCounter","type":"uint256"},{"internalType":"uint256","name":"period2MaxAmount","type":"uint256"},{"internalType":"uint256","name":"period2AmountsCounter","type":"uint256"}],"internalType":"struct BasicStat","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDepositsCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"periodType","type":"uint8"},{"internalType":"uint64","name":"newDuration","type":"uint64"}],"name":"setPeriodDuration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"depositId","type":"bytes32"}],"name":"updateDepositDuration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"depositId","type":"bytes32"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6101e06040523480156200001257600080fd5b506040516200372538038062003725833981016040819052620000359162000304565b80516001600160a01b0381166200006657604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b62000071816200016b565b50600180556002805460ff1916905560208101516001600160a01b03166080526040810151600390620000a59082620004e0565b50606081015160ff1660a09081526080820151600480549284015160c0808601516001600160401b03908116600160801b02600160801b600160c01b031993821668010000000000000000026001600160801b03199097169190951617949094171691909117905560e08083015190915261010080830151909152610120808301519091526101408083015190915261016080830151909152610180808301519091526101a0808301519091526101c0808301519091526101e0909101519052620005ac565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b634e487b7160e01b600052604160045260246000fd5b60405161020081016001600160401b0381118282101715620001f757620001f7620001bb565b60405290565b604051601f8201601f191681016001600160401b0381118282101715620002285762000228620001bb565b604052919050565b80516001600160a01b03811681146200024857600080fd5b919050565b600082601f8301126200025f57600080fd5b81516001600160401b038111156200027b576200027b620001bb565b602062000291601f8301601f19168201620001fd565b8281528582848701011115620002a657600080fd5b60005b83811015620002c6578581018301518282018401528201620002a9565b506000928101909101919091529392505050565b805160ff811681146200024857600080fd5b80516001600160401b03811681146200024857600080fd5b6000602082840312156200031757600080fd5b81516001600160401b03808211156200032f57600080fd5b9083019061020082860312156200034557600080fd5b6200034f620001d1565b6200035a8362000230565b81526200036a6020840162000230565b60208201526040830151828111156200038257600080fd5b62000390878286016200024d565b604083015250620003a460608401620002da565b6060820152620003b760808401620002ec565b6080820152620003ca60a08401620002ec565b60a0820152620003dd60c08401620002ec565b60c082015260e08381015190820152610100808401519082015261012080840151908201526101408084015190820152610160808401519082015261018080840151908201526101a080840151908201526101c080840151908201526101e09283015192810192909252509392505050565b600181811c908216806200046457607f821691505b6020821081036200048557634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620004db576000816000526020600020601f850160051c81016020861015620004b65750805b601f850160051c820191505b81811015620004d757828155600101620004c2565b5050505b505050565b81516001600160401b03811115620004fc57620004fc620001bb565b62000514816200050d84546200044f565b846200048b565b602080601f8311600181146200054c5760008415620005335750858301515b600019600386901b1c1916600185901b178555620004d7565b600085815260208120601f198616915b828110156200057d578886015182559484019460019091019084016200055c565b50858210156200059c5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60805160a05160c05160e05161010051610120516101405161016051610180516101a0516101c051613058620006cd6000396000818161079201528181611af30152611b32015260008181610877015281816118d501526119140152600081816104c5015281816116b201526116f10152600081816103f901528181610dc201528181611a3d0152611a6301526000818161065901528181610d940152818161181f01526118450152600081816107b901528181610d66015281816115fc015261162201526000818161073401526119c00152600081816108b101526117a2015260008181610420015261157f015260006105000152600081816108d8015281816113b5015281816114b701528181611bfd015261234801526130586000f3fe608060405234801561001057600080fd5b50600436106103365760003560e01c806377b8050e116101b2578063c69d4e61116100f9578063e478d188116100a2578063ecd0c0c31161007c578063ecd0c0c3146108d3578063ecf35cca146108fa578063f1c6ce831461090f578063f2fde38b1461091857600080fd5b8063e478d18814610872578063e751df1f14610899578063e7efcc66146108ac57600080fd5b8063dd7b5017116100d3578063dd7b501714610838578063e17ffc281461084b578063e22d28451461085f57600080fd5b8063c69d4e61146107db578063c99b5b6014610805578063da35350b1461081857600080fd5b80639a7221291161015b578063b3f39af911610135578063b3f39af914610784578063bf0819e01461078d578063c6432259146107b457600080fd5b80639a7221291461071c578063ad3b6dea1461072f578063ad66aeb81461075657600080fd5b80638da5cb5b1161018c5780638da5cb5b146106e55780638e19899e146106f65780638f8601081461070957600080fd5b806377b8050e146106b45780637970daf0146106bd5780638456cb59146106dd57600080fd5b80632f95987c116102815780635081d9521161022a5780635c975abb116102045780635c975abb1461067b578063654cfdff14610691578063715018a6146106a4578063770e3106146106ac57600080fd5b80635081d9521461057d578063594922fb1461059d5780635b5aaceb1461065457600080fd5b806340c66b661161025b57806340c66b661461053c57806348c9115d146105625780634c5822e41461057557600080fd5b80632f95987c146104e757806330ca1387146104fb5780633f4ba83a1461053457600080fd5b80631567edf0116102e357806323fa2894116102bd57806323fa28941461047157806325762bc5146104a55780632e1212f9146104c057600080fd5b80631567edf014610442578063207f796d14610455578063236cbc1e1461046857600080fd5b806311fd33ab1161031457806311fd33ab14610396578063144f2ab0146103f4578063153432131461041b57600080fd5b806305bafd921461033b578063081016c8146103615780630e648a7114610376575b600080fd5b61034e610349366004612bf1565b61092b565b6040519081526020015b60405180910390f35b61037461036f366004612c2c565b610a85565b005b61034e610384366004612c70565b600c6020526000908152604090205481565b61039e610cdf565b6040516103589190600060e082019050825182526020830151602083015260408301516040830152606083015160608301526080830151608083015260a083015160a083015260c083015160c083015292915050565b61034e7f000000000000000000000000000000000000000000000000000000000000000081565b61034e7f000000000000000000000000000000000000000000000000000000000000000081565b610374610450366004612c92565b610df3565b610374610463366004612ce6565b610fe5565b61034e60055481565b60045461048c90600160801b900467ffffffffffffffff1681565b60405167ffffffffffffffff9091168152602001610358565b60045461048c90600160401b900467ffffffffffffffff1681565b61034e7f000000000000000000000000000000000000000000000000000000000000000081565b60045461048c9067ffffffffffffffff1681565b6105227f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff9091168152602001610358565b6103746110fd565b61054a6002604360981b0181565b6040516001600160a01b039091168152602001610358565b61034e610570366004612d19565b61110f565b600b5461034e565b61059061058b366004612c70565b611130565b6040516103589190612d32565b6106066105ab366004612d19565b601060205260009081526040902080546001820154600283015460039093015491926001600160a01b039091169160ff8082169167ffffffffffffffff6101008204811692600160481b830490911691600160881b90041687565b604080519788526001600160a01b0390961660208801529486019390935260ff909116606085015267ffffffffffffffff90811660808501521660a0830152151560c082015260e001610358565b61034e7f000000000000000000000000000000000000000000000000000000000000000081565b60025460ff166040519015158152602001610358565b61037461069f366004612dd4565b61132a565b610374612120565b600a5461034e565b61034e60075481565b61034e6106cb366004612c70565b600e6020526000908152604090205481565b610374612132565b6000546001600160a01b031661054a565b610374610704366004612d19565b612142565b60125461054a906001600160a01b031681565b60135461054a906001600160a01b031681565b61034e7f000000000000000000000000000000000000000000000000000000000000000081565b610769610764366004612df7565b612573565b60408051938452602084019290925290820152606001610358565b61034e60095481565b61034e7f000000000000000000000000000000000000000000000000000000000000000081565b61034e7f000000000000000000000000000000000000000000000000000000000000000081565b61048c6107e9366004612c70565b600f6020526000908152604090205467ffffffffffffffff1681565b610374610813366004612d19565b612742565b61034e610826366004612c70565b600d6020526000908152604090205481565b60145461054a906001600160a01b031681565b60085461048c9067ffffffffffffffff1681565b61054a61086d366004612d19565b612907565b61034e7f000000000000000000000000000000000000000000000000000000000000000081565b60115461054a906001600160a01b031681565b61034e7f000000000000000000000000000000000000000000000000000000000000000081565b61054a7f000000000000000000000000000000000000000000000000000000000000000081565b610902612931565b6040516103589190612e70565b61034e60065481565b610374610926366004612c70565b6129bf565b60006109356129fa565b816000036109bb5760405163662aa11d60e01b81523060048201526001600160a01b03841660248201526002604360981b019063662aa11d906044016020604051808303816000875af1158015610990573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109b49190612e83565b9050610a3c565b604051630951888f60e01b81523060048201526001600160a01b0384166024820152604481018390526002604360981b0190630951888f906064016020604051808303816000875af1158015610a15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a399190612e83565b90505b826001600160a01b03167f5eadc4013530f38d8b7709b47915d0cef30eee941dad69669a5b45e0686879fa82604051610a7791815260200190565b60405180910390a292915050565b610a8d6129fa565b8160ff16600003610b435760045467ffffffffffffffff90811690821610610b225760405162461bcd60e51b815260206004820152603660248201527f6e65774475726174696f6e206d757374206265206c657373207468616e20637560448201527f7272656e74205f706572696f64304475726174696f6e0000000000000000000060648201526084015b60405180910390fd5b6004805467ffffffffffffffff191667ffffffffffffffff83161790555050565b8160ff16600103610c095760045467ffffffffffffffff600160401b909104811690821610610bda5760405162461bcd60e51b815260206004820152603660248201527f6e65774475726174696f6e206d757374206265206c657373207468616e20637560448201527f7272656e74205f706572696f64314475726174696f6e000000000000000000006064820152608401610b19565b600480546fffffffffffffffff00000000000000001916600160401b67ffffffffffffffff8416021790555050565b8160ff16600203610cdb5760045467ffffffffffffffff600160801b909104811690821610610ca05760405162461bcd60e51b815260206004820152603660248201527f6e65774475726174696f6e206d757374206265206c657373207468616e20637560448201527f7272656e74205f706572696f64324475726174696f6e000000000000000000006064820152608401610b19565b600480547fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff16600160801b67ffffffffffffffff8416021790555b5050565b610d1f6040518060e00160405280600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b610d5f6040518060e00160405280600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b60095481527f0000000000000000000000000000000000000000000000000000000000000000602082015260055460408201527f0000000000000000000000000000000000000000000000000000000000000000606082015260065460808201527f000000000000000000000000000000000000000000000000000000000000000060a082015260075460c0820152919050565b610dfb6129fa565b6002604360981b016001600160a01b0316634e606c476040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610e3d57600080fd5b505af1158015610e51573d6000803e3d6000fd5b5050601180546001600160a01b0319166001600160a01b038816908117909155604051631a33757d60e01b8152909250631a33757d9150610e9790600290600401612eb2565b6020604051808303816000875af1158015610eb6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eda9190612e83565b50601280546001600160a01b0319166001600160a01b038516908117909155604051631a33757d60e01b8152631a33757d90610f1b90600290600401612eb2565b6020604051808303816000875af1158015610f3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f5e9190612e83565b50601380546001600160a01b038481166001600160a01b03199283168117909355601480549185169190921681179091556040516336b91f2b60e01b815260048101919091526336b91f2b90602401600060405180830381600087803b158015610fc757600080fd5b505af1158015610fdb573d6000803e3d6000fd5b5050505050505050565b610fed6129fa565b6011546001600160a01b0316631a33757d60ff8416600281111561101357611013612e9c565b6040518263ffffffff1660e01b815260040161102f9190612eb2565b6020604051808303816000875af115801561104e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110729190612e83565b506012546001600160a01b0316631a33757d60ff8316600281111561109957611099612e9c565b6040518263ffffffff1660e01b81526004016110b59190612eb2565b6020604051808303816000875af11580156110d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110f89190612e83565b505050565b6111056129fa565b61110d612a27565b565b600b818154811061111f57600080fd5b600091825260209091200154905081565b6001600160a01b0381166000908152600f602052604081205460609167ffffffffffffffff909116908190036111695750606092915050565b60008167ffffffffffffffff81111561118457611184612eda565b6040519080825280602002602001820160405280156111eb57816020015b6040805160e08101825260008082526020808301829052928201819052606082018190526080820181905260a0820181905260c082015282526000199092019101816111a25790505b5090506000805b600b5481101561132057856001600160a01b031660106000600b848154811061121d5761121d612ef0565b600091825260208083209091015483528201929092526040019020600101546001600160a01b0316036113185760106000600b838154811061126157611261612ef0565b600091825260208083209091015483528281019390935260409182019020815160e0810183528154815260018201546001600160a01b0316938101939093526002810154918301919091526003015460ff808216606084015267ffffffffffffffff610100830481166080850152600160481b83041660a0840152600160881b90910416151560c0820152835184908490811061130057611300612ef0565b60200260200101819052508161131590612f1c565b91505b6001016111f2565b5090949350505050565b611332612a79565b61133a612a9d565b33600360ff83161061138e5760405162461bcd60e51b815260206004820152601e60248201527f706572696f6454797065206d757374206265206c657373207468616e203300006044820152606401610b19565b604051636eb1769f60e11b81526001600160a01b03828116600483015230602483015284917f00000000000000000000000000000000000000000000000000000000000000009091169063dd62ed3e90604401602060405180830381865afa1580156113fe573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114229190612e83565b10156114965760405162461bcd60e51b815260206004820152602e60248201527f596f75206d75737420616c6c6f7720746f20757365206f662066756e6473206260448201527f792074686520436f6e74726163740000000000000000000000000000000000006064820152608401610b19565b6040516370a0823160e01b81526001600160a01b03828116600483015284917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa158015611500573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115249190612e83565b10156115725760405162461bcd60e51b815260206004820152601b60248201527f596f7520646f6e2774206861766520656e6f7567682066756e647300000000006044820152606401610b19565b8160ff16600003611795577f000000000000000000000000000000000000000000000000000000000000000083146115fa5760405162461bcd60e51b815260206004820152602560248201527f416d6f756e74206d75737420626520657175616c20746f205f706572696f6430604482015264507269636560d81b6064820152608401610b19565b7f0000000000000000000000000000000000000000000000000000000000000000156116b0577f00000000000000000000000000000000000000000000000000000000000000008360055461164f9190612f35565b11156116b05760405162461bcd60e51b815260206004820152602a60248201527f546865206c696d6974206f662074686520506572696f642d3020686173206265604482015269195b881c995858da195960b21b6064820152608401610b19565b7f000000000000000000000000000000000000000000000000000000000000000015611790576001600160a01b0381166000908152600c60205260409020547f00000000000000000000000000000000000000000000000000000000000000009061171c908590612f35565b11156117905760405162461bcd60e51b815260206004820152603160248201527f596f752068617665207265616368656420746865206c696d697420706572206160448201527f63636f756e742028506572696f642d30290000000000000000000000000000006064820152608401610b19565b611bd1565b8160ff166001036119b3577f0000000000000000000000000000000000000000000000000000000000000000831461181d5760405162461bcd60e51b815260206004820152602560248201527f416d6f756e74206d75737420626520657175616c20746f205f706572696f6431604482015264507269636560d81b6064820152608401610b19565b7f0000000000000000000000000000000000000000000000000000000000000000156118d3577f0000000000000000000000000000000000000000000000000000000000000000836006546118729190612f35565b11156118d35760405162461bcd60e51b815260206004820152602a60248201527f546865206c696d6974206f662074686520506572696f642d3120686173206265604482015269195b881c995858da195960b21b6064820152608401610b19565b7f000000000000000000000000000000000000000000000000000000000000000015611790576001600160a01b0381166000908152600d60205260409020547f00000000000000000000000000000000000000000000000000000000000000009061193f908590612f35565b11156117905760405162461bcd60e51b815260206004820152603160248201527f596f752068617665207265616368656420746865206c696d697420706572206160448201527f63636f756e742028506572696f642d31290000000000000000000000000000006064820152608401610b19565b8160ff16600203611bd1577f00000000000000000000000000000000000000000000000000000000000000008314611a3b5760405162461bcd60e51b815260206004820152602560248201527f416d6f756e74206d75737420626520657175616c20746f205f706572696f6432604482015264507269636560d81b6064820152608401610b19565b7f000000000000000000000000000000000000000000000000000000000000000015611af1577f000000000000000000000000000000000000000000000000000000000000000083600754611a909190612f35565b1115611af15760405162461bcd60e51b815260206004820152602a60248201527f546865206c696d6974206f662074686520506572696f642d3220686173206265604482015269195b881c995858da195960b21b6064820152608401610b19565b7f000000000000000000000000000000000000000000000000000000000000000015611bd1576001600160a01b0381166000908152600e60205260409020547f000000000000000000000000000000000000000000000000000000000000000090611b5d908590612f35565b1115611bd15760405162461bcd60e51b815260206004820152603160248201527f596f752068617665207265616368656420746865206c696d697420706572206160448201527f63636f756e742028506572696f642d32290000000000000000000000000000006064820152608401610b19565b6040516323b872dd60e01b81526001600160a01b038281166004830152306024830152604482018590527f000000000000000000000000000000000000000000000000000000000000000016906323b872dd906064016020604051808303816000875af1158015611c46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c6a9190612f4e565b50611c7481612ac7565b611cc457600a80546001810182556000919091527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a80180546001600160a01b0319166001600160a01b0383161790555b60003360405160609190911b6bffffffffffffffffffffffff1916602082015243603482015260540160408051601f1981840301815291815281516020928301206000818152601090935291205490915015611d3f576040805160208101839052016040516020818303038152906040528051906020012090505b6040805160e0810182528281526001600160a01b038416602082015290810185905260ff8416606082018190524267ffffffffffffffff81166080840152600060a0840181905260c084018190529092919003611e0f5785600554611da49190612f35565b6005556001600160a01b0384166000908152600c6020526040902054611dcb908790612f35565b6001600160a01b0385166000908152600c6020526040902055600454611dfb9067ffffffffffffffff1683612f70565b67ffffffffffffffff1660a0820152611f0d565b8460ff16600103611e865785600654611e289190612f35565b6006556001600160a01b0384166000908152600d6020526040902054611e4f908790612f35565b6001600160a01b0385166000908152600d6020526040902055600454611dfb90600160401b900467ffffffffffffffff1683612f70565b8460ff16600203611f0d5785600754611e9f9190612f35565b6007556001600160a01b0384166000908152600e6020526040902054611ec6908790612f35565b6001600160a01b0385166000908152600e6020526040902055600454611efd90600160801b900467ffffffffffffffff1683612f70565b67ffffffffffffffff1660a08201525b60008381526010602090815260408083208451815591840151600180840180546001600160a01b039093166001600160a01b031990931692909217909155908401516002830155606084015160039092018054608086015160a087015160c08801511515600160881b0260ff60881b1967ffffffffffffffff928316600160481b021671ffffffffffffffffff000000000000000000199383166101000268ffffffffffffffffff1990951660ff90981697909717939093179190911694909417179055600b805480830182559084527f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db9018690556008805491939092909161201891859116612f70565b82546101009290920a67ffffffffffffffff8181021990931691831602179091556001600160a01b0386166000908152600f602052604090205461205f9250166001612f70565b6001600160a01b0385166000908152600f60205260408120805467ffffffffffffffff191667ffffffffffffffff9390931692909217909155600980548892906120aa908490612f35565b909155505060408051602081018590526001600160a01b038616917f8ad34ed119fadf47b1c528b5ce8b8810d94b4d5d47339ba0f0b83b9eac806dfb910160408051601f198184030181529082905260a085015161210b928b918891612f91565b60405180910390a250505050610cdb60018055565b6121286129fa565b61110d6000612b25565b61213a6129fa565b61110d612b75565b61214a612a9d565b600081815260106020908152604091829020825160e0810184528154815260018201546001600160a01b03169281019290925260028101549282018390526003015460ff808216606084015267ffffffffffffffff610100830481166080850152600160481b83041660a0840152600160881b9091041615801560c083015233929061223e5760405162461bcd60e51b815260206004820152602660248201527f546865204465706f7369742068617320616c7265616479206265656e2077697460448201527f68647261776e00000000000000000000000000000000000000000000000000006064820152608401610b19565b826001600160a01b031682602001516001600160a01b0316146122af5760405162461bcd60e51b815260206004820152602360248201527f596f75277265206e6f7420746865204f776e6572206f6620746865204465706f6044820152621cda5d60ea1b6064820152608401610b19565b4267ffffffffffffffff168260a0015167ffffffffffffffff16106123225760405162461bcd60e51b815260206004820152602360248201527f796f752063616e277420776974686472617720796f7572204465706f736974206044820152621e595d60ea1b6064820152608401610b19565b60405163a9059cbb60e01b81526001600160a01b038481166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044016020604051808303816000875af1158015612391573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123b59190612f4e565b50816060015160ff16600003612418576001600160a01b0383166000908152600c60205260409020546123e9908290612fcb565b6001600160a01b0384166000908152600c6020526040902055600554612410908290612fcb565b6005556124d8565b816060015160ff1660010361247a576001600160a01b0383166000908152600d602052604090205461244b908290612fcb565b6001600160a01b0384166000908152600d6020526040902055600654612472908290612fcb565b6006556124d8565b816060015160ff166002036124d8576001600160a01b0383166000908152600e60205260409020546124ad908290612fcb565b6001600160a01b0384166000908152600e60205260409020556007546124d4908290612fcb565b6007555b8151600090815260106020908152604091829020600301805460ff60881b1916600160881b17905581519081018690526001600160a01b038516917f7cfc353e7ae0c0cad34c5a1b2ad6a113b5f2d9143184fbd2436dcc5cfa1d898391016040516020818303038152906040528361254d4290565b60405161255c93929190612fde565b60405180910390a250505061257060018055565b50565b60008060006125806129fa565b601254604051635569f64b60e11b81526001600160a01b038881166004830152602482018890529091169063aad3ec96906044016020604051808303816000875af11580156125d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125f79190612e83565b601154604051635569f64b60e11b81526001600160a01b0389811660048301526024820188905292955091169063aad3ec96906044016020604051808303816000875af115801561264c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126709190612e83565b60405163662aa11d60e01b81523060048201526001600160a01b03881660248201529092506002604360981b019063662aa11d906044016020604051808303816000875af11580156126c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126ea9190612e83565b60408051858152602081018590529081018290529091506001600160a01b038716907f1943c53b7309df037b9077befdba52e1fd2c298ad0e91a0b4a4d163c7d095f189060600160405180910390a293509350939050565b600081815260106020908152604091829020825160e0810184528154815260018201546001600160a01b03169281018390526002820154938101939093526003015460ff808216606085015267ffffffffffffffff610100830481166080860152600160481b83041660a0850152600160881b90910416151560c0830152339190821461281d5760405162461bcd60e51b815260206004820152602360248201527f596f75277265206e6f7420746865204f776e6572206f6620746865204465706f6044820152621cda5d60ea1b6064820152608401610b19565b6000816060015160ff16600003612841575060045467ffffffffffffffff1661288f565b816060015160ff1660010361286a5750600454600160401b900467ffffffffffffffff1661288f565b816060015160ff1660020361288f5750600454600160801b900467ffffffffffffffff165b81516000908152601060205260409020600301546128bd908290610100900467ffffffffffffffff16612f70565b91516000908152601060205260409020600301805467ffffffffffffffff93909316600160481b0270ffffffffffffffff0000000000000000001990931692909217909155505050565b600a818154811061291757600080fd5b6000918252602090912001546001600160a01b0316905081565b6003805461293e90613011565b80601f016020809104026020016040519081016040528092919081815260200182805461296a90613011565b80156129b75780601f1061298c576101008083540402835291602001916129b7565b820191906000526020600020905b81548152906001019060200180831161299a57829003601f168201915b505050505081565b6129c76129fa565b6001600160a01b0381166129f157604051631e4fbdf760e01b815260006004820152602401610b19565b61257081612b25565b6000546001600160a01b0316331461110d5760405163118cdaa760e01b8152336004820152602401610b19565b612a2f612bb2565b6002805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b60025460ff161561110d5760405163d93c066560e01b815260040160405180910390fd5b600260015403612ac057604051633ee5aeb560e01b815260040160405180910390fd5b6002600155565b600080805b600a54811015612b1e57836001600160a01b0316600a8281548110612af357612af3612ef0565b6000918252602090912001546001600160a01b031603612b165760019150612b1e565b600101612acc565b5092915050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b612b7d612a79565b6002805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258612a5c3390565b60025460ff1661110d57604051638dfc202b60e01b815260040160405180910390fd5b80356001600160a01b0381168114612bec57600080fd5b919050565b60008060408385031215612c0457600080fd5b612c0d83612bd5565b946020939093013593505050565b803560ff81168114612bec57600080fd5b60008060408385031215612c3f57600080fd5b612c4883612c1b565b9150602083013567ffffffffffffffff81168114612c6557600080fd5b809150509250929050565b600060208284031215612c8257600080fd5b612c8b82612bd5565b9392505050565b60008060008060808587031215612ca857600080fd5b612cb185612bd5565b9350612cbf60208601612bd5565b9250612ccd60408601612bd5565b9150612cdb60608601612bd5565b905092959194509250565b60008060408385031215612cf957600080fd5b612d0283612c1b565b9150612d1060208401612c1b565b90509250929050565b600060208284031215612d2b57600080fd5b5035919050565b602080825282518282018190526000919060409081850190868401855b82811015612dc757815180518552868101516001600160a01b031687860152858101518686015260608082015160ff169086015260808082015167ffffffffffffffff9081169187019190915260a0808301519091169086015260c09081015115159085015260e09093019290850190600101612d4f565b5091979650505050505050565b60008060408385031215612de757600080fd5b82359150612d1060208401612c1b565b600080600060608486031215612e0c57600080fd5b612e1584612bd5565b95602085013595506040909401359392505050565b6000815180845260005b81811015612e5057602081850181015186830182015201612e34565b506000602082860101526020601f19601f83011685010191505092915050565b602081526000612c8b6020830184612e2a565b600060208284031215612e9557600080fd5b5051919050565b634e487b7160e01b600052602160045260246000fd5b6020810160038310612ed457634e487b7160e01b600052602160045260246000fd5b91905290565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201612f2e57612f2e612f06565b5060010190565b80820180821115612f4857612f48612f06565b92915050565b600060208284031215612f6057600080fd5b81518015158114612c8b57600080fd5b67ffffffffffffffff818116838216019080821115612b1e57612b1e612f06565b608081526000612fa46080830187612e2a565b60208301959095525067ffffffffffffffff92831660408201529116606090910152919050565b81810381811115612f4857612f48612f06565b606081526000612ff16060830186612e2a565b905083602083015267ffffffffffffffff83166040830152949350505050565b600181811c9082168061302557607f821691505b60208210810361304557634e487b7160e01b600052602260045260246000fd5b5091905056fea164736f6c6343000817000a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000008a1838172cbb61833f9b41a096d926a4f81334ff0000000000000000000000004300000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000278d0000000000000000000000000000000000000000000000000000000000004f1a0000000000000000000000000000000000000000000000000000000000009e340000000000000000000000000000000000000000000000000006f05b59d3b2000000000000000000000000000000000000000000000000000006f05b59d3b2000000000000000000000000000000000000000000000000000006f05b59d3b200000000000000000000000000000000000000000000000000056bc75e2d631000000000000000000000000000000000000000000000000000056bc75e2d63100000000000000000000000000000000000000000000000000002b5e3af16b18800000000000000000000000000000000000000000000000000001bc16d674ec800000000000000000000000000000000000000000000000000001bc16d674ec800000000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000000000045745544800000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106103365760003560e01c806377b8050e116101b2578063c69d4e61116100f9578063e478d188116100a2578063ecd0c0c31161007c578063ecd0c0c3146108d3578063ecf35cca146108fa578063f1c6ce831461090f578063f2fde38b1461091857600080fd5b8063e478d18814610872578063e751df1f14610899578063e7efcc66146108ac57600080fd5b8063dd7b5017116100d3578063dd7b501714610838578063e17ffc281461084b578063e22d28451461085f57600080fd5b8063c69d4e61146107db578063c99b5b6014610805578063da35350b1461081857600080fd5b80639a7221291161015b578063b3f39af911610135578063b3f39af914610784578063bf0819e01461078d578063c6432259146107b457600080fd5b80639a7221291461071c578063ad3b6dea1461072f578063ad66aeb81461075657600080fd5b80638da5cb5b1161018c5780638da5cb5b146106e55780638e19899e146106f65780638f8601081461070957600080fd5b806377b8050e146106b45780637970daf0146106bd5780638456cb59146106dd57600080fd5b80632f95987c116102815780635081d9521161022a5780635c975abb116102045780635c975abb1461067b578063654cfdff14610691578063715018a6146106a4578063770e3106146106ac57600080fd5b80635081d9521461057d578063594922fb1461059d5780635b5aaceb1461065457600080fd5b806340c66b661161025b57806340c66b661461053c57806348c9115d146105625780634c5822e41461057557600080fd5b80632f95987c146104e757806330ca1387146104fb5780633f4ba83a1461053457600080fd5b80631567edf0116102e357806323fa2894116102bd57806323fa28941461047157806325762bc5146104a55780632e1212f9146104c057600080fd5b80631567edf014610442578063207f796d14610455578063236cbc1e1461046857600080fd5b806311fd33ab1161031457806311fd33ab14610396578063144f2ab0146103f4578063153432131461041b57600080fd5b806305bafd921461033b578063081016c8146103615780630e648a7114610376575b600080fd5b61034e610349366004612bf1565b61092b565b6040519081526020015b60405180910390f35b61037461036f366004612c2c565b610a85565b005b61034e610384366004612c70565b600c6020526000908152604090205481565b61039e610cdf565b6040516103589190600060e082019050825182526020830151602083015260408301516040830152606083015160608301526080830151608083015260a083015160a083015260c083015160c083015292915050565b61034e7f000000000000000000000000000000000000000000000002b5e3af16b188000081565b61034e7f00000000000000000000000000000000000000000000000006f05b59d3b2000081565b610374610450366004612c92565b610df3565b610374610463366004612ce6565b610fe5565b61034e60055481565b60045461048c90600160801b900467ffffffffffffffff1681565b60405167ffffffffffffffff9091168152602001610358565b60045461048c90600160401b900467ffffffffffffffff1681565b61034e7f0000000000000000000000000000000000000000000000001bc16d674ec8000081565b60045461048c9067ffffffffffffffff1681565b6105227f000000000000000000000000000000000000000000000000000000000000001281565b60405160ff9091168152602001610358565b6103746110fd565b61054a6002604360981b0181565b6040516001600160a01b039091168152602001610358565b61034e610570366004612d19565b61110f565b600b5461034e565b61059061058b366004612c70565b611130565b6040516103589190612d32565b6106066105ab366004612d19565b601060205260009081526040902080546001820154600283015460039093015491926001600160a01b039091169160ff8082169167ffffffffffffffff6101008204811692600160481b830490911691600160881b90041687565b604080519788526001600160a01b0390961660208801529486019390935260ff909116606085015267ffffffffffffffff90811660808501521660a0830152151560c082015260e001610358565b61034e7f0000000000000000000000000000000000000000000000056bc75e2d6310000081565b60025460ff166040519015158152602001610358565b61037461069f366004612dd4565b61132a565b610374612120565b600a5461034e565b61034e60075481565b61034e6106cb366004612c70565b600e6020526000908152604090205481565b610374612132565b6000546001600160a01b031661054a565b610374610704366004612d19565b612142565b60125461054a906001600160a01b031681565b60135461054a906001600160a01b031681565b61034e7f00000000000000000000000000000000000000000000000006f05b59d3b2000081565b610769610764366004612df7565b612573565b60408051938452602084019290925290820152606001610358565b61034e60095481565b61034e7f0000000000000000000000000000000000000000000000000de0b6b3a764000081565b61034e7f0000000000000000000000000000000000000000000000056bc75e2d6310000081565b61048c6107e9366004612c70565b600f6020526000908152604090205467ffffffffffffffff1681565b610374610813366004612d19565b612742565b61034e610826366004612c70565b600d6020526000908152604090205481565b60145461054a906001600160a01b031681565b60085461048c9067ffffffffffffffff1681565b61054a61086d366004612d19565b612907565b61034e7f0000000000000000000000000000000000000000000000001bc16d674ec8000081565b60115461054a906001600160a01b031681565b61034e7f00000000000000000000000000000000000000000000000006f05b59d3b2000081565b61054a7f000000000000000000000000430000000000000000000000000000000000000481565b610902612931565b6040516103589190612e70565b61034e60065481565b610374610926366004612c70565b6129bf565b60006109356129fa565b816000036109bb5760405163662aa11d60e01b81523060048201526001600160a01b03841660248201526002604360981b019063662aa11d906044016020604051808303816000875af1158015610990573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109b49190612e83565b9050610a3c565b604051630951888f60e01b81523060048201526001600160a01b0384166024820152604481018390526002604360981b0190630951888f906064016020604051808303816000875af1158015610a15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a399190612e83565b90505b826001600160a01b03167f5eadc4013530f38d8b7709b47915d0cef30eee941dad69669a5b45e0686879fa82604051610a7791815260200190565b60405180910390a292915050565b610a8d6129fa565b8160ff16600003610b435760045467ffffffffffffffff90811690821610610b225760405162461bcd60e51b815260206004820152603660248201527f6e65774475726174696f6e206d757374206265206c657373207468616e20637560448201527f7272656e74205f706572696f64304475726174696f6e0000000000000000000060648201526084015b60405180910390fd5b6004805467ffffffffffffffff191667ffffffffffffffff83161790555050565b8160ff16600103610c095760045467ffffffffffffffff600160401b909104811690821610610bda5760405162461bcd60e51b815260206004820152603660248201527f6e65774475726174696f6e206d757374206265206c657373207468616e20637560448201527f7272656e74205f706572696f64314475726174696f6e000000000000000000006064820152608401610b19565b600480546fffffffffffffffff00000000000000001916600160401b67ffffffffffffffff8416021790555050565b8160ff16600203610cdb5760045467ffffffffffffffff600160801b909104811690821610610ca05760405162461bcd60e51b815260206004820152603660248201527f6e65774475726174696f6e206d757374206265206c657373207468616e20637560448201527f7272656e74205f706572696f64324475726174696f6e000000000000000000006064820152608401610b19565b600480547fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff16600160801b67ffffffffffffffff8416021790555b5050565b610d1f6040518060e00160405280600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b610d5f6040518060e00160405280600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b60095481527f0000000000000000000000000000000000000000000000056bc75e2d63100000602082015260055460408201527f0000000000000000000000000000000000000000000000056bc75e2d63100000606082015260065460808201527f000000000000000000000000000000000000000000000002b5e3af16b188000060a082015260075460c0820152919050565b610dfb6129fa565b6002604360981b016001600160a01b0316634e606c476040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610e3d57600080fd5b505af1158015610e51573d6000803e3d6000fd5b5050601180546001600160a01b0319166001600160a01b038816908117909155604051631a33757d60e01b8152909250631a33757d9150610e9790600290600401612eb2565b6020604051808303816000875af1158015610eb6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eda9190612e83565b50601280546001600160a01b0319166001600160a01b038516908117909155604051631a33757d60e01b8152631a33757d90610f1b90600290600401612eb2565b6020604051808303816000875af1158015610f3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f5e9190612e83565b50601380546001600160a01b038481166001600160a01b03199283168117909355601480549185169190921681179091556040516336b91f2b60e01b815260048101919091526336b91f2b90602401600060405180830381600087803b158015610fc757600080fd5b505af1158015610fdb573d6000803e3d6000fd5b5050505050505050565b610fed6129fa565b6011546001600160a01b0316631a33757d60ff8416600281111561101357611013612e9c565b6040518263ffffffff1660e01b815260040161102f9190612eb2565b6020604051808303816000875af115801561104e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110729190612e83565b506012546001600160a01b0316631a33757d60ff8316600281111561109957611099612e9c565b6040518263ffffffff1660e01b81526004016110b59190612eb2565b6020604051808303816000875af11580156110d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110f89190612e83565b505050565b6111056129fa565b61110d612a27565b565b600b818154811061111f57600080fd5b600091825260209091200154905081565b6001600160a01b0381166000908152600f602052604081205460609167ffffffffffffffff909116908190036111695750606092915050565b60008167ffffffffffffffff81111561118457611184612eda565b6040519080825280602002602001820160405280156111eb57816020015b6040805160e08101825260008082526020808301829052928201819052606082018190526080820181905260a0820181905260c082015282526000199092019101816111a25790505b5090506000805b600b5481101561132057856001600160a01b031660106000600b848154811061121d5761121d612ef0565b600091825260208083209091015483528201929092526040019020600101546001600160a01b0316036113185760106000600b838154811061126157611261612ef0565b600091825260208083209091015483528281019390935260409182019020815160e0810183528154815260018201546001600160a01b0316938101939093526002810154918301919091526003015460ff808216606084015267ffffffffffffffff610100830481166080850152600160481b83041660a0840152600160881b90910416151560c0820152835184908490811061130057611300612ef0565b60200260200101819052508161131590612f1c565b91505b6001016111f2565b5090949350505050565b611332612a79565b61133a612a9d565b33600360ff83161061138e5760405162461bcd60e51b815260206004820152601e60248201527f706572696f6454797065206d757374206265206c657373207468616e203300006044820152606401610b19565b604051636eb1769f60e11b81526001600160a01b03828116600483015230602483015284917f00000000000000000000000043000000000000000000000000000000000000049091169063dd62ed3e90604401602060405180830381865afa1580156113fe573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114229190612e83565b10156114965760405162461bcd60e51b815260206004820152602e60248201527f596f75206d75737420616c6c6f7720746f20757365206f662066756e6473206260448201527f792074686520436f6e74726163740000000000000000000000000000000000006064820152608401610b19565b6040516370a0823160e01b81526001600160a01b03828116600483015284917f0000000000000000000000004300000000000000000000000000000000000004909116906370a0823190602401602060405180830381865afa158015611500573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115249190612e83565b10156115725760405162461bcd60e51b815260206004820152601b60248201527f596f7520646f6e2774206861766520656e6f7567682066756e647300000000006044820152606401610b19565b8160ff16600003611795577f00000000000000000000000000000000000000000000000006f05b59d3b2000083146115fa5760405162461bcd60e51b815260206004820152602560248201527f416d6f756e74206d75737420626520657175616c20746f205f706572696f6430604482015264507269636560d81b6064820152608401610b19565b7f0000000000000000000000000000000000000000000000056bc75e2d63100000156116b0577f0000000000000000000000000000000000000000000000056bc75e2d631000008360055461164f9190612f35565b11156116b05760405162461bcd60e51b815260206004820152602a60248201527f546865206c696d6974206f662074686520506572696f642d3020686173206265604482015269195b881c995858da195960b21b6064820152608401610b19565b7f0000000000000000000000000000000000000000000000001bc16d674ec8000015611790576001600160a01b0381166000908152600c60205260409020547f0000000000000000000000000000000000000000000000001bc16d674ec800009061171c908590612f35565b11156117905760405162461bcd60e51b815260206004820152603160248201527f596f752068617665207265616368656420746865206c696d697420706572206160448201527f63636f756e742028506572696f642d30290000000000000000000000000000006064820152608401610b19565b611bd1565b8160ff166001036119b3577f00000000000000000000000000000000000000000000000006f05b59d3b20000831461181d5760405162461bcd60e51b815260206004820152602560248201527f416d6f756e74206d75737420626520657175616c20746f205f706572696f6431604482015264507269636560d81b6064820152608401610b19565b7f0000000000000000000000000000000000000000000000056bc75e2d63100000156118d3577f0000000000000000000000000000000000000000000000056bc75e2d63100000836006546118729190612f35565b11156118d35760405162461bcd60e51b815260206004820152602a60248201527f546865206c696d6974206f662074686520506572696f642d3120686173206265604482015269195b881c995858da195960b21b6064820152608401610b19565b7f0000000000000000000000000000000000000000000000001bc16d674ec8000015611790576001600160a01b0381166000908152600d60205260409020547f0000000000000000000000000000000000000000000000001bc16d674ec800009061193f908590612f35565b11156117905760405162461bcd60e51b815260206004820152603160248201527f596f752068617665207265616368656420746865206c696d697420706572206160448201527f63636f756e742028506572696f642d31290000000000000000000000000000006064820152608401610b19565b8160ff16600203611bd1577f00000000000000000000000000000000000000000000000006f05b59d3b200008314611a3b5760405162461bcd60e51b815260206004820152602560248201527f416d6f756e74206d75737420626520657175616c20746f205f706572696f6432604482015264507269636560d81b6064820152608401610b19565b7f000000000000000000000000000000000000000000000002b5e3af16b188000015611af1577f000000000000000000000000000000000000000000000002b5e3af16b188000083600754611a909190612f35565b1115611af15760405162461bcd60e51b815260206004820152602a60248201527f546865206c696d6974206f662074686520506572696f642d3220686173206265604482015269195b881c995858da195960b21b6064820152608401610b19565b7f0000000000000000000000000000000000000000000000000de0b6b3a764000015611bd1576001600160a01b0381166000908152600e60205260409020547f0000000000000000000000000000000000000000000000000de0b6b3a764000090611b5d908590612f35565b1115611bd15760405162461bcd60e51b815260206004820152603160248201527f596f752068617665207265616368656420746865206c696d697420706572206160448201527f63636f756e742028506572696f642d32290000000000000000000000000000006064820152608401610b19565b6040516323b872dd60e01b81526001600160a01b038281166004830152306024830152604482018590527f000000000000000000000000430000000000000000000000000000000000000416906323b872dd906064016020604051808303816000875af1158015611c46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c6a9190612f4e565b50611c7481612ac7565b611cc457600a80546001810182556000919091527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a80180546001600160a01b0319166001600160a01b0383161790555b60003360405160609190911b6bffffffffffffffffffffffff1916602082015243603482015260540160408051601f1981840301815291815281516020928301206000818152601090935291205490915015611d3f576040805160208101839052016040516020818303038152906040528051906020012090505b6040805160e0810182528281526001600160a01b038416602082015290810185905260ff8416606082018190524267ffffffffffffffff81166080840152600060a0840181905260c084018190529092919003611e0f5785600554611da49190612f35565b6005556001600160a01b0384166000908152600c6020526040902054611dcb908790612f35565b6001600160a01b0385166000908152600c6020526040902055600454611dfb9067ffffffffffffffff1683612f70565b67ffffffffffffffff1660a0820152611f0d565b8460ff16600103611e865785600654611e289190612f35565b6006556001600160a01b0384166000908152600d6020526040902054611e4f908790612f35565b6001600160a01b0385166000908152600d6020526040902055600454611dfb90600160401b900467ffffffffffffffff1683612f70565b8460ff16600203611f0d5785600754611e9f9190612f35565b6007556001600160a01b0384166000908152600e6020526040902054611ec6908790612f35565b6001600160a01b0385166000908152600e6020526040902055600454611efd90600160801b900467ffffffffffffffff1683612f70565b67ffffffffffffffff1660a08201525b60008381526010602090815260408083208451815591840151600180840180546001600160a01b039093166001600160a01b031990931692909217909155908401516002830155606084015160039092018054608086015160a087015160c08801511515600160881b0260ff60881b1967ffffffffffffffff928316600160481b021671ffffffffffffffffff000000000000000000199383166101000268ffffffffffffffffff1990951660ff90981697909717939093179190911694909417179055600b805480830182559084527f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db9018690556008805491939092909161201891859116612f70565b82546101009290920a67ffffffffffffffff8181021990931691831602179091556001600160a01b0386166000908152600f602052604090205461205f9250166001612f70565b6001600160a01b0385166000908152600f60205260408120805467ffffffffffffffff191667ffffffffffffffff9390931692909217909155600980548892906120aa908490612f35565b909155505060408051602081018590526001600160a01b038616917f8ad34ed119fadf47b1c528b5ce8b8810d94b4d5d47339ba0f0b83b9eac806dfb910160408051601f198184030181529082905260a085015161210b928b918891612f91565b60405180910390a250505050610cdb60018055565b6121286129fa565b61110d6000612b25565b61213a6129fa565b61110d612b75565b61214a612a9d565b600081815260106020908152604091829020825160e0810184528154815260018201546001600160a01b03169281019290925260028101549282018390526003015460ff808216606084015267ffffffffffffffff610100830481166080850152600160481b83041660a0840152600160881b9091041615801560c083015233929061223e5760405162461bcd60e51b815260206004820152602660248201527f546865204465706f7369742068617320616c7265616479206265656e2077697460448201527f68647261776e00000000000000000000000000000000000000000000000000006064820152608401610b19565b826001600160a01b031682602001516001600160a01b0316146122af5760405162461bcd60e51b815260206004820152602360248201527f596f75277265206e6f7420746865204f776e6572206f6620746865204465706f6044820152621cda5d60ea1b6064820152608401610b19565b4267ffffffffffffffff168260a0015167ffffffffffffffff16106123225760405162461bcd60e51b815260206004820152602360248201527f796f752063616e277420776974686472617720796f7572204465706f736974206044820152621e595d60ea1b6064820152608401610b19565b60405163a9059cbb60e01b81526001600160a01b038481166004830152602482018390527f0000000000000000000000004300000000000000000000000000000000000004169063a9059cbb906044016020604051808303816000875af1158015612391573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123b59190612f4e565b50816060015160ff16600003612418576001600160a01b0383166000908152600c60205260409020546123e9908290612fcb565b6001600160a01b0384166000908152600c6020526040902055600554612410908290612fcb565b6005556124d8565b816060015160ff1660010361247a576001600160a01b0383166000908152600d602052604090205461244b908290612fcb565b6001600160a01b0384166000908152600d6020526040902055600654612472908290612fcb565b6006556124d8565b816060015160ff166002036124d8576001600160a01b0383166000908152600e60205260409020546124ad908290612fcb565b6001600160a01b0384166000908152600e60205260409020556007546124d4908290612fcb565b6007555b8151600090815260106020908152604091829020600301805460ff60881b1916600160881b17905581519081018690526001600160a01b038516917f7cfc353e7ae0c0cad34c5a1b2ad6a113b5f2d9143184fbd2436dcc5cfa1d898391016040516020818303038152906040528361254d4290565b60405161255c93929190612fde565b60405180910390a250505061257060018055565b50565b60008060006125806129fa565b601254604051635569f64b60e11b81526001600160a01b038881166004830152602482018890529091169063aad3ec96906044016020604051808303816000875af11580156125d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125f79190612e83565b601154604051635569f64b60e11b81526001600160a01b0389811660048301526024820188905292955091169063aad3ec96906044016020604051808303816000875af115801561264c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126709190612e83565b60405163662aa11d60e01b81523060048201526001600160a01b03881660248201529092506002604360981b019063662aa11d906044016020604051808303816000875af11580156126c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126ea9190612e83565b60408051858152602081018590529081018290529091506001600160a01b038716907f1943c53b7309df037b9077befdba52e1fd2c298ad0e91a0b4a4d163c7d095f189060600160405180910390a293509350939050565b600081815260106020908152604091829020825160e0810184528154815260018201546001600160a01b03169281018390526002820154938101939093526003015460ff808216606085015267ffffffffffffffff610100830481166080860152600160481b83041660a0850152600160881b90910416151560c0830152339190821461281d5760405162461bcd60e51b815260206004820152602360248201527f596f75277265206e6f7420746865204f776e6572206f6620746865204465706f6044820152621cda5d60ea1b6064820152608401610b19565b6000816060015160ff16600003612841575060045467ffffffffffffffff1661288f565b816060015160ff1660010361286a5750600454600160401b900467ffffffffffffffff1661288f565b816060015160ff1660020361288f5750600454600160801b900467ffffffffffffffff165b81516000908152601060205260409020600301546128bd908290610100900467ffffffffffffffff16612f70565b91516000908152601060205260409020600301805467ffffffffffffffff93909316600160481b0270ffffffffffffffff0000000000000000001990931692909217909155505050565b600a818154811061291757600080fd5b6000918252602090912001546001600160a01b0316905081565b6003805461293e90613011565b80601f016020809104026020016040519081016040528092919081815260200182805461296a90613011565b80156129b75780601f1061298c576101008083540402835291602001916129b7565b820191906000526020600020905b81548152906001019060200180831161299a57829003601f168201915b505050505081565b6129c76129fa565b6001600160a01b0381166129f157604051631e4fbdf760e01b815260006004820152602401610b19565b61257081612b25565b6000546001600160a01b0316331461110d5760405163118cdaa760e01b8152336004820152602401610b19565b612a2f612bb2565b6002805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b60025460ff161561110d5760405163d93c066560e01b815260040160405180910390fd5b600260015403612ac057604051633ee5aeb560e01b815260040160405180910390fd5b6002600155565b600080805b600a54811015612b1e57836001600160a01b0316600a8281548110612af357612af3612ef0565b6000918252602090912001546001600160a01b031603612b165760019150612b1e565b600101612acc565b5092915050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b612b7d612a79565b6002805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258612a5c3390565b60025460ff1661110d57604051638dfc202b60e01b815260040160405180910390fd5b80356001600160a01b0381168114612bec57600080fd5b919050565b60008060408385031215612c0457600080fd5b612c0d83612bd5565b946020939093013593505050565b803560ff81168114612bec57600080fd5b60008060408385031215612c3f57600080fd5b612c4883612c1b565b9150602083013567ffffffffffffffff81168114612c6557600080fd5b809150509250929050565b600060208284031215612c8257600080fd5b612c8b82612bd5565b9392505050565b60008060008060808587031215612ca857600080fd5b612cb185612bd5565b9350612cbf60208601612bd5565b9250612ccd60408601612bd5565b9150612cdb60608601612bd5565b905092959194509250565b60008060408385031215612cf957600080fd5b612d0283612c1b565b9150612d1060208401612c1b565b90509250929050565b600060208284031215612d2b57600080fd5b5035919050565b602080825282518282018190526000919060409081850190868401855b82811015612dc757815180518552868101516001600160a01b031687860152858101518686015260608082015160ff169086015260808082015167ffffffffffffffff9081169187019190915260a0808301519091169086015260c09081015115159085015260e09093019290850190600101612d4f565b5091979650505050505050565b60008060408385031215612de757600080fd5b82359150612d1060208401612c1b565b600080600060608486031215612e0c57600080fd5b612e1584612bd5565b95602085013595506040909401359392505050565b6000815180845260005b81811015612e5057602081850181015186830182015201612e34565b506000602082860101526020601f19601f83011685010191505092915050565b602081526000612c8b6020830184612e2a565b600060208284031215612e9557600080fd5b5051919050565b634e487b7160e01b600052602160045260246000fd5b6020810160038310612ed457634e487b7160e01b600052602160045260246000fd5b91905290565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201612f2e57612f2e612f06565b5060010190565b80820180821115612f4857612f48612f06565b92915050565b600060208284031215612f6057600080fd5b81518015158114612c8b57600080fd5b67ffffffffffffffff818116838216019080821115612b1e57612b1e612f06565b608081526000612fa46080830187612e2a565b60208301959095525067ffffffffffffffff92831660408201529116606090910152919050565b81810381811115612f4857612f48612f06565b606081526000612ff16060830186612e2a565b905083602083015267ffffffffffffffff83166040830152949350505050565b600181811c9082168061302557607f821691505b60208210810361304557634e487b7160e01b600052602260045260246000fd5b5091905056fea164736f6c6343000817000a

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

00000000000000000000000000000000000000000000000000000000000000200000000000000000000000008a1838172cbb61833f9b41a096d926a4f81334ff0000000000000000000000004300000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000278d0000000000000000000000000000000000000000000000000000000000004f1a0000000000000000000000000000000000000000000000000000000000009e340000000000000000000000000000000000000000000000000006f05b59d3b2000000000000000000000000000000000000000000000000000006f05b59d3b2000000000000000000000000000000000000000000000000000006f05b59d3b200000000000000000000000000000000000000000000000000056bc75e2d631000000000000000000000000000000000000000000000000000056bc75e2d63100000000000000000000000000000000000000000000000000002b5e3af16b18800000000000000000000000000000000000000000000000000001bc16d674ec800000000000000000000000000000000000000000000000000001bc16d674ec800000000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000000000045745544800000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : params (tuple):
Arg [1] : superOwner (address): 0x8A1838172Cbb61833f9B41A096D926a4F81334fF
Arg [2] : tokenAddress (address): 0x4300000000000000000000000000000000000004
Arg [3] : tokenSymbol (string): WETH
Arg [4] : tokenDecimals (uint8): 18
Arg [5] : period0Duration (uint64): 2592000
Arg [6] : period1Duration (uint64): 5184000
Arg [7] : period2Duration (uint64): 10368000
Arg [8] : period0Price (uint256): 500000000000000000
Arg [9] : period1Price (uint256): 500000000000000000
Arg [10] : period2Price (uint256): 500000000000000000
Arg [11] : period0MaxAmount (uint256): 100000000000000000000
Arg [12] : period1MaxAmount (uint256): 100000000000000000000
Arg [13] : period2MaxAmount (uint256): 50000000000000000000
Arg [14] : period0MaxAmountPerAccount (uint256): 2000000000000000000
Arg [15] : period1MaxAmountPerAccount (uint256): 2000000000000000000
Arg [16] : period2MaxAmountPerAccount (uint256): 1000000000000000000


-----Encoded View---------------
19 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000020
Arg [1] : 0000000000000000000000008a1838172cbb61833f9b41a096d926a4f81334ff
Arg [2] : 0000000000000000000000004300000000000000000000000000000000000004
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000200
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000012
Arg [5] : 0000000000000000000000000000000000000000000000000000000000278d00
Arg [6] : 00000000000000000000000000000000000000000000000000000000004f1a00
Arg [7] : 00000000000000000000000000000000000000000000000000000000009e3400
Arg [8] : 00000000000000000000000000000000000000000000000006f05b59d3b20000
Arg [9] : 00000000000000000000000000000000000000000000000006f05b59d3b20000
Arg [10] : 00000000000000000000000000000000000000000000000006f05b59d3b20000
Arg [11] : 0000000000000000000000000000000000000000000000056bc75e2d63100000
Arg [12] : 0000000000000000000000000000000000000000000000056bc75e2d63100000
Arg [13] : 000000000000000000000000000000000000000000000002b5e3af16b1880000
Arg [14] : 0000000000000000000000000000000000000000000000001bc16d674ec80000
Arg [15] : 0000000000000000000000000000000000000000000000001bc16d674ec80000
Arg [16] : 0000000000000000000000000000000000000000000000000de0b6b3a7640000
Arg [17] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [18] : 5745544800000000000000000000000000000000000000000000000000000000


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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

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