ETH Price: $2,431.79 (+0.72%)
Gas: 0.13 GWei

Contract

0xD98CbC458d41222eAC077eEeaB75F170a1743A95

Overview

ETH Balance

Linea Mainnet LogoLinea Mainnet LogoLinea Mainnet Logo0 ETH

ETH Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Release96937412024-09-20 3:49:4716 days ago1726804187IN
0xD98CbC45...0a1743A95
0 ETH0.000003420.0573949
Release95059032024-09-15 19:09:1820 days ago1726427358IN
0xD98CbC45...0a1743A95
0 ETH0.000005460.0582
Create Vesting S...88990042024-09-01 17:31:2034 days ago1725211880IN
0xD98CbC45...0a1743A95
0 ETH0.000010370.0582
Release88976802024-09-01 16:47:0534 days ago1725209225IN
0xD98CbC45...0a1743A95
0 ETH0.000003470.0582
Release82719192024-08-18 2:39:2049 days ago1723948760IN
0xD98CbC45...0a1743A95
0 ETH0.000003470.0582
Release74962702024-07-31 3:19:1967 days ago1722395959IN
0xD98CbC45...0a1743A95
0 ETH0.000004460.0582
Release68889452024-07-17 1:51:5481 days ago1721181114IN
0xD98CbC45...0a1743A95
0 ETH0.000005460.0582
Release68311982024-07-15 17:46:5682 days ago1721065616IN
0xD98CbC45...0a1743A95
0 ETH0.000006850.08931626
Release68040092024-07-15 2:40:3883 days ago1721011238IN
0xD98CbC45...0a1743A95
0 ETH0.000005460.0582
Create Vesting S...51913702024-06-05 21:26:50122 days ago1717622810IN
0xD98CbC45...0a1743A95
0 ETH0.000020310.11396749
Create Vesting S...51913482024-06-05 21:25:44122 days ago1717622744IN
0xD98CbC45...0a1743A95
0 ETH0.000020870.11404289
Create Vesting S...51913172024-06-05 21:24:11122 days ago1717622651IN
0xD98CbC45...0a1743A95
0 ETH0.000020910.1142641
Create Vesting S...51912542024-06-05 21:21:02122 days ago1717622462IN
0xD98CbC45...0a1743A95
0 ETH0.000020930.1143441
Create Vesting S...51912142024-06-05 21:19:02122 days ago1717622342IN
0xD98CbC45...0a1743A95
0 ETH0.000020950.11446844
Create Vesting S...51906642024-06-05 20:51:32122 days ago1717620692IN
0xD98CbC45...0a1743A95
0 ETH0.000022640.11590142
0x60a0604049698472024-05-29 3:29:41130 days ago1716953381IN
 Create: VestingContract
0 ETH0.000051530.0582

Latest 15 internal transactions

Parent Transaction Hash Block From To
96937412024-09-20 3:49:4716 days ago1726804187
0xD98CbC45...0a1743A95
0 ETH
95059032024-09-15 19:09:1820 days ago1726427358
0xD98CbC45...0a1743A95
0 ETH
88990042024-09-01 17:31:2034 days ago1725211880
0xD98CbC45...0a1743A95
0 ETH
88976802024-09-01 16:47:0534 days ago1725209225
0xD98CbC45...0a1743A95
0 ETH
82719192024-08-18 2:39:2049 days ago1723948760
0xD98CbC45...0a1743A95
0 ETH
74962702024-07-31 3:19:1967 days ago1722395959
0xD98CbC45...0a1743A95
0 ETH
68889452024-07-17 1:51:5481 days ago1721181114
0xD98CbC45...0a1743A95
0 ETH
68311982024-07-15 17:46:5682 days ago1721065616
0xD98CbC45...0a1743A95
0 ETH
68040092024-07-15 2:40:3883 days ago1721011238
0xD98CbC45...0a1743A95
0 ETH
51913702024-06-05 21:26:50122 days ago1717622810
0xD98CbC45...0a1743A95
0 ETH
51913482024-06-05 21:25:44122 days ago1717622744
0xD98CbC45...0a1743A95
0 ETH
51913172024-06-05 21:24:11122 days ago1717622651
0xD98CbC45...0a1743A95
0 ETH
51912542024-06-05 21:21:02122 days ago1717622462
0xD98CbC45...0a1743A95
0 ETH
51912142024-06-05 21:19:02122 days ago1717622342
0xD98CbC45...0a1743A95
0 ETH
51906642024-06-05 20:51:32122 days ago1717620692
0xD98CbC45...0a1743A95
0 ETH
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
VestingContract

Compiler Version
v0.8.25+commit.b61c2a91

Optimization Enabled:
Yes with 200 runs

Other Settings:
london EvmVersion, None license

Contract Source Code (Solidity)

/**
 *Submitted for verification at lineascan.build/ on 2024-05-29
*/

// File: @openzeppelin/contracts/utils/Address.sol


// OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol)

pragma solidity ^0.8.20;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev The ETH balance of the account is not enough to perform the operation.
     */
    error AddressInsufficientBalance(address account);

    /**
     * @dev There's no code at `target` (it is not a contract).
     */
    error AddressEmptyCode(address target);

    /**
     * @dev A call to an address target failed. The target may have reverted.
     */
    error FailedInnerCall();

    /**
     * @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://consensys.net/diligence/blog/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.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        if (address(this).balance < amount) {
            revert AddressInsufficientBalance(address(this));
        }

        (bool success, ) = recipient.call{value: amount}("");
        if (!success) {
            revert FailedInnerCall();
        }
    }

    /**
     * @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 or custom error, it is bubbled
     * up by this function (like regular Solidity function calls). However, if
     * the call reverted with no returned reason, this function reverts with a
     * {FailedInnerCall} error.
     *
     * 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.
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0);
    }

    /**
     * @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`.
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        if (address(this).balance < value) {
            revert AddressInsufficientBalance(address(this));
        }
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target
     * was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an
     * unsuccessful call.
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata
    ) internal view returns (bytes memory) {
        if (!success) {
            _revert(returndata);
        } else {
            // only check if target is a contract if the call was successful and the return data is empty
            // otherwise we already know that it was a contract
            if (returndata.length == 0 && target.code.length == 0) {
                revert AddressEmptyCode(target);
            }
            return returndata;
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the
     * revert reason or with a default {FailedInnerCall} error.
     */
    function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {
        if (!success) {
            _revert(returndata);
        } else {
            return returndata;
        }
    }

    /**
     * @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}.
     */
    function _revert(bytes memory returndata) private pure {
        // 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
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert FailedInnerCall();
        }
    }
}

