Address Details
contract

0xa9383c8E895aa6d9B49404cbbC7b73b1c1DE8F20

Contract Name
InvestorsVestingReserve
Creator
0x9378a4–07b185 at 0xfc4012–8e3218
Balance
0 CELO ( )
Tokens
Fetching tokens...
Transactions
1 Transactions
Transfers
1 Transfers
Gas Used
126,643
Last Balance Update
14756289
This contract has been verified via Sourcify. View contract in Sourcify repository
Contract name:
InvestorsVestingReserve




Optimization enabled
true
Compiler version
v0.7.5+commit.eb77ed08




Optimization runs
200
EVM Version
istanbul




Verified at
2022-08-25T17:32:23.991969Z

contracts/reserve/InvestorsVestingReserve.sol

// SPDX-License-Identifier: gpl-3.0

pragma solidity 0.7.5;

import './ManagedVestingReserve.sol';

/**
 * @title InvestorsVestingReserve
 * @author Ethichub
 */
contract InvestorsVestingReserve is ManagedVestingReserve {

    constructor(
        IERC20 _token,
        uint256 _startTime, //  2 de febrero 2022 (1643756400)
        uint256 _endTime, // 1 de febrero 2025 (1738364400)
        uint256 _editAddressUntil // 2 de febrero 2022 (1643756400)
    ) ManagedVestingReserve(_token, _startTime, _endTime, _editAddressUntil) {}

    function initialize() external override {
        require(!initialized, 'InvestorsVestingReserve: Already initialized');
        require(
            token.transferFrom(msg.sender, address(this), 722221*10**18),
            'ManagedVestingReserve: Cannot transfer tokens from sender.'
        );
        locked[0x9A27Eb2DbCc4b5CAB7D9c598E651a6d8EB52C5E4] = 222222*10**18;
        locked[0x60869958A341DA3F69A8C4933844271e22C5Be76] = 444444*10**18;
        locked[0x46C5CFC2079309F4e7d9476a01730a60e2F1a164] = 55555*10**18;

        initialized = true;
    }
}
        

/_openzeppelin/contracts/GSN/Context.sol

// SPDX-License-Identifier: MIT

pragma solidity ^0.7.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;
    }
}
          

/_openzeppelin/contracts/access/Ownable.sol

// SPDX-License-Identifier: MIT

pragma solidity ^0.7.0;

import "../GSN/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 () {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view 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;
    }
}
          

/_openzeppelin/contracts/math/SafeMath.sol

// SPDX-License-Identifier: MIT

pragma solidity ^0.7.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, 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) {
        return sub(a, b, "SafeMath: subtraction overflow");
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * 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);
        uint256 c = a - b;

        return c;
    }

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

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts 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) {
        return div(a, b, "SafeMath: division by zero");
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts with custom message 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, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts 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) {
        return mod(a, b, "SafeMath: modulo by zero");
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts with custom message 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, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}
          

/_openzeppelin/contracts/token/ERC20/IERC20.sol

// SPDX-License-Identifier: MIT

pragma solidity ^0.7.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);
}
          

/_openzeppelin/contracts/token/ERC20/SafeERC20.sol

// SPDX-License-Identifier: MIT

pragma solidity ^0.7.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");
        }
    }
}
          

/_openzeppelin/contracts/utils/Address.sol

// SPDX-License-Identifier: MIT

pragma solidity ^0.7.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) {
        // According to EIP-1052, 0x0 is the value returned for not-yet created accounts
        // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
        // for accounts without code, i.e. `keccak256('')`
        bytes32 codehash;
        bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
        // solhint-disable-next-line no-inline-assembly
        assembly { codehash := extcodehash(account) }
        return (codehash != accountHash && codehash != 0x0);
    }

    /**
     * @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");
        return _functionCallWithValue(target, data, value, errorMessage);
    }

    function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {
        require(isContract(target), "Address: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: weiValue }(data);
        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);
            }
        }
    }
}
          

/contracts/reserve/ManagedVestingReserve.sol

// SPDX-License-Identifier: gpl-3.0

pragma solidity 0.7.5;
import './VestingReserve.sol';

/**
 * @title VestingReserve
 * @dev A vested reserve, freeing 1% per day
 * @author Ethichub
 */
abstract contract ManagedVestingReserve is VestingReserve {
    constructor(
        IERC20 _token,
        uint256 _startTime,
        uint256 _endTime,
        uint256 _editAddressUntil
    ) VestingReserve(_token, _startTime, _endTime, _editAddressUntil) {}

    function claim(uint256 _amount) external override {
        revert('ManagedVestingReserve: Unsupported method');
    }
}
          

