ETH Price: $3,911.80 (+2.55%)

Contract

0xC6E049eEF50B1f7e469Aab06b30c69D9978D2FBf
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Claim ETH191695492024-02-06 13:39:59303 days ago1707226799IN
PayAccept: Presale Contract
0 ETH0.0010428534.11806813
Buy190527422024-01-21 4:06:59319 days ago1705810019IN
PayAccept: Presale Contract
0.01 ETH0.000782139.02324381
Buy190197752024-01-16 13:33:47324 days ago1705412027IN
PayAccept: Presale Contract
1.1 ETH0.0029912934.50960169
Claim ETH190197622024-01-16 13:31:11324 days ago1705411871IN
PayAccept: Presale Contract
0 ETH0.0010147833.19987011
Buy190120152024-01-15 11:34:23325 days ago1705318463IN
PayAccept: Presale Contract
0.01 ETH0.0018172120.96463265
Set Rate190114092024-01-15 9:32:11325 days ago1705311131IN
PayAccept: Presale Contract
0 ETH0.0005745319.95461353
Buy187432792023-12-08 18:18:47362 days ago1702059527IN
PayAccept: Presale Contract
0.02 ETH0.0051057242.23795471
Set Rate187432542023-12-08 18:13:47362 days ago1702059227IN
PayAccept: Presale Contract
0 ETH0.0013224745.95104568
Start Presale187432472023-12-08 18:12:23362 days ago1702059143IN
PayAccept: Presale Contract
0 ETH0.0021156846.47811054

Latest 2 internal transactions

Advanced mode:
Parent Transaction Hash Block From To
191695492024-02-06 13:39:59303 days ago1707226799
PayAccept: Presale Contract
1.11 ETH
190197622024-01-16 13:31:11324 days ago1705411871
PayAccept: Presale Contract
0.03 ETH
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
PAYTPresale

Compiler Version
v0.8.22+commit.4fc1097e

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion
File 1 of 8 : PAYTPresale.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";

