ETH Price: $2,567.22 (-1.68%)

Contract

0x5d8353072BC0F62dACB7e3937d4c58a808DB4d0e
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Harvest196015852024-04-07 4:58:47177 days ago1712465927IN
0x5d835307...808DB4d0e
0 ETH0.000362528.12631703
Harvest194926172024-03-22 20:43:35192 days ago1711140215IN
0x5d835307...808DB4d0e
0 ETH0.001153321.75591477
Harvest191069622024-01-28 18:56:47246 days ago1706468207IN
0x5d835307...808DB4d0e
0 ETH0.0004690310.51393432
Harvest189523012024-01-07 2:35:35268 days ago1704594935IN
0x5d835307...808DB4d0e
0 ETH0.0006659912.5632637
Harvest189410022024-01-05 12:14:35270 days ago1704456875IN
0x5d835307...808DB4d0e
0 ETH0.0008636416.29171331
Harvest188579502023-12-24 20:18:35281 days ago1703449115IN
0x5d835307...808DB4d0e
0 ETH0.0008797319.72020757
Harvest187545202023-12-10 8:08:47296 days ago1702195727IN
0x5d835307...808DB4d0e
0 ETH0.0018611826.54632033
Harvest186766642023-11-29 10:26:11307 days ago1701253571IN
0x5d835307...808DB4d0e
0 ETH0.0026649230.55716458
Harvest185714952023-11-14 17:00:11321 days ago1699981211IN
0x5d835307...808DB4d0e
0 ETH0.003583151.10614293
Harvest185568072023-11-12 15:44:59323 days ago1699803899IN
0x5d835307...808DB4d0e
0 ETH0.0038193754.47610038
Harvest185567902023-11-12 15:41:35323 days ago1699803695IN
0x5d835307...808DB4d0e
0 ETH0.0023907345.09875592
Harvest184728832023-10-31 21:47:11335 days ago1698788831IN
0x5d835307...808DB4d0e
0 ETH0.0010803720.38023017
Harvest184728002023-10-31 21:30:35335 days ago1698787835IN
0x5d835307...808DB4d0e
0 ETH0.0012545628.12224018
Harvest183191322023-10-10 9:22:47357 days ago1696929767IN
0x5d835307...808DB4d0e
0 ETH0.00066919.54355647
Harvest183190692023-10-10 9:09:47357 days ago1696928987IN
0x5d835307...808DB4d0e
0 ETH0.0010465312
Harvest181298072023-09-13 20:37:47383 days ago1694637467IN
0x5d835307...808DB4d0e
0 ETH0.0011136112.76920896
Harvest180731812023-09-05 22:15:23391 days ago1693952123IN
0x5d835307...808DB4d0e
0 ETH0.003248937.25343656
Harvest180731692023-09-05 22:12:47391 days ago1693951967IN
0x5d835307...808DB4d0e
0 ETH0.0020150945.17033696
Harvest179971252023-08-26 6:41:35402 days ago1693032095IN
0x5d835307...808DB4d0e
0 ETH0.0008755312.48777284
Harvest176828812023-07-13 6:43:35446 days ago1689230615IN
0x5d835307...808DB4d0e
0 ETH0.0007719817.30475074
Harvest176828582023-07-13 6:38:35446 days ago1689230315IN
0x5d835307...808DB4d0e
0 ETH0.000775817.3903778
Harvest174600682023-06-11 23:16:35477 days ago1686525395IN
0x5d835307...808DB4d0e
0 ETH0.000822115.50825464
Harvest173470182023-05-27 1:05:59493 days ago1685149559IN
0x5d835307...808DB4d0e
0 ETH0.0018690526.6585397
Harvest173008772023-05-20 13:16:47500 days ago1684588607IN
0x5d835307...808DB4d0e
0 ETH0.0025552836.44631071
Harvest170189172023-04-10 16:17:35539 days ago1681143455IN
0x5d835307...808DB4d0e
0 ETH0.0027387951.66465381
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Vesting

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 14 : Vesting.sol
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/utils/cryptography/draft-EIP712.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/utils/math/Math.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "./TriallToken.sol";

