ETH Price: $3,228.23 (+1.79%)

Token

Heroglyph Name Change Token (HCT)
 

Overview

Max Total Supply

246,326.422219246003994026 HCT

Holders

63

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 18 Decimals)

Balance
90 HCT

Value
$0.00
0xdb52fd636cebfef6a8a7423e1b335f244d99a603
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
HCT

Compiler Version
v0.8.25+commit.b61c2a91

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion
File 1 of 11 : HCT.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.25;

import { ERC20 } from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import { IHCT } from "src/interfaces/IHCT.sol";
import { IObeliskRegistry } from "src/interfaces/IObeliskRegistry.sol";

import { Math } from "@openzeppelin/contracts/utils/math/Math.sol";
import { ShareableMath } from "src/lib/ShareableMath.sol";
import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";

/**
 * @title HCT
 * @author Heroglyph
 * @notice HCT is the token used to pay for name changes on Obelisk and to vote for
 * Megapools share.
 * @custom:export abi
 */
contract HCT is ERC20, IHCT, Ownable {
  uint128 public constant NAME_COST = 90e18;
  uint256 public constant PRE_MINT_AMOUNT = 250_000e18;

  IObeliskRegistry public immutable obeliskRegistry;
  mapping(address => UserInfo) internal usersInfo;

  uint256 public inflationRate;
  uint256 public baseRate;
  uint256 public inflationThreshold;

  uint256 internal totalMultiplier;
  uint256 internal totalRewards;
  uint256 public yieldPerTokenInRay;
  uint32 internal lastUnixTimeRewards;
  uint32 internal totalWrappedNFT;

  constructor(address _owner, address _treasury)
    ERC20("Heroglyph Name Change Token", "HCT")
    Ownable(_owner)
  {
    obeliskRegistry = IObeliskRegistry(msg.sender);
    baseRate = 1e18;
    inflationRate = 0.02 ether;

    inflationThreshold = 1_000_000e18;
    _mint(_treasury, PRE_MINT_AMOUNT);
  }

  modifier onlyHeroglyphWrappedNFT() {
    if (!obeliskRegistry.isWrappedNFT(msg.sender)) revert NotWrappedNFT();
    _;
  }

  function addPower(address _user, uint128 _addMultiplier, bool _newNFT)
    external
    override
    onlyHeroglyphWrappedNFT
  {
    UserInfo storage userInfo = usersInfo[_user];
    uint256 totalMultiplierCached = totalMultiplier;

    if (totalMultiplierCached == 0) {
      lastUnixTimeRewards = uint32(block.timestamp);
    }

    _claim(_user, userInfo, false);

    uint256 userMultiplier = userInfo.multiplier + _addMultiplier;
    userInfo.multiplier = userMultiplier;
    totalMultiplier = totalMultiplierCached + _addMultiplier;

    userInfo.userRates = ShareableMath.rmulup(userMultiplier, yieldPerTokenInRay);

    emit PowerAdded(msg.sender, _user, _addMultiplier);

    if (_newNFT) {
      uint32 totalWrappedNFTCached = totalWrappedNFT + 1;
      totalWrappedNFT = totalWrappedNFTCached;
      emit TotalNFTWrapped(totalWrappedNFTCached);
    }
  }

  function removePower(address _user, uint128 _removeMultiplier)
    external
    override
    onlyHeroglyphWrappedNFT
  {
    UserInfo storage userInfo = usersInfo[_user];
    _claim(_user, userInfo, false);

    uint256 userMultiplier = userInfo.multiplier - _removeMultiplier;

    userInfo.multiplier = userMultiplier;
    totalMultiplier -= _removeMultiplier;

    userInfo.userRates = ShareableMath.rmulup(userMultiplier, yieldPerTokenInRay);

    emit PowerRemoved(msg.sender, _user, _removeMultiplier);

    uint32 totalWrappedNFTCached = totalWrappedNFT - 1;
    totalWrappedNFT = totalWrappedNFTCached;
    emit TotalNFTWrapped(totalWrappedNFTCached);
  }

  function usesForRenaming(address _user) external override onlyHeroglyphWrappedNFT {
    _claim(_user, usersInfo[_user], true);
    _burn(_user, NAME_COST);

    emit BurnedForRenaming(msg.sender, _user, NAME_COST);
  }

  function burn(address _user, uint256 _amount) external {
    _spendAllowance(_user, msg.sender, _amount);
    _burn(_user, _amount);
  }

  function claim() external {
    uint128 amount_ = _claim(msg.sender, usersInfo[msg.sender], true);
    if (amount_ == 0) revert NothingToClaim();
  }

  function _claim(address _user, UserInfo storage _userInfo, bool _updateUserRate)
    internal
    returns (uint128 amount_)
  {
    uint256 nextTotalRewards = totalRewards;

    nextTotalRewards += _getSystemPendingRewards(uint32(block.timestamp));
    lastUnixTimeRewards = uint32(block.timestamp);

    uint256 yieldPerTokenInRayCached = yieldPerTokenInRay;
    uint256 totalMultiplierCached = totalMultiplier;

    if (totalMultiplierCached > 0) {
      yieldPerTokenInRayCached +=
        ShareableMath.rdiv(nextTotalRewards - totalRewards, totalMultiplierCached);
    }

    uint256 last = _userInfo.userRates;
    uint256 curr = ShareableMath.rmulup(_userInfo.multiplier, yieldPerTokenInRayCached);

    if (curr > last) {
      amount_ = uint128(curr - last);
      _mint(_user, amount_);
      nextTotalRewards -= amount_;

      emit Claimed(_user, amount_);
    }

    totalRewards = nextTotalRewards;
    yieldPerTokenInRay = yieldPerTokenInRayCached;

    if (_updateUserRate) {
      _userInfo.userRates =
        uint128(ShareableMath.rmulup(_userInfo.multiplier, yieldPerTokenInRayCached));
    }

    return amount_;
  }

  function setInflationRate(uint256 _inflationRate) external onlyOwner {
    inflationRate = _inflationRate;
    emit InflationRateSet(_inflationRate);
  }

  function setBaseRate(uint256 _baseRate) external onlyOwner {
    baseRate = _baseRate;
    emit BaseRateSet(_baseRate);
  }

  function setInflationThreshold(uint256 _inflationThreshold) external onlyOwner {
    inflationThreshold = _inflationThreshold;
    emit InflationThresholdSet(_inflationThreshold);
  }

  function balanceOf(address _user) public view override returns (uint256) {
    return super.balanceOf(_user);
  }

  function getUserPendingRewards(address _user) external view override returns (uint256) {
    return _getUserPendingRewards(_user);
  }

  function _getUserPendingRewards(address _user) internal view returns (uint256 amount_) {
    if (totalMultiplier == 0) return 0;

    UserInfo memory userInfo = usersInfo[_user];
    uint256 nextTotalRewards = totalRewards;

    nextTotalRewards += _getSystemPendingRewards(uint32(block.timestamp));

    uint256 yieldPerTokenInRayCached = yieldPerTokenInRay;
    uint256 totalMultiplierCached = totalMultiplier;

    yieldPerTokenInRayCached +=
      ShareableMath.rdiv(nextTotalRewards - totalRewards, totalMultiplierCached);

    uint256 last = userInfo.userRates;
    uint256 curr = ShareableMath.rmulup(userInfo.multiplier, yieldPerTokenInRayCached);

    if (curr > last) {
      amount_ = uint128(curr - last);
    }

    return amount_;
  }

  function getSystemPendingRewards() external view override returns (uint256) {
    return _getSystemPendingRewards(uint32(block.timestamp));
  }

  function getTotalRewardsGenerated() external view override returns (uint256) {
    return totalRewards + _getSystemPendingRewards(uint32(block.timestamp));
  }

  function _getSystemPendingRewards(uint32 _currentTime) internal view returns (uint256) {
    uint32 timePassed = _currentTime - lastUnixTimeRewards;
    if (timePassed == 0) return 0;

    bool isInflation = totalSupply() >= inflationThreshold;

    uint256 rateReward =
      (totalWrappedNFT * (isInflation ? inflationRate : baseRate)) / 1 days;

    return uint256(timePassed * rateReward);
  }

  function getUserInfo(address _user) external view override returns (UserInfo memory) {
    return usersInfo[_user];
  }
}

