ETH Price: $3,491.28 (+0.09%)
Gas: 2 Gwei

Contract

0x4D7966b1156878e5715e97Da5505108f98B6B234
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Claim179750762023-08-23 4:38:59333 days ago1692765539IN
0x4D7966b1...f98B6B234
0 ETH0.0009134714.95911989
Claim179476892023-08-19 8:39:59337 days ago1692434399IN
0x4D7966b1...f98B6B234
0 ETH0.000847413.87711524
Claim179356382023-08-17 16:09:59338 days ago1692288599IN
0x4D7966b1...f98B6B234
0 ETH0.0071496975.05056812
Claim179350512023-08-17 14:11:35338 days ago1692281495IN
0x4D7966b1...f98B6B234
0 ETH0.0027665745.30540753
Claim179338922023-08-17 10:18:11338 days ago1692267491IN
0x4D7966b1...f98B6B234
0 ETH0.0009574915.67996094
Claim179336042023-08-17 9:20:23338 days ago1692264023IN
0x4D7966b1...f98B6B234
0 ETH0.0016655817.48370608
Claim179331742023-08-17 7:53:47339 days ago1692258827IN
0x4D7966b1...f98B6B234
0 ETH0.0010776417.64748458
Claim179315002023-08-17 2:15:59339 days ago1692238559IN
0x4D7966b1...f98B6B234
0 ETH0.0021520122.58976498
Claim179312972023-08-17 1:35:23339 days ago1692236123IN
0x4D7966b1...f98B6B234
0 ETH0.0024833426.06780256
Claim179293792023-08-16 19:09:35339 days ago1692212975IN
0x4D7966b1...f98B6B234
0 ETH0.0028938630.37702365
Claim179279902023-08-16 14:29:23339 days ago1692196163IN
0x4D7966b1...f98B6B234
0 ETH0.0034070435.76390337
Claim179279232023-08-16 14:15:47339 days ago1692195347IN
0x4D7966b1...f98B6B234
0 ETH0.0021354134.96947735
Claim179277442023-08-16 13:39:23339 days ago1692193163IN
0x4D7966b1...f98B6B234
0 ETH0.0030317831.82474763
Claim179275892023-08-16 13:07:47339 days ago1692191267IN
0x4D7966b1...f98B6B234
0 ETH0.0020348233.32231176
Claim179275622023-08-16 13:02:23339 days ago1692190943IN
0x4D7966b1...f98B6B234
0 ETH0.0019795632.41727198
Claim179273242023-08-16 12:14:47339 days ago1692188087IN
0x4D7966b1...f98B6B234
0 ETH0.0019148420.10019588
Claim179264252023-08-16 9:13:59339 days ago1692177239IN
0x4D7966b1...f98B6B234
0 ETH0.0016712817.54358421
Claim179260652023-08-16 8:01:23340 days ago1692172883IN
0x4D7966b1...f98B6B234
0 ETH0.0017985218.87916374
Claim179259182023-08-16 7:31:47340 days ago1692171107IN
0x4D7966b1...f98B6B234
0 ETH0.0017533918.40546775
Claim179252092023-08-16 5:08:35340 days ago1692162515IN
0x4D7966b1...f98B6B234
0 ETH0.0019702320.68157309
Claim179246022023-08-16 3:06:23340 days ago1692155183IN
0x4D7966b1...f98B6B234
0 ETH0.0013130521.50252003
Claim179234092023-08-15 23:06:23340 days ago1692140783IN
0x4D7966b1...f98B6B234
0 ETH0.0011956319.57978053
Claim179234042023-08-15 23:05:23340 days ago1692140723IN
0x4D7966b1...f98B6B234
0 ETH0.0016346617.15913709
Claim179229302023-08-15 21:29:59340 days ago1692134999IN
0x4D7966b1...f98B6B234
0 ETH0.0015646725.62310631
Claim179229252023-08-15 21:28:59340 days ago1692134939IN
0x4D7966b1...f98B6B234
0 ETH0.0024524725.74376323
View all transactions

Latest 1 internal transaction

Advanced mode:
Parent Transaction Hash Block From To
179191852023-08-15 8:55:11340 days ago1692089711
0x4D7966b1...f98B6B234
613.63084495 ETH
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
TokenSale

Compiler Version
v0.8.19+commit.7dd6d404

Optimization Enabled:
Yes with 20 runs

Other Settings:
default evmVersion, MIT license
File 1 of 12 : TokenSale.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;

import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {Math} from "@openzeppelin/contracts/utils/math/Math.sol";

// Uncomment this line to use console.log
// import "hardhat/console.sol";