// File: @openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol


// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Permit.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 *
 * ==== Security Considerations
 *
 * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature
 * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be
 * considered as an intention to spend the allowance in any specific way. The second is that because permits have
 * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should
 * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be
 * generally recommended is:
 *
 * ```solidity
 * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {
 *     try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}
 *     doThing(..., value);
 * }
 *
 * function doThing(..., uint256 value) public {
 *     token.safeTransferFrom(msg.sender, address(this), value);
 *     ...
 * }
 * ```
 *
 * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of
 * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also
 * {SafeERC20-safeTransferFrom}).
 *
 * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so
 * contracts should have entry points that don't rely on permit.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     *
     * CAUTION: See Security Considerations above.
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

// File: @openzeppelin/contracts/token/ERC20/IERC20.sol


// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @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);

    /**
     * @dev Returns the value of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

// File: @openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol


// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.20;




/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    /**
     * @dev An operation with an ERC20 token failed.
     */
    error SafeERC20FailedOperation(address token);

    /**
     * @dev Indicates a failed `decreaseAllowance` request.
     */
    error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);

    /**
     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value)));
    }

    /**
     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
     */
    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value)));
    }

    /**
     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 oldAllowance = token.allowance(address(this), spender);
        forceApprove(token, spender, oldAllowance + value);
    }

    /**
     * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no
     * value, non-reverting calls are assumed to be successful.
     */
    function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {
        unchecked {
            uint256 currentAllowance = token.allowance(address(this), spender);
            if (currentAllowance < requestedDecrease) {
                revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);
            }
            forceApprove(token, spender, currentAllowance - requestedDecrease);
        }
    }

    /**
     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
     * to be set to zero before setting it to a non-zero value, such as USDT.
     */
    function forceApprove(IERC20 token, address spender, uint256 value) internal {
        bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));

        if (!_callOptionalReturnBool(token, approvalCall)) {
            _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0)));
            _callOptionalReturn(token, approvalCall);
        }
    }

    /**
     * @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);
        if (returndata.length != 0 && !abi.decode(returndata, (bool))) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @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).
     *
     * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
     */
    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
        // 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 cannot use {Address-functionCall} here since this should return false
        // and not revert is the subcall reverts.

        (bool success, bytes memory returndata) = address(token).call(data);
        return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && address(token).code.length > 0;
    }
}

// File: contracts/vesting.sol


pragma solidity ^0.8.0;


/**
 * @title VestingContract
 * @notice This is a simple vesting contract that allows to create vesting schedules for a beneficiary with daily/weekly/monthly and/or cliff unlocking.
 */