/// @title PAYT Token Presale Contract
/// @notice This contract manages the presale of PAYT tokens
contract PAYTPresale is ReentrancyGuard, Ownable {
    using SafeERC20 for IERC20;

    IERC20 public token;
    uint256 public rate;
    uint256 public round;
    uint256 public weiRaised;
    uint256 public totalTokensSold;
    uint256 public totalTokensClaimed;
    uint256 public minPurchaseAmount;
    bool public isPresaleActive = false;
    bool public isPresaleEnded = false;

    modifier whenPresaleActive() { 
        require(isPresaleActive, "TokenPresale: Presale is not active"); 
        _; 
    }

    mapping(address => uint256) public contributions;
    mapping(address => uint256) public tokensBought;

    event TokenPurchasedWithEther(address indexed purchaser, uint256 value, uint256 amount);
    
    /// @notice Constructor to set initial values
    /// @param initialOwner The initial owner of the contract
    /// @param _token The token being sold
    /// @param _rate The rate of token per Ether
    constructor(address initialOwner, address _token, uint256 _rate) Ownable(initialOwner) {
        require(_rate > 0 && _rate < 50000 && address(_token) != address(0) , "TokenPresale: Invalid parameters");
        token = IERC20(_token); 
        rate = _rate;
        minPurchaseAmount = 0.01 ether;
    }

    receive() external payable { 
        buy(); 
    }

    function getCurrentRate() public view returns (uint256) { return rate; }
    function getTotalTokensSold() public view returns (uint256) { return totalTokensSold; }
    function getTokensAvailable() public view returns (uint256) { return token.balanceOf(address(this)); }
    function setRate(uint256 _rate) external onlyOwner { require(_rate > 0 && _rate < 50000, "TokenPresale: Invalid rate"); rate = _rate; }
    function startPresale() external onlyOwner { isPresaleActive = true; }
    function stopPresale() external onlyOwner { isPresaleActive = false; }
    function endPresale() external onlyOwner { isPresaleActive = false; isPresaleEnded = true; }

    function getClaimedAmount(address beneficiary) public view returns (uint256) {
        return tokensBought[beneficiary];
    }

    /// @notice Allows users to buy tokens with ETH
    function buy() public nonReentrant payable whenPresaleActive {
        uint256 weiAmount = msg.value;
        _preValidatePurchase(msg.sender, weiAmount);
        uint256 tokens = _getTokenAmountForEther(weiAmount);

        contributions[msg.sender] += weiAmount;
        tokensBought[msg.sender] += tokens;
        weiRaised += weiAmount;
        totalTokensSold += tokens;

        emit TokenPurchasedWithEther(msg.sender, weiAmount, tokens);
    }
    
    /// @notice Allows users to claim tokens
    function claim() external nonReentrant {
        require(isPresaleEnded, "TokenPresale: Presale is not ended yet!");

        // Doublecheck if the beneficiary did contribute
        uint256 amountContributed = contributions[msg.sender];
        require(amountContributed > 0, "TokenPresale: No contributions found");

        // Calculate the amount of tokens in the different rounds and ensure that the tokens are available to claim
        uint256 tokensToClaim = tokensBought[msg.sender];
        require(tokensToClaim <= token.balanceOf(address(this)), "TokenPresale: Insufficient tokens");

        // Reset contribution to prevent double claiming
        contributions[msg.sender] = 0;
        totalTokensClaimed += tokensToClaim;
        tokensBought[msg.sender] = 0;

        // Transfer tokens to the beneficiary
        token.safeTransfer(msg.sender, tokensToClaim);
    }

    function claimERC20(IERC20 _token) external onlyOwner {
        uint256 contractTokenBalance = _token.balanceOf(address(this));
        uint256 unsoldTokens = contractTokenBalance - totalTokensSold; // Need to put the amount which is left to claim.
        require(unsoldTokens > 0, "TokenPresale: No ERC20 tokens to withdraw");
        _token.safeTransfer(owner(), unsoldTokens);
    }

    function claimETH() external onlyOwner {
        uint256 balance = address(this).balance;
        require(balance > 0, "TokenPresale: No ETH to withdraw");
        address payable to = payable(owner());
        to.transfer(balance);
    }

    function _preValidatePurchase(address beneficiary, uint256 amount) internal view { 
        require(beneficiary != address(0) && amount != 0, "TokenPresale: Invalid purchase parameters"); 
        require(amount >= minPurchaseAmount, "TokenPresale: Amount is less than the minimum purchase amount");
    }

    function _getTokenAmountForEther(uint256 weiAmount) private view returns (uint256) { return weiAmount * rate; }
}

File 2 of 8 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)

pragma solidity ^0.8.20;

import {Context} from "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * The initial owner is set to the address provided by the deployer. 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;

    /**
     * @dev The caller account is not authorized to perform an operation.
     */
    error OwnableUnauthorizedAccount(address account);

    /**
     * @dev The owner is not a valid owner account. (eg. `address(0)`)
     */
    error OwnableInvalidOwner(address owner);

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

    /**
     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.
     */
    constructor(address initialOwner) {
        if (initialOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(initialOwner);
    }

    /**
     * @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 {
        if (owner() != _msgSender()) {
            revert OwnableUnauthorizedAccount(_msgSender());
        }
    }

    /**
     * @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 {
        if (newOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _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);
    }
}

File 3 of 8 : IERC20Permit.sol
// SPDX-License-Identifier: MIT
// 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 4 of 8 : IERC20.sol
// SPDX-License-Identifier: MIT
// 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 5 of 8 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.20;

import {IERC20} from "../IERC20.sol";
import {IERC20Permit} from "../extensions/IERC20Permit.sol";
import {Address} from "../../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using 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 6 of 8 : Address.sol
// SPDX-License-Identifier: MIT
// 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 7 of 8 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol)

pragma solidity ^0.8.20;

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

File 8 of 8 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/ReentrancyGuard.sol)

pragma solidity ^0.8.20;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant NOT_ENTERED = 1;
    uint256 private constant ENTERED = 2;

    uint256 private _status;

    /**
     * @dev Unauthorized reentrant call.
     */
    error ReentrancyGuardReentrantCall();

    constructor() {
        _status = NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be NOT_ENTERED
        if (_status == ENTERED) {
            revert ReentrancyGuardReentrantCall();
        }

        // Any calls to nonReentrant after this point will fail
        _status = ENTERED;
    }

    function _nonReentrantAfter() private {
        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = NOT_ENTERED;
    }

    /**
     * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
     * `nonReentrant` function in the call stack.
     */
    function _reentrancyGuardEntered() internal view returns (bool) {
        return _status == ENTERED;
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "evmVersion": "paris",
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"initialOwner","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_rate","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":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","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"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"purchaser","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TokenPurchasedWithEther","type":"event"},{"inputs":[],"name":"buy","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_token","type":"address"}],"name":"claimERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"contributions","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"endPresale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"beneficiary","type":"address"}],"name":"getClaimedAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCurrentRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTokensAvailable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTotalTokensSold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isPresaleActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isPresaleEnded","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minPurchaseAmount","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":"rate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"round","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rate","type":"uint256"}],"name":"setRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startPresale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stopPresale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"tokensBought","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalTokensClaimed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalTokensSold","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":"weiRaised","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

