Cryo Explorer Ethereum Mainnet

Address Contract Verified

Address 0x0c5F6A891ab8e954aAF00507A8797Ce63ecCe504
Balance 0.001800 ETH
Nonce 1
Code Size 7669 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

7669 bytes
0x60806040526004361061014f5760003560e01c80636bcedf9c116100b657806398d6d8ed1161006f57806398d6d8ed14610477578063e985e367146104a2578063f2fde38b146104cd578063f3fef3a3146104f6578063f8951a001461051f578063fa09e6301461055c57610156565b80636bcedf9c14610367578063715018a614610392578063753d7563146103a957806389e6ce1e146103e65780638da5cb5b1461040f57806390118fb41461043a57610156565b80633c00a36c116101085780633c00a36c1461026d5780633f6f7ed614610296578063444ad5ee146102bf57806363b20117146102e8578063686a668b146103135780636b2ce7f11461033e57610156565b806302a9e71414610158578063115ece4c14610183578063204120bc146101c0578063226ac321146101fd5780632c4e722e146102265780633b89bb861461025157610156565b3661015657005b005b34801561016457600080fd5b5061016d610585565b60405161017a919061150a565b60405180910390f35b34801561018f57600080fd5b506101aa60048036038101906101a591906115b4565b61058b565b6040516101b7919061150a565b60405180910390f35b3480156101cc57600080fd5b506101e760048036038101906101e291906115f4565b610711565b6040516101f4919061150a565b60405180910390f35b34801561020957600080fd5b50610224600480360381019061021f91906115b4565b610729565b005b34801561023257600080fd5b5061023b610848565b604051610248919061150a565b60405180910390f35b61026b600480360381019061026691906115b4565b61084e565b005b34801561027957600080fd5b50610294600480360381019061028f9190611621565b610cb4565b005b3480156102a257600080fd5b506102bd60048036038101906102b89190611621565b610d06565b005b3480156102cb57600080fd5b506102e660048036038101906102e191906115b4565b610d18565b005b3480156102f457600080fd5b506102fd610e03565b60405161030a919061150a565b60405180910390f35b34801561031f57600080fd5b50610328610e09565b604051610335919061150a565b60405180910390f35b34801561034a57600080fd5b5061036560048036038101906103609190611686565b610e0f565b005b34801561037357600080fd5b5061037c610e34565b604051610389919061150a565b60405180910390f35b34801561039e57600080fd5b506103a7610e3a565b005b3480156103b557600080fd5b506103d060048036038101906103cb91906115f4565b610e4e565b6040516103dd91906116c2565b60405180910390f35b3480156103f257600080fd5b5061040d600480360381019061040891906115b4565b610e6e565b005b34801561041b57600080fd5b50610424610fbd565b60405161043191906116ec565b60405180910390f35b34801561044657600080fd5b50610461600480360381019061045c91906115f4565b610fe7565b60405161046e91906116c2565b60405180910390f35b34801561048357600080fd5b5061048c611007565b60405161049991906116c2565b60405180910390f35b3480156104ae57600080fd5b506104b761101a565b6040516104c491906116ec565b60405180910390f35b3480156104d957600080fd5b506104f460048036038101906104ef91906115f4565b611040565b005b34801561050257600080fd5b5061051d600480360381019061051891906115b4565b6110c6565b005b34801561052b57600080fd5b50610546600480360381019061054191906115f4565b6110fd565b604051610553919061150a565b60405180910390f35b34801561056857600080fd5b50610583600480360381019061057e91906115f4565b611115565b005b60045481565b6000600860009054906101000a900460ff166105aa576000905061070b565b60008073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16146106dc57600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1661066b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161066290611764565b60405180910390fd5b6000600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905080600454600a6106bf91906118e6565b856106ca9190611931565b6106d491906119a2565b915050610706565b600254600454600a6106ee91906118e6565b846106f99190611931565b61070391906119a2565b90505b809150505b92915050565b60076020528060005260406000206000915090505481565b6107316111a9565b600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166107bd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107b490611764565b60405180910390fd5b60008103610800576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107f790611a1f565b60405180910390fd5b80600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505050565b60025481565b610856611230565b600860009054906101000a900460ff166108a5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161089c90611a8b565b60405180910390fd5b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610a86576000821161091d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161091490611b1d565b60405180910390fd5b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166109a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109a090611764565b60405180910390fd5b6109b3838361058b565b905060055481600a546109c69190611b3d565b1115610a07576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109fe90611be3565b60405180910390fd5b610a343330848673ffffffffffffffffffffffffffffffffffffffff16611276909392919063ffffffff16565b610a813382600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166112f89092919063ffffffff16565b610b76565b60003411610ac9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ac090611c4f565b60405180910390fd5b610ad460003461058b565b905060055481600a54610ae79190611b3d565b1115610b28576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b1f90611be3565b60405180910390fd5b610b753382600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166112f89092919063ffffffff16565b5b600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610c38576001600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550600b6000815480929190610c3290611c6f565b91905055505b80600a6000828254610c4a9190611b3d565b9250508190555080600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610ca09190611b3d565b9250508190555050610cb0611377565b5050565b610cbc6111a9565b3373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610d02573d6000803e3d6000fd5b5050565b610d0e6111a9565b8060028190555050565b610d206111a9565b60008103610d63576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d5a90611a1f565b60405180910390fd5b6001600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555080600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505050565b600a5481565b600b5481565b610e176111a9565b80600860006101000a81548160ff02191690831515021790555050565b60055481565b610e426111a9565b610e4c6000611381565b565b60066020528060005260406000206000915054906101000a900460ff1681565b610e766111a9565b81600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f24573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f489190611cf0565b60ff166004819055508060056000828254610f639190611b3d565b92505081905550610fb9333083600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611276909392919063ffffffff16565b5050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600c6020528060005260406000206000915054906101000a900460ff1681565b600860009054906101000a900460ff1681565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6110486111a9565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036110ba5760006040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081526004016110b191906116ec565b60405180910390fd5b6110c381611381565b50565b6110ce6111a9565b6110f933828473ffffffffffffffffffffffffffffffffffffffff166112f89092919063ffffffff16565b5050565b60096020528060005260406000206000915090505481565b61111d6111a9565b60008173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b815260040161115891906116ec565b602060405180830381865afa158015611175573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111999190611d32565b90506111a582826110c6565b5050565b6111b1611447565b73ffffffffffffffffffffffffffffffffffffffff166111cf610fbd565b73ffffffffffffffffffffffffffffffffffffffff161461122e576111f2611447565b6040517f118cdaa700000000000000000000000000000000000000000000000000000000815260040161122591906116ec565b60405180910390fd5b565b60026000540361126c576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002600081905550565b6112f2848573ffffffffffffffffffffffffffffffffffffffff166323b872dd8686866040516024016112ab93929190611d5f565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505061144f565b50505050565b611372838473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb858560405160240161132b929190611d96565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505061144f565b505050565b6001600081905550565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600033905090565b600080602060008451602086016000885af180611472576040513d6000823e3d81fd5b3d92506000519150506000821461148d5760018114156114a9565b60008473ffffffffffffffffffffffffffffffffffffffff163b145b156114eb57836040517f5274afe70000000000000000000000000000000000000000000000000000000081526004016114e291906116ec565b60405180910390fd5b50505050565b6000819050919050565b611504816114f1565b82525050565b600060208201905061151f60008301846114fb565b92915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006115558261152a565b9050919050565b6115658161154a565b811461157057600080fd5b50565b6000813590506115828161155c565b92915050565b611591816114f1565b811461159c57600080fd5b50565b6000813590506115ae81611588565b92915050565b600080604083850312156115cb576115ca611525565b5b60006115d985828601611573565b92505060206115ea8582860161159f565b9150509250929050565b60006020828403121561160a57611609611525565b5b600061161884828501611573565b91505092915050565b60006020828403121561163757611636611525565b5b60006116458482850161159f565b91505092915050565b60008115159050919050565b6116638161164e565b811461166e57600080fd5b50565b6000813590506116808161165a565b92915050565b60006020828403121561169c5761169b611525565b5b60006116aa84828501611671565b91505092915050565b6116bc8161164e565b82525050565b60006020820190506116d760008301846116b3565b92915050565b6116e68161154a565b82525050565b600060208201905061170160008301846116dd565b92915050565b600082825260208201905092915050565b7f50726573616c653a20546f6b656e206e6f742077686974656c69737465640000600082015250565b600061174e601e83611707565b915061175982611718565b602082019050919050565b6000602082019050818103600083015261177d81611741565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008160011c9050919050565b6000808291508390505b600185111561180a578086048111156117e6576117e5611784565b5b60018516156117f55780820291505b8081029050611803856117b3565b94506117ca565b94509492505050565b60008261182357600190506118df565b8161183157600090506118df565b8160018114611847576002811461185157611880565b60019150506118df565b60ff84111561186357611862611784565b5b8360020a91508482111561187a57611879611784565b5b506118df565b5060208310610133831016604e8410600b84101617156118b55782820a9050838111156118b0576118af611784565b5b6118df565b6118c284848460016117c0565b925090508184048111156118d9576118d8611784565b5b81810290505b9392505050565b60006118f1826114f1565b91506118fc836114f1565b92506119297fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8484611813565b905092915050565b600061193c826114f1565b9150611947836114f1565b9250828202611955816114f1565b9150828204841483151761196c5761196b611784565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006119ad826114f1565b91506119b8836114f1565b9250826119c8576119c7611973565b5b828204905092915050565b7f50726573616c653a2043616e6e6f742073657420707269636520746f20300000600082015250565b6000611a09601e83611707565b9150611a14826119d3565b602082019050919050565b60006020820190508181036000830152611a38816119fc565b9050919050565b7f50726553616c653a2053616c652073746f707065642100000000000000000000600082015250565b6000611a75601683611707565b9150611a8082611a3f565b602082019050919050565b60006020820190508181036000830152611aa481611a68565b9050919050565b7f50726573616c653a2043616e6e6f74206275792077697468207a65726f20616d60008201527f6f756e7400000000000000000000000000000000000000000000000000000000602082015250565b6000611b07602483611707565b9150611b1282611aab565b604082019050919050565b60006020820190508181036000830152611b3681611afa565b9050919050565b6000611b48826114f1565b9150611b53836114f1565b9250828201905080821115611b6b57611b6a611784565b5b92915050565b7f50726553616c653a20546f74616c20546f6b656e2053616c652052656163686560008201527f6421000000000000000000000000000000000000000000000000000000000000602082015250565b6000611bcd602283611707565b9150611bd882611b71565b604082019050919050565b60006020820190508181036000830152611bfc81611bc0565b9050919050565b7f46756e64206e65656420746f2062652067726561746572207468616e20300000600082015250565b6000611c39601e83611707565b9150611c4482611c03565b602082019050919050565b60006020820190508181036000830152611c6881611c2c565b9050919050565b6000611c7a826114f1565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611cac57611cab611784565b5b600182019050919050565b600060ff82169050919050565b611ccd81611cb7565b8114611cd857600080fd5b50565b600081519050611cea81611cc4565b92915050565b600060208284031215611d0657611d05611525565b5b6000611d1484828501611cdb565b91505092915050565b600081519050611d2c81611588565b92915050565b600060208284031215611d4857611d47611525565b5b6000611d5684828501611d1d565b91505092915050565b6000606082019050611d7460008301866116dd565b611d8160208301856116dd565b611d8e60408301846114fb565b949350505050565b6000604082019050611dab60008301856116dd565b611db860208301846114fb565b939250505056fea2646970667358221220e37d41f0699d59a6ffe91fd504ea425ce23115b928e71dc1c8d91b4cfe35052d64736f6c634300081a0033

