BNB Price: $621.23 (+2.46%)
 

Overview

Max Total Supply

100,000,000AGG

Holders

933

Market

Price

$0.00 @ 0.000000 BNB

Onchain Market Cap

-

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 18 Decimals)

Balance
0 AGG

Value
$0.00
0xb9e9e795fd530314663f779f7f57950c6bc1eb4b
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information

Contract Source Code Verified (Exact Match)

Contract Name:
ProjectTokenV2

Compiler Version
v0.8.20+commit.a1b79de6

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

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

/**
 * @title ProjectTokenV2
 * @dev 带买卖滑点的项目代币
 *
 * 滑点机制:
 * - 买入:0% 滑点
 * - 卖出:2.8% 滑点(转入指定地址或销毁)
 */
contract ProjectTokenV2 is ERC20, Ownable {
    uint256 public constant TOTAL_SUPPLY = 100_000_000 * 1e18; // 1亿
    uint256 public constant FEE_BASE = 10000;

    // 滑点配置
    uint256 public buyFee = 0;       // 买入滑点:0%
    uint256 public sellFee = 280;    // 卖出滑点:2.8% = 280/10000

    // 滑点接收地址(可以是销毁地址或团队地址)
    address public feeReceiver;

    // DEX交易对地址(用于识别买卖)
    mapping(address => bool) public isPair;

    // 白名单(免滑点)
    mapping(address => bool) public isExcludedFromFee;

    // 事件
    event PairUpdated(address indexed pair, bool status);
    event FeeReceiverUpdated(address indexed oldReceiver, address indexed newReceiver);
    event FeesUpdated(uint256 buyFee, uint256 sellFee);
    event ExcludedFromFee(address indexed account, bool status);
    event FeeCollected(address indexed from, address indexed to, uint256 amount, bool isSell);

    constructor(
        string memory name,
        string memory symbol,
        address _feeReceiver
    ) ERC20(name, symbol) Ownable(msg.sender) {
        require(_feeReceiver != address(0), "Invalid fee receiver");

        feeReceiver = _feeReceiver;

        // 合约部署者和滑点接收地址免滑点
        isExcludedFromFee[msg.sender] = true;
        isExcludedFromFee[_feeReceiver] = true;

        _mint(msg.sender, TOTAL_SUPPLY);
    }

    /**
     * @dev 重写transfer,加入滑点逻辑
     */
    function transfer(address to, uint256 amount) public virtual override returns (bool) {
        address from = _msgSender();
        uint256 finalAmount = _handleFee(from, to, amount);
        _transfer(from, to, finalAmount);
        return true;
    }

    /**
     * @dev 重写transferFrom,加入滑点逻辑
     */
    function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {
        address spender = _msgSender();

        // 先扣除授权额度(使用原始金额)
        _spendAllowance(from, spender, amount);

        // 处理滑点
        uint256 finalAmount = _handleFee(from, to, amount);

        // 执行转账(使用扣除滑点后的金额)
        _transfer(from, to, finalAmount);

        return true;
    }

    /**
     * @dev 处理滑点逻辑
     * @param from 发送方
     * @param to 接收方
     * @param amount 原始金额
     * @return 扣除滑点后的金额
     */
    function _handleFee(address from, address to, uint256 amount) internal returns (uint256) {
        // 白名单地址免滑点
        if (isExcludedFromFee[from] || isExcludedFromFee[to]) {
            return amount;
        }

        uint256 feeAmount = 0;
        bool isSell = false;

        // 判断是买入还是卖出
        if (isPair[from]) {
            // 从交易对转出 = 买入
            feeAmount = amount * buyFee / FEE_BASE;
        } else if (isPair[to]) {
            // 转入交易对 = 卖出
            feeAmount = amount * sellFee / FEE_BASE;
            isSell = true;
        }

        // 扣除滑点
        if (feeAmount > 0) {
            // 将滑点转给接收地址
            _transfer(from, feeReceiver, feeAmount);
            emit FeeCollected(from, to, feeAmount, isSell);
            return amount - feeAmount;
        }

        return amount;
    }

    // ============ 管理员功能 ============

    /**
     * @dev 设置DEX交易对地址
     * @param _pair 交易对地址
     * @param _status 是否为交易对
     */
    function setPair(address _pair, bool _status) external onlyOwner {
        require(_pair != address(0), "Invalid pair address");
        isPair[_pair] = _status;
        emit PairUpdated(_pair, _status);
    }

    /**
     * @dev 批量设置DEX交易对地址
     */
    function setPairsBatch(address[] calldata _pairs, bool _status) external onlyOwner {
        for (uint256 i = 0; i < _pairs.length; i++) {
            require(_pairs[i] != address(0), "Invalid pair address");
            isPair[_pairs[i]] = _status;
            emit PairUpdated(_pairs[i], _status);
        }
    }

    /**
     * @dev 设置滑点接收地址
     */
    function setFeeReceiver(address _feeReceiver) external onlyOwner {
        require(_feeReceiver != address(0), "Invalid fee receiver");
        address oldReceiver = feeReceiver;
        feeReceiver = _feeReceiver;

        // 移除旧接收地址的白名单(如果不是部署者)
        if (oldReceiver != owner()) {
            isExcludedFromFee[oldReceiver] = false;
            emit ExcludedFromFee(oldReceiver, false);
        }

        // 新接收地址自动免滑点
        isExcludedFromFee[_feeReceiver] = true;
        emit ExcludedFromFee(_feeReceiver, true);

        emit FeeReceiverUpdated(oldReceiver, _feeReceiver);
    }

    /**
     * @dev 设置买卖滑点
     * @param _buyFee 买入滑点(基数10000)
     * @param _sellFee 卖出滑点(基数10000)
     */
    function setFees(uint256 _buyFee, uint256 _sellFee) external onlyOwner {
        require(_buyFee <= 1000, "Buy fee too high");   // 最高10%
        require(_sellFee <= 1000, "Sell fee too high"); // 最高10%

        buyFee = _buyFee;
        sellFee = _sellFee;

        emit FeesUpdated(_buyFee, _sellFee);
    }

    /**
     * @dev 设置白名单(免滑点)
     */
    function setExcludedFromFee(address _account, bool _status) external onlyOwner {
        isExcludedFromFee[_account] = _status;
        emit ExcludedFromFee(_account, _status);
    }

    /**
     * @dev 批量设置白名单
     */
    function setExcludedFromFeeBatch(address[] calldata _accounts, bool _status) external onlyOwner {
        for (uint256 i = 0; i < _accounts.length; i++) {
            isExcludedFromFee[_accounts[i]] = _status;
            emit ExcludedFromFee(_accounts[i], _status);
        }
    }

    /**
     * @dev 销毁代币
     */
    function burn(uint256 amount) external {
        _burn(msg.sender, amount);
    }

    /**
     * @dev 从指定地址销毁代币(需要授权)
     */
    function burnFrom(address account, uint256 amount) external {
        _spendAllowance(account, msg.sender, amount);
        _burn(account, amount);
    }

    // ============ 查询函数 ============

    /**
     * @dev 获取滑点配置
     */
    function getFeeConfig() external view returns (
        uint256 _buyFee,
        uint256 _sellFee,
        address _feeReceiver
    ) {
        return (buyFee, sellFee, feeReceiver);
    }

    /**
     * @dev 计算实际到账金额(卖出时)
     */
    function calculateSellAmount(uint256 _amount) external view returns (
        uint256 feeAmount,
        uint256 receiveAmount
    ) {
        feeAmount = _amount * sellFee / FEE_BASE;
        receiveAmount = _amount - feeAmount;
    }

    /**
     * @dev 计算实际到账金额(买入时)
     */
    function calculateBuyAmount(uint256 _amount) external view returns (
        uint256 feeAmount,
        uint256 receiveAmount
    ) {
        feeAmount = _amount * buyFee / FEE_BASE;
        receiveAmount = _amount - feeAmount;
    }
}

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/draft-IERC6093.sol)
pragma solidity >=0.8.4;

