ETH Price: $2,889.91 (+0.56%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00
Transaction Hash
Method
Block
From
To
0xb21fae66415e271c4442f77e25ad94c4ee75322b9536a470c9e51884215b2c14 Claim(pending)2025-01-30 17:46:414 days ago1738259201IN
0x13335677...D78722523
0 ETH(Pending)(Pending)
Claim215659132025-01-06 14:07:2328 days ago1736172443IN
0x13335677...D78722523
0 ETH0.0002982811.56663619
Claim214219872024-12-17 11:34:1148 days ago1734435251IN
0x13335677...D78722523
0 ETH0.000210488.16207453
Pause Claims213575522024-12-08 11:44:1157 days ago1733658251IN
0x13335677...D78722523
0 ETH0.000454599.80214064
Claim213570022024-12-08 9:53:4757 days ago1733651627IN
0x13335677...D78722523
0 ETH0.000801729.49805019
Claim213566612024-12-08 8:45:2357 days ago1733647523IN
0x13335677...D78722523
0 ETH0.000809029.58462648
Claim213566162024-12-08 8:36:2357 days ago1733646983IN
0x13335677...D78722523
0 ETH0.000580668.62679026
Claim213557102024-12-08 5:33:4757 days ago1733636027IN
0x13335677...D78722523
0 ETH0.0008787910.41113361
Claim213555572024-12-08 5:02:3557 days ago1733634155IN
0x13335677...D78722523
0 ETH0.000617047.31022182
Claim213541242024-12-08 0:15:2357 days ago1733616923IN
0x13335677...D78722523
0 ETH0.000638511.37971808
Claim213541212024-12-08 0:14:4757 days ago1733616887IN
0x13335677...D78722523
0 ETH0.0008951410.60488438
Claim213539792024-12-07 23:46:2357 days ago1733615183IN
0x13335677...D78722523
0 ETH0.0006912310.26965165
Claim213521452024-12-07 17:36:4758 days ago1733593007IN
0x13335677...D78722523
0 ETH0.0009996614.85191594
Claim213517702024-12-07 16:21:1158 days ago1733588471IN
0x13335677...D78722523
0 ETH0.0009696114.40539667
Claim213514422024-12-07 15:15:1158 days ago1733584511IN
0x13335677...D78722523
0 ETH0.0011978414.19095817
Claim213511952024-12-07 14:25:2358 days ago1733581523IN
0x13335677...D78722523
0 ETH0.0012587714.91277523
Claim213508942024-12-07 13:24:3558 days ago1733577875IN
0x13335677...D78722523
0 ETH0.0009336811.06139149
Claim213508872024-12-07 13:23:1158 days ago1733577791IN
0x13335677...D78722523
0 ETH0.0010734212.71693955
Claim213508822024-12-07 13:22:1158 days ago1733577731IN
0x13335677...D78722523
0 ETH0.0009785411.59289828
Claim213506322024-12-07 12:31:4758 days ago1733574707IN
0x13335677...D78722523
0 ETH0.0007931811.78423582
Claim213502182024-12-07 11:08:1158 days ago1733569691IN
0x13335677...D78722523
0 ETH0.0010126911.99752042
Claim213500232024-12-07 10:28:4758 days ago1733567327IN
0x13335677...D78722523
0 ETH0.0008468712.58192233
Claim213499492024-12-07 10:13:4758 days ago1733566427IN
0x13335677...D78722523
0 ETH0.0011237613.31328327
Claim213495772024-12-07 8:58:5958 days ago1733561939IN
0x13335677...D78722523
0 ETH0.0010603612.56227563
Claim213495412024-12-07 8:51:4758 days ago1733561507IN
0x13335677...D78722523
0 ETH0.0011146613.20548052
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block
From
To
213570022024-12-08 9:53:4757 days ago1733651627
0x13335677...D78722523
0 ETH
213566612024-12-08 8:45:2357 days ago1733647523
0x13335677...D78722523
0 ETH
213566162024-12-08 8:36:2357 days ago1733646983
0x13335677...D78722523
0 ETH
213557102024-12-08 5:33:4757 days ago1733636027
0x13335677...D78722523
0 ETH
213555572024-12-08 5:02:3557 days ago1733634155
0x13335677...D78722523
0 ETH
213541242024-12-08 0:15:2357 days ago1733616923
0x13335677...D78722523
0 ETH
213541212024-12-08 0:14:4757 days ago1733616887
0x13335677...D78722523
0 ETH
213539792024-12-07 23:46:2357 days ago1733615183
0x13335677...D78722523
0 ETH
213521452024-12-07 17:36:4758 days ago1733593007
0x13335677...D78722523
0 ETH
213517702024-12-07 16:21:1158 days ago1733588471
0x13335677...D78722523
0 ETH
213514422024-12-07 15:15:1158 days ago1733584511
0x13335677...D78722523
0 ETH
213511952024-12-07 14:25:2358 days ago1733581523
0x13335677...D78722523
0 ETH
213508942024-12-07 13:24:3558 days ago1733577875
0x13335677...D78722523
0 ETH
213508872024-12-07 13:23:1158 days ago1733577791
0x13335677...D78722523
0 ETH
213508822024-12-07 13:22:1158 days ago1733577731
0x13335677...D78722523
0 ETH
213506322024-12-07 12:31:4758 days ago1733574707
0x13335677...D78722523
0 ETH
213502182024-12-07 11:08:1158 days ago1733569691
0x13335677...D78722523
0 ETH
213500232024-12-07 10:28:4758 days ago1733567327
0x13335677...D78722523
0 ETH
213499492024-12-07 10:13:4758 days ago1733566427
0x13335677...D78722523
0 ETH
213495772024-12-07 8:58:5958 days ago1733561939
0x13335677...D78722523
0 ETH
213495412024-12-07 8:51:4758 days ago1733561507
0x13335677...D78722523
0 ETH
213495282024-12-07 8:49:1158 days ago1733561351
0x13335677...D78722523
0 ETH
213493202024-12-07 8:07:3558 days ago1733558855
0x13335677...D78722523
0 ETH
213492682024-12-07 7:57:1158 days ago1733558231
0x13335677...D78722523
0 ETH
213492392024-12-07 7:51:2358 days ago1733557883
0x13335677...D78722523
0 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
MoonSaleCustom

Compiler Version
v0.8.19+commit.7dd6d404

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 16 : MoonSaleCustom.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.19;

import "./MoonSaleBase.sol";

/**
 * @title MoonSaleCustom
 * @notice This is a  whitelisted sale contract. Every whitelisted address
 * can buy the same amount of tokens on a FCFS basis.
 */
contract MoonSaleCustom is MoonSaleBase {
    using SafeERC20 for IERC20;

    mapping(address => uint256) public allocations;

    constructor(
        address _saleToken,
        uint256 _price,
        address _defaultPaymentToken,
        uint256 _startTime,
        uint256 _endTime,
        uint256 _claimTime,
        uint256 _maxTotal,
        address _treasury,
        uint256[4] memory _vestingData
    )
        MoonSaleBase(
            _saleToken,
            _price,
            _defaultPaymentToken,
            _startTime,
            _endTime,
            _claimTime,
            _maxTotal,
            _treasury,
            _vestingData
        )
    {}

    function getMaxAllocation(
        address _address
    ) public view override returns (uint256) {
        return allocations[_address];
    }

    function setAllocations(
        address[] memory _addresses,
        uint256[] memory _allocations
    ) external onlyOwner {
        require(_addresses.length == _allocations.length, "length mismatch");

        for (uint256 i = 0; i < _addresses.length; i++) {
            allocations[_addresses[i]] = _allocations[i];
        }
    }
}
// solhint-enable not-rely-on-time

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

pragma solidity ^0.8.0;

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

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

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

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

    /**
     * @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 {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @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 {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _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);
    }
}

File 3 of 16 : Pausable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)

pragma solidity ^0.8.0;

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

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

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

    bool private _paused;

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

    /**
     * @dev 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 {
        require(!paused(), "Pausable: paused");
    }

    /**
     * @dev Throws if the contract is not paused.
     */
    function _requirePaused() internal view virtual {
        require(paused(), "Pausable: not paused");
    }

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

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

File 4 of 16 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

/**
 * @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;

    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
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

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

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

pragma solidity ^0.8.0;

import "./IERC20.sol";
import "./extensions/IERC20Metadata.sol";
import "../../utils/Context.sol";

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * The default value of {decimals} is 18. To change this, you should override
 * this function so it returns a different value.
 *
 * We have followed general OpenZeppelin Contracts guidelines: functions revert
 * instead returning `false` on failure. This behavior is nonetheless
 * conventional and does not conflict with the expectations of ERC20
 * applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20 is Context, IERC20, IERC20Metadata {
    mapping(address => uint256) private _balances;

    mapping(address => mapping(address => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * All two of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5.05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the default value returned by this function, unless
     * it's overridden.
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual override returns (uint8) {
        return 18;
    }

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual override returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address to, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _transfer(owner, to, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on
     * `transferFrom`. This is semantically equivalent to an infinite approval.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * NOTE: Does not update the allowance if the current allowance
     * is the maximum `uint256`.
     *
     * Requirements:
     *
     * - `from` and `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     * - the caller must have allowance for ``from``'s tokens of at least
     * `amount`.
     */
    function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {
        address spender = _msgSender();
        _spendAllowance(from, spender, amount);
        _transfer(from, to, amount);
        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, allowance(owner, spender) + addedValue);
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        address owner = _msgSender();
        uint256 currentAllowance = allowance(owner, spender);
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(owner, spender, currentAllowance - subtractedValue);
        }

        return true;
    }

    /**
     * @dev Moves `amount` of tokens from `from` to `to`.
     *
     * This internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     */
    function _transfer(address from, address to, uint256 amount) internal virtual {
        require(from != address(0), "ERC20: transfer from the zero address");
        require(to != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(from, to, amount);

        uint256 fromBalance = _balances[from];
        require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[from] = fromBalance - amount;
            // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by
            // decrementing then incrementing.
            _balances[to] += amount;
        }

        emit Transfer(from, to, amount);

        _afterTokenTransfer(from, to, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply += amount;
        unchecked {
            // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.
            _balances[account] += amount;
        }
        emit Transfer(address(0), account, amount);

        _afterTokenTransfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        uint256 accountBalance = _balances[account];
        require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
        unchecked {
            _balances[account] = accountBalance - amount;
            // Overflow not possible: amount <= accountBalance <= totalSupply.
            _totalSupply -= amount;
        }

        emit Transfer(account, address(0), amount);

        _afterTokenTransfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(address owner, address spender, uint256 amount) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Updates `owner` s allowance for `spender` based on spent `amount`.
     *
     * Does not update the allowance amount in case of infinite allowance.
     * Revert if not enough allowance is available.
     *
     * Might emit an {Approval} event.
     */
    function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {
        uint256 currentAllowance = allowance(owner, spender);
        if (currentAllowance != type(uint256).max) {
            require(currentAllowance >= amount, "ERC20: insufficient allowance");
            unchecked {
                _approve(owner, spender, currentAllowance - amount);
            }
        }
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {}

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * has been transferred to `to`.
     * - when `from` is zero, `amount` tokens have been minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens have been burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}
}

File 6 of 16 : IERC20Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the symbol of the token.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}

