ETH Price: $2,979.39 (-1.11%)
Gas: 5 Gwei

Contract

0x497e0Ba03974FE10bAd997995077944507C3B3bD
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
Claim201773972024-06-26 17:36:5911 days ago1719423419IN
0x497e0Ba0...507C3B3bD
0 ETH0.0020707714.97400471
Claim201597852024-06-24 6:34:3514 days ago1719210875IN
0x497e0Ba0...507C3B3bD
0 ETH0.00038342.77242472
Claim201583742024-06-24 1:49:5914 days ago1719193799IN
0x497e0Ba0...507C3B3bD
0 ETH0.00032762.36891874
Claim201570252024-06-23 21:18:4714 days ago1719177527IN
0x497e0Ba0...507C3B3bD
0 ETH0.000461413.33654189
Claim201569732024-06-23 21:08:2314 days ago1719176903IN
0x497e0Ba0...507C3B3bD
0 ETH0.000472553.41712623
Claim201553522024-06-23 15:41:5914 days ago1719157319IN
0x497e0Ba0...507C3B3bD
0 ETH0.000562324.06620956
Withdraw Request...201525052024-06-23 6:06:5915 days ago1719122819IN
0x497e0Ba0...507C3B3bD
0 ETH0.000246112.67740365
Claim201499192024-06-22 21:27:1115 days ago1719091631IN
0x497e0Ba0...507C3B3bD
0 ETH0.00029362.4226942
Claim201498082024-06-22 21:04:4715 days ago1719090287IN
0x497e0Ba0...507C3B3bD
0 ETH0.000270661.9571944
Claim201485322024-06-22 16:47:5915 days ago1719074879IN
0x497e0Ba0...507C3B3bD
0 ETH0.000662434.79018581
Request Refund201473612024-06-22 12:51:3515 days ago1719060695IN
0x497e0Ba0...507C3B3bD
0 ETH0.000332654.36883191
Request Refund201471862024-06-22 12:16:3515 days ago1719058595IN
0x497e0Ba0...507C3B3bD
0 ETH0.00024173.17440736
Request Refund201463512024-06-22 9:28:1115 days ago1719048491IN
0x497e0Ba0...507C3B3bD
0 ETH0.000207012.71871041
Request Refund201423182024-06-21 19:55:2316 days ago1718999723IN
0x497e0Ba0...507C3B3bD
0 ETH0.000309224.06116585
Request Refund201420962024-06-21 19:10:5916 days ago1718997059IN
0x497e0Ba0...507C3B3bD
0 ETH0.00057567.5595907
Claim201413542024-06-21 16:40:5916 days ago1718988059IN
0x497e0Ba0...507C3B3bD
0 ETH0.000632125.21596344
Request Refund201403672024-06-21 13:22:2316 days ago1718976143IN
0x497e0Ba0...507C3B3bD
0 ETH0.00053186.98422943
Request Refund201394192024-06-21 10:12:2316 days ago1718964743IN
0x497e0Ba0...507C3B3bD
0 ETH0.000394435.18013294
Request Refund201393452024-06-21 9:57:3516 days ago1718963855IN
0x497e0Ba0...507C3B3bD
0 ETH0.000484616.3645282
Request Refund201392462024-06-21 9:37:4716 days ago1718962667IN
0x497e0Ba0...507C3B3bD
0 ETH0.000695859.13884046
Request Refund201359362024-06-20 22:32:1117 days ago1718922731IN
0x497e0Ba0...507C3B3bD
0 ETH0.000306554.02600409
Pull Back Reques...201348972024-06-20 19:02:5917 days ago1718910179IN
0x497e0Ba0...507C3B3bD
0 ETH0.000354817.24315733
Request Refund201336602024-06-20 14:53:2317 days ago1718895203IN
0x497e0Ba0...507C3B3bD
0 ETH0.0003761112.18101381
Request Refund201336572024-06-20 14:52:4717 days ago1718895167IN
0x497e0Ba0...507C3B3bD
0 ETH0.0009332812.25703649
Request Refund201323282024-06-20 10:25:2317 days ago1718879123IN
0x497e0Ba0...507C3B3bD
0 ETH0.000480636.31232097
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:
VestingIDORefund

Compiler Version
v0.8.11+commit.d7f03943

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 10 : VestingIDORefund.sol
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.10;

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

struct CreateVestingInput {
    address user;
    uint128 amount;
}

/**
 * @param rate percentage vested from total amount during the phase in BPS
 * @param endAt Time when phase ends
 * @param minimumClaimablePeriod for linear vesting it would be "1 seconds", for weekly westing it would be "1 weeks", if not set(set to zero) user will be able to claim only after phase ends
 */
struct Phase {
    uint256 rate;
    uint256 endAt;
    uint256 minimumClaimablePeriod;
}

/**
 * @title VestingIDO
 * @dev no user can claim while contract is in locked state
 */