contract Vesting is EIP712, Ownable, ReentrancyGuard {
    using SafeERC20 for IERC20;
    using SafeERC20 for TriallToken;
    using Math for uint256;

    event Harvest(address indexed sender, uint256 amount);
    event Deposite(address indexed sender, uint256 amount, bool isFiat);
    event Deposites(address[] indexed senders, uint256[] amounts);

    event SetWhitelist(address[] users, uint256[] allocation);
    event SetTGE(uint256 time);
    event Message(uint256, uint256, uint256, uint256);

    bytes32 private immutable _CONTAINER_TYPEHASE =
        keccak256(
            "Container(address sender,uint256 amount,bool isFiat,uint256 nonce)"
        );

    uint256 public constant MAX_INITIAL_PERCENTAGE = 1e20;
    address public immutable signer;
    uint8 public immutable rewardTokenDecimals;
    uint8 public immutable stakedTokenDecimals;

    uint256 public startDate;
    bool public isWithdrawFunds;

    mapping(address => uint256) public rewardsPaid;
    mapping(address => uint256) public deposited;

    TriallToken private immutable _rewardToken;
    IERC20 private immutable _depositToken;
    uint256 private immutable _initialPercentage;
    uint256 private immutable _minAllocation;
    uint256 private immutable _maxAllocation;
    uint256 private immutable _countPeriodOfVesting;

    string private _name;
    uint256 private _totalSupply;
    uint256 private _tokenPrice;
    uint256 private _totalDeposited;

    mapping(address => mapping(uint256 => bool)) private nonces;

    constructor(
        string memory name_,
        address rewardToken_,
        address depositToken_,
        address signer_,
        uint256 initialUnlockPercentage_,
        uint256 vestingNumberMonth_,
        uint256 minAllocation_,
        uint256 maxAllocation_
    ) EIP712("Vesting", "v1") {
        require(
            rewardToken_ != address(0) && depositToken_ != address(0),
            "Incorrect token address"
        );
        require(vestingNumberMonth_ > 0, "Incorrect amount");
        require(
            minAllocation_ <= maxAllocation_ && maxAllocation_ != 0,
            "Incorrect allocation size"
        );
        require(
            initialUnlockPercentage_ <= MAX_INITIAL_PERCENTAGE,
            "Incorrect initial percentage"
        );
        require(signer_ != address(0), "Incorrect signer address");

        _initialPercentage = initialUnlockPercentage_;
        _countPeriodOfVesting = vestingNumberMonth_;
        _minAllocation = minAllocation_;
        _maxAllocation = maxAllocation_;
        signer = signer_;
        _name = name_;

        _rewardToken = TriallToken(rewardToken_);
        _depositToken = IERC20(depositToken_);

        rewardTokenDecimals = IERC20Metadata(rewardToken_).decimals();
        stakedTokenDecimals = IERC20Metadata(depositToken_).decimals();
    }

    function getAvailAmountToDeposit(address _addr)
        external
        view
        returns (uint256 minAvailAllocation, uint256 maxAvailAllocation)
    {
        uint256 remaining = convertToCurrency(_totalSupply) - _totalDeposited;

        maxAvailAllocation = Math.min(
            _maxAllocation - deposited[_addr],
            remaining
        );
        if (deposited[_addr] == 0) {
            minAvailAllocation = _minAllocation;
        } else {
            minAvailAllocation = 0;
        }
    }

    function getInfo()
        external
        view
        returns (
            string memory name,
            address stakedToken,
            address rewardTokem,
            uint256 minAllocation,
            uint256 maxAllocation,
            uint256 totalSupply,
            uint256 totalDeposited,
            uint256 tokenPrice,
            uint256 initialUnlockPercentage,
            uint256 countPeriodOfVesting
        )
    {
        return (
            _name,
            address(_depositToken),
            address(_rewardToken),
            _minAllocation,
            _maxAllocation,
            _totalSupply,
            _totalDeposited,
            _tokenPrice,
            _initialPercentage,
            _countPeriodOfVesting
        );
    }

    function getBalanceInfo(address _addr)
        external
        view
        returns (uint256 lockedBalance, uint256 unlockedBalance)
    {
        uint256 tokenBalance = convertToToken(deposited[_addr]);

        if (!_isVestingStarted()) {
            return (tokenBalance, 0);
        }

        uint256 unlock = _calculateUnlock(_addr);

        return (tokenBalance - unlock - rewardsPaid[_addr], unlock);
    }

    function initializeToken(uint256 tokenPrice_, uint256 totalSypply_)
        external
        onlyOwner
    {
        require(_tokenPrice == 0, "Is was initialized before");
        require(totalSypply_ > 0 && tokenPrice_ > 0, "Incorrect amount");

        _tokenPrice = tokenPrice_;
        _totalSupply = totalSypply_;

        _rewardToken.safeTransferFrom(msg.sender, address(this), totalSypply_);
    }

    function setTGE(uint256 _tge) external onlyOwner {
        require(startDate == 0 && _tge != 0, "TGE is set or zero");
        startDate = _tge;
        emit SetTGE(_tge);
    }

    function addDepositeAmount(
        address[] calldata _addrArr,
        uint256[] calldata _amountArr
    ) external onlyOwner {
        require(_addrArr.length == _amountArr.length, "Incorrect array length");
        require(!_isVestingStarted(), "Sale is closed");

        uint256 remainingAllocation = _totalSupply -
            convertToToken(_totalDeposited);

        for (uint256 index = 0; index < _addrArr.length; index++) {
            uint256 convertAmount = convertToToken(_amountArr[index]);
            require(
                convertAmount <= remainingAllocation,
                "Not enough allocation"
            );

            remainingAllocation -= convertAmount;

            deposited[_addrArr[index]] += _amountArr[index];

            _totalDeposited += _amountArr[index];
        }
        emit Deposites(_addrArr, _amountArr);
    }

    function withdrawFunds() external nonReentrant onlyOwner {
        require(!isWithdrawFunds, "Withdraw funds was called before");
        require(_isVestingStarted(), "Vesting can't be started");
        isWithdrawFunds = true;

        uint256 unSoldToken = _totalSupply - convertToToken(_totalDeposited);
        _rewardToken.burn(unSoldToken);

        uint256 balance = _depositToken.balanceOf(address(this));
        _depositToken.safeTransfer(msg.sender, balance);
    }

    function deposite(
        uint256 _amount,
        bool _fiat,
        uint256 _nonce,
        uint8 _v,
        bytes32 _r,
        bytes32 _s
    ) external nonReentrant {
        require(!nonces[msg.sender][_nonce], "Nonce used before");
        require(
            _isValidSigner(msg.sender, _amount, _fiat, _nonce, _v, _r, _s),
            "Invalid signer"
        );
        require(!_isVestingStarted(), "Sale is closed");
        require(_isValidAmount(_amount), "Invalid amount");

        nonces[msg.sender][_nonce] = true;
        deposited[msg.sender] += _amount;
        _totalDeposited += _amount;

        uint256 transferAmount = _convertToCorrectDecimals(
            _amount,
            rewardTokenDecimals,
            stakedTokenDecimals
        );
        if (!_fiat) {
            _depositToken.safeTransferFrom(
                msg.sender,
                address(this),
                transferAmount
            );
        }

        emit Deposite(msg.sender, _amount, _fiat);
    }

    function harvest() external {
        require(_isVestingStarted(), "Vesting can't be started");

        uint256 amountToTransfer = _calculateUnlock(msg.sender);

        rewardsPaid[msg.sender] += amountToTransfer;

        _rewardToken.safeTransfer(msg.sender, amountToTransfer);

        emit Harvest(msg.sender, amountToTransfer);
    }

    function DOMAIN_SEPARATOR() external view returns (bytes32) {
        return _domainSeparatorV4();
    }

    function convertToToken(uint256 _amount) public view returns (uint256) {
        return (_amount * 10**rewardTokenDecimals) / _tokenPrice;
    }

    function convertToCurrency(uint256 _amount) public view returns (uint256) {
        return (_amount * _tokenPrice) / 10**rewardTokenDecimals;
    }

    function _calculateUnlock(address _addr) internal view returns (uint256) {
        uint256 tokenAmount = convertToToken(deposited[_addr]);
        uint256 initialUnlockAmount = (tokenAmount * _initialPercentage) /
            MAX_INITIAL_PERCENTAGE;

        uint256 passeMonth = Math.min(
            (block.timestamp - startDate) / (30 days),
            _countPeriodOfVesting
        );

        return
            (((tokenAmount - initialUnlockAmount) * passeMonth) /
                _countPeriodOfVesting) +
            initialUnlockAmount -
            rewardsPaid[_addr];
    }

    function _convertToCorrectDecimals(
        uint256 _amount,
        uint256 _fromDecimals,
        uint256 _toDecimals
    ) internal pure returns (uint256) {
        if (_fromDecimals < _toDecimals) {
            _amount = _amount * (10**(_toDecimals - _fromDecimals));
        } else if (_fromDecimals > _toDecimals) {
            _amount = _amount / (10**(_fromDecimals - _toDecimals));
        }
        return _amount;
    }

    function _isVestingStarted() internal view returns (bool) {
        return block.timestamp > startDate && startDate != 0;
    }

    function _isValidAmount(uint256 _amount) internal view returns (bool) {
        uint256 depositAmount = deposited[msg.sender];
        uint256 remainingAmount = Math.min(
            _maxAllocation - depositAmount,
            convertToToken(_totalSupply) - _totalDeposited
        );
        return
            (_amount < _minAllocation && depositAmount == 0) ||
                (_amount > _maxAllocation || _amount > remainingAmount)
                ? false
                : true;
    }

    function _isValidSigner(
        address _sender,
        uint256 _amount,
        bool _fiat,
        uint256 _nonce,
        uint8 _v,
        bytes32 _r,
        bytes32 _s
    ) internal view returns (bool) {
        bytes32 structHash = keccak256(
            abi.encode(_CONTAINER_TYPEHASE, _sender, _amount, _fiat, _nonce)
        );
        bytes32 hash = _hashTypedDataV4(structHash);
        address messageSigner = ECDSA.recover(hash, _v, _r, _s);

        return messageSigner == signer;
    }
}

File 2 of 14 : TriallToken.sol
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

contract TriallToken is ERC20Burnable, Ownable {
    uint256 constant TOTAL_SUPPLY = 175_000_000 * 1e18;

    constructor(address tokenReceiver) ERC20("Triall", "TRL") {
        _mint(tokenReceiver, TOTAL_SUPPLY);
    }

    function mint(address _addr, uint256 _amount) external onlyOwner {
        _mint(_addr, _amount);
    }
}

