ETH Price: $2,387.25 (-1.12%)

Contract

0x22B3c9af7A9d47939719b14C8969100370514ff8
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Invest184939412023-11-03 20:33:35307 days ago1699043615IN
0x22B3c9af...370514ff8
0 ETH0.0018705323.81239805
Invest184937682023-11-03 19:58:35307 days ago1699041515IN
0x22B3c9af...370514ff8
0 ETH0.0020082620.99796881
Invest184922582023-11-03 14:54:11307 days ago1699023251IN
0x22B3c9af...370514ff8
0 ETH0.0030907831.26838818
Invest184914832023-11-03 12:17:59307 days ago1699013879IN
0x22B3c9af...370514ff8
0 ETH0.0017215318
Invest184894152023-11-03 5:20:47307 days ago1698988847IN
0x22B3c9af...370514ff8
0 ETH0.0008772910.73178928
Invest184874892023-11-02 22:52:59308 days ago1698965579IN
0x22B3c9af...370514ff8
0 ETH0.0028623928.96134232
Invest184380392023-10-27 0:42:47315 days ago1698367367IN
0x22B3c9af...370514ff8
0 ETH0.0012500813.7594355
Invest184348552023-10-26 14:02:23315 days ago1698328943IN
0x22B3c9af...370514ff8
0 ETH0.0035306235.7267349
Invest184217462023-10-24 17:56:47317 days ago1698170207IN
0x22B3c9af...370514ff8
0 ETH0.0020167220.40496382
Invest184194442023-10-24 10:12:23317 days ago1698142343IN
0x22B3c9af...370514ff8
0 ETH0.0019914625.35573268
Invest184138752023-10-23 15:31:11318 days ago1698075071IN
0x22B3c9af...370514ff8
0 ETH0.0041792346
Invest182915492023-10-06 12:46:23335 days ago1696596383IN
0x22B3c9af...370514ff8
0 ETH0.000676226.84114954
Invest182676472023-10-03 4:33:11339 days ago1696307591IN
0x22B3c9af...370514ff8
0 ETH0.000453985.90177472
Invest180775252023-09-06 12:53:23365 days ago1694004803IN
0x22B3c9af...370514ff8
0 ETH0.0017971719.11177829
Invest180722962023-09-05 19:15:59366 days ago1693941359IN
0x22B3c9af...370514ff8
0 ETH0.001953421.50637575
Invest180703902023-09-05 12:50:47366 days ago1693918247IN
0x22B3c9af...370514ff8
0 ETH0.0011465712.19466373
Invest180375852023-08-31 22:38:59371 days ago1693521539IN
0x22B3c9af...370514ff8
0 ETH0.0017130719.19737505
Invest179758352023-08-23 7:11:35379 days ago1692774695IN
0x22B3c9af...370514ff8
0 ETH0.0010382312.70435874
Invest179245292023-08-16 2:51:23387 days ago1692154283IN
0x22B3c9af...370514ff8
0 ETH0.0018122618.33852526
Invest179151372023-08-14 19:20:11388 days ago1692040811IN
0x22B3c9af...370514ff8
0 ETH0.0026021126.3310997
Invest179116652023-08-14 7:42:47388 days ago1691998967IN
0x22B3c9af...370514ff8
0 ETH0.001280514.347901
Invest178780892023-08-09 14:57:35393 days ago1691593055IN
0x22B3c9af...370514ff8
0 ETH0.0020785825.42699309
Invest178656162023-08-07 21:04:59395 days ago1691442299IN
0x22B3c9af...370514ff8
0 ETH0.002088121.12459196
Invest178646132023-08-07 17:42:35395 days ago1691430155IN
0x22B3c9af...370514ff8
0 ETH0.0025997227.6498455
Invest178645162023-08-07 17:23:11395 days ago1691428991IN
0x22B3c9af...370514ff8
0 ETH0.003193432.31046977
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
SENPresale

Compiler Version
v0.8.18+commit.87f61d96

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2023-07-07
*/

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

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

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

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

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

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

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

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

// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

/**
 * @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 amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

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

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

interface ISEN is IERC20{

    function mint(address _to, uint256 _amount) external;

}

// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/utils/SafeERC20.sol)

// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)

/**
 * @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.0/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, 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.
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, defaultRevert);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with a
     * `customRevert` function as a fallback when `target` reverts.
     *
     * Requirements:
     *
     * - `customRevert` must be a reverting function.
     */
    function functionCall(
        address target,
        bytes memory data,
        function() internal view customRevert
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, customRevert);
    }

    /**
     * @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) {
        return functionCallWithValue(target, data, value, defaultRevert);
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with a `customRevert` function as a fallback revert reason when `target` reverts.
     *
     * Requirements:
     *
     * - `customRevert` must be a reverting function.
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        function() internal view customRevert
    ) 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, customRevert);
    }

    /**
     * @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) {
        return functionStaticCall(target, data, defaultRevert);
    }

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

    /**
     * @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) {
        return functionDelegateCall(target, data, defaultRevert);
    }

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

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided `customRevert`) in case of unsuccessful call or if target was not a contract.
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        function() internal view customRevert
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // 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 (target.code.length == 0) {
                    revert AddressEmptyCode(target);
                }
            }
            return returndata;
        } else {
            _revert(returndata, customRevert);
        }
    }

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

    /**
     * @dev Same as {xref-Address-verifyCallResult-bool-bytes-}[`verifyCallResult`], but with a
     * `customRevert` function as a fallback when `success` is `false`.
     *
     * Requirements:
     *
     * - `customRevert` must be a reverting function.
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        function() internal view customRevert
    ) internal view returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            _revert(returndata, customRevert);
        }
    }

    /**
     * @dev Default reverting function when no `customRevert` is provided in a function call.
     */
    function defaultRevert() internal pure {
        revert FailedInnerCall();
    }

    function _revert(bytes memory returndata, function() internal view customRevert) private view {
        // 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 {
            customRevert();
            revert FailedInnerCall();
        }
    }
}

// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/IERC20Permit.sol)

/**
 * @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.
 */
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].
     */
    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);
}

/**
 * @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 Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.
     * Revert on invalid signature.
     */
    function safePermit(
        IERC20Permit token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        if (nonceAfter != nonceBefore + 1) {
            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).
     */
    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;
    }
}

contract SENPresale is Ownable{
    using SafeERC20 for IERC20;

    ISEN public sen;
    IERC20 public payToken;
    uint256 public saleCap;
    uint256 public minPurchase;
    uint256 public maxPurchase;
    uint256 public ratePer1e18;
    uint256 public vestingPeriod;
    uint256 public vestingCliff;
    uint256 public upfrontBPpostCliff;
    uint256 public totalSold;
    uint256 public totalClaimed;
    uint256 public tgeTime;
    uint8 public saleStage; // 0: pre-sale, 1: sale, 2: post-sale

    mapping(address => uint256) public amountPurchased;
    mapping(address => uint256) public amountClaimed;

    constructor(
        address _payToken,
        uint256 _saleCap,
        uint256 _minPurchase,
        uint256 _maxPurchase,
        uint256 _ratePer1e18,
        uint256 _vestingPeriod,
        uint256 _vestingCliff,
        uint256 _upfrontBPpostCliff
    ){
        payToken = IERC20(_payToken);
        saleCap = _saleCap;
        minPurchase = _minPurchase;
        maxPurchase = _maxPurchase;
        ratePer1e18 = _ratePer1e18;
        vestingPeriod = _vestingPeriod;
        vestingCliff = _vestingCliff;
        upfrontBPpostCliff = _upfrontBPpostCliff;
    }

    function invest(address to, uint256 amountToBuy) public{
        require(saleStage == 1, "SenecaSale : Sale not active");
        require(amountToBuy + amountPurchased[to] >= minPurchase, "SenecaSale : Amount too small");
        require(amountToBuy + amountPurchased[to] <= maxPurchase, "SenecaSale : Amount too large");
        require(totalSold + amountToBuy <= saleCap, "SenecaSale : Sale cap reached");
        uint256 payAmount = amountToBuy * ratePer1e18 / 1e18;
        payToken.safeTransferFrom(msg.sender, owner(), payAmount);
        amountPurchased[to] += amountToBuy;
        totalSold += amountToBuy;
    }

    function claim() external{
        require(saleStage == 2, "SenecaSale : Sale not ended");
        require(tgeTime > 0, "SenecaSale : TGE time not set");
        require(amountPurchased[msg.sender] > 0, "SenecaSale : No purchase found");
        uint256 amountToClaim = _amountVested(msg.sender) - amountClaimed[msg.sender];
        sen.mint(msg.sender, amountToClaim);
        amountClaimed[msg.sender] += amountToClaim;
    }

    function amountVested(address investor) external view returns(uint256){
        return _amountVested(investor);
    }

    function _amountVested(address investor) internal view returns(uint256){
        if(block.timestamp < tgeTime + vestingCliff){
            return 0;
        }
        if(block.timestamp >= tgeTime + vestingPeriod){
            return amountPurchased[investor];
        }
        return ((amountPurchased[investor] * (block.timestamp - tgeTime - vestingCliff) *(10000 - upfrontBPpostCliff) ) / vestingPeriod / 10000) + (amountPurchased[investor] * upfrontBPpostCliff / 10000);
    }

    function setTgeTime(uint256 _tgeTime) external onlyOwner{
        require(saleStage == 2, "Sale already not over");
        require(tgeTime == 0, "TGE time already set");
        tgeTime = _tgeTime;
    }

    function setSaleStage(uint8 _saleStage) external onlyOwner{
        require(_saleStage >= saleStage, "Cannot go back in sale stage");
        require(_saleStage <= 2, "Invalid sale stage");
        saleStage = _saleStage;
    }

    function setMinPurchase(uint256 _minPurchase) external onlyOwner{
        minPurchase = _minPurchase;
    }

    function setMaxPurchase(uint256 _maxPurchase) external onlyOwner{
        maxPurchase = _maxPurchase;
    }

    function setSen(address _sen) external onlyOwner{
        sen = ISEN(_sen);
    }

    function withdrawTokens(address token, uint256 amount) external onlyOwner{
        IERC20(token).safeTransfer(msg.sender, amount);
    }

}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_payToken","type":"address"},{"internalType":"uint256","name":"_saleCap","type":"uint256"},{"internalType":"uint256","name":"_minPurchase","type":"uint256"},{"internalType":"uint256","name":"_maxPurchase","type":"uint256"},{"internalType":"uint256","name":"_ratePer1e18","type":"uint256"},{"internalType":"uint256","name":"_vestingPeriod","type":"uint256"},{"internalType":"uint256","name":"_vestingCliff","type":"uint256"},{"internalType":"uint256","name":"_upfrontBPpostCliff","type":"uint256"}],"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":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"amountClaimed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"amountPurchased","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"investor","type":"address"}],"name":"amountVested","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amountToBuy","type":"uint256"}],"name":"invest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"maxPurchase","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minPurchase","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"payToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ratePer1e18","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"saleCap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"saleStage","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"sen","outputs":[{"internalType":"contract ISEN","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxPurchase","type":"uint256"}],"name":"setMaxPurchase","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minPurchase","type":"uint256"}],"name":"setMinPurchase","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_saleStage","type":"uint8"}],"name":"setSaleStage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_sen","type":"address"}],"name":"setSen","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tgeTime","type":"uint256"}],"name":"setTgeTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"tgeTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalClaimed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"upfrontBPpostCliff","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vestingCliff","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vestingPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawTokens","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b506040516110b53803806110b583398101604081905261002f916100cc565b6100383361007c565b600280546001600160a01b0319166001600160a01b039990991698909817909755600395909555600493909355600591909155600655600755600855600955610142565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600080600080600080600080610100898b0312156100e957600080fd5b88516001600160a01b038116811461010057600080fd5b809850506020890151965060408901519550606089015194506080890151935060a0890151925060c0890151915060e089015190509295985092959890939650565b610f64806101516000396000f3fe608060405234801561001057600080fd5b50600436106101a95760003560e01c8063715018a6116100f9578063b44c576711610097578063d7e1ea1711610071578063d7e1ea1714610337578063e8307d0014610357578063f2fde38b1461036a578063f3640e741461037d57600080fd5b8063b44c576714610308578063b9b8c2461461031b578063d54ad2a11461032e57600080fd5b80639106d7ba116100d35780639106d7ba146102d057806396336b30146102d9578063977b055b146102ec578063ac678735146102f557600080fd5b8063715018a6146102ae5780637313ee5a146102b65780638da5cb5b146102bf57600080fd5b80634aaca86d1161016657806360341e631161014057806360341e63146102545780636a6aa1621461027f5780636c6b027814610288578063711897421461029b57600080fd5b80634aaca86d146102245780634e71d92d146102435780635bea65e11461024b57600080fd5b806306b091f9146101ae578063074ba79d146101c3578063078fd9ea146101f65780633163e3a8146101ff57806333b5b62e14610208578063489c340314610211575b600080fd5b6101c16101bc366004610de7565b610386565b005b6101e36101d1366004610e11565b600e6020526000908152604090205481565b6040519081526020015b60405180910390f35b6101e360035481565b6101e3600c5481565b6101e360045481565b6101c161021f366004610e2c565b6103a6565b600d546102319060ff1681565b60405160ff90911681526020016101ed565b6101c161044c565b6101e360095481565b600154610267906001600160a01b031681565b6040516001600160a01b0390911681526020016101ed565b6101e360065481565b6101c1610296366004610e11565b610601565b6101c16102a9366004610e2c565b61062b565b6101c1610638565b6101e360075481565b6000546001600160a01b0316610267565b6101e3600a5481565b600254610267906001600160a01b031681565b6101e360055481565b6101e3610303366004610e11565b61064c565b6101c1610316366004610e45565b61065d565b6101c1610329366004610de7565b61071d565b6101e3600b5481565b6101e3610345366004610e11565b600f6020526000908152604090205481565b6101c1610365366004610e2c565b610953565b6101c1610378366004610e11565b610960565b6101e360085481565b61038e6109d9565b6103a26001600160a01b0383163383610a33565b5050565b6103ae6109d9565b600d5460ff166002146104005760405162461bcd60e51b815260206004820152601560248201527429b0b6329030b63932b0b23c903737ba1037bb32b960591b60448201526064015b60405180910390fd5b600c54156104475760405162461bcd60e51b81526020600482015260146024820152731511d1481d1a5b5948185b1c9958591e481cd95d60621b60448201526064016103f7565b600c55565b600d5460ff166002146104a15760405162461bcd60e51b815260206004820152601b60248201527f53656e65636153616c65203a2053616c65206e6f7420656e646564000000000060448201526064016103f7565b6000600c54116104f35760405162461bcd60e51b815260206004820152601d60248201527f53656e65636153616c65203a205447452074696d65206e6f742073657400000060448201526064016103f7565b336000908152600e602052604090205461054f5760405162461bcd60e51b815260206004820152601e60248201527f53656e65636153616c65203a204e6f20707572636861736520666f756e64000060448201526064016103f7565b336000818152600f6020526040812054909161056a90610a97565b6105749190610e7e565b6001546040516340c10f1960e01b8152336004820152602481018390529192506001600160a01b0316906340c10f1990604401600060405180830381600087803b1580156105c157600080fd5b505af11580156105d5573d6000803e3d6000fd5b5050336000908152600f6020526040812080548594509092506105f9908490610e91565b909155505050565b6106096109d9565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6106336109d9565b600555565b6106406109d9565b61064a6000610b98565b565b600061065782610a97565b92915050565b6106656109d9565b600d5460ff90811690821610156106be5760405162461bcd60e51b815260206004820152601c60248201527f43616e6e6f7420676f206261636b20696e2073616c652073746167650000000060448201526064016103f7565b60028160ff1611156107075760405162461bcd60e51b8152602060048201526012602482015271496e76616c69642073616c6520737461676560701b60448201526064016103f7565b600d805460ff191660ff92909216919091179055565b600d5460ff166001146107725760405162461bcd60e51b815260206004820152601c60248201527f53656e65636153616c65203a2053616c65206e6f74206163746976650000000060448201526064016103f7565b6004546001600160a01b0383166000908152600e60205260409020546107989083610e91565b10156107e65760405162461bcd60e51b815260206004820152601d60248201527f53656e65636153616c65203a20416d6f756e7420746f6f20736d616c6c00000060448201526064016103f7565b6005546001600160a01b0383166000908152600e602052604090205461080c9083610e91565b111561085a5760405162461bcd60e51b815260206004820152601d60248201527f53656e65636153616c65203a20416d6f756e7420746f6f206c6172676500000060448201526064016103f7565b60035481600a5461086b9190610e91565b11156108b95760405162461bcd60e51b815260206004820152601d60248201527f53656e65636153616c65203a2053616c6520636170207265616368656400000060448201526064016103f7565b6000670de0b6b3a7640000600654836108d29190610ea4565b6108dc9190610ebb565b9050610908336108f46000546001600160a01b031690565b6002546001600160a01b0316919084610be8565b6001600160a01b0383166000908152600e602052604081208054849290610930908490610e91565b9250508190555081600a60008282546109499190610e91565b9091555050505050565b61095b6109d9565b600455565b6109686109d9565b6001600160a01b0381166109cd5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016103f7565b6109d681610b98565b50565b6000546001600160a01b0316331461064a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103f7565b6040516001600160a01b03838116602483015260448201839052610a9291859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050610c27565b505050565b6000600854600c54610aa99190610e91565b421015610ab857506000919050565b600754600c54610ac89190610e91565b4210610aea57506001600160a01b03166000908152600e602052604090205490565b6009546001600160a01b0383166000908152600e602052604090205461271091610b1391610ea4565b610b1d9190610ebb565b612710600754600954612710610b339190610e7e565b600854600c54610b439042610e7e565b610b4d9190610e7e565b6001600160a01b0387166000908152600e6020526040902054610b709190610ea4565b610b7a9190610ea4565b610b849190610ebb565b610b8e9190610ebb565b6106579190610e91565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516001600160a01b038481166024830152838116604483015260648201839052610c219186918216906323b872dd90608401610a60565b50505050565b6000610c3c6001600160a01b03841683610c8a565b90508051600014158015610c61575080806020019051810190610c5f9190610edd565b155b15610a9257604051635274afe760e01b81526001600160a01b03841660048201526024016103f7565b6060610c9b83836000610ca2610cbb565b9392505050565b604051630a12f52160e11b815260040160405180910390fd5b606082471015610ce05760405163cd78605960e01b81523060048201526024016103f7565b600080866001600160a01b03168587604051610cfc9190610eff565b60006040518083038185875af1925050503d8060008114610d39576040519150601f19603f3d011682016040523d82523d6000602084013e610d3e565b606091505b5091509150610d4f87838387610d5c565b925050505b949350505050565b60608315610daa578251600003610da357846001600160a01b03163b600003610da357604051639996b31560e01b81526001600160a01b03861660048201526024016103f7565b5081610d54565b610d548383815115610dbf5781518083602001fd5b610ca28163ffffffff16565b80356001600160a01b0381168114610de257600080fd5b919050565b60008060408385031215610dfa57600080fd5b610e0383610dcb565b946020939093013593505050565b600060208284031215610e2357600080fd5b610c9b82610dcb565b600060208284031215610e3e57600080fd5b5035919050565b600060208284031215610e5757600080fd5b813560ff81168114610c9b57600080fd5b634e487b7160e01b600052601160045260246000fd5b8181038181111561065757610657610e68565b8082018082111561065757610657610e68565b808202811582820484141761065757610657610e68565b600082610ed857634e487b7160e01b600052601260045260246000fd5b500490565b600060208284031215610eef57600080fd5b81518015158114610c9b57600080fd5b6000825160005b81811015610f205760208186018101518583015201610f06565b50600092019182525091905056fea2646970667358221220446563d081c5139769fc5a1fa47fecf9edf9821e53c5c8bce9ca7e414d8149b164736f6c63430008120033000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7000000000000000000000000000000000000000000069e10de76676d080000000000000000000000000000000000000000000000000013402fcfd379a254000000000000000000000000000000000000000000000000c081de1e42c057480000000000000000000000000000000000000000000000000000000000000000d6d8000000000000000000000000000000000000000000000000000000000077f880000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003e8

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101a95760003560e01c8063715018a6116100f9578063b44c576711610097578063d7e1ea1711610071578063d7e1ea1714610337578063e8307d0014610357578063f2fde38b1461036a578063f3640e741461037d57600080fd5b8063b44c576714610308578063b9b8c2461461031b578063d54ad2a11461032e57600080fd5b80639106d7ba116100d35780639106d7ba146102d057806396336b30146102d9578063977b055b146102ec578063ac678735146102f557600080fd5b8063715018a6146102ae5780637313ee5a146102b65780638da5cb5b146102bf57600080fd5b80634aaca86d1161016657806360341e631161014057806360341e63146102545780636a6aa1621461027f5780636c6b027814610288578063711897421461029b57600080fd5b80634aaca86d146102245780634e71d92d146102435780635bea65e11461024b57600080fd5b806306b091f9146101ae578063074ba79d146101c3578063078fd9ea146101f65780633163e3a8146101ff57806333b5b62e14610208578063489c340314610211575b600080fd5b6101c16101bc366004610de7565b610386565b005b6101e36101d1366004610e11565b600e6020526000908152604090205481565b6040519081526020015b60405180910390f35b6101e360035481565b6101e3600c5481565b6101e360045481565b6101c161021f366004610e2c565b6103a6565b600d546102319060ff1681565b60405160ff90911681526020016101ed565b6101c161044c565b6101e360095481565b600154610267906001600160a01b031681565b6040516001600160a01b0390911681526020016101ed565b6101e360065481565b6101c1610296366004610e11565b610601565b6101c16102a9366004610e2c565b61062b565b6101c1610638565b6101e360075481565b6000546001600160a01b0316610267565b6101e3600a5481565b600254610267906001600160a01b031681565b6101e360055481565b6101e3610303366004610e11565b61064c565b6101c1610316366004610e45565b61065d565b6101c1610329366004610de7565b61071d565b6101e3600b5481565b6101e3610345366004610e11565b600f6020526000908152604090205481565b6101c1610365366004610e2c565b610953565b6101c1610378366004610e11565b610960565b6101e360085481565b61038e6109d9565b6103a26001600160a01b0383163383610a33565b5050565b6103ae6109d9565b600d5460ff166002146104005760405162461bcd60e51b815260206004820152601560248201527429b0b6329030b63932b0b23c903737ba1037bb32b960591b60448201526064015b60405180910390fd5b600c54156104475760405162461bcd60e51b81526020600482015260146024820152731511d1481d1a5b5948185b1c9958591e481cd95d60621b60448201526064016103f7565b600c55565b600d5460ff166002146104a15760405162461bcd60e51b815260206004820152601b60248201527f53656e65636153616c65203a2053616c65206e6f7420656e646564000000000060448201526064016103f7565b6000600c54116104f35760405162461bcd60e51b815260206004820152601d60248201527f53656e65636153616c65203a205447452074696d65206e6f742073657400000060448201526064016103f7565b336000908152600e602052604090205461054f5760405162461bcd60e51b815260206004820152601e60248201527f53656e65636153616c65203a204e6f20707572636861736520666f756e64000060448201526064016103f7565b336000818152600f6020526040812054909161056a90610a97565b6105749190610e7e565b6001546040516340c10f1960e01b8152336004820152602481018390529192506001600160a01b0316906340c10f1990604401600060405180830381600087803b1580156105c157600080fd5b505af11580156105d5573d6000803e3d6000fd5b5050336000908152600f6020526040812080548594509092506105f9908490610e91565b909155505050565b6106096109d9565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6106336109d9565b600555565b6106406109d9565b61064a6000610b98565b565b600061065782610a97565b92915050565b6106656109d9565b600d5460ff90811690821610156106be5760405162461bcd60e51b815260206004820152601c60248201527f43616e6e6f7420676f206261636b20696e2073616c652073746167650000000060448201526064016103f7565b60028160ff1611156107075760405162461bcd60e51b8152602060048201526012602482015271496e76616c69642073616c6520737461676560701b60448201526064016103f7565b600d805460ff191660ff92909216919091179055565b600d5460ff166001146107725760405162461bcd60e51b815260206004820152601c60248201527f53656e65636153616c65203a2053616c65206e6f74206163746976650000000060448201526064016103f7565b6004546001600160a01b0383166000908152600e60205260409020546107989083610e91565b10156107e65760405162461bcd60e51b815260206004820152601d60248201527f53656e65636153616c65203a20416d6f756e7420746f6f20736d616c6c00000060448201526064016103f7565b6005546001600160a01b0383166000908152600e602052604090205461080c9083610e91565b111561085a5760405162461bcd60e51b815260206004820152601d60248201527f53656e65636153616c65203a20416d6f756e7420746f6f206c6172676500000060448201526064016103f7565b60035481600a5461086b9190610e91565b11156108b95760405162461bcd60e51b815260206004820152601d60248201527f53656e65636153616c65203a2053616c6520636170207265616368656400000060448201526064016103f7565b6000670de0b6b3a7640000600654836108d29190610ea4565b6108dc9190610ebb565b9050610908336108f46000546001600160a01b031690565b6002546001600160a01b0316919084610be8565b6001600160a01b0383166000908152600e602052604081208054849290610930908490610e91565b9250508190555081600a60008282546109499190610e91565b9091555050505050565b61095b6109d9565b600455565b6109686109d9565b6001600160a01b0381166109cd5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016103f7565b6109d681610b98565b50565b6000546001600160a01b0316331461064a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103f7565b6040516001600160a01b03838116602483015260448201839052610a9291859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050610c27565b505050565b6000600854600c54610aa99190610e91565b421015610ab857506000919050565b600754600c54610ac89190610e91565b4210610aea57506001600160a01b03166000908152600e602052604090205490565b6009546001600160a01b0383166000908152600e602052604090205461271091610b1391610ea4565b610b1d9190610ebb565b612710600754600954612710610b339190610e7e565b600854600c54610b439042610e7e565b610b4d9190610e7e565b6001600160a01b0387166000908152600e6020526040902054610b709190610ea4565b610b7a9190610ea4565b610b849190610ebb565b610b8e9190610ebb565b6106579190610e91565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516001600160a01b038481166024830152838116604483015260648201839052610c219186918216906323b872dd90608401610a60565b50505050565b6000610c3c6001600160a01b03841683610c8a565b90508051600014158015610c61575080806020019051810190610c5f9190610edd565b155b15610a9257604051635274afe760e01b81526001600160a01b03841660048201526024016103f7565b6060610c9b83836000610ca2610cbb565b9392505050565b604051630a12f52160e11b815260040160405180910390fd5b606082471015610ce05760405163cd78605960e01b81523060048201526024016103f7565b600080866001600160a01b03168587604051610cfc9190610eff565b60006040518083038185875af1925050503d8060008114610d39576040519150601f19603f3d011682016040523d82523d6000602084013e610d3e565b606091505b5091509150610d4f87838387610d5c565b925050505b949350505050565b60608315610daa578251600003610da357846001600160a01b03163b600003610da357604051639996b31560e01b81526001600160a01b03861660048201526024016103f7565b5081610d54565b610d548383815115610dbf5781518083602001fd5b610ca28163ffffffff16565b80356001600160a01b0381168114610de257600080fd5b919050565b60008060408385031215610dfa57600080fd5b610e0383610dcb565b946020939093013593505050565b600060208284031215610e2357600080fd5b610c9b82610dcb565b600060208284031215610e3e57600080fd5b5035919050565b600060208284031215610e5757600080fd5b813560ff81168114610c9b57600080fd5b634e487b7160e01b600052601160045260246000fd5b8181038181111561065757610657610e68565b8082018082111561065757610657610e68565b808202811582820484141761065757610657610e68565b600082610ed857634e487b7160e01b600052601260045260246000fd5b500490565b600060208284031215610eef57600080fd5b81518015158114610c9b57600080fd5b6000825160005b81811015610f205760208186018101518583015201610f06565b50600092019182525091905056fea2646970667358221220446563d081c5139769fc5a1fa47fecf9edf9821e53c5c8bce9ca7e414d8149b164736f6c63430008120033

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

