ETH Price: $3,321.34 (-1.35%)

Contract

0x82C5C163239aA28a23323076Ed75bFCfBc51f4Fe
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Deposit130186602021-08-13 19:12:011253 days ago1628881921IN
LaneAxis: Marketing
0 ETH0.0120943859.7722726

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Lockup

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 200 runs

Other Settings:
constantinople EvmVersion
File 1 of 6 : Lockup.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.12;
pragma experimental ABIEncoderV2;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "solowei/contracts/TwoStageOwnable.sol";

contract Lockup is TwoStageOwnable {
    using SafeMath for uint256;
    using SafeERC20 for IERC20;

    struct DepositData {
        uint256 amount;
        uint256 withdrawn;
        uint256 depositedAt;
        uint256 lockupEndsAt;
        uint256 unlockEndsAt;
    }

    IERC20 public token;

    uint256 private _unlockIntervalDuration;
    uint256 private _lockupDuration;
    uint256 private _unlockDuration;
    uint256 private _unlockIntervalsCount;
    uint256 private _totalDeposit;
    DepositData[] private _deposits;

    function getTimestamp() internal view virtual returns (uint256) {
        return block.timestamp;
    }

    function unlockIntervalsCount() public view returns (uint256) {
        return _unlockIntervalsCount;
    }

    function lockupDuration() public view returns (uint256) {
        return _lockupDuration;
    }

    function totalDeposit() public view returns (uint256) {
        return _totalDeposit;
    }

    function unlockDuration() public view returns (uint256) {
        return _unlockDuration;
    }

    function availableToWithdraw(uint256 id) public view returns (uint256 amountToWithdraw) {
        DepositData storage deposit = _getDeposit(id);
        uint256 timestamp = getTimestamp();
        if (timestamp >= deposit.lockupEndsAt) {
            uint256 pastIntervalsCount = timestamp.sub(deposit.lockupEndsAt).div(_unlockIntervalDuration);
            amountToWithdraw = deposit.amount.mul(pastIntervalsCount).div(_unlockIntervalsCount);
            if (deposit.amount < amountToWithdraw) {
                amountToWithdraw = deposit.amount;
            }
            amountToWithdraw = amountToWithdraw.sub(deposit.withdrawn);
        }
    }

    function getDeposit(uint256 id) public view returns (DepositData memory) {
        return _getDeposit(id);
    }

    function getDeposits(
        uint256 offset,
        uint256 limit
    ) public view returns (DepositData[] memory depositData) {
        uint256 depositsLength = _deposits.length;
        if (offset >= depositsLength) return new DepositData[](0);
        uint256 to = offset.add(limit);
        if (depositsLength < to) to = depositsLength;
        depositData = new DepositData[](to - offset);
        for (uint256 i = 0; i < depositData.length; i++) depositData[i] = _deposits[offset + i];
    }

    function getDepositsCount() public view returns (uint256) {
        return _deposits.length;
    }

    event Deposited(address indexed account, uint256 depositId, uint256 amount);
    event Withdrawn(address indexed account, uint256 depositId, uint256 amount);

    constructor(
        address owner_,
        IERC20 token_,
        uint256 lockupDuration_,
        uint256 unlockDuration_,
        uint256 unlockIntervalsCount_
    ) public TwoStageOwnable(owner_) {
        require(lockupDuration_ > 0, "LockupDuration not positive");
        require(unlockDuration_ > 0, "UnlockDuration not positive");
        require(unlockIntervalsCount_ > 0, "UnlockIntervalsCount not positive");
        token = token_;
        _lockupDuration = lockupDuration_ * 1 weeks;
        _unlockDuration = unlockDuration_ * 1 weeks;
        _unlockIntervalsCount = unlockIntervalsCount_;
        _unlockIntervalDuration = _unlockDuration.div(unlockIntervalsCount_);
    }

    function deposit(uint256 amount) external onlyOwner onlyPositiveAmount(amount) returns (bool) {
        address caller = msg.sender;
        uint256 timestamp = getTimestamp();
        uint256 depositId = _deposits.length;
        _totalDeposit = _totalDeposit.add(amount);
        _deposits.push();
        DepositData storage deposit_ = _deposits[depositId];
        deposit_.amount = amount;
        deposit_.depositedAt = timestamp;
        deposit_.lockupEndsAt = timestamp.add(_lockupDuration);
        deposit_.unlockEndsAt = _unlockDuration.add(deposit_.lockupEndsAt);
        token.safeTransferFrom(caller, address(this), amount);
        emit Deposited(caller, depositId, amount);
        return true;
    }

    function withdraw(uint256 id, uint256 amount) external onlyOwner onlyPositiveAmount(amount) returns (bool) {
        address caller = msg.sender;
        require(amount <= availableToWithdraw(id), "Not enough available tokens");
        _totalDeposit = _totalDeposit.sub(amount);
        DepositData storage deposit_ = _deposits[id];
        deposit_.withdrawn = deposit_.withdrawn.add(amount);
        token.safeTransfer(caller, amount);
        emit Withdrawn(caller, id, amount);
        return true;
    }

    function _getDeposit(uint256 id) internal view returns (DepositData storage) {
        require(id < _deposits.length, "Invalid deposit id");
        return _deposits[id];
    }

    modifier onlyPositiveAmount(uint256 amount) {
        require(amount > 0, "Amount not positive");
        _;
    }
}