File 3 of 14 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _setOwner(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");
        _setOwner(newOwner);
    }

    function _setOwner(address newOwner) private {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 4 of 14 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

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

        _;

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

File 5 of 14 : ERC20.sol
// SPDX-License-Identifier: MIT

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.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin guidelines: functions revert instead
 * of 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}.
     *
     * The default value of {decimals} is 18. To select a different value for
     * {decimals} you should overload it.
     *
     * 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 value {ERC20} uses, unless this function is
     * 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:
     *
     * - `recipient` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(_msgSender(), recipient, 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}.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        _approve(_msgSender(), 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}.
     *
     * Requirements:
     *
     * - `sender` and `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     * - the caller must have allowance for ``sender``'s tokens of at least
     * `amount`.
     */
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) public virtual override returns (bool) {
        _transfer(sender, recipient, amount);

        uint256 currentAllowance = _allowances[sender][_msgSender()];
        require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance");
        unchecked {
            _approve(sender, _msgSender(), currentAllowance - 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) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][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) {
        uint256 currentAllowance = _allowances[_msgSender()][spender];
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(_msgSender(), spender, currentAllowance - subtractedValue);
        }

        return true;
    }

    /**
     * @dev Moves `amount` of tokens from `sender` to `recipient`.
     *
     * 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:
     *
     * - `sender` cannot be the zero address.
     * - `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     */
    function _transfer(
        address sender,
        address recipient,
        uint256 amount
    ) internal virtual {
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(sender, recipient, amount);

        uint256 senderBalance = _balances[sender];
        require(senderBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[sender] = senderBalance - amount;
        }
        _balances[recipient] += amount;

        emit Transfer(sender, recipient, amount);

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

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

File 6 of 14 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

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

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

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

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

File 7 of 14 : ERC20Burnable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

/**
 * @dev Extension of {ERC20} that allows token holders to destroy both their own
 * tokens and those that they have an allowance for, in a way that can be
 * recognized off-chain (via event analysis).
 */
abstract contract ERC20Burnable is Context, ERC20 {
    /**
     * @dev Destroys `amount` tokens from the caller.
     *
     * See {ERC20-_burn}.
     */
    function burn(uint256 amount) public virtual {
        _burn(_msgSender(), amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, deducting from the caller's
     * allowance.
     *
     * See {ERC20-_burn} and {ERC20-allowance}.
     *
     * Requirements:
     *
     * - the caller must have allowance for ``accounts``'s tokens of at least
     * `amount`.
     */
    function burnFrom(address account, uint256 amount) public virtual {
        uint256 currentAllowance = allowance(account, _msgSender());
        require(currentAllowance >= amount, "ERC20: burn amount exceeds allowance");
        unchecked {
            _approve(account, _msgSender(), currentAllowance - amount);
        }
        _burn(account, amount);
    }
}

File 8 of 14 : IERC20Metadata.sol
// SPDX-License-Identifier: MIT

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 9 of 14 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC20.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;

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

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

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    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");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    /**
     * @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");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 10 of 14 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @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
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 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://diligence.consensys.net/posts/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.5.11/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 functionCall(target, data, "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");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return _verifyCallResult(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) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return _verifyCallResult(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) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) private pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // 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

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 11 of 14 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

File 12 of 14 : ECDSA.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
 *
 * These functions can be used to verify that a message was signed by the holder
 * of the private keys of a given address.
 */
library ECDSA {
    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature`. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     *
     * Documentation for signature generation:
     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        // Check the signature length
        // - case 65: r,s,v signature (standard)
        // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._
        if (signature.length == 65) {
            bytes32 r;
            bytes32 s;
            uint8 v;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            assembly {
                r := mload(add(signature, 0x20))
                s := mload(add(signature, 0x40))
                v := byte(0, mload(add(signature, 0x60)))
            }
            return recover(hash, v, r, s);
        } else if (signature.length == 64) {
            bytes32 r;
            bytes32 vs;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            assembly {
                r := mload(add(signature, 0x20))
                vs := mload(add(signature, 0x40))
            }
            return recover(hash, r, vs);
        } else {
            revert("ECDSA: invalid signature length");
        }
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `r` and `vs` short-signature fields separately.
     *
     * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
     *
     * _Available since v4.2._
     */
    function recover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address) {
        bytes32 s;
        uint8 v;
        assembly {
            s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)
            v := add(shr(255, vs), 27)
        }
        return recover(hash, v, r, s);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `v`, `r` and `s` signature fields separately.
     */
    function recover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address) {
        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
        // the valid range for s in (281): 0 < s < secp256k1n ÷ 2 + 1, and for v in (282): v ∈ {27, 28}. Most
        // signatures from current libraries generate a unique signature with an s-value in the lower half order.
        //
        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
        // these malleable signatures as well.
        require(
            uint256(s) <= 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0,
            "ECDSA: invalid signature 's' value"
        );
        require(v == 27 || v == 28, "ECDSA: invalid signature 'v' value");

        // If the signature is valid (and not malleable), return the signer address
        address signer = ecrecover(hash, v, r, s);
        require(signer != address(0), "ECDSA: invalid signature");

        return signer;
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from a `hash`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
        // 32 is the length in bytes of hash,
        // enforced by the type signature above
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
    }

    /**
     * @dev Returns an Ethereum Signed Typed Data, created from a
     * `domainSeparator` and a `structHash`. This produces hash corresponding
     * to the one signed with the
     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
     * JSON-RPC method as part of EIP-712.
     *
     * See {recover}.
     */
    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
    }
}

File 13 of 14 : draft-EIP712.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./ECDSA.sol";

/**
 * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.
 *
 * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,
 * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding
 * they need in their contracts using a combination of `abi.encode` and `keccak256`.
 *
 * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding
 * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA
 * ({_hashTypedDataV4}).
 *
 * The implementation of the domain separator was designed to be as efficient as possible while still properly updating
 * the chain id to protect against replay attacks on an eventual fork of the chain.
 *
 * NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method
 * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].
 *
 * _Available since v3.4._
 */
abstract contract EIP712 {
    /* solhint-disable var-name-mixedcase */
    // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to
    // invalidate the cached domain separator if the chain id changes.
    bytes32 private immutable _CACHED_DOMAIN_SEPARATOR;
    uint256 private immutable _CACHED_CHAIN_ID;

    bytes32 private immutable _HASHED_NAME;
    bytes32 private immutable _HASHED_VERSION;
    bytes32 private immutable _TYPE_HASH;

    /* solhint-enable var-name-mixedcase */

    /**
     * @dev Initializes the domain separator and parameter caches.
     *
     * The meaning of `name` and `version` is specified in
     * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:
     *
     * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.
     * - `version`: the current major version of the signing domain.
     *
     * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart
     * contract upgrade].
     */
    constructor(string memory name, string memory version) {
        bytes32 hashedName = keccak256(bytes(name));
        bytes32 hashedVersion = keccak256(bytes(version));
        bytes32 typeHash = keccak256(
            "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"
        );
        _HASHED_NAME = hashedName;
        _HASHED_VERSION = hashedVersion;
        _CACHED_CHAIN_ID = block.chainid;
        _CACHED_DOMAIN_SEPARATOR = _buildDomainSeparator(typeHash, hashedName, hashedVersion);
        _TYPE_HASH = typeHash;
    }

    /**
     * @dev Returns the domain separator for the current chain.
     */
    function _domainSeparatorV4() internal view returns (bytes32) {
        if (block.chainid == _CACHED_CHAIN_ID) {
            return _CACHED_DOMAIN_SEPARATOR;
        } else {
            return _buildDomainSeparator(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION);
        }
    }

    function _buildDomainSeparator(
        bytes32 typeHash,
        bytes32 nameHash,
        bytes32 versionHash
    ) private view returns (bytes32) {
        return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));
    }

    /**
     * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this
     * function returns the hash of the fully encoded EIP712 message for this domain.
     *
     * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:
     *
     * ```solidity
     * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(
     *     keccak256("Mail(address to,string contents)"),
     *     mailTo,
     *     keccak256(bytes(mailContents))
     * )));
     * address signer = ECDSA.recover(digest, signature);
     * ```
     */
    function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {
        return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash);
    }
}

File 14 of 14 : Math.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

    /**
     * @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 / b + (a % b == 0 ? 0 : 1);
    }
}

Settings
{
  "remappings": [],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "evmVersion": "istanbul",
  "libraries": {},
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"name_","type":"string"},{"internalType":"address","name":"rewardToken_","type":"address"},{"internalType":"address","name":"depositToken_","type":"address"},{"internalType":"address","name":"signer_","type":"address"},{"internalType":"uint256","name":"initialUnlockPercentage_","type":"uint256"},{"internalType":"uint256","name":"vestingNumberMonth_","type":"uint256"},{"internalType":"uint256","name":"minAllocation_","type":"uint256"},{"internalType":"uint256","name":"maxAllocation_","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"bool","name":"isFiat","type":"bool"}],"name":"Deposite","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address[]","name":"senders","type":"address[]"},{"indexed":false,"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"Deposites","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Harvest","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"}],"name":"Message","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"}],"name":"SetTGE","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address[]","name":"users","type":"address[]"},{"indexed":false,"internalType":"uint256[]","name":"allocation","type":"uint256[]"}],"name":"SetWhitelist","type":"event"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_INITIAL_PERCENTAGE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_addrArr","type":"address[]"},{"internalType":"uint256[]","name":"_amountArr","type":"uint256[]"}],"name":"addDepositeAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"convertToCurrency","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"convertToToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"bool","name":"_fiat","type":"bool"},{"internalType":"uint256","name":"_nonce","type":"uint256"},{"internalType":"uint8","name":"_v","type":"uint8"},{"internalType":"bytes32","name":"_r","type":"bytes32"},{"internalType":"bytes32","name":"_s","type":"bytes32"}],"name":"deposite","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"deposited","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"}],"name":"getAvailAmountToDeposit","outputs":[{"internalType":"uint256","name":"minAvailAllocation","type":"uint256"},{"internalType":"uint256","name":"maxAvailAllocation","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"}],"name":"getBalanceInfo","outputs":[{"internalType":"uint256","name":"lockedBalance","type":"uint256"},{"internalType":"uint256","name":"unlockedBalance","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getInfo","outputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"address","name":"stakedToken","type":"address"},{"internalType":"address","name":"rewardTokem","type":"address"},{"internalType":"uint256","name":"minAllocation","type":"uint256"},{"internalType":"uint256","name":"maxAllocation","type":"uint256"},{"internalType":"uint256","name":"totalSupply","type":"uint256"},{"internalType":"uint256","name":"totalDeposited","type":"uint256"},{"internalType":"uint256","name":"tokenPrice","type":"uint256"},{"internalType":"uint256","name":"initialUnlockPercentage","type":"uint256"},{"internalType":"uint256","name":"countPeriodOfVesting","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"harvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenPrice_","type":"uint256"},{"internalType":"uint256","name":"totalSypply_","type":"uint256"}],"name":"initializeToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"isWithdrawFunds","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardTokenDecimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rewardsPaid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tge","type":"uint256"}],"name":"setTGE","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"signer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakedTokenDecimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startDate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawFunds","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6102606040527fa21a343e5ab1b6034a0e9953f2764f7a34917da3839ef8b52f8f2d9d685706af610120523480156200003757600080fd5b50604051620029ab380380620029ab8339810160408190526200005a91620005ad565b604080518082018252600781526656657374696e6760c81b6020808301918252835180850185526002815261763160f01b908201529151902060c08181527f0984d5efd47d99151ae1be065a709e56c602102f24c1abc4008eb3f815a8d21760e08190524660a081815286517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f818801819052818901969096526060810193909352608080840192909252308382015286518084039091018152919092019094528351939092019290922090526101005262000136336200049a565b600180556001600160a01b038716158015906200015b57506001600160a01b03861615155b620001ad5760405162461bcd60e51b815260206004820152601760248201527f496e636f727265637420746f6b656e206164647265737300000000000000000060448201526064015b60405180910390fd5b60008311620001f25760405162461bcd60e51b815260206004820152601060248201526f125b98dbdc9c9958dd08185b5bdd5b9d60821b6044820152606401620001a4565b8082111580156200020257508015155b620002505760405162461bcd60e51b815260206004820152601960248201527f496e636f727265637420616c6c6f636174696f6e2073697a65000000000000006044820152606401620001a4565b68056bc75e2d63100000841115620002ab5760405162461bcd60e51b815260206004820152601c60248201527f496e636f727265637420696e697469616c2070657263656e74616765000000006044820152606401620001a4565b6001600160a01b038516620003035760405162461bcd60e51b815260206004820152601860248201527f496e636f7272656374207369676e6572206164647265737300000000000000006044820152606401620001a4565b6101e08490526102408390526102008290526102208190526001600160601b0319606086901b16610140528751620003439060069060208b0190620004ea565b506001600160601b0319606088811b82166101a05287901b166101c0526040805163313ce56760e01b815290516001600160a01b0389169163313ce567916004808301926020929190829003018186803b158015620003a157600080fd5b505afa158015620003b6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620003dc9190620006e4565b60ff166101608160ff1660f81b81525050856001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b1580156200042757600080fd5b505afa1580156200043c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620004629190620006e4565b60f81b7fff00000000000000000000000000000000000000000000000000000000000000166101805250620007619650505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b828054620004f8906200070e565b90600052602060002090601f0160209004810192826200051c576000855562000567565b82601f106200053757805160ff191683800117855562000567565b8280016001018555821562000567579182015b82811115620005675782518255916020019190600101906200054a565b506200057592915062000579565b5090565b5b808211156200057557600081556001016200057a565b80516001600160a01b0381168114620005a857600080fd5b919050565b600080600080600080600080610100898b031215620005ca578384fd5b88516001600160401b0380821115620005e1578586fd5b818b0191508b601f830112620005f5578586fd5b8151818111156200060a576200060a6200074b565b604051601f8201601f19908116603f011681019083821181831017156200063557620006356200074b565b81604052828152602093508e8484870101111562000651578889fd5b8891505b8282101562000674578482018401518183018501529083019062000655565b828211156200068557888484830101525b9b50620006979150508b820162000590565b98505050620006a960408a0162000590565b9550620006b960608a0162000590565b94506080890151935060a0890151925060c0890151915060e089015190509295985092959890939650565b600060208284031215620006f6578081fd5b815160ff8116811462000707578182fd5b9392505050565b600181811c908216806200072357607f821691505b602082108114156200074557634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b60805160a05160c05160e05161010051610120516101405160601c6101605160f81c6101805160f81c6101a05160601c6101c05160601c6101e051610200516102205161024051612103620008a860003960008181610bfc015281816116df015261172201526000818161093b01528181610bb101528181611388015261140001526000818161098701528181610b9001526113cd015260008181610bdb015261168b0152600081816105e501528181610837015281816108c90152610b4e0152600081816107bc01528181610adb01528181610b6f01526110ce0152600081816102ed01526105aa0152600081816102a10152818161058601528181610fae015261110101526000818161018801526113140152600061128a015260006115b701526000611606015260006115e1015260006115650152600061158e01526121036000f3fe608060405234801561001057600080fd5b506004361061014d5760003560e01c80638da5cb5b116100c3578063cb13cddb1161007c578063cb13cddb1461030f578063d2f400bb1461032f578063d607b5c61461033f578063ef7e14e614610352578063f2fde38b14610365578063ff1a318d1461037857600080fd5b80638da5cb5b1461025b578063902c4a831461026c5780639a4de7ef1461027f5780639bdcecd11461029c578063a81f8f3f146102d5578063c65b7f0b146102e857600080fd5b80633644e515116101155780633644e515146101f257806339adac4d146101fa5780634641257d1461020d5780635a9b0b8914610215578063700a4a7414610233578063715018a61461025357600080fd5b80630b97bc861461015257806317816dc81461016e578063238ac9331461018357806324600fc3146101c25780632d865469146101ca575b600080fd5b61015b60025481565b6040519081526020015b60405180910390f35b61018161017c366004611ccd565b61038b565b005b6101aa7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610165565b610181610656565b6101dd6101d8366004611bfe565b6108f8565b60408051928352602083019190915201610165565b61015b6109b8565b6101dd610208366004611bfe565b6109c7565b610181610a4a565b61021d610b3a565b6040516101659a99989796959493929190611e23565b61015b610241366004611bfe565b60046020526000908152604090205481565b610181610cc7565b6000546001600160a01b03166101aa565b61018161027a366004611c18565b610cfd565b60035461028c9060ff1681565b6040519015158152602001610165565b6102c37f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff9091168152602001610165565b61015b6102e3366004611c9d565b610fa3565b6102c37f000000000000000000000000000000000000000000000000000000000000000081565b61015b61031d366004611bfe565b60056020526000908152604090205481565b61015b68056bc75e2d6310000081565b61018161034d366004611d2d565b610fee565b61015b610360366004611c9d565b6110fa565b610181610373366004611bfe565b611134565b610181610386366004611c9d565b6111cf565b600260015414156103e35760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b6002600155336000908152600a6020908152604080832087845290915290205460ff16156104475760405162461bcd60e51b81526020600482015260116024820152704e6f6e63652075736564206265666f726560781b60448201526064016103da565b61045633878787878787611284565b6104935760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21039b4b3b732b960911b60448201526064016103da565b61049b611357565b156104d95760405162461bcd60e51b815260206004820152600e60248201526d14d85b19481a5cc818db1bdcd95960921b60448201526064016103da565b6104e28661136e565b61051f5760405162461bcd60e51b815260206004820152600e60248201526d125b9d985b1a5908185b5bdd5b9d60921b60448201526064016103da565b336000818152600a602090815260408083208884528252808320805460ff1916600117905592825260059052908120805488929061055e908490611ebe565b9250508190555085600960008282546105779190611ebe565b9250508190555060006105d1877f000000000000000000000000000000000000000000000000000000000000000060ff167f000000000000000000000000000000000000000000000000000000000000000060ff16611441565b90508561060d5761060d6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163330846114a5565b60408051888152871515602082015233917fb35a892a5f96d245b0be4062561953a0bd6e54fe9944ec26d8d4579e5f1af414910160405180910390a25050600180555050505050565b600260015414156106a95760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016103da565b60026001556000546001600160a01b031633146106d85760405162461bcd60e51b81526004016103da90611e89565b60035460ff161561072b5760405162461bcd60e51b815260206004820181905260248201527f57697468647261772066756e6473207761732063616c6c6564206265666f726560448201526064016103da565b610733611357565b61077a5760405162461bcd60e51b815260206004820152601860248201527715995cdd1a5b99c818d85b89dd081899481cdd185c9d195960421b60448201526064016103da565b6003805460ff1916600117905560095460009061079690610fa3565b6007546107a39190612010565b604051630852cd8d60e31b8152600481018290529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342966c6890602401600060405180830381600087803b15801561080857600080fd5b505af115801561081c573d6000803e3d6000fd5b50506040516370a0823160e01b8152306004820152600092507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031691506370a082319060240160206040518083038186803b15801561088257600080fd5b505afa158015610896573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108ba9190611cb5565b90506108f06001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163383611516565b505060018055565b600080600060095461090b6007546110fa565b6109159190612010565b6001600160a01b0385166000908152600560205260409020549091506109659061095f907f0000000000000000000000000000000000000000000000000000000000000000612010565b8261154b565b6001600160a01b0385166000908152600560205260409020549092506109ad577f000000000000000000000000000000000000000000000000000000000000000092506109b2565b600092505b50915091565b60006109c2611561565b905090565b6001600160a01b038116600090815260056020526040812054819081906109ed90610fa3565b90506109f7611357565b610a05579360009350915050565b6000610a1085611654565b6001600160a01b038616600090815260046020526040902054909150610a368284612010565b610a409190612010565b9590945092505050565b610a52611357565b610a995760405162461bcd60e51b815260206004820152601860248201527715995cdd1a5b99c818d85b89dd081899481cdd185c9d195960421b60448201526064016103da565b6000610aa433611654565b33600090815260046020526040812080549293508392909190610ac8908490611ebe565b90915550610b0290506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163383611516565b60405181815233907fc9695243a805adb74c91f28311176c65b417e842d5699893cef56d18bfa48cba9060200160405180910390a250565b6060600080600080600080600080600060067f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000006007546009546008547f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000898054610c2790612053565b80601f0160208091040260200160405190810160405280929190818152602001828054610c5390612053565b8015610ca05780601f10610c7557610100808354040283529160200191610ca0565b820191906000526020600020905b815481529060010190602001808311610c8357829003601f168201915b50505050509950995099509950995099509950995099509950995090919293949596979899565b6000546001600160a01b03163314610cf15760405162461bcd60e51b81526004016103da90611e89565b610cfb600061177d565b565b6000546001600160a01b03163314610d275760405162461bcd60e51b81526004016103da90611e89565b828114610d6f5760405162461bcd60e51b8152602060048201526016602482015275092dcc6dee4e4cac6e840c2e4e4c2f240d8cadccee8d60531b60448201526064016103da565b610d77611357565b15610db55760405162461bcd60e51b815260206004820152600e60248201526d14d85b19481a5cc818db1bdcd95960921b60448201526064016103da565b6000610dc2600954610fa3565b600754610dcf9190612010565b905060005b84811015610f4a576000610e0d858584818110610e0157634e487b7160e01b600052603260045260246000fd5b90506020020135610fa3565b905082811115610e575760405162461bcd60e51b81526020600482015260156024820152742737ba1032b737bab3b41030b63637b1b0ba34b7b760591b60448201526064016103da565b610e618184612010565b9250848483818110610e8357634e487b7160e01b600052603260045260246000fd5b9050602002013560056000898986818110610eae57634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610ec39190611bfe565b6001600160a01b03166001600160a01b031681526020019081526020016000206000828254610ef29190611ebe565b909155508590508483818110610f1857634e487b7160e01b600052603260045260246000fd5b9050602002013560096000828254610f309190611ebe565b90915550829150610f4290508161208e565b915050610dd4565b508484604051610f5b929190611d7a565b60405180910390207fa2880b319f812c87799913057433c9bb10a295a431caa4fe58ec97ad5c39588e8484604051610f94929190611dd6565b60405180910390a25050505050565b600854600090610fd47f0000000000000000000000000000000000000000000000000000000000000000600a611f45565b610fde9084611ff1565b610fe89190611ed6565b92915050565b6000546001600160a01b031633146110185760405162461bcd60e51b81526004016103da90611e89565b600854156110685760405162461bcd60e51b815260206004820152601960248201527f49732077617320696e697469616c697a6564206265666f72650000000000000060448201526064016103da565b6000811180156110785750600082115b6110b75760405162461bcd60e51b815260206004820152601060248201526f125b98dbdc9c9958dd08185b5bdd5b9d60821b60448201526064016103da565b600882905560078190556110f66001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163330846114a5565b5050565b60006111277f0000000000000000000000000000000000000000000000000000000000000000600a611f45565b600854610fde9084611ff1565b6000546001600160a01b0316331461115e5760405162461bcd60e51b81526004016103da90611e89565b6001600160a01b0381166111c35760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016103da565b6111cc8161177d565b50565b6000546001600160a01b031633146111f95760405162461bcd60e51b81526004016103da90611e89565b60025415801561120857508015155b6112495760405162461bcd60e51b815260206004820152601260248201527154474520697320736574206f72207a65726f60701b60448201526064016103da565b60028190556040518181527f9ff6fdd7fb2b14a46b8be419cf5d0e2cca5df2d8baff946e6665e570123739559060200160405180910390a150565b604080517f000000000000000000000000000000000000000000000000000000000000000060208201526001600160a01b0389169181019190915260608101879052851515608082015260a08101859052600090819060c0016040516020818303038152906040528051906020012090506000611300826117cd565b905060006113108288888861181b565b90507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316816001600160a01b0316149350505050979650505050505050565b6000600254421180156109c2575050600254151590565b33600090815260056020526040812054816113c96113ac837f0000000000000000000000000000000000000000000000000000000000000000612010565b6009546113ba600754610fa3565b6113c49190612010565b61154b565b90507f0000000000000000000000000000000000000000000000000000000000000000841080156113f8575081155b8061142b57507f000000000000000000000000000000000000000000000000000000000000000084118061142b57508084115b611436576001611439565b60005b949350505050565b600081831015611471576114558383612010565b61146090600a611f39565b61146a9085611ff1565b935061149b565b8183111561149b576114838284612010565b61148e90600a611f39565b6114989085611ed6565b93505b50825b9392505050565b6040516001600160a01b03808516602483015283166044820152606481018290526115109085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526119bb565b50505050565b6040516001600160a01b03831660248201526044810182905261154690849063a9059cbb60e01b906064016114d9565b505050565b600081831061155a578161149e565b5090919050565b60007f00000000000000000000000000000000000000000000000000000000000000004614156115b057507f000000000000000000000000000000000000000000000000000000000000000090565b50604080517f00000000000000000000000000000000000000000000000000000000000000006020808301919091527f0000000000000000000000000000000000000000000000000000000000000000828401527f000000000000000000000000000000000000000000000000000000000000000060608301524660808301523060a0808401919091528351808403909101815260c0909201909252805191012090565b6001600160a01b038116600090815260056020526040812054819061167890610fa3565b9050600068056bc75e2d631000006116b07f000000000000000000000000000000000000000000000000000000000000000084611ff1565b6116ba9190611ed6565b9050600061170362278d00600254426116d39190612010565b6116dd9190611ed6565b7f000000000000000000000000000000000000000000000000000000000000000061154b565b6001600160a01b038616600090815260046020526040902054909150827f00000000000000000000000000000000000000000000000000000000000000008361174c8388612010565b6117569190611ff1565b6117609190611ed6565b61176a9190611ebe565b6117749190612010565b95945050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000610fe86117da611561565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b60007f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08211156118985760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016103da565b8360ff16601b14806118ad57508360ff16601c145b6119045760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016103da565b6040805160008082526020820180845288905260ff871692820192909252606081018590526080810184905260019060a0016020604051602081039080840390855afa158015611958573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166117745760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016103da565b6000611a10826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611a8d9092919063ffffffff16565b8051909150156115465780806020019051810190611a2e9190611c81565b6115465760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016103da565b6060611439848460008585843b611ae65760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016103da565b600080866001600160a01b03168587604051611b029190611dba565b60006040518083038185875af1925050503d8060008114611b3f576040519150601f19603f3d011682016040523d82523d6000602084013e611b44565b606091505b5091509150611b54828286611b5f565b979650505050505050565b60608315611b6e57508161149e565b825115611b7e5782518084602001fd5b8160405162461bcd60e51b81526004016103da9190611e10565b80356001600160a01b0381168114611baf57600080fd5b919050565b60008083601f840112611bc5578182fd5b50813567ffffffffffffffff811115611bdc578182fd5b6020830191508360208260051b8501011115611bf757600080fd5b9250929050565b600060208284031215611c0f578081fd5b61149e82611b98565b60008060008060408587031215611c2d578283fd5b843567ffffffffffffffff80821115611c44578485fd5b611c5088838901611bb4565b90965094506020870135915080821115611c68578384fd5b50611c7587828801611bb4565b95989497509550505050565b600060208284031215611c92578081fd5b815161149e816120bf565b600060208284031215611cae578081fd5b5035919050565b600060208284031215611cc6578081fd5b5051919050565b60008060008060008060c08789031215611ce5578182fd5b863595506020870135611cf7816120bf565b945060408701359350606087013560ff81168114611d13578283fd5b9598949750929560808101359460a0909101359350915050565b60008060408385031215611d3f578182fd5b50508035926020909101359150565b60008151808452611d66816020860160208601612027565b601f01601f19169290920160200192915050565b60008184825b85811015611daf576001600160a01b03611d9983611b98565b1683526020928301929190910190600101611d80565b509095945050505050565b60008251611dcc818460208701612027565b9190910192915050565b6020808252810182905260006001600160fb1b03831115611df5578081fd5b8260051b808560408501379190910160400190815292915050565b60208152600061149e6020830184611d4e565b6000610140808352611e378184018e611d4e565b6001600160a01b039c8d1660208501529a909b166040830152506060810197909752608087019590955260a086019390935260c085019190915260e08401526101008301526101209091015292915050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60008219821115611ed157611ed16120a9565b500190565b600082611ef157634e487b7160e01b81526012600452602481fd5b500490565b600181815b80851115611f31578160001904821115611f1757611f176120a9565b80851615611f2457918102915b93841c9390800290611efb565b509250929050565b600061149e8383611f50565b600061149e60ff8416835b600082611f5f57506001610fe8565b81611f6c57506000610fe8565b8160018114611f825760028114611f8c57611fa8565b6001915050610fe8565b60ff841115611f9d57611f9d6120a9565b50506001821b610fe8565b5060208310610133831016604e8410600b8410161715611fcb575081810a610fe8565b611fd58383611ef6565b8060001904821115611fe957611fe96120a9565b029392505050565b600081600019048311821515161561200b5761200b6120a9565b500290565b600082821015612022576120226120a9565b500390565b60005b8381101561204257818101518382015260200161202a565b838111156115105750506000910152565b600181811c9082168061206757607f821691505b6020821081141561208857634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156120a2576120a26120a9565b5060010190565b634e487b7160e01b600052601160045260246000fd5b80151581146111cc57600080fdfea26469706673582212207325fcf90b9088e63c44ffc3d285ffe98aeeafbdfb06b3cf668c393998e9bc8064736f6c63430008040033000000000000000000000000000000000000000000000000000000000000010000000000000000000000000058f9102bf53cf186682bd9a281d3cd3c616eec41000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7000000000000000000000000f7309682d9b72551720db3b15de12f08cccd7ef50000000000000000000000000000000000000000000000008ac7230489e80000000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000001b1ae4d6e2ef5000000000000000000000000000000000000000000000000000a2a15d09519be00000000000000000000000000000000000000000000000000000000000000000000652657461696c0000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061014d5760003560e01c80638da5cb5b116100c3578063cb13cddb1161007c578063cb13cddb1461030f578063d2f400bb1461032f578063d607b5c61461033f578063ef7e14e614610352578063f2fde38b14610365578063ff1a318d1461037857600080fd5b80638da5cb5b1461025b578063902c4a831461026c5780639a4de7ef1461027f5780639bdcecd11461029c578063a81f8f3f146102d5578063c65b7f0b146102e857600080fd5b80633644e515116101155780633644e515146101f257806339adac4d146101fa5780634641257d1461020d5780635a9b0b8914610215578063700a4a7414610233578063715018a61461025357600080fd5b80630b97bc861461015257806317816dc81461016e578063238ac9331461018357806324600fc3146101c25780632d865469146101ca575b600080fd5b61015b60025481565b6040519081526020015b60405180910390f35b61018161017c366004611ccd565b61038b565b005b6101aa7f000000000000000000000000f7309682d9b72551720db3b15de12f08cccd7ef581565b6040516001600160a01b039091168152602001610165565b610181610656565b6101dd6101d8366004611bfe565b6108f8565b60408051928352602083019190915201610165565b61015b6109b8565b6101dd610208366004611bfe565b6109c7565b610181610a4a565b61021d610b3a565b6040516101659a99989796959493929190611e23565b61015b610241366004611bfe565b60046020526000908152604090205481565b610181610cc7565b6000546001600160a01b03166101aa565b61018161027a366004611c18565b610cfd565b60035461028c9060ff1681565b6040519015158152602001610165565b6102c37f000000000000000000000000000000000000000000000000000000000000001281565b60405160ff9091168152602001610165565b61015b6102e3366004611c9d565b610fa3565b6102c37f000000000000000000000000000000000000000000000000000000000000000681565b61015b61031d366004611bfe565b60056020526000908152604090205481565b61015b68056bc75e2d6310000081565b61018161034d366004611d2d565b610fee565b61015b610360366004611c9d565b6110fa565b610181610373366004611bfe565b611134565b610181610386366004611c9d565b6111cf565b600260015414156103e35760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b6002600155336000908152600a6020908152604080832087845290915290205460ff16156104475760405162461bcd60e51b81526020600482015260116024820152704e6f6e63652075736564206265666f726560781b60448201526064016103da565b61045633878787878787611284565b6104935760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21039b4b3b732b960911b60448201526064016103da565b61049b611357565b156104d95760405162461bcd60e51b815260206004820152600e60248201526d14d85b19481a5cc818db1bdcd95960921b60448201526064016103da565b6104e28661136e565b61051f5760405162461bcd60e51b815260206004820152600e60248201526d125b9d985b1a5908185b5bdd5b9d60921b60448201526064016103da565b336000818152600a602090815260408083208884528252808320805460ff1916600117905592825260059052908120805488929061055e908490611ebe565b9250508190555085600960008282546105779190611ebe565b9250508190555060006105d1877f000000000000000000000000000000000000000000000000000000000000001260ff167f000000000000000000000000000000000000000000000000000000000000000660ff16611441565b90508561060d5761060d6001600160a01b037f000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7163330846114a5565b60408051888152871515602082015233917fb35a892a5f96d245b0be4062561953a0bd6e54fe9944ec26d8d4579e5f1af414910160405180910390a25050600180555050505050565b600260015414156106a95760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016103da565b60026001556000546001600160a01b031633146106d85760405162461bcd60e51b81526004016103da90611e89565b60035460ff161561072b5760405162461bcd60e51b815260206004820181905260248201527f57697468647261772066756e6473207761732063616c6c6564206265666f726560448201526064016103da565b610733611357565b61077a5760405162461bcd60e51b815260206004820152601860248201527715995cdd1a5b99c818d85b89dd081899481cdd185c9d195960421b60448201526064016103da565b6003805460ff1916600117905560095460009061079690610fa3565b6007546107a39190612010565b604051630852cd8d60e31b8152600481018290529091507f00000000000000000000000058f9102bf53cf186682bd9a281d3cd3c616eec416001600160a01b0316906342966c6890602401600060405180830381600087803b15801561080857600080fd5b505af115801561081c573d6000803e3d6000fd5b50506040516370a0823160e01b8152306004820152600092507f000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec76001600160a01b031691506370a082319060240160206040518083038186803b15801561088257600080fd5b505afa158015610896573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108ba9190611cb5565b90506108f06001600160a01b037f000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7163383611516565b505060018055565b600080600060095461090b6007546110fa565b6109159190612010565b6001600160a01b0385166000908152600560205260409020549091506109659061095f907f0000000000000000000000000000000000000000000000a2a15d09519be00000612010565b8261154b565b6001600160a01b0385166000908152600560205260409020549092506109ad577f00000000000000000000000000000000000000000000001b1ae4d6e2ef50000092506109b2565b600092505b50915091565b60006109c2611561565b905090565b6001600160a01b038116600090815260056020526040812054819081906109ed90610fa3565b90506109f7611357565b610a05579360009350915050565b6000610a1085611654565b6001600160a01b038616600090815260046020526040902054909150610a368284612010565b610a409190612010565b9590945092505050565b610a52611357565b610a995760405162461bcd60e51b815260206004820152601860248201527715995cdd1a5b99c818d85b89dd081899481cdd185c9d195960421b60448201526064016103da565b6000610aa433611654565b33600090815260046020526040812080549293508392909190610ac8908490611ebe565b90915550610b0290506001600160a01b037f00000000000000000000000058f9102bf53cf186682bd9a281d3cd3c616eec41163383611516565b60405181815233907fc9695243a805adb74c91f28311176c65b417e842d5699893cef56d18bfa48cba9060200160405180910390a250565b6060600080600080600080600080600060067f000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec77f00000000000000000000000058f9102bf53cf186682bd9a281d3cd3c616eec417f00000000000000000000000000000000000000000000001b1ae4d6e2ef5000007f0000000000000000000000000000000000000000000000a2a15d09519be000006007546009546008547f0000000000000000000000000000000000000000000000008ac7230489e800007f0000000000000000000000000000000000000000000000000000000000000005898054610c2790612053565b80601f0160208091040260200160405190810160405280929190818152602001828054610c5390612053565b8015610ca05780601f10610c7557610100808354040283529160200191610ca0565b820191906000526020600020905b815481529060010190602001808311610c8357829003601f168201915b50505050509950995099509950995099509950995099509950995090919293949596979899565b6000546001600160a01b03163314610cf15760405162461bcd60e51b81526004016103da90611e89565b610cfb600061177d565b565b6000546001600160a01b03163314610d275760405162461bcd60e51b81526004016103da90611e89565b828114610d6f5760405162461bcd60e51b8152602060048201526016602482015275092dcc6dee4e4cac6e840c2e4e4c2f240d8cadccee8d60531b60448201526064016103da565b610d77611357565b15610db55760405162461bcd60e51b815260206004820152600e60248201526d14d85b19481a5cc818db1bdcd95960921b60448201526064016103da565b6000610dc2600954610fa3565b600754610dcf9190612010565b905060005b84811015610f4a576000610e0d858584818110610e0157634e487b7160e01b600052603260045260246000fd5b90506020020135610fa3565b905082811115610e575760405162461bcd60e51b81526020600482015260156024820152742737ba1032b737bab3b41030b63637b1b0ba34b7b760591b60448201526064016103da565b610e618184612010565b9250848483818110610e8357634e487b7160e01b600052603260045260246000fd5b9050602002013560056000898986818110610eae57634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610ec39190611bfe565b6001600160a01b03166001600160a01b031681526020019081526020016000206000828254610ef29190611ebe565b909155508590508483818110610f1857634e487b7160e01b600052603260045260246000fd5b9050602002013560096000828254610f309190611ebe565b90915550829150610f4290508161208e565b915050610dd4565b508484604051610f5b929190611d7a565b60405180910390207fa2880b319f812c87799913057433c9bb10a295a431caa4fe58ec97ad5c39588e8484604051610f94929190611dd6565b60405180910390a25050505050565b600854600090610fd47f0000000000000000000000000000000000000000000000000000000000000012600a611f45565b610fde9084611ff1565b610fe89190611ed6565b92915050565b6000546001600160a01b031633146110185760405162461bcd60e51b81526004016103da90611e89565b600854156110685760405162461bcd60e51b815260206004820152601960248201527f49732077617320696e697469616c697a6564206265666f72650000000000000060448201526064016103da565b6000811180156110785750600082115b6110b75760405162461bcd60e51b815260206004820152601060248201526f125b98dbdc9c9958dd08185b5bdd5b9d60821b60448201526064016103da565b600882905560078190556110f66001600160a01b037f00000000000000000000000058f9102bf53cf186682bd9a281d3cd3c616eec41163330846114a5565b5050565b60006111277f0000000000000000000000000000000000000000000000000000000000000012600a611f45565b600854610fde9084611ff1565b6000546001600160a01b0316331461115e5760405162461bcd60e51b81526004016103da90611e89565b6001600160a01b0381166111c35760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016103da565b6111cc8161177d565b50565b6000546001600160a01b031633146111f95760405162461bcd60e51b81526004016103da90611e89565b60025415801561120857508015155b6112495760405162461bcd60e51b815260206004820152601260248201527154474520697320736574206f72207a65726f60701b60448201526064016103da565b60028190556040518181527f9ff6fdd7fb2b14a46b8be419cf5d0e2cca5df2d8baff946e6665e570123739559060200160405180910390a150565b604080517fa21a343e5ab1b6034a0e9953f2764f7a34917da3839ef8b52f8f2d9d685706af60208201526001600160a01b0389169181019190915260608101879052851515608082015260a08101859052600090819060c0016040516020818303038152906040528051906020012090506000611300826117cd565b905060006113108288888861181b565b90507f000000000000000000000000f7309682d9b72551720db3b15de12f08cccd7ef56001600160a01b0316816001600160a01b0316149350505050979650505050505050565b6000600254421180156109c2575050600254151590565b33600090815260056020526040812054816113c96113ac837f0000000000000000000000000000000000000000000000a2a15d09519be00000612010565b6009546113ba600754610fa3565b6113c49190612010565b61154b565b90507f00000000000000000000000000000000000000000000001b1ae4d6e2ef500000841080156113f8575081155b8061142b57507f0000000000000000000000000000000000000000000000a2a15d09519be0000084118061142b57508084115b611436576001611439565b60005b949350505050565b600081831015611471576114558383612010565b61146090600a611f39565b61146a9085611ff1565b935061149b565b8183111561149b576114838284612010565b61148e90600a611f39565b6114989085611ed6565b93505b50825b9392505050565b6040516001600160a01b03808516602483015283166044820152606481018290526115109085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526119bb565b50505050565b6040516001600160a01b03831660248201526044810182905261154690849063a9059cbb60e01b906064016114d9565b505050565b600081831061155a578161149e565b5090919050565b60007f00000000000000000000000000000000000000000000000000000000000000014614156115b057507fa62d317aa624f6e3ff36618dbef4ca05bb365088a579692d003df1efe7ac31ea90565b50604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6020808301919091527f65c170912acaa83cc6148d370ad48473f19402b5a21fa6e6e476c42026f6c834828401527f0984d5efd47d99151ae1be065a709e56c602102f24c1abc4008eb3f815a8d21760608301524660808301523060a0808401919091528351808403909101815260c0909201909252805191012090565b6001600160a01b038116600090815260056020526040812054819061167890610fa3565b9050600068056bc75e2d631000006116b07f0000000000000000000000000000000000000000000000008ac7230489e8000084611ff1565b6116ba9190611ed6565b9050600061170362278d00600254426116d39190612010565b6116dd9190611ed6565b7f000000000000000000000000000000000000000000000000000000000000000561154b565b6001600160a01b038616600090815260046020526040902054909150827f00000000000000000000000000000000000000000000000000000000000000058361174c8388612010565b6117569190611ff1565b6117609190611ed6565b61176a9190611ebe565b6117749190612010565b95945050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000610fe86117da611561565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b60007f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08211156118985760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016103da565b8360ff16601b14806118ad57508360ff16601c145b6119045760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016103da565b6040805160008082526020820180845288905260ff871692820192909252606081018590526080810184905260019060a0016020604051602081039080840390855afa158015611958573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166117745760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016103da565b6000611a10826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611a8d9092919063ffffffff16565b8051909150156115465780806020019051810190611a2e9190611c81565b6115465760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016103da565b6060611439848460008585843b611ae65760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016103da565b600080866001600160a01b03168587604051611b029190611dba565b60006040518083038185875af1925050503d8060008114611b3f576040519150601f19603f3d011682016040523d82523d6000602084013e611b44565b606091505b5091509150611b54828286611b5f565b979650505050505050565b60608315611b6e57508161149e565b825115611b7e5782518084602001fd5b8160405162461bcd60e51b81526004016103da9190611e10565b80356001600160a01b0381168114611baf57600080fd5b919050565b60008083601f840112611bc5578182fd5b50813567ffffffffffffffff811115611bdc578182fd5b6020830191508360208260051b8501011115611bf757600080fd5b9250929050565b600060208284031215611c0f578081fd5b61149e82611b98565b60008060008060408587031215611c2d578283fd5b843567ffffffffffffffff80821115611c44578485fd5b611c5088838901611bb4565b90965094506020870135915080821115611c68578384fd5b50611c7587828801611bb4565b95989497509550505050565b600060208284031215611c92578081fd5b815161149e816120bf565b600060208284031215611cae578081fd5b5035919050565b600060208284031215611cc6578081fd5b5051919050565b60008060008060008060c08789031215611ce5578182fd5b863595506020870135611cf7816120bf565b945060408701359350606087013560ff81168114611d13578283fd5b9598949750929560808101359460a0909101359350915050565b60008060408385031215611d3f578182fd5b50508035926020909101359150565b60008151808452611d66816020860160208601612027565b601f01601f19169290920160200192915050565b60008184825b85811015611daf576001600160a01b03611d9983611b98565b1683526020928301929190910190600101611d80565b509095945050505050565b60008251611dcc818460208701612027565b9190910192915050565b6020808252810182905260006001600160fb1b03831115611df5578081fd5b8260051b808560408501379190910160400190815292915050565b60208152600061149e6020830184611d4e565b6000610140808352611e378184018e611d4e565b6001600160a01b039c8d1660208501529a909b166040830152506060810197909752608087019590955260a086019390935260c085019190915260e08401526101008301526101209091015292915050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60008219821115611ed157611ed16120a9565b500190565b600082611ef157634e487b7160e01b81526012600452602481fd5b500490565b600181815b80851115611f31578160001904821115611f1757611f176120a9565b80851615611f2457918102915b93841c9390800290611efb565b509250929050565b600061149e8383611f50565b600061149e60ff8416835b600082611f5f57506001610fe8565b81611f6c57506000610fe8565b8160018114611f825760028114611f8c57611fa8565b6001915050610fe8565b60ff841115611f9d57611f9d6120a9565b50506001821b610fe8565b5060208310610133831016604e8410600b8410161715611fcb575081810a610fe8565b611fd58383611ef6565b8060001904821115611fe957611fe96120a9565b029392505050565b600081600019048311821515161561200b5761200b6120a9565b500290565b600082821015612022576120226120a9565b500390565b60005b8381101561204257818101518382015260200161202a565b838111156115105750506000910152565b600181811c9082168061206757607f821691505b6020821081141561208857634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156120a2576120a26120a9565b5060010190565b634e487b7160e01b600052601160045260246000fd5b80151581146111cc57600080fdfea26469706673582212207325fcf90b9088e63c44ffc3d285ffe98aeeafbdfb06b3cf668c393998e9bc8064736f6c63430008040033

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

000000000000000000000000000000000000000000000000000000000000010000000000000000000000000058f9102bf53cf186682bd9a281d3cd3c616eec41000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7000000000000000000000000f7309682d9b72551720db3b15de12f08cccd7ef50000000000000000000000000000000000000000000000008ac7230489e80000000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000001b1ae4d6e2ef5000000000000000000000000000000000000000000000000000a2a15d09519be00000000000000000000000000000000000000000000000000000000000000000000652657461696c0000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : name_ (string): Retail
Arg [1] : rewardToken_ (address): 0x58f9102bF53Cf186682Bd9a281d3Cd3c616eEc41
Arg [2] : depositToken_ (address): 0xdAC17F958D2ee523a2206206994597C13D831ec7
Arg [3] : signer_ (address): 0xf7309682d9B72551720db3b15DE12F08CCCD7Ef5
Arg [4] : initialUnlockPercentage_ (uint256): 10000000000000000000
Arg [5] : vestingNumberMonth_ (uint256): 5
Arg [6] : minAllocation_ (uint256): 500000000000000000000
Arg [7] : maxAllocation_ (uint256): 3000000000000000000000

-----Encoded View---------------
10 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [1] : 00000000000000000000000058f9102bf53cf186682bd9a281d3cd3c616eec41
Arg [2] : 000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7
Arg [3] : 000000000000000000000000f7309682d9b72551720db3b15de12f08cccd7ef5
Arg [4] : 0000000000000000000000000000000000000000000000008ac7230489e80000
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [6] : 00000000000000000000000000000000000000000000001b1ae4d6e2ef500000
Arg [7] : 0000000000000000000000000000000000000000000000a2a15d09519be00000
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000006
Arg [9] : 52657461696c0000000000000000000000000000000000000000000000000000


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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

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