contract VestingContract {
    using SafeERC20 for IERC20;

    /**
     * @notice The token to be vested
     */
    IERC20 public immutable token;

    enum DurationUnits {
        Days,
        Weeks,
        Months,
        Minutes
    }

    struct VestingSchedule {
        // beneficiary of tokens after they are released
        address beneficiary;
        // start time of the vesting period
        uint256 start;
        // duration of the vesting period in DurationUnits
        uint256 duration;
        // units of the duration
        DurationUnits durationUnits;
        // total amount of tokens to be released at the end of the vesting;
        uint256 amountTotal;
        // amount of tokens released
        uint256 released;
    }

    /**
     * @notice List of vesting schedules for each beneficiary
     */
    mapping(address => VestingSchedule[]) public vestingSchedules;

    /**
     * @notice Emitted when a vesting schedule is created
     * @param beneficiary The address of the beneficiary
     * @param start The start UNIX timestamp of the vesting period
     * @param duration The duration of the vesting period in DurationUnits
     * @param durationUnits The units of the duration(0 = days, 1 = weeks, 2 = months)
     */
    event VestingScheduleCreated(
        address indexed beneficiary, uint256 start, uint256 duration, DurationUnits durationUnits, uint256 amountTotal
    );

    /**
     * @notice Emitted when tokens are released
     * @param beneficiary The address of the beneficiary
     * @param amount The amount of tokens released
     */
    event TokensReleased(address indexed beneficiary, uint256 amount);

    /**
     * @param _token The token to be vested
     */
    constructor(IERC20 _token) {
        token = _token;
    }

    /**
     * @notice Creates a vesting schedule
     * @param _beneficiary The address of the beneficiary
     * @param _start The start UNIX timestamp of the vesting period
     * @param _duration The duration of the vesting period in DurationUnits
     * @param _durationUnits The units of the duration(0 = days, 1 = weeks, 2 = months, 3 = minutes)
     * @param _amountTotal The total amount of tokens to be vested
     * @dev Approve the contract to transfer the tokens before calling this function
     */
    function createVestingSchedule(
        address _beneficiary,
        uint256 _start,
        uint256 _duration,
        DurationUnits _durationUnits,
        uint256 _amountTotal
    ) external {
        // perform input checks
        require(_beneficiary != address(0), "VestingContract: beneficiary is the zero address");
        require(_amountTotal > 0, "VestingContract: amount is 0");
        require(_start >= block.timestamp, "VestingContract: start is before current time");

        // transfer the tokens to be locked to the contract
        token.safeTransferFrom(msg.sender, address(this), _amountTotal);

        // create the vesting schedule and add it to the list of schedules for the beneficiary
        vestingSchedules[_beneficiary].push(
            VestingSchedule({
                beneficiary: _beneficiary,
                start: _start,
                duration: _duration,
                durationUnits: _durationUnits,
                amountTotal: _amountTotal,
                released: 0
            })
        );

        emit VestingScheduleCreated(_beneficiary, _start, _duration, _durationUnits, _amountTotal);
    }

    /**
     * @notice Releases the vested tokens for a beneficiary
     * @param _beneficiary The address of the beneficiary
     */
    function release(address _beneficiary) external {
        VestingSchedule[] storage schedules = vestingSchedules[_beneficiary];
        uint256 schedulesLength = schedules.length;
        require(schedulesLength > 0, "VestingContract: no vesting schedules for beneficiary");

        uint256 totalRelease;

        for (uint256 i = 0; i < schedulesLength; i++) {
            VestingSchedule storage schedule = schedules[i];

            // calculate the releasable amount
            uint256 amountToSend = releasableAmount(schedule);
            require(amountToSend > 0, "Cannot release zero");
            // update the released amount
            schedule.released += amountToSend;
            // update the total released amount
            totalRelease += amountToSend;
            // transfer the tokens to the beneficiary
            token.safeTransfer(schedule.beneficiary, amountToSend);
        }

        emit TokensReleased(_beneficiary, totalRelease);
    }

    /**
     * @notice Returns the releasable amount of tokens for a beneficiary
     * @param _beneficiary The address of the beneficiary
     */
    function getReleaseableAmount(address _beneficiary) external view returns (uint256) {
        VestingSchedule[] memory schedules = vestingSchedules[_beneficiary];
        if (schedules.length == 0) return 0;

        uint256 amountToSend = 0;
        for (uint256 i = 0; i < schedules.length; i++) {
            VestingSchedule memory schedule = vestingSchedules[_beneficiary][i];
            amountToSend += releasableAmount(schedule);
        }
        return amountToSend;
    }

    /**
     * @notice Returns the releasable amount of tokens for a vesting schedule
     * @param _schedule The vesting schedule
     */
    function releasableAmount(VestingSchedule memory _schedule) public view returns (uint256) {
        return vestedAmount(_schedule) - _schedule.released;
    }

    /**
     * @notice Returns the vested amount of tokens for a vesting schedule
     * @param _schedule The vesting schedule
     */
    function vestedAmount(VestingSchedule memory _schedule) public view returns (uint256) {
        if (_schedule.duration == 0) {
            if (block.timestamp >= _schedule.start) {
                return _schedule.amountTotal;
            } else {
                return 0;
            }
        }
        uint256 sliceInSeconds;
        if (_schedule.durationUnits == DurationUnits.Days) {
            sliceInSeconds = 1 days;
        } else if (_schedule.durationUnits == DurationUnits.Weeks) {
            sliceInSeconds = 7 days;
        } else if (_schedule.durationUnits == DurationUnits.Months) {
            sliceInSeconds = 30 days;
        } else if (_schedule.durationUnits == DurationUnits.Minutes) {
            sliceInSeconds = 1 minutes;
        }
        if (block.timestamp < _schedule.start) {
            return 0;
        } else if (block.timestamp >= _schedule.start + _schedule.duration * sliceInSeconds) {
            return _schedule.amountTotal;
        } else {
            uint256 monthsPassed = (block.timestamp - _schedule.start) / sliceInSeconds;
            return (_schedule.amountTotal * monthsPassed) / _schedule.duration;
        }
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IERC20","name":"_token","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"AddressInsufficientBalance","type":"error"},{"inputs":[],"name":"FailedInnerCall","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"beneficiary","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TokensReleased","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"beneficiary","type":"address"},{"indexed":false,"internalType":"uint256","name":"start","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"duration","type":"uint256"},{"indexed":false,"internalType":"enum VestingContract.DurationUnits","name":"durationUnits","type":"uint8"},{"indexed":false,"internalType":"uint256","name":"amountTotal","type":"uint256"}],"name":"VestingScheduleCreated","type":"event"},{"inputs":[{"internalType":"address","name":"_beneficiary","type":"address"},{"internalType":"uint256","name":"_start","type":"uint256"},{"internalType":"uint256","name":"_duration","type":"uint256"},{"internalType":"enum VestingContract.DurationUnits","name":"_durationUnits","type":"uint8"},{"internalType":"uint256","name":"_amountTotal","type":"uint256"}],"name":"createVestingSchedule","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_beneficiary","type":"address"}],"name":"getReleaseableAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"beneficiary","type":"address"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"duration","type":"uint256"},{"internalType":"enum VestingContract.DurationUnits","name":"durationUnits","type":"uint8"},{"internalType":"uint256","name":"amountTotal","type":"uint256"},{"internalType":"uint256","name":"released","type":"uint256"}],"internalType":"struct VestingContract.VestingSchedule","name":"_schedule","type":"tuple"}],"name":"releasableAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_beneficiary","type":"address"}],"name":"release","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"beneficiary","type":"address"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"duration","type":"uint256"},{"internalType":"enum VestingContract.DurationUnits","name":"durationUnits","type":"uint8"},{"internalType":"uint256","name":"amountTotal","type":"uint256"},{"internalType":"uint256","name":"released","type":"uint256"}],"internalType":"struct VestingContract.VestingSchedule","name":"_schedule","type":"tuple"}],"name":"vestedAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"vestingSchedules","outputs":[{"internalType":"address","name":"beneficiary","type":"address"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"duration","type":"uint256"},{"internalType":"enum VestingContract.DurationUnits","name":"durationUnits","type":"uint8"},{"internalType":"uint256","name":"amountTotal","type":"uint256"},{"internalType":"uint256","name":"released","type":"uint256"}],"stateMutability":"view","type":"function"}]