File 7 of 16 : IERC20Permit.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/IERC20Permit.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

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

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

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

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

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

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

File 9 of 16 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../extensions/IERC20Permit.sol";
import "../../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    /**
     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    /**
     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
     */
    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(IERC20 token, address spender, uint256 value) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    /**
     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 oldAllowance = token.allowance(address(this), spender);
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));
    }

    /**
     * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));
        }
    }

    /**
     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
     * to be set to zero before setting it to a non-zero value, such as USDT.
     */
    function forceApprove(IERC20 token, address spender, uint256 value) internal {
        bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);

        if (!_callOptionalReturnBool(token, approvalCall)) {
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));
            _callOptionalReturn(token, approvalCall);
        }
    }

    /**
     * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.
     * Revert on invalid signature.
     */
    function safePermit(
        IERC20Permit token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     *
     * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
     */
    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false
        // and not revert is the subcall reverts.

        (bool success, bytes memory returndata) = address(token).call(data);
        return
            success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));
    }
}

File 10 of 16 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     *
     * Furthermore, `isContract` will also return true if the target contract within
     * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
     * which only has an effect at the end of a transaction.
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // Look for revert reason and bubble it up if present
        if (returndata.length > 0) {
            // The easiest way to bubble the revert reason is using memory via assembly
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert(errorMessage);
        }
    }
}

File 11 of 16 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

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

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

File 12 of 16 : BaseClaim.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.19;

import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

// solhint-disable not-rely-on-time
contract BaseClaim is Ownable {
    using SafeERC20 for ERC20;

    struct UserInfo {
        uint256 reward;
        uint256 withdrawn;
    }
    mapping(address => UserInfo) public userInfo;

    uint256 public claimTime; // Time at which claiming can start

    ERC20 public immutable rewardToken; // Token that is distributed

    event RewardClaimed(
        address indexed user,
        uint256 indexed withdrawAmount,
        uint256 totalWithdrawn
    );
    event ClaimsPaused();
    event ClaimsUnpaused();

    uint256 public totalRewards;
    uint256 public totalWithdrawn;

    bool public areClaimsPaused;

    constructor(address _rewardToken) {
        require(
            address(_rewardToken) != address(0),
            "Reward token must be set"
        );

        rewardToken = ERC20(_rewardToken);

        claimTime = block.timestamp;
    }

    ////
    // Modifiers
    ////
    modifier onlyWithRewards(address addr) {
        require(userInfo[addr].reward > 0, "Address has no rewards");
        _;
    }

    ////
    // Functions
    ////

    function pauseClaims() external onlyOwner {
        areClaimsPaused = true;

        emit ClaimsPaused();
    }

    function unPauseClaims() external onlyOwner {
        areClaimsPaused = false;

        emit ClaimsUnpaused();
    }

    function addUserReward(address _user, uint256 _amount) internal {
        UserInfo storage user = userInfo[_user];
        uint256 newReward = user.reward + _amount;

        totalRewards = totalRewards + _amount;
        user.reward = newReward;
    }

    function setUserReward(address _user, uint256 _amount) internal {
        UserInfo storage user = userInfo[_user];

        totalRewards = (totalRewards + _amount) - (user.reward);
        user.reward = _amount;

        require(user.reward >= user.withdrawn, "Invalid reward amount");
    }

    function freezeUserReward(address _user) internal {
        UserInfo storage user = userInfo[_user];

        uint256 change = user.reward - user.withdrawn;

        user.reward = user.withdrawn;
        totalRewards = totalRewards - change;
    }

    function claim() external onlyWithRewards(msg.sender) {
        require(!areClaimsPaused, "Claims are paused");

        UserInfo storage user = userInfo[msg.sender];

        uint256 withdrawAmount = getWithdrawableAmount(msg.sender);

        user.withdrawn = user.withdrawn + withdrawAmount;
        totalWithdrawn = totalWithdrawn + withdrawAmount;

        assert(user.withdrawn <= user.reward);

        rewardToken.safeTransfer(msg.sender, withdrawAmount);

        emit RewardClaimed(msg.sender, withdrawAmount, user.withdrawn);
    }

    function getWithdrawableAmount(
        address _user
    ) public view returns (uint256) {
        UserInfo memory user = userInfo[_user];

        uint256 unlockedAmount = calculateUnlockedAmount(
            user.reward,
            block.timestamp
        );

        return unlockedAmount - user.withdrawn;
    }

    // This is a timed vesting contract
    //
    // Claimants can claim 100% of ther claim upon claimTime.
    //
    // Can be overriden in contracts that inherit from this one.
    function calculateUnlockedAmount(
        uint256 _totalAmount,
        uint256 _timestamp
    ) internal view virtual returns (uint256) {
        return _timestamp > claimTime ? _totalAmount : 0;
    }

    function totalAvailableAfter() public view virtual returns (uint256) {
        return claimTime;
    }

    function withdrawRewardAmount() external onlyOwner {
        rewardToken.safeTransfer(
            msg.sender,
            rewardToken.balanceOf(address(this)) - totalRewards
        );
    }

    function emergencyWithdrawToken(ERC20 tokenAddress) external onlyOwner {
        tokenAddress.safeTransfer(
            msg.sender,
            tokenAddress.balanceOf(address(this))
        );
    }
}
// solhint-enable not-rely-on-time

File 13 of 16 : Claim.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.19;

import "./VestedClaim.sol";

contract Claim is VestedClaim {
    event ClaimantsAdded(
        address[] indexed claimants,
        uint256[] indexed amounts
    );

    event RewardsFrozen(address[] indexed claimants);

    constructor(uint256 _claimTime, address _token) VestedClaim(_token) {
        claimTime = _claimTime;
    }

    function updateClaimTimestamp(uint256 _claimTime) external onlyOwner {
        claimTime = _claimTime;
    }

    function addClaimants(
        address[] calldata _claimants,
        uint256[] calldata _claimAmounts
    ) external onlyOwner {
        require(
            _claimants.length == _claimAmounts.length,
            "Arrays do not have equal length"
        );

        for (uint256 i = 0; i < _claimants.length; i++) {
            setUserReward(_claimants[i], _claimAmounts[i]);
        }

        emit ClaimantsAdded(_claimants, _claimAmounts);
    }

    function freezeRewards(address[] memory _claimants) external onlyOwner {
        for (uint256 i = 0; i < _claimants.length; i++) {
            freezeUserReward(_claimants[i]);
        }

        emit RewardsFrozen(_claimants);
    }

    // set user info for multiple users
    function setUserInfo(
        address[] calldata _users,
        uint256[] calldata _rewards,
        uint256[] calldata _withdrawns
    ) external onlyOwner {
        require(
            _users.length == _rewards.length &&
                _users.length == _withdrawns.length,
            "Arrays do not have equal length"
        );

        for (uint256 i = 0; i < _users.length; i++) {
            _setUserInfo(_users[i], _rewards[i], _withdrawns[i]);
        }

        emit ClaimantsAdded(_users, _rewards);
    }

    function _setUserInfo(
        address _user,
        uint256 _reward,
        uint256 _withdrawn
    ) internal {
        UserInfo storage user = userInfo[_user];

        user.reward = _reward;
        user.withdrawn = _withdrawn;

        totalRewards += _reward;
        totalWithdrawn += _withdrawn;

        require(user.reward >= user.withdrawn, "Invalid reward amount");
    }
}

File 14 of 16 : ClaimConfigurable.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.19;

import "./Claim.sol";

contract ClaimConfigurable is Claim {
    constructor(
        uint256 _claimTime,
        address _token,
        uint256[4] memory vestingData
    ) Claim(_claimTime, _token) {
        require(vestingData[0] <= BASE_POINTS, "initialUnlock too high");

        initialUnlock = vestingData[0];
        cliff = vestingData[1];
        vesting = vestingData[2];
        vestingInterval = vestingData[3];
    }
}