000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7000000000000000000000000000000000000000000069e10de76676d080000000000000000000000000000000000000000000000000013402fcfd379a254000000000000000000000000000000000000000000000000c081de1e42c057480000000000000000000000000000000000000000000000000000000000000000d6d8000000000000000000000000000000000000000000000000000000000077f880000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003e8

-----Decoded View---------------
Arg [0] : _payToken (address): 0xdAC17F958D2ee523a2206206994597C13D831ec7
Arg [1] : _saleCap (uint256): 8000000000000000000000000
Arg [2] : _minPurchase (uint256): 90909000000000000000000
Arg [3] : _maxPurchase (uint256): 909090000000000000000000
Arg [4] : _ratePer1e18 (uint256): 55000
Arg [5] : _vestingPeriod (uint256): 7862400
Arg [6] : _vestingCliff (uint256): 0
Arg [7] : _upfrontBPpostCliff (uint256): 1000

-----Encoded View---------------
8 Constructor Arguments found :
Arg [0] : 000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7
Arg [1] : 000000000000000000000000000000000000000000069e10de76676d08000000
Arg [2] : 0000000000000000000000000000000000000000000013402fcfd379a2540000
Arg [3] : 00000000000000000000000000000000000000000000c081de1e42c057480000
Arg [4] : 000000000000000000000000000000000000000000000000000000000000d6d8
Arg [5] : 000000000000000000000000000000000000000000000000000000000077f880
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [7] : 00000000000000000000000000000000000000000000000000000000000003e8


