false
true
0

Contract Address Details

0xB2E0D81479ce8D954BB4Be2f379B2545568710E1

Token
Dynamic Impact Token (IMPACTOR)
Creator
0x697275–1ed143 at 0xdc7f66–468554
Balance
0 PLS ( )
Tokens
Fetching tokens...
Transactions
154 Transactions
Transfers
0 Transfers
Gas Used
0
Last Balance Update
25918819
Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
Contract name:
DynamicImpactToken




Optimization enabled
true
Compiler version
v0.8.20+commit.a1b79de6




Optimization runs
200
EVM Version
paris




Verified at
2025-09-27T17:24:24.036417Z

Constructor Arguments

0x00000000000000000000000069727585066409e8831f5f7d519569ed121ed143000000000000000000000000000000000000000000000000000000000000000000000000000000000000000069727585066409e8831f5f7d519569ed121ed143

Arg [0] (address) : 0x69727585066409e8831f5f7d519569ed121ed143
Arg [1] (address) : 0x0000000000000000000000000000000000000000
Arg [2] (address) : 0x69727585066409e8831f5f7d519569ed121ed143

              

DynamicImpactToken.sol

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

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

interface IImpactorDistributorMinimal {
    function setShare(address account, uint256 newBalance) external;
}

/**
 * @title Dynamic Impact Token (IMPACTOR)
 * @notice OZ v5 token with dynamic buy & sell tax (same linear curve).
 *         Taxes are routed in-token to a Treasury. Wallet<->wallet untaxed.
 *         After each balance change, notifies Distributor to keep % supply shares in sync.
 */