/**
 * @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 Standard ERC-721 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-721 tokens.
 */
interface IERC721Errors {
    /**
     * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in ERC-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 ERC-1155 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-1155 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);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.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 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;

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

    /// @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();
        _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:
     *
     * ```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, currentAllowance - value, false);
            }
        }
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity >=0.6.2;

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

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

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

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)

pragma solidity >=0.4.16;

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

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

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

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"address","name":"_feeReceiver","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"allowance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"ERC20InsufficientAllowance","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"ERC20InsufficientBalance","type":"error"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"name":"ERC20InvalidApprover","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC20InvalidReceiver","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"ERC20InvalidSender","type":"error"},{"inputs":[{"internalType":"address","name":"spender","type":"address"}],"name":"ERC20InvalidSpender","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"bool","name":"status","type":"bool"}],"name":"ExcludedFromFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"bool","name":"isSell","type":"bool"}],"name":"FeeCollected","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldReceiver","type":"address"},{"indexed":true,"internalType":"address","name":"newReceiver","type":"address"}],"name":"FeeReceiverUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"buyFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"sellFee","type":"uint256"}],"name":"FeesUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"pair","type":"address"},{"indexed":false,"internalType":"bool","name":"status","type":"bool"}],"name":"PairUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"FEE_BASE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TOTAL_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burnFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"buyFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"calculateBuyAmount","outputs":[{"internalType":"uint256","name":"feeAmount","type":"uint256"},{"internalType":"uint256","name":"receiveAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"calculateSellAmount","outputs":[{"internalType":"uint256","name":"feeAmount","type":"uint256"},{"internalType":"uint256","name":"receiveAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeReceiver","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getFeeConfig","outputs":[{"internalType":"uint256","name":"_buyFee","type":"uint256"},{"internalType":"uint256","name":"_sellFee","type":"uint256"},{"internalType":"address","name":"_feeReceiver","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isExcludedFromFee","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isPair","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sellFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"bool","name":"_status","type":"bool"}],"name":"setExcludedFromFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_accounts","type":"address[]"},{"internalType":"bool","name":"_status","type":"bool"}],"name":"setExcludedFromFeeBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_feeReceiver","type":"address"}],"name":"setFeeReceiver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_buyFee","type":"uint256"},{"internalType":"uint256","name":"_sellFee","type":"uint256"}],"name":"setFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_pair","type":"address"},{"internalType":"bool","name":"_status","type":"bool"}],"name":"setPair","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_pairs","type":"address[]"},{"internalType":"bool","name":"_status","type":"bool"}],"name":"setPairsBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405260006006556101186007553480156200001c57600080fd5b5060405162001a3538038062001a358339810160408190526200003f91620003ea565b338383600362000050838262000506565b5060046200005f828262000506565b5050506001600160a01b0381166200009257604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b6200009d8162000162565b506001600160a01b038116620000f65760405162461bcd60e51b815260206004820152601460248201527f496e76616c696420666565207265636569766572000000000000000000000000604482015260640162000089565b600880546001600160a01b0319166001600160a01b038316908117909155336000818152600a6020526040808220805460ff199081166001908117909255948352912080549093161790915562000159906a52b7d2dcc80cd2e4000000620001b4565b505050620005fa565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b038216620001e05760405163ec442f0560e01b81526000600482015260240162000089565b620001ee60008383620001f2565b5050565b6001600160a01b03831662000221578060026000828254620002159190620005d2565b90915550620002959050565b6001600160a01b03831660009081526020819052604090205481811015620002765760405163391434e360e21b81526001600160a01b0385166004820152602481018290526044810183905260640162000089565b6001600160a01b03841660009081526020819052604090209082900390555b6001600160a01b038216620002b357600280548290039055620002d2565b6001600160a01b03821660009081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516200031891815260200190565b60405180910390a3505050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200034d57600080fd5b81516001600160401b03808211156200036a576200036a62000325565b604051601f8301601f19908116603f0116810190828211818310171562000395576200039562000325565b81604052838152602092508683858801011115620003b257600080fd5b600091505b83821015620003d65785820183015181830184015290820190620003b7565b600093810190920192909252949350505050565b6000806000606084860312156200040057600080fd5b83516001600160401b03808211156200041857600080fd5b62000426878388016200033b565b945060208601519150808211156200043d57600080fd5b506200044c868287016200033b565b604086015190935090506001600160a01b03811681146200046c57600080fd5b809150509250925092565b600181811c908216806200048c57607f821691505b602082108103620004ad57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200050157600081815260208120601f850160051c81016020861015620004dc5750805b601f850160051c820191505b81811015620004fd57828155600101620004e8565b5050505b505050565b81516001600160401b0381111562000522576200052262000325565b6200053a8162000533845462000477565b84620004b3565b602080601f831160018114620005725760008415620005595750858301515b600019600386901b1c1916600185901b178555620004fd565b600085815260208120601f198616915b82811015620005a35788860151825594840194600190910190840162000582565b5085821015620005c25787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b80820180821115620005f457634e487b7160e01b600052601160045260246000fd5b92915050565b61142b806200060a6000396000f3fe608060405234801561001057600080fd5b50600436106101da5760003560e01c806379cc679011610104578063a9059cbb116100a2578063e5e31b1311610071578063e5e31b1314610447578063ecefc7051461046a578063efdcd97414610473578063f2fde38b1461048657600080fd5b8063a9059cbb146103d5578063b3f00674146103e8578063dd62ed3e146103fb578063e1b413841461043457600080fd5b80638da5cb5b116100de5780638da5cb5b14610383578063902d55a5146103a857806395d89b41146103ba578063a12c9687146103c257600080fd5b806379cc67901461034a578063826398521461035d57806386a22eff1461037057600080fd5b8063313ce5671161017c5780635fbbc0d21161014b5780635fbbc0d2146102d95780636612e66f1461030657806370a0823114610319578063715018a61461034257600080fd5b8063313ce5671461028b57806342966c681461029a57806347062402146102ad5780635342acb4146102b657600080fd5b806318160ddd116101b857806318160ddd14610235578063194f17b51461024757806323b872dd1461026f5780632b14ca561461028257600080fd5b806306fdde03146101df578063095ea7b3146101fd5780630b78f9c014610220575b600080fd5b6101e7610499565b6040516101f491906110e0565b60405180910390f35b61021061020b36600461114a565b61052b565b60405190151581526020016101f4565b61023361022e366004611174565b610545565b005b6002545b6040519081526020016101f4565b61025a610255366004611196565b610624565b604080519283526020830191909152016101f4565b61021061027d3660046111af565b610655565b61023960075481565b604051601281526020016101f4565b6102336102a8366004611196565b61068b565b61023960065481565b6102106102c43660046111eb565b600a6020526000908152604090205460ff1681565b6006546007546008546040805193845260208401929092526001600160a01b0316908201526060016101f4565b610233610314366004611216565b610698565b6102396103273660046111eb565b6001600160a01b031660009081526020819052604090205490565b6102336106ee565b61023361035836600461114a565b610702565b61025a61036b366004611196565b61071b565b61023361037e366004611216565b61072f565b6005546001600160a01b03165b6040516001600160a01b0390911681526020016101f4565b6102396a52b7d2dcc80cd2e400000081565b6101e76107dc565b6102336103d0366004611249565b6107eb565b6102106103e336600461114a565b6108c3565b600854610390906001600160a01b031681565b6102396104093660046112cd565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b610233610442366004611249565b6108ea565b6102106104553660046111eb565b60096020526000908152604090205460ff1681565b61023961271081565b6102336104813660046111eb565b610a44565b6102336104943660046111eb565b610baf565b6060600380546104a8906112f7565b80601f01602080910402602001604051908101604052809291908181526020018280546104d4906112f7565b80156105215780601f106104f657610100808354040283529160200191610521565b820191906000526020600020905b81548152906001019060200180831161050457829003601f168201915b5050505050905090565b600033610539818585610bea565b60019150505b92915050565b61054d610bfc565b6103e88211156105975760405162461bcd60e51b815260206004820152601060248201526f084eaf240cccaca40e8dede40d0d2ced60831b60448201526064015b60405180910390fd5b6103e88111156105dd5760405162461bcd60e51b81526020600482015260116024820152700a6cad8d840cccaca40e8dede40d0d2ced607b1b604482015260640161058e565b6006829055600781905560408051838152602081018390527f5c6323bf1c2d7aaea2c091a4751c1c87af7f2864650c336507a77d0557af37a1910160405180910390a15050565b600080612710600754846106389190611347565b610642919061135e565b915061064e8284611380565b9050915091565b600033610663858285610c29565b6000610670868686610ca2565b905061067d868683610dfa565b6001925050505b9392505050565b6106953382610e59565b50565b6106a0610bfc565b6001600160a01b0382166000818152600a6020908152604091829020805460ff191685151590811790915591519182526000805160206113d683398151915291015b60405180910390a25050565b6106f6610bfc565b6107006000610e8f565b565b61070d823383610c29565b6107178282610e59565b5050565b600080612710600654846106389190611347565b610737610bfc565b6001600160a01b0382166107845760405162461bcd60e51b8152602060048201526014602482015273496e76616c69642070616972206164647265737360601b604482015260640161058e565b6001600160a01b038216600081815260096020908152604091829020805460ff191685151590811790915591519182527fb40229924089a696fab5d90675c48d4ccf43269a56c8c545f5227708acbf4e5791016106e2565b6060600480546104a8906112f7565b6107f3610bfc565b60005b828110156108bd5781600a600086868581811061081557610815611393565b905060200201602081019061082a91906111eb565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905583838281811061086457610864611393565b905060200201602081019061087991906111eb565b6001600160a01b03166000805160206113d6833981519152836040516108a3911515815260200190565b60405180910390a2806108b5816113a9565b9150506107f6565b50505050565b600033816108d2828686610ca2565b90506108df828683610dfa565b506001949350505050565b6108f2610bfc565b60005b828110156108bd57600084848381811061091157610911611393565b905060200201602081019061092691906111eb565b6001600160a01b0316036109735760405162461bcd60e51b8152602060048201526014602482015273496e76616c69642070616972206164647265737360601b604482015260640161058e565b816009600086868581811061098a5761098a611393565b905060200201602081019061099f91906111eb565b6001600160a01b031681526020810191909152604001600020805460ff19169115159190911790558383828181106109d9576109d9611393565b90506020020160208101906109ee91906111eb565b6001600160a01b03167fb40229924089a696fab5d90675c48d4ccf43269a56c8c545f5227708acbf4e5783604051610a2a911515815260200190565b60405180910390a280610a3c816113a9565b9150506108f5565b610a4c610bfc565b6001600160a01b038116610a995760405162461bcd60e51b815260206004820152601460248201527324b73b30b634b2103332b2903932b1b2b4bb32b960611b604482015260640161058e565b600880546001600160a01b038381166001600160a01b031983161790925516610aca6005546001600160a01b031690565b6001600160a01b0316816001600160a01b031614610b23576001600160a01b0381166000818152600a60209081526040808320805460ff19169055519182526000805160206113d6833981519152910160405180910390a25b6001600160a01b0382166000818152600a6020908152604091829020805460ff1916600190811790915591519182526000805160206113d6833981519152910160405180910390a2816001600160a01b0316816001600160a01b03167fa92ff4390fe6943f0b30e8fe715dde86f85ab79b2b2c640a10fc094cc4036cc860405160405180910390a35050565b610bb7610bfc565b6001600160a01b038116610be157604051631e4fbdf760e01b81526000600482015260240161058e565b61069581610e8f565b610bf78383836001610ee1565b505050565b6005546001600160a01b031633146107005760405163118cdaa760e01b815233600482015260240161058e565b6001600160a01b038381166000908152600160209081526040808320938616835292905220546000198110156108bd5781811015610c9357604051637dc7a0d960e11b81526001600160a01b0384166004820152602481018290526044810183905260640161058e565b6108bd84848484036000610ee1565b6001600160a01b0383166000908152600a602052604081205460ff1680610ce157506001600160a01b0383166000908152600a602052604090205460ff165b15610ced575080610684565b6001600160a01b038416600090815260096020526040812054819060ff1615610d325761271060065485610d219190611347565b610d2b919061135e565b9150610d75565b6001600160a01b03851660009081526009602052604090205460ff1615610d755761271060075485610d649190611347565b610d6e919061135e565b9150600190505b8115610df057600854610d939087906001600160a01b031684610dfa565b6040805183815282151560208201526001600160a01b0380881692908916917f59d6713734b6d7abb3d28e0ecdab7c005f4438de560ac404ff25d175a822990b910160405180910390a3610de78285611380565b92505050610684565b5091949350505050565b6001600160a01b038316610e2457604051634b637e8f60e11b81526000600482015260240161058e565b6001600160a01b038216610e4e5760405163ec442f0560e01b81526000600482015260240161058e565b610bf7838383610fb6565b6001600160a01b038216610e8357604051634b637e8f60e11b81526000600482015260240161058e565b61071782600083610fb6565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b038416610f0b5760405163e602df0560e01b81526000600482015260240161058e565b6001600160a01b038316610f3557604051634a1406b160e11b81526000600482015260240161058e565b6001600160a01b03808516600090815260016020908152604080832093871683529290522082905580156108bd57826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92584604051610fa891815260200190565b60405180910390a350505050565b6001600160a01b038316610fe1578060026000828254610fd691906113c2565b909155506110539050565b6001600160a01b038316600090815260208190526040902054818110156110345760405163391434e360e21b81526001600160a01b0385166004820152602481018290526044810183905260640161058e565b6001600160a01b03841660009081526020819052604090209082900390555b6001600160a01b03821661106f5760028054829003905561108e565b6001600160a01b03821660009081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516110d391815260200190565b60405180910390a3505050565b600060208083528351808285015260005b8181101561110d578581018301518582016040015282016110f1565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461114557600080fd5b919050565b6000806040838503121561115d57600080fd5b6111668361112e565b946020939093013593505050565b6000806040838503121561118757600080fd5b50508035926020909101359150565b6000602082840312156111a857600080fd5b5035919050565b6000806000606084860312156111c457600080fd5b6111cd8461112e565b92506111db6020850161112e565b9150604084013590509250925092565b6000602082840312156111fd57600080fd5b6106848261112e565b8035801515811461114557600080fd5b6000806040838503121561122957600080fd5b6112328361112e565b915061124060208401611206565b90509250929050565b60008060006040848603121561125e57600080fd5b833567ffffffffffffffff8082111561127657600080fd5b818601915086601f83011261128a57600080fd5b81358181111561129957600080fd5b8760208260051b85010111156112ae57600080fd5b6020928301955093506112c49186019050611206565b90509250925092565b600080604083850312156112e057600080fd5b6112e98361112e565b91506112406020840161112e565b600181811c9082168061130b57607f821691505b60208210810361132b57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761053f5761053f611331565b60008261137b57634e487b7160e01b600052601260045260246000fd5b500490565b8181038181111561053f5761053f611331565b634e487b7160e01b600052603260045260246000fd5b6000600182016113bb576113bb611331565b5060010190565b8082018082111561053f5761053f61133156fe2d43abd87b27cee7b0aa8c6f7e0b4a3247b683262a83cbc2318b0df398a49aa9a2646970667358221220a64fea445ef88f62c08f9aefdc92c3862ad71924ef2e06c35ad54eb38d70974664736f6c63430008140033000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000004277ef1f274d6146229d2501f2e2a6ecc26f27890000000000000000000000000000000000000000000000000000000000000003414747000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000034147470000000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101da5760003560e01c806379cc679011610104578063a9059cbb116100a2578063e5e31b1311610071578063e5e31b1314610447578063ecefc7051461046a578063efdcd97414610473578063f2fde38b1461048657600080fd5b8063a9059cbb146103d5578063b3f00674146103e8578063dd62ed3e146103fb578063e1b413841461043457600080fd5b80638da5cb5b116100de5780638da5cb5b14610383578063902d55a5146103a857806395d89b41146103ba578063a12c9687146103c257600080fd5b806379cc67901461034a578063826398521461035d57806386a22eff1461037057600080fd5b8063313ce5671161017c5780635fbbc0d21161014b5780635fbbc0d2146102d95780636612e66f1461030657806370a0823114610319578063715018a61461034257600080fd5b8063313ce5671461028b57806342966c681461029a57806347062402146102ad5780635342acb4146102b657600080fd5b806318160ddd116101b857806318160ddd14610235578063194f17b51461024757806323b872dd1461026f5780632b14ca561461028257600080fd5b806306fdde03146101df578063095ea7b3146101fd5780630b78f9c014610220575b600080fd5b6101e7610499565b6040516101f491906110e0565b60405180910390f35b61021061020b36600461114a565b61052b565b60405190151581526020016101f4565b61023361022e366004611174565b610545565b005b6002545b6040519081526020016101f4565b61025a610255366004611196565b610624565b604080519283526020830191909152016101f4565b61021061027d3660046111af565b610655565b61023960075481565b604051601281526020016101f4565b6102336102a8366004611196565b61068b565b61023960065481565b6102106102c43660046111eb565b600a6020526000908152604090205460ff1681565b6006546007546008546040805193845260208401929092526001600160a01b0316908201526060016101f4565b610233610314366004611216565b610698565b6102396103273660046111eb565b6001600160a01b031660009081526020819052604090205490565b6102336106ee565b61023361035836600461114a565b610702565b61025a61036b366004611196565b61071b565b61023361037e366004611216565b61072f565b6005546001600160a01b03165b6040516001600160a01b0390911681526020016101f4565b6102396a52b7d2dcc80cd2e400000081565b6101e76107dc565b6102336103d0366004611249565b6107eb565b6102106103e336600461114a565b6108c3565b600854610390906001600160a01b031681565b6102396104093660046112cd565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b610233610442366004611249565b6108ea565b6102106104553660046111eb565b60096020526000908152604090205460ff1681565b61023961271081565b6102336104813660046111eb565b610a44565b6102336104943660046111eb565b610baf565b6060600380546104a8906112f7565b80601f01602080910402602001604051908101604052809291908181526020018280546104d4906112f7565b80156105215780601f106104f657610100808354040283529160200191610521565b820191906000526020600020905b81548152906001019060200180831161050457829003601f168201915b5050505050905090565b600033610539818585610bea565b60019150505b92915050565b61054d610bfc565b6103e88211156105975760405162461bcd60e51b815260206004820152601060248201526f084eaf240cccaca40e8dede40d0d2ced60831b60448201526064015b60405180910390fd5b6103e88111156105dd5760405162461bcd60e51b81526020600482015260116024820152700a6cad8d840cccaca40e8dede40d0d2ced607b1b604482015260640161058e565b6006829055600781905560408051838152602081018390527f5c6323bf1c2d7aaea2c091a4751c1c87af7f2864650c336507a77d0557af37a1910160405180910390a15050565b600080612710600754846106389190611347565b610642919061135e565b915061064e8284611380565b9050915091565b600033610663858285610c29565b6000610670868686610ca2565b905061067d868683610dfa565b6001925050505b9392505050565b6106953382610e59565b50565b6106a0610bfc565b6001600160a01b0382166000818152600a6020908152604091829020805460ff191685151590811790915591519182526000805160206113d683398151915291015b60405180910390a25050565b6106f6610bfc565b6107006000610e8f565b565b61070d823383610c29565b6107178282610e59565b5050565b600080612710600654846106389190611347565b610737610bfc565b6001600160a01b0382166107845760405162461bcd60e51b8152602060048201526014602482015273496e76616c69642070616972206164647265737360601b604482015260640161058e565b6001600160a01b038216600081815260096020908152604091829020805460ff191685151590811790915591519182527fb40229924089a696fab5d90675c48d4ccf43269a56c8c545f5227708acbf4e5791016106e2565b6060600480546104a8906112f7565b6107f3610bfc565b60005b828110156108bd5781600a600086868581811061081557610815611393565b905060200201602081019061082a91906111eb565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905583838281811061086457610864611393565b905060200201602081019061087991906111eb565b6001600160a01b03166000805160206113d6833981519152836040516108a3911515815260200190565b60405180910390a2806108b5816113a9565b9150506107f6565b50505050565b600033816108d2828686610ca2565b90506108df828683610dfa565b506001949350505050565b6108f2610bfc565b60005b828110156108bd57600084848381811061091157610911611393565b905060200201602081019061092691906111eb565b6001600160a01b0316036109735760405162461bcd60e51b8152602060048201526014602482015273496e76616c69642070616972206164647265737360601b604482015260640161058e565b816009600086868581811061098a5761098a611393565b905060200201602081019061099f91906111eb565b6001600160a01b031681526020810191909152604001600020805460ff19169115159190911790558383828181106109d9576109d9611393565b90506020020160208101906109ee91906111eb565b6001600160a01b03167fb40229924089a696fab5d90675c48d4ccf43269a56c8c545f5227708acbf4e5783604051610a2a911515815260200190565b60405180910390a280610a3c816113a9565b9150506108f5565b610a4c610bfc565b6001600160a01b038116610a995760405162461bcd60e51b815260206004820152601460248201527324b73b30b634b2103332b2903932b1b2b4bb32b960611b604482015260640161058e565b600880546001600160a01b038381166001600160a01b031983161790925516610aca6005546001600160a01b031690565b6001600160a01b0316816001600160a01b031614610b23576001600160a01b0381166000818152600a60209081526040808320805460ff19169055519182526000805160206113d6833981519152910160405180910390a25b6001600160a01b0382166000818152600a6020908152604091829020805460ff1916600190811790915591519182526000805160206113d6833981519152910160405180910390a2816001600160a01b0316816001600160a01b03167fa92ff4390fe6943f0b30e8fe715dde86f85ab79b2b2c640a10fc094cc4036cc860405160405180910390a35050565b610bb7610bfc565b6001600160a01b038116610be157604051631e4fbdf760e01b81526000600482015260240161058e565b61069581610e8f565b610bf78383836001610ee1565b505050565b6005546001600160a01b031633146107005760405163118cdaa760e01b815233600482015260240161058e565b6001600160a01b038381166000908152600160209081526040808320938616835292905220546000198110156108bd5781811015610c9357604051637dc7a0d960e11b81526001600160a01b0384166004820152602481018290526044810183905260640161058e565b6108bd84848484036000610ee1565b6001600160a01b0383166000908152600a602052604081205460ff1680610ce157506001600160a01b0383166000908152600a602052604090205460ff165b15610ced575080610684565b6001600160a01b038416600090815260096020526040812054819060ff1615610d325761271060065485610d219190611347565b610d2b919061135e565b9150610d75565b6001600160a01b03851660009081526009602052604090205460ff1615610d755761271060075485610d649190611347565b610d6e919061135e565b9150600190505b8115610df057600854610d939087906001600160a01b031684610dfa565b6040805183815282151560208201526001600160a01b0380881692908916917f59d6713734b6d7abb3d28e0ecdab7c005f4438de560ac404ff25d175a822990b910160405180910390a3610de78285611380565b92505050610684565b5091949350505050565b6001600160a01b038316610e2457604051634b637e8f60e11b81526000600482015260240161058e565b6001600160a01b038216610e4e5760405163ec442f0560e01b81526000600482015260240161058e565b610bf7838383610fb6565b6001600160a01b038216610e8357604051634b637e8f60e11b81526000600482015260240161058e565b61071782600083610fb6565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b038416610f0b5760405163e602df0560e01b81526000600482015260240161058e565b6001600160a01b038316610f3557604051634a1406b160e11b81526000600482015260240161058e565b6001600160a01b03808516600090815260016020908152604080832093871683529290522082905580156108bd57826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92584604051610fa891815260200190565b60405180910390a350505050565b6001600160a01b038316610fe1578060026000828254610fd691906113c2565b909155506110539050565b6001600160a01b038316600090815260208190526040902054818110156110345760405163391434e360e21b81526001600160a01b0385166004820152602481018290526044810183905260640161058e565b6001600160a01b03841660009081526020819052604090209082900390555b6001600160a01b03821661106f5760028054829003905561108e565b6001600160a01b03821660009081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516110d391815260200190565b60405180910390a3505050565b600060208083528351808285015260005b8181101561110d578581018301518582016040015282016110f1565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461114557600080fd5b919050565b6000806040838503121561115d57600080fd5b6111668361112e565b946020939093013593505050565b6000806040838503121561118757600080fd5b50508035926020909101359150565b6000602082840312156111a857600080fd5b5035919050565b6000806000606084860312156111c457600080fd5b6111cd8461112e565b92506111db6020850161112e565b9150604084013590509250925092565b6000602082840312156111fd57600080fd5b6106848261112e565b8035801515811461114557600080fd5b6000806040838503121561122957600080fd5b6112328361112e565b915061124060208401611206565b90509250929050565b60008060006040848603121561125e57600080fd5b833567ffffffffffffffff8082111561127657600080fd5b818601915086601f83011261128a57600080fd5b81358181111561129957600080fd5b8760208260051b85010111156112ae57600080fd5b6020928301955093506112c49186019050611206565b90509250925092565b600080604083850312156112e057600080fd5b6112e98361112e565b91506112406020840161112e565b600181811c9082168061130b57607f821691505b60208210810361132b57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761053f5761053f611331565b60008261137b57634e487b7160e01b600052601260045260246000fd5b500490565b8181038181111561053f5761053f611331565b634e487b7160e01b600052603260045260246000fd5b6000600182016113bb576113bb611331565b5060010190565b8082018082111561053f5761053f61133156fe2d43abd87b27cee7b0aa8c6f7e0b4a3247b683262a83cbc2318b0df398a49aa9a2646970667358221220a64fea445ef88f62c08f9aefdc92c3862ad71924ef2e06c35ad54eb38d70974664736f6c63430008140033

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

000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000004277ef1f274d6146229d2501f2e2a6ecc26f27890000000000000000000000000000000000000000000000000000000000000003414747000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000034147470000000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : name (string): AGG
Arg [1] : symbol (string): AGG
Arg [2] : _feeReceiver (address): 0x4277EF1F274D6146229D2501F2e2A6ecc26f2789

-----Encoded View---------------
7 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [2] : 0000000000000000000000004277ef1f274d6146229d2501f2e2a6ecc26f2789
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [4] : 4147470000000000000000000000000000000000000000000000000000000000
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [6] : 4147470000000000000000000000000000000000000000000000000000000000


Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.