contract VestingIDORefund is Ownable, ReentrancyGuard {
    using SafeERC20 for IERC20;

    error VestingIsNotUnlocked();
    error NoZeroAddress(string param);
    error CannotReinitializeAfterFirstClaim();
    error NothingToClaimCurrentlyPleaseTryAgainLater();
    error DepositedAmountIsInsufficientPleaseDepositMore();
    error WrongInputParameters();
    error AlreadyUnlocked();
    error OnlyOneVestingPerAddress();
    error MustNotBeZero(string param);
    error NoActiveVesting();
    error EmptyInputArray();

    /**
     * @param amount Total amount allocated for user
     * @param amountClaimed Total amount claimed by user so far
     * @param lastClaimAt Timestamp from user last claim
     */
    struct UserVesting {
        bool init;
        bool requestedRefund;
        uint256 amount;
        uint256 amountClaimed;
        uint256 lastClaimAt;
    }

    uint256 public totalAmountAllocated; // Amount owner allocated for all users
    uint256 public totalAmountClaimed; // Amount claimed by all users
    uint256 public totalAmountRefundRequested; // Amount reserved for refund, requested by users

    uint256 public constant RATE_CONVERTER = 10000;

    IERC20 public vestedToken;

    string public name;
    bool public refundMode; 
    bool public requestedRefundWithdrawn;
    bool public refundWithdrawn;
    uint256 public startDateAt;
    uint256 public vestingEndAt;
    uint256 public claimableAtStart; // in BPS
    uint32  public refundGracePeriodDuration; // in seconds
    bool public airdroptedAtStart;
    Phase[] public phases;
    
    // it is hard to add user and then remove it if cancle requestRefund. SO here wew ill store all users
    // that requestedRefund. Later we will check flag in UserVesting
    address[] public refundRequestedUsersAtLeastOnce;

    mapping(address => UserVesting) public vestings;

    event NewVestingCreated(address indexed user, uint256 amount);

    event NewClaim(address indexed user, uint256 amountClaimed);

    event RefundRequested(address indexed user);

    event RefundRequestedPulledBack(address indexed user);

    event RefundRequestedWithdrawn(address indexed user, uint256 amount);

    event RefundForAllWithdrawn(address indexed user, uint256 amount);

    constructor(
        IERC20 _vestedToken,
        string memory _name,
        uint256 _startDateAt,
        uint256 _claimableAtStart,
        bool _airdroptedAtStart,
        Phase[] memory _phases,
        uint32 _refundGracePeriodDuration
    ) {
        _initialize(
            _vestedToken,
            _name,
            _startDateAt,
            _claimableAtStart,
            _airdroptedAtStart,
            _phases,
            _refundGracePeriodDuration
        );
    }

    function reinitialize(
        IERC20 _vestedToken,
        string memory _name,
        uint256 _startDateAt,
        uint256 _claimableAtStart,
        Phase[] calldata _phases,
        uint32 _refundGracePeriodDuration
    ) external onlyOwner {
        if (totalAmountClaimed != 0) {
            revert CannotReinitializeAfterFirstClaim();
        }

        _initialize(
            _vestedToken,
            _name,
            _startDateAt,
            _claimableAtStart,
            false,
            _phases,
            _refundGracePeriodDuration
        );
    }

    function _initialize(
        IERC20 _vestedToken,
        string memory _name,
        uint256 _startDateAt,
        uint256 _claimableAtStart,
        bool _airdroptedAtStart,
        Phase[] memory _phases,
        uint32 _refundGracePeriodDuration
    ) private {
        uint256 prevStartDate = _startDateAt;
        uint256 total = _claimableAtStart;
        for (uint256 i = 0; i < _phases.length; i++) {
            Phase memory phase = _phases[i];
            if (prevStartDate > phase.endAt) {
                // phases should be ordered ascending by end date and should not overlap
                revert WrongInputParameters();
            }

            total += phase.rate;

            prevStartDate = phase.endAt;
        }

        require(total == RATE_CONVERTER, "total == 10000");

        if (address(_vestedToken) == address(0)) {
            revert NoZeroAddress("_vestedToken");
        }

        name = _name;
        vestedToken = _vestedToken;
        startDateAt = _startDateAt;
        // set vesting end date to last phase end date, if there is not phases then set end date to start date(e.g. for 100% claim at TGE)
        vestingEndAt = _phases.length > 0
            ? _phases[_phases.length - 1].endAt
            : _startDateAt;
        claimableAtStart = _claimableAtStart;
        airdroptedAtStart = _airdroptedAtStart;
        // clear the phases array in case of reinitialization
        delete phases;
        for (uint256 i = 0; i < _phases.length; i++) {
            phases.push(_phases[i]);
        }

        refundGracePeriodDuration = _refundGracePeriodDuration;
    }

    function getNumberOfRefundRequestedUsersAtLeastOnce() public view returns (uint256) {
        return refundRequestedUsersAtLeastOnce.length;
    }

    function getRefundRequestedUsersAtLeastOnceVesting(uint256 index) public view returns (UserVesting memory userVesting) {
        address user = refundRequestedUsersAtLeastOnce[index];

        userVesting = vestings[user];
    }

    /**
     * @notice Move vesting to another address in case user lose access to his original account
     */
    function moveVesting(address from, address to) external onlyOwner {
        UserVesting memory vesting = vestings[from];
        if (vesting.amount - vesting.amountClaimed == 0) {
            revert NoActiveVesting();
        }
        if (vestings[to].amount > 0) {
            revert OnlyOneVestingPerAddress();
        }
        if (to == address(0)) {
            revert NoZeroAddress("to");
        }

        vestings[to] = vesting;
        delete vestings[from];
    }

    /**
     * @notice create vesting for user, only one vesting per user address
     * @dev owner needs to first deploy enough tokens to vesting contract address
     */
    function createVestings(
        CreateVestingInput[] calldata vestingsInput,
        bool depositCheck
    ) external onlyOwner {
        if (vestingsInput.length == 0) {
            revert EmptyInputArray();
        }
        uint256 totalDepositedAmount = getDepositedAmount();
        uint256 amountAllocated;

        for (uint64 i = 0; i < vestingsInput.length; i++) {
            amountAllocated += vestingsInput[i].amount;
        }

        if (airdroptedAtStart) {
            totalAmountClaimed +=
                (amountAllocated * claimableAtStart) /
                RATE_CONVERTER;
        }

        if (depositCheck) {
            // check if depositor have enough credit
            if (
                (totalDepositedAmount +
                    totalAmountClaimed -
                    totalAmountAllocated) < amountAllocated
            ) {
                revert DepositedAmountIsInsufficientPleaseDepositMore();
            }
        }

        for (uint64 i = 0; i < vestingsInput.length; i++) {
            _createVesting(vestingsInput[i]);
        }
    }

    /**
     * @dev can be called any amount of time after vesting contract is unlocked, tokens are vested each block after cliffEnd
     */
    function claim() external nonReentrant {
        require(!refundMode, "vesting is refunded");

        UserVesting storage vesting = vestings[msg.sender];
        require(!vesting.requestedRefund, "user req refund");
        if (vesting.amount - vesting.amountClaimed == 0) {
            revert NoActiveVesting();
        }

        uint256 claimableAmount = _claimable(vesting);

        if (claimableAmount == 0) {
            revert NothingToClaimCurrentlyPleaseTryAgainLater();
        }

        totalAmountClaimed += claimableAmount;
        vesting.amountClaimed += claimableAmount;
        vesting.lastClaimAt = block.timestamp;

        assert(vesting.amountClaimed <= vesting.amount);
        assert(totalAmountClaimed <= totalAmountAllocated);

        vestedToken.safeTransfer(msg.sender, claimableAmount);
        emit NewClaim(msg.sender, claimableAmount);
    }

    // return amount user can claim from locked tokens at the moment
    function claimable(address _user) external view returns (uint256 amount) {
        return _claimable(vestings[_user]);
    }

    function getDepositedAmount() public view returns (uint256 amount) {
        return vestedToken.balanceOf(address(this));
    }

        /**
     * @dev method which is used for user to request refund
     */
    function requestRefund() external nonReentrant {
        address user = _msgSender();
        UserVesting storage vesting = vestings[user];

        require(vesting.init, "user is not participating");
        require(vesting.amountClaimed == 0, "user already claimed");
        require(!vesting.requestedRefund, "already requested");
        require(block.timestamp <= (startDateAt + refundGracePeriodDuration), "refund period passed");

        vesting.requestedRefund = true;
        totalAmountRefundRequested += vesting.amount;
        totalAmountAllocated -= vesting.amount;
        refundRequestedUsersAtLeastOnce.push(user);
        
        emit RefundRequested(user);
    }

    /**
     * @dev method which is used for user to request refund
     */
    function pullBackRequestRefund() external nonReentrant {
        address user = _msgSender();
        UserVesting storage vesting = vestings[user];

        require(vesting.init, "user is not participating");
        require(vesting.amountClaimed == 0, "user already claimed");
        require(vesting.requestedRefund, "nothin to pull back");
        require(block.timestamp <= (startDateAt + refundGracePeriodDuration), "refund period passed");
        
        vesting.requestedRefund = false;
        totalAmountRefundRequested -= vesting.amount;
        totalAmountAllocated += vesting.amount;

        emit RefundRequestedPulledBack(user);
    }

    // create a vesting for an user
    function _createVesting(CreateVestingInput memory v) private {
        if (v.user == address(0)) {
            revert NoZeroAddress("user");
        }
        if (v.amount == 0) {
            revert MustNotBeZero("amount");
        }
        if (vestings[v.user].amount > 0) {
            revert OnlyOneVestingPerAddress();
        }

        totalAmountAllocated += v.amount;

        vestings[v.user] = UserVesting({
            init: true, 
            requestedRefund: false,
            amount: v.amount,
            amountClaimed: airdroptedAtStart
                ? (v.amount * claimableAtStart) / RATE_CONVERTER
                : 0,
            lastClaimAt: airdroptedAtStart ? startDateAt : 0
        });

        emit NewVestingCreated(v.user, v.amount);
    }

    function _claimable(UserVesting memory v)
        private
        view
        returns (uint256 amount)
    {
        if (block.timestamp < startDateAt) {
            // vesting has not started
            return 0;
        }

        uint256 amountLeft = v.amount - v.amountClaimed;
        // user already claimed everything
        if (amountLeft == 0) return 0;

        if (block.timestamp >= vestingEndAt) {
            // if vesting ended return everything left
            amount = amountLeft;
        } else {
            if (v.lastClaimAt == 0) {
                // if this is first claim also calculate amount available at start
                amount += (claimableAtStart * v.amount) / RATE_CONVERTER;
            }
            uint256 prevEndDate = startDateAt;
            for (uint256 i = 0; i < phases.length; i++) {
                Phase memory phase = phases[i];
                uint256 phaseLength = phase.endAt - prevEndDate;

                // if last claim time is larger than the end of phase then skip it, already calculated in previous claim
                if (v.lastClaimAt < phase.endAt) {
                    if (
                        block.timestamp >= phase.endAt &&
                        phase.minimumClaimablePeriod == 0
                    ) {
                        // if phase completely passed then calculate amount with every second in phase
                        amount += (v.amount * phase.rate) / RATE_CONVERTER;
                    } else if (phase.minimumClaimablePeriod != 0) {
                        uint256 start = Math.max(v.lastClaimAt, prevEndDate);
                        uint256 end = Math.min(block.timestamp, phase.endAt);
                        // only take full increments of minimumClaimablePeriod in calculation of amount
                        uint256 timePassed = end -
                            start -
                            ((end - start) % phase.minimumClaimablePeriod);

                        amount +=
                            (v.amount * phase.rate * timePassed) /
                            (phaseLength * RATE_CONVERTER);
                    }

                    if (block.timestamp < phase.endAt) {
                        // if current time is less than end of this phase then there is no need to calculate remaining phases
                        break;
                    }
                }
                prevEndDate = phase.endAt;
            }
        }

        amount = Math.min(amount, amountLeft);

        return Math.min(amount, getDepositedAmount());
    }

    /**
     * @dev Returns time until next vesting batch will be unlocked for vesting contract provided in arguments
     */
    function nextBatchAt() external view returns (uint256) {
        if (block.timestamp >= vestingEndAt) {
            return vestingEndAt;
        }

        // we assume all vesting contracts release at least some funds on start date/TGE
        if (block.timestamp < startDateAt) {
            return startDateAt;
        }

        uint256 nextBatchIn;
        uint256 prevEndDate = startDateAt;
        // iterate over phases until we find current phase contract does not returns phases length
        for (uint256 i = 0; block.timestamp > prevEndDate; i++) {
            Phase memory phase = phases[i];
            if (block.timestamp < phase.endAt) {
                // vesting per sec/block
                if (phase.minimumClaimablePeriod == 1) {
                    nextBatchIn = 1;
                } else if (phase.minimumClaimablePeriod == 0) {
                    // vested at the end of the phase
                    nextBatchIn = phase.endAt;
                } else {
                    // if the funds are released in batches in current phase every `minimumClaimablePeriod` time,
                    nextBatchIn =
                        block.timestamp +
                        phase.minimumClaimablePeriod -
                        ((block.timestamp - prevEndDate) %
                            phase.minimumClaimablePeriod);
                }
                break;
            }
            prevEndDate = phase.endAt;
        }

        return nextBatchIn;
    }

        /**
     * @dev withdraw toknes which requested refund. These tokens will be returned to the project and user will be enabled refund on fundraiseChain
     */
    function withdrawRequestRefundToken() external onlyOwner {
        require(!requestedRefundWithdrawn, "already withdrawn");
        require(block.timestamp > startDateAt + refundGracePeriodDuration, "refund period active");
        uint256 vestedbalance = vestedToken.balanceOf(address(this));
        require(vestedbalance >= totalAmountRefundRequested, "not enough tokens");

        requestedRefundWithdrawn = true;
        vestedToken.safeTransfer(msg.sender, totalAmountRefundRequested);

        emit RefundRequestedWithdrawn(msg.sender, totalAmountRefundRequested);
    }

    /**
     * @dev withdraw refund tokens. These tokens will be returned to project and user will be enabled refund on fundraiseChain
     */
    function withdrawRefundForAll() external onlyOwner {
        require(!refundWithdrawn, "already withdrawn");
        require(refundMode, "refund mode is off");

        refundWithdrawn = true;
        vestedToken.safeTransfer(msg.sender, vestedToken.balanceOf(address(this)));

        emit RefundForAllWithdrawn(msg.sender, totalAmountRefundRequested);
    }

    // @notice rescue any token accidentally sent to this contract
    function emergencyWithdrawToken(IERC20 token) external onlyOwner {
        token.safeTransfer(msg.sender, token.balanceOf(address(this)));
    }
}