Verified Source Code Full Match

Compiler: v0.8.26+commit.8a97fa7a EVM: paris Optimization: No
Ownable.sol 100 lines
// 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);
    }
}
IERC1363.sol 86 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (interfaces/IERC1363.sol)

pragma solidity ^0.8.20;

import {IERC20} from "./IERC20.sol";
import {IERC165} from "./IERC165.sol";

/**
 * @title IERC1363
 * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].
 *
 * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract
 * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.
 */
interface IERC1363 is IERC20, IERC165 {
    /*
     * Note: the ERC-165 identifier for this interface is 0xb0202a11.
     * 0xb0202a11 ===
     *   bytes4(keccak256('transferAndCall(address,uint256)')) ^
     *   bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^
     *   bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^
     *   bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^
     *   bytes4(keccak256('approveAndCall(address,uint256)')) ^
     *   bytes4(keccak256('approveAndCall(address,uint256,bytes)'))
     */

    /**
     * @dev Moves a `value` amount of tokens from the caller's account to `to`
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferAndCall(address to, uint256 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from the caller's account to `to`
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @param data Additional data with no specified format, sent in call to `to`.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param from The address which you want to send tokens from.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferFromAndCall(address from, address to, uint256 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param from The address which you want to send tokens from.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @param data Additional data with no specified format, sent in call to `to`.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);

    /**
     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the
     * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.
     * @param spender The address which will spend the funds.
     * @param value The amount of tokens to be spent.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function approveAndCall(address spender, uint256 value) external returns (bool);

    /**
     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the
     * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.
     * @param spender The address which will spend the funds.
     * @param value The amount of tokens to be spent.
     * @param data Additional data with no specified format, sent in call to `spender`.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);
}
IERC165.sol 6 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC165.sol)

pragma solidity ^0.8.20;

import {IERC165} from "../utils/introspection/IERC165.sol";
IERC20.sol 6 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20.sol)

pragma solidity ^0.8.20;

import {IERC20} from "../token/ERC20/IERC20.sol";
IERC20Metadata.sol 26 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.20;

import {IERC20} from "../IERC20.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC-20 standard.
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the symbol of the token.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}
IERC20.sol 79 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC-20 standard as defined in the ERC.
 */
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);
}
SafeERC20.sol 198 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.2.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.20;

