ETH Price: $2,918.16 (+3.50%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Recover Token125050692021-05-25 18:16:541262 days ago1621966614IN
0xD906b2D5...D8650c75F
0 ETH0.0023773653
Withdraw Tokens124769262021-05-21 9:34:121267 days ago1621589652IN
0xD906b2D5...D8650c75F
0 ETH0.0039594251.5
Withdraw Tokens124322972021-05-14 11:42:471273 days ago1620992567IN
0xD906b2D5...D8650c75F
0 ETH0.0046032177
Withdraw Tokens124263082021-05-13 13:33:171274 days ago1620912797IN
0xD906b2D5...D8650c75F
0 ETH0.01014842132
Withdraw Tokens124176272021-05-12 5:04:481276 days ago1620795888IN
0xD906b2D5...D8650c75F
0 ETH0.0192205250
Withdraw Tokens124121002021-05-11 8:32:201277 days ago1620721940IN
0xD906b2D5...D8650c75F
0 ETH0.0187592244.00000145
Withdraw Tokens124007342021-05-09 14:39:371278 days ago1620571177IN
0xD906b2D5...D8650c75F
0 ETH0.00861078112
Withdraw Tokens123985472021-05-09 6:20:021279 days ago1620541202IN
0xD906b2D5...D8650c75F
0 ETH0.0050814785
Withdraw Tokens123985252021-05-09 6:16:451279 days ago1620541005IN
0xD906b2D5...D8650c75F
0 ETH0.0050814785
Withdraw Tokens123980412021-05-09 4:38:331279 days ago1620535113IN
0xD906b2D5...D8650c75F
0 ETH0.01270367212.5
Withdraw Tokens123914292021-05-08 4:10:511280 days ago1620447051IN
0xD906b2D5...D8650c75F
0 ETH0.0035365746
Withdraw Tokens123868342021-05-07 11:16:151280 days ago1620386175IN
0xD906b2D5...D8650c75F
0 ETH0.0046129260
Withdraw Tokens123863082021-05-07 9:15:131281 days ago1620378913IN
0xD906b2D5...D8650c75F
0 ETH0.0045360359
Withdraw Tokens123856962021-05-07 6:58:001281 days ago1620370680IN
0xD906b2D5...D8650c75F
0 ETH0.0027677536
Withdraw Tokens123845562021-05-07 2:47:331281 days ago1620355653IN
0xD906b2D5...D8650c75F
0 ETH0.0017376448
Withdraw Tokens123845522021-05-07 2:46:461281 days ago1620355606IN
0xD906b2D5...D8650c75F
0 ETH0.0017376448
Withdraw Tokens123845522021-05-07 2:46:461281 days ago1620355606IN
0xD906b2D5...D8650c75F
0 ETH0.0017376448
Withdraw Tokens123845522021-05-07 2:46:461281 days ago1620355606IN
0xD906b2D5...D8650c75F
0 ETH0.0036903348
Withdraw Tokens123823302021-05-06 18:22:261281 days ago1620325346IN
0xD906b2D5...D8650c75F
0 ETH0.0019910555
Withdraw Tokens123823302021-05-06 18:22:261281 days ago1620325346IN
0xD906b2D5...D8650c75F
0 ETH0.0042285155
Withdraw Tokens123823122021-05-06 18:18:281281 days ago1620325108IN
0xD906b2D5...D8650c75F
0 ETH0.0043822757
Withdraw Tokens123806952021-05-06 12:18:471281 days ago1620303527IN
0xD906b2D5...D8650c75F
0 ETH0.0033059243
Withdraw Tokens123800232021-05-06 9:50:061282 days ago1620294606IN
0xD906b2D5...D8650c75F
0 ETH0.0030752840
Withdraw Tokens123794892021-05-06 7:49:091282 days ago1620287349IN
0xD906b2D5...D8650c75F
0 ETH0.0013914738.4375
Withdraw Tokens123794892021-05-06 7:49:091282 days ago1620287349IN
0xD906b2D5...D8650c75F
0 ETH0.0013914738.4375
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:
PrivateDistribution

Compiler Version
v0.7.4+commit.3f05b770

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 8 : PrivateDistribution.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.7.4;

// import "hardhat/console.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "./BokkyPooBahsDateTimeLibrary.sol";


contract PrivateDistribution is Ownable {
    using SafeMath for uint256;
    using SafeERC20 for IERC20;

    event InvestorsAdded(address[] investors, uint256[] tokenAllocations, address caller);

    event InvestorAdded(address indexed investor, address indexed caller, uint256 allocation);

    event InvestorRemoved(address indexed investor, address indexed caller, uint256 allocation);

    event WithdrawnTokens(address indexed investor, uint256 value);

    event DepositInvestment(address indexed investor, uint256 value);

    event TransferInvestment(address indexed owner, uint256 value);

    event RecoverToken(address indexed token, uint256 indexed amount);

    event TokenVestingAdded(uint256 indexed vestingMonth, uint256 indexed releaseTime, uint256 releasePercentage);

    uint256 private _totalAllocatedAmount;
    uint256 private _initialTimestamp;
    IERC20 private _blankToken;
    address[] public investors;
    uint256 private vestingMonth = 0;

    struct Investor {
        bool exists;
        uint256 withdrawnTokens;
        uint256 tokensAllotment;
    }

    struct Vesting {
        uint256 releaseTime;
        uint256 releasePercentage;
    }

    mapping(uint256 => Vesting) public vestingsInfo;
    mapping(address => Investor) public investorsInfo;

    string private constant INSUFFICIENT_BALANCE = "Insufficient balance";
    string private constant INVALID_VESTING_ID = "Invalid vesting id";
    string private constant VESTING_ALREADY_RELEASED = "Vesting already released";
    string private constant INVALID_BENEFICIARY = "Invalid beneficiary address";
    string private constant NOT_VESTED = "Tokens have not vested yet";


    /// @dev Boolean variable that indicates whether the contract was initialized.
    bool public isInitialized = false;
    /// @dev Boolean variable that indicates whether the investors set was finalized.
    bool public isFinalized = false;

    /// @dev Checks that the contract is initialized.
    modifier initialized() {
        require(isInitialized, "not initialized");
        _;
    }

    /// @dev Checks that the contract is initialized.
    modifier notInitialized() {
        require(!isInitialized, "initialized");
        _;
    }

    modifier onlyInvestor() {
        require(investorsInfo[_msgSender()].exists, "Only investors allowed");
        _;
    }

    constructor(address _token) {
        _blankToken = IERC20(_token);

        uint256 SCALING_FACTOR = 10 ** 18; // decimals
        uint256 day = 1 days;

        // 20% on TGE, 8% for Month 1 2; then 7% for Month 3 6; then 6% for Month 7 12
        addVesting(_initialTimestamp, 20 * SCALING_FACTOR);
        // 8% for Month 1 2
        addVesting(_initialTimestamp + 30 * day, 28 * SCALING_FACTOR);
        addVesting(_initialTimestamp + 60 * day, 36 * SCALING_FACTOR);
        // 7% for Month 3 6
        addVesting(_initialTimestamp + 90 * day, 43 * SCALING_FACTOR);
        addVesting(_initialTimestamp + 120 * day, 50 * SCALING_FACTOR);
        addVesting(_initialTimestamp + 150 * day, 57 * SCALING_FACTOR);
        addVesting(_initialTimestamp + 180 * day, 64 * SCALING_FACTOR);
        // 6% for Month 7 12
        addVesting(_initialTimestamp + 210 * day, 70 * SCALING_FACTOR);
        addVesting(_initialTimestamp + 240 * day, 76 * SCALING_FACTOR);
        addVesting(_initialTimestamp + 270 * day, 82 * SCALING_FACTOR);
        addVesting(_initialTimestamp + 300 * day, 88 * SCALING_FACTOR);
        addVesting(_initialTimestamp + 330 * day, 94 * SCALING_FACTOR);
        addVesting(_initialTimestamp + 365 * day, 100 * SCALING_FACTOR);
    }

    function getInitialTimestamp() public view returns (uint256 timestamp) {
        return _initialTimestamp;
    }

    /// @dev release tokens to all the investors
    function releaseTokens() external onlyOwner initialized() {
        for (uint8 i = 0; i < investors.length; i++) {
            uint256 availableTokens = withdrawableTokens(investors[i]);
            _blankToken.safeTransfer(investors[i], availableTokens);
        }
    }

    /// @dev Adds investors. This function doesn't limit max gas consumption,
    /// so adding too many investors can cause it to reach the out-of-gas error.
    /// @param _investors The addresses of new investors.
    /// @param _tokenAllocations The amounts of the tokens that belong to each investor.
    function addInvestors(address[] calldata _investors, uint256[] calldata _tokenAllocations) external onlyOwner {
        require(_investors.length == _tokenAllocations.length, "different arrays sizes");
        for (uint256 i = 0; i < _investors.length; i++) {
            _addInvestor(_investors[i], _tokenAllocations[i]);
        }
        emit InvestorsAdded(_investors, _tokenAllocations, msg.sender);
    }

    // 25% at TGE, 75% released daily over 120 Days after 30 Days Cliff
    function withdrawTokens() external onlyInvestor() initialized() {
        Investor storage investor = investorsInfo[_msgSender()];

        uint256 tokensAvailable = withdrawableTokens(_msgSender());

        require(tokensAvailable > 0, "no tokens available for withdrawl");

        investor.withdrawnTokens = investor.withdrawnTokens.add(tokensAvailable);
        _blankToken.safeTransfer(_msgSender(), tokensAvailable);

        emit WithdrawnTokens(_msgSender(), tokensAvailable);
    }

    /// @dev The starting time of TGE
    /// @param _timestamp The initial timestamp, this timestap should be used for vesting
    function setInitialTimestamp(uint256 _timestamp) external onlyOwner() notInitialized() {
        isInitialized = true;
        _initialTimestamp = _timestamp;
    }

    /// @dev withdrawble tokens for an address
    /// @param _investor whitelisted investor address
    function withdrawableTokens(address _investor) public view returns (uint256 tokens) {
        Investor storage investor = investorsInfo[_investor];
        uint256 availablePercentage = _calculateAvailablePercentage();
        uint256 noOfTokens = _calculatePercentage(investor.tokensAllotment, availablePercentage);
        uint256 tokensAvailable = noOfTokens.sub(investor.withdrawnTokens);

        return tokensAvailable;
    }

    /**
     * @notice Function to add a vesting
     * Since this is onlyOwner protected, tokens are assumed to be transferred to the vesting contract
     * @param _releaseTime  Time for release
     * @param _releasePercentage       Amount of vesting
     */
    function addVesting(
        uint256 _releaseTime,
        uint256 _releasePercentage
    ) public onlyOwner {
        vestingMonth = vestingMonth.add(1);
        vestingsInfo[vestingMonth] = Vesting({
            releaseTime: _releaseTime,
            releasePercentage: _releasePercentage
        });
        emit TokenVestingAdded(vestingMonth , _releaseTime, _releasePercentage);
    }

    /// @dev Adds investor. This function doesn't limit max gas consumption,
    /// so adding too many investors can cause it to reach the out-of-gas error.
    /// @param _investor The addresses of new investors.
    /// @param _tokensAllotment The amounts of the tokens that belong to each investor.
    function _addInvestor(address _investor, uint256 _tokensAllotment) internal onlyOwner {
        require(_investor != address(0), "Invalid address");
        require(_tokensAllotment > 0, "the investor allocation must be more than 0");
        Investor storage investor = investorsInfo[_investor];

        require(investor.tokensAllotment == 0, "investor already added");

        investor.tokensAllotment = _tokensAllotment;
        investor.exists = true;
        investors.push(_investor);
        _totalAllocatedAmount = _totalAllocatedAmount.add(_tokensAllotment);
        emit InvestorAdded(_investor, _msgSender(), _tokensAllotment);
    }

    /// @dev calculate percentage value from amount
    /// @param _amount amount input to find the percentage
    /// @param _percentage percentage for an amount
    function _calculatePercentage(uint256 _amount, uint256 _percentage) private pure returns (uint256 percentage) {
        return _amount.mul(_percentage).div(100).div(1e18);
    }

    function _calculateAvailablePercentage() private view returns (uint256 availablePercentage) {
        uint256 currentTimeStamp = block.timestamp;
        uint256 noOfMonths = BokkyPooBahsDateTimeLibrary.diffMonths(_initialTimestamp, currentTimeStamp);
        Vesting storage vesting = vestingsInfo[noOfMonths.add(1)];

        // console.log("Months=%s, Release Percentage=%s%", noOfMonths.add(1), vesting.releasePercentage.div(1e18));

        return vesting.releasePercentage;
    }

    function recoverToken(address _token, uint256 amount) external onlyOwner {
        IERC20(_token).safeTransfer(_msgSender(), amount);
        emit RecoverToken(_token, amount);
    }
}

File 2 of 8 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <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 () internal {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), 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 {
        emit OwnershipTransferred(_owner, address(0));
        _owner = 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");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

File 3 of 8 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        uint256 c = a + b;
        if (c < a) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b > a) return (false, 0);
        return (true, a - b);
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) return (true, 0);
        uint256 c = a * b;
        if (c / a != b) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a / b);
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a % b);
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");
        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b <= a, "SafeMath: subtraction overflow");
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        if (a == 0) return 0;
        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");
        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b > 0, "SafeMath: division by zero");
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b > 0, "SafeMath: modulo by zero");
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        return a - b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryDiv}.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a % b;
    }
}