60806040526009805461ffff191690553480156200001c57600080fd5b50604051620011c2380380620011c28339810160408190526200003f916200019b565b6001600055826001600160a01b0381166200007557604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b62000080816200012c565b5060008111801562000093575061c35081105b8015620000a857506001600160a01b03821615155b620000f65760405162461bcd60e51b815260206004820181905260248201527f546f6b656e50726573616c653a20496e76616c696420706172616d657465727360448201526064016200006c565b600280546001600160a01b0319166001600160a01b03939093169290921790915560035550662386f26fc10000600855620001dc565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80516001600160a01b03811681146200019657600080fd5b919050565b600080600060608486031215620001b157600080fd5b620001bc846200017e565b9250620001cc602085016200017e565b9150604084015190509250925092565b610fd680620001ec6000396000f3fe6080604052600436106101855760003560e01c8063715018a6116100d1578063a6f2ae3a1161008a578063d2df3e0f11610064578063d2df3e0f1461040b578063f2fde38b1461042b578063f7fb07b01461044b578063fc0c546a1461046057600080fd5b8063a6f2ae3a146103d8578063aaa5ad61146103e0578063b47dbf22146103f557600080fd5b8063715018a6146103125780637decf27f146103275780638da5cb5b146103465780638df40be81461037857806394c33163146103ae578063a43be57b146103c357600080fd5b80634042b66f1161013e5780635912c046116101185780635912c046146102a757806360d938dc146102bd57806363b20117146102e757806367272999146102fd57600080fd5b80634042b66f1461024f57806342e94c90146102655780634e71d92d1461029257600080fd5b806304c98b2b14610199578063146ca531146101ae5780631ad2ad1a146101d7578063264d7797146101ec5780632c4e722e1461021957806334fcf4371461022f57600080fd5b3661019457610192610480565b005b600080fd5b3480156101a557600080fd5b506101926105c9565b3480156101ba57600080fd5b506101c460045481565b6040519081526020015b60405180910390f35b3480156101e357600080fd5b506101926105e0565b3480156101f857600080fd5b506101c4610207366004610ead565b600b6020526000908152604090205481565b34801561022557600080fd5b506101c460035481565b34801561023b57600080fd5b5061019261024a366004610eca565b6105f4565b34801561025b57600080fd5b506101c460055481565b34801561027157600080fd5b506101c4610280366004610ead565b600a6020526000908152604090205481565b34801561029e57600080fd5b5061019261065e565b3480156102b357600080fd5b506101c460075481565b3480156102c957600080fd5b506009546102d79060ff1681565b60405190151581526020016101ce565b3480156102f357600080fd5b506101c460065481565b34801561030957600080fd5b5061019261086a565b34801561031e57600080fd5b50610192610912565b34801561033357600080fd5b506009546102d790610100900460ff1681565b34801561035257600080fd5b506001546001600160a01b03165b6040516001600160a01b0390911681526020016101ce565b34801561038457600080fd5b506101c4610393366004610ead565b6001600160a01b03166000908152600b602052604090205490565b3480156103ba57600080fd5b506006546101c4565b3480156103cf57600080fd5b50610192610924565b610192610480565b3480156103ec57600080fd5b506101c461093d565b34801561040157600080fd5b506101c460085481565b34801561041757600080fd5b50610192610426366004610ead565b6109af565b34801561043757600080fd5b50610192610446366004610ead565b610abe565b34801561045757600080fd5b506003546101c4565b34801561046c57600080fd5b50600254610360906001600160a01b031681565b610488610afc565b60095460ff166104eb5760405162461bcd60e51b815260206004820152602360248201527f546f6b656e50726573616c653a2050726573616c65206973206e6f742061637460448201526269766560e81b60648201526084015b60405180910390fd5b346104f63382610b26565b600061050182610c17565b336000908152600a6020526040812080549293508492909190610525908490610ef9565b9091555050336000908152600b602052604081208054839290610549908490610ef9565b9250508190555081600560008282546105629190610ef9565b92505081905550806006600082825461057b9190610ef9565b9091555050604080518381526020810183905233917f908f880c49d9f47e6f3a008046a416e86e71a4dfc1f7ab96b8e5c8442fa50ff2910160405180910390a250506105c76001600055565b565b6105d1610c2d565b6009805460ff19166001179055565b6105e8610c2d565b6009805460ff19169055565b6105fc610c2d565b60008111801561060d575061c35081105b6106595760405162461bcd60e51b815260206004820152601a60248201527f546f6b656e50726573616c653a20496e76616c6964207261746500000000000060448201526064016104e2565b600355565b610666610afc565b600954610100900460ff166106cd5760405162461bcd60e51b815260206004820152602760248201527f546f6b656e50726573616c653a2050726573616c65206973206e6f7420656e646044820152666564207965742160c81b60648201526084016104e2565b336000908152600a6020526040902054806107365760405162461bcd60e51b8152602060048201526024808201527f546f6b656e50726573616c653a204e6f20636f6e747269627574696f6e7320666044820152631bdd5b9960e21b60648201526084016104e2565b336000908152600b6020526040908190205460025491516370a0823160e01b815230600482015290916001600160a01b0316906370a0823190602401602060405180830381865afa15801561078f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107b39190610f0c565b81111561080c5760405162461bcd60e51b815260206004820152602160248201527f546f6b656e50726573616c653a20496e73756666696369656e7420746f6b656e6044820152607360f81b60648201526084016104e2565b336000908152600a6020526040812081905560078054839290610830908490610ef9565b9091555050336000818152600b602052604081205560025461085e916001600160a01b039091169083610c5a565b50506105c76001600055565b610872610c2d565b47806108c05760405162461bcd60e51b815260206004820181905260248201527f546f6b656e50726573616c653a204e6f2045544820746f20776974686472617760448201526064016104e2565b60006108d46001546001600160a01b031690565b6040519091506001600160a01b0382169083156108fc029084906000818181858888f1935050505015801561090d573d6000803e3d6000fd5b505050565b61091a610c2d565b6105c76000610cac565b61092c610c2d565b6009805461ffff1916610100179055565b6002546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015610986573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109aa9190610f0c565b905090565b6109b7610c2d565b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a0823190602401602060405180830381865afa1580156109fe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a229190610f0c565b9050600060065482610a349190610f25565b905060008111610a985760405162461bcd60e51b815260206004820152602960248201527f546f6b656e50726573616c653a204e6f20455243323020746f6b656e7320746f60448201526820776974686472617760b81b60648201526084016104e2565b61090d610aad6001546001600160a01b031690565b6001600160a01b0385169083610c5a565b610ac6610c2d565b6001600160a01b038116610af057604051631e4fbdf760e01b8152600060048201526024016104e2565b610af981610cac565b50565b600260005403610b1f57604051633ee5aeb560e01b815260040160405180910390fd5b6002600055565b6001600160a01b03821615801590610b3d57508015155b610b9b5760405162461bcd60e51b815260206004820152602960248201527f546f6b656e50726573616c653a20496e76616c696420707572636861736520706044820152686172616d657465727360b81b60648201526084016104e2565b600854811015610c135760405162461bcd60e51b815260206004820152603d60248201527f546f6b656e50726573616c653a20416d6f756e74206973206c6573732074686160448201527f6e20746865206d696e696d756d20707572636861736520616d6f756e7400000060648201526084016104e2565b5050565b600060035482610c279190610f38565b92915050565b6001546001600160a01b031633146105c75760405163118cdaa760e01b81523360048201526024016104e2565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261090d908490610cfe565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000610d136001600160a01b03841683610d61565b90508051600014158015610d38575080806020019051810190610d369190610f4f565b155b1561090d57604051635274afe760e01b81526001600160a01b03841660048201526024016104e2565b6060610d6f83836000610d76565b9392505050565b606081471015610d9b5760405163cd78605960e01b81523060048201526024016104e2565b600080856001600160a01b03168486604051610db79190610f71565b60006040518083038185875af1925050503d8060008114610df4576040519150601f19603f3d011682016040523d82523d6000602084013e610df9565b606091505b5091509150610e09868383610e13565b9695505050505050565b606082610e2857610e2382610e6f565b610d6f565b8151158015610e3f57506001600160a01b0384163b155b15610e6857604051639996b31560e01b81526001600160a01b03851660048201526024016104e2565b5080610d6f565b805115610e7f5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b6001600160a01b0381168114610af957600080fd5b600060208284031215610ebf57600080fd5b8135610d6f81610e98565b600060208284031215610edc57600080fd5b5035919050565b634e487b7160e01b600052601160045260246000fd5b80820180821115610c2757610c27610ee3565b600060208284031215610f1e57600080fd5b5051919050565b81810381811115610c2757610c27610ee3565b8082028115828204841417610c2757610c27610ee3565b600060208284031215610f6157600080fd5b81518015158114610d6f57600080fd5b6000825160005b81811015610f925760208186018101518583015201610f78565b50600092019182525091905056fea2646970667358221220e0586ef5f89c12102e9530f7630e48fcde25542674489589b40aa7956563786c64736f6c634300081600330000000000000000000000009c88a8cf9ecbc7776da218f759b09e1f4aebd8430000000000000000000000008ef47555856f6ce2e0cd7c36aef4fab317d2e2e20000000000000000000000000000000000000000000000000000000000004e20