import {IERC20} from "../IERC20.sol";
import {IERC1363} from "../../../interfaces/IERC1363.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC-20 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 {
    /**
     * @dev An operation with an ERC-20 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.
     *
     * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client"
     * smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using
     * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract
     * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.
     */
    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.
     *
     * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client"
     * smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using
     * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract
     * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.
     */
    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.
     *
     * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function
     * only sets the "standard" allowance. Any temporary allowance will remain active, in addition to the value being
     * set here.
     */
    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 Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no
     * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
     * targeting contracts.
     *
     * Reverts if the returned value is other than `true`.
     */
    function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {
        if (to.code.length == 0) {
            safeTransfer(token, to, value);
        } else if (!token.transferAndCall(to, value, data)) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target
     * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
     * targeting contracts.
     *
     * Reverts if the returned value is other than `true`.
     */
    function transferFromAndCallRelaxed(
        IERC1363 token,
        address from,
        address to,
        uint256 value,
        bytes memory data
    ) internal {
        if (to.code.length == 0) {
            safeTransferFrom(token, from, to, value);
        } else if (!token.transferFromAndCall(from, to, value, data)) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no
     * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
     * targeting contracts.
     *
     * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.
     * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}
     * once without retrying, and relies on the returned value to be true.
     *
     * Reverts if the returned value is other than `true`.
     */
    function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {
        if (to.code.length == 0) {
            forceApprove(token, to, value);
        } else if (!token.approveAndCall(to, value, data)) {
            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 {_callOptionalReturnBool} that reverts if call fails to meet the requirements.
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        uint256 returnSize;
        uint256 returnValue;
        assembly ("memory-safe") {
            let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)
            // bubble errors
            if iszero(success) {
                let ptr := mload(0x40)
                returndatacopy(ptr, 0, returndatasize())
                revert(ptr, returndatasize())
            }
            returnSize := returndatasize()
            returnValue := mload(0)
        }

        if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 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).
     *
     * This is a variant of {_callOptionalReturn} that silently catches all reverts and returns a bool instead.
     */
    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
        bool success;
        uint256 returnSize;
        uint256 returnValue;
        assembly ("memory-safe") {
            success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)
            returnSize := returndatasize()
            returnValue := mload(0)
        }
        return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);
    }
}
Context.sol 28 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (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;
    }

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}
IERC165.sol 25 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/IERC165.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC-165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[ERC].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}
ReentrancyGuard.sol 87 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.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 EIP-1153 (transient storage) is available on the chain you're deploying at,
 * consider using {ReentrancyGuardTransient} instead.
 *
 * 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;
    }
}
GENZYPreSale.sol 142 lines
// SPDX-License-Identifier: MIT

