Mumbai Testnet

Contract

0x427E129a78F1621D0d85BA55185E0762a9D42AC7

Overview

MATIC Balance

Multichain Info

N/A
Transaction Hash
Method
Block
From
To
Value

There are no matching entries

Please try again later

Latest 1 internal transaction

Parent Transaction Hash Block From To Value
439804292023-12-25 6:02:41148 days ago1703484161  Contract Creation0 MATIC
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0x07529384...b1b6291BB
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
BubblegumCrowdsale

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 1 : Bubblegum.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;

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

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

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

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

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

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

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

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

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
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);
}

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     *
     * Furthermore, `isContract` will also return true if the target contract within
     * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
     * which only has an effect at the end of a transaction.
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) 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(errorMessage);
        }
    }
}
    
/**
 * @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 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.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
    }

}

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

    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
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

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

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract Pausable is Context {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor() {
        _paused = false;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        _requireNotPaused();
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        _requirePaused();
        _;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Throws if the contract is paused.
     */
    function _requireNotPaused() internal view virtual {
        require(!paused(), "Pausable: paused");
    }

    /**
     * @dev Throws if the contract is not paused.
     */
    function _requirePaused() internal view virtual {
        require(paused(), "Pausable: not paused");
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

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

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

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

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

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

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

    function _setOwner(address newOwner) private {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }
}

/**
 * @title Crowdsale
 * @dev Base contract for managing a token crowdsale.
 * Allows investors to purchase tokens with ether until the contract is paused.
 * This contract can be extended to provide additional functionality.
 * The external interface represents the basic interface for purchasing tokens.
 * The internal interface is for extensible and modifiable surface of crowdsales.
 * Do not modify the external interface. Override methods for additional functionality.
 */