Deployed Bytecode Sourcemap

23946:3858:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27661:138;;;;;;:::i;:::-;;:::i;:::-;;24469:50;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;788:25:1;;;776:2;761:18;24469:50:0;;;;;;;;24069:22;;;;;;24371;;;;;;24098:26;;;;;;26881:208;;;;;;:::i;:::-;;:::i;24400:22::-;;;;;;;;;;;;1181:4:1;1169:17;;;1151:36;;1139:2;1124:18;24400:22:0;1009:184:1;25815:434:0;;;:::i;24266:33::-;;;;;;24018:15;;;;;-1:-1:-1;;;;;24018:15:0;;;;;;-1:-1:-1;;;;;1374:32:1;;;1356:51;;1344:2;1329:18;24018:15:0;1198:215:1;24164:26:0;;;;;;27570:83;;;;;;:::i;:::-;;:::i;27453:109::-;;;;;;:::i;:::-;;:::i;2660:103::-;;;:::i;24197:28::-;;;;;;2019:87;2065:7;2092:6;-1:-1:-1;;;;;2092:6:0;2019:87;;24306:24;;;;;;24040:22;;;;;-1:-1:-1;;;;;24040:22:0;;;24131:26;;;;;;26257:119;;;;;;:::i;:::-;;:::i;27097:231::-;;;;;;:::i;:::-;;:::i;25178:629::-;;;;;;:::i;:::-;;:::i;24337:27::-;;;;;;24526:48;;;;;;:::i;:::-;;;;;;;;;;;;;;27336:109;;;;;;:::i;:::-;;:::i;2918:201::-;;;;;;:::i;:::-;;:::i;24232:27::-;;;;;;27661:138;1905:13;:11;:13::i;:::-;27745:46:::1;-1:-1:-1::0;;;;;27745:26:0;::::1;27772:10;27784:6:::0;27745:26:::1;:46::i;:::-;27661:138:::0;;:::o;26881:208::-;1905:13;:11;:13::i;:::-;26956:9:::1;::::0;::::1;;26969:1;26956:14;26948:48;;;::::0;-1:-1:-1;;;26948:48:0;;2324:2:1;26948:48:0::1;::::0;::::1;2306:21:1::0;2363:2;2343:18;;;2336:30;-1:-1:-1;;;2382:18:1;;;2375:51;2443:18;;26948:48:0::1;;;;;;;;;27015:7;::::0;:12;27007:45:::1;;;::::0;-1:-1:-1;;;27007:45:0;;2674:2:1;27007:45:0::1;::::0;::::1;2656:21:1::0;2713:2;2693:18;;;2686:30;-1:-1:-1;;;2732:18:1;;;2725:50;2792:18;;27007:45:0::1;2472:344:1::0;27007:45:0::1;27063:7;:18:::0;26881:208::o;25815:434::-;25859:9;;;;25872:1;25859:14;25851:54;;;;-1:-1:-1;;;25851:54:0;;3023:2:1;25851:54:0;;;3005:21:1;3062:2;3042:18;;;3035:30;3101:29;3081:18;;;3074:57;3148:18;;25851:54:0;2821:351:1;25851:54:0;25934:1;25924:7;;:11;25916:53;;;;-1:-1:-1;;;25916:53:0;;3379:2:1;25916:53:0;;;3361:21:1;3418:2;3398:18;;;3391:30;3457:31;3437:18;;;3430:59;3506:18;;25916:53:0;3177:353:1;25916:53:0;26004:10;26018:1;25988:27;;;:15;:27;;;;;;25980:74;;;;-1:-1:-1;;;25980:74:0;;3737:2:1;25980:74:0;;;3719:21:1;3776:2;3756:18;;;3749:30;3815:32;3795:18;;;3788:60;3865:18;;25980:74:0;3535:354:1;25980:74:0;26131:10;26065:21;26117:25;;;:13;:25;;;;;;26065:21;;26089:25;;:13;:25::i;:::-;:53;;;;:::i;:::-;26153:3;;:35;;-1:-1:-1;;;26153:35:0;;26162:10;26153:35;;;4333:51:1;4400:18;;;4393:34;;;26065:77:0;;-1:-1:-1;;;;;;26153:3:0;;:8;;4306:18:1;;26153:35:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;26213:10:0;26199:25;;;;:13;:25;;;;;:42;;26228:13;;-1:-1:-1;26199:25:0;;-1:-1:-1;26199:42:0;;26228:13;;26199:42;:::i;:::-;;;;-1:-1:-1;;;25815:434:0:o;27570:83::-;1905:13;:11;:13::i;:::-;27629:3:::1;:16:::0;;-1:-1:-1;;;;;;27629:16:0::1;-1:-1:-1::0;;;;;27629:16:0;;;::::1;::::0;;;::::1;::::0;;27570:83::o;27453:109::-;1905:13;:11;:13::i;:::-;27528:11:::1;:26:::0;27453:109::o;2660:103::-;1905:13;:11;:13::i;:::-;2725:30:::1;2752:1;2725:18;:30::i;:::-;2660:103::o:0;26257:119::-;26319:7;26345:23;26359:8;26345:13;:23::i;:::-;26338:30;26257:119;-1:-1:-1;;26257:119:0:o;27097:231::-;1905:13;:11;:13::i;:::-;27188:9:::1;::::0;::::1;::::0;;::::1;27174:23:::0;;::::1;;;27166:64;;;::::0;-1:-1:-1;;;27166:64:0;;4770:2:1;27166:64:0::1;::::0;::::1;4752:21:1::0;4809:2;4789:18;;;4782:30;4848;4828:18;;;4821:58;4896:18;;27166:64:0::1;4568:352:1::0;27166:64:0::1;27263:1;27249:10;:15;;;;27241:46;;;::::0;-1:-1:-1;;;27241:46:0;;5127:2:1;27241:46:0::1;::::0;::::1;5109:21:1::0;5166:2;5146:18;;;5139:30;-1:-1:-1;;;5185:18:1;;;5178:48;5243:18;;27241:46:0::1;4925:342:1::0;27241:46:0::1;27298:9;:22:::0;;-1:-1:-1;;27298:22:0::1;;::::0;;;::::1;::::0;;;::::1;::::0;;27097:231::o;25178:629::-;25252:9;;;;;:14;25244:55;;;;-1:-1:-1;;;25244:55:0;;5474:2:1;25244:55:0;;;5456:21:1;5513:2;5493:18;;;5486:30;5552;5532:18;;;5525:58;5600:18;;25244:55:0;5272:352:1;25244:55:0;25355:11;;-1:-1:-1;;;;;25332:19:0;;;;;;:15;:19;;;;;;25318:33;;:11;:33;:::i;:::-;:48;;25310:90;;;;-1:-1:-1;;;25310:90:0;;5831:2:1;25310:90:0;;;5813:21:1;5870:2;5850:18;;;5843:30;5909:31;5889:18;;;5882:59;5958:18;;25310:90:0;5629:353:1;25310:90:0;25456:11;;-1:-1:-1;;;;;25433:19:0;;;;;;:15;:19;;;;;;25419:33;;:11;:33;:::i;:::-;:48;;25411:90;;;;-1:-1:-1;;;25411:90:0;;6189:2:1;25411:90:0;;;6171:21:1;6228:2;6208:18;;;6201:30;6267:31;6247:18;;;6240:59;6316:18;;25411:90:0;5987:353:1;25411:90:0;25547:7;;25532:11;25520:9;;:23;;;;:::i;:::-;:34;;25512:76;;;;-1:-1:-1;;;25512:76:0;;6547:2:1;25512:76:0;;;6529:21:1;6586:2;6566:18;;;6559:30;6625:31;6605:18;;;6598:59;6674:18;;25512:76:0;6345:353:1;25512:76:0;25599:17;25647:4;25633:11;;25619;:25;;;;:::i;:::-;:32;;;;:::i;:::-;25599:52;;25662:57;25688:10;25700:7;2065;2092:6;-1:-1:-1;;;;;2092:6:0;;2019:87;25700:7;25662:8;;-1:-1:-1;;;;;25662:8:0;;:57;25709:9;25662:25;:57::i;:::-;-1:-1:-1;;;;;25730:19:0;;;;;;:15;:19;;;;;:34;;25753:11;;25730:19;:34;;25753:11;;25730:34;:::i;:::-;;;;;;;;25788:11;25775:9;;:24;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;25178:629:0:o;27336:109::-;1905:13;:11;:13::i;:::-;27411:11:::1;:26:::0;27336:109::o;2918:201::-;1905:13;:11;:13::i;:::-;-1:-1:-1;;;;;3007:22:0;::::1;2999:73;;;::::0;-1:-1:-1;;;2999:73:0;;7300:2:1;2999:73:0::1;::::0;::::1;7282:21:1::0;7339:2;7319:18;;;7312:30;7378:34;7358:18;;;7351:62;-1:-1:-1;;;7429:18:1;;;7422:36;7475:19;;2999:73:0::1;7098:402:1::0;2999:73:0::1;3083:28;3102:8;3083:18;:28::i;:::-;2918:201:::0;:::o;2184:132::-;2065:7;2092:6;-1:-1:-1;;;;;2092:6:0;808:10;2248:23;2240:68;;;;-1:-1:-1;;;2240:68:0;;7707:2:1;2240:68:0;;;7689:21:1;;;7726:18;;;7719:30;7785:34;7765:18;;;7758:62;7837:18;;2240:68:0;7505:356:1;18717:162:0;18827:43;;-1:-1:-1;;;;;4351:32:1;;;18827:43:0;;;4333:51:1;4400:18;;;4393:34;;;18800:71:0;;18820:5;;18842:14;;;;;4306:18:1;;18827:43:0;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;18827:43:0;;;;;;;;;;;18800:19;:71::i;:::-;18717:162;;;:::o;26384:489::-;26447:7;26497:12;;26487:7;;:22;;;;:::i;:::-;26469:15;:40;26466:79;;;-1:-1:-1;26532:1:0;;26384:489;-1:-1:-1;26384:489:0:o;26466:79::-;26587:13;;26577:7;;:23;;;;:::i;:::-;26558:15;:42;26555:105;;-1:-1:-1;;;;;;26623:25:0;;;;;:15;:25;;;;;;;26384:489::o;26555:105::-;26838:18;;-1:-1:-1;;;;;26810:25:0;;;;;;:15;:25;;;;;;26859:5;;26810:46;;;:::i;:::-;:54;;;;:::i;:::-;26800:5;26784:13;;26760:18;;26752:5;:26;;;;:::i;:::-;26736:12;;26726:7;;26708:25;;:15;:25;:::i;:::-;:40;;;;:::i;:::-;-1:-1:-1;;;;;26679:25:0;;;;;;:15;:25;;;;;;:70;;;;:::i;:::-;:100;;;;:::i;:::-;26678:119;;;;:::i;:::-;:127;;;;:::i;:::-;26677:188;;;;:::i;3279:191::-;3353:16;3372:6;;-1:-1:-1;;;;;3389:17:0;;;-1:-1:-1;;;;;;3389:17:0;;;;;;3422:40;;3372:6;;;;;;;3422:40;;3353:16;3422:40;3342:128;3279:191;:::o;19124:190::-;19252:53;;-1:-1:-1;;;;;8124:15:1;;;19252:53:0;;;8106:34:1;8176:15;;;8156:18;;;8149:43;8208:18;;;8201:34;;;19225:81:0;;19245:5;;19267:18;;;;;8041::1;;19252:53:0;7866:375:1;19225:81:0;19124:190;;;;:::o;22205:638::-;22629:23;22655:33;-1:-1:-1;;;;;22655:27:0;;22683:4;22655:27;:33::i;:::-;22629:59;;22703:10;:17;22724:1;22703:22;;:57;;;;;22741:10;22730:30;;;;;;;;;;;;:::i;:::-;22729:31;22703:57;22699:137;;;22784:40;;-1:-1:-1;;;22784:40:0;;-1:-1:-1;;;;;1374:32:1;;22784:40:0;;;1356:51:1;1329:18;;22784:40:0;1198:215:1;8985:168:0;9060:12;9092:53;9114:6;9122:4;9128:1;9131:13;9092:21;:53::i;:::-;9085:60;8985:168;-1:-1:-1;;;8985:168:0:o;14725:82::-;14782:17;;-1:-1:-1;;;14782:17:0;;;;;;;;;;;10524:494;10705:12;10758:5;10734:21;:29;10730:110;;;10787:41;;-1:-1:-1;;;10787:41:0;;10822:4;10787:41;;;1356:51:1;1329:18;;10787:41:0;1198:215:1;10730:110:0;10851:12;10865:23;10892:6;-1:-1:-1;;;;;10892:11:0;10911:5;10918:4;10892:31;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10850:73;;;;10941:69;10968:6;10976:7;10985:10;10997:12;10941:26;:69::i;:::-;10934:76;;;;10524:494;;;;;;;:::o;12915:710::-;13111:12;13140:7;13136:482;;;13168:10;:17;13189:1;13168:22;13164:345;;13395:6;-1:-1:-1;;;;;13395:18:0;;13417:1;13395:23;13391:103;;13450:24;;-1:-1:-1;;;13450:24:0;;-1:-1:-1;;;;;1374:32:1;;13450:24:0;;;1356:51:1;1329:18;;13450:24:0;1198:215:1;13391:103:0;-1:-1:-1;13530:10:0;13523:17;;13136:482;13573:33;13581:10;13593:12;14987:17;;:21;14983:421;;15219:10;15213:17;15276:15;15263:10;15259:2;15255:19;15248:44;14983:421;15339:14;:12;:14;;:::i;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:254::-;260:6;268;321:2;309:9;300:7;296:23;292:32;289:52;;;337:1;334;327:12;289:52;360:29;379:9;360:29;:::i;:::-;350:39;436:2;421:18;;;;408:32;;-1:-1:-1;;;192:254:1:o;451:186::-;510:6;563:2;551:9;542:7;538:23;534:32;531:52;;;579:1;576;569:12;531:52;602:29;621:9;602:29;:::i;824:180::-;883:6;936:2;924:9;915:7;911:23;907:32;904:52;;;952:1;949;942:12;904:52;-1:-1:-1;975:23:1;;824:180;-1:-1:-1;824:180:1:o;1848:269::-;1905:6;1958:2;1946:9;1937:7;1933:23;1929:32;1926:52;;;1974:1;1971;1964:12;1926:52;2013:9;2000:23;2063:4;2056:5;2052:16;2045:5;2042:27;2032:55;;2083:1;2080;2073:12;3894:127;3955:10;3950:3;3946:20;3943:1;3936:31;3986:4;3983:1;3976:15;4010:4;4007:1;4000:15;4026:128;4093:9;;;4114:11;;;4111:37;;;4128:18;;:::i;4438:125::-;4503:9;;;4524:10;;;4521:36;;;4537:18;;:::i;6703:168::-;6776:9;;;6807;;6824:15;;;6818:22;;6804:37;6794:71;;6845:18;;:::i;6876:217::-;6916:1;6942;6932:132;;6986:10;6981:3;6977:20;6974:1;6967:31;7021:4;7018:1;7011:15;7049:4;7046:1;7039:15;6932:132;-1:-1:-1;7078:9:1;;6876:217::o;8246:277::-;8313:6;8366:2;8354:9;8345:7;8341:23;8337:32;8334:52;;;8382:1;8379;8372:12;8334:52;8414:9;8408:16;8467:5;8460:13;8453:21;8446:5;8443:32;8433:60;;8489:1;8486;8479:12;8528:412;8657:3;8695:6;8689:13;8720:1;8730:129;8744:6;8741:1;8738:13;8730:129;;;8842:4;8826:14;;;8822:25;;8816:32;8803:11;;;8796:53;8759:12;8730:129;;;-1:-1:-1;8914:1:1;8878:16;;8903:13;;;-1:-1:-1;8878:16:1;8528:412;-1:-1:-1;8528:412:1:o

Swarm Source

ipfs://446563d081c5139769fc5a1fa47fecf9edf9821e53c5c8bce9ca7e414d8149b1

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.