File 15 of 16 : VestedClaim.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.19;

import "./BaseClaim.sol";

contract VestedClaim is BaseClaim {
    uint256 public constant BASE_POINTS = 10000;
    uint256 public initialUnlock; // percentage unlocked at claimTime (100% = 10000)
    uint256 public cliff; // delay before gradual unlock
    uint256 public vesting; // total time of gradual unlock
    uint256 public vestingInterval; // interval of unlock

    constructor(address _rewardToken) BaseClaim(_rewardToken) {
        require(initialUnlock <= BASE_POINTS, "initialUnlock too high");

        initialUnlock = 2000; // = 20%
        cliff = 90 days;
        vesting = 455 days;
        vestingInterval = 1 days;
    } // solhint-disable-line no-empty-blocks

    // This is a timed vesting contract
    //
    // Claimants can claim 20% of ther claim upon claimTime.
    // After 90 days, there is a cliff that starts a gradual unlock. For ~15 months (455 days),
    // a relative amount of the remaining 80% is unlocked.
    //
    // At claimTime: 20%
    // At claimTime + 90, until claimTime + 455 days: daily unlock
    // After claimTime + 90 + 455: 100%
    function calculateUnlockedAmount(
        uint256 _totalAmount,
        uint256 _timestamp
    ) internal view override returns (uint256) {
        if (_timestamp < claimTime) {
            return 0;
        }

        uint256 timeSinceClaim = _timestamp - claimTime;
        uint256 unlockedAmount = 0;

        if (timeSinceClaim <= cliff) {
            unlockedAmount = (_totalAmount * initialUnlock) / BASE_POINTS;
        } else if (timeSinceClaim > cliff + vesting) {
            unlockedAmount = _totalAmount;
        } else {
            uint256 unlockedOnClaim = (_totalAmount * initialUnlock) /
                BASE_POINTS;
            uint256 vestable = _totalAmount - unlockedOnClaim;
            uint256 intervalsSince = (timeSinceClaim - cliff) / vestingInterval;
            uint256 totalVestingIntervals = vesting / vestingInterval;

            unlockedAmount =
                ((vestable * intervalsSince) / totalVestingIntervals) +
                unlockedOnClaim;
        }

        return unlockedAmount;
    }

    function totalAvailableAfter() public view override returns (uint256) {
        return claimTime + cliff + vesting;
    }
}

File 16 of 16 : MoonSaleBase.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.19;

import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";

import "../claim/ClaimConfigurable.sol";

// solhint-disable not-rely-on-time
/**
 * @title MoonSaleOpen
 * @notice This is a  whitelisted sale contract. Every whitelisted address
 * can buy the same amount of tokens on a FCFS basis.
 */