60a0604052348015600f57600080fd5b50604051610f9b380380610f9b833981016040819052602c91603c565b6001600160a01b0316608052606a565b600060208284031215604d57600080fd5b81516001600160a01b0381168114606357600080fd5b9392505050565b608051610f08610093600039600081816101240152818161031b015261052c0152610f086000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c8063725c00ea1161005b578063725c00ea146100d857806385d9dcbb146100f9578063d517562d1461010c578063fc0c546a1461011f57600080fd5b8063191655871461008257806345626bd61461009757806352b04ce0146100c5575b600080fd5b610095610090366004610c1f565b61015e565b005b6100aa6100a5366004610c3a565b610398565b6040516100bc96959493929190610c9c565b60405180910390f35b6100956100d3366004610cea565b6103fa565b6100eb6100e6366004610d38565b610689565b6040519081526020016100bc565b6100eb610107366004610d38565b6106a9565b6100eb61011a366004610c1f565b6107f2565b6101467f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100bc565b6001600160a01b03811660009081526020819052604090208054806101e85760405162461bcd60e51b815260206004820152603560248201527f56657374696e67436f6e74726163743a206e6f2076657374696e67207363686560448201527464756c657320666f722062656e656669636961727960581b60648201526084015b60405180910390fd5b6000805b8281101561034e57600084828154811061020857610208610dcc565b600091825260208083206040805160c081018252600690940290910180546001600160a01b0316845260018101549284019290925260028201549083015260038082015491945061029c92918591606084019160ff169081111561026e5761026e610c64565b600381111561027f5761027f610c64565b815260200160048201548152602001600582015481525050610689565b9050600081116102e45760405162461bcd60e51b815260206004820152601360248201527243616e6e6f742072656c65617365207a65726f60681b60448201526064016101df565b808260050160008282546102f89190610df8565b9091555061030890508185610df8565b8254909450610344906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081169116836109c6565b50506001016101ec565b50836001600160a01b03167fc7798891864187665ac6dd119286e44ec13f014527aeeb2b8eb3fd413df931798260405161038a91815260200190565b60405180910390a250505050565b600060205281600052604060002081815481106103b457600080fd5b60009182526020909120600690910201805460018201546002830154600384015460048501546005909501546001600160a01b0390941696509194509260ff9091169186565b6001600160a01b0385166104695760405162461bcd60e51b815260206004820152603060248201527f56657374696e67436f6e74726163743a2062656e65666963696172792069732060448201526f746865207a65726f206164647265737360801b60648201526084016101df565b600081116104b95760405162461bcd60e51b815260206004820152601c60248201527f56657374696e67436f6e74726163743a20616d6f756e7420697320300000000060448201526064016101df565b4284101561051f5760405162461bcd60e51b815260206004820152602d60248201527f56657374696e67436f6e74726163743a207374617274206973206265666f726560448201526c2063757272656e742074696d6560981b60648201526084016101df565b6105546001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333084610a2a565b6001600160a01b03851660008181526020818152604091829020825160c081018452938452908301879052908201859052906060810184600381111561059c5761059c610c64565b815260208082018590526000604092830181905284546001808201875595825290829020845160069092020180546001600160a01b0319166001600160a01b039092169190911781559083015181850155908201516002820155606082015160038083018054949593949293909260ff191691849081111561062057610620610c64565b02179055506080820151816004015560a082015181600501555050846001600160a01b03167f53deaad9944bc86c7654f74be7f9acb1741b7d1fba2b27fa60bde46240edc11c8585858560405161067a9493929190610e0b565b60405180910390a25050505050565b60008160a00151610699836106a9565b6106a39190610e35565b92915050565b600081604001516000036106d257816020015142106106ca57506080015190565b506000919050565b600080836060015160038111156106eb576106eb610c64565b036106fa575062015180610769565b60018360600151600381111561071257610712610c64565b03610721575062093a80610769565b60028360600151600381111561073957610739610c64565b03610748575062278d00610769565b60038360600151600381111561076057610760610c64565b036107695750603c5b826020015142101561077e5750600092915050565b80836040015161078e9190610e48565b836020015161079d9190610df8565b42106107ac5750506080015190565b6000818460200151426107bf9190610e35565b6107c99190610e5f565b905083604001518185608001516107e09190610e48565b6107ea9190610e5f565b949350505050565b6001600160a01b03811660009081526020818152604080832080548251818502810185019093528083528493849084015b828210156108c45760008481526020908190206040805160c0810182526006860290920180546001600160a01b03168352600181015493830193909352600283015490820152600380830154919291606084019160ff9091169081111561088c5761088c610c64565b600381111561089d5761089d610c64565b81526020016004820154815260200160058201548152505081526020019060010190610823565b50505050905080516000036108dc5750600092915050565b6000805b82518110156109be576001600160a01b038516600090815260208190526040812080548390811061091357610913610dcc565b60009182526020918290206040805160c081018252600690930290910180546001600160a01b03168352600181015493830193909352600283015490820152600380830154919291606084019160ff9091169081111561097557610975610c64565b600381111561098657610986610c64565b81526020016004820154815260200160058201548152505090506109a981610689565b6109b39084610df8565b9250506001016108e0565b509392505050565b6040516001600160a01b03838116602483015260448201839052610a2591859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050610a69565b505050565b6040516001600160a01b038481166024830152838116604483015260648201839052610a639186918216906323b872dd906084016109f3565b50505050565b6000610a7e6001600160a01b03841683610acc565b90508051600014158015610aa3575080806020019051810190610aa19190610e81565b155b15610a2557604051635274afe760e01b81526001600160a01b03841660048201526024016101df565b6060610ada83836000610ae1565b9392505050565b606081471015610b065760405163cd78605960e01b81523060048201526024016101df565b600080856001600160a01b03168486604051610b229190610ea3565b60006040518083038185875af1925050503d8060008114610b5f576040519150601f19603f3d011682016040523d82523d6000602084013e610b64565b606091505b5091509150610b74868383610b7e565b9695505050505050565b606082610b9357610b8e82610bda565b610ada565b8151158015610baa57506001600160a01b0384163b155b15610bd357604051639996b31560e01b81526001600160a01b03851660048201526024016101df565b5080610ada565b805115610bea5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b80356001600160a01b0381168114610c1a57600080fd5b919050565b600060208284031215610c3157600080fd5b610ada82610c03565b60008060408385031215610c4d57600080fd5b610c5683610c03565b946020939093013593505050565b634e487b7160e01b600052602160045260246000fd5b60048110610c9857634e487b7160e01b600052602160045260246000fd5b9052565b6001600160a01b0387168152602081018690526040810185905260c08101610cc76060830186610c7a565b608082019390935260a00152949350505050565b803560048110610c1a57600080fd5b600080600080600060a08688031215610d0257600080fd5b610d0b86610c03565b94506020860135935060408601359250610d2760608701610cdb565b949793965091946080013592915050565b600060c08284031215610d4a57600080fd5b60405160c0810181811067ffffffffffffffff82111715610d7b57634e487b7160e01b600052604160045260246000fd5b604052610d8783610c03565b81526020830135602082015260408301356040820152610da960608401610cdb565b60608201526080830135608082015260a083013560a08201528091505092915050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b808201808211156106a3576106a3610de2565b8481526020810184905260808101610e266040830185610c7a565b82606083015295945050505050565b818103818111156106a3576106a3610de2565b80820281158282048414176106a3576106a3610de2565b600082610e7c57634e487b7160e01b600052601260045260246000fd5b500490565b600060208284031215610e9357600080fd5b81518015158114610ada57600080fd5b6000825160005b81811015610ec45760208186018101518583015201610eaa565b50600092019182525091905056fea264697066735822122033f35417c2ef6d8063bc2296f8853ff69840f2048b1f9ce0bbfe7e933f871e1c64736f6c63430008190033000000000000000000000000373d04a7f3594ff9011af5084587182c0056721e

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061007d5760003560e01c8063725c00ea1161005b578063725c00ea146100d857806385d9dcbb146100f9578063d517562d1461010c578063fc0c546a1461011f57600080fd5b8063191655871461008257806345626bd61461009757806352b04ce0146100c5575b600080fd5b610095610090366004610c1f565b61015e565b005b6100aa6100a5366004610c3a565b610398565b6040516100bc96959493929190610c9c565b60405180910390f35b6100956100d3366004610cea565b6103fa565b6100eb6100e6366004610d38565b610689565b6040519081526020016100bc565b6100eb610107366004610d38565b6106a9565b6100eb61011a366004610c1f565b6107f2565b6101467f000000000000000000000000373d04a7f3594ff9011af5084587182c0056721e81565b6040516001600160a01b0390911681526020016100bc565b6001600160a01b03811660009081526020819052604090208054806101e85760405162461bcd60e51b815260206004820152603560248201527f56657374696e67436f6e74726163743a206e6f2076657374696e67207363686560448201527464756c657320666f722062656e656669636961727960581b60648201526084015b60405180910390fd5b6000805b8281101561034e57600084828154811061020857610208610dcc565b600091825260208083206040805160c081018252600690940290910180546001600160a01b0316845260018101549284019290925260028201549083015260038082015491945061029c92918591606084019160ff169081111561026e5761026e610c64565b600381111561027f5761027f610c64565b815260200160048201548152602001600582015481525050610689565b9050600081116102e45760405162461bcd60e51b815260206004820152601360248201527243616e6e6f742072656c65617365207a65726f60681b60448201526064016101df565b808260050160008282546102f89190610df8565b9091555061030890508185610df8565b8254909450610344906001600160a01b037f000000000000000000000000373d04a7f3594ff9011af5084587182c0056721e81169116836109c6565b50506001016101ec565b50836001600160a01b03167fc7798891864187665ac6dd119286e44ec13f014527aeeb2b8eb3fd413df931798260405161038a91815260200190565b60405180910390a250505050565b600060205281600052604060002081815481106103b457600080fd5b60009182526020909120600690910201805460018201546002830154600384015460048501546005909501546001600160a01b0390941696509194509260ff9091169186565b6001600160a01b0385166104695760405162461bcd60e51b815260206004820152603060248201527f56657374696e67436f6e74726163743a2062656e65666963696172792069732060448201526f746865207a65726f206164647265737360801b60648201526084016101df565b600081116104b95760405162461bcd60e51b815260206004820152601c60248201527f56657374696e67436f6e74726163743a20616d6f756e7420697320300000000060448201526064016101df565b4284101561051f5760405162461bcd60e51b815260206004820152602d60248201527f56657374696e67436f6e74726163743a207374617274206973206265666f726560448201526c2063757272656e742074696d6560981b60648201526084016101df565b6105546001600160a01b037f000000000000000000000000373d04a7f3594ff9011af5084587182c0056721e16333084610a2a565b6001600160a01b03851660008181526020818152604091829020825160c081018452938452908301879052908201859052906060810184600381111561059c5761059c610c64565b815260208082018590526000604092830181905284546001808201875595825290829020845160069092020180546001600160a01b0319166001600160a01b039092169190911781559083015181850155908201516002820155606082015160038083018054949593949293909260ff191691849081111561062057610620610c64565b02179055506080820151816004015560a082015181600501555050846001600160a01b03167f53deaad9944bc86c7654f74be7f9acb1741b7d1fba2b27fa60bde46240edc11c8585858560405161067a9493929190610e0b565b60405180910390a25050505050565b60008160a00151610699836106a9565b6106a39190610e35565b92915050565b600081604001516000036106d257816020015142106106ca57506080015190565b506000919050565b600080836060015160038111156106eb576106eb610c64565b036106fa575062015180610769565b60018360600151600381111561071257610712610c64565b03610721575062093a80610769565b60028360600151600381111561073957610739610c64565b03610748575062278d00610769565b60038360600151600381111561076057610760610c64565b036107695750603c5b826020015142101561077e5750600092915050565b80836040015161078e9190610e48565b836020015161079d9190610df8565b42106107ac5750506080015190565b6000818460200151426107bf9190610e35565b6107c99190610e5f565b905083604001518185608001516107e09190610e48565b6107ea9190610e5f565b949350505050565b6001600160a01b03811660009081526020818152604080832080548251818502810185019093528083528493849084015b828210156108c45760008481526020908190206040805160c0810182526006860290920180546001600160a01b03168352600181015493830193909352600283015490820152600380830154919291606084019160ff9091169081111561088c5761088c610c64565b600381111561089d5761089d610c64565b81526020016004820154815260200160058201548152505081526020019060010190610823565b50505050905080516000036108dc5750600092915050565b6000805b82518110156109be576001600160a01b038516600090815260208190526040812080548390811061091357610913610dcc565b60009182526020918290206040805160c081018252600690930290910180546001600160a01b03168352600181015493830193909352600283015490820152600380830154919291606084019160ff9091169081111561097557610975610c64565b600381111561098657610986610c64565b81526020016004820154815260200160058201548152505090506109a981610689565b6109b39084610df8565b9250506001016108e0565b509392505050565b6040516001600160a01b03838116602483015260448201839052610a2591859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050610a69565b505050565b6040516001600160a01b038481166024830152838116604483015260648201839052610a639186918216906323b872dd906084016109f3565b50505050565b6000610a7e6001600160a01b03841683610acc565b90508051600014158015610aa3575080806020019051810190610aa19190610e81565b155b15610a2557604051635274afe760e01b81526001600160a01b03841660048201526024016101df565b6060610ada83836000610ae1565b9392505050565b606081471015610b065760405163cd78605960e01b81523060048201526024016101df565b600080856001600160a01b03168486604051610b229190610ea3565b60006040518083038185875af1925050503d8060008114610b5f576040519150601f19603f3d011682016040523d82523d6000602084013e610b64565b606091505b5091509150610b74868383610b7e565b9695505050505050565b606082610b9357610b8e82610bda565b610ada565b8151158015610baa57506001600160a01b0384163b155b15610bd357604051639996b31560e01b81526001600160a01b03851660048201526024016101df565b5080610ada565b805115610bea5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b80356001600160a01b0381168114610c1a57600080fd5b919050565b600060208284031215610c3157600080fd5b610ada82610c03565b60008060408385031215610c4d57600080fd5b610c5683610c03565b946020939093013593505050565b634e487b7160e01b600052602160045260246000fd5b60048110610c9857634e487b7160e01b600052602160045260246000fd5b9052565b6001600160a01b0387168152602081018690526040810185905260c08101610cc76060830186610c7a565b608082019390935260a00152949350505050565b803560048110610c1a57600080fd5b600080600080600060a08688031215610d0257600080fd5b610d0b86610c03565b94506020860135935060408601359250610d2760608701610cdb565b949793965091946080013592915050565b600060c08284031215610d4a57600080fd5b60405160c0810181811067ffffffffffffffff82111715610d7b57634e487b7160e01b600052604160045260246000fd5b604052610d8783610c03565b81526020830135602082015260408301356040820152610da960608401610cdb565b60608201526080830135608082015260a083013560a08201528091505092915050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b808201808211156106a3576106a3610de2565b8481526020810184905260808101610e266040830185610c7a565b82606083015295945050505050565b818103818111156106a3576106a3610de2565b80820281158282048414176106a3576106a3610de2565b600082610e7c57634e487b7160e01b600052601260045260246000fd5b500490565b600060208284031215610e9357600080fd5b81518015158114610ada57600080fd5b6000825160005b81811015610ec45760208186018101518583015201610eaa565b50600092019182525091905056fea264697066735822122033f35417c2ef6d8063bc2296f8853ff69840f2048b1f9ce0bbfe7e933f871e1c64736f6c63430008190033

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