File 2 of 11 : ERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/ERC20.sol)

pragma solidity ^0.8.20;

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

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * The default value of {decimals} is 18. To change this, you should override
 * this function so it returns a different value.
 *
 * We have followed general OpenZeppelin Contracts guidelines: functions revert
 * instead returning `false` on failure. This behavior is nonetheless
 * conventional and does not conflict with the expectations of ERC20
 * applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 */
abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {
    mapping(address account => uint256) private _balances;

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

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

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

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

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

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

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

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual returns (uint256) {
        return _balances[account];
    }

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

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual returns (uint256) {
        return _allowances[owner][spender];
    }

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

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

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

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

        if (to == address(0)) {
            unchecked {
                // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply.
                _totalSupply -= value;
            }
        } else {
            unchecked {
                // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256.
                _balances[to] += value;
            }
        }

        emit Transfer(from, to, value);
    }

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

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

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

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

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

File 3 of 11 : IHCT.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;

interface IHCT {
  error NotWrappedNFT();
  error NothingToClaim();

  event TotalNFTWrapped(uint256 totalWrappedNFT);
  event PowerAdded(address indexed wrappedNFT, address indexed user, uint128 multiplier);
  event PowerRemoved(
    address indexed wrappedNFT, address indexed user, uint128 multiplier
  );
  event Transferred(
    address indexed wrappedNFT,
    address indexed from,
    address indexed to,
    uint128 multiplier
  );
  event Claimed(address indexed user, uint256 amount);
  event BurnedForRenaming(
    address indexed wrappedNFT, address indexed user, uint256 amount
  );
  event InflationRateSet(uint256 inflationRate);
  event BaseRateSet(uint256 baseRate);
  event InflationThresholdSet(uint256 inflationThreshold);

  struct UserInfo {
    uint256 multiplier;
    uint256 userRates;
  }

  function addPower(address _user, uint128 _addMultiplier, bool _newNFT) external;
  function removePower(address _user, uint128 _removeMultiplier) external;
  function burn(address _user, uint256 _amount) external;
  function usesForRenaming(address _user) external;
  function getUserPendingRewards(address _user) external view returns (uint256);
  function getSystemPendingRewards() external view returns (uint256);
  function getTotalRewardsGenerated() external view returns (uint256);
  function getUserInfo(address _user) external view returns (UserInfo memory);
}

File 4 of 11 : IObeliskRegistry.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;

interface IObeliskRegistry {
  error TooManyEth();
  error GoalReached();
  error AmountExceedsDeposit();
  error TransferFailed();
  error FailedDeployment();
  error TickerAlreadyExists();
  error NotSupporterDepositor();
  error AlreadyRemoved();
  error SupportNotFinished();
  error NothingToClaim();
  error NotWrappedNFT();
  error CollectionNotAllowed();
  error NotAuthorized();
  error OnlyOneValue();
  error AmountTooLow();
  error ContributionBalanceTooLow();
  error ZeroAddress();
  error CollectionAlreadyAllowed();
  error NoAccess();

  event WrappedNFTCreated(address indexed collection, address indexed wrappedNFT);
  event WrappedNFTEnabled(address indexed collection, address indexed wrappedNFT);
  event WrappedNFTDisabled(address indexed collection, address indexed wrappedNFT);
  event MegapoolFactorySet(address indexed megapoolFactory);
  event TickerCreationAccessSet(address indexed to, bool status);
  event TickerLogicSet(string indexed ticker, address indexed pool, string readableName);
  event NewGenesisTickerCreated(string indexed ticker, address pool);
  event Supported(uint32 indexed supportId, address indexed supporter, uint256 amount);
  event SupportRetrieved(
    uint32 indexed supportId, address indexed supporter, uint256 amount
  );
  event CollectionContributed(
    address indexed collection, address indexed contributor, uint256 amount
  );
  event CollectionContributionWithdrawn(
    address indexed collection, address indexed contributor, uint256 amount
  );
  event Claimed(address indexed collection, address indexed contributor, uint256 amount);
  event SlotBought(address indexed wrappedNFT, uint256 toCollection, uint256 toTreasury);
  event CollectionAllowed(
    address indexed collection,
    uint256 totalSupply,
    uint32 collectionStartedUnixTime,
    bool premium
  );
  event TreasurySet(address indexed treasury);
  event MaxRewardPerCollectionSet(uint256 maxRewardPerCollection);
  event CollectionImageIPFSUpdated(uint256 indexed id, string ipfsImage);

  struct Collection {
    uint256 totalSupply;
    uint256 contributionBalance;
    address wrappedVersion;
    uint32 collectionStartedUnixTime;
    bool allowed;
    bool premium;
  }

  struct Supporter {
    address depositor;
    address token;
    uint128 amount;
    uint32 lockUntil;
    bool removed;
  }

  struct CollectionRewards {
    uint128 totalRewards;
    uint128 claimedRewards;
  }

  struct ContributionInfo {
    uint128 deposit;
    uint128 claimed;
  }

  function isWrappedNFT(address _collection) external view returns (bool);

  /**
   * @notice Contribute to collection
   * @param _collection NFT Collection address
   * @dev Warning: once the collection goal is reached, it cannot be removed
   */
  function addToCollection(address _collection) external payable;

  /**
   * @notice Remove from collection
   * @param _collection Collection address
   * @dev Warning: once the collection goal is reached, it cannot be removed
   */
  function removeFromCollection(address _collection, uint256 _amount) external;

  /**
   * @notice Support the yield pool
   * @param _amount The amount to support with
   * @dev The amount is locked for 30 days
   * @dev if msg.value is 0, the amount is expected to be sent in DAI
   */
  function supportYieldPool(uint256 _amount) external payable;

  /**
   * @notice Retrieve support to yield pool
   * @param _id Support ID
   */
  function retrieveSupportToYieldPool(uint32 _id) external;

  /**
   * @notice Set ticker logic
   * @param _ticker Ticker
   * @param _pool Pool address
   * @param _override Override existing ticker logic. Only owner can override.
   */
  function setTickerLogic(string memory _ticker, address _pool, bool _override) external;

  /**
   * @notice When a slot is bought from the wrapped NFT
   */
  function onSlotBought() external payable;

  /**
   * @notice Get ticker logic
   * @param _ticker Ticker
   */
  function getTickerLogic(string memory _ticker) external view returns (address);

  /**
   * @notice Get supporter
   * @param _id Support ID
   */
  function getSupporter(uint32 _id) external view returns (Supporter memory);