contract TokenSale is Ownable {
    using SafeERC20 for IERC20;
    uint private constant BP = 10000;

    IERC20 public token;
    uint public startSaleTime;
    uint public endSaleTime;
    uint public startTokensUnlock;
    uint public endTokensUnlock;
    uint public totalTokenAmount;
    uint public bonusBp = 0;
    uint public isSaleFailed = 0;
    mapping(address user => uint amount) public usersDepositRaw;
    // Amount of token shares per user
    mapping(address user => uint amount) public usersDepositWithBonus;
    // Total amount of token shares
    uint public totalDepositedWithBonus = 0;
    // Amount of tokens claimed per user
    mapping(address user => uint amount) public alreadyClaimedTokens;

    event Deposit(address user, uint amount, uint amountWithBonus);
    event Claimed(uint amount, uint when);

    function init(
        IERC20 _token,
        uint tokenAmount,
        uint _startSaleTime,
        uint _endSaleTime,
        uint _startTokensUnlock,
        uint _endTokensUnlock
    ) external onlyOwner {
        require(block.timestamp < _startSaleTime, "startSaleTime is not in future");
        require(_startSaleTime < _endSaleTime, "startSaleTime >= endSaleTime");
        require(_endSaleTime < _startTokensUnlock, "endSaleTime >= startTokensUnlock");
        require(_startTokensUnlock < _endTokensUnlock, "start unlock >= end unlock");
        require(address(token) == address(0), "Already initialized");
        token = _token;

        startSaleTime = _startSaleTime;
        endSaleTime = _endSaleTime;
        startTokensUnlock = _startTokensUnlock;
        endTokensUnlock = _endTokensUnlock;

        totalTokenAmount = tokenAmount;

        token.safeTransferFrom(msg.sender, address(this), tokenAmount);
    }

    /**
     * @dev Throws if called when the sale is not marked as failed.
     */
    modifier whenFail() {
        require(isSaleFailed == 1, "Sale is not failed");
        _;
    }

    /**
     * @dev Throws if called before the sale concluded successfully.
     */
    modifier whenSuccess() {
        require(isSaleFailed == 0, "Sale is failed");
        require(block.timestamp >= startTokensUnlock, "Not before vesting starts");
        _;
    }

    /**
     * @notice Sets new bonus basis points
     */
    function setBonusBp(uint _bonusBp) external onlyOwner {
        bonusBp = _bonusBp;
    }

    /**
     * @notice Allows anyone to buy part of the tokens on sale with Ether
     */
    function deposit() external payable {
        require(block.timestamp >= startSaleTime, "Deposit is not yet available");
        require(block.timestamp < endSaleTime, "Deposit is no longer available");
        usersDepositRaw[msg.sender] += msg.value;
        uint depositWithBonus = msg.value + (msg.value * bonusBp) / BP;
        usersDepositWithBonus[msg.sender] += depositWithBonus;
        totalDepositedWithBonus += depositWithBonus;
        emit Deposit(msg.sender, msg.value, depositWithBonus);
    }

    /**
     * @notice Allows admin to collect payment for the sold tokens.
     */
    function withdraw() external onlyOwner whenSuccess {
        (bool sent, ) = payable(msg.sender).call{value: address(this).balance}("");
        require(sent, "Transfer failed");
    }

    function claim() external whenSuccess {
        uint amount = getAvailableToClaim(msg.sender);

        alreadyClaimedTokens[msg.sender] += amount;
        token.safeTransfer(msg.sender, amount);
        emit Claimed(amount, block.timestamp);
    }

    function setStartSaleTime(uint _startSaleTime) public onlyOwner {
        require(endSaleTime != 0, "Not initialized");
        require(block.timestamp < startSaleTime, "Sale already started");
        require(block.timestamp < _startSaleTime, "startSaleTime is not in future");
        require(_startSaleTime < endSaleTime, "startSaleTime >= endSaleTime");

        startSaleTime = _startSaleTime;
    }

    function setEndSaleTime(uint _endSaleTime) public onlyOwner {
        require(startSaleTime != 0, "Not initialized");
        require(block.timestamp < endSaleTime, "Sale already ended");
        require(startSaleTime < _endSaleTime, "startSaleTime >= endSaleTime");
        require(_endSaleTime < startTokensUnlock, "endSaleTime >= startTokensUnlock");

        endSaleTime = _endSaleTime;
    }

    function setStartTokensUnlock(uint _startTokensUnlock) public onlyOwner {
        require(startSaleTime != 0, "Not initialized");
        require(block.timestamp < startTokensUnlock, "Vesting already started");
        require(block.timestamp < _startTokensUnlock, "start unlock is not in future");
        require(_startTokensUnlock < endTokensUnlock, "start unlock >= end unlock");
        require(endSaleTime < _startTokensUnlock, "endSaleTime >= startTokensUnlock");

        startTokensUnlock = _startTokensUnlock;
    }

    function setEndTokensUnlock(uint _endTokensUnlock) public onlyOwner {
        require(startSaleTime != 0, "Not initialized");
        require(block.timestamp < startTokensUnlock, "Vesting already started");
        require(startTokensUnlock < _endTokensUnlock, "start unlock >= end unlock");

        endTokensUnlock = _endTokensUnlock;
    }

    /**
     * @notice Cancels the sale. Users can return all deposited funds. See {claimRefund}.
     */
    function markFailed() external onlyOwner {
        require(block.timestamp >= endSaleTime, "Not available before sale ends");
        require(block.timestamp < startTokensUnlock, "Vesting already started");
        isSaleFailed = 1;
        // withdraw unsold tokens
        token.safeTransfer(msg.sender, totalTokenAmount);
    }

    /**
     * @notice Allows a user to get back his deposit in case token sale was unsuccessful.
     */
    function claimRefund() external whenFail {
        uint amount = usersDepositRaw[msg.sender];
        usersDepositRaw[msg.sender] = 0;
        (bool sent, ) = payable(msg.sender).call{value: amount}("");
        require(sent, "Transfer failed");
    }

    function getTokensShare(address user) public view returns (uint) {
        if (totalDepositedWithBonus == 0) return 0;
        return (totalTokenAmount * usersDepositWithBonus[user]) / totalDepositedWithBonus;
    }

    /**
     * @notice Gets the amount of tokens currently available to claim.
     * Tokens become partially available after `startTokensUnlock` timestamp. All tokens will be
     * available to claim after `endTokensUnlock` timestamp.
     */
    function getAvailableToClaim(address user) public view returns (uint) {
        if (block.timestamp < startTokensUnlock) return 0;
        if (isSaleFailed == 1) return 0;
        return
            (getTokensShare(user) * (Math.min(block.timestamp, endTokensUnlock) - startTokensUnlock)) /
            (endTokensUnlock - startTokensUnlock) -
            alreadyClaimedTokens[user];
    }
}

File 2 of 12 : 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 12 : 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 4 of 12 : 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 5 of 12 : 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 6 of 12 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

File 7 of 12 : 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 8 of 12 : 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 9 of 12 : 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 10 of 12 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 11 of 12 : HazyToken.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;

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

contract HazyToken is ERC20 {
    constructor() ERC20("Hazy Token", "HZY") {
        _mint(msg.sender, 100000000000 * 10 ** decimals());
    }
}

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

import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {Math} from "@openzeppelin/contracts/utils/math/Math.sol";

// Uncomment this line to use console.log
// import "hardhat/console.sol";