File 4 of 8 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

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

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

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

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

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

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

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

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

File 5 of 8 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "./IERC20.sol";
import "../../math/SafeMath.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 SafeMath for uint256;
    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'
        // solhint-disable-next-line max-line-length
        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).add(value);
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero");
        _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
            // solhint-disable-next-line max-line-length
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 6 of 8 : BokkyPooBahsDateTimeLibrary.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.0;

// ----------------------------------------------------------------------------
// BokkyPooBah's DateTime Library v1.01
//
// A gas-efficient Solidity date and time library
//
// https://github.com/bokkypoobah/BokkyPooBahsDateTimeLibrary
//
// Tested date range 1970/01/01 to 2345/12/31
//
// Conventions:
// Unit      | Range         | Notes
// :-------- |:-------------:|:-----
// timestamp | >= 0          | Unix timestamp, number of seconds since 1970/01/01 00:00:00 UTC
// year      | 1970 ... 2345 |
// month     | 1 ... 12      |
// day       | 1 ... 31      |
// hour      | 0 ... 23      |
// minute    | 0 ... 59      |
// second    | 0 ... 59      |
// dayOfWeek | 1 ... 7       | 1 = Monday, ..., 7 = Sunday
//
//
// Enjoy. (c) BokkyPooBah / Bok Consulting Pty Ltd 2018-2019. The MIT Licence.
// ----------------------------------------------------------------------------