Deployed Bytecode

0x6080604052600436106101855760003560e01c8063715018a6116100d1578063a6f2ae3a1161008a578063d2df3e0f11610064578063d2df3e0f1461040b578063f2fde38b1461042b578063f7fb07b01461044b578063fc0c546a1461046057600080fd5b8063a6f2ae3a146103d8578063aaa5ad61146103e0578063b47dbf22146103f557600080fd5b8063715018a6146103125780637decf27f146103275780638da5cb5b146103465780638df40be81461037857806394c33163146103ae578063a43be57b146103c357600080fd5b80634042b66f1161013e5780635912c046116101185780635912c046146102a757806360d938dc146102bd57806363b20117146102e757806367272999146102fd57600080fd5b80634042b66f1461024f57806342e94c90146102655780634e71d92d1461029257600080fd5b806304c98b2b14610199578063146ca531146101ae5780631ad2ad1a146101d7578063264d7797146101ec5780632c4e722e1461021957806334fcf4371461022f57600080fd5b3661019457610192610480565b005b600080fd5b3480156101a557600080fd5b506101926105c9565b3480156101ba57600080fd5b506101c460045481565b6040519081526020015b60405180910390f35b3480156101e357600080fd5b506101926105e0565b3480156101f857600080fd5b506101c4610207366004610ead565b600b6020526000908152604090205481565b34801561022557600080fd5b506101c460035481565b34801561023b57600080fd5b5061019261024a366004610eca565b6105f4565b34801561025b57600080fd5b506101c460055481565b34801561027157600080fd5b506101c4610280366004610ead565b600a6020526000908152604090205481565b34801561029e57600080fd5b5061019261065e565b3480156102b357600080fd5b506101c460075481565b3480156102c957600080fd5b506009546102d79060ff1681565b60405190151581526020016101ce565b3480156102f357600080fd5b506101c460065481565b34801561030957600080fd5b5061019261086a565b34801561031e57600080fd5b50610192610912565b34801561033357600080fd5b506009546102d790610100900460ff1681565b34801561035257600080fd5b506001546001600160a01b03165b6040516001600160a01b0390911681526020016101ce565b34801561038457600080fd5b506101c4610393366004610ead565b6001600160a01b03166000908152600b602052604090205490565b3480156103ba57600080fd5b506006546101c4565b3480156103cf57600080fd5b50610192610924565b610192610480565b3480156103ec57600080fd5b506101c461093d565b34801561040157600080fd5b506101c460085481565b34801561041757600080fd5b50610192610426366004610ead565b6109af565b34801561043757600080fd5b50610192610446366004610ead565b610abe565b34801561045757600080fd5b506003546101c4565b34801561046c57600080fd5b50600254610360906001600160a01b031681565b610488610afc565b60095460ff166104eb5760405162461bcd60e51b815260206004820152602360248201527f546f6b656e50726573616c653a2050726573616c65206973206e6f742061637460448201526269766560e81b60648201526084015b60405180910390fd5b346104f63382610b26565b600061050182610c17565b336000908152600a6020526040812080549293508492909190610525908490610ef9565b9091555050336000908152600b602052604081208054839290610549908490610ef9565b9250508190555081600560008282546105629190610ef9565b92505081905550806006600082825461057b9190610ef9565b9091555050604080518381526020810183905233917f908f880c49d9f47e6f3a008046a416e86e71a4dfc1f7ab96b8e5c8442fa50ff2910160405180910390a250506105c76001600055565b565b6105d1610c2d565b6009805460ff19166001179055565b6105e8610c2d565b6009805460ff19169055565b6105fc610c2d565b60008111801561060d575061c35081105b6106595760405162461bcd60e51b815260206004820152601a60248201527f546f6b656e50726573616c653a20496e76616c6964207261746500000000000060448201526064016104e2565b600355565b610666610afc565b600954610100900460ff166106cd5760405162461bcd60e51b815260206004820152602760248201527f546f6b656e50726573616c653a2050726573616c65206973206e6f7420656e646044820152666564207965742160c81b60648201526084016104e2565b336000908152600a6020526040902054806107365760405162461bcd60e51b8152602060048201526024808201527f546f6b656e50726573616c653a204e6f20636f6e747269627574696f6e7320666044820152631bdd5b9960e21b60648201526084016104e2565b336000908152600b6020526040908190205460025491516370a0823160e01b815230600482015290916001600160a01b0316906370a0823190602401602060405180830381865afa15801561078f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107b39190610f0c565b81111561080c5760405162461bcd60e51b815260206004820152602160248201527f546f6b656e50726573616c653a20496e73756666696369656e7420746f6b656e6044820152607360f81b60648201526084016104e2565b336000908152600a6020526040812081905560078054839290610830908490610ef9565b9091555050336000818152600b602052604081205560025461085e916001600160a01b039091169083610c5a565b50506105c76001600055565b610872610c2d565b47806108c05760405162461bcd60e51b815260206004820181905260248201527f546f6b656e50726573616c653a204e6f2045544820746f20776974686472617760448201526064016104e2565b60006108d46001546001600160a01b031690565b6040519091506001600160a01b0382169083156108fc029084906000818181858888f1935050505015801561090d573d6000803e3d6000fd5b505050565b61091a610c2d565b6105c76000610cac565b61092c610c2d565b6009805461ffff1916610100179055565b6002546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015610986573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109aa9190610f0c565b905090565b6109b7610c2d565b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a0823190602401602060405180830381865afa1580156109fe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a229190610f0c565b9050600060065482610a349190610f25565b905060008111610a985760405162461bcd60e51b815260206004820152602960248201527f546f6b656e50726573616c653a204e6f20455243323020746f6b656e7320746f60448201526820776974686472617760b81b60648201526084016104e2565b61090d610aad6001546001600160a01b031690565b6001600160a01b0385169083610c5a565b610ac6610c2d565b6001600160a01b038116610af057604051631e4fbdf760e01b8152600060048201526024016104e2565b610af981610cac565b50565b600260005403610b1f57604051633ee5aeb560e01b815260040160405180910390fd5b6002600055565b6001600160a01b03821615801590610b3d57508015155b610b9b5760405162461bcd60e51b815260206004820152602960248201527f546f6b656e50726573616c653a20496e76616c696420707572636861736520706044820152686172616d657465727360b81b60648201526084016104e2565b600854811015610c135760405162461bcd60e51b815260206004820152603d60248201527f546f6b656e50726573616c653a20416d6f756e74206973206c6573732074686160448201527f6e20746865206d696e696d756d20707572636861736520616d6f756e7400000060648201526084016104e2565b5050565b600060035482610c279190610f38565b92915050565b6001546001600160a01b031633146105c75760405163118cdaa760e01b81523360048201526024016104e2565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261090d908490610cfe565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000610d136001600160a01b03841683610d61565b90508051600014158015610d38575080806020019051810190610d369190610f4f565b155b1561090d57604051635274afe760e01b81526001600160a01b03841660048201526024016104e2565b6060610d6f83836000610d76565b9392505050565b606081471015610d9b5760405163cd78605960e01b81523060048201526024016104e2565b600080856001600160a01b03168486604051610db79190610f71565b60006040518083038185875af1925050503d8060008114610df4576040519150601f19603f3d011682016040523d82523d6000602084013e610df9565b606091505b5091509150610e09868383610e13565b9695505050505050565b606082610e2857610e2382610e6f565b610d6f565b8151158015610e3f57506001600160a01b0384163b155b15610e6857604051639996b31560e01b81526001600160a01b03851660048201526024016104e2565b5080610d6f565b805115610e7f5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b6001600160a01b0381168114610af957600080fd5b600060208284031215610ebf57600080fd5b8135610d6f81610e98565b600060208284031215610edc57600080fd5b5035919050565b634e487b7160e01b600052601160045260246000fd5b80820180821115610c2757610c27610ee3565b600060208284031215610f1e57600080fd5b5051919050565b81810381811115610c2757610c27610ee3565b8082028115828204841417610c2757610c27610ee3565b600060208284031215610f6157600080fd5b81518015158114610d6f57600080fd5b6000825160005b81811015610f925760208186018101518583015201610f78565b50600092019182525091905056fea2646970667358221220e0586ef5f89c12102e9530f7630e48fcde25542674489589b40aa7956563786c64736f6c63430008160033

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

0000000000000000000000009c88a8cf9ecbc7776da218f759b09e1f4aebd8430000000000000000000000008ef47555856f6ce2e0cd7c36aef4fab317d2e2e20000000000000000000000000000000000000000000000000000000000004e20

-----Decoded View---------------
Arg [0] : initialOwner (address): 0x9c88A8cF9ECBc7776DA218f759B09e1F4aebd843
Arg [1] : _token (address): 0x8EF47555856f6Ce2E0cd7C36AeF4FAb317d2e2E2
Arg [2] : _rate (uint256): 20000

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 0000000000000000000000009c88a8cf9ecbc7776da218f759b09e1f4aebd843
Arg [1] : 0000000000000000000000008ef47555856f6ce2e0cd7c36aef4fab317d2e2e2
Arg [2] : 0000000000000000000000000000000000000000000000000000000000004e20


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

OVERVIEW

This is the Official Presale Contract of PayAccept to acquire PAYT Tokens

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ 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.