File 2 of 6 : 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 3 of 6 : 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 4 of 6 : 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 5 of 6 : 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);
            }
        }
    }
}

File 6 of 6 : TwoStageOwnable.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.12;

abstract contract TwoStageOwnable {
    address private _nominatedOwner;
    address private _owner;

    function nominatedOwner() public view returns (address) {
        return _nominatedOwner;
    }

    function owner() public view returns (address) {
        return _owner;
    }

    event OwnerChanged(address indexed newOwner);
    event OwnerNominated(address indexed nominatedOwner);

    constructor(address owner_) internal {
        require(owner_ != address(0), "Owner is zero");
        _setOwner(owner_);
    }

    function acceptOwnership() external returns (bool success) {
        require(msg.sender == _nominatedOwner, "Not nominated to ownership");
        _setOwner(_nominatedOwner);
        return true;
    }

    function nominateNewOwner(address owner_) external onlyOwner returns (bool success) {
        _nominateNewOwner(owner_);
        return true;
    }

    modifier onlyOwner {
        require(msg.sender == _owner, "Not owner");
        _;
    }

    function _nominateNewOwner(address owner_) internal {
        if (_nominatedOwner == owner_) return;
        require(_owner != owner_, "Already owner");
        _nominatedOwner = owner_;
        emit OwnerNominated(owner_);
    }

    function _setOwner(address newOwner) internal {
        if (_owner == newOwner) return;
        _owner = newOwner;
        _nominatedOwner = address(0);
        emit OwnerChanged(newOwner);
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"owner_","type":"address"},{"internalType":"contract IERC20","name":"token_","type":"address"},{"internalType":"uint256","name":"lockupDuration_","type":"uint256"},{"internalType":"uint256","name":"unlockDuration_","type":"uint256"},{"internalType":"uint256","name":"unlockIntervalsCount_","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"depositId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposited","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"nominatedOwner","type":"address"}],"name":"OwnerNominated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"depositId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdrawn","type":"event"},{"inputs":[],"name":"acceptOwnership","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"availableToWithdraw","outputs":[{"internalType":"uint256","name":"amountToWithdraw","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"deposit","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getDeposit","outputs":[{"components":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"withdrawn","type":"uint256"},{"internalType":"uint256","name":"depositedAt","type":"uint256"},{"internalType":"uint256","name":"lockupEndsAt","type":"uint256"},{"internalType":"uint256","name":"unlockEndsAt","type":"uint256"}],"internalType":"struct Lockup.DepositData","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"offset","type":"uint256"},{"internalType":"uint256","name":"limit","type":"uint256"}],"name":"getDeposits","outputs":[{"components":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"withdrawn","type":"uint256"},{"internalType":"uint256","name":"depositedAt","type":"uint256"},{"internalType":"uint256","name":"lockupEndsAt","type":"uint256"},{"internalType":"uint256","name":"unlockEndsAt","type":"uint256"}],"internalType":"struct Lockup.DepositData[]","name":"depositData","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDepositsCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockupDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner_","type":"address"}],"name":"nominateNewOwner","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"nominatedOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalDeposit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unlockDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unlockIntervalsCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b50604051620014bb380380620014bb83398101604081905262000034916200025c565b846001600160a01b03811662000081576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200007890620002b3565b60405180910390fd5b6200008c816200019c565b5060008311620000ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000078906200037e565b6000821162000107576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200007890620002ea565b6000811162000144576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620000789062000321565b600280546001600160a01b0319166001600160a01b03861617905562093a808381026004558202600581905560068290556200018d90826200020c602090811b6200075a17901c565b60035550620004029350505050565b6001546001600160a01b0382811691161415620001b95762000209565b600180546001600160a01b0383166001600160a01b031991821681179092556000805490911681556040517fa2ea9883a321a3e97b8266c2b078bfeec6d50c711ed71f874a90d500ae2eaf369190a25b50565b60008082116200024a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200007890620003b5565b8183816200025457fe5b049392505050565b600080600080600060a0868803121562000274578081fd5b85516200028181620003ec565b60208701519095506200029481620003ec565b6040870151606088015160809098015196999198509695945092505050565b6020808252600d908201527f4f776e6572206973207a65726f00000000000000000000000000000000000000604082015260600190565b6020808252601b908201527f556e6c6f636b4475726174696f6e206e6f7420706f7369746976650000000000604082015260600190565b60208082526021908201527f556e6c6f636b496e74657276616c73436f756e74206e6f7420706f736974697660408201527f6500000000000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601b908201527f4c6f636b75704475726174696f6e206e6f7420706f7369746976650000000000604082015260600190565b6020808252601a908201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604082015260600190565b6001600160a01b03811681146200020957600080fd5b6110a980620004126000396000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c806385c3f15511610097578063b6b55f2511610066578063b6b55f25146101bb578063d3752830146101ce578063f6153ccd146101ee578063fc0c546a146101f6576100f5565b806385c3f155146101835780638a1fcd601461018b5780638da5cb5b146101935780639f9fb9681461019b576100f5565b80634c5822e4116100d35780634c5822e41461014b5780634d02fe6f1461015357806353a47bb71461016657806379ba50971461017b576100f5565b80631627540c146100fa5780631ada70a814610123578063441a3e7014610138575b600080fd5b61010d610108366004610bbb565b6101fe565b60405161011a9190610d26565b60405180910390f35b61012b610245565b60405161011a9190611030565b61010d610146366004610c1a565b61024b565b61012b610376565b61012b610161366004610c02565b61037c565b61016e61040a565b60405161011a9190610c87565b61010d610419565b61012b61045f565b61012b610465565b61016e61046b565b6101ae6101a9366004610c02565b61047a565b60405161011a9190611022565b61010d6101c9366004610c02565b6104ca565b6101e16101dc366004610c1a565b610600565b60405161011a9190610cd8565b61012b610745565b61016e61074b565b6001546000906001600160a01b031633146102345760405162461bcd60e51b815260040161022b90610f7e565b60405180910390fd5b61023d8261078c565b506001919050565b60045490565b6001546000906001600160a01b031633146102785760405162461bcd60e51b815260040161022b90610f7e565b81600081116102995760405162461bcd60e51b815260040161022b90610e44565b336102a38561037c565b8411156102c25760405162461bcd60e51b815260040161022b90610ea8565b6007546102cf908561081e565b6007819055506000600886815481106102e457fe5b9060005260206000209060050201905061030b85826001015461084690919063ffffffff16565b6001820155600254610327906001600160a01b03168387610872565b816001600160a01b03167f92ccf450a286a957af52509bc1c9939d1a6a481783e142e41e2499f0bb66ebc68787604051610362929190611039565b60405180910390a250600195945050505050565b60085490565b600080610388836108cd565b90506000610394610913565b9050816003015481106104035760006103c66003546103c085600301548561081e90919063ffffffff16565b9061075a565b60065484549192506103dc916103c09084610917565b935083836000015410156103ef57825493505b60018301546103ff90859061081e565b9350505b5050919050565b6000546001600160a01b031690565b600080546001600160a01b031633146104445760405162461bcd60e51b815260040161022b90610f47565b600054610459906001600160a01b0316610951565b50600190565b60065490565b60055490565b6001546001600160a01b031690565b610482610b8c565b61048b826108cd565b6040805160a081018252825481526001830154602082015260028301549181019190915260038201546060820152600490910154608082015292915050565b6001546000906001600160a01b031633146104f75760405162461bcd60e51b815260040161022b90610f7e565b81600081116105185760405162461bcd60e51b815260040161022b90610e44565b336000610523610913565b600854600754919250906105379087610846565b60075560088054600101808255600082815291908390811061055557fe5b6000918252602090912060059091020187815560028101849055600454909150610580908490610846565b6003820181905560055461059391610846565b60048201556002546105b0906001600160a01b031685308a6109be565b836001600160a01b03167f73a19dd210f1a7f902193214c0ee91dd35ee5b4d920cba8d519eca65a7b488ca83896040516105eb929190611039565b60405180910390a25060019695505050505050565b60085460609080841061064757604080516000808252602082019092529061063e565b61062b610b8c565b8152602001906001900390816106235790505b5091505061073f565b60006106538585610846565b9050808210156106605750805b84810367ffffffffffffffff8111801561067957600080fd5b506040519080825280602002602001820160405280156106b357816020015b6106a0610b8c565b8152602001906001900390816106985790505b50925060005b835181101561073b576008818701815481106106d157fe5b90600052602060002090600502016040518060a00160405290816000820154815260200160018201548152602001600282015481526020016003820154815260200160048201548152505084828151811061072857fe5b60209081029190910101526001016106b9565b5050505b92915050565b60075490565b6002546001600160a01b031681565b600080821161077b5760405162461bcd60e51b815260040161022b90610e71565b81838161078457fe5b049392505050565b6000546001600160a01b03828116911614156107a75761081b565b6001546001600160a01b03828116911614156107d55760405162461bcd60e51b815260040161022b90610f20565b600080546001600160a01b0319166001600160a01b038316908117825560405190917f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce2291a25b50565b6000828211156108405760405162461bcd60e51b815260040161022b90610dc7565b50900390565b60008282018381101561086b5760405162461bcd60e51b815260040161022b90610d64565b9392505050565b6108c88363a9059cbb60e01b8484604051602401610891929190610cbf565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526109e5565b505050565b60085460009082106108f15760405162461bcd60e51b815260040161022b90610d9b565b600882815481106108fe57fe5b90600052602060002090600502019050919050565b4290565b6000826109265750600061073f565b8282028284828161093357fe5b041461086b5760405162461bcd60e51b815260040161022b90610edf565b6001546001600160a01b038281169116141561096c5761081b565b600180546001600160a01b0383166001600160a01b031991821681179092556000805490911681556040517fa2ea9883a321a3e97b8266c2b078bfeec6d50c711ed71f874a90d500ae2eaf369190a250565b6109df846323b872dd60e01b85858560405160240161089193929190610c9b565b50505050565b6060610a3a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610a749092919063ffffffff16565b8051909150156108c85780806020019051810190610a589190610be2565b6108c85760405162461bcd60e51b815260040161022b90610fd8565b6060610a838484600085610a8b565b949350505050565b60603031831115610aae5760405162461bcd60e51b815260040161022b90610dfe565b610ab785610b4d565b610ad35760405162461bcd60e51b815260040161022b90610fa1565b60006060866001600160a01b03168587604051610af09190610c6b565b60006040518083038185875af1925050503d8060008114610b2d576040519150601f19603f3d011682016040523d82523d6000602084013e610b32565b606091505b5091509150610b42828286610b53565b979650505050505050565b3b151590565b60608315610b6257508161086b565b825115610b725782518084602001fd5b8160405162461bcd60e51b815260040161022b9190610d31565b6040518060a0016040528060008152602001600081526020016000815260200160008152602001600081525090565b600060208284031215610bcc578081fd5b81356001600160a01b038116811461086b578182fd5b600060208284031215610bf3578081fd5b8151801515811461086b578182fd5b600060208284031215610c13578081fd5b5035919050565b60008060408385031215610c2c578081fd5b50508035926020909101359150565b80518252602081015160208301526040810151604083015260608101516060830152608081015160808301525050565b60008251610c7d818460208701611047565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b6020808252825182820181905260009190848201906040850190845b81811015610d1a57610d07838551610c3b565b9284019260a09290920191600101610cf4565b50909695505050505050565b901515815260200190565b6000602082528251806020840152610d50816040850160208701611047565b601f01601f19169190910160400192915050565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b602080825260129082015271125b9d985b1a590819195c1bdcda5d081a5960721b604082015260600190565b6020808252601e908201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604082015260600190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6040820152651c8818d85b1b60d21b606082015260800190565b602080825260139082015272416d6f756e74206e6f7420706f73697469766560681b604082015260600190565b6020808252601a908201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604082015260600190565b6020808252601b908201527f4e6f7420656e6f75676820617661696c61626c6520746f6b656e730000000000604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b6020808252600d908201526c20b63932b0b23c9037bbb732b960991b604082015260600190565b6020808252601a908201527f4e6f74206e6f6d696e6174656420746f206f776e657273686970000000000000604082015260600190565b6020808252600990820152682737ba1037bbb732b960b91b604082015260600190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b60a0810161073f8284610c3b565b90815260200190565b918252602082015260400190565b60005b8381101561106257818101518382015260200161104a565b838111156109df575050600091015256fea2646970667358221220d30ff0150dff6db6b74835c761288fabdd267ba73e47346aeea229d3cc6da2fb64736f6c634300060c0033000000000000000000000000eacd9a721cc7419277ca161bd1fd72e35c77c84a000000000000000000000000f0c5831ec3da15f3696b4dad8b21c7ce2f007f28000000000000000000000000000000000000000000000000000000000000003800000000000000000000000000000000000000000000000000000000000000d00000000000000000000000000000000000000000000000000000000000000034

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100f55760003560e01c806385c3f15511610097578063b6b55f2511610066578063b6b55f25146101bb578063d3752830146101ce578063f6153ccd146101ee578063fc0c546a146101f6576100f5565b806385c3f155146101835780638a1fcd601461018b5780638da5cb5b146101935780639f9fb9681461019b576100f5565b80634c5822e4116100d35780634c5822e41461014b5780634d02fe6f1461015357806353a47bb71461016657806379ba50971461017b576100f5565b80631627540c146100fa5780631ada70a814610123578063441a3e7014610138575b600080fd5b61010d610108366004610bbb565b6101fe565b60405161011a9190610d26565b60405180910390f35b61012b610245565b60405161011a9190611030565b61010d610146366004610c1a565b61024b565b61012b610376565b61012b610161366004610c02565b61037c565b61016e61040a565b60405161011a9190610c87565b61010d610419565b61012b61045f565b61012b610465565b61016e61046b565b6101ae6101a9366004610c02565b61047a565b60405161011a9190611022565b61010d6101c9366004610c02565b6104ca565b6101e16101dc366004610c1a565b610600565b60405161011a9190610cd8565b61012b610745565b61016e61074b565b6001546000906001600160a01b031633146102345760405162461bcd60e51b815260040161022b90610f7e565b60405180910390fd5b61023d8261078c565b506001919050565b60045490565b6001546000906001600160a01b031633146102785760405162461bcd60e51b815260040161022b90610f7e565b81600081116102995760405162461bcd60e51b815260040161022b90610e44565b336102a38561037c565b8411156102c25760405162461bcd60e51b815260040161022b90610ea8565b6007546102cf908561081e565b6007819055506000600886815481106102e457fe5b9060005260206000209060050201905061030b85826001015461084690919063ffffffff16565b6001820155600254610327906001600160a01b03168387610872565b816001600160a01b03167f92ccf450a286a957af52509bc1c9939d1a6a481783e142e41e2499f0bb66ebc68787604051610362929190611039565b60405180910390a250600195945050505050565b60085490565b600080610388836108cd565b90506000610394610913565b9050816003015481106104035760006103c66003546103c085600301548561081e90919063ffffffff16565b9061075a565b60065484549192506103dc916103c09084610917565b935083836000015410156103ef57825493505b60018301546103ff90859061081e565b9350505b5050919050565b6000546001600160a01b031690565b600080546001600160a01b031633146104445760405162461bcd60e51b815260040161022b90610f47565b600054610459906001600160a01b0316610951565b50600190565b60065490565b60055490565b6001546001600160a01b031690565b610482610b8c565b61048b826108cd565b6040805160a081018252825481526001830154602082015260028301549181019190915260038201546060820152600490910154608082015292915050565b6001546000906001600160a01b031633146104f75760405162461bcd60e51b815260040161022b90610f7e565b81600081116105185760405162461bcd60e51b815260040161022b90610e44565b336000610523610913565b600854600754919250906105379087610846565b60075560088054600101808255600082815291908390811061055557fe5b6000918252602090912060059091020187815560028101849055600454909150610580908490610846565b6003820181905560055461059391610846565b60048201556002546105b0906001600160a01b031685308a6109be565b836001600160a01b03167f73a19dd210f1a7f902193214c0ee91dd35ee5b4d920cba8d519eca65a7b488ca83896040516105eb929190611039565b60405180910390a25060019695505050505050565b60085460609080841061064757604080516000808252602082019092529061063e565b61062b610b8c565b8152602001906001900390816106235790505b5091505061073f565b60006106538585610846565b9050808210156106605750805b84810367ffffffffffffffff8111801561067957600080fd5b506040519080825280602002602001820160405280156106b357816020015b6106a0610b8c565b8152602001906001900390816106985790505b50925060005b835181101561073b576008818701815481106106d157fe5b90600052602060002090600502016040518060a00160405290816000820154815260200160018201548152602001600282015481526020016003820154815260200160048201548152505084828151811061072857fe5b60209081029190910101526001016106b9565b5050505b92915050565b60075490565b6002546001600160a01b031681565b600080821161077b5760405162461bcd60e51b815260040161022b90610e71565b81838161078457fe5b049392505050565b6000546001600160a01b03828116911614156107a75761081b565b6001546001600160a01b03828116911614156107d55760405162461bcd60e51b815260040161022b90610f20565b600080546001600160a01b0319166001600160a01b038316908117825560405190917f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce2291a25b50565b6000828211156108405760405162461bcd60e51b815260040161022b90610dc7565b50900390565b60008282018381101561086b5760405162461bcd60e51b815260040161022b90610d64565b9392505050565b6108c88363a9059cbb60e01b8484604051602401610891929190610cbf565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526109e5565b505050565b60085460009082106108f15760405162461bcd60e51b815260040161022b90610d9b565b600882815481106108fe57fe5b90600052602060002090600502019050919050565b4290565b6000826109265750600061073f565b8282028284828161093357fe5b041461086b5760405162461bcd60e51b815260040161022b90610edf565b6001546001600160a01b038281169116141561096c5761081b565b600180546001600160a01b0383166001600160a01b031991821681179092556000805490911681556040517fa2ea9883a321a3e97b8266c2b078bfeec6d50c711ed71f874a90d500ae2eaf369190a250565b6109df846323b872dd60e01b85858560405160240161089193929190610c9b565b50505050565b6060610a3a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610a749092919063ffffffff16565b8051909150156108c85780806020019051810190610a589190610be2565b6108c85760405162461bcd60e51b815260040161022b90610fd8565b6060610a838484600085610a8b565b949350505050565b60603031831115610aae5760405162461bcd60e51b815260040161022b90610dfe565b610ab785610b4d565b610ad35760405162461bcd60e51b815260040161022b90610fa1565b60006060866001600160a01b03168587604051610af09190610c6b565b60006040518083038185875af1925050503d8060008114610b2d576040519150601f19603f3d011682016040523d82523d6000602084013e610b32565b606091505b5091509150610b42828286610b53565b979650505050505050565b3b151590565b60608315610b6257508161086b565b825115610b725782518084602001fd5b8160405162461bcd60e51b815260040161022b9190610d31565b6040518060a0016040528060008152602001600081526020016000815260200160008152602001600081525090565b600060208284031215610bcc578081fd5b81356001600160a01b038116811461086b578182fd5b600060208284031215610bf3578081fd5b8151801515811461086b578182fd5b600060208284031215610c13578081fd5b5035919050565b60008060408385031215610c2c578081fd5b50508035926020909101359150565b80518252602081015160208301526040810151604083015260608101516060830152608081015160808301525050565b60008251610c7d818460208701611047565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b6020808252825182820181905260009190848201906040850190845b81811015610d1a57610d07838551610c3b565b9284019260a09290920191600101610cf4565b50909695505050505050565b901515815260200190565b6000602082528251806020840152610d50816040850160208701611047565b601f01601f19169190910160400192915050565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b602080825260129082015271125b9d985b1a590819195c1bdcda5d081a5960721b604082015260600190565b6020808252601e908201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604082015260600190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6040820152651c8818d85b1b60d21b606082015260800190565b602080825260139082015272416d6f756e74206e6f7420706f73697469766560681b604082015260600190565b6020808252601a908201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604082015260600190565b6020808252601b908201527f4e6f7420656e6f75676820617661696c61626c6520746f6b656e730000000000604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b6020808252600d908201526c20b63932b0b23c9037bbb732b960991b604082015260600190565b6020808252601a908201527f4e6f74206e6f6d696e6174656420746f206f776e657273686970000000000000604082015260600190565b6020808252600990820152682737ba1037bbb732b960b91b604082015260600190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b60a0810161073f8284610c3b565b90815260200190565b918252602082015260400190565b60005b8381101561106257818101518382015260200161104a565b838111156109df575050600091015256fea2646970667358221220d30ff0150dff6db6b74835c761288fabdd267ba73e47346aeea229d3cc6da2fb64736f6c634300060c0033

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

000000000000000000000000eacd9a721cc7419277ca161bd1fd72e35c77c84a000000000000000000000000f0c5831ec3da15f3696b4dad8b21c7ce2f007f28000000000000000000000000000000000000000000000000000000000000003800000000000000000000000000000000000000000000000000000000000000d00000000000000000000000000000000000000000000000000000000000000034

-----Decoded View---------------
Arg [0] : owner_ (address): 0xeacd9a721cc7419277Ca161bd1fD72E35c77C84a
Arg [1] : token_ (address): 0xF0c5831EC3Da15f3696B4DAd8B21c7Ce2f007f28
Arg [2] : lockupDuration_ (uint256): 56
Arg [3] : unlockDuration_ (uint256): 208
Arg [4] : unlockIntervalsCount_ (uint256): 52

-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 000000000000000000000000eacd9a721cc7419277ca161bd1fd72e35c77c84a
Arg [1] : 000000000000000000000000f0c5831ec3da15f3696b4dad8b21c7ce2f007f28
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000038
Arg [3] : 00000000000000000000000000000000000000000000000000000000000000d0
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000034


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

OVERVIEW

This is the ' Marketing ' category of locked tokens.

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.