library BokkyPooBahsDateTimeLibrary {
    uint256 constant SECONDS_PER_DAY = 24 * 60 * 60;
    uint256 constant SECONDS_PER_HOUR = 60 * 60;
    uint256 constant SECONDS_PER_MINUTE = 60;
    int256 constant OFFSET19700101 = 2440588;

    uint256 constant DOW_MON = 1;
    uint256 constant DOW_TUE = 2;
    uint256 constant DOW_WED = 3;
    uint256 constant DOW_THU = 4;
    uint256 constant DOW_FRI = 5;
    uint256 constant DOW_SAT = 6;
    uint256 constant DOW_SUN = 7;

    // ------------------------------------------------------------------------
    // Calculate the number of days from 1970/01/01 to year/month/day using
    // the date conversion algorithm from
    //   http://aa.usno.navy.mil/faq/docs/JD_Formula.php
    // and subtracting the offset 2440588 so that 1970/01/01 is day 0
    //
    // days = day
    //      - 32075
    //      + 1461 * (year + 4800 + (month - 14) / 12) / 4
    //      + 367 * (month - 2 - (month - 14) / 12 * 12) / 12
    //      - 3 * ((year + 4900 + (month - 14) / 12) / 100) / 4
    //      - offset
    // ------------------------------------------------------------------------
    function _daysFromDate(
        uint256 year,
        uint256 month,
        uint256 day
    ) internal pure returns (uint256 _days) {
        require(year >= 1970);
        int256 _year = int256(year);
        int256 _month = int256(month);
        int256 _day = int256(day);

        int256 __days =
            _day -
                32075 +
                (1461 * (_year + 4800 + (_month - 14) / 12)) /
                4 +
                (367 * (_month - 2 - ((_month - 14) / 12) * 12)) /
                12 -
                (3 * ((_year + 4900 + (_month - 14) / 12) / 100)) /
                4 -
                OFFSET19700101;

        _days = uint256(__days);
    }

    // ------------------------------------------------------------------------
    // Calculate year/month/day from the number of days since 1970/01/01 using
    // the date conversion algorithm from
    //   http://aa.usno.navy.mil/faq/docs/JD_Formula.php
    // and adding the offset 2440588 so that 1970/01/01 is day 0
    //
    // int L = days + 68569 + offset
    // int N = 4 * L / 146097
    // L = L - (146097 * N + 3) / 4
    // year = 4000 * (L + 1) / 1461001
    // L = L - 1461 * year / 4 + 31
    // month = 80 * L / 2447
    // dd = L - 2447 * month / 80
    // L = month / 11
    // month = month + 2 - 12 * L
    // year = 100 * (N - 49) + year + L
    // ------------------------------------------------------------------------
    function _daysToDate(uint256 _days)
        internal
        pure
        returns (
            uint256 year,
            uint256 month,
            uint256 day
        )
    {
        int256 __days = int256(_days);

        int256 L = __days + 68569 + OFFSET19700101;
        int256 N = (4 * L) / 146097;
        L = L - (146097 * N + 3) / 4;
        int256 _year = (4000 * (L + 1)) / 1461001;
        L = L - (1461 * _year) / 4 + 31;
        int256 _month = (80 * L) / 2447;
        int256 _day = L - (2447 * _month) / 80;
        L = _month / 11;
        _month = _month + 2 - 12 * L;
        _year = 100 * (N - 49) + _year + L;

        year = uint256(_year);
        month = uint256(_month);
        day = uint256(_day);
    }

    function timestampFromDate(
        uint256 year,
        uint256 month,
        uint256 day
    ) internal pure returns (uint256 timestamp) {
        timestamp = _daysFromDate(year, month, day) * SECONDS_PER_DAY;
    }

    function timestampFromDateTime(
        uint256 year,
        uint256 month,
        uint256 day,
        uint256 hour,
        uint256 minute,
        uint256 second
    ) internal pure returns (uint256 timestamp) {
        timestamp =
            _daysFromDate(year, month, day) *
            SECONDS_PER_DAY +
            hour *
            SECONDS_PER_HOUR +
            minute *
            SECONDS_PER_MINUTE +
            second;
    }

    function timestampToDate(uint256 timestamp)
        internal
        pure
        returns (
            uint256 year,
            uint256 month,
            uint256 day
        )
    {
        (year, month, day) = _daysToDate(timestamp / SECONDS_PER_DAY);
    }

    function timestampToDateTime(uint256 timestamp)
        internal
        pure
        returns (
            uint256 year,
            uint256 month,
            uint256 day,
            uint256 hour,
            uint256 minute,
            uint256 second
        )
    {
        (year, month, day) = _daysToDate(timestamp / SECONDS_PER_DAY);
        uint256 secs = timestamp % SECONDS_PER_DAY;
        hour = secs / SECONDS_PER_HOUR;
        secs = secs % SECONDS_PER_HOUR;
        minute = secs / SECONDS_PER_MINUTE;
        second = secs % SECONDS_PER_MINUTE;
    }

    function isValidDate(
        uint256 year,
        uint256 month,
        uint256 day
    ) internal pure returns (bool valid) {
        if (year >= 1970 && month > 0 && month <= 12) {
            uint256 daysInMonth = _getDaysInMonth(year, month);
            if (day > 0 && day <= daysInMonth) {
                valid = true;
            }
        }
    }

    function isValidDateTime(
        uint256 year,
        uint256 month,
        uint256 day,
        uint256 hour,
        uint256 minute,
        uint256 second
    ) internal pure returns (bool valid) {
        if (isValidDate(year, month, day)) {
            if (hour < 24 && minute < 60 && second < 60) {
                valid = true;
            }
        }
    }

    function isLeapYear(uint256 timestamp) internal pure returns (bool leapYear) {
        (uint256 year, , ) = _daysToDate(timestamp / SECONDS_PER_DAY);
        leapYear = _isLeapYear(year);
    }

    function _isLeapYear(uint256 year) internal pure returns (bool leapYear) {
        leapYear = ((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0);
    }

    function isWeekDay(uint256 timestamp) internal pure returns (bool weekDay) {
        weekDay = getDayOfWeek(timestamp) <= DOW_FRI;
    }

    function isWeekEnd(uint256 timestamp) internal pure returns (bool weekEnd) {
        weekEnd = getDayOfWeek(timestamp) >= DOW_SAT;
    }

    function getDaysInMonth(uint256 timestamp) internal pure returns (uint256 daysInMonth) {
        (uint256 year, uint256 month, ) = _daysToDate(timestamp / SECONDS_PER_DAY);
        daysInMonth = _getDaysInMonth(year, month);
    }

    function _getDaysInMonth(uint256 year, uint256 month) internal pure returns (uint256 daysInMonth) {
        if (month == 1 || month == 3 || month == 5 || month == 7 || month == 8 || month == 10 || month == 12) {
            daysInMonth = 31;
        } else if (month != 2) {
            daysInMonth = 30;
        } else {
            daysInMonth = _isLeapYear(year) ? 29 : 28;
        }
    }

    // 1 = Monday, 7 = Sunday
    function getDayOfWeek(uint256 timestamp) internal pure returns (uint256 dayOfWeek) {
        uint256 _days = timestamp / SECONDS_PER_DAY;
        dayOfWeek = ((_days + 3) % 7) + 1;
    }

    function getYear(uint256 timestamp) internal pure returns (uint256 year) {
        (year, , ) = _daysToDate(timestamp / SECONDS_PER_DAY);
    }

    function getMonth(uint256 timestamp) internal pure returns (uint256 month) {
        (, month, ) = _daysToDate(timestamp / SECONDS_PER_DAY);
    }

    function getDay(uint256 timestamp) internal pure returns (uint256 day) {
        (, , day) = _daysToDate(timestamp / SECONDS_PER_DAY);
    }

    function getHour(uint256 timestamp) internal pure returns (uint256 hour) {
        uint256 secs = timestamp % SECONDS_PER_DAY;
        hour = secs / SECONDS_PER_HOUR;
    }

    function getMinute(uint256 timestamp) internal pure returns (uint256 minute) {
        uint256 secs = timestamp % SECONDS_PER_HOUR;
        minute = secs / SECONDS_PER_MINUTE;
    }

    function getSecond(uint256 timestamp) internal pure returns (uint256 second) {
        second = timestamp % SECONDS_PER_MINUTE;
    }

    function addYears(uint256 timestamp, uint256 _years) internal pure returns (uint256 newTimestamp) {
        (uint256 year, uint256 month, uint256 day) = _daysToDate(timestamp / SECONDS_PER_DAY);
        year += _years;
        uint256 daysInMonth = _getDaysInMonth(year, month);
        if (day > daysInMonth) {
            day = daysInMonth;
        }
        newTimestamp = _daysFromDate(year, month, day) * SECONDS_PER_DAY + (timestamp % SECONDS_PER_DAY);
        require(newTimestamp >= timestamp);
    }

    function addMonths(uint256 timestamp, uint256 _months) internal pure returns (uint256 newTimestamp) {
        (uint256 year, uint256 month, uint256 day) = _daysToDate(timestamp / SECONDS_PER_DAY);
        month += _months;
        year += (month - 1) / 12;
        month = ((month - 1) % 12) + 1;
        uint256 daysInMonth = _getDaysInMonth(year, month);
        if (day > daysInMonth) {
            day = daysInMonth;
        }
        newTimestamp = _daysFromDate(year, month, day) * SECONDS_PER_DAY + (timestamp % SECONDS_PER_DAY);
        require(newTimestamp >= timestamp);
    }

    function addDays(uint256 timestamp, uint256 _days) internal pure returns (uint256 newTimestamp) {
        newTimestamp = timestamp + _days * SECONDS_PER_DAY;
        require(newTimestamp >= timestamp);
    }

    function addHours(uint256 timestamp, uint256 _hours) internal pure returns (uint256 newTimestamp) {
        newTimestamp = timestamp + _hours * SECONDS_PER_HOUR;
        require(newTimestamp >= timestamp);
    }

    function addMinutes(uint256 timestamp, uint256 _minutes) internal pure returns (uint256 newTimestamp) {
        newTimestamp = timestamp + _minutes * SECONDS_PER_MINUTE;
        require(newTimestamp >= timestamp);
    }

    function addSeconds(uint256 timestamp, uint256 _seconds) internal pure returns (uint256 newTimestamp) {
        newTimestamp = timestamp + _seconds;
        require(newTimestamp >= timestamp);
    }

    function subYears(uint256 timestamp, uint256 _years) internal pure returns (uint256 newTimestamp) {
        (uint256 year, uint256 month, uint256 day) = _daysToDate(timestamp / SECONDS_PER_DAY);
        year -= _years;
        uint256 daysInMonth = _getDaysInMonth(year, month);
        if (day > daysInMonth) {
            day = daysInMonth;
        }
        newTimestamp = _daysFromDate(year, month, day) * SECONDS_PER_DAY + (timestamp % SECONDS_PER_DAY);
        require(newTimestamp <= timestamp);
    }

    function subMonths(uint256 timestamp, uint256 _months) internal pure returns (uint256 newTimestamp) {
        (uint256 year, uint256 month, uint256 day) = _daysToDate(timestamp / SECONDS_PER_DAY);
        uint256 yearMonth = year * 12 + (month - 1) - _months;
        year = yearMonth / 12;
        month = (yearMonth % 12) + 1;
        uint256 daysInMonth = _getDaysInMonth(year, month);
        if (day > daysInMonth) {
            day = daysInMonth;
        }
        newTimestamp = _daysFromDate(year, month, day) * SECONDS_PER_DAY + (timestamp % SECONDS_PER_DAY);
        require(newTimestamp <= timestamp);
    }

    function subDays(uint256 timestamp, uint256 _days) internal pure returns (uint256 newTimestamp) {
        newTimestamp = timestamp - _days * SECONDS_PER_DAY;
        require(newTimestamp <= timestamp);
    }

    function subHours(uint256 timestamp, uint256 _hours) internal pure returns (uint256 newTimestamp) {
        newTimestamp = timestamp - _hours * SECONDS_PER_HOUR;
        require(newTimestamp <= timestamp);
    }

    function subMinutes(uint256 timestamp, uint256 _minutes) internal pure returns (uint256 newTimestamp) {
        newTimestamp = timestamp - _minutes * SECONDS_PER_MINUTE;
        require(newTimestamp <= timestamp);
    }

    function subSeconds(uint256 timestamp, uint256 _seconds) internal pure returns (uint256 newTimestamp) {
        newTimestamp = timestamp - _seconds;
        require(newTimestamp <= timestamp);
    }

    function diffYears(uint256 fromTimestamp, uint256 toTimestamp) internal pure returns (uint256 _years) {
        require(fromTimestamp <= toTimestamp);
        (uint256 fromYear, , ) = _daysToDate(fromTimestamp / SECONDS_PER_DAY);
        (uint256 toYear, , ) = _daysToDate(toTimestamp / SECONDS_PER_DAY);
        _years = toYear - fromYear;
    }

    function diffMonths(uint256 fromTimestamp, uint256 toTimestamp) internal pure returns (uint256 _months) {
        require(fromTimestamp <= toTimestamp);
        (uint256 fromYear, uint256 fromMonth, ) = _daysToDate(fromTimestamp / SECONDS_PER_DAY);
        (uint256 toYear, uint256 toMonth, ) = _daysToDate(toTimestamp / SECONDS_PER_DAY);
        _months = toYear * 12 + toMonth - fromYear * 12 - fromMonth;
    }

    function diffDays(uint256 fromTimestamp, uint256 toTimestamp) internal pure returns (uint256 _days) {
        require(fromTimestamp <= toTimestamp);
        _days = (toTimestamp - fromTimestamp) / SECONDS_PER_DAY;
    }

    function diffHours(uint256 fromTimestamp, uint256 toTimestamp) internal pure returns (uint256 _hours) {
        require(fromTimestamp <= toTimestamp);
        _hours = (toTimestamp - fromTimestamp) / SECONDS_PER_HOUR;
    }

    function diffMinutes(uint256 fromTimestamp, uint256 toTimestamp) internal pure returns (uint256 _minutes) {
        require(fromTimestamp <= toTimestamp);
        _minutes = (toTimestamp - fromTimestamp) / SECONDS_PER_MINUTE;
    }

    function diffSeconds(uint256 fromTimestamp, uint256 toTimestamp) internal pure returns (uint256 _seconds) {
        require(fromTimestamp <= toTimestamp);
        _seconds = toTimestamp - fromTimestamp;
    }
}

File 7 of 8 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <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 GSN 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 payable) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

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