abstract contract MoonSaleBase is ClaimConfigurable, Pausable, ReentrancyGuard {
    using SafeERC20 for IERC20;

    uint256 public startTime;
    uint256 public endTime;
    uint256 public maxTotal; // Max total allocated (in sale token currency)
    uint256 public total; // Total sold (in sale token currency)

    address public treasury;

    struct PaymentToken {
        IERC20 token;
        uint256 price;
    }
    PaymentToken[] public paymentTokens;

    event PaymentTokenUpdated(address token, uint256 price);
    event PaymentTokensReset();

    event Bought(
        address indexed by,
        address indexed paymentToken,
        uint256 paymentAmount,
        uint256 buyAmount
    );

    constructor(
        address _saleToken,
        uint256 _price,
        address _defaultPaymentToken,
        uint256 _startTime,
        uint256 _endTime,
        uint256 _claimTime,
        uint256 _maxTotal,
        address _treasury,
        uint256[4] memory vestingData
    ) ClaimConfigurable(_claimTime, _saleToken, vestingData) {
        paymentTokens.push(PaymentToken(IERC20(_defaultPaymentToken), _price));

        startTime = _startTime;
        endTime = _endTime;

        maxTotal = _maxTotal;
        treasury = _treasury;

        // Provided by VestedClaim
        claimTime = _claimTime;
    }

    modifier withAllocation(address _address) virtual {
        require(
            getAvailableAllocation(_address) > 0,
            "No available allocation"
        );
        _;
    }

    // modify start time
    function setStartTime(uint256 _startTime) external onlyOwner {
        startTime = _startTime;
    }

    // modify end time
    function setEndTime(uint256 _endTime) external onlyOwner {
        endTime = _endTime;
    }

    // modify max total
    function setMaxTotal(uint256 _maxTotal) external onlyOwner {
        maxTotal = _maxTotal;
    }

    // set treasury
    function setTreasury(address _treasury) external onlyOwner {
        treasury = _treasury;
    }

    // Payment tokens
    function getPaymentTokens() public view returns (PaymentToken[] memory) {
        return paymentTokens;
    }

    function resetPaymentTokens(
        address[] calldata _tokens,
        uint256[] calldata _prices
    ) external onlyOwner {
        delete paymentTokens;
        emit PaymentTokensReset();

        for (uint256 i = 0; i < _tokens.length; i++) {
            paymentTokens.push(PaymentToken(IERC20(_tokens[i]), _prices[i]));
            emit PaymentTokenUpdated(_tokens[i], _prices[i]);
        }
    }

    function addPaymentToken(
        address _token,
        uint256 _price
    ) external onlyOwner {
        // Update existing
        for (uint256 i = 0; i < paymentTokens.length; i++) {
            if (address(paymentTokens[i].token) == _token) {
                paymentTokens[i].price = _price;
                emit PaymentTokenUpdated(_token, _price);
                return;
            }
        }

        // Add non-existing
        paymentTokens.push(PaymentToken(IERC20(_token), _price));
        emit PaymentTokenUpdated(_token, _price);
    }

    function removePaymentToken(address _token) external onlyOwner {
        uint256 length = paymentTokens.length;
        uint256 toRemove;
        for (uint256 i = 0; i < length; i++) {
            if (address(paymentTokens[i].token) == _token) {
                toRemove = i;
            }
        }

        paymentTokens[toRemove] = paymentTokens[length - 1];
        paymentTokens.pop();
        emit PaymentTokenUpdated(_token, 0);
    }

    /**
     * @dev Get reward token price in payment token.
     * It returns "How much payment token you need to buy one sale token"
     *
     * @param paymentToken Payment token address
     *
     * @return Price in payment token
     */
    function getPriceInToken(
        address paymentToken
    ) public view returns (uint256) {
        for (uint256 i = 0; i < paymentTokens.length; i++) {
            if (address(paymentTokens[i].token) == paymentToken) {
                return paymentTokens[i].price;
            }
        }
        return 0;
    }

    /**
     * @dev Get available sale token for an address. That's the remaining sale token allocation available.
     * @param _address Address to check
     *
     * @return Available sale token for an address
     */
    function getAvailableAllocation(
        address _address
    ) public view virtual returns (uint256) {
        return getMaxAllocation(_address) - userInfo[_address].reward;
    }

    function buy(
        address paymentToken,
        uint256 paymentAmount
    ) external withAllocation(msg.sender) whenNotPaused nonReentrant {
        require(block.timestamp >= startTime, "Not started");
        require(block.timestamp <= endTime, "Ended");

        uint256 allocationAmount = getTokenAmount(paymentToken, paymentAmount);
        require(allocationAmount > 0, "Invalid amount");

        total = total + allocationAmount;
        require(total <= maxTotal, "Max total reached");

        IERC20(paymentToken).safeTransferFrom(
            msg.sender,
            treasury,
            paymentAmount
        );

        UserInfo storage user = userInfo[msg.sender];
        uint256 totalUserAllocation = user.reward + allocationAmount;
        require(
            totalUserAllocation <= getMaxAllocation(msg.sender),
            "Address allocation limit reached"
        );
        addUserReward(msg.sender, allocationAmount);

        emit Bought(msg.sender, paymentToken, paymentAmount, allocationAmount);
    }

    /**
     * @dev Get sale token amount that you would receive for a payment token amount
     * @param paymentToken Payment token address
     * @param paymentAmount Payment token amount
     *
     * @return Sale token amount
     */
    function getTokenAmount(
        address paymentToken,
        uint256 paymentAmount
    ) public view returns (uint256) {
        if (getPriceInToken(paymentToken) == 0) return 0;
        // Sale token has 18 decimals
        return (paymentAmount * 1e18) / getPriceInToken(paymentToken);
    }

    /**
     * OVERRIDE
     */

    /**
     * @dev Get max allocation of sale token for an address. That's the maximum sale tokens an address can get.
     * @param _address Address to check
     *
     * @return Max sale token amount for an address
     */
    function getMaxAllocation(
        address _address
    ) public view virtual returns (uint256);

    function getSaleData()
        public
        view
        returns (
            address _rewardToken,
            uint256 _startTime,
            uint256 _endTime,
            uint256 _maxTotal,
            uint256 _total,
            uint256 _available,
            PaymentToken[] memory _paymentTokens
        )
    {
        return (
            address(rewardToken),
            startTime,
            endTime,
            maxTotal,
            total,
            maxTotal - total,
            paymentTokens
        );
    }

    function getUserData(
        address _address
    )
        public
        view
        returns (uint256 _allocation, uint256 _reward, uint256 _available)
    {
        return (
            getMaxAllocation(_address),
            userInfo[_address].reward,
            getAvailableAllocation(_address)
        );
    }
}
// solhint-enable not-rely-on-time

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "remappings": [
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "forge-std/=lib/forge-std/src/"
  ],
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_saleToken","type":"address"},{"internalType":"uint256","name":"_price","type":"uint256"},{"internalType":"address","name":"_defaultPaymentToken","type":"address"},{"internalType":"uint256","name":"_startTime","type":"uint256"},{"internalType":"uint256","name":"_endTime","type":"uint256"},{"internalType":"uint256","name":"_claimTime","type":"uint256"},{"internalType":"uint256","name":"_maxTotal","type":"uint256"},{"internalType":"address","name":"_treasury","type":"address"},{"internalType":"uint256[4]","name":"_vestingData","type":"uint256[4]"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"by","type":"address"},{"indexed":true,"internalType":"address","name":"paymentToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"paymentAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"buyAmount","type":"uint256"}],"name":"Bought","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address[]","name":"claimants","type":"address[]"},{"indexed":true,"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"ClaimantsAdded","type":"event"},{"anonymous":false,"inputs":[],"name":"ClaimsPaused","type":"event"},{"anonymous":false,"inputs":[],"name":"ClaimsUnpaused","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":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"}],"name":"PaymentTokenUpdated","type":"event"},{"anonymous":false,"inputs":[],"name":"PaymentTokensReset","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"withdrawAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalWithdrawn","type":"uint256"}],"name":"RewardClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address[]","name":"claimants","type":"address[]"}],"name":"RewardsFrozen","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"BASE_POINTS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_claimants","type":"address[]"},{"internalType":"uint256[]","name":"_claimAmounts","type":"uint256[]"}],"name":"addClaimants","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"addPaymentToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"allocations","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"areClaimsPaused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"paymentToken","type":"address"},{"internalType":"uint256","name":"paymentAmount","type":"uint256"}],"name":"buy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cliff","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract ERC20","name":"tokenAddress","type":"address"}],"name":"emergencyWithdrawToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"endTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_claimants","type":"address[]"}],"name":"freezeRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"getAvailableAllocation","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"getMaxAllocation","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPaymentTokens","outputs":[{"components":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"}],"internalType":"struct MoonSaleBase.PaymentToken[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"paymentToken","type":"address"}],"name":"getPriceInToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getSaleData","outputs":[{"internalType":"address","name":"_rewardToken","type":"address"},{"internalType":"uint256","name":"_startTime","type":"uint256"},{"internalType":"uint256","name":"_endTime","type":"uint256"},{"internalType":"uint256","name":"_maxTotal","type":"uint256"},{"internalType":"uint256","name":"_total","type":"uint256"},{"internalType":"uint256","name":"_available","type":"uint256"},{"components":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"}],"internalType":"struct MoonSaleBase.PaymentToken[]","name":"_paymentTokens","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"paymentToken","type":"address"},{"internalType":"uint256","name":"paymentAmount","type":"uint256"}],"name":"getTokenAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"getUserData","outputs":[{"internalType":"uint256","name":"_allocation","type":"uint256"},{"internalType":"uint256","name":"_reward","type":"uint256"},{"internalType":"uint256","name":"_available","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"getWithdrawableAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"initialUnlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxTotal","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":"pauseClaims","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"paymentTokens","outputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"removePaymentToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_tokens","type":"address[]"},{"internalType":"uint256[]","name":"_prices","type":"uint256[]"}],"name":"resetPaymentTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardToken","outputs":[{"internalType":"contract ERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_addresses","type":"address[]"},{"internalType":"uint256[]","name":"_allocations","type":"uint256[]"}],"name":"setAllocations","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_endTime","type":"uint256"}],"name":"setEndTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxTotal","type":"uint256"}],"name":"setMaxTotal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_startTime","type":"uint256"}],"name":"setStartTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_treasury","type":"address"}],"name":"setTreasury","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_users","type":"address[]"},{"internalType":"uint256[]","name":"_rewards","type":"uint256[]"},{"internalType":"uint256[]","name":"_withdrawns","type":"uint256[]"}],"name":"setUserInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"total","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalAvailableAfter","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalWithdrawn","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasury","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unPauseClaims","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_claimTime","type":"uint256"}],"name":"updateClaimTimestamp","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"reward","type":"uint256"},{"internalType":"uint256","name":"withdrawn","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vesting","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vestingInterval","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawRewardAmount","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60a06040523480156200001157600080fd5b5060405162002a4038038062002a408339810160408190526200003491620002fe565b888888888888888888838982828280806200004f336200027b565b6001600160a01b038116620000ab5760405162461bcd60e51b815260206004820152601860248201527f52657761726420746f6b656e206d75737420626520736574000000000000000060448201526064015b60405180910390fd5b6001600160a01b0316608052426002556006546127101015620001115760405162461bcd60e51b815260206004820152601660248201527f696e697469616c556e6c6f636b20746f6f2068696768000000000000000000006044820152606401620000a2565b50506107d06006556276a700600755630257da806008556201518060095560025580516127101015620001875760405162461bcd60e51b815260206004820152601660248201527f696e697469616c556e6c6f636b20746f6f2068696768000000000000000000006044820152606401620000a2565b8051600655602080820151600755604080830151600855606090920151600955600a805460ff191690556001600b81905582518084019093526001600160a01b039b8c1683529082019b8c52601180549182018155600052905160029182027f31ecc21a745e3968a04e9570e4425bc18fa8019c68028196b546d1669c200c6881018054928d166001600160a01b03199384161790559b517f31ecc21a745e3968a04e9570e4425bc18fa8019c68028196b546d1669c200c69909c019b909b55600c98909855505050600d93909355600e55601080549290941691909416179091555550620003f098505050505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b0381168114620002e357600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b6000806000806000806000806000610180808b8d0312156200031f57600080fd5b6200032a8b620002cb565b99506020808c015199506200034260408d01620002cb565b985060608c0151975060808c0151965060a08c0151955060c08c015194506200036e60e08d01620002cb565b93508c61011f8d01126200038157600080fd5b604051608081016001600160401b0381118282101715620003a657620003a6620002e8565b604052918c0191808e841115620003bc57600080fd5b6101008e015b84811015620003db5780518252908301908301620003c2565b50508093505050509295985092959850929598565b6080516126186200042860003960008181610626015281816107ea0152818161086901528181610d2d0152610e8f01526126186000f3fe608060405234801561001057600080fd5b50600436106102bb5760003560e01c8063715018a611610182578063b5ab1c5d116100e9578063cce7ec13116100a2578063f2fde38b1161007c578063f2fde38b146105fb578063f67771751461060e578063f7c618c114610621578063ffc9896b1461064857600080fd5b8063cce7ec13146105a3578063de660841146105b6578063f0f44260146105e857600080fd5b8063b5ab1c5d1461054d578063b827d55614610556578063b8e50cab14610569578063c3f368af14610572578063ca5e553e1461057b578063ccb98ffc1461059057600080fd5b80638da5cb5b1161013b5780638da5cb5b146104e3578063964ddbb2146104f4578063a0d7c60e14610507578063a512542114610514578063aa2bf67614610527578063b01993981461053a57600080fd5b8063715018a61461049457806378e979251461049c57806379bf3672146104a55780637d7fa215146104ad57806387a609f1146104c85780638a7d76b0146104d057600080fd5b80633197cbb61161022657806352a9039c116101df57806352a9039c146103ed57806357b6527e1461040d5780635b89a572146104365780635c975abb1461044957806361d027b314610460578063648e3c261461048b57600080fd5b80633197cbb6146103a45780633e0a322d146103ad57806343404cc2146103c057806344c63eec146103d35780634b319713146103dc5780634e71d92d146103e557600080fd5b80631959a002116102785780631959a0021461031d5780631af03203146103595780631ff64acd1461036c5780632126ce851461037f57806327b3bf11146103925780632ddbd13a1461039b57600080fd5b8063017fbef5146102c057806305df0ea6146102d55780630e15561a146102dd5780630f3314e7146102f9578063115ece4c1461030157806313d033c014610314575b600080fd5b6102d36102ce366004611fa6565b610676565b005b6102d36107bc565b6102e660035481565b6040519081526020015b60405180910390f35b6102d3610892565b6102e661030f366004612055565b6108d2565b6102e660075481565b61034461032b366004612081565b6001602081905260009182526040909120805491015482565b604080519283526020830191909152016102f0565b6102d3610367366004612081565b61091a565b6102d361037a366004612184565b6109a4565b6102e661038d366004612081565b610a6f565b6102e660025481565b6102e6600f5481565b6102e6600d5481565b6102d36103bb36600461223f565b610a9d565b6102d36103ce366004612055565b610aaa565b6102e660085481565b6102e660045481565b6102d3610c2e565b6102e66103fb366004612081565b60126020526000908152604090205481565b6102e661041b366004612081565b6001600160a01b031660009081526012602052604090205490565b6102e6610444366004612081565b610da1565b600a5460ff165b60405190151581526020016102f0565b601054610473906001600160a01b031681565b6040516001600160a01b0390911681526020016102f0565b6102e6600e5481565b6102d3610e33565b6102e6600c5481565b6102d3610e45565b6104b5610e82565b6040516102f097969594939291906122a7565b6102e6610f52565b6102d36104de3660046122e6565b610f76565b6000546001600160a01b0316610473565b6102d361050236600461223f565b611091565b6005546104509060ff1681565b6102d3610522366004612081565b61109e565b6102d361053536600461223f565b6111ed565b6102d36105483660046122e6565b6111fa565b6102e661271081565b6102d3610564366004612352565b61136d565b6102e660095481565b6102e660065481565b6105836113f7565b6040516102f09190612387565b6102d361059e36600461223f565b61146c565b6102d36105b1366004612055565b611479565b6105c96105c436600461223f565b6116fd565b604080516001600160a01b0390931683526020830191909152016102f0565b6102d36105f6366004612081565b611735565b6102d3610609366004612081565b61175f565b6102e661061c366004612081565b6117d5565b6104737f000000000000000000000000000000000000000000000000000000000000000081565b61065b610656366004612081565b61182e565b604080519384526020840192909252908201526060016102f0565b61067e611881565b848314801561068c57508481145b6106dd5760405162461bcd60e51b815260206004820152601f60248201527f41727261797320646f206e6f74206861766520657175616c206c656e6774680060448201526064015b60405180910390fd5b60005b8581101561075b576107498787838181106106fd576106fd61239a565b90506020020160208101906107129190612081565b8686848181106107245761072461239a565b9050602002013585858581811061073d5761073d61239a565b905060200201356118db565b80610753816123c6565b9150506106e0565b50838360405161076c9291906123df565b60405180910390208686604051610784929190612408565b604051908190038120907f9e90b93ef585ec8fc3bef98ea72276d1068177358fc8071996f3ab9a18dedbe190600090a3505050505050565b6107c4611881565b6003546040516370a0823160e01b81523060048201526108909133916001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa158015610831573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610855919061244a565b61085f9190612463565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169190611982565b565b61089a611881565b6005805460ff191660011790556040517f7cdf17ad9ee98efb9f1c7c037e6d670fdaa3f0ea4d4b016e4707fa1827a79e4390600090a1565b60006108dd83610da1565b6000036108ec57506000610914565b6108f583610da1565b61090783670de0b6b3a7640000612476565b610911919061248d565b90505b92915050565b610922611881565b6040516370a0823160e01b81523060048201526109a19033906001600160a01b038416906370a0823190602401602060405180830381865afa15801561096c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610990919061244a565b6001600160a01b0384169190611982565b50565b6109ac611881565b80518251146109ef5760405162461bcd60e51b815260206004820152600f60248201526e0d8cadccee8d040dad2e6dac2e8c6d608b1b60448201526064016106d4565b60005b8251811015610a6a57818181518110610a0d57610a0d61239a565b602002602001015160126000858481518110610a2b57610a2b61239a565b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020819055508080610a62906123c6565b9150506109f2565b505050565b6001600160a01b03811660009081526001602090815260408083205460129092528220546109149190612463565b610aa5611881565b600c55565b610ab2611881565b60005b601154811015610b6e57826001600160a01b031660118281548110610adc57610adc61239a565b60009182526020909120600290910201546001600160a01b031603610b5c578160118281548110610b0f57610b0f61239a565b600091825260209182902060016002909202010191909155604080516001600160a01b03861681529182018490526000805160206125c383398151915291015b60405180910390a1505050565b80610b66816123c6565b915050610ab5565b506040805180820182526001600160a01b0384811680835260208084018681526011805460018101825560009190915294517f31ecc21a745e3968a04e9570e4425bc18fa8019c68028196b546d1669c200c68600290960295860180546001600160a01b031916919095161790935591517f31ecc21a745e3968a04e9570e4425bc18fa8019c68028196b546d1669c200c6990930192909255825191825281018390526000805160206125c3833981519152910160405180910390a15050565b33600081815260016020526040902054610c835760405162461bcd60e51b81526020600482015260166024820152754164647265737320686173206e6f207265776172647360501b60448201526064016106d4565b60055460ff1615610cca5760405162461bcd60e51b815260206004820152601160248201527010db185a5b5cc8185c99481c185d5cd959607a1b60448201526064016106d4565b33600081815260016020526040812091610ce3906117d5565b9050808260010154610cf591906124af565b6001830155600454610d089082906124af565b600455815460018301541115610d2057610d206124c2565b610d546001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163383611982565b80336001600160a01b03167ff01da32686223933d8a18a391060918c7f11a3648639edd87ae013e2e27317438460010154604051610d9491815260200190565b60405180910390a3505050565b6000805b601154811015610e2a57826001600160a01b031660118281548110610dcc57610dcc61239a565b60009182526020909120600290910201546001600160a01b031603610e185760118181548110610dfe57610dfe61239a565b906000526020600020906002020160010154915050919050565b80610e22816123c6565b915050610da5565b50600092915050565b610e3b611881565b61089060006119e5565b610e4d611881565b6005805460ff191690556040517f3bd17c2ef5a04c031943ad098b3f9bfa9da2bc92be12a6d4197b076f4c133c0090600090a1565b60008060008060008060607f0000000000000000000000000000000000000000000000000000000000000000600c54600d54600e54600f54600f54600e54610eca9190612463565b601180805480602002602001604051908101604052809291908181526020016000905b82821015610f35576000848152602090819020604080518082019091526002850290910180546001600160a01b03168252600190810154828401529083529092019101610eed565b505050509050965096509650965096509650965090919293949596565b6000600854600754600254610f6791906124af565b610f7191906124af565b905090565b610f7e611881565b828114610fcd5760405162461bcd60e51b815260206004820152601f60248201527f41727261797320646f206e6f74206861766520657175616c206c656e6774680060448201526064016106d4565b60005b8381101561103257611020858583818110610fed57610fed61239a565b90506020020160208101906110029190612081565b8484848181106110145761101461239a565b90506020020135611a35565b8061102a816123c6565b915050610fd0565b5081816040516110439291906123df565b6040518091039020848460405161105b929190612408565b604051908190038120907f9e90b93ef585ec8fc3bef98ea72276d1068177358fc8071996f3ab9a18dedbe190600090a350505050565b611099611881565b600255565b6110a6611881565b6011546000805b8281101561110757836001600160a01b0316601182815481106110d2576110d261239a565b60009182526020909120600290910201546001600160a01b0316036110f5578091505b806110ff816123c6565b9150506110ad565b506011611115600184612463565b815481106111255761112561239a565b9060005260206000209060020201601182815481106111465761114661239a565b60009182526020909120825460029092020180546001600160a01b0319166001600160a01b03909216919091178155600191820154910155601180548061118f5761118f6124d8565b60008281526020812060026000199093019283020180546001600160a01b031916815560010181905591556040516000805160206125c383398151915291610b4f918691906001600160a01b03929092168252602082015260400190565b6111f5611881565b600e55565b611202611881565b61120e60116000611f14565b6040517fae8cb61d05474475445ef2a83bacf0a11fa6ecda92c85c75aa5b31990eb37a2490600090a160005b8381101561136657601160405180604001604052808787858181106112615761126161239a565b90506020020160208101906112769190612081565b6001600160a01b031681526020018585858181106112965761129661239a565b60209081029290920135909252835460018082018655600095865294829020845160029092020180546001600160a01b0319166001600160a01b039092169190911781559201519190920155506000805160206125c38339815191528585838181106113045761130461239a565b90506020020160208101906113199190612081565b84848481811061132b5761132b61239a565b604080516001600160a01b0390951685526020918202939093013590840152500160405180910390a18061135e816123c6565b91505061123a565b5050505050565b611375611881565b60005b81518110156113b5576113a38282815181106113965761139661239a565b6020026020010151611ab9565b806113ad816123c6565b915050611378565b50806040516113c491906124ee565b604051908190038120907fbda4b3a657d90ded99df9bd5cf2b360e44cb7ec1b832a3d82599966ea357525390600090a250565b60606011805480602002602001604051908101604052809291908181526020016000905b82821015611463576000848152602090819020604080518082019091526002850290910180546001600160a01b0316825260019081015482840152908352909201910161141b565b50505050905090565b611474611881565b600d55565b33600061148582610a6f565b116114d25760405162461bcd60e51b815260206004820152601760248201527f4e6f20617661696c61626c6520616c6c6f636174696f6e00000000000000000060448201526064016106d4565b6114da611b06565b6114e2611b4c565b600c544210156115225760405162461bcd60e51b815260206004820152600b60248201526a139bdd081cdd185c9d195960aa1b60448201526064016106d4565b600d5442111561155c5760405162461bcd60e51b8152602060048201526005602482015264115b99195960da1b60448201526064016106d4565b600061156884846108d2565b9050600081116115ab5760405162461bcd60e51b815260206004820152600e60248201526d125b9d985b1a5908185b5bdd5b9d60921b60448201526064016106d4565b80600f546115b991906124af565b600f819055600e5410156116035760405162461bcd60e51b815260206004820152601160248201527013585e081d1bdd185b081c995858da1959607a1b60448201526064016106d4565b60105461161f906001600160a01b038681169133911686611ba5565b336000908152600160205260408120805490919061163e9084906124af565b336000908152601260205260409020549091508111156116a05760405162461bcd60e51b815260206004820181905260248201527f4164647265737320616c6c6f636174696f6e206c696d6974207265616368656460448201526064016106d4565b6116aa3384611bdd565b60408051868152602081018590526001600160a01b0388169133917fbf77fd13a39d14dc0da779342c14105c38d9a5d0c60f2caa22f5fd1d5525416d910160405180910390a3505050610a6a6001600b55565b6011818154811061170d57600080fd5b6000918252602090912060029091020180546001909101546001600160a01b03909116915082565b61173d611881565b601080546001600160a01b0319166001600160a01b0392909216919091179055565b611767611881565b6001600160a01b0381166117cc5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016106d4565b6109a1816119e5565b6001600160a01b038116600090815260016020818152604080842081518083019092528054808352930154918101919091529082906118149042611c1e565b90508160200151816118269190612463565b949350505050565b6000806000611852846001600160a01b031660009081526012602052604090205490565b6001600160a01b03851660009081526001602052604090205461187486610a6f565b9250925092509193909250565b6000546001600160a01b031633146108905760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016106d4565b6001600160a01b0383166000908152600160208190526040822084815590810183905560038054919285926119119084906124af565b92505081905550816004600082825461192a91906124af565b909155505060018101548154101561197c5760405162461bcd60e51b8152602060048201526015602482015274125b9d985b1a59081c995dd85c9908185b5bdd5b9d605a1b60448201526064016106d4565b50505050565b6040516001600160a01b038316602482015260448101829052610a6a90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611d1c565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b03821660009081526001602052604090208054600354611a5d9084906124af565b611a679190612463565b6003558181556001810154821015610a6a5760405162461bcd60e51b8152602060048201526015602482015274125b9d985b1a59081c995dd85c9908185b5bdd5b9d605a1b60448201526064016106d4565b6001600160a01b03811660009081526001602081905260408220908101548154919291611ae69190612463565b60018301548355600354909150611afe908290612463565b600355505050565b600a5460ff16156108905760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016106d4565b6002600b5403611b9e5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016106d4565b6002600b55565b6040516001600160a01b038085166024830152831660448201526064810182905261197c9085906323b872dd60e01b906084016119ae565b6001600160a01b03821660009081526001602052604081208054909190611c059084906124af565b905082600354611c1591906124af565b60035590555050565b6000600254821015611c3257506000610914565b600060025483611c429190612463565b905060006007548211611c715761271060065486611c609190612476565b611c6a919061248d565b9050611826565b600854600754611c8191906124af565b821115611c8f575083611826565b600061271060065487611ca29190612476565b611cac919061248d565b90506000611cba8288612463565b9050600060095460075486611ccf9190612463565b611cd9919061248d565b90506000600954600854611ced919061248d565b90508381611cfb8486612476565b611d05919061248d565b611d0f91906124af565b9998505050505050505050565b6000611d71826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611df19092919063ffffffff16565b9050805160001480611d92575080806020019051810190611d92919061252d565b610a6a5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016106d4565b6060611826848460008585600080866001600160a01b03168587604051611e189190612573565b60006040518083038185875af1925050503d8060008114611e55576040519150601f19603f3d011682016040523d82523d6000602084013e611e5a565b606091505b5091509150611e6b87838387611e76565b979650505050505050565b60608315611ee5578251600003611ede576001600160a01b0385163b611ede5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016106d4565b5081611826565b6118268383815115611efa5781518083602001fd5b8060405162461bcd60e51b81526004016106d4919061258f565b50805460008255600202906000526020600020908101906109a191905b80821115611f565780546001600160a01b031916815560006001820155600201611f31565b5090565b60008083601f840112611f6c57600080fd5b50813567ffffffffffffffff811115611f8457600080fd5b6020830191508360208260051b8501011115611f9f57600080fd5b9250929050565b60008060008060008060608789031215611fbf57600080fd5b863567ffffffffffffffff80821115611fd757600080fd5b611fe38a838b01611f5a565b90985096506020890135915080821115611ffc57600080fd5b6120088a838b01611f5a565b9096509450604089013591508082111561202157600080fd5b5061202e89828a01611f5a565b979a9699509497509295939492505050565b6001600160a01b03811681146109a157600080fd5b6000806040838503121561206857600080fd5b823561207381612040565b946020939093013593505050565b60006020828403121561209357600080fd5b813561209e81612040565b9392505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156120e4576120e46120a5565b604052919050565b600067ffffffffffffffff821115612106576121066120a5565b5060051b60200190565b600082601f83011261212157600080fd5b81356020612136612131836120ec565b6120bb565b82815260059290921b8401810191818101908684111561215557600080fd5b8286015b8481101561217957803561216c81612040565b8352918301918301612159565b509695505050505050565b6000806040838503121561219757600080fd5b823567ffffffffffffffff808211156121af57600080fd5b6121bb86838701612110565b93506020915081850135818111156121d257600080fd5b85019050601f810186136121e557600080fd5b80356121f3612131826120ec565b81815260059190911b8201830190838101908883111561221257600080fd5b928401925b8284101561223057833582529284019290840190612217565b80955050505050509250929050565b60006020828403121561225157600080fd5b5035919050565b600081518084526020808501945080840160005b8381101561229c57815180516001600160a01b03168852830151838801526040909601959082019060010161226c565b509495945050505050565b60018060a01b03881681528660208201528560408201528460608201528360808201528260a082015260e060c08201526000611d0f60e0830184612258565b600080600080604085870312156122fc57600080fd5b843567ffffffffffffffff8082111561231457600080fd5b61232088838901611f5a565b9096509450602087013591508082111561233957600080fd5b5061234687828801611f5a565b95989497509550505050565b60006020828403121561236457600080fd5b813567ffffffffffffffff81111561237b57600080fd5b61182684828501612110565b6020815260006109116020830184612258565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016123d8576123d86123b0565b5060010190565b60006001600160fb1b038311156123f557600080fd5b8260051b80858437919091019392505050565b60008184825b8581101561243f57813561242181612040565b6001600160a01b03168352602092830192919091019060010161240e565b509095945050505050565b60006020828403121561245c57600080fd5b5051919050565b81810381811115610914576109146123b0565b8082028115828204841417610914576109146123b0565b6000826124aa57634e487b7160e01b600052601260045260246000fd5b500490565b80820180821115610914576109146123b0565b634e487b7160e01b600052600160045260246000fd5b634e487b7160e01b600052603160045260246000fd5b815160009082906020808601845b838110156125215781516001600160a01b0316855293820193908201906001016124fc565b50929695505050505050565b60006020828403121561253f57600080fd5b8151801515811461209e57600080fd5b60005b8381101561256a578181015183820152602001612552565b50506000910152565b6000825161258581846020870161254f565b9190910192915050565b60208152600082518060208401526125ae81604085016020870161254f565b601f01601f1916919091016040019291505056fe1cef96c693692f4beb6c09bfe69ff50bd430608c0ab5507c9979fac0f8c365bda26469706673582212209af23ac5760de60f892cecb5dc2f3ce0f8f88281eeff2bb818a1401fcb643a6164736f6c63430008130033000000000000000000000000c5d27f27f08d1fd1e3ebbaa50b3442e6c0d504390000000000000000000000000000000000000000000000000000000000001f40000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000000000000000000000000000000000000659e78b00000000000000000000000000000000000000000000000000000000065a02ca00000000000000000000000000000000000000000000000000000000065a11cdc0000000000000000000000000000000000000000000cecb8f27f4200f3a00000000000000000000000000000b64e395cbfcdc46c993ed9f181e0161e4aa8798a00000000000000000000000000000000000000000000000000000000000003e8000000000000000000000000000000000000000000000000000000000076a70000000000000000000000000000000000000000000000000000000000032190000000000000000000000000000000000000000000000000000000000000000e10

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106102bb5760003560e01c8063715018a611610182578063b5ab1c5d116100e9578063cce7ec13116100a2578063f2fde38b1161007c578063f2fde38b146105fb578063f67771751461060e578063f7c618c114610621578063ffc9896b1461064857600080fd5b8063cce7ec13146105a3578063de660841146105b6578063f0f44260146105e857600080fd5b8063b5ab1c5d1461054d578063b827d55614610556578063b8e50cab14610569578063c3f368af14610572578063ca5e553e1461057b578063ccb98ffc1461059057600080fd5b80638da5cb5b1161013b5780638da5cb5b146104e3578063964ddbb2146104f4578063a0d7c60e14610507578063a512542114610514578063aa2bf67614610527578063b01993981461053a57600080fd5b8063715018a61461049457806378e979251461049c57806379bf3672146104a55780637d7fa215146104ad57806387a609f1146104c85780638a7d76b0146104d057600080fd5b80633197cbb61161022657806352a9039c116101df57806352a9039c146103ed57806357b6527e1461040d5780635b89a572146104365780635c975abb1461044957806361d027b314610460578063648e3c261461048b57600080fd5b80633197cbb6146103a45780633e0a322d146103ad57806343404cc2146103c057806344c63eec146103d35780634b319713146103dc5780634e71d92d146103e557600080fd5b80631959a002116102785780631959a0021461031d5780631af03203146103595780631ff64acd1461036c5780632126ce851461037f57806327b3bf11146103925780632ddbd13a1461039b57600080fd5b8063017fbef5146102c057806305df0ea6146102d55780630e15561a146102dd5780630f3314e7146102f9578063115ece4c1461030157806313d033c014610314575b600080fd5b6102d36102ce366004611fa6565b610676565b005b6102d36107bc565b6102e660035481565b6040519081526020015b60405180910390f35b6102d3610892565b6102e661030f366004612055565b6108d2565b6102e660075481565b61034461032b366004612081565b6001602081905260009182526040909120805491015482565b604080519283526020830191909152016102f0565b6102d3610367366004612081565b61091a565b6102d361037a366004612184565b6109a4565b6102e661038d366004612081565b610a6f565b6102e660025481565b6102e6600f5481565b6102e6600d5481565b6102d36103bb36600461223f565b610a9d565b6102d36103ce366004612055565b610aaa565b6102e660085481565b6102e660045481565b6102d3610c2e565b6102e66103fb366004612081565b60126020526000908152604090205481565b6102e661041b366004612081565b6001600160a01b031660009081526012602052604090205490565b6102e6610444366004612081565b610da1565b600a5460ff165b60405190151581526020016102f0565b601054610473906001600160a01b031681565b6040516001600160a01b0390911681526020016102f0565b6102e6600e5481565b6102d3610e33565b6102e6600c5481565b6102d3610e45565b6104b5610e82565b6040516102f097969594939291906122a7565b6102e6610f52565b6102d36104de3660046122e6565b610f76565b6000546001600160a01b0316610473565b6102d361050236600461223f565b611091565b6005546104509060ff1681565b6102d3610522366004612081565b61109e565b6102d361053536600461223f565b6111ed565b6102d36105483660046122e6565b6111fa565b6102e661271081565b6102d3610564366004612352565b61136d565b6102e660095481565b6102e660065481565b6105836113f7565b6040516102f09190612387565b6102d361059e36600461223f565b61146c565b6102d36105b1366004612055565b611479565b6105c96105c436600461223f565b6116fd565b604080516001600160a01b0390931683526020830191909152016102f0565b6102d36105f6366004612081565b611735565b6102d3610609366004612081565b61175f565b6102e661061c366004612081565b6117d5565b6104737f000000000000000000000000c5d27f27f08d1fd1e3ebbaa50b3442e6c0d5043981565b61065b610656366004612081565b61182e565b604080519384526020840192909252908201526060016102f0565b61067e611881565b848314801561068c57508481145b6106dd5760405162461bcd60e51b815260206004820152601f60248201527f41727261797320646f206e6f74206861766520657175616c206c656e6774680060448201526064015b60405180910390fd5b60005b8581101561075b576107498787838181106106fd576106fd61239a565b90506020020160208101906107129190612081565b8686848181106107245761072461239a565b9050602002013585858581811061073d5761073d61239a565b905060200201356118db565b80610753816123c6565b9150506106e0565b50838360405161076c9291906123df565b60405180910390208686604051610784929190612408565b604051908190038120907f9e90b93ef585ec8fc3bef98ea72276d1068177358fc8071996f3ab9a18dedbe190600090a3505050505050565b6107c4611881565b6003546040516370a0823160e01b81523060048201526108909133916001600160a01b037f000000000000000000000000c5d27f27f08d1fd1e3ebbaa50b3442e6c0d5043916906370a0823190602401602060405180830381865afa158015610831573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610855919061244a565b61085f9190612463565b6001600160a01b037f000000000000000000000000c5d27f27f08d1fd1e3ebbaa50b3442e6c0d50439169190611982565b565b61089a611881565b6005805460ff191660011790556040517f7cdf17ad9ee98efb9f1c7c037e6d670fdaa3f0ea4d4b016e4707fa1827a79e4390600090a1565b60006108dd83610da1565b6000036108ec57506000610914565b6108f583610da1565b61090783670de0b6b3a7640000612476565b610911919061248d565b90505b92915050565b610922611881565b6040516370a0823160e01b81523060048201526109a19033906001600160a01b038416906370a0823190602401602060405180830381865afa15801561096c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610990919061244a565b6001600160a01b0384169190611982565b50565b6109ac611881565b80518251146109ef5760405162461bcd60e51b815260206004820152600f60248201526e0d8cadccee8d040dad2e6dac2e8c6d608b1b60448201526064016106d4565b60005b8251811015610a6a57818181518110610a0d57610a0d61239a565b602002602001015160126000858481518110610a2b57610a2b61239a565b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020819055508080610a62906123c6565b9150506109f2565b505050565b6001600160a01b03811660009081526001602090815260408083205460129092528220546109149190612463565b610aa5611881565b600c55565b610ab2611881565b60005b601154811015610b6e57826001600160a01b031660118281548110610adc57610adc61239a565b60009182526020909120600290910201546001600160a01b031603610b5c578160118281548110610b0f57610b0f61239a565b600091825260209182902060016002909202010191909155604080516001600160a01b03861681529182018490526000805160206125c383398151915291015b60405180910390a1505050565b80610b66816123c6565b915050610ab5565b506040805180820182526001600160a01b0384811680835260208084018681526011805460018101825560009190915294517f31ecc21a745e3968a04e9570e4425bc18fa8019c68028196b546d1669c200c68600290960295860180546001600160a01b031916919095161790935591517f31ecc21a745e3968a04e9570e4425bc18fa8019c68028196b546d1669c200c6990930192909255825191825281018390526000805160206125c3833981519152910160405180910390a15050565b33600081815260016020526040902054610c835760405162461bcd60e51b81526020600482015260166024820152754164647265737320686173206e6f207265776172647360501b60448201526064016106d4565b60055460ff1615610cca5760405162461bcd60e51b815260206004820152601160248201527010db185a5b5cc8185c99481c185d5cd959607a1b60448201526064016106d4565b33600081815260016020526040812091610ce3906117d5565b9050808260010154610cf591906124af565b6001830155600454610d089082906124af565b600455815460018301541115610d2057610d206124c2565b610d546001600160a01b037f000000000000000000000000c5d27f27f08d1fd1e3ebbaa50b3442e6c0d50439163383611982565b80336001600160a01b03167ff01da32686223933d8a18a391060918c7f11a3648639edd87ae013e2e27317438460010154604051610d9491815260200190565b60405180910390a3505050565b6000805b601154811015610e2a57826001600160a01b031660118281548110610dcc57610dcc61239a565b60009182526020909120600290910201546001600160a01b031603610e185760118181548110610dfe57610dfe61239a565b906000526020600020906002020160010154915050919050565b80610e22816123c6565b915050610da5565b50600092915050565b610e3b611881565b61089060006119e5565b610e4d611881565b6005805460ff191690556040517f3bd17c2ef5a04c031943ad098b3f9bfa9da2bc92be12a6d4197b076f4c133c0090600090a1565b60008060008060008060607f000000000000000000000000c5d27f27f08d1fd1e3ebbaa50b3442e6c0d50439600c54600d54600e54600f54600f54600e54610eca9190612463565b601180805480602002602001604051908101604052809291908181526020016000905b82821015610f35576000848152602090819020604080518082019091526002850290910180546001600160a01b03168252600190810154828401529083529092019101610eed565b505050509050965096509650965096509650965090919293949596565b6000600854600754600254610f6791906124af565b610f7191906124af565b905090565b610f7e611881565b828114610fcd5760405162461bcd60e51b815260206004820152601f60248201527f41727261797320646f206e6f74206861766520657175616c206c656e6774680060448201526064016106d4565b60005b8381101561103257611020858583818110610fed57610fed61239a565b90506020020160208101906110029190612081565b8484848181106110145761101461239a565b90506020020135611a35565b8061102a816123c6565b915050610fd0565b5081816040516110439291906123df565b6040518091039020848460405161105b929190612408565b604051908190038120907f9e90b93ef585ec8fc3bef98ea72276d1068177358fc8071996f3ab9a18dedbe190600090a350505050565b611099611881565b600255565b6110a6611881565b6011546000805b8281101561110757836001600160a01b0316601182815481106110d2576110d261239a565b60009182526020909120600290910201546001600160a01b0316036110f5578091505b806110ff816123c6565b9150506110ad565b506011611115600184612463565b815481106111255761112561239a565b9060005260206000209060020201601182815481106111465761114661239a565b60009182526020909120825460029092020180546001600160a01b0319166001600160a01b03909216919091178155600191820154910155601180548061118f5761118f6124d8565b60008281526020812060026000199093019283020180546001600160a01b031916815560010181905591556040516000805160206125c383398151915291610b4f918691906001600160a01b03929092168252602082015260400190565b6111f5611881565b600e55565b611202611881565b61120e60116000611f14565b6040517fae8cb61d05474475445ef2a83bacf0a11fa6ecda92c85c75aa5b31990eb37a2490600090a160005b8381101561136657601160405180604001604052808787858181106112615761126161239a565b90506020020160208101906112769190612081565b6001600160a01b031681526020018585858181106112965761129661239a565b60209081029290920135909252835460018082018655600095865294829020845160029092020180546001600160a01b0319166001600160a01b039092169190911781559201519190920155506000805160206125c38339815191528585838181106113045761130461239a565b90506020020160208101906113199190612081565b84848481811061132b5761132b61239a565b604080516001600160a01b0390951685526020918202939093013590840152500160405180910390a18061135e816123c6565b91505061123a565b5050505050565b611375611881565b60005b81518110156113b5576113a38282815181106113965761139661239a565b6020026020010151611ab9565b806113ad816123c6565b915050611378565b50806040516113c491906124ee565b604051908190038120907fbda4b3a657d90ded99df9bd5cf2b360e44cb7ec1b832a3d82599966ea357525390600090a250565b60606011805480602002602001604051908101604052809291908181526020016000905b82821015611463576000848152602090819020604080518082019091526002850290910180546001600160a01b0316825260019081015482840152908352909201910161141b565b50505050905090565b611474611881565b600d55565b33600061148582610a6f565b116114d25760405162461bcd60e51b815260206004820152601760248201527f4e6f20617661696c61626c6520616c6c6f636174696f6e00000000000000000060448201526064016106d4565b6114da611b06565b6114e2611b4c565b600c544210156115225760405162461bcd60e51b815260206004820152600b60248201526a139bdd081cdd185c9d195960aa1b60448201526064016106d4565b600d5442111561155c5760405162461bcd60e51b8152602060048201526005602482015264115b99195960da1b60448201526064016106d4565b600061156884846108d2565b9050600081116115ab5760405162461bcd60e51b815260206004820152600e60248201526d125b9d985b1a5908185b5bdd5b9d60921b60448201526064016106d4565b80600f546115b991906124af565b600f819055600e5410156116035760405162461bcd60e51b815260206004820152601160248201527013585e081d1bdd185b081c995858da1959607a1b60448201526064016106d4565b60105461161f906001600160a01b038681169133911686611ba5565b336000908152600160205260408120805490919061163e9084906124af565b336000908152601260205260409020549091508111156116a05760405162461bcd60e51b815260206004820181905260248201527f4164647265737320616c6c6f636174696f6e206c696d6974207265616368656460448201526064016106d4565b6116aa3384611bdd565b60408051868152602081018590526001600160a01b0388169133917fbf77fd13a39d14dc0da779342c14105c38d9a5d0c60f2caa22f5fd1d5525416d910160405180910390a3505050610a6a6001600b55565b6011818154811061170d57600080fd5b6000918252602090912060029091020180546001909101546001600160a01b03909116915082565b61173d611881565b601080546001600160a01b0319166001600160a01b0392909216919091179055565b611767611881565b6001600160a01b0381166117cc5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016106d4565b6109a1816119e5565b6001600160a01b038116600090815260016020818152604080842081518083019092528054808352930154918101919091529082906118149042611c1e565b90508160200151816118269190612463565b949350505050565b6000806000611852846001600160a01b031660009081526012602052604090205490565b6001600160a01b03851660009081526001602052604090205461187486610a6f565b9250925092509193909250565b6000546001600160a01b031633146108905760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016106d4565b6001600160a01b0383166000908152600160208190526040822084815590810183905560038054919285926119119084906124af565b92505081905550816004600082825461192a91906124af565b909155505060018101548154101561197c5760405162461bcd60e51b8152602060048201526015602482015274125b9d985b1a59081c995dd85c9908185b5bdd5b9d605a1b60448201526064016106d4565b50505050565b6040516001600160a01b038316602482015260448101829052610a6a90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611d1c565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b03821660009081526001602052604090208054600354611a5d9084906124af565b611a679190612463565b6003558181556001810154821015610a6a5760405162461bcd60e51b8152602060048201526015602482015274125b9d985b1a59081c995dd85c9908185b5bdd5b9d605a1b60448201526064016106d4565b6001600160a01b03811660009081526001602081905260408220908101548154919291611ae69190612463565b60018301548355600354909150611afe908290612463565b600355505050565b600a5460ff16156108905760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016106d4565b6002600b5403611b9e5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016106d4565b6002600b55565b6040516001600160a01b038085166024830152831660448201526064810182905261197c9085906323b872dd60e01b906084016119ae565b6001600160a01b03821660009081526001602052604081208054909190611c059084906124af565b905082600354611c1591906124af565b60035590555050565b6000600254821015611c3257506000610914565b600060025483611c429190612463565b905060006007548211611c715761271060065486611c609190612476565b611c6a919061248d565b9050611826565b600854600754611c8191906124af565b821115611c8f575083611826565b600061271060065487611ca29190612476565b611cac919061248d565b90506000611cba8288612463565b9050600060095460075486611ccf9190612463565b611cd9919061248d565b90506000600954600854611ced919061248d565b90508381611cfb8486612476565b611d05919061248d565b611d0f91906124af565b9998505050505050505050565b6000611d71826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611df19092919063ffffffff16565b9050805160001480611d92575080806020019051810190611d92919061252d565b610a6a5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016106d4565b6060611826848460008585600080866001600160a01b03168587604051611e189190612573565b60006040518083038185875af1925050503d8060008114611e55576040519150601f19603f3d011682016040523d82523d6000602084013e611e5a565b606091505b5091509150611e6b87838387611e76565b979650505050505050565b60608315611ee5578251600003611ede576001600160a01b0385163b611ede5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016106d4565b5081611826565b6118268383815115611efa5781518083602001fd5b8060405162461bcd60e51b81526004016106d4919061258f565b50805460008255600202906000526020600020908101906109a191905b80821115611f565780546001600160a01b031916815560006001820155600201611f31565b5090565b60008083601f840112611f6c57600080fd5b50813567ffffffffffffffff811115611f8457600080fd5b6020830191508360208260051b8501011115611f9f57600080fd5b9250929050565b60008060008060008060608789031215611fbf57600080fd5b863567ffffffffffffffff80821115611fd757600080fd5b611fe38a838b01611f5a565b90985096506020890135915080821115611ffc57600080fd5b6120088a838b01611f5a565b9096509450604089013591508082111561202157600080fd5b5061202e89828a01611f5a565b979a9699509497509295939492505050565b6001600160a01b03811681146109a157600080fd5b6000806040838503121561206857600080fd5b823561207381612040565b946020939093013593505050565b60006020828403121561209357600080fd5b813561209e81612040565b9392505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156120e4576120e46120a5565b604052919050565b600067ffffffffffffffff821115612106576121066120a5565b5060051b60200190565b600082601f83011261212157600080fd5b81356020612136612131836120ec565b6120bb565b82815260059290921b8401810191818101908684111561215557600080fd5b8286015b8481101561217957803561216c81612040565b8352918301918301612159565b509695505050505050565b6000806040838503121561219757600080fd5b823567ffffffffffffffff808211156121af57600080fd5b6121bb86838701612110565b93506020915081850135818111156121d257600080fd5b85019050601f810186136121e557600080fd5b80356121f3612131826120ec565b81815260059190911b8201830190838101908883111561221257600080fd5b928401925b8284101561223057833582529284019290840190612217565b80955050505050509250929050565b60006020828403121561225157600080fd5b5035919050565b600081518084526020808501945080840160005b8381101561229c57815180516001600160a01b03168852830151838801526040909601959082019060010161226c565b509495945050505050565b60018060a01b03881681528660208201528560408201528460608201528360808201528260a082015260e060c08201526000611d0f60e0830184612258565b600080600080604085870312156122fc57600080fd5b843567ffffffffffffffff8082111561231457600080fd5b61232088838901611f5a565b9096509450602087013591508082111561233957600080fd5b5061234687828801611f5a565b95989497509550505050565b60006020828403121561236457600080fd5b813567ffffffffffffffff81111561237b57600080fd5b61182684828501612110565b6020815260006109116020830184612258565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016123d8576123d86123b0565b5060010190565b60006001600160fb1b038311156123f557600080fd5b8260051b80858437919091019392505050565b60008184825b8581101561243f57813561242181612040565b6001600160a01b03168352602092830192919091019060010161240e565b509095945050505050565b60006020828403121561245c57600080fd5b5051919050565b81810381811115610914576109146123b0565b8082028115828204841417610914576109146123b0565b6000826124aa57634e487b7160e01b600052601260045260246000fd5b500490565b80820180821115610914576109146123b0565b634e487b7160e01b600052600160045260246000fd5b634e487b7160e01b600052603160045260246000fd5b815160009082906020808601845b838110156125215781516001600160a01b0316855293820193908201906001016124fc565b50929695505050505050565b60006020828403121561253f57600080fd5b8151801515811461209e57600080fd5b60005b8381101561256a578181015183820152602001612552565b50506000910152565b6000825161258581846020870161254f565b9190910192915050565b60208152600082518060208401526125ae81604085016020870161254f565b601f01601f1916919091016040019291505056fe1cef96c693692f4beb6c09bfe69ff50bd430608c0ab5507c9979fac0f8c365bda26469706673582212209af23ac5760de60f892cecb5dc2f3ce0f8f88281eeff2bb818a1401fcb643a6164736f6c63430008130033

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