contract Crowdsale is Ownable, Pausable, ReentrancyGuard {

    using SafeERC20 for IERC20Metadata;

    // The token being sold
    IERC20Metadata public token;

    // Address where funds are collected
    address payable public wallet;

    // The rate determines how many token units a buyer receives per wei.
    // It represents the conversion between wei and the smallest, indivisible token unit.
    // The 'rate' is expressed as a wei-like precision, where a rate of 10^18 is equal to one unit.
    // This approach allows for token decimal conversions and rates less than 1.
    uint256 public rate;

    // Amount of wei raised
    uint256 public weiRaised;

    /**
     * @dev Event emitted when tokens are purchased.
     * @param purchaser Address of the user who purchased tokens
     * @param beneficiary Address where purchased tokens were sent
     * @param value Amount of ether paid for purchase
     * @param amount Amount of tokens purchased
     */
    event TokensPurchased(address indexed purchaser, address indexed beneficiary, uint256 value, uint256 amount);

    /**
     * @dev Event emitted when the rate is changed.
     * @param rate the new rate
     */
    event RateChanged(uint256 rate);

    /**
     * @dev The rate is the conversion between wei and the smallest and indivisible
     * token unit. So, if you are using a rate of 1 with a ERC20Detailed token
     * with 3 decimals called TOK, 1 wei will give you 1 unit, or 0.001 TOK.
     * @param rate_ Number of token units a buyer gets per wei
     * @param wallet_ Address where collected funds will be forwarded to
     * @param token_ Address of the token being sold
     * @param owner_ Address of the contract owner
     */
    constructor (uint256 rate_, address payable wallet_, IERC20Metadata token_, address owner_) Ownable() {
        setRate(rate_);
        setWallet(wallet_);
        setToken(token_);
        transferOwnership(owner_);
    }

    /**
     * @dev Owner can change the rate.
     * @param rate_ Number of token units a buyer gets per wei
     */
    function setRate(uint256 rate_) public onlyOwner() {
        require(rate_ > 0, "Crowdsale: rate is 0");
        require(weiRaised == 0, "Crowdsale has started");
        emit RateChanged(rate_);
        rate = rate_;
    }

    /**
     * @dev Owner can change the wallet.
     * @param wallet_ Address where collected funds will be forwarded to
     */
    function setWallet(address payable wallet_) public onlyOwner() {
        require(wallet_ != address(0), "Crowdsale: wallet is the zero address");
        wallet = wallet_;
    }

    /**
     * @dev Owner can change the token if the crowdsale hasn't started yet.
     * @param token_ Address of the token being sold
     */
    function setToken(IERC20Metadata token_) public onlyOwner() {
        require(weiRaised == 0, "Crowdsale has started");
        require(address(token_) != address(0), "Crowdsale: token is the zero address");
        token = token_;
    }

    /**
     * @dev Fallback function ***DO NOT OVERRIDE***
     * Note that other contracts will transfer funds with a base gas stipend
     * of 2300, which is not enough to call buyTokens. Consider calling
     * buyTokens directly when purchasing tokens from a contract.
     * This function is automatically called when ether is sent to the contract address.
     * Users should send Ethers from the beneficiary address in the transaction.
     */
    receive() external payable {
        buyTokens(_msgSender());
    }

    /**
     * @dev Low-level token purchase ***DO NOT OVERRIDE***
     * Allows users to purchase tokens with ether.
     * This function has a non-reentrancy guard, so it shouldn't be called by
     * another `nonReentrant` function.
     * @param beneficiary Address where purchased tokens will be sent
     */
    function buyTokens(address beneficiary) public nonReentrant whenNotPaused payable {

        uint256 weiAmount = msg.value;

        require(beneficiary != address(0), "Crowdsale: beneficiary is the zero address");
        require(weiAmount != 0, "Crowdsale: weiAmount is 0");

        // Calculate token amount to be created
        uint256 tokens = getTokenAmount(weiAmount);
        require(tokens != 0, "Crowdsale: cannot buy 0 tokens");

        // Update state
        weiRaised += weiAmount;

        emit TokensPurchased(_msgSender(), beneficiary, weiAmount, tokens);
        _deliverTokens(beneficiary, tokens);

        wallet.transfer(msg.value);

    }

    /**
     * @dev Calculate the number of tokens that can be purchased with a specified amount of wei.
     *
     * This function provides a conversion mechanism for converting Ethereum wei (the smallest unit of Ether) into tokens
     * based on the current rate and the number of decimal places in the token's representation.
     *
     * @param weiAmount The amount of wei to be converted into tokens.
     * @return The number of tokens that can be purchased with the specified `weiAmount`.
     */
    function getTokenAmount(uint256 weiAmount) public view returns (uint256) {
        // Calculate the number of tokens using the specified wei amount, rate, and token decimals.
        // The formula is: (weiAmount * rate * 10^tokenDecimals) / (10^18 / 10^rateDecimals)
        // where 10^18 is used to account for Ether's 18 decimal places and 10^rateDecimals is used to adjust for rate precision.
        return (weiAmount * rate * 10**token.decimals()) / 10**36;
    }

    /**
     * @dev Source of tokens. Override this method to modify the way in which the crowdsale ultimately gets and sends
     * its tokens.
     * @param beneficiary Address performing the token purchase
     * @param tokenAmount Number of tokens to be emitted
     */
    function _deliverTokens(address beneficiary, uint256 tokenAmount) virtual internal {}

    /**
     * @dev Pauses the ICO activity. Only the contract owner can call this function.
     */
    function pause() external onlyOwner() {
        _pause();
    }

    /**
     * @dev Resumes the ICO activity. Only the contract owner can call this function.
     */
    function unpause() external onlyOwner() {
        _unpause();
    }
}

/**
 * @title BubblegumCrowdsale
 * @dev Extension of Crowdsale where tokens are held by a wallet, which approves an allowance to the crowdsale.
 */