/* 

 ██████╗ ███████╗███╗   ██╗███████╗██╗   ██╗    ██████╗ ██████╗  ██████╗ ████████╗ ██████╗  ██████╗ ██████╗ ██╗     
██╔════╝ ██╔════╝████╗  ██║╚══███╔╝╚██╗ ██╔╝    ██╔══██╗██╔══██╗██╔═══██╗╚══██╔══╝██╔═══██╗██╔════╝██╔═══██╗██║     
██║  ███╗█████╗  ██╔██╗ ██║  ███╔╝  ╚████╔╝     ██████╔╝██████╔╝██║   ██║   ██║   ██║   ██║██║     ██║   ██║██║     
██║   ██║██╔══╝  ██║╚██╗██║ ███╔╝    ╚██╔╝      ██╔═══╝ ██╔══██╗██║   ██║   ██║   ██║   ██║██║     ██║   ██║██║     
╚██████╔╝███████╗██║ ╚████║███████╗   ██║       ██║     ██║  ██║╚██████╔╝   ██║   ╚██████╔╝╚██████╗╚██████╔╝███████╗
 ╚═════╝ ╚══════╝╚═╝  ╚═══╝╚══════╝   ╚═╝       ╚═╝     ╚═╝  ╚═╝ ╚═════╝    ╚═╝    ╚═════╝  ╚═════╝ ╚═════╝ ╚══════╝
                                        
##################################################### genzy.wtf ####################################################

*/