  /**
   * @notice Get user contribution
   * @param _user User address
   * @param _collection Collection address
   */
  function getUserContribution(address _user, address _collection)
    external
    view
    returns (ContributionInfo memory);

  /**
   * @notice Get collection rewards
   * @param _collection Collection address
   */
  function getCollectionRewards(address _collection)
    external
    view
    returns (CollectionRewards memory);

  /**
   * @notice Get collection
   * @param _collection Collection address
   */
  function getCollection(address _collection) external view returns (Collection memory);

  function getCollectionImageIPFS(uint256 _id) external view returns (string memory);
}

File 5 of 11 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)

pragma solidity ^0.8.20;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    /**
     * @dev Muldiv operation overflow.
     */
    error MathOverflowedMulDiv();

    enum Rounding {
        Floor, // Toward negative infinity
        Ceil, // Toward positive infinity
        Trunc, // Toward zero
        Expand // Away from zero
    }

    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, with an overflow flag.
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
            // benefit is lost if 'b' is also tested.
            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
            if (a == 0) return (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a > b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow.
        return (a & b) + (a ^ b) / 2;
    }

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds towards infinity instead
     * of rounding towards zero.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        if (b == 0) {
            // Guarantee the same behavior as in a regular Solidity division.
            return a / b;
        }

        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a == 0 ? 0 : (a - 1) / b + 1;
    }

    /**
     * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or
     * denominator == 0.
     * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by
     * Uniswap Labs also under MIT license.
     */
    function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {
        unchecked {
            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
            // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
            // variables such that product = prod1 * 2^256 + prod0.
            uint256 prod0 = x * y; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(x, y, not(0))
                prod1 := sub(sub(mm, prod0), lt(mm, prod0))
            }

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                // Solidity will revert if denominator == 0, unlike the div opcode on its own.
                // The surrounding unchecked block does not change this fact.
                // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            if (denominator <= prod1) {
                revert MathOverflowedMulDiv();
            }

            ///////////////////////////////////////////////
            // 512 by 256 division.
            ///////////////////////////////////////////////

            // Make division exact by subtracting the remainder from [prod1 prod0].
            uint256 remainder;
            assembly {
                // Compute remainder using mulmod.
                remainder := mulmod(x, y, denominator)

                // Subtract 256 bit number from 512 bit number.
                prod1 := sub(prod1, gt(remainder, prod0))
                prod0 := sub(prod0, remainder)
            }

            // Factor powers of two out of denominator and compute largest power of two divisor of denominator.
            // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.

            uint256 twos = denominator & (0 - denominator);
            assembly {
                // Divide denominator by twos.
                denominator := div(denominator, twos)

                // Divide [prod1 prod0] by twos.
                prod0 := div(prod0, twos)

                // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
                twos := add(div(sub(0, twos), twos), 1)
            }

            // Shift in bits from prod1 into prod0.
            prod0 |= prod1 * twos;

            // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
            // four bits. That is, denominator * inv = 1 mod 2^4.
            uint256 inverse = (3 * denominator) ^ 2;

            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also
            // works in modular arithmetic, doubling the correct bits in each step.
            inverse *= 2 - denominator * inverse; // inverse mod 2^8
            inverse *= 2 - denominator * inverse; // inverse mod 2^16
            inverse *= 2 - denominator * inverse; // inverse mod 2^32
            inverse *= 2 - denominator * inverse; // inverse mod 2^64
            inverse *= 2 - denominator * inverse; // inverse mod 2^128
            inverse *= 2 - denominator * inverse; // inverse mod 2^256

            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
            // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
            // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
            // is no longer required.
            result = prod0 * inverse;
            return result;
        }
    }

    /**
     * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
     */
    function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {
        uint256 result = mulDiv(x, y, denominator);
        if (unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0) {
            result += 1;
        }
        return result;
    }

    /**
     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded
     * towards zero.
     *
     * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
     */
    function sqrt(uint256 a) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }

        // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
        //
        // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
        // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
        //
        // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
        // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
        // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
        //
        // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
        uint256 result = 1 << (log2(a) >> 1);

        // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
        // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
        // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
        // into the expected uint128 result.
        unchecked {
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            return min(result, a / result);
        }
    }

    /**
     * @notice Calculates sqrt(a), following the selected rounding direction.
     */
    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = sqrt(a);
            return result + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 2 of a positive value rounded towards zero.
     * Returns 0 if given 0.
     */
    function log2(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 128;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 64;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 32;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 16;
            }
            if (value >> 8 > 0) {
                value >>= 8;
                result += 8;
            }
            if (value >> 4 > 0) {
                value >>= 4;
                result += 4;
            }
            if (value >> 2 > 0) {
                value >>= 2;
                result += 2;
            }
            if (value >> 1 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log2(value);
            return result + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 10 of a positive value rounded towards zero.
     * Returns 0 if given 0.
     */
    function log10(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >= 10 ** 64) {
                value /= 10 ** 64;
                result += 64;
            }
            if (value >= 10 ** 32) {
                value /= 10 ** 32;
                result += 32;
            }
            if (value >= 10 ** 16) {
                value /= 10 ** 16;
                result += 16;
            }
            if (value >= 10 ** 8) {
                value /= 10 ** 8;
                result += 8;
            }
            if (value >= 10 ** 4) {
                value /= 10 ** 4;
                result += 4;
            }
            if (value >= 10 ** 2) {
                value /= 10 ** 2;
                result += 2;
            }
            if (value >= 10 ** 1) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log10(value);
            return result + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 256 of a positive value rounded towards zero.
     * Returns 0 if given 0.
     *
     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
     */
    function log256(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 16;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 8;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 4;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 2;
            }
            if (value >> 8 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 256, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log256(value);
            return result + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);
        }
    }

    /**
     * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.
     */
    function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {
        return uint8(rounding) % 2 == 1;
    }
}

File 6 of 11 : ShareableMath.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;