pragma solidity >=0.6.2 <0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 0;
    }

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

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (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");

        // solhint-disable-next-line avoid-low-level-calls
        (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");

        // solhint-disable-next-line avoid-low-level-calls
        (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");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                // solhint-disable-next-line no-inline-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",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"investor","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"DepositInvestment","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"investor","type":"address"},{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":false,"internalType":"uint256","name":"allocation","type":"uint256"}],"name":"InvestorAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"investor","type":"address"},{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":false,"internalType":"uint256","name":"allocation","type":"uint256"}],"name":"InvestorRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address[]","name":"investors","type":"address[]"},{"indexed":false,"internalType":"uint256[]","name":"tokenAllocations","type":"uint256[]"},{"indexed":false,"internalType":"address","name":"caller","type":"address"}],"name":"InvestorsAdded","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":"token","type":"address"},{"indexed":true,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RecoverToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"vestingMonth","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"releaseTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"releasePercentage","type":"uint256"}],"name":"TokenVestingAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferInvestment","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"investor","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"WithdrawnTokens","type":"event"},{"inputs":[{"internalType":"address[]","name":"_investors","type":"address[]"},{"internalType":"uint256[]","name":"_tokenAllocations","type":"uint256[]"}],"name":"addInvestors","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_releaseTime","type":"uint256"},{"internalType":"uint256","name":"_releasePercentage","type":"uint256"}],"name":"addVesting","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getInitialTimestamp","outputs":[{"internalType":"uint256","name":"timestamp","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"investors","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"investorsInfo","outputs":[{"internalType":"bool","name":"exists","type":"bool"},{"internalType":"uint256","name":"withdrawnTokens","type":"uint256"},{"internalType":"uint256","name":"tokensAllotment","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isFinalized","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isInitialized","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"recoverToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"releaseTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_timestamp","type":"uint256"}],"name":"setInitialTimestamp","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"vestingsInfo","outputs":[{"internalType":"uint256","name":"releaseTime","type":"uint256"},{"internalType":"uint256","name":"releasePercentage","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_investor","type":"address"}],"name":"withdrawableTokens","outputs":[{"internalType":"uint256","name":"tokens","type":"uint256"}],"stateMutability":"view","type":"function"}]

608060405260006005556008805461ffff191690553480156200002157600080fd5b50604051620019dd380380620019dd833981810160405260208110156200004757600080fd5b505160006200005562000202565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600380546001600160a01b0319166001600160a01b038316179055600254670de0b6b3a7640000906201518090620000e1906801158e460913d0000062000206565b600254620000f890601e830201601c840262000206565b6002546200010f90603c8302016024840262000206565b6002546200012690605a830201602b840262000206565b6002546200013d9060788302016032840262000206565b600254620001549060968302016039840262000206565b6002546200016b9060b48302016040840262000206565b600254620001829060d28302016046840262000206565b600254620001999060f0830201604c840262000206565b600254620001b19061010e8302016052840262000206565b600254620001c99061012c8302016058840262000206565b600254620001e19061014a830201605e840262000206565b600254620001f99061016d8302016064840262000206565b50505062000379565b3390565b6200021062000202565b6001600160a01b03166200022362000308565b6001600160a01b0316146200027f576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6200029c60016005546200031760201b62000d091790919060201c565b6005818155604080518082018252858152602080820186815260009586526006825294839020915182559351600190910155905481518481529151859391927fd4d57751fc984bdfa01c263f2f79036b591b11817b83070a95e1f21a1f7d7ab192908290030190a35050565b6000546001600160a01b031690565b60008282018381101562000372576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b61165480620003896000396000f3fe608060405234801561001057600080fd5b50600436106100ff5760003560e01c8063715018a6116100975780638da5cb5b116100665780638da5cb5b14610331578063a96f866814610339578063b29a814014610341578063f2fde38b1461036d576100ff565b8063715018a6146102d35780638bab6718146102db5780638d4e4083146103215780638d8f2adb14610329576100ff565b8063392e53cd116100d3578063392e53cd146102405780633feb5f2b1461025c5780634e33a097146102955780634edcd374146102cb576100ff565b80626f6ad0146101045780631517d62e1461013c57806321f926db14610161578063249eae4d1461017e575b600080fd5b61012a6004803603602081101561011a57600080fd5b50356001600160a01b0316610393565b60408051918252519081900360200190f35b61015f6004803603604081101561015257600080fd5b50803590602001356103eb565b005b61015f6004803603602081101561017757600080fd5b50356104c7565b61015f6004803603604081101561019457600080fd5b8101906020810181356401000000008111156101af57600080fd5b8201836020820111156101c157600080fd5b803590602001918460208302840111640100000000831117156101e357600080fd5b91939092909160208101903564010000000081111561020157600080fd5b82018360208201111561021357600080fd5b8035906020019184602083028401116401000000008311171561023557600080fd5b509092509050610581565b610248610725565b604080519115158252519081900360200190f35b6102796004803603602081101561027257600080fd5b503561072e565b604080516001600160a01b039092168252519081900360200190f35b6102b2600480360360208110156102ab57600080fd5b5035610758565b6040805192835260208301919091528051918290030190f35b61012a610771565b61015f610777565b610301600480360360208110156102f157600080fd5b50356001600160a01b0316610823565b604080519315158452602084019290925282820152519081900360600190f35b610248610848565b61015f610856565b610279610a13565b61015f610a22565b61015f6004803603604081101561035757600080fd5b506001600160a01b038135169060200135610b4f565b61015f6004803603602081101561038357600080fd5b50356001600160a01b0316610c07565b6001600160a01b0381166000908152600760205260408120816103b4610d6c565b905060006103c6836002015483610dae565b905060006103e1846001015483610dcf90919063ffffffff16565b9695505050505050565b6103f3610e2c565b6001600160a01b0316610404610a13565b6001600160a01b03161461044d576040805162461bcd60e51b815260206004820181905260248201526000805160206115d5833981519152604482015290519081900360640190fd5b60055461045b906001610d09565b6005818155604080518082018252858152602080820186815260009586526006825294839020915182559351600190910155905481518481529151859391927fd4d57751fc984bdfa01c263f2f79036b591b11817b83070a95e1f21a1f7d7ab192908290030190a35050565b6104cf610e2c565b6001600160a01b03166104e0610a13565b6001600160a01b031614610529576040805162461bcd60e51b815260206004820181905260248201526000805160206115d5833981519152604482015290519081900360640190fd5b60085460ff161561056f576040805162461bcd60e51b815260206004820152600b60248201526a1a5b9a5d1a585b1a5e995960aa1b604482015290519081900360640190fd5b6008805460ff19166001179055600255565b610589610e2c565b6001600160a01b031661059a610a13565b6001600160a01b0316146105e3576040805162461bcd60e51b815260206004820181905260248201526000805160206115d5833981519152604482015290519081900360640190fd5b828114610630576040805162461bcd60e51b8152602060048201526016602482015275646966666572656e74206172726179732073697a657360501b604482015290519081900360640190fd5b60005b8381101561067a5761067285858381811061064a57fe5b905060200201356001600160a01b031684848481811061066657fe5b90506020020135610e30565b600101610633565b507fa0327ab872014c035a6a3e1ff09051e9c4c9d8251bee6be9d80e4b2d7c11302b8484848433604051808060200180602001846001600160a01b031681526020018381038352888882818152602001925060200280828437600083820152601f01601f19169091018481038352868152602090810191508790870280828437600083820152604051601f909101601f1916909201829003995090975050505050505050a150505050565b60085460ff1681565b6004818154811061073e57600080fd5b6000918252602090912001546001600160a01b0316905081565b6006602052600090815260409020805460019091015482565b60025490565b61077f610e2c565b6001600160a01b0316610790610a13565b6001600160a01b0316146107d9576040805162461bcd60e51b815260206004820181905260248201526000805160206115d5833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60076020526000908152604090208054600182015460029092015460ff909116919083565b600854610100900460ff1681565b60076000610862610e2c565b6001600160a01b0316815260208101919091526040016000205460ff166108c9576040805162461bcd60e51b815260206004820152601660248201527513db9b1e481a5b9d995cdd1bdc9cc8185b1b1bddd95960521b604482015290519081900360640190fd5b60085460ff16610912576040805162461bcd60e51b815260206004820152600f60248201526e1b9bdd081a5b9a5d1a585b1a5e9959608a1b604482015290519081900360640190fd5b600060076000610920610e2c565b6001600160a01b03166001600160a01b031681526020019081526020016000209050600061095461094f610e2c565b610393565b9050600081116109955760405162461bcd60e51b81526004018080602001828103825260218152602001806115686021913960400191505060405180910390fd5b60018201546109a49082610d09565b60018301556109c76109b4610e2c565b6003546001600160a01b0316908361104a565b6109cf610e2c565b6001600160a01b03167f373d92bf7d9cdd58a8c86db5461f3cdcd325b803fdbac8d1b224a0f5fce847b8826040518082815260200191505060405180910390a25050565b6000546001600160a01b031690565b610a2a610e2c565b6001600160a01b0316610a3b610a13565b6001600160a01b031614610a84576040805162461bcd60e51b815260206004820181905260248201526000805160206115d5833981519152604482015290519081900360640190fd5b60085460ff16610acd576040805162461bcd60e51b815260206004820152600f60248201526e1b9bdd081a5b9a5d1a585b1a5e9959608a1b604482015290519081900360640190fd5b60005b60045460ff82161015610b4c576000610b0c60048360ff1681548110610af257fe5b6000918252602090912001546001600160a01b0316610393565b9050610b4360048360ff1681548110610b2157fe5b6000918252602090912001546003546001600160a01b0390811691168361104a565b50600101610ad0565b50565b610b57610e2c565b6001600160a01b0316610b68610a13565b6001600160a01b031614610bb1576040805162461bcd60e51b815260206004820181905260248201526000805160206115d5833981519152604482015290519081900360640190fd5b610bcd610bbc610e2c565b6001600160a01b038416908361104a565b60405181906001600160a01b038416907ffba2d3bdfb2d601eb66a89783a2c614856101cadce71556753c2edadd60c831c90600090a35050565b610c0f610e2c565b6001600160a01b0316610c20610a13565b6001600160a01b031614610c69576040805162461bcd60e51b815260206004820181905260248201526000805160206115d5833981519152604482015290519081900360640190fd5b6001600160a01b038116610cae5760405162461bcd60e51b815260040180806020018281038252602681526020018061151c6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b600082820183811015610d63576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b90505b92915050565b6000804290506000610d80600254836110a1565b90506000600681610d92846001610d09565b8152602081019190915260400160002060010154935050505090565b6000610d63670de0b6b3a7640000610dc960648187876110f5565b9061114e565b600082821115610e26576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b3390565b610e38610e2c565b6001600160a01b0316610e49610a13565b6001600160a01b031614610e92576040805162461bcd60e51b815260206004820181905260248201526000805160206115d5833981519152604482015290519081900360640190fd5b6001600160a01b038216610edf576040805162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b604482015290519081900360640190fd5b60008111610f1e5760405162461bcd60e51b815260040180806020018281038252602b815260200180611589602b913960400191505060405180910390fd5b6001600160a01b0382166000908152600760205260409020600281015415610f86576040805162461bcd60e51b81526020600482015260166024820152751a5b9d995cdd1bdc88185b1c9958591e48185919195960521b604482015290519081900360640190fd5b600281018290558054600160ff19909116811782556004805480830182556000919091527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b0180546001600160a01b0319166001600160a01b03861617905554610ff09083610d09565b600155610ffb610e2c565b6001600160a01b0316836001600160a01b03167f81bc7944e5f9c2b96369088e24ae41b5a80fcd26d2a8365ec2b301fdce1b7a3a846040518082815260200191505060405180910390a3505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261109c9084906111b5565b505050565b6000818311156110b057600080fd5b6000806110c262015180865b04611266565b50915091506000806110d96201518087816110bc57fe5b50600c9586029590910201939093039190910395945050505050565b60008261110457506000610d66565b8282028284828161111157fe5b0414610d635760405162461bcd60e51b81526004018080602001828103825260218152602001806115b46021913960400191505060405180910390fd5b60008082116111a4576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b8183816111ad57fe5b049392505050565b606061120a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166112fc9092919063ffffffff16565b80519091501561109c5780806020019051602081101561122957600080fd5b505161109c5760405162461bcd60e51b815260040180806020018281038252602a8152602001806115f5602a913960400191505060405180910390fd5b60008080836226496581018262023ab1600483020590506004600362023ab18302010590910390600062164b09610fa0600185010205905060046105b58202058303601f019250600061098f84605002816112bd57fe5b0590506000605061098f83020585039050600b820560301994909401606402929092018301996002600c90940290910392909201975095509350505050565b606061130b8484600085611315565b90505b9392505050565b6060824710156113565760405162461bcd60e51b81526004018080602001828103825260268152602001806115426026913960400191505060405180910390fd5b61135f85611471565b6113b0576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106113ef5780518252601f1990920191602091820191016113d0565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114611451576040519150601f19603f3d011682016040523d82523d6000602084013e611456565b606091505b5091509150611466828286611477565b979650505050505050565b3b151590565b6060831561148657508161130e565b8251156114965782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156114e05781810151838201526020016114c8565b50505050905090810190601f16801561150d5780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c6e6f20746f6b656e7320617661696c61626c6520666f722077697468647261776c74686520696e766573746f7220616c6c6f636174696f6e206d757374206265206d6f7265207468616e2030536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212206bb2edc38c0c3799fc038baf9f3ded851349bb8e556a4d4cd44c21c6a9783c2b64736f6c63430007040033000000000000000000000000aec7e1f531bb09115103c53ba76829910ec48966

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100ff5760003560e01c8063715018a6116100975780638da5cb5b116100665780638da5cb5b14610331578063a96f866814610339578063b29a814014610341578063f2fde38b1461036d576100ff565b8063715018a6146102d35780638bab6718146102db5780638d4e4083146103215780638d8f2adb14610329576100ff565b8063392e53cd116100d3578063392e53cd146102405780633feb5f2b1461025c5780634e33a097146102955780634edcd374146102cb576100ff565b80626f6ad0146101045780631517d62e1461013c57806321f926db14610161578063249eae4d1461017e575b600080fd5b61012a6004803603602081101561011a57600080fd5b50356001600160a01b0316610393565b60408051918252519081900360200190f35b61015f6004803603604081101561015257600080fd5b50803590602001356103eb565b005b61015f6004803603602081101561017757600080fd5b50356104c7565b61015f6004803603604081101561019457600080fd5b8101906020810181356401000000008111156101af57600080fd5b8201836020820111156101c157600080fd5b803590602001918460208302840111640100000000831117156101e357600080fd5b91939092909160208101903564010000000081111561020157600080fd5b82018360208201111561021357600080fd5b8035906020019184602083028401116401000000008311171561023557600080fd5b509092509050610581565b610248610725565b604080519115158252519081900360200190f35b6102796004803603602081101561027257600080fd5b503561072e565b604080516001600160a01b039092168252519081900360200190f35b6102b2600480360360208110156102ab57600080fd5b5035610758565b6040805192835260208301919091528051918290030190f35b61012a610771565b61015f610777565b610301600480360360208110156102f157600080fd5b50356001600160a01b0316610823565b604080519315158452602084019290925282820152519081900360600190f35b610248610848565b61015f610856565b610279610a13565b61015f610a22565b61015f6004803603604081101561035757600080fd5b506001600160a01b038135169060200135610b4f565b61015f6004803603602081101561038357600080fd5b50356001600160a01b0316610c07565b6001600160a01b0381166000908152600760205260408120816103b4610d6c565b905060006103c6836002015483610dae565b905060006103e1846001015483610dcf90919063ffffffff16565b9695505050505050565b6103f3610e2c565b6001600160a01b0316610404610a13565b6001600160a01b03161461044d576040805162461bcd60e51b815260206004820181905260248201526000805160206115d5833981519152604482015290519081900360640190fd5b60055461045b906001610d09565b6005818155604080518082018252858152602080820186815260009586526006825294839020915182559351600190910155905481518481529151859391927fd4d57751fc984bdfa01c263f2f79036b591b11817b83070a95e1f21a1f7d7ab192908290030190a35050565b6104cf610e2c565b6001600160a01b03166104e0610a13565b6001600160a01b031614610529576040805162461bcd60e51b815260206004820181905260248201526000805160206115d5833981519152604482015290519081900360640190fd5b60085460ff161561056f576040805162461bcd60e51b815260206004820152600b60248201526a1a5b9a5d1a585b1a5e995960aa1b604482015290519081900360640190fd5b6008805460ff19166001179055600255565b610589610e2c565b6001600160a01b031661059a610a13565b6001600160a01b0316146105e3576040805162461bcd60e51b815260206004820181905260248201526000805160206115d5833981519152604482015290519081900360640190fd5b828114610630576040805162461bcd60e51b8152602060048201526016602482015275646966666572656e74206172726179732073697a657360501b604482015290519081900360640190fd5b60005b8381101561067a5761067285858381811061064a57fe5b905060200201356001600160a01b031684848481811061066657fe5b90506020020135610e30565b600101610633565b507fa0327ab872014c035a6a3e1ff09051e9c4c9d8251bee6be9d80e4b2d7c11302b8484848433604051808060200180602001846001600160a01b031681526020018381038352888882818152602001925060200280828437600083820152601f01601f19169091018481038352868152602090810191508790870280828437600083820152604051601f909101601f1916909201829003995090975050505050505050a150505050565b60085460ff1681565b6004818154811061073e57600080fd5b6000918252602090912001546001600160a01b0316905081565b6006602052600090815260409020805460019091015482565b60025490565b61077f610e2c565b6001600160a01b0316610790610a13565b6001600160a01b0316146107d9576040805162461bcd60e51b815260206004820181905260248201526000805160206115d5833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60076020526000908152604090208054600182015460029092015460ff909116919083565b600854610100900460ff1681565b60076000610862610e2c565b6001600160a01b0316815260208101919091526040016000205460ff166108c9576040805162461bcd60e51b815260206004820152601660248201527513db9b1e481a5b9d995cdd1bdc9cc8185b1b1bddd95960521b604482015290519081900360640190fd5b60085460ff16610912576040805162461bcd60e51b815260206004820152600f60248201526e1b9bdd081a5b9a5d1a585b1a5e9959608a1b604482015290519081900360640190fd5b600060076000610920610e2c565b6001600160a01b03166001600160a01b031681526020019081526020016000209050600061095461094f610e2c565b610393565b9050600081116109955760405162461bcd60e51b81526004018080602001828103825260218152602001806115686021913960400191505060405180910390fd5b60018201546109a49082610d09565b60018301556109c76109b4610e2c565b6003546001600160a01b0316908361104a565b6109cf610e2c565b6001600160a01b03167f373d92bf7d9cdd58a8c86db5461f3cdcd325b803fdbac8d1b224a0f5fce847b8826040518082815260200191505060405180910390a25050565b6000546001600160a01b031690565b610a2a610e2c565b6001600160a01b0316610a3b610a13565b6001600160a01b031614610a84576040805162461bcd60e51b815260206004820181905260248201526000805160206115d5833981519152604482015290519081900360640190fd5b60085460ff16610acd576040805162461bcd60e51b815260206004820152600f60248201526e1b9bdd081a5b9a5d1a585b1a5e9959608a1b604482015290519081900360640190fd5b60005b60045460ff82161015610b4c576000610b0c60048360ff1681548110610af257fe5b6000918252602090912001546001600160a01b0316610393565b9050610b4360048360ff1681548110610b2157fe5b6000918252602090912001546003546001600160a01b0390811691168361104a565b50600101610ad0565b50565b610b57610e2c565b6001600160a01b0316610b68610a13565b6001600160a01b031614610bb1576040805162461bcd60e51b815260206004820181905260248201526000805160206115d5833981519152604482015290519081900360640190fd5b610bcd610bbc610e2c565b6001600160a01b038416908361104a565b60405181906001600160a01b038416907ffba2d3bdfb2d601eb66a89783a2c614856101cadce71556753c2edadd60c831c90600090a35050565b610c0f610e2c565b6001600160a01b0316610c20610a13565b6001600160a01b031614610c69576040805162461bcd60e51b815260206004820181905260248201526000805160206115d5833981519152604482015290519081900360640190fd5b6001600160a01b038116610cae5760405162461bcd60e51b815260040180806020018281038252602681526020018061151c6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b600082820183811015610d63576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b90505b92915050565b6000804290506000610d80600254836110a1565b90506000600681610d92846001610d09565b8152602081019190915260400160002060010154935050505090565b6000610d63670de0b6b3a7640000610dc960648187876110f5565b9061114e565b600082821115610e26576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b3390565b610e38610e2c565b6001600160a01b0316610e49610a13565b6001600160a01b031614610e92576040805162461bcd60e51b815260206004820181905260248201526000805160206115d5833981519152604482015290519081900360640190fd5b6001600160a01b038216610edf576040805162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b604482015290519081900360640190fd5b60008111610f1e5760405162461bcd60e51b815260040180806020018281038252602b815260200180611589602b913960400191505060405180910390fd5b6001600160a01b0382166000908152600760205260409020600281015415610f86576040805162461bcd60e51b81526020600482015260166024820152751a5b9d995cdd1bdc88185b1c9958591e48185919195960521b604482015290519081900360640190fd5b600281018290558054600160ff19909116811782556004805480830182556000919091527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b0180546001600160a01b0319166001600160a01b03861617905554610ff09083610d09565b600155610ffb610e2c565b6001600160a01b0316836001600160a01b03167f81bc7944e5f9c2b96369088e24ae41b5a80fcd26d2a8365ec2b301fdce1b7a3a846040518082815260200191505060405180910390a3505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261109c9084906111b5565b505050565b6000818311156110b057600080fd5b6000806110c262015180865b04611266565b50915091506000806110d96201518087816110bc57fe5b50600c9586029590910201939093039190910395945050505050565b60008261110457506000610d66565b8282028284828161111157fe5b0414610d635760405162461bcd60e51b81526004018080602001828103825260218152602001806115b46021913960400191505060405180910390fd5b60008082116111a4576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b8183816111ad57fe5b049392505050565b606061120a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166112fc9092919063ffffffff16565b80519091501561109c5780806020019051602081101561122957600080fd5b505161109c5760405162461bcd60e51b815260040180806020018281038252602a8152602001806115f5602a913960400191505060405180910390fd5b60008080836226496581018262023ab1600483020590506004600362023ab18302010590910390600062164b09610fa0600185010205905060046105b58202058303601f019250600061098f84605002816112bd57fe5b0590506000605061098f83020585039050600b820560301994909401606402929092018301996002600c90940290910392909201975095509350505050565b606061130b8484600085611315565b90505b9392505050565b6060824710156113565760405162461bcd60e51b81526004018080602001828103825260268152602001806115426026913960400191505060405180910390fd5b61135f85611471565b6113b0576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106113ef5780518252601f1990920191602091820191016113d0565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114611451576040519150601f19603f3d011682016040523d82523d6000602084013e611456565b606091505b5091509150611466828286611477565b979650505050505050565b3b151590565b6060831561148657508161130e565b8251156114965782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156114e05781810151838201526020016114c8565b50505050905090810190601f16801561150d5780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c6e6f20746f6b656e7320617661696c61626c6520666f722077697468647261776c74686520696e766573746f7220616c6c6f636174696f6e206d757374206265206d6f7265207468616e2030536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212206bb2edc38c0c3799fc038baf9f3ded851349bb8e556a4d4cd44c21c6a9783c2b64736f6c63430007040033

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

000000000000000000000000aec7e1f531bb09115103c53ba76829910ec48966

-----Decoded View---------------
Arg [0] : _token (address): 0xAec7e1f531Bb09115103C53ba76829910Ec48966

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000aec7e1f531bb09115103c53ba76829910ec48966


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.