pragma solidity ^0.8.26;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import "./OwnerWithdrawable.sol";

contract GENZY_PRESALE is ReentrancyGuard, OwnerWithdrawable {
    using SafeERC20 for IERC20;
    using SafeERC20 for IERC20Metadata;

    // State variables
    uint256 public rate; // Rate of sale token in terms of native currency
    address public saleToken; // Address of the token being sold
    uint256 public saleTokenDecimals; // Decimal places of the sale token
    uint256 public totalTokensforSale; // Total tokens available for sale

    // Whitelist of tokens that can be used to buy the sale token
    mapping(address => bool) public tokenWhitelist;

    // Price of each whitelisted token in terms of the sale token
    mapping(address => uint256) public tokenPrices;

    bool public isPresaleStarted; // Flag to check if presale has started

    // Records how many tokens each address has purchased
    mapping(address => uint256) public presaleData;

    uint256 public totalTokensSold; // Total tokens sold in the presale

    uint256 public totalInvolved; // Total involved in the presale

    // Mapping to check if an address has purchased tokens
    mapping(address => bool) public hasPurchased;

    // Public function to execute the purchase of tokens. Approval must be done beforehand.
    function execute(address _token, uint256 _amount) external payable nonReentrant {
        require(isPresaleStarted, "PreSale: Sale stopped!"); // Ensure presale is active

        uint256 saleTokenAmount;

        if (_token != address(0)) { // If using a whitelisted token
            require(_amount > 0, "Presale: Cannot buy with zero amount");
            require(tokenWhitelist[_token], "Presale: Token not whitelisted");

            saleTokenAmount = getTokenAmount(_token, _amount); // Calculate amount of sale tokens

            // Check if the total tokens sold does not exceed the limit
            require((totalTokensSold + saleTokenAmount) <= totalTokensforSale, "PreSale: Total Token Sale Reached!");

            IERC20(_token).safeTransferFrom(msg.sender, address(this), _amount); // Transfer payment from buyer to contract
            IERC20(saleToken).safeTransfer(msg.sender, saleTokenAmount); // Transfer sale tokens to buyer

        } else { // If using native currency (ETH)
            require(msg.value > 0, "Fund need to be greater than 0");
            saleTokenAmount = getTokenAmount(address(0), msg.value); // Calculate amount of sale tokens

            require((totalTokensSold + saleTokenAmount) <= totalTokensforSale, "PreSale: Total Token Sale Reached!");
            IERC20(saleToken).safeTransfer(msg.sender, saleTokenAmount); // Transfer sale tokens to buyer
        }

        // Check if the member is new
        if (!hasPurchased[msg.sender]) {
            hasPurchased[msg.sender] = true; // Mark the participant as having purchased tokens
            totalInvolved++; // Increase the unique participants counter
        }

        totalTokensSold += saleTokenAmount; // Update total tokens sold
        presaleData[msg.sender] += saleTokenAmount; // Record purchase for the sender
    }

    // Function to set the parameters for the sale token
    function setSaleTokenParams(address _saleToken, uint256 _totalTokensforSale) public onlyOwner {
        saleToken = _saleToken;
        saleTokenDecimals = IERC20Metadata(saleToken).decimals(); // Get decimals from the sale token
        totalTokensforSale += _totalTokensforSale; // Update total tokens for sale

        // Transfer the tokens from owner to this contract
        IERC20(saleToken).safeTransferFrom(msg.sender, address(this), _totalTokensforSale);
    }

    // Add a token to the whitelist with its price
    function addWhiteListedToken(address _token, uint256 _price) external onlyOwner {
        require(_price != 0, "Presale: Cannot set price to 0");
        tokenWhitelist[_token] = true; // Mark token as whitelisted
        tokenPrices[_token] = _price; // Set price for the whitelisted token
    }

    // Update the rate for purchasing with native currency
    function updateEthRate(uint256 _rate) external onlyOwner {
        rate = _rate;
    }

    // Update the price for a whitelisted token
    function updateTokenRate(address _token, uint256 _price) external onlyOwner {
        require(tokenWhitelist[_token], "Presale: Token not whitelisted");
        require(_price != 0, "Presale: Cannot set price to 0");
        tokenPrices[_token] = _price; // Update price for the specified token
    }

    // Toggle the presale state (started or stopped)
    function togglePresale(bool _state) external onlyOwner {
        isPresaleStarted = _state;
    }

    // Public view function to calculate the amount of sale tokens received for a given amount of a specific token
    function getTokenAmount(address token, uint256 amount) public view returns (uint256) {
        if (!isPresaleStarted) {
            return 0; // Return 0 if presale hasn't started
        }
        
        uint256 amountOut;
        
        if (token != address(0)) {
            require(tokenWhitelist[token], "Presale: Token not whitelisted"); // Check if token is whitelisted
            uint256 price = tokenPrices[token]; // Get price of the whitelisted token
            
            amountOut = (amount * (10 ** saleTokenDecimals)) / price; // Calculate amount of sale tokens based on price
        } else {
            amountOut = (amount * (10 ** saleTokenDecimals)) / rate; // Calculate amount based on native currency rate
        }
        
        return amountOut;
    }

}
OwnerWithdrawable.sol 53 lines
// SPDX-License-Identifier: MIT