contract Vesting is Ownable {
    using SafeERC20 for IERC20;

    IERC20 public token;
    uint public startUnlock;
    uint public endUnlock;
    uint public totalAmount;
    uint public alreadyReceivedAmount = 0;

    event Claimed(uint amount, uint when);

    function init(IERC20 _token, uint amount, uint _startUnlock, uint _endUnlock) external onlyOwner {
        require(block.timestamp < _startUnlock, "startUnlock is not in the future");
        require(_startUnlock < _endUnlock, "startUnlock >= endUnlock");
        require(address(token) == address(0), "Already initialized");
        token = _token;

        // lock sender's tokens in this contract
        token.safeTransferFrom(msg.sender, address(this), amount);

        startUnlock = _startUnlock;
        endUnlock = _endUnlock;
        totalAmount = amount;
    }

    function claim() external onlyOwner {
        require(block.timestamp >= startUnlock, "Claim is not yet available");
        uint amount = getAvailableToClaim();

        alreadyReceivedAmount += amount;
        token.safeTransfer(msg.sender, amount);
        emit Claimed(amount, block.timestamp);
    }

    /**
     * @notice Gets the amount of tokens currently available to claim.
     * Tokens become partially available after `startUnlock` timestamp. All tokens will be
     * available to claim after `endUnlock` timestamp.
     */
    function getAvailableToClaim() public view returns (uint) {
        if (block.timestamp < startUnlock) return 0;
        return
            (totalAmount * (Math.min(block.timestamp, endUnlock) - startUnlock)) /
            (endUnlock - startUnlock) -
            alreadyReceivedAmount;
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 20
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"when","type":"uint256"}],"name":"Claimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountWithBonus","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"alreadyClaimedTokens","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bonusBp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimRefund","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"deposit","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"endSaleTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"endTokensUnlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getAvailableToClaim","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getTokensShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_token","type":"address"},{"internalType":"uint256","name":"tokenAmount","type":"uint256"},{"internalType":"uint256","name":"_startSaleTime","type":"uint256"},{"internalType":"uint256","name":"_endSaleTime","type":"uint256"},{"internalType":"uint256","name":"_startTokensUnlock","type":"uint256"},{"internalType":"uint256","name":"_endTokensUnlock","type":"uint256"}],"name":"init","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"isSaleFailed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"markFailed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_bonusBp","type":"uint256"}],"name":"setBonusBp","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_endSaleTime","type":"uint256"}],"name":"setEndSaleTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_endTokensUnlock","type":"uint256"}],"name":"setEndTokensUnlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_startSaleTime","type":"uint256"}],"name":"setStartSaleTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_startTokensUnlock","type":"uint256"}],"name":"setStartTokensUnlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startSaleTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startTokensUnlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalDepositedWithBonus","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalTokenAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"usersDepositRaw","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"usersDepositWithBonus","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6080604052600060075560006008556000600b5534801561001f57600080fd5b506100293361002e565b61007e565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b61158a8061008d6000396000f3fe6080604052600436106101465760003560e01c8062a08f561461014b5780630337b3aa146101745780631058ee7b1461018a578063191292fb146101ac578063248bd36a146101cc578063351050fb146101f95780633ccfd60b1461020f5780634e71d92d146102245780634e7df9ec14610239578063568ea1911461025957806358371ccd1461026f5780636447ef20146102855780636f68fffd146102b2578063715018a6146102d257806374491752146102e75780638da5cb5b146102fc5780639e74c6d914610329578063a961e9e814610349578063b098a7281461035f578063b5545a3c14610375578063c90f16cd1461038a578063d051e4f7146103b7578063d0e30db0146103d7578063e0069e19146103df578063eecb060a146103ff578063f2fde38b14610415578063f5c91f5a14610435578063fc0c546a14610455575b600080fd5b34801561015757600080fd5b5061016160045481565b6040519081526020015b60405180910390f35b34801561018057600080fd5b5061016160065481565b34801561019657600080fd5b506101aa6101a53660046111ff565b610475565b005b3480156101b857600080fd5b506101aa6101c73660046111ff565b6104ef565b3480156101d857600080fd5b506101616101e736600461122d565b600a6020526000908152604090205481565b34801561020557600080fd5b50610161600b5481565b34801561021b57600080fd5b506101aa6104fc565b34801561023057600080fd5b506101aa6105b1565b34801561024557600080fd5b5061016161025436600461122d565b61067a565b34801561026557600080fd5b5061016160055481565b34801561027b57600080fd5b5061016160035481565b34801561029157600080fd5b506101616102a036600461122d565b600c6020526000908152604090205481565b3480156102be57600080fd5b506101aa6102cd3660046111ff565b6106c7565b3480156102de57600080fd5b506101aa61077e565b3480156102f357600080fd5b506101aa610792565b34801561030857600080fd5b50610311610830565b6040516001600160a01b03909116815260200161016b565b34801561033557600080fd5b506101aa6103443660046111ff565b61083f565b34801561035557600080fd5b5061016160025481565b34801561036b57600080fd5b5061016160085481565b34801561038157600080fd5b506101aa610920565b34801561039657600080fd5b506101616103a536600461122d565b60096020526000908152604090205481565b3480156103c357600080fd5b506101aa6103d23660046111ff565b6109e6565b6101aa610a9d565b3480156103eb57600080fd5b506101616103fa36600461122d565b610c0a565b34801561040b57600080fd5b5061016160075481565b34801561042157600080fd5b506101aa61043036600461122d565b610c99565b34801561044157600080fd5b506101aa61045036600461124a565b610d0f565b34801561046157600080fd5b50600154610311906001600160a01b031681565b61047d610e2d565b6002546000036104a85760405162461bcd60e51b815260040161049f90611296565b60405180910390fd5b60045442106104c95760405162461bcd60e51b815260040161049f906112bf565b80600454106104ea5760405162461bcd60e51b815260040161049f906112f0565b600555565b6104f7610e2d565b600755565b610504610e2d565b600854156105245760405162461bcd60e51b815260040161049f90611324565b6004544210156105465760405162461bcd60e51b815260040161049f9061134c565b604051600090339047908381818185875af1925050503d8060008114610588576040519150601f19603f3d011682016040523d82523d6000602084013e61058d565b606091505b50509050806105ae5760405162461bcd60e51b815260040161049f9061137f565b50565b600854156105d15760405162461bcd60e51b815260040161049f90611324565b6004544210156105f35760405162461bcd60e51b815260040161049f9061134c565b60006105fe33610c0a565b336000908152600c60205260408120805492935083929091906106229084906113be565b909155505060015461063e906001600160a01b03163383610e8c565b604080518281524260208201527fc83b5086ce94ec8d5a88a9f5fea4b18a522bb238ed0d2d8abd959549a80c16b891015b60405180910390a150565b6000600b5460000361068e57506000919050565b600b546001600160a01b0383166000908152600a60205260409020546006546106b791906113d1565b6106c191906113e8565b92915050565b6106cf610e2d565b6002546000036106f15760405162461bcd60e51b815260040161049f90611296565b60035442106107375760405162461bcd60e51b815260206004820152601260248201527114d85b1948185b1c9958591e48195b99195960721b604482015260640161049f565b80600254106107585760405162461bcd60e51b815260040161049f9061140a565b60045481106107795760405162461bcd60e51b815260040161049f90611440565b600355565b610786610e2d565b6107906000610ef4565b565b61079a610e2d565b6003544210156107ec5760405162461bcd60e51b815260206004820152601e60248201527f4e6f7420617661696c61626c65206265666f72652073616c6520656e64730000604482015260640161049f565b600454421061080d5760405162461bcd60e51b815260040161049f906112bf565b600160088190556006549054610790916001600160a01b03909116903390610e8c565b6000546001600160a01b031690565b610847610e2d565b6002546000036108695760405162461bcd60e51b815260040161049f90611296565b600454421061088a5760405162461bcd60e51b815260040161049f906112bf565b8042106108d95760405162461bcd60e51b815260206004820152601d60248201527f737461727420756e6c6f636b206973206e6f7420696e20667574757265000000604482015260640161049f565b60055481106108fa5760405162461bcd60e51b815260040161049f906112f0565b806003541061091b5760405162461bcd60e51b815260040161049f90611440565b600455565b6008546001146109675760405162461bcd60e51b815260206004820152601260248201527114d85b19481a5cc81b9bdd0819985a5b195960721b604482015260640161049f565b33600081815260096020526040808220805490839055905190929083908381818185875af1925050503d80600081146109bc576040519150601f19603f3d011682016040523d82523d6000602084013e6109c1565b606091505b50509050806109e25760405162461bcd60e51b815260040161049f9061137f565b5050565b6109ee610e2d565b600354600003610a105760405162461bcd60e51b815260040161049f90611296565b6002544210610a585760405162461bcd60e51b815260206004820152601460248201527314d85b1948185b1c9958591e481cdd185c9d195960621b604482015260640161049f565b804210610a775760405162461bcd60e51b815260040161049f90611475565b6003548110610a985760405162461bcd60e51b815260040161049f9061140a565b600255565b600254421015610aee5760405162461bcd60e51b815260206004820152601c60248201527b4465706f736974206973206e6f742079657420617661696c61626c6560201b604482015260640161049f565b6003544210610b3f5760405162461bcd60e51b815260206004820152601e60248201527f4465706f736974206973206e6f206c6f6e67657220617661696c61626c650000604482015260640161049f565b3360009081526009602052604081208054349290610b5e9084906113be565b909155505060075460009061271090610b7790346113d1565b610b8191906113e8565b610b8b90346113be565b336000908152600a6020526040812080549293508392909190610baf9084906113be565b9250508190555080600b6000828254610bc891906113be565b9091555050604080513381523460208201529081018290527f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159060600161066f565b6000600454421015610c1e57506000919050565b600854600103610c3057506000919050565b6001600160a01b0382166000908152600c6020526040902054600454600554610c5991906114ac565b600454610c6842600554610f44565b610c7291906114ac565b610c7b8561067a565b610c8591906113d1565b610c8f91906113e8565b6106c191906114ac565b610ca1610e2d565b6001600160a01b038116610d065760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161049f565b6105ae81610ef4565b610d17610e2d565b834210610d365760405162461bcd60e51b815260040161049f90611475565b828410610d555760405162461bcd60e51b815260040161049f9061140a565b818310610d745760405162461bcd60e51b815260040161049f90611440565b808210610d935760405162461bcd60e51b815260040161049f906112f0565b6001546001600160a01b031615610de25760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481a5b9a5d1a585b1a5e9959606a1b604482015260640161049f565b600180546001600160a01b0319166001600160a01b03881690811790915560028590556003849055600483905560058290556006869055610e2590333088610f5c565b505050505050565b33610e36610830565b6001600160a01b0316146107905760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161049f565b6040516001600160a01b038316602482015260448101829052610eef90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610f9a565b505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000818310610f535781610f55565b825b9392505050565b6040516001600160a01b0380851660248301528316604482015260648101829052610f949085906323b872dd60e01b90608401610eb8565b50505050565b6000610fef826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661106f9092919063ffffffff16565b905080516000148061101057508080602001905181019061101091906114bf565b610eef5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161049f565b606061107e8484600085611086565b949350505050565b6060824710156110e75760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161049f565b600080866001600160a01b031685876040516111039190611505565b60006040518083038185875af1925050503d8060008114611140576040519150601f19603f3d011682016040523d82523d6000602084013e611145565b606091505b509150915061115687838387611161565b979650505050505050565b606083156111d05782516000036111c9576001600160a01b0385163b6111c95760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161049f565b508161107e565b61107e83838151156111e55781518083602001fd5b8060405162461bcd60e51b815260040161049f9190611521565b60006020828403121561121157600080fd5b5035919050565b6001600160a01b03811681146105ae57600080fd5b60006020828403121561123f57600080fd5b8135610f5581611218565b60008060008060008060c0878903121561126357600080fd5b863561126e81611218565b9860208801359850604088013597606081013597506080810135965060a00135945092505050565b6020808252600f908201526e139bdd081a5b9a5d1a585b1a5e9959608a1b604082015260600190565b60208082526017908201527615995cdd1a5b99c8185b1c9958591e481cdd185c9d1959604a1b604082015260600190565b6020808252601a9082015279737461727420756e6c6f636b203e3d20656e6420756e6c6f636b60301b604082015260600190565b6020808252600e908201526d14d85b19481a5cc819985a5b195960921b604082015260600190565b6020808252601990820152784e6f74206265666f72652076657374696e672073746172747360381b604082015260600190565b6020808252600f908201526e151c985b9cd9995c8819985a5b1959608a1b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b808201808211156106c1576106c16113a8565b80820281158282048414176106c1576106c16113a8565b60008261140557634e487b7160e01b600052601260045260246000fd5b500490565b6020808252601c908201527b737461727453616c6554696d65203e3d20656e6453616c6554696d6560201b604082015260600190565b6020808252818101527f656e6453616c6554696d65203e3d207374617274546f6b656e73556e6c6f636b604082015260600190565b6020808252601e908201527f737461727453616c6554696d65206973206e6f7420696e206675747572650000604082015260600190565b818103818111156106c1576106c16113a8565b6000602082840312156114d157600080fd5b81518015158114610f5557600080fd5b60005b838110156114fc5781810151838201526020016114e4565b50506000910152565b600082516115178184602087016114e1565b9190910192915050565b60208152600082518060208401526115408160408501602087016114e1565b601f01601f1916919091016040019291505056fea264697066735822122099282c7af44359f31434d3ffd23f3f1a19ffa67ae8385f644ab8a4172aadbe7364736f6c63430008130033