000000000000000000000000c5d27f27f08d1fd1e3ebbaa50b3442e6c0d504390000000000000000000000000000000000000000000000000000000000001f40000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000000000000000000000000000000000000659e78b00000000000000000000000000000000000000000000000000000000065a02ca00000000000000000000000000000000000000000000000000000000065a11cdc0000000000000000000000000000000000000000000cecb8f27f4200f3a00000000000000000000000000000b64e395cbfcdc46c993ed9f181e0161e4aa8798a00000000000000000000000000000000000000000000000000000000000003e8000000000000000000000000000000000000000000000000000000000076a70000000000000000000000000000000000000000000000000000000000032190000000000000000000000000000000000000000000000000000000000000000e10

-----Decoded View---------------
Arg [0] : _saleToken (address): 0xC5d27F27F08D1FD1E3EbBAa50b3442e6c0D50439
Arg [1] : _price (uint256): 8000
Arg [2] : _defaultPaymentToken (address): 0xdAC17F958D2ee523a2206206994597C13D831ec7
Arg [3] : _startTime (uint256): 1704884400
Arg [4] : _endTime (uint256): 1704996000
Arg [5] : _claimTime (uint256): 1705057500
Arg [6] : _maxTotal (uint256): 15625000000000000000000000
Arg [7] : _treasury (address): 0xb64e395cbFCdc46c993ed9F181e0161E4AA8798a
Arg [8] : _vestingData (uint256[4]): 1000,7776000,52531200,3600

-----Encoded View---------------
12 Constructor Arguments found :
Arg [0] : 000000000000000000000000c5d27f27f08d1fd1e3ebbaa50b3442e6c0d50439
Arg [1] : 0000000000000000000000000000000000000000000000000000000000001f40
Arg [2] : 000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7
Arg [3] : 00000000000000000000000000000000000000000000000000000000659e78b0
Arg [4] : 0000000000000000000000000000000000000000000000000000000065a02ca0
Arg [5] : 0000000000000000000000000000000000000000000000000000000065a11cdc
Arg [6] : 0000000000000000000000000000000000000000000cecb8f27f4200f3a00000
Arg [7] : 000000000000000000000000b64e395cbfcdc46c993ed9f181e0161e4aa8798a
Arg [8] : 00000000000000000000000000000000000000000000000000000000000003e8
Arg [9] : 000000000000000000000000000000000000000000000000000000000076a700
Arg [10] : 0000000000000000000000000000000000000000000000000000000003219000
Arg [11] : 0000000000000000000000000000000000000000000000000000000000000e10


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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

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