contract BubblegumCrowdsale is Crowdsale {

    using SafeERC20 for IERC20Metadata;

    address private _tokenWallet;

    /**
     * @dev The rate is the conversion between wei and the smallest and indivisible
     * token unit. So, if you are using a rate of 1 with a ERC20Detailed token
     * with 3 decimals called TOK, 1 wei will give you 1 unit, or 0.001 TOK.
     * @param wallet_ Address where collected funds will be forwarded to
     * @param token_ Address of the token being sold
     * @param rate_ Number of token units a buyer gets per wei
     * @param owner_ Address of the contract owner
     * @param distributionWallet_ Address holding the tokens, which has approved allowance to the crowdsale.
     */
    constructor (uint256 rate_, address payable wallet_, IERC20Metadata token_, address distributionWallet_, address owner_) 
        Crowdsale(rate_, wallet_, token_, owner_) {
        require(distributionWallet_ != address(0), "AllowanceCrowdsale: token wallet is the zero address");
        _tokenWallet = distributionWallet_;
    }

    /**
     * @dev Owner can change the token wallet.
     * @param distributionWallet_ Address that holds the token to be distributed
     */
    function setTokenWallet(address distributionWallet_) external onlyOwner() {
        require(distributionWallet_ != address(0), "Crowdsale: token wallet is the zero address");
        _tokenWallet = distributionWallet_;
    }

    /**
     * @return the address of the wallet that will hold the tokens.
     */
    function tokenWallet() external view returns (address) {
        return _tokenWallet;
    }

    /**
     * @dev Checks the amount of tokens left in the allowance.
     * @return Amount of tokens left in the allowance
     */
    function remainingTokens() external view returns (uint256) {
        return Math.min(token.balanceOf(_tokenWallet), token.allowance(_tokenWallet, address(this)));
    }

    /**
     * @dev Overrides parent behavior by transferring tokens from wallet.
     * @param beneficiary Token purchaser
     * @param tokenAmount Amount of tokens purchased
     */
    function _deliverTokens(address beneficiary, uint256 tokenAmount) internal override {
        token.safeTransferFrom(_tokenWallet, beneficiary, tokenAmount);
    }

}

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

Contract ABI

[{"inputs":[{"internalType":"uint256","name":"rate_","type":"uint256"},{"internalType":"address payable","name":"wallet_","type":"address"},{"internalType":"contract IERC20Metadata","name":"token_","type":"address"},{"internalType":"address","name":"distributionWallet_","type":"address"},{"internalType":"address","name":"owner_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"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":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"rate","type":"uint256"}],"name":"RateChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"purchaser","type":"address"},{"indexed":true,"internalType":"address","name":"beneficiary","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TokensPurchased","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[{"internalType":"address","name":"beneficiary","type":"address"}],"name":"buyTokens","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"weiAmount","type":"uint256"}],"name":"getTokenAmount","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":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"remainingTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"rate_","type":"uint256"}],"name":"setRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20Metadata","name":"token_","type":"address"}],"name":"setToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"distributionWallet_","type":"address"}],"name":"setTokenWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"wallet_","type":"address"}],"name":"setWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20Metadata","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"wallet","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"weiRaised","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

Deployed Bytecode