/* 

 ██████╗ ███████╗███╗   ██╗███████╗██╗   ██╗    ██████╗ ██████╗  ██████╗ ████████╗ ██████╗  ██████╗ ██████╗ ██╗     
██╔════╝ ██╔════╝████╗  ██║╚══███╔╝╚██╗ ██╔╝    ██╔══██╗██╔══██╗██╔═══██╗╚══██╔══╝██╔═══██╗██╔════╝██╔═══██╗██║     
██║  ███╗█████╗  ██╔██╗ ██║  ███╔╝  ╚████╔╝     ██████╔╝██████╔╝██║   ██║   ██║   ██║   ██║██║     ██║   ██║██║     
██║   ██║██╔══╝  ██║╚██╗██║ ███╔╝    ╚██╔╝      ██╔═══╝ ██╔══██╗██║   ██║   ██║   ██║   ██║██║     ██║   ██║██║     
╚██████╔╝███████╗██║ ╚████║███████╗   ██║       ██║     ██║  ██║╚██████╔╝   ██║   ╚██████╔╝╚██████╗╚██████╔╝███████╗
 ╚═════╝ ╚══════╝╚═╝  ╚═══╝╚══════╝   ╚═╝       ╚═╝     ╚═╝  ╚═╝ ╚═════╝    ╚═╝    ╚═════╝  ╚═════╝ ╚═════╝ ╚══════╝
                                        
##################################################### genzy.wtf ####################################################

*/

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";