File 2 of 10 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol)

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

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

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

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

    /**
     * @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 3 of 10 : ERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/ERC20.sol)

pragma solidity ^0.8.0;

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

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

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

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * 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:
     *
     * - `to` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address to, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _transfer(owner, to, amount);
        return true;
    }

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

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

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

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

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

        _beforeTokenTransfer(from, to, amount);

        uint256 fromBalance = _balances[from];
        require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[from] = fromBalance - amount;
        }
        _balances[to] += amount;

        emit Transfer(from, to, amount);

        _afterTokenTransfer(from, to, amount);
    }

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

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

        _totalSupply += amount;
        _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 Spend `amount` form the allowance of `owner` toward `spender`.
     *
     * Does not update the allowance amount in case of infinite allowance.
     * Revert if not enough allowance is available.
     *
     * Might emit an {Approval} event.
     */
    function _spendAllowance(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        uint256 currentAllowance = allowance(owner, spender);
        if (currentAllowance != type(uint256).max) {
            require(currentAllowance >= amount, "ERC20: insufficient allowance");
            unchecked {
                _approve(owner, spender, currentAllowance - amount);
            }
        }
    }

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

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

File 4 of 10 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)

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 5 of 10 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

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

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

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

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

    /**
     * @dev 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 {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

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

File 6 of 10 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/math/Math.sol)

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.
        return (a & b) + (a ^ b) / 2;
    }

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

File 7 of 10 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // 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 8 of 10 : IERC20Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://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);
    }

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IERC20","name":"_vestedToken","type":"address"},{"internalType":"string","name":"_name","type":"string"},{"internalType":"uint256","name":"_startDateAt","type":"uint256"},{"internalType":"uint256","name":"_claimableAtStart","type":"uint256"},{"internalType":"bool","name":"_airdroptedAtStart","type":"bool"},{"components":[{"internalType":"uint256","name":"rate","type":"uint256"},{"internalType":"uint256","name":"endAt","type":"uint256"},{"internalType":"uint256","name":"minimumClaimablePeriod","type":"uint256"}],"internalType":"struct Phase[]","name":"_phases","type":"tuple[]"},{"internalType":"uint32","name":"_refundGracePeriodDuration","type":"uint32"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AlreadyUnlocked","type":"error"},{"inputs":[],"name":"CannotReinitializeAfterFirstClaim","type":"error"},{"inputs":[],"name":"DepositedAmountIsInsufficientPleaseDepositMore","type":"error"},{"inputs":[],"name":"EmptyInputArray","type":"error"},{"inputs":[{"internalType":"string","name":"param","type":"string"}],"name":"MustNotBeZero","type":"error"},{"inputs":[],"name":"NoActiveVesting","type":"error"},{"inputs":[{"internalType":"string","name":"param","type":"string"}],"name":"NoZeroAddress","type":"error"},{"inputs":[],"name":"NothingToClaimCurrentlyPleaseTryAgainLater","type":"error"},{"inputs":[],"name":"OnlyOneVestingPerAddress","type":"error"},{"inputs":[],"name":"VestingIsNotUnlocked","type":"error"},{"inputs":[],"name":"WrongInputParameters","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountClaimed","type":"uint256"}],"name":"NewClaim","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"NewVestingCreated","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":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RefundForAllWithdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"}],"name":"RefundRequested","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"}],"name":"RefundRequestedPulledBack","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RefundRequestedWithdrawn","type":"event"},{"inputs":[],"name":"RATE_CONVERTER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"airdroptedAtStart","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"claimable","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimableAtStart","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint128","name":"amount","type":"uint128"}],"internalType":"struct CreateVestingInput[]","name":"vestingsInput","type":"tuple[]"},{"internalType":"bool","name":"depositCheck","type":"bool"}],"name":"createVestings","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"}],"name":"emergencyWithdrawToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getDepositedAmount","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getNumberOfRefundRequestedUsersAtLeastOnce","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRefundRequestedUsersAtLeastOnceVesting","outputs":[{"components":[{"internalType":"bool","name":"init","type":"bool"},{"internalType":"bool","name":"requestedRefund","type":"bool"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"amountClaimed","type":"uint256"},{"internalType":"uint256","name":"lastClaimAt","type":"uint256"}],"internalType":"struct VestingIDORefund.UserVesting","name":"userVesting","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"}],"name":"moveVesting","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextBatchAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"phases","outputs":[{"internalType":"uint256","name":"rate","type":"uint256"},{"internalType":"uint256","name":"endAt","type":"uint256"},{"internalType":"uint256","name":"minimumClaimablePeriod","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pullBackRequestRefund","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"refundGracePeriodDuration","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"refundMode","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"refundRequestedUsersAtLeastOnce","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"refundWithdrawn","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_vestedToken","type":"address"},{"internalType":"string","name":"_name","type":"string"},{"internalType":"uint256","name":"_startDateAt","type":"uint256"},{"internalType":"uint256","name":"_claimableAtStart","type":"uint256"},{"components":[{"internalType":"uint256","name":"rate","type":"uint256"},{"internalType":"uint256","name":"endAt","type":"uint256"},{"internalType":"uint256","name":"minimumClaimablePeriod","type":"uint256"}],"internalType":"struct Phase[]","name":"_phases","type":"tuple[]"},{"internalType":"uint32","name":"_refundGracePeriodDuration","type":"uint32"}],"name":"reinitialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"requestRefund","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"requestedRefundWithdrawn","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startDateAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalAmountAllocated","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalAmountClaimed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalAmountRefundRequested","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":"vestedToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vestingEndAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"vestings","outputs":[{"internalType":"bool","name":"init","type":"bool"},{"internalType":"bool","name":"requestedRefund","type":"bool"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"amountClaimed","type":"uint256"},{"internalType":"uint256","name":"lastClaimAt","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawRefundForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawRequestRefundToken","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b50604051620030063803806200300683398101604081905262000034916200054f565b6200003f3362000061565b600180556200005487878787878787620000b1565b505050505050506200074c565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b848460005b845181101562000134576000858281518110620000d757620000d762000690565b6020026020010151905080602001518411156200010757604051636fb9362f60e01b815260040160405180910390fd5b8051620001159084620006bc565b60209091015193509150806200012b81620006d7565b915050620000b6565b5061271081146200017d5760405162461bcd60e51b815260206004820152600e60248201526d0746f74616c203d3d2031303030360941b60448201526064015b60405180910390fd5b6001600160a01b038916620001c55760405163030cc15560e51b815260206004820152600c60248201526b2fbb32b9ba32b22a37b5b2b760a11b604482015260640162000174565b8751620001da9060069060208b019062000307565b50600580546001600160a01b0319166001600160a01b038b16179055600887905583516200020957866200023a565b83600185516200021a9190620006f5565b815181106200022d576200022d62000690565b6020026020010151602001515b600955600a869055600b805460ff60201b19166401000000008715150217905562000268600c600062000396565b60005b8451811015620002e157600c8582815181106200028c576200028c62000690565b6020908102919091018101518254600181810185556000948552938390208251600390920201908155918101519282019290925560409091015160029091015580620002d881620006d7565b9150506200026b565b5050600b805463ffffffff191663ffffffff939093169290921790915550505050505050565b82805462000315906200070f565b90600052602060002090601f01602090048101928262000339576000855562000384565b82601f106200035457805160ff191683800117855562000384565b8280016001018555821562000384579182015b828111156200038457825182559160200191906001019062000367565b5062000392929150620003bc565b5090565b5080546000825560030290600052602060002090810190620003b99190620003d3565b50565b5b80821115620003925760008155600101620003bd565b5b8082111562000392576000808255600182018190556002820155600301620003d4565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b0381118282101715620004325762000432620003f7565b60405290565b604051601f8201601f191681016001600160401b0381118282101715620004635762000463620003f7565b604052919050565b805180151581146200047c57600080fd5b919050565b600082601f8301126200049357600080fd5b815160206001600160401b03821115620004b157620004b1620003f7565b620004c1818360051b0162000438565b82815260609283028501820192828201919087851115620004e157600080fd5b8387015b858110156200052d5781818a031215620004ff5760008081fd5b620005096200040d565b815181528582015186820152604080830151908201528452928401928101620004e5565b5090979650505050505050565b805163ffffffff811681146200047c57600080fd5b600080600080600080600060e0888a0312156200056b57600080fd5b87516001600160a01b03811681146200058357600080fd5b602089810151919850906001600160401b0380821115620005a357600080fd5b818b0191508b601f830112620005b857600080fd5b815181811115620005cd57620005cd620003f7565b620005e1601f8201601f1916850162000438565b8181528d85838601011115620005f657600080fd5b60005b8281101562000616578481018601518282018701528501620005f9565b82811115620006285760008684840101525b50809a50505060408b0151975060608b015196506200064a60808c016200046b565b955060a08b01519250808311156200066157600080fd5b5050620006718a828b0162000481565b9250506200068260c089016200053a565b905092959891949750929550565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60008219821115620006d257620006d2620006a6565b500190565b6000600019821415620006ee57620006ee620006a6565b5060010190565b6000828210156200070a576200070a620006a6565b500390565b600181811c908216806200072457607f821691505b602082108114156200074657634e487b7160e01b600052602260045260246000fd5b50919050565b6128aa806200075c6000396000f3fe608060405234801561001057600080fd5b50600436106102065760003560e01c8063715018a61161011a578063d29af10d116100ad578063dc82d0f71161007c578063dc82d0f71461049b578063e44a05af146104ae578063e8aba58e146104c1578063f2fde38b146104ce578063f843664a146104e157600080fd5b8063d29af10d14610419578063d5cef13314610421578063d5ffd19214610429578063daf498631461043157600080fd5b8063a7637c9a116100e9578063a7637c9a146103db578063a7d52cc9146103e3578063afe7bf37146103eb578063bfa5e13c1461041057600080fd5b8063715018a6146103b05780638a4113d7146103b85780638da5cb5b146103c1578063918f24d4146103d257600080fd5b8063322ba9f31161019d578063549c1a351161016c578063549c1a351461035c5780635de2974114610365578063684e79dd146103785780637036f6221461038a57806370c4b1f11461039d57600080fd5b8063322ba9f314610330578063402914f5146103385780634355c32c1461034b5780634e71d92d1461035457600080fd5b806323aaa7fe116101d957806323aaa7fe146102675780632a6e5aac1461027e5780632b24014c146102d75780632e37eef61461030257600080fd5b80630683a0da1461020b57806306fdde0314610235578063182f2ae81461024a5780631af0320314610254575b600080fd5b600b5461022090640100000000900460ff1681565b60405190151581526020015b60405180910390f35b61023d6104ea565b60405161022c9190612294565b610252610578565b005b6102526102623660046122dc565b610773565b61027061271081565b60405190815260200161022c565b61029161028c3660046122f9565b61081f565b60405161022c9190600060a08201905082511515825260208301511515602083015260408301516040830152606083015160608301526080830151608083015292915050565b6102ea6102e53660046122f9565b6108d8565b6040516001600160a01b03909116815260200161022c565b6103156103103660046122f9565b610902565b6040805193845260208401929092529082015260600161022c565b610270610935565b6102706103463660046122dc565b6109a7565b61027060045481565b610252610a13565b61027060025481565b6005546102ea906001600160a01b031681565b60075461022090610100900460ff1681565b6102526103983660046123be565b610c34565b6102526103ab3660046124b2565b610cea565b610252610e9b565b61027060085481565b6000546001600160a01b03166102ea565b61027060095481565b610252610ed1565b600d54610270565b600b546103fb9063ffffffff1681565b60405163ffffffff909116815260200161022c565b61027060035481565b61027061105f565b61025261116a565b6102526113a0565b61047161043f3660046122dc565b600e60205260009081526040902080546001820154600283015460039093015460ff8084169461010090940416929085565b6040805195151586529315156020860152928401919091526060830152608082015260a00161022c565b6007546102209062010000900460ff1681565b6102526104bc3660046124f9565b61158e565b6007546102209060ff1681565b6102526104dc3660046122dc565b611743565b610270600a5481565b600680546104f79061257f565b80601f01602080910402602001604051908101604052809291908181526020018280546105239061257f565b80156105705780601f1061054557610100808354040283529160200191610570565b820191906000526020600020905b81548152906001019060200180831161055357829003601f168201915b505050505081565b600260015414156105a45760405162461bcd60e51b815260040161059b906125ba565b60405180910390fd5b6002600155336000818152600e60205260409020805460ff166106055760405162461bcd60e51b815260206004820152601960248201527875736572206973206e6f742070617274696369706174696e6760381b604482015260640161059b565b60028101541561064e5760405162461bcd60e51b81526020600482015260146024820152731d5cd95c88185b1c9958591e4818db185a5b595960621b604482015260640161059b565b8054610100900460ff1661069a5760405162461bcd60e51b81526020600482015260136024820152726e6f7468696e20746f2070756c6c206261636b60681b604482015260640161059b565b600b546008546106b09163ffffffff1690612607565b4211156106f65760405162461bcd60e51b81526020600482015260146024820152731c99599d5b99081c195c9a5bd9081c185cdcd95960621b604482015260640161059b565b805461ff001916815560018101546004805460009061071690849061261f565b9091555050600181015460028054600090610732908490612607565b90915550506040516001600160a01b038316907f417be750e991ea3d9fe3542a9c620e0f2d10e00a47f6957b2925b5bde3bd619390600090a2505060018055565b6000546001600160a01b0316331461079d5760405162461bcd60e51b815260040161059b90612636565b6040516370a0823160e01b815230600482015261081c9033906001600160a01b038416906370a0823190602401602060405180830381865afa1580156107e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061080b919061266b565b6001600160a01b03841691906117db565b50565b6108556040518060a001604052806000151581526020016000151581526020016000815260200160008152602001600081525090565b6000600d838154811061086a5761086a612684565b60009182526020808320909101546001600160a01b03168252600e8152604091829020825160a081018452815460ff80821615158352610100909104161515928101929092526001810154928201929092526002820154606082015260039091015460808201529392505050565b600d81815481106108e857600080fd5b6000918252602090912001546001600160a01b0316905081565b600c818154811061091257600080fd5b600091825260209091206003909102018054600182015460029092015490925083565b6005546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa15801561097e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109a2919061266b565b905090565b6001600160a01b0381166000908152600e60209081526040808320815160a081018352815460ff808216151583526101009091041615159381019390935260018101549183019190915260028101546060830152600301546080820152610a0d90611832565b92915050565b60026001541415610a365760405162461bcd60e51b815260040161059b906125ba565b600260015560075460ff1615610a845760405162461bcd60e51b81526020600482015260136024820152721d995cdd1a5b99c81a5cc81c99599d5b991959606a1b604482015260640161059b565b336000908152600e602052604090208054610100900460ff1615610adc5760405162461bcd60e51b815260206004820152600f60248201526e1d5cd95c881c995c481c99599d5b99608a1b604482015260640161059b565b80600201548160010154610af0919061261f565b610b0d57604051634186725760e11b815260040160405180910390fd5b6040805160a081018252825460ff8082161515835261010090910416151560208201526001830154918101919091526002820154606082015260038201546080820152600090610b5c90611832565b905080610b7c576040516347f9e41d60e01b815260040160405180910390fd5b8060036000828254610b8e9190612607565b9250508190555080826002016000828254610ba99190612607565b9091555050426003830155600182015460028301541115610bcc57610bcc61269a565b6002546003541115610be057610be061269a565b600554610bf7906001600160a01b031633836117db565b60405181815233907f081144d27d70f1f67f67a65289dde411e1a9511c916d13ee3ff9bf22f169cd9a9060200160405180910390a2505060018055565b6000546001600160a01b03163314610c5e5760405162461bcd60e51b815260040161059b90612636565b60035415610c7f576040516339a23cf160e01b815260040160405180910390fd5b610ce18787878760008888808060200260200160405190810160405280939291908181526020016000905b82821015610cd657610cc7606083028601368190038101906126b0565b81526020019060010190610caa565b505050505087611a6a565b50505050505050565b6000546001600160a01b03163314610d145760405162461bcd60e51b815260040161059b90612636565b6001600160a01b0382166000908152600e6020908152604091829020825160a081018452815460ff8082161515835261010090910416151592810192909252600181015492820183905260028101546060830181905260039091015460808301529091610d81919061261f565b610d9e57604051634186725760e11b815260040160405180910390fd5b6001600160a01b0382166000908152600e602052604090206001015415610dd8576040516382c06f2f60e01b815260040160405180910390fd5b6001600160a01b038216610e145760405163030cc15560e51b8152602060048201526002602482015261746f60f01b604482015260640161059b565b6001600160a01b039182166000908152600e60209081526040808320845181549386015115156101000261ff00199115159190911661ffff1994851617178155818501516001808301919091556060860151600280840191909155608090960151600392830155969095168352822080549091168155938401819055908301819055910155565b6000546001600160a01b03163314610ec55760405162461bcd60e51b815260040161059b90612636565b610ecf6000611c9d565b565b6000546001600160a01b03163314610efb5760405162461bcd60e51b815260040161059b90612636565b60075462010000900460ff1615610f485760405162461bcd60e51b815260206004820152601160248201527030b63932b0b23c903bb4ba34323930bbb760791b604482015260640161059b565b60075460ff16610f8f5760405162461bcd60e51b81526020600482015260126024820152713932b33ab7321036b7b2329034b99037b33360711b604482015260640161059b565b6007805462ff00001916620100001790556005546040516370a0823160e01b81523060048201526110259133916001600160a01b03909116906370a0823190602401602060405180830381865afa158015610fee573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611012919061266b565b6005546001600160a01b031691906117db565b60045460405190815233907f64934b8ce5d50616ab8d2e7fd8bfb458cf1ce270d4ce1e62bb8a05057f10df1c9060200160405180910390a2565b60006009544210611071575060095490565b600854421015611082575060085490565b600854600090815b81421115611162576000600c82815481106110a7576110a7612684565b60009182526020918290206040805160608101825260039093029091018054835260018101549383018490526002015490820152915042101561114a578060400151600114156110fa5760019350611144565b604081015161110f5780602001519350611144565b604081015161111e844261261f565b6111289190612722565b60408201516111379042612607565b611141919061261f565b93505b50611162565b6020015191508061115a81612736565b91505061108a565b509092915050565b6002600154141561118d5760405162461bcd60e51b815260040161059b906125ba565b6002600155336000818152600e60205260409020805460ff166111ee5760405162461bcd60e51b815260206004820152601960248201527875736572206973206e6f742070617274696369706174696e6760381b604482015260640161059b565b6002810154156112375760405162461bcd60e51b81526020600482015260146024820152731d5cd95c88185b1c9958591e4818db185a5b595960621b604482015260640161059b565b8054610100900460ff16156112825760405162461bcd60e51b8152602060048201526011602482015270185b1c9958591e481c995c5d595cdd1959607a1b604482015260640161059b565b600b546008546112989163ffffffff1690612607565b4211156112de5760405162461bcd60e51b81526020600482015260146024820152731c99599d5b99081c195c9a5bd9081c185cdcd95960621b604482015260640161059b565b805461ff001916610100178155600181015460048054600090611302908490612607565b909155505060018101546002805460009061131e90849061261f565b9091555050600d805460018101825560009182527fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb50180546001600160a01b0319166001600160a01b03851690811790915560405190917f7fcea13fa52052e10e2a2ae5f7edf34eb7a59dd5778244bca78f8f0c6866bfbe91a2505060018055565b6000546001600160a01b031633146113ca5760405162461bcd60e51b815260040161059b90612636565b600754610100900460ff16156114165760405162461bcd60e51b815260206004820152601160248201527030b63932b0b23c903bb4ba34323930bbb760791b604482015260640161059b565b600b5460085461142c9163ffffffff1690612607565b42116114715760405162461bcd60e51b8152602060048201526014602482015273726566756e6420706572696f642061637469766560601b604482015260640161059b565b6005546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa1580156114ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114de919061266b565b90506004548110156115265760405162461bcd60e51b81526020600482015260116024820152706e6f7420656e6f75676820746f6b656e7360781b604482015260640161059b565b6007805461ff001916610100179055600454600554611552916001600160a01b039091169033906117db565b60045460405190815233907f88c24254769936ac40e24c2fdd2c5a2dbc823efeb5bf25211513e7e6cbb06ef4906020015b60405180910390a250565b6000546001600160a01b031633146115b85760405162461bcd60e51b815260040161059b90612636565b816115d65760405163af70781d60e01b815260040160405180910390fd5b60006115e0610935565b90506000805b67ffffffffffffffff81168511156116535785858267ffffffffffffffff1681811061161457611614612684565b905060400201602001602081019061162c9190612768565b61163f906001600160801b031683612607565b91508061164b81612783565b9150506115e6565b50600b54640100000000900460ff161561169957612710600a548261167891906127ab565b61168291906127ca565b600360008282546116939190612607565b90915550505b82156116da5780600254600354846116b19190612607565b6116bb919061261f565b10156116da5760405163409a7ab960e11b815260040160405180910390fd5b60005b67ffffffffffffffff811685111561173b5761172986868367ffffffffffffffff1681811061170e5761170e612684565b90506040020180360381019061172491906127de565b611ced565b8061173381612783565b9150506116dd565b505050505050565b6000546001600160a01b0316331461176d5760405162461bcd60e51b815260040161059b90612636565b6001600160a01b0381166117d25760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161059b565b61081c81611c9d565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261182d908490611f0f565b505050565b600060085442101561184657506000919050565b60008260600151836040015161185c919061261f565b90508061186c5750600092915050565b600954421061187d57809150611a46565b60808301516118b2576127108360400151600a5461189b91906127ab565b6118a591906127ca565b6118af9083612607565b91505b60085460005b600c54811015611a43576000600c82815481106118d7576118d7612684565b60009182526020808320604080516060810182526003909402909101805484526001810154928401839052600201549083015290925061191890859061261f565b9050816020015187608001511015611a2a578160200151421015801561194057506040820151155b15611974578151604088015161271091611959916127ab565b61196391906127ca565b61196d9087612607565b9550611a17565b604082015115611a1757600061198e886080015186611fe1565b905060006119a0428560200151611ff8565b90506000846040015183836119b5919061261f565b6119bf9190612722565b6119c9848461261f565b6119d3919061261f565b90506119e1612710856127ab565b855160408c015183916119f3916127ab565b6119fd91906127ab565b611a0791906127ca565b611a11908a612607565b98505050505b8160200151421015611a2a575050611a43565b5060200151915080611a3b81612736565b9150506118b8565b50505b611a508282611ff8565b9150611a6382611a5e610935565b611ff8565b9392505050565b848460005b8451811015611ae3576000858281518110611a8c57611a8c612684565b602002602001015190508060200151841115611abb57604051636fb9362f60e01b815260040160405180910390fd5b8051611ac79084612607565b6020909101519350915080611adb81612736565b915050611a6f565b506127108114611b265760405162461bcd60e51b815260206004820152600e60248201526d0746f74616c203d3d2031303030360941b604482015260640161059b565b6001600160a01b038916611b6c5760405163030cc15560e51b815260206004820152600c60248201526b2fbb32b9ba32b22a37b5b2b760a11b604482015260640161059b565b8751611b7f9060069060208b0190612188565b50600580546001600160a01b0319166001600160a01b038b1617905560088790558351611bac5786611bd8565b8360018551611bbb919061261f565b81518110611bcb57611bcb612684565b6020026020010151602001515b600955600a869055600b805464ff00000000191664010000000087151502179055611c05600c600061220c565b60005b8451811015611c7757600c858281518110611c2557611c25612684565b6020908102919091018101518254600181810185556000948552938390208251600390920201908155918101519282019290925560409091015160029091015580611c6f81612736565b915050611c08565b5050600b805463ffffffff191663ffffffff939093169290921790915550505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b0316611d2e5760405163030cc15560e51b815260040161059b906020808252600490820152633ab9b2b960e11b604082015260600190565b60208101516001600160801b0316611d7257604051633930c7a960e21b8152602060048201526006602482015265185b5bdd5b9d60d21b604482015260640161059b565b80516001600160a01b03166000908152600e602052604090206001015415611dad576040516382c06f2f60e01b815260040160405180910390fd5b80602001516001600160801b031660026000828254611dcc9190612607565b90915550506040805160a0810182526001815260006020808301919091528301516001600160801b031691810191909152600b546060820190640100000000900460ff16611e1b576000611e43565b612710600a5484602001516001600160801b0316611e3991906127ab565b611e4391906127ca565b8152602001600b60049054906101000a900460ff16611e63576000611e67565b6008545b905281516001600160a01b039081166000908152600e6020908152604091829020845181548684015115156101000261ff00199215159290921661ffff19909116171781558483015160018201556060850151600282015560809094015160039094019390935583518385015191516001600160801b039092168252909116917f1ad52506d5b39a5f36ce7518f02978bb44db2961e116f2a2d8d134cd3f43e9579101611583565b6000611f64826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166120079092919063ffffffff16565b80519091501561182d5780806020019051810190611f82919061283b565b61182d5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161059b565b600081831015611ff15781611a63565b5090919050565b6000818310611ff15781611a63565b6060612016848460008561201e565b949350505050565b60608247101561207f5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161059b565b6001600160a01b0385163b6120d65760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161059b565b600080866001600160a01b031685876040516120f29190612858565b60006040518083038185875af1925050503d806000811461212f576040519150601f19603f3d011682016040523d82523d6000602084013e612134565b606091505b509150915061214482828661214f565b979650505050505050565b6060831561215e575081611a63565b82511561216e5782518084602001fd5b8160405162461bcd60e51b815260040161059b9190612294565b8280546121949061257f565b90600052602060002090601f0160209004810192826121b657600085556121fc565b82601f106121cf57805160ff19168380011785556121fc565b828001600101855582156121fc579182015b828111156121fc5782518255916020019190600101906121e1565b5061220892915061222d565b5090565b508054600082556003029060005260206000209081019061081c9190612242565b5b80821115612208576000815560010161222e565b5b80821115612208576000808255600182018190556002820155600301612243565b60005b8381101561227f578181015183820152602001612267565b8381111561228e576000848401525b50505050565b60208152600082518060208401526122b3816040850160208701612264565b601f01601f19169190910160400192915050565b6001600160a01b038116811461081c57600080fd5b6000602082840312156122ee57600080fd5b8135611a63816122c7565b60006020828403121561230b57600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561235157612351612312565b604052919050565b60008083601f84011261236b57600080fd5b50813567ffffffffffffffff81111561238357600080fd5b60208301915083602060608302850101111561239e57600080fd5b9250929050565b803563ffffffff811681146123b957600080fd5b919050565b600080600080600080600060c0888a0312156123d957600080fd5b87356123e4816122c7565b965060208881013567ffffffffffffffff8082111561240257600080fd5b818b0191508b601f83011261241657600080fd5b81358181111561242857612428612312565b61243a601f8201601f19168501612328565b8181528d8583860101111561244e57600080fd5b818585018683013760009181019094015291975060408a0135965060608a0135955060808a0135918083111561248357600080fd5b50506124918a828b01612359565b90945092506124a4905060a089016123a5565b905092959891949750929550565b600080604083850312156124c557600080fd5b82356124d0816122c7565b915060208301356124e0816122c7565b809150509250929050565b801515811461081c57600080fd5b60008060006040848603121561250e57600080fd5b833567ffffffffffffffff8082111561252657600080fd5b818601915086601f83011261253a57600080fd5b81358181111561254957600080fd5b8760208260061b850101111561255e57600080fd5b60209283019550935050840135612574816124eb565b809150509250925092565b600181811c9082168061259357607f821691505b602082108114156125b457634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b634e487b7160e01b600052601160045260246000fd5b6000821982111561261a5761261a6125f1565b500190565b600082821015612631576126316125f1565b500390565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60006020828403121561267d57600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052600160045260246000fd5b6000606082840312156126c257600080fd5b6040516060810181811067ffffffffffffffff821117156126e5576126e5612312565b80604052508235815260208301356020820152604083013560408201528091505092915050565b634e487b7160e01b600052601260045260246000fd5b6000826127315761273161270c565b500690565b600060001982141561274a5761274a6125f1565b5060010190565b80356001600160801b03811681146123b957600080fd5b60006020828403121561277a57600080fd5b611a6382612751565b600067ffffffffffffffff808316818114156127a1576127a16125f1565b6001019392505050565b60008160001904831182151516156127c5576127c56125f1565b500290565b6000826127d9576127d961270c565b500490565b6000604082840312156127f057600080fd5b6040516040810181811067ffffffffffffffff8211171561281357612813612312565b6040528235612821816122c7565b815261282f60208401612751565b60208201529392505050565b60006020828403121561284d57600080fd5b8151611a63816124eb565b6000825161286a818460208701612264565b919091019291505056fea26469706673582212202870fc3cd71d68cf899d2b809d1d9cd9492ccebd58a86039dc23b2ea198494d664736f6c634300080b0033000000000000000000000000b2a25f7d864636e44bc1bf7a316897652bf0746300000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000667044e400000000000000000000000000000000000000000000000000000000000003e800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000006978000000000000000000000000000000000000000000000000000000000000000197061726167656e2d56657374696e6749444f2d4c4547494f4e0000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006697d1e40000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000232800000000000000000000000000000000000000000000000000000000678a65e40000000000000000000000000000000000000000000000000000000000000001

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106102065760003560e01c8063715018a61161011a578063d29af10d116100ad578063dc82d0f71161007c578063dc82d0f71461049b578063e44a05af146104ae578063e8aba58e146104c1578063f2fde38b146104ce578063f843664a146104e157600080fd5b8063d29af10d14610419578063d5cef13314610421578063d5ffd19214610429578063daf498631461043157600080fd5b8063a7637c9a116100e9578063a7637c9a146103db578063a7d52cc9146103e3578063afe7bf37146103eb578063bfa5e13c1461041057600080fd5b8063715018a6146103b05780638a4113d7146103b85780638da5cb5b146103c1578063918f24d4146103d257600080fd5b8063322ba9f31161019d578063549c1a351161016c578063549c1a351461035c5780635de2974114610365578063684e79dd146103785780637036f6221461038a57806370c4b1f11461039d57600080fd5b8063322ba9f314610330578063402914f5146103385780634355c32c1461034b5780634e71d92d1461035457600080fd5b806323aaa7fe116101d957806323aaa7fe146102675780632a6e5aac1461027e5780632b24014c146102d75780632e37eef61461030257600080fd5b80630683a0da1461020b57806306fdde0314610235578063182f2ae81461024a5780631af0320314610254575b600080fd5b600b5461022090640100000000900460ff1681565b60405190151581526020015b60405180910390f35b61023d6104ea565b60405161022c9190612294565b610252610578565b005b6102526102623660046122dc565b610773565b61027061271081565b60405190815260200161022c565b61029161028c3660046122f9565b61081f565b60405161022c9190600060a08201905082511515825260208301511515602083015260408301516040830152606083015160608301526080830151608083015292915050565b6102ea6102e53660046122f9565b6108d8565b6040516001600160a01b03909116815260200161022c565b6103156103103660046122f9565b610902565b6040805193845260208401929092529082015260600161022c565b610270610935565b6102706103463660046122dc565b6109a7565b61027060045481565b610252610a13565b61027060025481565b6005546102ea906001600160a01b031681565b60075461022090610100900460ff1681565b6102526103983660046123be565b610c34565b6102526103ab3660046124b2565b610cea565b610252610e9b565b61027060085481565b6000546001600160a01b03166102ea565b61027060095481565b610252610ed1565b600d54610270565b600b546103fb9063ffffffff1681565b60405163ffffffff909116815260200161022c565b61027060035481565b61027061105f565b61025261116a565b6102526113a0565b61047161043f3660046122dc565b600e60205260009081526040902080546001820154600283015460039093015460ff8084169461010090940416929085565b6040805195151586529315156020860152928401919091526060830152608082015260a00161022c565b6007546102209062010000900460ff1681565b6102526104bc3660046124f9565b61158e565b6007546102209060ff1681565b6102526104dc3660046122dc565b611743565b610270600a5481565b600680546104f79061257f565b80601f01602080910402602001604051908101604052809291908181526020018280546105239061257f565b80156105705780601f1061054557610100808354040283529160200191610570565b820191906000526020600020905b81548152906001019060200180831161055357829003601f168201915b505050505081565b600260015414156105a45760405162461bcd60e51b815260040161059b906125ba565b60405180910390fd5b6002600155336000818152600e60205260409020805460ff166106055760405162461bcd60e51b815260206004820152601960248201527875736572206973206e6f742070617274696369706174696e6760381b604482015260640161059b565b60028101541561064e5760405162461bcd60e51b81526020600482015260146024820152731d5cd95c88185b1c9958591e4818db185a5b595960621b604482015260640161059b565b8054610100900460ff1661069a5760405162461bcd60e51b81526020600482015260136024820152726e6f7468696e20746f2070756c6c206261636b60681b604482015260640161059b565b600b546008546106b09163ffffffff1690612607565b4211156106f65760405162461bcd60e51b81526020600482015260146024820152731c99599d5b99081c195c9a5bd9081c185cdcd95960621b604482015260640161059b565b805461ff001916815560018101546004805460009061071690849061261f565b9091555050600181015460028054600090610732908490612607565b90915550506040516001600160a01b038316907f417be750e991ea3d9fe3542a9c620e0f2d10e00a47f6957b2925b5bde3bd619390600090a2505060018055565b6000546001600160a01b0316331461079d5760405162461bcd60e51b815260040161059b90612636565b6040516370a0823160e01b815230600482015261081c9033906001600160a01b038416906370a0823190602401602060405180830381865afa1580156107e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061080b919061266b565b6001600160a01b03841691906117db565b50565b6108556040518060a001604052806000151581526020016000151581526020016000815260200160008152602001600081525090565b6000600d838154811061086a5761086a612684565b60009182526020808320909101546001600160a01b03168252600e8152604091829020825160a081018452815460ff80821615158352610100909104161515928101929092526001810154928201929092526002820154606082015260039091015460808201529392505050565b600d81815481106108e857600080fd5b6000918252602090912001546001600160a01b0316905081565b600c818154811061091257600080fd5b600091825260209091206003909102018054600182015460029092015490925083565b6005546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa15801561097e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109a2919061266b565b905090565b6001600160a01b0381166000908152600e60209081526040808320815160a081018352815460ff808216151583526101009091041615159381019390935260018101549183019190915260028101546060830152600301546080820152610a0d90611832565b92915050565b60026001541415610a365760405162461bcd60e51b815260040161059b906125ba565b600260015560075460ff1615610a845760405162461bcd60e51b81526020600482015260136024820152721d995cdd1a5b99c81a5cc81c99599d5b991959606a1b604482015260640161059b565b336000908152600e602052604090208054610100900460ff1615610adc5760405162461bcd60e51b815260206004820152600f60248201526e1d5cd95c881c995c481c99599d5b99608a1b604482015260640161059b565b80600201548160010154610af0919061261f565b610b0d57604051634186725760e11b815260040160405180910390fd5b6040805160a081018252825460ff8082161515835261010090910416151560208201526001830154918101919091526002820154606082015260038201546080820152600090610b5c90611832565b905080610b7c576040516347f9e41d60e01b815260040160405180910390fd5b8060036000828254610b8e9190612607565b9250508190555080826002016000828254610ba99190612607565b9091555050426003830155600182015460028301541115610bcc57610bcc61269a565b6002546003541115610be057610be061269a565b600554610bf7906001600160a01b031633836117db565b60405181815233907f081144d27d70f1f67f67a65289dde411e1a9511c916d13ee3ff9bf22f169cd9a9060200160405180910390a2505060018055565b6000546001600160a01b03163314610c5e5760405162461bcd60e51b815260040161059b90612636565b60035415610c7f576040516339a23cf160e01b815260040160405180910390fd5b610ce18787878760008888808060200260200160405190810160405280939291908181526020016000905b82821015610cd657610cc7606083028601368190038101906126b0565b81526020019060010190610caa565b505050505087611a6a565b50505050505050565b6000546001600160a01b03163314610d145760405162461bcd60e51b815260040161059b90612636565b6001600160a01b0382166000908152600e6020908152604091829020825160a081018452815460ff8082161515835261010090910416151592810192909252600181015492820183905260028101546060830181905260039091015460808301529091610d81919061261f565b610d9e57604051634186725760e11b815260040160405180910390fd5b6001600160a01b0382166000908152600e602052604090206001015415610dd8576040516382c06f2f60e01b815260040160405180910390fd5b6001600160a01b038216610e145760405163030cc15560e51b8152602060048201526002602482015261746f60f01b604482015260640161059b565b6001600160a01b039182166000908152600e60209081526040808320845181549386015115156101000261ff00199115159190911661ffff1994851617178155818501516001808301919091556060860151600280840191909155608090960151600392830155969095168352822080549091168155938401819055908301819055910155565b6000546001600160a01b03163314610ec55760405162461bcd60e51b815260040161059b90612636565b610ecf6000611c9d565b565b6000546001600160a01b03163314610efb5760405162461bcd60e51b815260040161059b90612636565b60075462010000900460ff1615610f485760405162461bcd60e51b815260206004820152601160248201527030b63932b0b23c903bb4ba34323930bbb760791b604482015260640161059b565b60075460ff16610f8f5760405162461bcd60e51b81526020600482015260126024820152713932b33ab7321036b7b2329034b99037b33360711b604482015260640161059b565b6007805462ff00001916620100001790556005546040516370a0823160e01b81523060048201526110259133916001600160a01b03909116906370a0823190602401602060405180830381865afa158015610fee573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611012919061266b565b6005546001600160a01b031691906117db565b60045460405190815233907f64934b8ce5d50616ab8d2e7fd8bfb458cf1ce270d4ce1e62bb8a05057f10df1c9060200160405180910390a2565b60006009544210611071575060095490565b600854421015611082575060085490565b600854600090815b81421115611162576000600c82815481106110a7576110a7612684565b60009182526020918290206040805160608101825260039093029091018054835260018101549383018490526002015490820152915042101561114a578060400151600114156110fa5760019350611144565b604081015161110f5780602001519350611144565b604081015161111e844261261f565b6111289190612722565b60408201516111379042612607565b611141919061261f565b93505b50611162565b6020015191508061115a81612736565b91505061108a565b509092915050565b6002600154141561118d5760405162461bcd60e51b815260040161059b906125ba565b6002600155336000818152600e60205260409020805460ff166111ee5760405162461bcd60e51b815260206004820152601960248201527875736572206973206e6f742070617274696369706174696e6760381b604482015260640161059b565b6002810154156112375760405162461bcd60e51b81526020600482015260146024820152731d5cd95c88185b1c9958591e4818db185a5b595960621b604482015260640161059b565b8054610100900460ff16156112825760405162461bcd60e51b8152602060048201526011602482015270185b1c9958591e481c995c5d595cdd1959607a1b604482015260640161059b565b600b546008546112989163ffffffff1690612607565b4211156112de5760405162461bcd60e51b81526020600482015260146024820152731c99599d5b99081c195c9a5bd9081c185cdcd95960621b604482015260640161059b565b805461ff001916610100178155600181015460048054600090611302908490612607565b909155505060018101546002805460009061131e90849061261f565b9091555050600d805460018101825560009182527fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb50180546001600160a01b0319166001600160a01b03851690811790915560405190917f7fcea13fa52052e10e2a2ae5f7edf34eb7a59dd5778244bca78f8f0c6866bfbe91a2505060018055565b6000546001600160a01b031633146113ca5760405162461bcd60e51b815260040161059b90612636565b600754610100900460ff16156114165760405162461bcd60e51b815260206004820152601160248201527030b63932b0b23c903bb4ba34323930bbb760791b604482015260640161059b565b600b5460085461142c9163ffffffff1690612607565b42116114715760405162461bcd60e51b8152602060048201526014602482015273726566756e6420706572696f642061637469766560601b604482015260640161059b565b6005546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa1580156114ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114de919061266b565b90506004548110156115265760405162461bcd60e51b81526020600482015260116024820152706e6f7420656e6f75676820746f6b656e7360781b604482015260640161059b565b6007805461ff001916610100179055600454600554611552916001600160a01b039091169033906117db565b60045460405190815233907f88c24254769936ac40e24c2fdd2c5a2dbc823efeb5bf25211513e7e6cbb06ef4906020015b60405180910390a250565b6000546001600160a01b031633146115b85760405162461bcd60e51b815260040161059b90612636565b816115d65760405163af70781d60e01b815260040160405180910390fd5b60006115e0610935565b90506000805b67ffffffffffffffff81168511156116535785858267ffffffffffffffff1681811061161457611614612684565b905060400201602001602081019061162c9190612768565b61163f906001600160801b031683612607565b91508061164b81612783565b9150506115e6565b50600b54640100000000900460ff161561169957612710600a548261167891906127ab565b61168291906127ca565b600360008282546116939190612607565b90915550505b82156116da5780600254600354846116b19190612607565b6116bb919061261f565b10156116da5760405163409a7ab960e11b815260040160405180910390fd5b60005b67ffffffffffffffff811685111561173b5761172986868367ffffffffffffffff1681811061170e5761170e612684565b90506040020180360381019061172491906127de565b611ced565b8061173381612783565b9150506116dd565b505050505050565b6000546001600160a01b0316331461176d5760405162461bcd60e51b815260040161059b90612636565b6001600160a01b0381166117d25760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161059b565b61081c81611c9d565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261182d908490611f0f565b505050565b600060085442101561184657506000919050565b60008260600151836040015161185c919061261f565b90508061186c5750600092915050565b600954421061187d57809150611a46565b60808301516118b2576127108360400151600a5461189b91906127ab565b6118a591906127ca565b6118af9083612607565b91505b60085460005b600c54811015611a43576000600c82815481106118d7576118d7612684565b60009182526020808320604080516060810182526003909402909101805484526001810154928401839052600201549083015290925061191890859061261f565b9050816020015187608001511015611a2a578160200151421015801561194057506040820151155b15611974578151604088015161271091611959916127ab565b61196391906127ca565b61196d9087612607565b9550611a17565b604082015115611a1757600061198e886080015186611fe1565b905060006119a0428560200151611ff8565b90506000846040015183836119b5919061261f565b6119bf9190612722565b6119c9848461261f565b6119d3919061261f565b90506119e1612710856127ab565b855160408c015183916119f3916127ab565b6119fd91906127ab565b611a0791906127ca565b611a11908a612607565b98505050505b8160200151421015611a2a575050611a43565b5060200151915080611a3b81612736565b9150506118b8565b50505b611a508282611ff8565b9150611a6382611a5e610935565b611ff8565b9392505050565b848460005b8451811015611ae3576000858281518110611a8c57611a8c612684565b602002602001015190508060200151841115611abb57604051636fb9362f60e01b815260040160405180910390fd5b8051611ac79084612607565b6020909101519350915080611adb81612736565b915050611a6f565b506127108114611b265760405162461bcd60e51b815260206004820152600e60248201526d0746f74616c203d3d2031303030360941b604482015260640161059b565b6001600160a01b038916611b6c5760405163030cc15560e51b815260206004820152600c60248201526b2fbb32b9ba32b22a37b5b2b760a11b604482015260640161059b565b8751611b7f9060069060208b0190612188565b50600580546001600160a01b0319166001600160a01b038b1617905560088790558351611bac5786611bd8565b8360018551611bbb919061261f565b81518110611bcb57611bcb612684565b6020026020010151602001515b600955600a869055600b805464ff00000000191664010000000087151502179055611c05600c600061220c565b60005b8451811015611c7757600c858281518110611c2557611c25612684565b6020908102919091018101518254600181810185556000948552938390208251600390920201908155918101519282019290925560409091015160029091015580611c6f81612736565b915050611c08565b5050600b805463ffffffff191663ffffffff939093169290921790915550505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b0316611d2e5760405163030cc15560e51b815260040161059b906020808252600490820152633ab9b2b960e11b604082015260600190565b60208101516001600160801b0316611d7257604051633930c7a960e21b8152602060048201526006602482015265185b5bdd5b9d60d21b604482015260640161059b565b80516001600160a01b03166000908152600e602052604090206001015415611dad576040516382c06f2f60e01b815260040160405180910390fd5b80602001516001600160801b031660026000828254611dcc9190612607565b90915550506040805160a0810182526001815260006020808301919091528301516001600160801b031691810191909152600b546060820190640100000000900460ff16611e1b576000611e43565b612710600a5484602001516001600160801b0316611e3991906127ab565b611e4391906127ca565b8152602001600b60049054906101000a900460ff16611e63576000611e67565b6008545b905281516001600160a01b039081166000908152600e6020908152604091829020845181548684015115156101000261ff00199215159290921661ffff19909116171781558483015160018201556060850151600282015560809094015160039094019390935583518385015191516001600160801b039092168252909116917f1ad52506d5b39a5f36ce7518f02978bb44db2961e116f2a2d8d134cd3f43e9579101611583565b6000611f64826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166120079092919063ffffffff16565b80519091501561182d5780806020019051810190611f82919061283b565b61182d5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161059b565b600081831015611ff15781611a63565b5090919050565b6000818310611ff15781611a63565b6060612016848460008561201e565b949350505050565b60608247101561207f5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161059b565b6001600160a01b0385163b6120d65760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161059b565b600080866001600160a01b031685876040516120f29190612858565b60006040518083038185875af1925050503d806000811461212f576040519150601f19603f3d011682016040523d82523d6000602084013e612134565b606091505b509150915061214482828661214f565b979650505050505050565b6060831561215e575081611a63565b82511561216e5782518084602001fd5b8160405162461bcd60e51b815260040161059b9190612294565b8280546121949061257f565b90600052602060002090601f0160209004810192826121b657600085556121fc565b82601f106121cf57805160ff19168380011785556121fc565b828001600101855582156121fc579182015b828111156121fc5782518255916020019190600101906121e1565b5061220892915061222d565b5090565b508054600082556003029060005260206000209081019061081c9190612242565b5b80821115612208576000815560010161222e565b5b80821115612208576000808255600182018190556002820155600301612243565b60005b8381101561227f578181015183820152602001612267565b8381111561228e576000848401525b50505050565b60208152600082518060208401526122b3816040850160208701612264565b601f01601f19169190910160400192915050565b6001600160a01b038116811461081c57600080fd5b6000602082840312156122ee57600080fd5b8135611a63816122c7565b60006020828403121561230b57600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561235157612351612312565b604052919050565b60008083601f84011261236b57600080fd5b50813567ffffffffffffffff81111561238357600080fd5b60208301915083602060608302850101111561239e57600080fd5b9250929050565b803563ffffffff811681146123b957600080fd5b919050565b600080600080600080600060c0888a0312156123d957600080fd5b87356123e4816122c7565b965060208881013567ffffffffffffffff8082111561240257600080fd5b818b0191508b601f83011261241657600080fd5b81358181111561242857612428612312565b61243a601f8201601f19168501612328565b8181528d8583860101111561244e57600080fd5b818585018683013760009181019094015291975060408a0135965060608a0135955060808a0135918083111561248357600080fd5b50506124918a828b01612359565b90945092506124a4905060a089016123a5565b905092959891949750929550565b600080604083850312156124c557600080fd5b82356124d0816122c7565b915060208301356124e0816122c7565b809150509250929050565b801515811461081c57600080fd5b60008060006040848603121561250e57600080fd5b833567ffffffffffffffff8082111561252657600080fd5b818601915086601f83011261253a57600080fd5b81358181111561254957600080fd5b8760208260061b850101111561255e57600080fd5b60209283019550935050840135612574816124eb565b809150509250925092565b600181811c9082168061259357607f821691505b602082108114156125b457634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b634e487b7160e01b600052601160045260246000fd5b6000821982111561261a5761261a6125f1565b500190565b600082821015612631576126316125f1565b500390565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60006020828403121561267d57600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052600160045260246000fd5b6000606082840312156126c257600080fd5b6040516060810181811067ffffffffffffffff821117156126e5576126e5612312565b80604052508235815260208301356020820152604083013560408201528091505092915050565b634e487b7160e01b600052601260045260246000fd5b6000826127315761273161270c565b500690565b600060001982141561274a5761274a6125f1565b5060010190565b80356001600160801b03811681146123b957600080fd5b60006020828403121561277a57600080fd5b611a6382612751565b600067ffffffffffffffff808316818114156127a1576127a16125f1565b6001019392505050565b60008160001904831182151516156127c5576127c56125f1565b500290565b6000826127d9576127d961270c565b500490565b6000604082840312156127f057600080fd5b6040516040810181811067ffffffffffffffff8211171561281357612813612312565b6040528235612821816122c7565b815261282f60208401612751565b60208201529392505050565b60006020828403121561284d57600080fd5b8151611a63816124eb565b6000825161286a818460208701612264565b919091019291505056fea26469706673582212202870fc3cd71d68cf899d2b809d1d9cd9492ccebd58a86039dc23b2ea198494d664736f6c634300080b0033

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

000000000000000000000000b2a25f7d864636e44bc1bf7a316897652bf0746300000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000667044e400000000000000000000000000000000000000000000000000000000000003e800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000006978000000000000000000000000000000000000000000000000000000000000000197061726167656e2d56657374696e6749444f2d4c4547494f4e0000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006697d1e40000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000232800000000000000000000000000000000000000000000000000000000678a65e40000000000000000000000000000000000000000000000000000000000000001

-----Decoded View---------------
Arg [0] : _vestedToken (address): 0xb2a25f7D864636E44Bc1Bf7a316897652Bf07463
Arg [1] : _name (string): paragen-VestingIDO-LEGION
Arg [2] : _startDateAt (uint256): 1718633700
Arg [3] : _claimableAtStart (uint256): 1000
Arg [4] : _airdroptedAtStart (bool): False
Arg [5] : _phases (tuple[]): System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput],System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput]
Arg [6] : _refundGracePeriodDuration (uint32): 432000

-----Encoded View---------------
16 Constructor Arguments found :
Arg [0] : 000000000000000000000000b2a25f7d864636e44bc1bf7a316897652bf07463
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [2] : 00000000000000000000000000000000000000000000000000000000667044e4
Arg [3] : 00000000000000000000000000000000000000000000000000000000000003e8
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000120
Arg [6] : 0000000000000000000000000000000000000000000000000000000000069780
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000019
Arg [8] : 7061726167656e2d56657374696e6749444f2d4c4547494f4e00000000000000
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [10] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [11] : 000000000000000000000000000000000000000000000000000000006697d1e4
Arg [12] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [13] : 0000000000000000000000000000000000000000000000000000000000002328
Arg [14] : 00000000000000000000000000000000000000000000000000000000678a65e4
Arg [15] : 0000000000000000000000000000000000000000000000000000000000000001


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.