library ShareableMath {
  uint256 constant RAY = 10 ** 27;

  /// @notice Calculates floor(a×b÷denominator) with full precision. Throws if result
  /// overflows a uint256 or
  /// denominator == 0
  /// @param a The multiplicand
  /// @param b The multiplier
  /// @param denominator The divisor
  /// @return result The 256-bit result
  /// @dev Credit to Remco Bloemen under MIT license https://xn--2-umb.com/21/muldiv
  function mulDiv(uint256 a, uint256 b, uint256 denominator)
    internal
    pure
    returns (uint256 result)
  {
    unchecked {
      // 512-bit multiply [prod1 prod0] = a * b
      // Compute the product mod 2**256 and mod 2**256 - 1
      // then use the Chinese Remainder Theorem to reconstruct
      // the 512 bit result. The result is stored in two 256
      // variables such that product = prod1 * 2**256 + prod0
      uint256 prod0; // Least significant 256 bits of the product
      uint256 prod1; // Most significant 256 bits of the product
      assembly {
        let mm := mulmod(a, b, not(0))
        prod0 := mul(a, b)
        prod1 := sub(sub(mm, prod0), lt(mm, prod0))
      }

      // Handle non-overflow cases, 256 by 256 division
      if (prod1 == 0) {
        require(denominator > 0);
        assembly {
          result := div(prod0, denominator)
        }
        return result;
      }

      // Make sure the result is less than 2**256.
      // Also prevents denominator == 0
      require(denominator > prod1);

      ///////////////////////////////////////////////
      // 512 by 256 division.
      ///////////////////////////////////////////////

      // Make division exact by subtracting the remainder from [prod1 prod0]
      // Compute remainder using mulmod
      uint256 remainder;
      assembly {
        remainder := mulmod(a, b, denominator)
      }
      // Subtract 256 bit number from 512 bit number
      assembly {
        prod1 := sub(prod1, gt(remainder, prod0))
        prod0 := sub(prod0, remainder)
      }

      // Factor powers of two out of denominator
      // Compute largest power of two divisor of denominator.
      // Always >= 1.
      uint256 twos = (type(uint256).max - denominator + 1) & denominator;
      // Divide denominator by power of two
      assembly {
        denominator := div(denominator, twos)
      }

      // Divide [prod1 prod0] by the factors of two
      assembly {
        prod0 := div(prod0, twos)
      }
      // Shift in bits from prod1 into prod0. For this we need
      // to flip `twos` such that it is 2**256 / twos.
      // If twos is zero, then it becomes one
      assembly {
        twos := add(div(sub(0, twos), twos), 1)
      }
      prod0 |= prod1 * twos;

      // Invert denominator mod 2**256
      // Now that denominator is an odd number, it has an inverse
      // modulo 2**256 such that denominator * inv = 1 mod 2**256.
      // Compute the inverse by starting with a seed that is correct
      // correct for four bits. That is, denominator * inv = 1 mod 2**4
      uint256 inv = (3 * denominator) ^ 2;
      // Now use Newton-Raphson iteration to improve the precision.
      // Thanks to Hensel's lifting lemma, this also works in modular
      // arithmetic, doubling the correct bits in each step.
      inv *= 2 - denominator * inv; // inverse mod 2**8
      inv *= 2 - denominator * inv; // inverse mod 2**16
      inv *= 2 - denominator * inv; // inverse mod 2**32
      inv *= 2 - denominator * inv; // inverse mod 2**64
      inv *= 2 - denominator * inv; // inverse mod 2**128
      inv *= 2 - denominator * inv; // inverse mod 2**256

      // Because the division is now exact we can divide by multiplying
      // with the modular inverse of denominator. This will give us the
      // correct result modulo 2**256. Since the precoditions guarantee
      // that the outcome is less than 2**256, this is the final result.
      // We don't need to compute the high bits of the result and prod1
      // is no longer required.
      result = prod0 * inv;
      return result;
    }
  }

  function divup(uint256 x, uint256 y) internal pure returns (uint256 z) {
    z = (x + (y - 1)) / y;
  }

  function rmul(uint256 x, uint256 y) internal pure returns (uint256 z) {
    z = (x * y) / RAY;
  }

  function rmulup(uint256 x, uint256 y) internal pure returns (uint256 z) {
    z = divup((x * y), RAY);
  }

  function rdiv(uint256 x, uint256 y) internal pure returns (uint256 z) {
    z = mulDiv(x, RAY, y);
  }
}

File 7 of 11 : 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);
    }
}

File 8 of 11 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.20;

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

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

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

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

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

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

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

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

File 9 of 11 : IERC20Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.20;

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

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

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

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

File 10 of 11 : 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;
    }
}

File 11 of 11 : draft-IERC6093.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol)
pragma solidity ^0.8.20;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    /**
     * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.
     * Used in batch transfers.
     * @param idsLength Length of the array of token identifiers
     * @param valuesLength Length of the array of token amounts
     */
    error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);
}