Deployed Bytecode

0x6080604052600436106101465760003560e01c8062a08f561461014b5780630337b3aa146101745780631058ee7b1461018a578063191292fb146101ac578063248bd36a146101cc578063351050fb146101f95780633ccfd60b1461020f5780634e71d92d146102245780634e7df9ec14610239578063568ea1911461025957806358371ccd1461026f5780636447ef20146102855780636f68fffd146102b2578063715018a6146102d257806374491752146102e75780638da5cb5b146102fc5780639e74c6d914610329578063a961e9e814610349578063b098a7281461035f578063b5545a3c14610375578063c90f16cd1461038a578063d051e4f7146103b7578063d0e30db0146103d7578063e0069e19146103df578063eecb060a146103ff578063f2fde38b14610415578063f5c91f5a14610435578063fc0c546a14610455575b600080fd5b34801561015757600080fd5b5061016160045481565b6040519081526020015b60405180910390f35b34801561018057600080fd5b5061016160065481565b34801561019657600080fd5b506101aa6101a53660046111ff565b610475565b005b3480156101b857600080fd5b506101aa6101c73660046111ff565b6104ef565b3480156101d857600080fd5b506101616101e736600461122d565b600a6020526000908152604090205481565b34801561020557600080fd5b50610161600b5481565b34801561021b57600080fd5b506101aa6104fc565b34801561023057600080fd5b506101aa6105b1565b34801561024557600080fd5b5061016161025436600461122d565b61067a565b34801561026557600080fd5b5061016160055481565b34801561027b57600080fd5b5061016160035481565b34801561029157600080fd5b506101616102a036600461122d565b600c6020526000908152604090205481565b3480156102be57600080fd5b506101aa6102cd3660046111ff565b6106c7565b3480156102de57600080fd5b506101aa61077e565b3480156102f357600080fd5b506101aa610792565b34801561030857600080fd5b50610311610830565b6040516001600160a01b03909116815260200161016b565b34801561033557600080fd5b506101aa6103443660046111ff565b61083f565b34801561035557600080fd5b5061016160025481565b34801561036b57600080fd5b5061016160085481565b34801561038157600080fd5b506101aa610920565b34801561039657600080fd5b506101616103a536600461122d565b60096020526000908152604090205481565b3480156103c357600080fd5b506101aa6103d23660046111ff565b6109e6565b6101aa610a9d565b3480156103eb57600080fd5b506101616103fa36600461122d565b610c0a565b34801561040b57600080fd5b5061016160075481565b34801561042157600080fd5b506101aa61043036600461122d565b610c99565b34801561044157600080fd5b506101aa61045036600461124a565b610d0f565b34801561046157600080fd5b50600154610311906001600160a01b031681565b61047d610e2d565b6002546000036104a85760405162461bcd60e51b815260040161049f90611296565b60405180910390fd5b60045442106104c95760405162461bcd60e51b815260040161049f906112bf565b80600454106104ea5760405162461bcd60e51b815260040161049f906112f0565b600555565b6104f7610e2d565b600755565b610504610e2d565b600854156105245760405162461bcd60e51b815260040161049f90611324565b6004544210156105465760405162461bcd60e51b815260040161049f9061134c565b604051600090339047908381818185875af1925050503d8060008114610588576040519150601f19603f3d011682016040523d82523d6000602084013e61058d565b606091505b50509050806105ae5760405162461bcd60e51b815260040161049f9061137f565b50565b600854156105d15760405162461bcd60e51b815260040161049f90611324565b6004544210156105f35760405162461bcd60e51b815260040161049f9061134c565b60006105fe33610c0a565b336000908152600c60205260408120805492935083929091906106229084906113be565b909155505060015461063e906001600160a01b03163383610e8c565b604080518281524260208201527fc83b5086ce94ec8d5a88a9f5fea4b18a522bb238ed0d2d8abd959549a80c16b891015b60405180910390a150565b6000600b5460000361068e57506000919050565b600b546001600160a01b0383166000908152600a60205260409020546006546106b791906113d1565b6106c191906113e8565b92915050565b6106cf610e2d565b6002546000036106f15760405162461bcd60e51b815260040161049f90611296565b60035442106107375760405162461bcd60e51b815260206004820152601260248201527114d85b1948185b1c9958591e48195b99195960721b604482015260640161049f565b80600254106107585760405162461bcd60e51b815260040161049f9061140a565b60045481106107795760405162461bcd60e51b815260040161049f90611440565b600355565b610786610e2d565b6107906000610ef4565b565b61079a610e2d565b6003544210156107ec5760405162461bcd60e51b815260206004820152601e60248201527f4e6f7420617661696c61626c65206265666f72652073616c6520656e64730000604482015260640161049f565b600454421061080d5760405162461bcd60e51b815260040161049f906112bf565b600160088190556006549054610790916001600160a01b03909116903390610e8c565b6000546001600160a01b031690565b610847610e2d565b6002546000036108695760405162461bcd60e51b815260040161049f90611296565b600454421061088a5760405162461bcd60e51b815260040161049f906112bf565b8042106108d95760405162461bcd60e51b815260206004820152601d60248201527f737461727420756e6c6f636b206973206e6f7420696e20667574757265000000604482015260640161049f565b60055481106108fa5760405162461bcd60e51b815260040161049f906112f0565b806003541061091b5760405162461bcd60e51b815260040161049f90611440565b600455565b6008546001146109675760405162461bcd60e51b815260206004820152601260248201527114d85b19481a5cc81b9bdd0819985a5b195960721b604482015260640161049f565b33600081815260096020526040808220805490839055905190929083908381818185875af1925050503d80600081146109bc576040519150601f19603f3d011682016040523d82523d6000602084013e6109c1565b606091505b50509050806109e25760405162461bcd60e51b815260040161049f9061137f565b5050565b6109ee610e2d565b600354600003610a105760405162461bcd60e51b815260040161049f90611296565b6002544210610a585760405162461bcd60e51b815260206004820152601460248201527314d85b1948185b1c9958591e481cdd185c9d195960621b604482015260640161049f565b804210610a775760405162461bcd60e51b815260040161049f90611475565b6003548110610a985760405162461bcd60e51b815260040161049f9061140a565b600255565b600254421015610aee5760405162461bcd60e51b815260206004820152601c60248201527b4465706f736974206973206e6f742079657420617661696c61626c6560201b604482015260640161049f565b6003544210610b3f5760405162461bcd60e51b815260206004820152601e60248201527f4465706f736974206973206e6f206c6f6e67657220617661696c61626c650000604482015260640161049f565b3360009081526009602052604081208054349290610b5e9084906113be565b909155505060075460009061271090610b7790346113d1565b610b8191906113e8565b610b8b90346113be565b336000908152600a6020526040812080549293508392909190610baf9084906113be565b9250508190555080600b6000828254610bc891906113be565b9091555050604080513381523460208201529081018290527f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159060600161066f565b6000600454421015610c1e57506000919050565b600854600103610c3057506000919050565b6001600160a01b0382166000908152600c6020526040902054600454600554610c5991906114ac565b600454610c6842600554610f44565b610c7291906114ac565b610c7b8561067a565b610c8591906113d1565b610c8f91906113e8565b6106c191906114ac565b610ca1610e2d565b6001600160a01b038116610d065760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161049f565b6105ae81610ef4565b610d17610e2d565b834210610d365760405162461bcd60e51b815260040161049f90611475565b828410610d555760405162461bcd60e51b815260040161049f9061140a565b818310610d745760405162461bcd60e51b815260040161049f90611440565b808210610d935760405162461bcd60e51b815260040161049f906112f0565b6001546001600160a01b031615610de25760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481a5b9a5d1a585b1a5e9959606a1b604482015260640161049f565b600180546001600160a01b0319166001600160a01b03881690811790915560028590556003849055600483905560058290556006869055610e2590333088610f5c565b505050505050565b33610e36610830565b6001600160a01b0316146107905760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161049f565b6040516001600160a01b038316602482015260448101829052610eef90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610f9a565b505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000818310610f535781610f55565b825b9392505050565b6040516001600160a01b0380851660248301528316604482015260648101829052610f949085906323b872dd60e01b90608401610eb8565b50505050565b6000610fef826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661106f9092919063ffffffff16565b905080516000148061101057508080602001905181019061101091906114bf565b610eef5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161049f565b606061107e8484600085611086565b949350505050565b6060824710156110e75760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161049f565b600080866001600160a01b031685876040516111039190611505565b60006040518083038185875af1925050503d8060008114611140576040519150601f19603f3d011682016040523d82523d6000602084013e611145565b606091505b509150915061115687838387611161565b979650505050505050565b606083156111d05782516000036111c9576001600160a01b0385163b6111c95760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161049f565b508161107e565b61107e83838151156111e55781518083602001fd5b8060405162461bcd60e51b815260040161049f9190611521565b60006020828403121561121157600080fd5b5035919050565b6001600160a01b03811681146105ae57600080fd5b60006020828403121561123f57600080fd5b8135610f5581611218565b60008060008060008060c0878903121561126357600080fd5b863561126e81611218565b9860208801359850604088013597606081013597506080810135965060a00135945092505050565b6020808252600f908201526e139bdd081a5b9a5d1a585b1a5e9959608a1b604082015260600190565b60208082526017908201527615995cdd1a5b99c8185b1c9958591e481cdd185c9d1959604a1b604082015260600190565b6020808252601a9082015279737461727420756e6c6f636b203e3d20656e6420756e6c6f636b60301b604082015260600190565b6020808252600e908201526d14d85b19481a5cc819985a5b195960921b604082015260600190565b6020808252601990820152784e6f74206265666f72652076657374696e672073746172747360381b604082015260600190565b6020808252600f908201526e151c985b9cd9995c8819985a5b1959608a1b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b808201808211156106c1576106c16113a8565b80820281158282048414176106c1576106c16113a8565b60008261140557634e487b7160e01b600052601260045260246000fd5b500490565b6020808252601c908201527b737461727453616c6554696d65203e3d20656e6453616c6554696d6560201b604082015260600190565b6020808252818101527f656e6453616c6554696d65203e3d207374617274546f6b656e73556e6c6f636b604082015260600190565b6020808252601e908201527f737461727453616c6554696d65206973206e6f7420696e206675747572650000604082015260600190565b818103818111156106c1576106c16113a8565b6000602082840312156114d157600080fd5b81518015158114610f5557600080fd5b60005b838110156114fc5781810151838201526020016114e4565b50506000910152565b600082516115178184602087016114e1565b9190910192915050565b60208152600082518060208401526115408160408501602087016114e1565b601f01601f1916919091016040019291505056fea264697066735822122099282c7af44359f31434d3ffd23f3f1a19ffa67ae8385f644ab8a4172aadbe7364736f6c63430008130033