contract DynamicImpactToken is ERC20, Ownable {
    // ----- Dynamic tax config (applies to both buys & sells) -----
    uint256 public constant MAX_BPS        = 10_000;           // 100%
    uint256 public constant TAX_MIN_BPS    = 100;              // 1%
    uint256 public constant TAX_MAX_BPS    = 2_000;            // 20%
    uint256 public constant TAX_MIN_TOKENS = 100_000 * 1e18;   // 100k tokens
    uint256 public constant TAX_MAX_TOKENS = 20_000_000 * 1e18;// 20M tokens

    // AMM pairs (PulseX v2 etc.)
    mapping(address => bool) public automatedMarketMakerPairs;

    // Fee exemptions
    mapping(address => bool) public isExcludedFromFees;

    // Sinks
    address public treasury;                         // receives tax tokens
    IImpactorDistributorMinimal public distributor;  // receives share updates

    // Trading gate
    bool public tradingEnabled;

    // ----- Events -----
    event TreasuryChanged(address indexed oldTreasury, address indexed newTreasury);
    event AutomatedMarketMakerPairSet(address indexed pair, bool indexed enabled);
    event ExcludedFromFees(address indexed account, bool excluded);
    event TradingEnabled();
    event FeesForwarded(address indexed from, address indexed to, uint256 grossAmount, uint256 feeAmount, uint256 feeBps);
    event DistributorSet(address indexed distributor);

    constructor(address _treasury, address _initialAMMPair, address initialOwner)
        ERC20("Dynamic Impact Token", "IMPACTOR")
        Ownable(initialOwner)
    {
        require(_treasury != address(0), "treasury=0");
        treasury = _treasury;
        emit TreasuryChanged(address(0), _treasury);

        if (_initialAMMPair != address(0)) {
            automatedMarketMakerPairs[_initialAMMPair] = true;
            emit AutomatedMarketMakerPairSet(_initialAMMPair, true);
        }

        // Mint full supply to owner
        _mint(initialOwner, 1_000_000_000 * 1e18);

        // Default exclusions
        isExcludedFromFees[initialOwner] = true;
        isExcludedFromFees[address(this)] = true;
        isExcludedFromFees[_treasury] = true;
        emit ExcludedFromFees(initialOwner, true);
        emit ExcludedFromFees(address(this), true);
        emit ExcludedFromFees(_treasury, true);
    }

    // ----- Admin -----
    function enableTrading() external onlyOwner {
        tradingEnabled = true;
        emit TradingEnabled();
    }

    function setTreasury(address _treasury) external onlyOwner {
        require(_treasury != address(0), "treasury=0");
        emit TreasuryChanged(treasury, _treasury);
        treasury = _treasury;
        isExcludedFromFees[_treasury] = true;
        emit ExcludedFromFees(_treasury, true);
    }

    function setDistributor(address d) external onlyOwner {
        distributor = IImpactorDistributorMinimal(d);
        emit DistributorSet(d);
        // seed current owner/treasury balances (best-effort)
        if (d != address(0)) {
            try distributor.setShare(owner(), balanceOf(owner())) {} catch {}
            try distributor.setShare(treasury, balanceOf(treasury)) {} catch {}
        }
    }

    function setAutomatedMarketMakerPair(address pair, bool enabled) external onlyOwner {
        require(pair != address(0), "pair=0");
        automatedMarketMakerPairs[pair] = enabled;
        emit AutomatedMarketMakerPairSet(pair, enabled);
    }

    function setExcludedFromFees(address account, bool excluded) external onlyOwner {
        isExcludedFromFees[account] = excluded;
        emit ExcludedFromFees(account, excluded);
    }

    // Explicit decimals
    function decimals() public pure override returns (uint8) { return 18; }

    // View helpers
    function getBuyTaxBps(uint256 amount) external pure returns (uint256) { return _dynamicTaxBps(amount); }
    function getSellTaxBps(uint256 amount) external pure returns (uint256) { return _dynamicTaxBps(amount); }

    // ----- Core transfer hook (OZ v5) -----
    function _update(address from, address to, uint256 value) internal override {
        // Mint/Burn → no fees
        if (from == address(0) || to == address(0)) {
            super._update(from, to, value);
            _postBalanceSync(from, to);
            return;
        }

        // Trading gate
        if (!tradingEnabled) {
            require(isExcludedFromFees[from] || isExcludedFromFees[to], "Trading not enabled");
        }

        // Exclusions / zero value → no fees
        if (isExcludedFromFees[from] || isExcludedFromFees[to] || value == 0) {
            super._update(from, to, value);
            _postBalanceSync(from, to);
            return;
        }

        bool isBuy  = automatedMarketMakerPairs[from]; // from pair -> buy
        bool isSell = automatedMarketMakerPairs[to];   // to pair   -> sell

        if (!isBuy && !isSell) {
            super._update(from, to, value);
            _postBalanceSync(from, to);
            return;
        }

        uint256 feeBps = _dynamicTaxBps(value); // same curve for buy and sell
        if (feeBps == 0) {
            super._update(from, to, value);
            _postBalanceSync(from, to);
            return;
        }

        uint256 feeAmount  = (value * feeBps) / MAX_BPS;
        uint256 sendAmount = value - feeAmount;

        // Route fee to treasury (token form), then net to recipient
        super._update(from, treasury, feeAmount);
        super._update(from, to, sendAmount);

        emit FeesForwarded(from, to, value, feeAmount, feeBps);
        _postBalanceSync(from, to);
        // also sync treasury since it received fees
        _postBalanceSyncSingle(treasury);
    }

    // Linear tax across [TAX_MIN_TOKENS .. TAX_MAX_TOKENS]
    function _dynamicTaxBps(uint256 amount) internal pure returns (uint256) {
        if (amount <= TAX_MIN_TOKENS) return TAX_MIN_BPS;
        if (amount >= TAX_MAX_TOKENS) return TAX_MAX_BPS;
        uint256 span  = TAX_MAX_TOKENS - TAX_MIN_TOKENS;
        uint256 delta = amount - TAX_MIN_TOKENS;
        return TAX_MIN_BPS + ((TAX_MAX_BPS - TAX_MIN_BPS) * delta) / span;
    }

    // ---- Distributor sync helpers (best-effort; ignore failures) ----
    function _postBalanceSync(address from, address to) private {
        if (address(distributor) == address(0)) return;
        if (from != address(0)) {
            try distributor.setShare(from, balanceOf(from)) {} catch {}
        }
        if (to != address(0)) {
            try distributor.setShare(to, balanceOf(to)) {} catch {}
        }
    }
    function _postBalanceSyncSingle(address a) private {
        if (address(distributor) == address(0) || a == address(0)) return;
        try distributor.setShare(a, balanceOf(a)) {} catch {}
    }
}
        

@openzeppelin/contracts/access/Ownable.sol

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

@openzeppelin/contracts/interfaces/draft-IERC6093.sol

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

@openzeppelin/contracts/token/ERC20/ERC20.sol

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

@openzeppelin/contracts/token/ERC20/IERC20.sol

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

@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol

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

@openzeppelin/contracts/utils/Context.sol

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

Compiler Settings