Settings
{
  "remappings": [
    "hero-tokens/test/=test/",
    "ds-test/=node_modules/@layerzerolabs/toolbox-foundry/lib/ds-test/",
    "forge-std/=node_modules/@layerzerolabs/toolbox-foundry/lib/forge-std/src/",
    "@layerzerolabs/=node_modules/@layerzerolabs/",
    "@openzeppelin/=node_modules/@openzeppelin/",
    "heroglyph-library/=node_modules/@layerzerolabs/toolbox-foundry/lib/heroglyph-library/src/",
    "@axelar-network/=node_modules/@axelar-network/",
    "@chainlink/=node_modules/@chainlink/",
    "@eth-optimism/=node_modules/@eth-optimism/",
    "hardhat-deploy/=node_modules/hardhat-deploy/",
    "hardhat/=node_modules/hardhat/",
    "solidity-bytes-utils/=node_modules/solidity-bytes-utils/",
    "@prb-math/=node_modules/@layerzerolabs/toolbox-foundry/lib/prb-math/",
    "@prb/math/=node_modules/@layerzerolabs/toolbox-foundry/lib/prb-math/",
    "@sablier/v2-core/=node_modules/@sablier/v2-core/",
    "@uniswap/v3-periphery/=node_modules/@layerzerolabs/toolbox-foundry/lib/v3-periphery/",
    "@uniswap/v3-core/=node_modules/@layerzerolabs/toolbox-foundry/lib/v3-core/",
    "atoumic/=node_modules/@layerzerolabs/toolbox-foundry/lib/atoumic/src/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "paris",
  "viaIR": true,
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_treasury","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":[],"name":"NotWrappedNFT","type":"error"},{"inputs":[],"name":"NothingToClaim","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":false,"internalType":"uint256","name":"baseRate","type":"uint256"}],"name":"BaseRateSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"wrappedNFT","type":"address"},{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"BurnedForRenaming","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Claimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"inflationRate","type":"uint256"}],"name":"InflationRateSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"inflationThreshold","type":"uint256"}],"name":"InflationThresholdSet","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":"wrappedNFT","type":"address"},{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint128","name":"multiplier","type":"uint128"}],"name":"PowerAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"wrappedNFT","type":"address"},{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint128","name":"multiplier","type":"uint128"}],"name":"PowerRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"totalWrappedNFT","type":"uint256"}],"name":"TotalNFTWrapped","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"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"wrappedNFT","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint128","name":"multiplier","type":"uint128"}],"name":"Transferred","type":"event"},{"inputs":[],"name":"NAME_COST","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PRE_MINT_AMOUNT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"uint128","name":"_addMultiplier","type":"uint128"},{"internalType":"bool","name":"_newNFT","type":"bool"}],"name":"addPower","outputs":[],"stateMutability":"nonpayable","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":"_user","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getSystemPendingRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTotalRewardsGenerated","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"getUserInfo","outputs":[{"components":[{"internalType":"uint256","name":"multiplier","type":"uint256"},{"internalType":"uint256","name":"userRates","type":"uint256"}],"internalType":"struct IHCT.UserInfo","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"getUserPendingRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"inflationRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"inflationThreshold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"obeliskRegistry","outputs":[{"internalType":"contract IObeliskRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"uint128","name":"_removeMultiplier","type":"uint128"}],"name":"removePower","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_baseRate","type":"uint256"}],"name":"setBaseRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_inflationRate","type":"uint256"}],"name":"setInflationRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_inflationThreshold","type":"uint256"}],"name":"setInflationThreshold","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":"value","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":"value","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"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"usesForRenaming","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"yieldPerTokenInRay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

60a03461045c57611d21906001600160401b0390601f601f193885900382810182168401908582118583101761036a578085916040988994855283398101031261045c5761004c83610480565b9061005a6020809501610480565b94610063610461565b93601b85527f4865726f676c797068204e616d65204368616e676520546f6b656e000000000086860152610095610461565b94600391828752621210d560ea1b88880152815184811161036a5783546001938482811c92168015610452575b8b83101461043c5781848493116103eb575b508a9084831160011461038b57600092610380575b505060001982861b1c191690831b1783555b865193841161036a5760049687548381811c91168015610360575b8a82101461034b57828111610305575b50889185116001146102a15784955090849291600095610296575b50501b92600019911b1c19161782555b6001600160a01b0390811693841561027f57600580546001600160a01b0319811687179091558651959083167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a333608052670de0b6b3a764000060085566470de4df82000060075569d3c21bcecceda10000006009551692831561026b57506002546934f086f3b33b6840000091828201809211610256575060025560008381528083528481208054830190558451918252917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a35161188c908161049582396080518181816104aa0152818161065201528181610b1f0152610ef90152f35b601190634e487b7160e01b6000525260246000fd5b600060249263ec442f0560e01b8352820152fd5b8551631e4fbdf760e01b8152600081850152602490fd5b015193503880610141565b9291948416928760005284896000209460005b8b898383106102ee57505050106102d4575b50505050811b018255610151565b01519060f884600019921b161c19169055388080806102c6565b8686015189559097019694850194889350016102b4565b88600052896000208380880160051c8201928c8910610342575b0160051c019084905b828110610336575050610126565b60008155018490610328565b9250819261031f565b602289634e487b7160e01b6000525260246000fd5b90607f1690610116565b634e487b7160e01b600052604160045260246000fd5b0151905038806100e9565b908886941691876000528c600020928d6000905b8282106103d457505084116103bc575b505050811b0183556100fb565b015160001983881b60f8161c191690553880806103af565b83850151865589979095019493840193018e61039f565b909150856000528a6000208480850160051c8201928d8610610433575b918791869594930160051c01915b8281106104245750506100d4565b60008155859450879101610416565b92508192610408565b634e487b7160e01b600052602260045260246000fd5b91607f16916100c2565b600080fd5b60408051919082016001600160401b0381118382101761036a57604052565b51906001600160a01b038216820361045c5756fe6080604081815260048036101561001557600080fd5b600092833560e01c90816306fdde03146111f857508063095ea7b31461114f5780631093e42d14610ea357806318160ddd14610e845780631d08837b14610e375780631f68f20a14610e1857806323b872dd14610ddb578063247e927c14610db75780632cf09f4814610d98578063313ce56714610d7c57806331f9e35b14610d5d5780634b1946fb14610ae05780634bf7392814610ac15780634e71d92d1461099c5780636386c1c71461093257806370a08231146108fb578063715018a61461089b5780638048257e146106085780638da5cb5b146105df57806395d89b41146104d95780639915e23d146104955780639dc29fac146103c8578063a76d21f5146103a3578063a9059cbb14610372578063b1551b9514610325578063bddc1e68146102d8578063cf7c11fa146102b2578063d37e7ea91461027b578063dd62ed3e14610232578063e3ebaf3a1461020a5763f2fde38b1461017857600080fd5b3461020657602036600319011261020657610191611333565b9061019a61145b565b6001600160a01b039182169283156101f0575050600554826bffffffffffffffffffffffff60a01b821617600555167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b51631e4fbdf760e01b8152908101849052602490fd5b8280fd5b50503461022e578160031936011261022e57602090516804e1003b28d92800008152f35b5080fd5b50503461022e578060031936011261022e5780602092610250611333565b61025861134e565b6001600160a01b0391821683526001865283832091168252845220549051908152f35b50503461022e578160031936011261022e576020906102ab600b546102a563ffffffff4216611626565b906113e6565b9051908152f35b50503461022e57602036600319011261022e576020906102ab6102d3611333565b61168a565b5034610206576020366003190112610206577f0936f5112aeee6bc6ad2ce7f0578fa50cb693eafda653e233a0926934b69e4aa91602091359061031961145b565b8160095551908152a180f35b5034610206576020366003190112610206577f378b0c2c80acbe949b082a06236dc1ec5c13420ff596e05f26fed66a10abe8f391602091359061036661145b565b8160075551908152a180f35b50503461022e578060031936011261022e5760209061039c610392611333565b602435903361155a565b5160018152f35b50503461022e578160031936011261022e57602090516934f086f3b33b684000008152f35b5082903461022e578260031936011261022e576103e3611333565b90602435906103f3823385611487565b6001600160a01b03831692831561047e5783855284602052858520549183831061044a575050818495600080516020611837833981519152936020938688528785520381872055816002540360025551908152a380f35b865163391434e360e21b81526001600160a01b03909216908201908152602081018390526040810184905281906060010390fd5b8551634b637e8f60e11b8152808301869052602490fd5b50503461022e578160031936011261022e57517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b5091903461022e578160031936011261022e5780519180938054916001908360011c92600185169485156105d5575b60209586861081146105c25785895290811561059e5750600114610546575b6105428787610538828c03836113ac565b51918291826112ea565b0390f35b81529295507f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b5b82841061058b57505050826105429461053892820101943880610527565b805486850188015292860192810161056d565b60ff19168887015250505050151560051b8301019250610538826105423880610527565b634e487b7160e01b845260228352602484fd5b93607f1693610508565b50503461022e578160031936011261022e5760055490516001600160a01b039091168152602090f35b5091903461022e578060031936011261022e57610623611333565b9061062c611364565b81516322923e1760e11b8152338682015260209391906001600160a01b039085816024817f000000000000000000000000000000000000000000000000000000000000000086165afa908115610891578791610864575b5015610854578216908186526006855283862092600b5490819463ffffffff956106b3874216946102a586611626565b9363ffffffff19600d541617600d55600c5490600a549081610836575b505060018201938454936106e5838554611429565b8581116107c9575b505061072b9350600b55600c556107106001600160801b03825495168095611409565b80915561071f84600a54611409565b600a55600c5490611429565b905583519081527fdb3412ec21299c6ecf8cb2292210711e8aab1f68a1faedb79a5d30835e504180853392a3600d5480841c82166000190192908284116107b65767ffffffff00000000191683851b67ffffffff000000001617600d5551911681529192507f2270d74c0cb12442133f6b412088e04a2eb03dc7b4dcb1f033acc4c298b2bc0291a180f35b634e487b7160e01b865260118752602486fd5b6001600160801b03919394956107de91611409565b1691871561081f576000805160206118178339815191528b61081185809561080c61072b9a99988e97611728565b611409565b938c51908152a238806106ed565b895163ec442f0560e01b8152808e018d9052602490fd5b61084d92916108486102a59288611409565b611784565b38806106d0565b83516381d5b5ad60e01b81528790fd5b6108849150863d881161088a575b61087c81836113ac565b8101906113ce565b38610683565b503d610872565b85513d89823e3d90fd5b83346108f857806003193601126108f8576108b461145b565b600580546001600160a01b0319811690915581906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b80fd5b50503461022e57602036600319011261022e5760209181906001600160a01b03610923611333565b16815280845220549051908152f35b50503461022e57602036600319011261022e57809161094f611333565b816020845161095d8161137a565b82815201526001600160a01b03168152600660205220815161097e8161137a565b60206001835493848452015491019081528251918252516020820152f35b509034610206578260031936011261020657338352600660205280832083600b5480926109d363ffffffff4216926102a584611626565b9163ffffffff19600d541617600d55600c5493600a549081610aa6575b505060018101918254610a04868454611429565b818111610a43575b5050600b5583600c55610a296001600160801b0394859254611429565b1690551615610a36578280f35b516312d37ee560e31b8152fd5b6001600160801b0392955090610a5891611409565b16923315610a8f5783610a6f9161080c8233611728565b855184815260008051602061181783398151915260203392a23880610a0c565b855163ec442f0560e01b8152808801899052602490fd5b610ab99295916108486102a59286611409565b9238806109f0565b50503461022e578160031936011261022e57602090600c549051908152f35b503461020657602080600319360112610d5957610afb611333565b83516322923e1760e11b815233848201529093906001600160a01b039083816024817f000000000000000000000000000000000000000000000000000000000000000086165afa908115610d4f578791610d32575b5015610d225784169384865260068352818620600b549081610b7c63ffffffff4216916102a583611626565b9063ffffffff19600d541617600d55600c5492600a549081610d07575b505060018201938454610bad858554611429565b818111610c95575b50505091610bd3916001600160801b0393600b5581600c5554611429565b1690558315610c7f57838552848252808520546804e1003b28d928000093848210610c5e5750907f39fcc5c1db7456a4ba4e2e861932bcf7ffa1a38971c9058b896b3c6224892cf992916804e1003b28d927ffff1980918789528885520182882055600254016002558585600080516020611837833981519152848451888152a3519283523392a380f35b846064928785519363391434e360e21b855284015260248301526044820152fd5b51634b637e8f60e11b8152808301859052602490fd5b6001600160801b0391610caa91949394611409565b16918915610cf057918960008051602061181783398151915289610ce084610bd3989661080c826001600160801b039c9a611728565b938a51908152a291938193610bb5565b865163ec442f0560e01b8152808a018c9052602490fd5b8294916108486102a592610d1a95611409565b913880610b99565b81516381d5b5ad60e01b81528490fd5b610d499150843d861161088a5761087c81836113ac565b38610b50565b83513d89823e3d90fd5b8380fd5b50503461022e578160031936011261022e576020906007549051908152f35b50503461022e578160031936011261022e576020905160128152f35b50503461022e578160031936011261022e576020906009549051908152f35b50503461022e578160031936011261022e576020906102ab63ffffffff4216611626565b50503461022e57606036600319011261022e5760209061039c610dfc611333565b610e0461134e565b60443591610e13833383611487565b61155a565b50503461022e578160031936011261022e576020906008549051908152f35b5034610206576020366003190112610206577fc98034147b45762a645f5d7c4755be34747c222204b5f4c4a80442613041d4df916020913590610e7861145b565b8160085551908152a180f35b50503461022e578160031936011261022e576020906002549051908152f35b5091903461022e57606036600319011261022e57610ebf611333565b90610ec8611364565b604435801515810361114b5782516322923e1760e11b81523387820152602094906001600160a01b039086816024817f000000000000000000000000000000000000000000000000000000000000000086165afa908115611141578891611124575b50156111145781169081875260068652848720600a5494851595866110fa575b600b5496878263ffffffff99610f668b4216936102a585611626565b9263ffffffff19600d541617600d55600c5493156110df575b505060018501958654610f93848854611429565b818111611067575b50505092610fc895949261071f92610fd095600b55600c556001600160801b0384549216968780936113e6565b8094556113e6565b905584519081527f857c3ac0a5d19f9e64e59112fb2af6180c943817ce013789de0aff577e5e28f5863392a3611004578380f35b600d549160018284861c1601928284116107b65767ffffffff00000000191683851b67ffffffff000000001617600d5551911681529192507f2270d74c0cb12442133f6b412088e04a2eb03dc7b4dcb1f033acc4c298b2bc0291a1803880808380f35b6001600160801b039161107c91949394611409565b169188156110c957928b896000805160206118178339815191528f866110b481610fc89e9d9b9861080c610fd09e9b61071f9d611728565b9451908152a292958295979850819450610f9b565b60248f8f8e519163ec442f0560e01b8352820152fd5b8293916108486102a5926110f295611409565b908238610f7f565b63ffffffff421663ffffffff19600d541617600d55610f4a565b84516381d5b5ad60e01b81528890fd5b61113b9150873d891161088a5761087c81836113ac565b38610f2a565b86513d8a823e3d90fd5b8480fd5b5034610206578160031936011261020657611168611333565b6024359033156111e1576001600160a01b03169182156111ca57508083602095338152600187528181208582528752205582519081527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925843392a35160018152f35b8351634a1406b160e11b8152908101859052602490fd5b835163e602df0560e01b8152808401869052602490fd5b9291905034610d595783600319360112610d5957600354600181811c91869082811680156112e0575b60209586861082146112cd57508488529081156112ab5750600114611252575b6105428686610538828b03836113ac565b929550600383527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b828410611298575050508261054294610538928201019438611241565b805486850188015292860192810161127b565b60ff191687860152505050151560051b83010192506105388261054238611241565b634e487b7160e01b845260229052602483fd5b93607f1693611221565b6020808252825181830181905290939260005b82811061131f57505060409293506000838284010152601f8019910116010190565b8181018601518482016040015285016112fd565b600435906001600160a01b038216820361134957565b600080fd5b602435906001600160a01b038216820361134957565b602435906001600160801b038216820361134957565b6040810190811067ffffffffffffffff82111761139657604052565b634e487b7160e01b600052604160045260246000fd5b90601f8019910116810190811067ffffffffffffffff82111761139657604052565b90816020910312611349575180151581036113495790565b919082018092116113f357565b634e487b7160e01b600052601160045260246000fd5b919082039182116113f357565b818102929181159184041417156113f357565b9061143391611416565b6b033b2e3c9fd0803ce7ffffff81018091116113f3576b033b2e3c9fd0803ce8000000900490565b6005546001600160a01b0316330361146f57565b60405163118cdaa760e01b8152336004820152602490fd5b9160018060a01b0380931691600093838552600160205260409384862091831691828752602052848620549260001984036114c6575b50505050505050565b84841061152a575080156115125781156114fa578552600160205283852090855260205203912055388080808080806114bd565b8451634a1406b160e11b815260048101879052602490fd5b845163e602df0560e01b815260048101879052602490fd5b8551637dc7a0d960e11b81526001600160a01b039190911660048201526024810184905260448101859052606490fd5b916001600160a01b0380841692831561160d57169283156115f457600090838252816020526040822054908382106115c257509160408282600080516020611837833981519152958760209652828652038282205586815220818154019055604051908152a3565b60405163391434e360e21b81526001600160a01b03919091166004820152602481019190915260448101839052606490fd5b60405163ec442f0560e01b815260006004820152602490fd5b604051634b637e8f60e11b815260006004820152602490fd5b600d5463ffffffff91828083169116038281116113f35782169081156116825761166f620151809161167694600254600954111560001461167957600754915b60201c16611416565b0490611416565b90565b60085491611666565b505050600090565b600a5460009181156116825760018060a01b031660005260066020526117046040600020916116fb6001604051946116c18661137a565b80548652015491602085019283526102a5600b54916108486116f16116eb63ffffffff4216611626565b856113e6565b93600c5494611409565b90519251611429565b81811161171057505090565b6001600160801b0392509061172491611409565b1690565b6000805160206118378339815191526020600092611748856002546113e6565b6002556001600160a01b0316938415841461176f5780600254036002555b604051908152a3565b84845283825260408420818154019055611766565b906b033b2e3c9fd0803ce80000009060001982840992828102928380861095039480860395146118085784831115611349578291098160018119011680920460028082600302188083028203028083028203028083028203028083028203028083028203028092029003029360018380600003040190848311900302920304170290565b50508092501561134957049056fed8138f8a3f377c5259ca548e70e4c2de94f129f5a11036a15b69513cba2b426addf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa26469706673582212200e75c4f3d69f1aba0ed59341d4a60b2ed502644e5df29bf0fbec9cf98f23038664736f6c63430008190033000000000000000000000000c90b92d70af24ef1369389f1a1e3887305cd89c9000000000000000000000000888d768764a2e304215247f0ba3457ccb0f0ab4f

Deployed Bytecode

0x6080604081815260048036101561001557600080fd5b600092833560e01c90816306fdde03146111f857508063095ea7b31461114f5780631093e42d14610ea357806318160ddd14610e845780631d08837b14610e375780631f68f20a14610e1857806323b872dd14610ddb578063247e927c14610db75780632cf09f4814610d98578063313ce56714610d7c57806331f9e35b14610d5d5780634b1946fb14610ae05780634bf7392814610ac15780634e71d92d1461099c5780636386c1c71461093257806370a08231146108fb578063715018a61461089b5780638048257e146106085780638da5cb5b146105df57806395d89b41146104d95780639915e23d146104955780639dc29fac146103c8578063a76d21f5146103a3578063a9059cbb14610372578063b1551b9514610325578063bddc1e68146102d8578063cf7c11fa146102b2578063d37e7ea91461027b578063dd62ed3e14610232578063e3ebaf3a1461020a5763f2fde38b1461017857600080fd5b3461020657602036600319011261020657610191611333565b9061019a61145b565b6001600160a01b039182169283156101f0575050600554826bffffffffffffffffffffffff60a01b821617600555167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b51631e4fbdf760e01b8152908101849052602490fd5b8280fd5b50503461022e578160031936011261022e57602090516804e1003b28d92800008152f35b5080fd5b50503461022e578060031936011261022e5780602092610250611333565b61025861134e565b6001600160a01b0391821683526001865283832091168252845220549051908152f35b50503461022e578160031936011261022e576020906102ab600b546102a563ffffffff4216611626565b906113e6565b9051908152f35b50503461022e57602036600319011261022e576020906102ab6102d3611333565b61168a565b5034610206576020366003190112610206577f0936f5112aeee6bc6ad2ce7f0578fa50cb693eafda653e233a0926934b69e4aa91602091359061031961145b565b8160095551908152a180f35b5034610206576020366003190112610206577f378b0c2c80acbe949b082a06236dc1ec5c13420ff596e05f26fed66a10abe8f391602091359061036661145b565b8160075551908152a180f35b50503461022e578060031936011261022e5760209061039c610392611333565b602435903361155a565b5160018152f35b50503461022e578160031936011261022e57602090516934f086f3b33b684000008152f35b5082903461022e578260031936011261022e576103e3611333565b90602435906103f3823385611487565b6001600160a01b03831692831561047e5783855284602052858520549183831061044a575050818495600080516020611837833981519152936020938688528785520381872055816002540360025551908152a380f35b865163391434e360e21b81526001600160a01b03909216908201908152602081018390526040810184905281906060010390fd5b8551634b637e8f60e11b8152808301869052602490fd5b50503461022e578160031936011261022e57517f0000000000000000000000008416c04998f4bc5d34e3f817e1a581c8077d5a946001600160a01b03168152602090f35b5091903461022e578160031936011261022e5780519180938054916001908360011c92600185169485156105d5575b60209586861081146105c25785895290811561059e5750600114610546575b6105428787610538828c03836113ac565b51918291826112ea565b0390f35b81529295507f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b5b82841061058b57505050826105429461053892820101943880610527565b805486850188015292860192810161056d565b60ff19168887015250505050151560051b8301019250610538826105423880610527565b634e487b7160e01b845260228352602484fd5b93607f1693610508565b50503461022e578160031936011261022e5760055490516001600160a01b039091168152602090f35b5091903461022e578060031936011261022e57610623611333565b9061062c611364565b81516322923e1760e11b8152338682015260209391906001600160a01b039085816024817f0000000000000000000000008416c04998f4bc5d34e3f817e1a581c8077d5a9486165afa908115610891578791610864575b5015610854578216908186526006855283862092600b5490819463ffffffff956106b3874216946102a586611626565b9363ffffffff19600d541617600d55600c5490600a549081610836575b505060018201938454936106e5838554611429565b8581116107c9575b505061072b9350600b55600c556107106001600160801b03825495168095611409565b80915561071f84600a54611409565b600a55600c5490611429565b905583519081527fdb3412ec21299c6ecf8cb2292210711e8aab1f68a1faedb79a5d30835e504180853392a3600d5480841c82166000190192908284116107b65767ffffffff00000000191683851b67ffffffff000000001617600d5551911681529192507f2270d74c0cb12442133f6b412088e04a2eb03dc7b4dcb1f033acc4c298b2bc0291a180f35b634e487b7160e01b865260118752602486fd5b6001600160801b03919394956107de91611409565b1691871561081f576000805160206118178339815191528b61081185809561080c61072b9a99988e97611728565b611409565b938c51908152a238806106ed565b895163ec442f0560e01b8152808e018d9052602490fd5b61084d92916108486102a59288611409565b611784565b38806106d0565b83516381d5b5ad60e01b81528790fd5b6108849150863d881161088a575b61087c81836113ac565b8101906113ce565b38610683565b503d610872565b85513d89823e3d90fd5b83346108f857806003193601126108f8576108b461145b565b600580546001600160a01b0319811690915581906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b80fd5b50503461022e57602036600319011261022e5760209181906001600160a01b03610923611333565b16815280845220549051908152f35b50503461022e57602036600319011261022e57809161094f611333565b816020845161095d8161137a565b82815201526001600160a01b03168152600660205220815161097e8161137a565b60206001835493848452015491019081528251918252516020820152f35b509034610206578260031936011261020657338352600660205280832083600b5480926109d363ffffffff4216926102a584611626565b9163ffffffff19600d541617600d55600c5493600a549081610aa6575b505060018101918254610a04868454611429565b818111610a43575b5050600b5583600c55610a296001600160801b0394859254611429565b1690551615610a36578280f35b516312d37ee560e31b8152fd5b6001600160801b0392955090610a5891611409565b16923315610a8f5783610a6f9161080c8233611728565b855184815260008051602061181783398151915260203392a23880610a0c565b855163ec442f0560e01b8152808801899052602490fd5b610ab99295916108486102a59286611409565b9238806109f0565b50503461022e578160031936011261022e57602090600c549051908152f35b503461020657602080600319360112610d5957610afb611333565b83516322923e1760e11b815233848201529093906001600160a01b039083816024817f0000000000000000000000008416c04998f4bc5d34e3f817e1a581c8077d5a9486165afa908115610d4f578791610d32575b5015610d225784169384865260068352818620600b549081610b7c63ffffffff4216916102a583611626565b9063ffffffff19600d541617600d55600c5492600a549081610d07575b505060018201938454610bad858554611429565b818111610c95575b50505091610bd3916001600160801b0393600b5581600c5554611429565b1690558315610c7f57838552848252808520546804e1003b28d928000093848210610c5e5750907f39fcc5c1db7456a4ba4e2e861932bcf7ffa1a38971c9058b896b3c6224892cf992916804e1003b28d927ffff1980918789528885520182882055600254016002558585600080516020611837833981519152848451888152a3519283523392a380f35b846064928785519363391434e360e21b855284015260248301526044820152fd5b51634b637e8f60e11b8152808301859052602490fd5b6001600160801b0391610caa91949394611409565b16918915610cf057918960008051602061181783398151915289610ce084610bd3989661080c826001600160801b039c9a611728565b938a51908152a291938193610bb5565b865163ec442f0560e01b8152808a018c9052602490fd5b8294916108486102a592610d1a95611409565b913880610b99565b81516381d5b5ad60e01b81528490fd5b610d499150843d861161088a5761087c81836113ac565b38610b50565b83513d89823e3d90fd5b8380fd5b50503461022e578160031936011261022e576020906007549051908152f35b50503461022e578160031936011261022e576020905160128152f35b50503461022e578160031936011261022e576020906009549051908152f35b50503461022e578160031936011261022e576020906102ab63ffffffff4216611626565b50503461022e57606036600319011261022e5760209061039c610dfc611333565b610e0461134e565b60443591610e13833383611487565b61155a565b50503461022e578160031936011261022e576020906008549051908152f35b5034610206576020366003190112610206577fc98034147b45762a645f5d7c4755be34747c222204b5f4c4a80442613041d4df916020913590610e7861145b565b8160085551908152a180f35b50503461022e578160031936011261022e576020906002549051908152f35b5091903461022e57606036600319011261022e57610ebf611333565b90610ec8611364565b604435801515810361114b5782516322923e1760e11b81523387820152602094906001600160a01b039086816024817f0000000000000000000000008416c04998f4bc5d34e3f817e1a581c8077d5a9486165afa908115611141578891611124575b50156111145781169081875260068652848720600a5494851595866110fa575b600b5496878263ffffffff99610f668b4216936102a585611626565b9263ffffffff19600d541617600d55600c5493156110df575b505060018501958654610f93848854611429565b818111611067575b50505092610fc895949261071f92610fd095600b55600c556001600160801b0384549216968780936113e6565b8094556113e6565b905584519081527f857c3ac0a5d19f9e64e59112fb2af6180c943817ce013789de0aff577e5e28f5863392a3611004578380f35b600d549160018284861c1601928284116107b65767ffffffff00000000191683851b67ffffffff000000001617600d5551911681529192507f2270d74c0cb12442133f6b412088e04a2eb03dc7b4dcb1f033acc4c298b2bc0291a1803880808380f35b6001600160801b039161107c91949394611409565b169188156110c957928b896000805160206118178339815191528f866110b481610fc89e9d9b9861080c610fd09e9b61071f9d611728565b9451908152a292958295979850819450610f9b565b60248f8f8e519163ec442f0560e01b8352820152fd5b8293916108486102a5926110f295611409565b908238610f7f565b63ffffffff421663ffffffff19600d541617600d55610f4a565b84516381d5b5ad60e01b81528890fd5b61113b9150873d891161088a5761087c81836113ac565b38610f2a565b86513d8a823e3d90fd5b8480fd5b5034610206578160031936011261020657611168611333565b6024359033156111e1576001600160a01b03169182156111ca57508083602095338152600187528181208582528752205582519081527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925843392a35160018152f35b8351634a1406b160e11b8152908101859052602490fd5b835163e602df0560e01b8152808401869052602490fd5b9291905034610d595783600319360112610d5957600354600181811c91869082811680156112e0575b60209586861082146112cd57508488529081156112ab5750600114611252575b6105428686610538828b03836113ac565b929550600383527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b828410611298575050508261054294610538928201019438611241565b805486850188015292860192810161127b565b60ff191687860152505050151560051b83010192506105388261054238611241565b634e487b7160e01b845260229052602483fd5b93607f1693611221565b6020808252825181830181905290939260005b82811061131f57505060409293506000838284010152601f8019910116010190565b8181018601518482016040015285016112fd565b600435906001600160a01b038216820361134957565b600080fd5b602435906001600160a01b038216820361134957565b602435906001600160801b038216820361134957565b6040810190811067ffffffffffffffff82111761139657604052565b634e487b7160e01b600052604160045260246000fd5b90601f8019910116810190811067ffffffffffffffff82111761139657604052565b90816020910312611349575180151581036113495790565b919082018092116113f357565b634e487b7160e01b600052601160045260246000fd5b919082039182116113f357565b818102929181159184041417156113f357565b9061143391611416565b6b033b2e3c9fd0803ce7ffffff81018091116113f3576b033b2e3c9fd0803ce8000000900490565b6005546001600160a01b0316330361146f57565b60405163118cdaa760e01b8152336004820152602490fd5b9160018060a01b0380931691600093838552600160205260409384862091831691828752602052848620549260001984036114c6575b50505050505050565b84841061152a575080156115125781156114fa578552600160205283852090855260205203912055388080808080806114bd565b8451634a1406b160e11b815260048101879052602490fd5b845163e602df0560e01b815260048101879052602490fd5b8551637dc7a0d960e11b81526001600160a01b039190911660048201526024810184905260448101859052606490fd5b916001600160a01b0380841692831561160d57169283156115f457600090838252816020526040822054908382106115c257509160408282600080516020611837833981519152958760209652828652038282205586815220818154019055604051908152a3565b60405163391434e360e21b81526001600160a01b03919091166004820152602481019190915260448101839052606490fd5b60405163ec442f0560e01b815260006004820152602490fd5b604051634b637e8f60e11b815260006004820152602490fd5b600d5463ffffffff91828083169116038281116113f35782169081156116825761166f620151809161167694600254600954111560001461167957600754915b60201c16611416565b0490611416565b90565b60085491611666565b505050600090565b600a5460009181156116825760018060a01b031660005260066020526117046040600020916116fb6001604051946116c18661137a565b80548652015491602085019283526102a5600b54916108486116f16116eb63ffffffff4216611626565b856113e6565b93600c5494611409565b90519251611429565b81811161171057505090565b6001600160801b0392509061172491611409565b1690565b6000805160206118378339815191526020600092611748856002546113e6565b6002556001600160a01b0316938415841461176f5780600254036002555b604051908152a3565b84845283825260408420818154019055611766565b906b033b2e3c9fd0803ce80000009060001982840992828102928380861095039480860395146118085784831115611349578291098160018119011680920460028082600302188083028203028083028203028083028203028083028203028083028203028092029003029360018380600003040190848311900302920304170290565b50508092501561134957049056fed8138f8a3f377c5259ca548e70e4c2de94f129f5a11036a15b69513cba2b426addf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa26469706673582212200e75c4f3d69f1aba0ed59341d4a60b2ed502644e5df29bf0fbec9cf98f23038664736f6c63430008190033

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

000000000000000000000000c90b92d70af24ef1369389f1a1e3887305cd89c9000000000000000000000000888d768764a2e304215247f0ba3457ccb0f0ab4f

-----Decoded View---------------
Arg [0] : _owner (address): 0xc90B92d70AF24eF1369389f1A1E3887305cD89c9
Arg [1] : _treasury (address): 0x888D768764A2E304215247F0bA3457cCb0f0ab4f

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000c90b92d70af24ef1369389f1a1e3887305cd89c9
Arg [1] : 000000000000000000000000888d768764a2e304215247f0ba3457ccb0f0ab4f


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.