Deployed Bytecode Sourcemap

423:6869:10:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;615:29;;;;;;;;;;;;;;;;;;;160:25:12;;;148:2;133:18;615:29:10;;;;;;;;683:28;;;;;;;;;;;;;;;;5283:342;;;;;;;;;;-1:-1:-1;5283:342:10;;;;;:::i;:::-;;:::i;:::-;;2712:89;;;;;;;;;;-1:-1:-1;2712:89:10;;;;;:::i;:::-;;:::i;884:65::-;;;;;;;;;;-1:-1:-1;884:65:10;;;;;:::i;:::-;;;;;;;;;;;;;;991:39;;;;;;;;;;;;;;;;3496:184;;;;;;;;;;;;;:::i;3686:248::-;;;;;;;;;;;;;:::i;6436:215::-;;;;;;;;;;-1:-1:-1;6436:215:10;;;;;:::i;:::-;;:::i;650:27::-;;;;;;;;;;;;;;;;586:23;;;;;;;;;;;;;;;;1077:64;;;;;;;;;;-1:-1:-1;1077:64:10;;;;;:::i;:::-;;;;;;;;;;;;;;4350:396;;;;;;;;;;-1:-1:-1;4350:396:10;;;;;:::i;:::-;;:::i;1824:101:0:-;;;;;;;;;;;;;:::i;5737:330:10:-;;;;;;;;;;;;;:::i;1201:85:0:-;;;;;;;;;;;;;:::i;:::-;;;-1:-1:-1;;;;;933:32:12;;;915:51;;903:2;888:18;1201:85:0;769:203:12;4752:525:10;;;;;;;;;;-1:-1:-1;4752:525:10;;;;;:::i;:::-;;:::i;555:25::-;;;;;;;;;;;;;;;;746:28;;;;;;;;;;;;;;;;6179:251;;;;;;;;;;;;;:::i;780:59::-;;;;;;;;;;-1:-1:-1;780:59:10;;;;;:::i;:::-;;;;;;;;;;;;;;3940:404;;;;;;;;;;-1:-1:-1;3940:404:10;;;;;:::i;:::-;;:::i;2897:509::-;;;:::i;6902:388::-;;;;;;;;;;-1:-1:-1;6902:388:10;;;;;:::i;:::-;;:::i;717:23::-;;;;;;;;;;;;;;;;2074:198:0;;;;;;;;;;-1:-1:-1;2074:198:0;;;;;:::i;:::-;;:::i;1260:931:10:-;;;;;;;;;;-1:-1:-1;1260:931:10;;;;;:::i;:::-;;:::i;530:19::-;;;;;;;;;;-1:-1:-1;530:19:10;;;;-1:-1:-1;;;;;530:19:10;;;5283:342;1094:13:0;:11;:13::i;:::-;5369::10::1;;5386:1;5369:18:::0;5361:46:::1;;;;-1:-1:-1::0;;;5361:46:10::1;;;;;;;:::i;:::-;;;;;;;;;5443:17;;5425:15;:35;5417:71;;;;-1:-1:-1::0;;;5417:71:10::1;;;;;;;:::i;:::-;5526:16;5506:17;;:36;5498:75;;;;-1:-1:-1::0;;;5498:75:10::1;;;;;;;:::i;:::-;5584:15;:34:::0;5283:342::o;2712:89::-;1094:13:0;:11;:13::i;:::-;2776:7:10::1;:18:::0;2712:89::o;3496:184::-;1094:13:0;:11;:13::i;:::-;2509:12:10::1;::::0;:17;2501:44:::1;;;;-1:-1:-1::0;;;2501:44:10::1;;;;;;;:::i;:::-;2582:17;;2563:15;:36;;2555:74;;;;-1:-1:-1::0;;;2555:74:10::1;;;;;;;:::i;:::-;3573:58:::2;::::0;3558:9:::2;::::0;3581:10:::2;::::0;3605:21:::2;::::0;3558:9;3573:58;3558:9;3573:58;3605:21;3581:10;3573:58:::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3557:74;;;3649:4;3641:32;;;;-1:-1:-1::0;;;3641:32:10::2;;;;;;;:::i;:::-;3547:133;3496:184::o:0;3686:248::-;2509:12;;:17;2501:44;;;;-1:-1:-1;;;2501:44:10;;;;;;;:::i;:::-;2582:17;;2563:15;:36;;2555:74;;;;-1:-1:-1;;;2555:74:10;;;;;;;:::i;:::-;3734:11:::1;3748:31;3768:10;3748:19;:31::i;:::-;3811:10;3790:32;::::0;;;:20:::1;:32;::::0;;;;:42;;3734:45;;-1:-1:-1;3734:45:10;;3790:32;;;:42:::1;::::0;3734:45;;3790:42:::1;:::i;:::-;::::0;;;-1:-1:-1;;3842:5:10::1;::::0;:38:::1;::::0;-1:-1:-1;;;;;3842:5:10::1;3861:10;3873:6:::0;3842:18:::1;:38::i;:::-;3895:32;::::0;;4546:25:12;;;3911:15:10::1;4602:2:12::0;4587:18;;4580:34;3895:32:10::1;::::0;4519:18:12;3895:32:10::1;;;;;;;;3724:210;3686:248::o:0;6436:215::-;6495:4;6515:23;;6542:1;6515:28;6511:42;;-1:-1:-1;6552:1:10;;6436:215;-1:-1:-1;6436:215:10:o;6511:42::-;6621:23;;-1:-1:-1;;;;;6590:27:10;;;;;;:21;:27;;;;;;6571:16;;:46;;6590:27;6571:46;:::i;:::-;6570:74;;;;:::i;:::-;6563:81;6436:215;-1:-1:-1;;6436:215:10:o;4350:396::-;1094:13:0;:11;:13::i;:::-;4428::10::1;;4445:1;4428:18:::0;4420:46:::1;;;;-1:-1:-1::0;;;4420:46:10::1;;;;;;;:::i;:::-;4502:11;;4484:15;:29;4476:60;;;::::0;-1:-1:-1;;;4476:60:10;;5222:2:12;4476:60:10::1;::::0;::::1;5204:21:12::0;5261:2;5241:18;;;5234:30;-1:-1:-1;;;5280:18:12;;;5273:48;5338:18;;4476:60:10::1;5020:342:12::0;4476:60:10::1;4570:12;4554:13;;:28;4546:69;;;;-1:-1:-1::0;;;4546:69:10::1;;;;;;;:::i;:::-;4648:17;;4633:12;:32;4625:77;;;;-1:-1:-1::0;;;4625:77:10::1;;;;;;;:::i;:::-;4713:11;:26:::0;4350:396::o;1824:101:0:-;1094:13;:11;:13::i;:::-;1888:30:::1;1915:1;1888:18;:30::i;:::-;1824:101::o:0;5737:330:10:-;1094:13:0;:11;:13::i;:::-;5815:11:10::1;;5796:15;:30;;5788:73;;;::::0;-1:-1:-1;;;5788:73:10;;6287:2:12;5788:73:10::1;::::0;::::1;6269:21:12::0;6326:2;6306:18;;;6299:30;6365:32;6345:18;;;6338:60;6415:18;;5788:73:10::1;6085:354:12::0;5788:73:10::1;5897:17;;5879:15;:35;5871:71;;;;-1:-1:-1::0;;;5871:71:10::1;;;;;;;:::i;:::-;5967:1;5952:12;:16:::0;;;6043::::1;::::0;6012:5;;:48:::1;::::0;-1:-1:-1;;;;;6012:5:10;;::::1;::::0;6031:10:::1;::::0;6012:18:::1;:48::i;1201:85:0:-:0;1247:7;1273:6;-1:-1:-1;;;;;1273:6:0;;1201:85::o;4752:525:10:-;1094:13:0;:11;:13::i;:::-;4842::10::1;;4859:1;4842:18:::0;4834:46:::1;;;;-1:-1:-1::0;;;4834:46:10::1;;;;;;;:::i;:::-;4916:17;;4898:15;:35;4890:71;;;;-1:-1:-1::0;;;4890:71:10::1;;;;;;;:::i;:::-;4997:18;4979:15;:36;4971:78;;;::::0;-1:-1:-1;;;4971:78:10;;6646:2:12;4971:78:10::1;::::0;::::1;6628:21:12::0;6685:2;6665:18;;;6658:30;6724:31;6704:18;;;6697:59;6773:18;;4971:78:10::1;6444:353:12::0;4971:78:10::1;5088:15;;5067:18;:36;5059:75;;;;-1:-1:-1::0;;;5059:75:10::1;;;;;;;:::i;:::-;5166:18;5152:11;;:32;5144:77;;;;-1:-1:-1::0;;;5144:77:10::1;;;;;;;:::i;:::-;5232:17;:38:::0;4752:525::o;6179:251::-;2319:12;;2335:1;2319:17;2311:48;;;;-1:-1:-1;;;2311:48:10;;7004:2:12;2311:48:10;;;6986:21:12;7043:2;7023:18;;;7016:30;-1:-1:-1;;;7062:18:12;;;7055:48;7120:18;;2311:48:10;6802:342:12;2311:48:10;6260:10:::1;6230:11;6244:27:::0;;;:15:::1;:27;::::0;;;;;;;6281:31;;;;6338:43;;6244:27;;6260:10;6244:27;;6230:11;6338:43;6230:11;6338:43;6244:27;6260:10;6338:43:::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6322:59;;;6399:4;6391:32;;;;-1:-1:-1::0;;;6391:32:10::1;;;;;;;:::i;:::-;6220:210;;6179:251::o:0;3940:404::-;1094:13:0;:11;:13::i;:::-;4022:11:10::1;;4037:1;4022:16:::0;4014:44:::1;;;;-1:-1:-1::0;;;4014:44:10::1;;;;;;;:::i;:::-;4094:13;;4076:15;:31;4068:64;;;::::0;-1:-1:-1;;;4068:64:10;;7351:2:12;4068:64:10::1;::::0;::::1;7333:21:12::0;7390:2;7370:18;;;7363:30;-1:-1:-1;;;7409:18:12;;;7402:50;7469:18;;4068:64:10::1;7149:344:12::0;4068:64:10::1;4168:14;4150:15;:32;4142:75;;;;-1:-1:-1::0;;;4142:75:10::1;;;;;;;:::i;:::-;4252:11;;4235:14;:28;4227:69;;;;-1:-1:-1::0;;;4227:69:10::1;;;;;;;:::i;:::-;4307:13;:30:::0;3940:404::o;2897:509::-;2970:13;;2951:15;:32;;2943:73;;;;-1:-1:-1;;;2943:73:10;;8059:2:12;2943:73:10;;;8041:21:12;8098:2;8078:18;;;8071:30;-1:-1:-1;;;8117:18:12;;;8110:58;8185:18;;2943:73:10;7857:352:12;2943:73:10;3052:11;;3034:15;:29;3026:72;;;;-1:-1:-1;;;3026:72:10;;8416:2:12;3026:72:10;;;8398:21:12;8455:2;8435:18;;;8428:30;8494:32;8474:18;;;8467:60;8544:18;;3026:72:10;8214:354:12;3026:72:10;3124:10;3108:27;;;;:15;:27;;;;;:40;;3139:9;;3108:27;:40;;3139:9;;3108:40;:::i;:::-;;;;-1:-1:-1;;3207:7:10;;3158:21;;518:5;;3195:19;;:9;:19;:::i;:::-;3194:26;;;;:::i;:::-;3182:38;;:9;:38;:::i;:::-;3252:10;3230:33;;;;:21;:33;;;;;:53;;3158:62;;-1:-1:-1;3158:62:10;;3230:33;;;:53;;3158:62;;3230:53;:::i;:::-;;;;;;;;3320:16;3293:23;;:43;;;;;;;:::i;:::-;;;;-1:-1:-1;;3351:48:10;;;3359:10;8775:51:12;;3371:9:10;8857:2:12;8842:18;;8835:34;8885:18;;;8878:34;;;3351:48:10;;8763:2:12;8748:18;3351:48:10;8573:345:12;6902:388:10;6966:4;7004:17;;6986:15;:35;6982:49;;;-1:-1:-1;7030:1:10;;6902:388;-1:-1:-1;6902:388:10:o;6982:49::-;7045:12;;7061:1;7045:17;7041:31;;-1:-1:-1;7071:1:10;;6902:388;-1:-1:-1;6902:388:10:o;7041:31::-;-1:-1:-1;;;;;7257:26:10;;;;;;:20;:26;;;;;;7224:17;;7206:15;;:35;;7224:17;7206:35;:::i;:::-;7171:17;;7126:42;7135:15;7152;;7126:8;:42::i;:::-;:62;;;;:::i;:::-;7102:20;7117:4;7102:14;:20::i;:::-;:87;;;;:::i;:::-;7101:141;;;;:::i;:::-;:182;;;;:::i;2074:198:0:-;1094:13;:11;:13::i;:::-;-1:-1:-1;;;;;2162:22:0;::::1;2154:73;;;::::0;-1:-1:-1;;;2154:73:0;;9258:2:12;2154:73:0::1;::::0;::::1;9240:21:12::0;9297:2;9277:18;;;9270:30;9336:34;9316:18;;;9309:62;-1:-1:-1;;;9387:18:12;;;9380:36;9433:19;;2154:73:0::1;9056:402:12::0;2154:73:0::1;2237:28;2256:8;2237:18;:28::i;1260:931:10:-:0;1094:13:0;:11;:13::i;:::-;1504:14:10::1;1486:15;:32;1478:75;;;;-1:-1:-1::0;;;1478:75:10::1;;;;;;;:::i;:::-;1588:12;1571:14;:29;1563:70;;;;-1:-1:-1::0;;;1563:70:10::1;;;;;;;:::i;:::-;1666:18;1651:12;:33;1643:78;;;;-1:-1:-1::0;;;1643:78:10::1;;;;;;;:::i;:::-;1760:16;1739:18;:37;1731:76;;;;-1:-1:-1::0;;;1731:76:10::1;;;;;;;:::i;:::-;1833:5;::::0;-1:-1:-1;;;;;1833:5:10::1;1825:28:::0;1817:60:::1;;;::::0;-1:-1:-1;;;1817:60:10;;9665:2:12;1817:60:10::1;::::0;::::1;9647:21:12::0;9704:2;9684:18;;;9677:30;-1:-1:-1;;;9723:18:12;;;9716:49;9782:18;;1817:60:10::1;9463:343:12::0;1817:60:10::1;1887:5;:14:::0;;-1:-1:-1;;;;;;1887:14:10::1;-1:-1:-1::0;;;;;1887:14:10;::::1;::::0;;::::1;::::0;;;1912:13:::1;:30:::0;;;1952:11:::1;:26:::0;;;1988:17:::1;:38:::0;;;2036:15:::1;:34:::0;;;2081:16:::1;:30:::0;;;2122:62:::1;::::0;2145:10:::1;2165:4;2081:30:::0;2122:22:::1;:62::i;:::-;1260:931:::0;;;;;;:::o;1359:130:0:-;719:10:7;1422:7:0;:5;:7::i;:::-;-1:-1:-1;;;;;1422:23:0;;1414:68;;;;-1:-1:-1;;;1414:68:0;;10013:2:12;1414:68:0;;;9995:21:12;;;10032:18;;;10025:30;10091:34;10071:18;;;10064:62;10143:18;;1414:68:0;9811:356:12;941:175:5;1050:58;;-1:-1:-1;;;;;10364:32:12;;1050:58:5;;;10346:51:12;10413:18;;;10406:34;;;1023:86:5;;1043:5;;-1:-1:-1;;;1073:23:5;10319:18:12;;1050:58:5;;;;-1:-1:-1;;1050:58:5;;;;;;;;;;;;;;-1:-1:-1;;;;;1050:58:5;-1:-1:-1;;;;;;1050:58:5;;;;;;;;;;1023:19;:86::i;:::-;941:175;;;:::o;2426:187:0:-;2499:16;2518:6;;-1:-1:-1;;;;;2534:17:0;;;-1:-1:-1;;;;;;2534:17:0;;;;;;2566:40;;2518:6;;;;;;;2566:40;;2499:16;2566:40;2489:124;2426:187;:::o;588:104:8:-;646:7;676:1;672;:5;:13;;684:1;672:13;;;680:1;672:13;665:20;588:104;-1:-1:-1;;;588:104:8:o;1355:203:5:-;1482:68;;-1:-1:-1;;;;;10709:15:12;;;1482:68:5;;;10691:34:12;10761:15;;10741:18;;;10734:43;10793:18;;;10786:34;;;1455:96:5;;1475:5;;-1:-1:-1;;;1505:27:5;10626:18:12;;1482:68:5;10451:375:12;1455:96:5;1355:203;;;;:::o;5196:642::-;5615:23;5641:69;5669:4;5641:69;;;;;;;;;;;;;;;;;5649:5;-1:-1:-1;;;;;5641:27:5;;;:69;;;;;:::i;:::-;5615:95;;5728:10;:17;5749:1;5728:22;:56;;;;5765:10;5754:30;;;;;;;;;;;;:::i;:::-;5720:111;;;;-1:-1:-1;;;5720:111:5;;11315:2:12;5720:111:5;;;11297:21:12;11354:2;11334:18;;;11327:30;11393:34;11373:18;;;11366:62;-1:-1:-1;;;11444:18:12;;;11437:40;11494:19;;5720:111:5;11113:406:12;4108:223:6;4241:12;4272:52;4294:6;4302:4;4308:1;4311:12;4272:21;:52::i;:::-;4265:59;4108:223;-1:-1:-1;;;;4108:223:6:o;5165:446::-;5330:12;5387:5;5362:21;:30;;5354:81;;;;-1:-1:-1;;;5354:81:6;;11726:2:12;5354:81:6;;;11708:21:12;11765:2;11745:18;;;11738:30;11804:34;11784:18;;;11777:62;-1:-1:-1;;;11855:18:12;;;11848:36;11901:19;;5354:81:6;11524:402:12;5354:81:6;5446:12;5460:23;5487:6;-1:-1:-1;;;;;5487:11:6;5506:5;5513:4;5487:31;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5445:73;;;;5535:69;5562:6;5570:7;5579:10;5591:12;5535:26;:69::i;:::-;5528:76;5165:446;-1:-1:-1;;;;;;;5165:446:6:o;7671:628::-;7851:12;7879:7;7875:418;;;7906:10;:17;7927:1;7906:22;7902:286;;-1:-1:-1;;;;;1702:19:6;;;8113:60;;;;-1:-1:-1;;;8113:60:6;;12680:2:12;8113:60:6;;;12662:21:12;12719:2;12699:18;;;12692:30;12758:31;12738:18;;;12731:59;12807:18;;8113:60:6;12478:353:12;8113:60:6;-1:-1:-1;8208:10:6;8201:17;;7875:418;8249:33;8257:10;8269:12;8980:17;;:21;8976:379;;9208:10;9202:17;9264:15;9251:10;9247:2;9243:19;9236:44;8976:379;9331:12;9324:20;;-1:-1:-1;;;9324:20:6;;;;;;;;:::i;196:180:12:-;255:6;308:2;296:9;287:7;283:23;279:32;276:52;;;324:1;321;314:12;276:52;-1:-1:-1;347:23:12;;196:180;-1:-1:-1;196:180:12:o;381:131::-;-1:-1:-1;;;;;456:31:12;;446:42;;436:70;;502:1;499;492:12;517:247;576:6;629:2;617:9;608:7;604:23;600:32;597:52;;;645:1;642;635:12;597:52;684:9;671:23;703:31;728:5;703:31;:::i;977:604::-;1095:6;1103;1111;1119;1127;1135;1188:3;1176:9;1167:7;1163:23;1159:33;1156:53;;;1205:1;1202;1195:12;1156:53;1244:9;1231:23;1263:31;1288:5;1263:31;:::i;:::-;1313:5;1365:2;1350:18;;1337:32;;-1:-1:-1;1416:2:12;1401:18;;1388:32;;1467:2;1452:18;;1439:32;;-1:-1:-1;1518:3:12;1503:19;;1490:33;;-1:-1:-1;1570:3:12;1555:19;1542:33;;-1:-1:-1;977:604:12;-1:-1:-1;;;977:604:12:o;1808:339::-;2010:2;1992:21;;;2049:2;2029:18;;;2022:30;-1:-1:-1;;;2083:2:12;2068:18;;2061:45;2138:2;2123:18;;1808:339::o;2152:347::-;2354:2;2336:21;;;2393:2;2373:18;;;2366:30;-1:-1:-1;;;2427:2:12;2412:18;;2405:53;2490:2;2475:18;;2152:347::o;2504:350::-;2706:2;2688:21;;;2745:2;2725:18;;;2718:30;-1:-1:-1;;;2779:2:12;2764:18;;2757:56;2845:2;2830:18;;2504:350::o;2859:338::-;3061:2;3043:21;;;3100:2;3080:18;;;3073:30;-1:-1:-1;;;3134:2:12;3119:18;;3112:44;3188:2;3173:18;;2859:338::o;3202:349::-;3404:2;3386:21;;;3443:2;3423:18;;;3416:30;-1:-1:-1;;;3477:2:12;3462:18;;3455:55;3542:2;3527:18;;3202:349::o;3766:339::-;3968:2;3950:21;;;4007:2;3987:18;;;3980:30;-1:-1:-1;;;4041:2:12;4026:18;;4019:45;4096:2;4081:18;;3766:339::o;4110:127::-;4171:10;4166:3;4162:20;4159:1;4152:31;4202:4;4199:1;4192:15;4226:4;4223:1;4216:15;4242:125;4307:9;;;4328:10;;;4325:36;;;4341:18;;:::i;4625:168::-;4698:9;;;4729;;4746:15;;;4740:22;;4726:37;4716:71;;4767:18;;:::i;4798:217::-;4838:1;4864;4854:132;;4908:10;4903:3;4899:20;4896:1;4889:31;4943:4;4940:1;4933:15;4971:4;4968:1;4961:15;4854:132;-1:-1:-1;5000:9:12;;4798:217::o;5367:352::-;5569:2;5551:21;;;5608:2;5588:18;;;5581:30;-1:-1:-1;;;5642:2:12;5627:18;;5620:58;5710:2;5695:18;;5367:352::o;5724:356::-;5926:2;5908:21;;;5945:18;;;5938:30;6004:34;5999:2;5984:18;;5977:62;6071:2;6056:18;;5724:356::o;7498:354::-;7700:2;7682:21;;;7739:2;7719:18;;;7712:30;7778:32;7773:2;7758:18;;7751:60;7843:2;7828:18;;7498:354::o;8923:128::-;8990:9;;;9011:11;;;9008:37;;;9025:18;;:::i;10831:277::-;10898:6;10951:2;10939:9;10930:7;10926:23;10922:32;10919:52;;;10967:1;10964;10957:12;10919:52;10999:9;10993:16;11052:5;11045:13;11038:21;11031:5;11028:32;11018:60;;11074:1;11071;11064:12;11931:250;12016:1;12026:113;12040:6;12037:1;12034:13;12026:113;;;12116:11;;;12110:18;12097:11;;;12090:39;12062:2;12055:10;12026:113;;;-1:-1:-1;;12173:1:12;12155:16;;12148:27;11931:250::o;12186:287::-;12315:3;12353:6;12347:13;12369:66;12428:6;12423:3;12416:4;12408:6;12404:17;12369:66;:::i;:::-;12451:16;;;;;12186:287;-1:-1:-1;;12186:287:12:o;12836:396::-;12985:2;12974:9;12967:21;12948:4;13017:6;13011:13;13060:6;13055:2;13044:9;13040:18;13033:34;13076:79;13148:6;13143:2;13132:9;13128:18;13123:2;13115:6;13111:15;13076:79;:::i;:::-;13216:2;13195:15;-1:-1:-1;;13191:29:12;13176:45;;;;13223:2;13172:54;;12836:396;-1:-1:-1;;12836:396:12:o

Swarm Source

ipfs://99282c7af44359f31434d3ffd23f3f1a19ffa67ae8385f644ab8a4172aadbe73

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  ]
[ 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.