{"outputSelection":{"*":{"*":["abi","metadata","devdoc","userdoc","storageLayout","evm.legacyAssembly","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","evm.gasEstimates","evm.assembly"],"":["ast"]}},"optimizer":{"runs":200,"enabled":true},"libraries":{},"evmVersion":"paris"}
              

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"_treasury","internalType":"address"},{"type":"address","name":"_initialAMMPair","internalType":"address"},{"type":"address","name":"initialOwner","internalType":"address"}]},{"type":"error","name":"ERC20InsufficientAllowance","inputs":[{"type":"address","name":"spender","internalType":"address"},{"type":"uint256","name":"allowance","internalType":"uint256"},{"type":"uint256","name":"needed","internalType":"uint256"}]},{"type":"error","name":"ERC20InsufficientBalance","inputs":[{"type":"address","name":"sender","internalType":"address"},{"type":"uint256","name":"balance","internalType":"uint256"},{"type":"uint256","name":"needed","internalType":"uint256"}]},{"type":"error","name":"ERC20InvalidApprover","inputs":[{"type":"address","name":"approver","internalType":"address"}]},{"type":"error","name":"ERC20InvalidReceiver","inputs":[{"type":"address","name":"receiver","internalType":"address"}]},{"type":"error","name":"ERC20InvalidSender","inputs":[{"type":"address","name":"sender","internalType":"address"}]},{"type":"error","name":"ERC20InvalidSpender","inputs":[{"type":"address","name":"spender","internalType":"address"}]},{"type":"error","name":"OwnableInvalidOwner","inputs":[{"type":"address","name":"owner","internalType":"address"}]},{"type":"error","name":"OwnableUnauthorizedAccount","inputs":[{"type":"address","name":"account","internalType":"address"}]},{"type":"event","name":"Approval","inputs":[{"type":"address","name":"owner","internalType":"address","indexed":true},{"type":"address","name":"spender","internalType":"address","indexed":true},{"type":"uint256","name":"value","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"AutomatedMarketMakerPairSet","inputs":[{"type":"address","name":"pair","internalType":"address","indexed":true},{"type":"bool","name":"enabled","internalType":"bool","indexed":true}],"anonymous":false},{"type":"event","name":"DistributorSet","inputs":[{"type":"address","name":"distributor","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"ExcludedFromFees","inputs":[{"type":"address","name":"account","internalType":"address","indexed":true},{"type":"bool","name":"excluded","internalType":"bool","indexed":false}],"anonymous":false},{"type":"event","name":"FeesForwarded","inputs":[{"type":"address","name":"from","internalType":"address","indexed":true},{"type":"address","name":"to","internalType":"address","indexed":true},{"type":"uint256","name":"grossAmount","internalType":"uint256","indexed":false},{"type":"uint256","name":"feeAmount","internalType":"uint256","indexed":false},{"type":"uint256","name":"feeBps","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":true},{"type":"address","name":"newOwner","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"TradingEnabled","inputs":[],"anonymous":false},{"type":"event","name":"Transfer","inputs":[{"type":"address","name":"from","internalType":"address","indexed":true},{"type":"address","name":"to","internalType":"address","indexed":true},{"type":"uint256","name":"value","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"TreasuryChanged","inputs":[{"type":"address","name":"oldTreasury","internalType":"address","indexed":true},{"type":"address","name":"newTreasury","internalType":"address","indexed":true}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"MAX_BPS","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"TAX_MAX_BPS","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"TAX_MAX_TOKENS","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"TAX_MIN_BPS","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"TAX_MIN_TOKENS","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"allowance","inputs":[{"type":"address","name":"owner","internalType":"address"},{"type":"address","name":"spender","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"approve","inputs":[{"type":"address","name":"spender","internalType":"address"},{"type":"uint256","name":"value","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"automatedMarketMakerPairs","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"balanceOf","inputs":[{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"pure","outputs":[{"type":"uint8","name":"","internalType":"uint8"}],"name":"decimals","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IImpactorDistributorMinimal"}],"name":"distributor","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"enableTrading","inputs":[]},{"type":"function","stateMutability":"pure","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getBuyTaxBps","inputs":[{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"pure","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getSellTaxBps","inputs":[{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isExcludedFromFees","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"name","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setAutomatedMarketMakerPair","inputs":[{"type":"address","name":"pair","internalType":"address"},{"type":"bool","name":"enabled","internalType":"bool"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setDistributor","inputs":[{"type":"address","name":"d","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setExcludedFromFees","inputs":[{"type":"address","name":"account","internalType":"address"},{"type":"bool","name":"excluded","internalType":"bool"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setTreasury","inputs":[{"type":"address","name":"_treasury","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"symbol","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalSupply","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"tradingEnabled","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"transfer","inputs":[{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"value","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"transferFrom","inputs":[{"type":"address","name":"from","internalType":"address"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"value","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"treasury","inputs":[]}]
              

Contract Creation Code

0x60806040523480156200001157600080fd5b506040516200201d3803806200201d833981016040819052620000349162000a04565b806040518060400160405280601481526020017f44796e616d696320496d7061637420546f6b656e0000000000000000000000008152506040518060400160405280600881526020016724a6a820a1aa27a960c11b81525081600390816200009d919062000aea565b506004620000ac828262000aea565b5050506001600160a01b038116620000df57604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b620000ea81620002ba565b506001600160a01b038316620001305760405162461bcd60e51b815260206004820152600a602482015269074726561737572793d360b41b6044820152606401620000d6565b600880546001600160a01b0319166001600160a01b0385169081179091556040516000907f8c3aa5f43a388513435861bf27dfad7829cd248696fed367c62d441f62954496908290a36001600160a01b03821615620001d9576001600160a01b038216600081815260066020526040808220805460ff1916600190811790915590519092917f167fec55059eb0be5a803ca151d74e2f1df0223b4482c9eb80a57be642be0bf591a35b620001f1816b033b2e3c9fd0803ce80000006200030c565b6001600160a01b0381811660008181526007602090815260408083208054600160ff1991821681179092553085528285208054821683179055958916845292819020805490951683179094559251908152909160008051602062001ffd833981519152910160405180910390a260405160018152309060008051602062001ffd8339815191529060200160405180910390a2604051600181526001600160a01b0384169060008051602062001ffd8339815191529060200160405180910390a250505062000c3b565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b038216620003385760405163ec442f0560e01b815260006004820152602401620000d6565b62000346600083836200034a565b5050565b6001600160a01b03831615806200036857506001600160a01b038216155b156200038c576200037b838383620005f4565b62000387838362000727565b505050565b600954600160a01b900460ff166200042c576001600160a01b03831660009081526007602052604090205460ff1680620003de57506001600160a01b03821660009081526007602052604090205460ff165b6200042c5760405162461bcd60e51b815260206004820152601360248201527f54726164696e67206e6f7420656e61626c6564000000000000000000000000006044820152606401620000d6565b6001600160a01b03831660009081526007602052604090205460ff16806200046c57506001600160a01b03821660009081526007602052604090205460ff165b8062000476575080155b1562000489576200037b838383620005f4565b6001600160a01b0380841660009081526006602052604080822054928516825290205460ff918216911681158015620004c0575080155b15620004e657620004d3858585620005f4565b620004df858562000727565b5050505050565b6000620004f3846200087e565b9050806000036200051f576200050b868686620005f4565b62000517868662000727565b505050505050565b600061271062000530838762000bcc565b6200053c919062000bec565b905060006200054c828762000c0f565b600854909150620005699089906001600160a01b031684620005f4565b62000576888883620005f4565b60408051878152602081018490529081018490526001600160a01b0380891691908a16907fda570ca379972489f4700ee2aa3aaea51f874db1e517a433c31a035a385912049060600160405180910390a3620005d3888862000727565b600854620005ea906001600160a01b031662000933565b5050505050505050565b6001600160a01b0383166200062357806002600082825462000617919062000c25565b90915550620006979050565b6001600160a01b03831660009081526020819052604090205481811015620006785760405163391434e360e21b81526001600160a01b03851660048201526024810182905260448101839052606401620000d6565b6001600160a01b03841660009081526020819052604090209082900390555b6001600160a01b038216620006b557600280548290039055620006d4565b6001600160a01b03821660009081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516200071a91815260200190565b60405180910390a3505050565b6009546001600160a01b03166200073c575050565b6001600160a01b03821615620007d9576009546001600160a01b03166314b6ca96836200077e816001600160a01b031660009081526020819052604090205490565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b158015620007c557600080fd5b505af1925050508015620007d7575060015b505b6001600160a01b0381161562000346576009546001600160a01b03166314b6ca96826200081b816001600160a01b031660009081526020819052604090205490565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b1580156200086257600080fd5b505af192505050801562000874575060015b1562000346575050565b600069152d02c7e14af680000082116200089a57506064919050565b6a108b2a2c280290940000008210620008b657506107d0919050565b6000620008d969152d02c7e14af68000006a108b2a2c2802909400000062000c0f565b90506000620008f369152d02c7e14af68000008562000c0f565b905081816200090660646107d062000c0f565b62000912919062000bcc565b6200091e919062000bec565b6200092b90606462000c25565b949350505050565b6009546001600160a01b031615806200095357506001600160a01b038116155b156200095c5750565b6009546001600160a01b03166314b6ca96826200098e816001600160a01b031660009081526020819052604090205490565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b158015620009d557600080fd5b505af192505050801562000346575050565b80516001600160a01b0381168114620009ff57600080fd5b919050565b60008060006060848603121562000a1a57600080fd5b62000a2584620009e7565b925062000a3560208501620009e7565b915062000a4560408501620009e7565b90509250925092565b634e487b7160e01b600052604160045260246000fd5b600181811c9082168062000a7957607f821691505b60208210810362000a9a57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200038757600081815260208120601f850160051c8101602086101562000ac95750805b601f850160051c820191505b81811015620005175782815560010162000ad5565b81516001600160401b0381111562000b065762000b0662000a4e565b62000b1e8162000b17845462000a64565b8462000aa0565b602080601f83116001811462000b56576000841562000b3d5750858301515b600019600386901b1c1916600185901b17855562000517565b600085815260208120601f198616915b8281101562000b875788860151825594840194600190910190840162000b66565b508582101562000ba65787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141762000be65762000be662000bb6565b92915050565b60008262000c0a57634e487b7160e01b600052601260045260246000fd5b500490565b8181038181111562000be65762000be662000bb6565b8082018082111562000be65762000be662000bb6565b6113b28062000c4b6000396000f3fe608060405234801561001057600080fd5b50600436106101cf5760003560e01c8063715018a611610104578063a0eee410116100a2578063dd62ed3e11610071578063dd62ed3e146103c8578063f0f4426014610401578063f2fde38b14610414578063fd967f471461042757600080fd5b8063a0eee4101461036e578063a9059cbb1461037f578063b62496f514610392578063bfe10928146103b557600080fd5b80638da5cb5b116100de5780638da5cb5b1461034257806390fcf21d1461025a57806395d89b41146103535780639a7a23d61461035b57600080fd5b8063715018a61461031f57806375619ab5146103275780638a8c523c1461033a57600080fd5b8063475c7b1811610171578063518ef4b71161014b578063518ef4b7146102a4578063590ffdce146102b657806361d027b3146102cb57806370a08231146102f657600080fd5b8063475c7b181461025a5780634ada218b1461026d5780634fbee1931461028157600080fd5b806323b872dd116101ad57806323b872dd14610227578063313ce5671461023a578063344f66b1146102495780633d3a1cbf1461025157600080fd5b806306fdde03146101d4578063095ea7b3146101f257806318160ddd14610215575b600080fd5b6101dc610430565b6040516101e99190611153565b60405180910390f35b6102056102003660046111bd565b6104c2565b60405190151581526020016101e9565b6002545b6040519081526020016101e9565b6102056102353660046111e7565b6104dc565b604051601281526020016101e9565b610219606481565b6102196107d081565b610219610268366004611223565b610500565b60095461020590600160a01b900460ff1681565b61020561028f36600461123c565b60076020526000908152604090205460ff1681565b6102196a108b2a2c2802909400000081565b6102c96102c436600461125e565b61050b565b005b6008546102de906001600160a01b031681565b6040516001600160a01b0390911681526020016101e9565b61021961030436600461123c565b6001600160a01b031660009081526020819052604090205490565b6102c9610572565b6102c961033536600461123c565b610586565b6102c96106fc565b6005546001600160a01b03166102de565b6101dc610742565b6102c961036936600461125e565b610751565b61021969152d02c7e14af680000081565b61020561038d3660046111bd565b6107f1565b6102056103a036600461123c565b60066020526000908152604090205460ff1681565b6009546102de906001600160a01b031681565b6102196103d636600461129a565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6102c961040f36600461123c565b6107ff565b6102c961042236600461123c565b6108f5565b61021961271081565b60606003805461043f906112cd565b80601f016020809104026020016040519081016040528092919081815260200182805461046b906112cd565b80156104b85780601f1061048d576101008083540402835291602001916104b8565b820191906000526020600020905b81548152906001019060200180831161049b57829003601f168201915b5050505050905090565b6000336104d0818585610930565b60019150505b92915050565b6000336104ea858285610942565b6104f58585856109c1565b506001949350505050565b60006104d682610a20565b610513610ac7565b6001600160a01b038216600081815260076020908152604091829020805460ff191685151590811790915591519182527f3499bfcf9673677ba552f3fe2ea274ec7e6246da31c3c87e115b45a9b0db2efb910160405180910390a25050565b61057a610ac7565b6105846000610af4565b565b61058e610ac7565b600980546001600160a01b0319166001600160a01b0383169081179091556040517f86719c518c7d99ac94b3d405d462ea876ba5cd0a978461dc9a7c9862a948588690600090a26001600160a01b038116156106f9576009546001600160a01b03166314b6ca966106076005546001600160a01b031690565b61061c6103046005546001600160a01b031690565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b15801561066257600080fd5b505af1925050508015610673575060015b506009546008546001600160a01b0390811660008181526020819052604090205491909216916314b6ca96915b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b1580156106e657600080fd5b505af19250505080156106f7575060015b505b50565b610704610ac7565b6009805460ff60a01b1916600160a01b1790556040517f799663458a5ef2936f7fa0c99b3336c69c25890f82974f04e811e5bb359186c790600090a1565b60606004805461043f906112cd565b610759610ac7565b6001600160a01b03821661079d5760405162461bcd60e51b81526020600482015260066024820152650706169723d360d41b60448201526064015b60405180910390fd5b6001600160a01b038216600081815260066020526040808220805460ff191685151590811790915590519092917f167fec55059eb0be5a803ca151d74e2f1df0223b4482c9eb80a57be642be0bf591a35050565b6000336104d08185856109c1565b610807610ac7565b6001600160a01b03811661084a5760405162461bcd60e51b815260206004820152600a602482015269074726561737572793d360b41b6044820152606401610794565b6008546040516001600160a01b038084169216907f8c3aa5f43a388513435861bf27dfad7829cd248696fed367c62d441f6295449690600090a3600880546001600160a01b0319166001600160a01b038316908117909155600081815260076020908152604091829020805460ff1916600190811790915591519182527f3499bfcf9673677ba552f3fe2ea274ec7e6246da31c3c87e115b45a9b0db2efb910160405180910390a250565b6108fd610ac7565b6001600160a01b03811661092757604051631e4fbdf760e01b815260006004820152602401610794565b6106f981610af4565b61093d8383836001610b46565b505050565b6001600160a01b038381166000908152600160209081526040808320938616835292905220546000198110156109bb57818110156109ac57604051637dc7a0d960e11b81526001600160a01b03841660048201526024810182905260448101839052606401610794565b6109bb84848484036000610b46565b50505050565b6001600160a01b0383166109eb57604051634b637e8f60e11b815260006004820152602401610794565b6001600160a01b038216610a155760405163ec442f0560e01b815260006004820152602401610794565b61093d838383610c1b565b600069152d02c7e14af68000008211610a3b57506064919050565b6a108b2a2c280290940000008210610a5657506107d0919050565b6000610a7769152d02c7e14af68000006a108b2a2c2802909400000061131d565b90506000610a8f69152d02c7e14af68000008561131d565b90508181610aa060646107d061131d565b610aaa9190611330565b610ab49190611347565b610abf906064611369565b949350505050565b6005546001600160a01b031633146105845760405163118cdaa760e01b8152336004820152602401610794565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b038416610b705760405163e602df0560e01b815260006004820152602401610794565b6001600160a01b038316610b9a57604051634a1406b160e11b815260006004820152602401610794565b6001600160a01b03808516600090815260016020908152604080832093871683529290522082905580156109bb57826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92584604051610c0d91815260200190565b60405180910390a350505050565b6001600160a01b0383161580610c3857506001600160a01b038216155b15610c5257610c48838383610e8c565b61093d8383610fb6565b600954600160a01b900460ff16610ce4576001600160a01b03831660009081526007602052604090205460ff1680610ca257506001600160a01b03821660009081526007602052604090205460ff165b610ce45760405162461bcd60e51b8152602060048201526013602482015272151c98591a5b99c81b9bdd08195b98589b1959606a1b6044820152606401610794565b6001600160a01b03831660009081526007602052604090205460ff1680610d2357506001600160a01b03821660009081526007602052604090205460ff165b80610d2c575080155b15610d3c57610c48838383610e8c565b6001600160a01b0380841660009081526006602052604080822054928516825290205460ff918216911681158015610d72575080155b15610d9357610d82858585610e8c565b610d8c8585610fb6565b5050505050565b6000610d9e84610a20565b905080600003610dc557610db3868686610e8c565b610dbd8686610fb6565b505050505050565b6000612710610dd48387611330565b610dde9190611347565b90506000610dec828761131d565b600854909150610e079089906001600160a01b031684610e8c565b610e12888883610e8c565b60408051878152602081018490529081018490526001600160a01b0380891691908a16907fda570ca379972489f4700ee2aa3aaea51f874db1e517a433c31a035a385912049060600160405180910390a3610e6d8888610fb6565b600854610e82906001600160a01b03166110fb565b5050505050505050565b6001600160a01b038316610eb7578060026000828254610eac9190611369565b90915550610f299050565b6001600160a01b03831660009081526020819052604090205481811015610f0a5760405163391434e360e21b81526001600160a01b03851660048201526024810182905260448101839052606401610794565b6001600160a01b03841660009081526020819052604090209082900390555b6001600160a01b038216610f4557600280548290039055610f64565b6001600160a01b03821660009081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610fa991815260200190565b60405180910390a3505050565b6009546001600160a01b0316610fca575050565b6001600160a01b03821615611063576009546001600160a01b03166314b6ca968361100a816001600160a01b031660009081526020819052604090205490565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b15801561105057600080fd5b505af1925050508015611061575060015b505b6001600160a01b038116156106f7576009546001600160a01b03166314b6ca96826110a3816001600160a01b031660009081526020819052604090205490565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b1580156110e957600080fd5b505af192505050801561093d57505050565b6009546001600160a01b0316158061111a57506001600160a01b038116155b156111225750565b6009546001600160a01b03166314b6ca96826106a0816001600160a01b031660009081526020819052604090205490565b600060208083528351808285015260005b8181101561118057858101830151858201604001528201611164565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b03811681146111b857600080fd5b919050565b600080604083850312156111d057600080fd5b6111d9836111a1565b946020939093013593505050565b6000806000606084860312156111fc57600080fd5b611205846111a1565b9250611213602085016111a1565b9150604084013590509250925092565b60006020828403121561123557600080fd5b5035919050565b60006020828403121561124e57600080fd5b611257826111a1565b9392505050565b6000806040838503121561127157600080fd5b61127a836111a1565b91506020830135801515811461128f57600080fd5b809150509250929050565b600080604083850312156112ad57600080fd5b6112b6836111a1565b91506112c4602084016111a1565b90509250929050565b600181811c908216806112e157607f821691505b60208210810361130157634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b818103818111156104d6576104d6611307565b80820281158282048414176104d6576104d6611307565b60008261136457634e487b7160e01b600052601260045260246000fd5b500490565b808201808211156104d6576104d661130756fea26469706673582212200be29657301332a67dbc4596e9317be90e4033add7500901093257253fc9b35964736f6c634300081400333499bfcf9673677ba552f3fe2ea274ec7e6246da31c3c87e115b45a9b0db2efb00000000000000000000000069727585066409e8831f5f7d519569ed121ed143000000000000000000000000000000000000000000000000000000000000000000000000000000000000000069727585066409e8831f5f7d519569ed121ed143

Deployed ByteCode

0x608060405234801561001057600080fd5b50600436106101cf5760003560e01c8063715018a611610104578063a0eee410116100a2578063dd62ed3e11610071578063dd62ed3e146103c8578063f0f4426014610401578063f2fde38b14610414578063fd967f471461042757600080fd5b8063a0eee4101461036e578063a9059cbb1461037f578063b62496f514610392578063bfe10928146103b557600080fd5b80638da5cb5b116100de5780638da5cb5b1461034257806390fcf21d1461025a57806395d89b41146103535780639a7a23d61461035b57600080fd5b8063715018a61461031f57806375619ab5146103275780638a8c523c1461033a57600080fd5b8063475c7b1811610171578063518ef4b71161014b578063518ef4b7146102a4578063590ffdce146102b657806361d027b3146102cb57806370a08231146102f657600080fd5b8063475c7b181461025a5780634ada218b1461026d5780634fbee1931461028157600080fd5b806323b872dd116101ad57806323b872dd14610227578063313ce5671461023a578063344f66b1146102495780633d3a1cbf1461025157600080fd5b806306fdde03146101d4578063095ea7b3146101f257806318160ddd14610215575b600080fd5b6101dc610430565b6040516101e99190611153565b60405180910390f35b6102056102003660046111bd565b6104c2565b60405190151581526020016101e9565b6002545b6040519081526020016101e9565b6102056102353660046111e7565b6104dc565b604051601281526020016101e9565b610219606481565b6102196107d081565b610219610268366004611223565b610500565b60095461020590600160a01b900460ff1681565b61020561028f36600461123c565b60076020526000908152604090205460ff1681565b6102196a108b2a2c2802909400000081565b6102c96102c436600461125e565b61050b565b005b6008546102de906001600160a01b031681565b6040516001600160a01b0390911681526020016101e9565b61021961030436600461123c565b6001600160a01b031660009081526020819052604090205490565b6102c9610572565b6102c961033536600461123c565b610586565b6102c96106fc565b6005546001600160a01b03166102de565b6101dc610742565b6102c961036936600461125e565b610751565b61021969152d02c7e14af680000081565b61020561038d3660046111bd565b6107f1565b6102056103a036600461123c565b60066020526000908152604090205460ff1681565b6009546102de906001600160a01b031681565b6102196103d636600461129a565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6102c961040f36600461123c565b6107ff565b6102c961042236600461123c565b6108f5565b61021961271081565b60606003805461043f906112cd565b80601f016020809104026020016040519081016040528092919081815260200182805461046b906112cd565b80156104b85780601f1061048d576101008083540402835291602001916104b8565b820191906000526020600020905b81548152906001019060200180831161049b57829003601f168201915b5050505050905090565b6000336104d0818585610930565b60019150505b92915050565b6000336104ea858285610942565b6104f58585856109c1565b506001949350505050565b60006104d682610a20565b610513610ac7565b6001600160a01b038216600081815260076020908152604091829020805460ff191685151590811790915591519182527f3499bfcf9673677ba552f3fe2ea274ec7e6246da31c3c87e115b45a9b0db2efb910160405180910390a25050565b61057a610ac7565b6105846000610af4565b565b61058e610ac7565b600980546001600160a01b0319166001600160a01b0383169081179091556040517f86719c518c7d99ac94b3d405d462ea876ba5cd0a978461dc9a7c9862a948588690600090a26001600160a01b038116156106f9576009546001600160a01b03166314b6ca966106076005546001600160a01b031690565b61061c6103046005546001600160a01b031690565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b15801561066257600080fd5b505af1925050508015610673575060015b506009546008546001600160a01b0390811660008181526020819052604090205491909216916314b6ca96915b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b1580156106e657600080fd5b505af19250505080156106f7575060015b505b50565b610704610ac7565b6009805460ff60a01b1916600160a01b1790556040517f799663458a5ef2936f7fa0c99b3336c69c25890f82974f04e811e5bb359186c790600090a1565b60606004805461043f906112cd565b610759610ac7565b6001600160a01b03821661079d5760405162461bcd60e51b81526020600482015260066024820152650706169723d360d41b60448201526064015b60405180910390fd5b6001600160a01b038216600081815260066020526040808220805460ff191685151590811790915590519092917f167fec55059eb0be5a803ca151d74e2f1df0223b4482c9eb80a57be642be0bf591a35050565b6000336104d08185856109c1565b610807610ac7565b6001600160a01b03811661084a5760405162461bcd60e51b815260206004820152600a602482015269074726561737572793d360b41b6044820152606401610794565b6008546040516001600160a01b038084169216907f8c3aa5f43a388513435861bf27dfad7829cd248696fed367c62d441f6295449690600090a3600880546001600160a01b0319166001600160a01b038316908117909155600081815260076020908152604091829020805460ff1916600190811790915591519182527f3499bfcf9673677ba552f3fe2ea274ec7e6246da31c3c87e115b45a9b0db2efb910160405180910390a250565b6108fd610ac7565b6001600160a01b03811661092757604051631e4fbdf760e01b815260006004820152602401610794565b6106f981610af4565b61093d8383836001610b46565b505050565b6001600160a01b038381166000908152600160209081526040808320938616835292905220546000198110156109bb57818110156109ac57604051637dc7a0d960e11b81526001600160a01b03841660048201526024810182905260448101839052606401610794565b6109bb84848484036000610b46565b50505050565b6001600160a01b0383166109eb57604051634b637e8f60e11b815260006004820152602401610794565b6001600160a01b038216610a155760405163ec442f0560e01b815260006004820152602401610794565b61093d838383610c1b565b600069152d02c7e14af68000008211610a3b57506064919050565b6a108b2a2c280290940000008210610a5657506107d0919050565b6000610a7769152d02c7e14af68000006a108b2a2c2802909400000061131d565b90506000610a8f69152d02c7e14af68000008561131d565b90508181610aa060646107d061131d565b610aaa9190611330565b610ab49190611347565b610abf906064611369565b949350505050565b6005546001600160a01b031633146105845760405163118cdaa760e01b8152336004820152602401610794565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b038416610b705760405163e602df0560e01b815260006004820152602401610794565b6001600160a01b038316610b9a57604051634a1406b160e11b815260006004820152602401610794565b6001600160a01b03808516600090815260016020908152604080832093871683529290522082905580156109bb57826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92584604051610c0d91815260200190565b60405180910390a350505050565b6001600160a01b0383161580610c3857506001600160a01b038216155b15610c5257610c48838383610e8c565b61093d8383610fb6565b600954600160a01b900460ff16610ce4576001600160a01b03831660009081526007602052604090205460ff1680610ca257506001600160a01b03821660009081526007602052604090205460ff165b610ce45760405162461bcd60e51b8152602060048201526013602482015272151c98591a5b99c81b9bdd08195b98589b1959606a1b6044820152606401610794565b6001600160a01b03831660009081526007602052604090205460ff1680610d2357506001600160a01b03821660009081526007602052604090205460ff165b80610d2c575080155b15610d3c57610c48838383610e8c565b6001600160a01b0380841660009081526006602052604080822054928516825290205460ff918216911681158015610d72575080155b15610d9357610d82858585610e8c565b610d8c8585610fb6565b5050505050565b6000610d9e84610a20565b905080600003610dc557610db3868686610e8c565b610dbd8686610fb6565b505050505050565b6000612710610dd48387611330565b610dde9190611347565b90506000610dec828761131d565b600854909150610e079089906001600160a01b031684610e8c565b610e12888883610e8c565b60408051878152602081018490529081018490526001600160a01b0380891691908a16907fda570ca379972489f4700ee2aa3aaea51f874db1e517a433c31a035a385912049060600160405180910390a3610e6d8888610fb6565b600854610e82906001600160a01b03166110fb565b5050505050505050565b6001600160a01b038316610eb7578060026000828254610eac9190611369565b90915550610f299050565b6001600160a01b03831660009081526020819052604090205481811015610f0a5760405163391434e360e21b81526001600160a01b03851660048201526024810182905260448101839052606401610794565b6001600160a01b03841660009081526020819052604090209082900390555b6001600160a01b038216610f4557600280548290039055610f64565b6001600160a01b03821660009081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610fa991815260200190565b60405180910390a3505050565b6009546001600160a01b0316610fca575050565b6001600160a01b03821615611063576009546001600160a01b03166314b6ca968361100a816001600160a01b031660009081526020819052604090205490565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b15801561105057600080fd5b505af1925050508015611061575060015b505b6001600160a01b038116156106f7576009546001600160a01b03166314b6ca96826110a3816001600160a01b031660009081526020819052604090205490565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b1580156110e957600080fd5b505af192505050801561093d57505050565b6009546001600160a01b0316158061111a57506001600160a01b038116155b156111225750565b6009546001600160a01b03166314b6ca96826106a0816001600160a01b031660009081526020819052604090205490565b600060208083528351808285015260005b8181101561118057858101830151858201604001528201611164565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b03811681146111b857600080fd5b919050565b600080604083850312156111d057600080fd5b6111d9836111a1565b946020939093013593505050565b6000806000606084860312156111fc57600080fd5b611205846111a1565b9250611213602085016111a1565b9150604084013590509250925092565b60006020828403121561123557600080fd5b5035919050565b60006020828403121561124e57600080fd5b611257826111a1565b9392505050565b6000806040838503121561127157600080fd5b61127a836111a1565b91506020830135801515811461128f57600080fd5b809150509250929050565b600080604083850312156112ad57600080fd5b6112b6836111a1565b91506112c4602084016111a1565b90509250929050565b600181811c908216806112e157607f821691505b60208210810361130157634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b818103818111156104d6576104d6611307565b80820281158282048414176104d6576104d6611307565b60008261136457634e487b7160e01b600052601260045260246000fd5b500490565b808201808211156104d6576104d661130756fea26469706673582212200be29657301332a67dbc4596e9317be90e4033add7500901093257253fc9b35964736f6c63430008140033