000000000000000000000000373d04a7f3594ff9011af5084587182c0056721e

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

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000373d04a7f3594ff9011af5084587182c0056721e


Deployed Bytecode Sourcemap

19307:7004:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23009:993;;;;;;:::i;:::-;;:::i;:::-;;20177:61;;;;;;:::i;:::-;;:::i;:::-;;;;;;;;;;;;:::i;:::-;;;;;;;;21683:1180;;;;;;:::i;:::-;;:::i;24803:160::-;;;;;;:::i;:::-;;:::i;:::-;;;3334:25:1;;;3322:2;3307:18;24803:160:0;3188:177:1;25110:1198:0;;;;;;:::i;:::-;;:::i;24161:491::-;;;;;;:::i;:::-;;:::i;19431:29::-;;;;;;;;-1:-1:-1;;;;;3548:32:1;;;3530:51;;3518:2;3503:18;19431:29:0;3370:217:1;23009:993:0;-1:-1:-1;;;;;23106:30:0;;23068:35;23106:30;;;;;;;;;;23173:16;;23208:19;23200:85;;;;-1:-1:-1;;;23200:85:0;;3794:2:1;23200:85:0;;;3776:21:1;3833:2;3813:18;;;3806:30;3872:34;3852:18;;;3845:62;-1:-1:-1;;;3923:18:1;;;3916:51;3984:19;;23200:85:0;;;;;;;;;23298:20;;23331:604;23355:15;23351:1;:19;23331:604;;;23392:32;23427:9;23437:1;23427:12;;;;;;;;:::i;:::-;;;;;;;;;23527:26;;;;;;;;23427:12;;;;;;;23527:26;;-1:-1:-1;;;;;23527:26:0;;;;;;;;;;;;;;;;;;;;;;;;;;;23427:12;;-1:-1:-1;23527:26:0;;;23427:12;;23527:26;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;:16;:26::i;:::-;23504:49;;23591:1;23576:12;:16;23568:48;;;;-1:-1:-1;;;23568:48:0;;4348:2:1;23568:48:0;;;4330:21:1;4387:2;4367:18;;;4360:30;-1:-1:-1;;;4406:18:1;;;4399:49;4465:18;;23568:48:0;4146:343:1;23568:48:0;23695:12;23674:8;:17;;;:33;;;;;;;:::i;:::-;;;;-1:-1:-1;23771:28:0;;-1:-1:-1;23787:12:0;23771:28;;:::i;:::-;23888:20;;23771:28;;-1:-1:-1;23869:54:0;;-1:-1:-1;;;;;23869:5:0;:18;;;23888:20;23910:12;23869:18;:54::i;:::-;-1:-1:-1;;23372:3:0;;23331:604;;;;23967:12;-1:-1:-1;;;;;23952:42:0;;23981:12;23952:42;;;;3334:25:1;;3322:2;3307:18;;3188:177;23952:42:0;;;;;;;;23057:945;;;23009:993;:::o;20177:61::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;20177:61:0;;;;-1:-1:-1;20177:61:0;;-1:-1:-1;20177:61:0;;;;;;;:::o;21683:1180::-;-1:-1:-1;;;;;21936:26:0;;21928:87;;;;-1:-1:-1;;;21928:87:0;;4958:2:1;21928:87:0;;;4940:21:1;4997:2;4977:18;;;4970:30;5036:34;5016:18;;;5009:62;-1:-1:-1;;;5087:18:1;;;5080:46;5143:19;;21928:87:0;4756:412:1;21928:87:0;22049:1;22034:12;:16;22026:57;;;;-1:-1:-1;;;22026:57:0;;5375:2:1;22026:57:0;;;5357:21:1;5414:2;5394:18;;;5387:30;5453;5433:18;;;5426:58;5501:18;;22026:57:0;5173:352:1;22026:57:0;22112:15;22102:6;:25;;22094:83;;;;-1:-1:-1;;;22094:83:0;;5732:2:1;22094:83:0;;;5714:21:1;5771:2;5751:18;;;5744:30;5810:34;5790:18;;;5783:62;-1:-1:-1;;;5861:18:1;;;5854:43;5914:19;;22094:83:0;5530:409:1;22094:83:0;22251:63;-1:-1:-1;;;;;22251:5:0;:22;22274:10;22294:4;22301:12;22251:22;:63::i;:::-;-1:-1:-1;;;;;22423:30:0;;:16;:30;;;;;;;;;;;;22473:268;;;;;;;;;;;;;;;;;;;;;;22423:30;22473:268;;;22637:14;22473:268;;;;;;;;:::i;:::-;;;;;;;;;;-1:-1:-1;22473:268:0;;;;;;;22423:329;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;22423:329:0;-1:-1:-1;;;;;22423:329:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;22423:329:0;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;22793:12;-1:-1:-1;;;;;22770:85:0;;22807:6;22815:9;22826:14;22842:12;22770:85;;;;;;;;;:::i;:::-;;;;;;;;21683:1180;;;;;:::o;24803:160::-;24884:7;24937:9;:18;;;24911:23;24924:9;24911:12;:23::i;:::-;:44;;;;:::i;:::-;24904:51;24803:160;-1:-1:-1;;24803:160:0:o;25110:1198::-;25187:7;25211:9;:18;;;25233:1;25211:23;25207:207;;25274:9;:15;;;25255;:34;25251:152;;-1:-1:-1;25317:21:0;;;;25110:1198::o;25251:152::-;-1:-1:-1;25386:1:0;;25110:1198;-1:-1:-1;25110:1198:0:o;25251:152::-;25424:22;;25461:9;:23;;;:45;;;;;;;;:::i;:::-;;25457:432;;-1:-1:-1;25540:6:0;25457:432;;;25595:19;25568:9;:23;;;:46;;;;;;;;:::i;:::-;;25564:325;;-1:-1:-1;25648:6:0;25564:325;;;25703:20;25676:9;:23;;;:47;;;;;;;;:::i;:::-;;25672:217;;-1:-1:-1;25757:7:0;25672:217;;;25813:21;25786:9;:23;;;:48;;;;;;;;:::i;:::-;;25782:107;;-1:-1:-1;25868:9:0;25782:107;25921:9;:15;;;25903;:33;25899:402;;;-1:-1:-1;25960:1:0;;25110:1198;-1:-1:-1;;25110:1198:0:o;25899:402::-;26041:14;26020:9;:18;;;:35;;;;:::i;:::-;26002:9;:15;;;:53;;;;:::i;:::-;25983:15;:72;25979:322;;-1:-1:-1;;26079:21:0;;;;25110:1198::o;25979:322::-;26133:20;26194:14;26175:9;:15;;;26157;:33;;;;:::i;:::-;26156:52;;;;:::i;:::-;26133:75;;26271:9;:18;;;26255:12;26231:9;:21;;;:36;;;;:::i;:::-;26230:59;;;;:::i;:::-;26223:66;25110:1198;-1:-1:-1;;;;25110:1198:0:o;24161:491::-;-1:-1:-1;;;;;24293:30:0;;24236:7;24293:30;;;;;;;;;;;24256:67;;;;;;;;;;;;;;;;;24236:7;;;;24256:67;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;24256:67:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24338:9;:16;24358:1;24338:21;24334:35;;-1:-1:-1;24368:1:0;;24161:491;-1:-1:-1;;24161:491:0:o;24334:35::-;24382:20;24422:9;24417:198;24441:9;:16;24437:1;:20;24417:198;;;-1:-1:-1;;;;;24513:30:0;;24479:31;24513:30;;;;;;;;;;:33;;24544:1;;24513:33;;;;;;:::i;:::-;;;;;;;;;;24479:67;;;;;;;;24513:33;;;;;;;24479:67;;-1:-1:-1;;;;;24479:67:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24513:33;24479:67;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;24577:26;24594:8;24577:16;:26::i;:::-;24561:42;;;;:::i;:::-;;-1:-1:-1;;24459:3:0;;24417:198;;;-1:-1:-1;24632:12:0;24161:491;-1:-1:-1;;;24161:491:0:o;14499:162::-;14609:43;;-1:-1:-1;;;;;7098:32:1;;;14609:43:0;;;7080:51:1;7147:18;;;7140:34;;;14582:71:0;;14602:5;;14624:14;;;;;7053:18:1;;14609:43:0;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;14609:43:0;;;;;;;;;;;14582:19;:71::i;:::-;14499:162;;;:::o;14906:190::-;15034:53;;-1:-1:-1;;;;;7443:15:1;;;15034:53:0;;;7425:34:1;7495:15;;;7475:18;;;7468:43;7527:18;;;7520:34;;;15007:81:0;;15027:5;;15049:18;;;;;7360::1;;15034:53:0;7185:375:1;15007:81:0;14906:190;;;;:::o;17310:638::-;17734:23;17760:33;-1:-1:-1;;;;;17760:27:0;;17788:4;17760:27;:33::i;:::-;17734:59;;17808:10;:17;17829:1;17808:22;;:57;;;;;17846:10;17835:30;;;;;;;;;;;;:::i;:::-;17834:31;17808:57;17804:137;;;17889:40;;-1:-1:-1;;;17889:40:0;;-1:-1:-1;;;;;3548:32:1;;17889:40:0;;;3530:51:1;3503:18;;17889:40:0;3370:217:1;2797:153:0;2872:12;2904:38;2926:6;2934:4;2940:1;2904:21;:38::i;:::-;2897:45;2797:153;-1:-1:-1;;;2797:153:0:o;3285:398::-;3384:12;3437:5;3413:21;:29;3409:110;;;3466:41;;-1:-1:-1;;;3466:41:0;;3501:4;3466:41;;;3530:51:1;3503:18;;3466:41:0;3370:217:1;3409:110:0;3530:12;3544:23;3571:6;-1:-1:-1;;;;;3571:11:0;3590:5;3597:4;3571:31;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3529:73;;;;3620:55;3647:6;3655:7;3664:10;3620:26;:55::i;:::-;3613:62;3285:398;-1:-1:-1;;;;;;3285:398:0:o;4761:597::-;4909:12;4939:7;4934:417;;4963:19;4971:10;4963:7;:19::i;:::-;4934:417;;;5191:17;;:22;:49;;;;-1:-1:-1;;;;;;5217:18:0;;;:23;5191:49;5187:121;;;5268:24;;-1:-1:-1;;;5268:24:0;;-1:-1:-1;;;;;3548:32:1;;5268:24:0;;;3530:51:1;3503:18;;5268:24:0;3370:217:1;5187:121:0;-1:-1:-1;5329:10:0;5322:17;;5911:528;6044:17;;:21;6040:392;;6276:10;6270:17;6333:15;6320:10;6316:2;6312:19;6305:44;6040:392;6403:17;;-1:-1:-1;;;6403:17:0;;;;;;;;;;;14:173:1;82:20;;-1:-1:-1;;;;;131:31:1;;121:42;;111:70;;177:1;174;167:12;111:70;14:173;;;:::o;192:186::-;251:6;304:2;292:9;283:7;279:23;275:32;272:52;;;320:1;317;310:12;272:52;343:29;362:9;343:29;:::i;383:254::-;451:6;459;512:2;500:9;491:7;487:23;483:32;480:52;;;528:1;525;518:12;480:52;551:29;570:9;551:29;:::i;:::-;541:39;627:2;612:18;;;;599:32;;-1:-1:-1;;;383:254:1:o;642:127::-;703:10;698:3;694:20;691:1;684:31;734:4;731:1;724:15;758:4;755:1;748:15;774:241;859:1;852:5;849:12;839:143;;904:10;899:3;895:20;892:1;885:31;939:4;936:1;929:15;967:4;964:1;957:15;839:143;991:18;;774:241::o;1020:599::-;-1:-1:-1;;;;;1340:32:1;;1322:51;;1404:2;1389:18;;1382:34;;;1447:2;1432:18;;1425:34;;;1309:3;1294:19;;1468:57;1521:2;1506:18;;1498:6;1468:57;:::i;:::-;1556:3;1541:19;;1534:35;;;;1600:3;1585:19;1578:35;1020:599;;-1:-1:-1;;;;1020:599:1:o;1624:154::-;1703:20;;1752:1;1742:12;;1732:40;;1768:1;1765;1758:12;1783:494;1895:6;1903;1911;1919;1927;1980:3;1968:9;1959:7;1955:23;1951:33;1948:53;;;1997:1;1994;1987:12;1948:53;2020:29;2039:9;2020:29;:::i;:::-;2010:39;;2096:2;2085:9;2081:18;2068:32;2058:42;;2147:2;2136:9;2132:18;2119:32;2109:42;;2170:49;2215:2;2204:9;2200:18;2170:49;:::i;:::-;1783:494;;;;-1:-1:-1;1783:494:1;;2266:3;2251:19;2238:33;;1783:494;-1:-1:-1;;1783:494:1:o;2282:901::-;2373:6;2426:3;2414:9;2405:7;2401:23;2397:33;2394:53;;;2443:1;2440;2433:12;2394:53;2476:2;2470:9;2518:3;2510:6;2506:16;2588:6;2576:10;2573:22;2552:18;2540:10;2537:34;2534:62;2531:185;;;2638:10;2633:3;2629:20;2626:1;2619:31;2673:4;2670:1;2663:15;2701:4;2698:1;2691:15;2531:185;2732:2;2725:22;2771:29;2790:9;2771:29;:::i;:::-;2763:6;2756:45;2862:2;2851:9;2847:18;2834:32;2829:2;2821:6;2817:15;2810:57;2928:2;2917:9;2913:18;2900:32;2895:2;2887:6;2883:15;2876:57;2966:49;3011:2;3000:9;2996:18;2966:49;:::i;:::-;2961:2;2953:6;2949:15;2942:74;3078:3;3067:9;3063:19;3050:33;3044:3;3036:6;3032:16;3025:59;3146:3;3135:9;3131:19;3118:33;3112:3;3104:6;3100:16;3093:59;3171:6;3161:16;;;2282:901;;;;:::o;4014:127::-;4075:10;4070:3;4066:20;4063:1;4056:31;4106:4;4103:1;4096:15;4130:4;4127:1;4120:15;4494:127;4555:10;4550:3;4546:20;4543:1;4536:31;4586:4;4583:1;4576:15;4610:4;4607:1;4600:15;4626:125;4691:9;;;4712:10;;;4709:36;;;4725:18;;:::i;5944:429::-;6190:25;;;6246:2;6231:18;;6224:34;;;6177:3;6162:19;;6267:57;6320:2;6305:18;;6297:6;6267:57;:::i;:::-;6360:6;6355:2;6344:9;6340:18;6333:34;5944:429;;;;;;;:::o;6378:128::-;6445:9;;;6466:11;;;6463:37;;;6480:18;;:::i;6511:168::-;6584:9;;;6615;;6632:15;;;6626:22;;6612:37;6602:71;;6653:18;;:::i;6684:217::-;6724:1;6750;6740:132;;6794:10;6789:3;6785:20;6782:1;6775:31;6829:4;6826:1;6819:15;6857:4;6854:1;6847:15;6740:132;-1:-1:-1;6886:9:1;;6684:217::o;7565:277::-;7632:6;7685:2;7673:9;7664:7;7660:23;7656:32;7653:52;;;7701:1;7698;7691:12;7653:52;7733:9;7727:16;7786:5;7779:13;7772:21;7765:5;7762:32;7752:60;;7808:1;7805;7798:12;8055:412;8184:3;8222:6;8216:13;8247:1;8257:129;8271:6;8268:1;8265:13;8257:129;;;8369:4;8353:14;;;8349:25;;8343:32;8330:11;;;8323:53;8286:12;8257:129;;;-1:-1:-1;8441:1:1;8405:16;;8430:13;;;-1:-1:-1;8405:16:1;8055:412;-1:-1:-1;8055:412:1:o

Swarm Source

ipfs://33f35417c2ef6d8063bc2296f8853ff69840f2048b1f9ce0bbfe7e933f871e1c

Block Transaction Gas Used Reward
view all blocks sequenced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
[ Download: CSV Export  ]
[ 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.