// A contract that allows the owner to withdraw tokens and Ether
contract OwnerWithdrawable is Ownable {
    using SafeERC20 for IERC20; // Using SafeERC20 for safe ERC20 token operations

    // Constructor that sets the contract owner
    constructor() Ownable(msg.sender) {}

    // Function to receive Ether sent to the contract
    receive() external payable {}

    // Fallback function to handle calls that do not match any function
    fallback() external payable {}

    // Function to withdraw a specified amount of tokens to the owner's address
    function withdraw(address token, uint256 _amountIn) public onlyOwner {
        // Use safe transfer of tokens
        IERC20(token).safeTransfer(msg.sender, _amountIn);
    }

    // Function to withdraw all tokens of a specified type to the owner's address
    function withdrawAll(address token) public onlyOwner {
        // Get the balance of tokens in the contract
        uint256 amount = IERC20(token).balanceOf(address(this));
        // Call withdraw function to transfer all tokens
        withdraw(token, amount);
    }

    // Function to withdraw a specified amount of Ether to the owner's address
    function withdrawCurrency(uint256 _amountIn) public onlyOwner {
        // Transfer Ether to the owner's address
        payable(msg.sender).transfer(_amountIn);
    }
}

Read Contract

getTokenAmount 0x115ece4c → uint256
hasPurchased 0x90118fb4 → bool
isPresaleStarted 0x98d6d8ed → bool
owner 0x8da5cb5b → address
presaleData 0xf8951a00 → uint256
rate 0x2c4e722e → uint256
saleToken 0xe985e367 → address
saleTokenDecimals 0x02a9e714 → uint256
tokenPrices 0x204120bc → uint256
tokenWhitelist 0x753d7563 → bool
totalInvolved 0x686a668b → uint256
totalTokensSold 0x63b20117 → uint256
totalTokensforSale 0x6bcedf9c → uint256

Write Contract 11 functions

These functions modify contract state and require a wallet transaction to execute.

addWhiteListedToken 0x444ad5ee
address _token
uint256 _price
execute 0x3b89bb86
address _token
uint256 _amount
renounceOwnership 0x715018a6
No parameters
setSaleTokenParams 0x89e6ce1e
address _saleToken
uint256 _totalTokensforSale
togglePresale 0x6b2ce7f1
bool _state
transferOwnership 0xf2fde38b
address newOwner
updateEthRate 0x3f6f7ed6
uint256 _rate
updateTokenRate 0x226ac321
address _token
uint256 _price
withdraw 0xf3fef3a3
address token
uint256 _amountIn
withdrawAll 0xfa09e630
address token
withdrawCurrency 0x3c00a36c
uint256 _amountIn

Recent Transactions

No transactions found for this address