/contracts/reserve/VestingReserve.sol

// SPDX-License-Identifier: gpl-3.0

pragma solidity 0.7.5;

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';


/**
 * @title VestingReserve
 * @dev A vested reserve, freeing 1% per day
 * @author Ethichub
 */
contract VestingReserve is Ownable {
    using SafeMath for uint256;
    using SafeERC20 for IERC20;

    IERC20 public token;

    bool public initialized;

    // Dates
    uint256 public startTime;
    uint256 public endTime;
    uint256 public editAddressUntil;

    // Amounts
    mapping(address => uint256) public locked;
    mapping(address => uint256) public claimed;

    // Events
    event Fund(address indexed recipient, uint256 amount);
    event Claim(address indexed recipient, uint256 claimed);
    event ToggleDisable(address recipient, bool disabled);
    event ChangeTokenOwnership(address _account, address indexed _newAccount);

    modifier isInitialized() {
        require(initialized, 'VestingReserve: Contract not initialized');
        _;
    }

    constructor(
        IERC20 _token,
        uint256 _startTime,
        uint256 _endTime,
        uint256 _editAddressUntil
    ) {
        token = _token;
        require(_endTime > _startTime, 'VestingReserve: end time must be later than start time');
        startTime = _startTime;
        endTime = _endTime;
        require(_editAddressUntil <= _endTime, 'VestingReserve: _editAddressUntil time should be before than end time');
        editAddressUntil = _editAddressUntil;
    }

    function initialize() external virtual {}

    function _vestedOf(address _account) internal view returns (uint256) {
        if (block.timestamp < startTime) {
            return 0;
        } else if (block.timestamp > endTime) {
            return locked[_account];
        } else if (locked[_account] == 0) {
            return 0;
        }

        uint256 amountLocked = locked[_account];

        uint256 vested =
            (amountLocked.mul(block.timestamp.sub(startTime)).div(endTime.sub(startTime)));
        if (vested > amountLocked) {
            return amountLocked;
        } else {
            return vested;
        }
    }

    function _lockedOf(address _account) internal view returns (uint256) {
        return locked[_account].sub(_vestedOf(_account));
    }

    function changeTokenOwnership(address _account, address _newAccount)
        virtual
        public
        isInitialized
        onlyOwner
    {
        require(
            block.timestamp <= editAddressUntil,
            'VestingReserve: Expired date to change token ownership'
        );
        locked[_newAccount] = locked[_account];
        claimed[_newAccount] = claimed[_account];
        locked[_account] = 0;
        claimed[_account] = 0;
        emit ChangeTokenOwnership(_account, _newAccount);
    }

    function _claim(address _account, uint256 _amount) internal {
        uint256 claimable = _vestedOf(_account).sub(claimed[_account]);
        require(claimable > 0, 'VestingReserve: No tokens to transfer');
        require(_amount > 0, 'VestingReserve: Amount cannot be zero');

        if (_amount > claimable) {
            _amount = claimable;
        }

        claimed[_account] = claimed[_account].add(_amount);
        token.safeTransfer(_account, _amount);
        emit Claim(_account, _amount);
    }

    function claim(uint256 _amount) external virtual isInitialized {
        _claim(msg.sender, _amount);
    }

    function claimFor(address _account, uint256 _amount) external isInitialized onlyOwner {
        _claim(_account, _amount);
    }

    function vestedOf(address _account) external view isInitialized returns (uint256) {
        return _vestedOf(_account);
    }

    function lockedOf(address _account) external view isInitialized returns (uint256) {
        return locked[_account].sub(_vestedOf(_account));
    }
}
          

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"_token","internalType":"contract IERC20"},{"type":"uint256","name":"_startTime","internalType":"uint256"},{"type":"uint256","name":"_endTime","internalType":"uint256"},{"type":"uint256","name":"_editAddressUntil","internalType":"uint256"}]},{"type":"event","name":"ChangeTokenOwnership","inputs":[{"type":"address","name":"_account","internalType":"address","indexed":false},{"type":"address","name":"_newAccount","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"Claim","inputs":[{"type":"address","name":"recipient","internalType":"address","indexed":true},{"type":"uint256","name":"claimed","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"Fund","inputs":[{"type":"address","name":"recipient","internalType":"address","indexed":true},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":true},{"type":"address","name":"newOwner","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"ToggleDisable","inputs":[{"type":"address","name":"recipient","internalType":"address","indexed":false},{"type":"bool","name":"disabled","internalType":"bool","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"changeTokenOwnership","inputs":[{"type":"address","name":"_account","internalType":"address"},{"type":"address","name":"_newAccount","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"claim","inputs":[{"type":"uint256","name":"_amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"claimFor","inputs":[{"type":"address","name":"_account","internalType":"address"},{"type":"uint256","name":"_amount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"claimed","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"editAddressUntil","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"endTime","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"initialize","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"initialized","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"locked","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"lockedOf","inputs":[{"type":"address","name":"_account","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"startTime","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IERC20"}],"name":"token","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"vestedOf","inputs":[{"type":"address","name":"_account","internalType":"address"}]}]
            

Deployed ByteCode

0x608060405234801561001057600080fd5b50600436106101005760003560e01c80638da5cb5b11610097578063c884ef8311610066578063c884ef8314610244578063cbf9fe5f1461026a578063f2fde38b14610290578063fc0c546a146102b657610100565b80638da5cb5b146101cc57806394477104146101f0578063a5f1e28214610216578063a6d514251461023c57610100565b8063379607f5116100d3578063379607f514610197578063715018a6146101b457806378e97925146101bc5780638129fc1c146101c457610100565b80630de0565914610105578063158ef93e1461013357806318f357671461014f5780633197cbb61461017d575b600080fd5b6101316004803603604081101561011b57600080fd5b506001600160a01b0381351690602001356102be565b005b61013b61036c565b604080519115158252519081900360200190f35b6101316004803603604081101561016557600080fd5b506001600160a01b038135811691602001351661037c565b6101856104db565b60408051918252519081900360200190f35b610131600480360360208110156101ad57600080fd5b50356104e1565b610131610518565b6101856105ba565b6101316105c0565b6101d461078c565b604080516001600160a01b039092168252519081900360200190f35b6101856004803603602081101561020657600080fd5b50356001600160a01b031661079b565b6101856004803603602081101561022c57600080fd5b50356001600160a01b03166107f7565b61018561086d565b6101856004803603602081101561025a57600080fd5b50356001600160a01b0316610873565b6101856004803603602081101561028057600080fd5b50356001600160a01b0316610885565b610131600480360360208110156102a657600080fd5b50356001600160a01b0316610897565b6101d461098f565b600154600160a01b900460ff166103065760405162461bcd60e51b81526004018080602001828103825260288152602001806110e76028913960400191505060405180910390fd5b61030e61099e565b6000546001600160a01b0390811691161461035e576040805162461bcd60e51b815260206004820181905260248201526000805160206111f1833981519152604482015290519081900360640190fd5b61036882826109a2565b5050565b600154600160a01b900460ff1681565b600154600160a01b900460ff166103c45760405162461bcd60e51b81526004018080602001828103825260288152602001806110e76028913960400191505060405180910390fd5b6103cc61099e565b6000546001600160a01b0390811691161461041c576040805162461bcd60e51b815260206004820181905260248201526000805160206111f1833981519152604482015290519081900360640190fd5b60045442111561045d5760405162461bcd60e51b815260040180806020018281038252603681526020018061119a6036913960400191505060405180910390fd5b6001600160a01b038281166000818152600560209081526040808320805495871680855282852096909655848452600683528184208054878652838620558585529084905592909255815192835290517f462a7d1ade6493f20b5b901b2be126cdbbed9229c1bd73642949d8d0919e5b6e9281900390910190a25050565b60035481565b60405162461bcd60e51b81526004018080602001828103825260298152602001806112116029913960400191505060405180910390fd5b61052061099e565b6000546001600160a01b03908116911614610570576040805162461bcd60e51b815260206004820181905260248201526000805160206111f1833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60025481565b600154600160a01b900460ff16156106095760405162461bcd60e51b815260040180806020018281038252602c81526020018061116e602c913960400191505060405180910390fd5b600154604080516323b872dd60e01b81523360048201523060248201526998efadc9d12560940000604482015290516001600160a01b03909216916323b872dd916064808201926020929091908290030181600087803b15801561066c57600080fd5b505af1158015610680573d6000803e3d6000fd5b505050506040513d602081101561069657600080fd5b50516106d35760405162461bcd60e51b815260040180806020018281038252603a815260200180611134603a913960400191505060405180910390fd5b6005602052692f0eadc32162377800007f4606846ad1c833354e68d66b64c821fe7b5e1a697b6f9049003529b8bbc4a36c55695e1d5b8642c46ef000007fe79b369f4339902e540881b6ebf8c30fc5013aad4f33cfadb5afcf3436bb6ddb557346c5cfc2079309f4e7d9476a01730a60e2f1a164600052690bc3a4806cfeba2c00007f2cec2193276e6cf1a4149c5e1e89e259866cde54c205f12aea32f0459924a9fc556001805460ff60a01b1916600160a01b179055565b6000546001600160a01b031690565b600154600090600160a01b900460ff166107e65760405162461bcd60e51b81526004018080602001828103825260288152602001806110e76028913960400191505060405180910390fd5b6107ef82610aed565b90505b919050565b600154600090600160a01b900460ff166108425760405162461bcd60e51b81526004018080602001828103825260288152602001806110e76028913960400191505060405180910390fd5b6107ef61084e83610aed565b6001600160a01b03841660009081526005602052604090205490610bbf565b60045481565b60066020526000908152604090205481565b60056020526000908152604090205481565b61089f61099e565b6000546001600160a01b039081169116146108ef576040805162461bcd60e51b815260206004820181905260248201526000805160206111f1833981519152604482015290519081900360640190fd5b6001600160a01b0381166109345760405162461bcd60e51b81526004018080602001828103825260268152602001806110c16026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b031681565b3390565b6001600160a01b0382166000908152600660205260408120546109ce906109c885610aed565b90610bbf565b905060008111610a0f5760405162461bcd60e51b815260040180806020018281038252602581526020018061123a6025913960400191505060405180910390fd5b60008211610a4e5760405162461bcd60e51b815260040180806020018281038252602581526020018061110f6025913960400191505060405180910390fd5b80821115610a5a578091505b6001600160a01b038316600090815260066020526040902054610a7d9083610c0a565b6001600160a01b03808516600090815260066020526040902091909155600154610aa991168484610c64565b6040805183815290516001600160a01b038516917f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d4919081900360200190a2505050565b6000600254421015610b01575060006107f2565b600354421115610b2a57506001600160a01b0381166000908152600560205260409020546107f2565b6001600160a01b038216600090815260056020526040902054610b4f575060006107f2565b6001600160a01b038216600090815260056020526040812054600254600354919291610ba491610b7f9190610bbf565b610b9e610b9760025442610bbf90919063ffffffff16565b8590610cbb565b90610d14565b905081811115610bb6575090506107f2565b91506107f29050565b6000610c0183836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610d56565b90505b92915050565b600082820183811015610c01576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610cb6908490610ded565b505050565b600082610cca57506000610c04565b82820282848281610cd757fe5b0414610c015760405162461bcd60e51b81526004018080602001828103825260218152602001806111d06021913960400191505060405180910390fd5b6000610c0183836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610e9e565b60008184841115610de55760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610daa578181015183820152602001610d92565b50505050905090810190601f168015610dd75780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6060610e42826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610f039092919063ffffffff16565b805190915015610cb657808060200190516020811015610e6157600080fd5b5051610cb65760405162461bcd60e51b815260040180806020018281038252602a81526020018061125f602a913960400191505060405180910390fd5b60008183610eed5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610daa578181015183820152602001610d92565b506000838581610ef957fe5b0495945050505050565b6060610f128484600085610f1a565b949350505050565b6060610f2585611087565b610f76576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310610fb55780518252601f199092019160209182019101610f96565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114611017576040519150601f19603f3d011682016040523d82523d6000602084013e61101c565b606091505b50915091508115611030579150610f129050565b8051156110405780518082602001fd5b60405162461bcd60e51b8152602060048201818152865160248401528651879391928392604401919085019080838360008315610daa578181015183820152602001610d92565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470818114801590610f1257505015159291505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737356657374696e67526573657276653a20436f6e7472616374206e6f7420696e697469616c697a656456657374696e67526573657276653a20416d6f756e742063616e6e6f74206265207a65726f4d616e6167656456657374696e67526573657276653a2043616e6e6f74207472616e7366657220746f6b656e732066726f6d2073656e6465722e496e766573746f727356657374696e67526573657276653a20416c726561647920696e697469616c697a656456657374696e67526573657276653a2045787069726564206461746520746f206368616e676520746f6b656e206f776e657273686970536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65724d616e6167656456657374696e67526573657276653a20556e737570706f72746564206d6574686f6456657374696e67526573657276653a204e6f20746f6b656e7320746f207472616e736665725361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220f8a67170f86599411d5a6b9d3fc4d0ceff64c73effc6e112da987f7fad4b8d8164736f6c63430007050033