0x60806040526004361061010d5760003560e01c80638da5cb5b11610095578063c2507ac111610064578063c2507ac1146102b8578063deaa59df146102d8578063ec8ac4d8146102f8578063f2fde38b14610306578063fc0c546a1461032657600080fd5b80638da5cb5b14610247578063a621344a14610265578063bf58390314610285578063bff99c6c1461029a57600080fd5b80634042b66f116100dc5780634042b66f146101a5578063521eb273146101bb5780635c975abb146101f3578063715018a61461021d5780638456cb591461023257600080fd5b8063144fa6d7146101275780632c4e722e1461014757806334fcf437146101705780633f4ba83a1461019057600080fd5b366101225761012033610346565b610346565b005b600080fd5b34801561013357600080fd5b50610120610142366004611058565b61051b565b34801561015357600080fd5b5061015d60045481565b6040519081526020015b60405180910390f35b34801561017c57600080fd5b5061012061018b366004611094565b610611565b34801561019c57600080fd5b50610120610702565b3480156101b157600080fd5b5061015d60055481565b3480156101c757600080fd5b506003546101db906001600160a01b031681565b6040516001600160a01b039091168152602001610167565b3480156101ff57600080fd5b50600054600160a01b900460ff166040519015158152602001610167565b34801561022957600080fd5b50610120610736565b34801561023e57600080fd5b5061012061076a565b34801561025357600080fd5b506000546001600160a01b03166101db565b34801561027157600080fd5b50610120610280366004611058565b61079c565b34801561029157600080fd5b5061015d610852565b3480156102a657600080fd5b506006546001600160a01b03166101db565b3480156102c457600080fd5b5061015d6102d3366004611094565b610966565b3480156102e457600080fd5b506101206102f3366004611058565b610a30565b61012061011b366004611058565b34801561031257600080fd5b50610120610321366004611058565b610ae0565b34801561033257600080fd5b506002546101db906001600160a01b031681565b61034e610b78565b610356610bd2565b346001600160a01b0382166103c55760405162461bcd60e51b815260206004820152602a60248201527f43726f776473616c653a2062656e656669636961727920697320746865207a65604482015269726f206164647265737360b01b60648201526084015b60405180910390fd5b806104125760405162461bcd60e51b815260206004820152601960248201527f43726f776473616c653a20776569416d6f756e7420697320300000000000000060448201526064016103bc565b600061041d82610966565b90508061046c5760405162461bcd60e51b815260206004820152601e60248201527f43726f776473616c653a2063616e6e6f7420627579203020746f6b656e73000060448201526064016103bc565b816005600082825461047e9190611169565b909155505060408051838152602081018390526001600160a01b0385169133917f6faf93231a456e552dbc9961f58d9713ee4f2e69d15f1975b050ef0911053a7b910160405180910390a36104d38382610c1f565b6003546040516001600160a01b03909116903480156108fc02916000818181858888f1935050505015801561050c573d6000803e3d6000fd5b50505061051860018055565b50565b6000546001600160a01b031633146105455760405162461bcd60e51b81526004016103bc90611134565b6005541561058d5760405162461bcd60e51b815260206004820152601560248201527410dc9bddd91cd85b19481a185cc81cdd185c9d1959605a1b60448201526064016103bc565b6001600160a01b0381166105ef5760405162461bcd60e51b8152602060048201526024808201527f43726f776473616c653a20746f6b656e20697320746865207a65726f206164646044820152637265737360e01b60648201526084016103bc565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b0316331461063b5760405162461bcd60e51b81526004016103bc90611134565b600081116106825760405162461bcd60e51b8152602060048201526014602482015273043726f776473616c653a207261746520697320360641b60448201526064016103bc565b600554156106ca5760405162461bcd60e51b815260206004820152601560248201527410dc9bddd91cd85b19481a185cc81cdd185c9d1959605a1b60448201526064016103bc565b6040518181527f595a30f13a69b616c4d568e2a2b7875fdfe86e4300a049953c76ee278f8f3f109060200160405180910390a1600455565b6000546001600160a01b0316331461072c5760405162461bcd60e51b81526004016103bc90611134565b610734610c41565b565b6000546001600160a01b031633146107605760405162461bcd60e51b81526004016103bc90611134565b6107346000610c96565b6000546001600160a01b031633146107945760405162461bcd60e51b81526004016103bc90611134565b610734610ce6565b6000546001600160a01b031633146107c65760405162461bcd60e51b81526004016103bc90611134565b6001600160a01b0381166108305760405162461bcd60e51b815260206004820152602b60248201527f43726f776473616c653a20746f6b656e2077616c6c657420697320746865207a60448201526a65726f206164647265737360a81b60648201526084016103bc565b600680546001600160a01b0319166001600160a01b0392909216919091179055565b6002546006546040516370a0823160e01b81526001600160a01b0391821660048201526000926109619216906370a082319060240160206040518083038186803b15801561089f57600080fd5b505afa1580156108b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108d791906110ac565b600254600654604051636eb1769f60e11b81526001600160a01b03918216600482015230602482015291169063dd62ed3e9060440160206040518083038186803b15801561092457600080fd5b505afa158015610938573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061095c91906110ac565b610d29565b905090565b60006ec097ce7bc90715b34b9f1000000000600260009054906101000a90046001600160a01b03166001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b1580156109c657600080fd5b505afa1580156109da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109fe91906110c4565b610a0990600a6111e4565b600454610a16908561128f565b610a20919061128f565b610a2a9190611181565b92915050565b6000546001600160a01b03163314610a5a5760405162461bcd60e51b81526004016103bc90611134565b6001600160a01b038116610abe5760405162461bcd60e51b815260206004820152602560248201527f43726f776473616c653a2077616c6c657420697320746865207a65726f206164604482015264647265737360d81b60648201526084016103bc565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610b0a5760405162461bcd60e51b81526004016103bc90611134565b6001600160a01b038116610b6f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016103bc565b61051881610c96565b60026001541415610bcb5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016103bc565b6002600155565b600054600160a01b900460ff16156107345760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016103bc565b600654600254610c3d916001600160a01b0391821691168484610d41565b5050565b610c49610da1565b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b610cee610bd2565b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610c793390565b6000818310610d385781610d3a565b825b9392505050565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052610d9b908590610df1565b50505050565b600054600160a01b900460ff166107345760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016103bc565b6000610e46826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610ecb9092919063ffffffff16565b9050805160001480610e67575080806020019051810190610e679190611074565b610ec65760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016103bc565b505050565b6060610eda8484600085610ee2565b949350505050565b606082471015610f435760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016103bc565b600080866001600160a01b03168587604051610f5f91906110e5565b60006040518083038185875af1925050503d8060008114610f9c576040519150601f19603f3d011682016040523d82523d6000602084013e610fa1565b606091505b5091509150610fb287838387610fbd565b979650505050505050565b60608315611029578251611022576001600160a01b0385163b6110225760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016103bc565b5081610eda565b610eda838381511561103e5781518083602001fd5b8060405162461bcd60e51b81526004016103bc9190611101565b600060208284031215611069578081fd5b8135610d3a816112f0565b600060208284031215611085578081fd5b81518015158114610d3a578182fd5b6000602082840312156110a5578081fd5b5035919050565b6000602082840312156110bd578081fd5b5051919050565b6000602082840312156110d5578081fd5b815160ff81168114610d3a578182fd5b600082516110f78184602087016112ae565b9190910192915050565b60208152600082518060208401526111208160408501602087016112ae565b601f01601f19169190910160400192915050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000821982111561117c5761117c6112da565b500190565b60008261119c57634e487b7160e01b81526012600452602481fd5b500490565b600181815b808511156111dc5781600019048211156111c2576111c26112da565b808516156111cf57918102915b93841c93908002906111a6565b509250929050565b6000610d3a60ff8416836000826111fd57506001610a2a565b8161120a57506000610a2a565b8160018114611220576002811461122a57611246565b6001915050610a2a565b60ff84111561123b5761123b6112da565b50506001821b610a2a565b5060208310610133831016604e8410600b8410161715611269575081810a610a2a565b61127383836111a1565b8060001904821115611287576112876112da565b029392505050565b60008160001904831182151516156112a9576112a96112da565b500290565b60005b838110156112c95781810151838201526020016112b1565b83811115610d9b5750506000910152565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b038116811461051857600080fdfea2646970667358221220d537ec71c9e44723bf9d040c2b4ac7c8ab120d014c1660e9fcefa2d0fc444b0564736f6c63430008040033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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