Feature Tip: Add private address tag to any address under My Name Tag !
Overview
TokenID
3724
Total Transfers
-
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 0 Decimals)
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
ERCHub
Compiler Version
v0.8.21+commit.d9974bed
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
/** * @title ERCHub Token * @author [email protected] * @notice ERC741 token standard, ERC20 & ERC721 synthetic token standard. * Because it follows the logical rules of how it inherently works, it can take advantage of existing indexers. * email: [email protected] * website: https://erc-hub.com * twitter: https://twitter.com/ERC_Hub * telegram: https://t.me/ERC_Hub */ // SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.21; import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import {Context} from "@openzeppelin/contracts/utils/Context.sol"; import {IUniswapV3Factory} from "@uniswap/v3-core/contracts/interfaces/IUniswapV3Factory.sol"; import {SemiFungibleERC741} from "./SemiFungibleERC741.sol"; contract ERCHub is SemiFungibleERC741 { constructor() SemiFungibleERC741("ERC741", "HUB") { _erc20Supply = 5000 * 10 ** 18; erc721totalSupply = 5000; _balance[_msgSender()] = _erc20Supply; address WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; uint256 chain = block.chainid; if (chain == 5) { WETH = 0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6; } address v3Pool = IUniswapV3Factory( 0x1F98431c8aD98523631AE4a59f267346ea31F984 ).createPool(WETH, address(this), 10000); excludeNFT[_msgSender()] = true; excludeNFT[v3Pool] = true; erc20Relayer.emitTransfer(address(0), _msgSender(), _erc20Supply); } function setExcludeNFTPublic(bool status) external { if (_balance[_msgSender()] > 0) { revert InvalidSetWhitelistCondition(); } excludeNFT[_msgSender()] = status; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @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 { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` 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 amount) 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 `amount` 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 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` 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 amount) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @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; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { // Solidity will revert if denominator == 0, unlike the div opcode on its own. // The surrounding unchecked block does not change this fact. // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic. return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1, "Math: mulDiv 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. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * 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 + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 256, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol) pragma solidity ^0.8.0; /** * @dev Standard signed math utilities missing in the Solidity language. */ library SignedMath { /** * @dev Returns the largest of two signed numbers. */ function max(int256 a, int256 b) internal pure returns (int256) { return a > b ? a : b; } /** * @dev Returns the smallest of two signed numbers. */ function min(int256 a, int256 b) internal pure returns (int256) { return 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 { // must be unchecked in order to support `n = type(int256).min` return uint256(n >= 0 ? n : -n); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; import "./math/SignedMath.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @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; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `int256` to its ASCII `string` decimal representation. */ function toString(int256 value) internal pure returns (string memory) { return string(abi.encodePacked(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) { 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] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); 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 Returns true if the two strings are equal. */ function equal(string memory a, string memory b) internal pure returns (bool) { return keccak256(bytes(a)) == keccak256(bytes(b)); } }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.5.0; /// @title The interface for the Uniswap V3 Factory /// @notice The Uniswap V3 Factory facilitates creation of Uniswap V3 pools and control over the protocol fees interface IUniswapV3Factory { /// @notice Emitted when the owner of the factory is changed /// @param oldOwner The owner before the owner was changed /// @param newOwner The owner after the owner was changed event OwnerChanged(address indexed oldOwner, address indexed newOwner); /// @notice Emitted when a pool is created /// @param token0 The first token of the pool by address sort order /// @param token1 The second token of the pool by address sort order /// @param fee The fee collected upon every swap in the pool, denominated in hundredths of a bip /// @param tickSpacing The minimum number of ticks between initialized ticks /// @param pool The address of the created pool event PoolCreated( address indexed token0, address indexed token1, uint24 indexed fee, int24 tickSpacing, address pool ); /// @notice Emitted when a new fee amount is enabled for pool creation via the factory /// @param fee The enabled fee, denominated in hundredths of a bip /// @param tickSpacing The minimum number of ticks between initialized ticks for pools created with the given fee event FeeAmountEnabled(uint24 indexed fee, int24 indexed tickSpacing); /// @notice Returns the current owner of the factory /// @dev Can be changed by the current owner via setOwner /// @return The address of the factory owner function owner() external view returns (address); /// @notice Returns the tick spacing for a given fee amount, if enabled, or 0 if not enabled /// @dev A fee amount can never be removed, so this value should be hard coded or cached in the calling context /// @param fee The enabled fee, denominated in hundredths of a bip. Returns 0 in case of unenabled fee /// @return The tick spacing function feeAmountTickSpacing(uint24 fee) external view returns (int24); /// @notice Returns the pool address for a given pair of tokens and a fee, or address 0 if it does not exist /// @dev tokenA and tokenB may be passed in either token0/token1 or token1/token0 order /// @param tokenA The contract address of either token0 or token1 /// @param tokenB The contract address of the other token /// @param fee The fee collected upon every swap in the pool, denominated in hundredths of a bip /// @return pool The pool address function getPool( address tokenA, address tokenB, uint24 fee ) external view returns (address pool); /// @notice Creates a pool for the given two tokens and fee /// @param tokenA One of the two tokens in the desired pool /// @param tokenB The other of the two tokens in the desired pool /// @param fee The desired fee for the pool /// @dev tokenA and tokenB may be passed in either order: token0/token1 or token1/token0. tickSpacing is retrieved /// from the fee. The call will revert if the pool already exists, the fee is invalid, or the token arguments /// are invalid. /// @return pool The address of the newly created pool function createPool( address tokenA, address tokenB, uint24 fee ) external returns (address pool); /// @notice Updates the owner of the factory /// @dev Must be called by the current owner /// @param _owner The new owner of the factory function setOwner(address _owner) external; /// @notice Enables a fee amount with the given tickSpacing /// @dev Fee amounts may never be removed once enabled /// @param fee The fee amount to enable, denominated in hundredths of a bip (i.e. 1e-6) /// @param tickSpacing The spacing between ticks to be enforced for all pools created with the given fee amount function enableFeeAmount(uint24 fee, int24 tickSpacing) external; }
/** * @title ERC20Relayer * @author [email protected] * @notice ERC741 token standard, ERC20 & ERC721 synthetic token standard. * Because it follows the logical rules of how it inherently works, it can take advantage of existing indexers. * email: [email protected] * website: https://erc-hub.com * github: https://github.com/erc-hub/ERC741 * twitter: https://twitter.com/ERC_Hub * telegram: https://t.me/ERC_Hub */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.21; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"; import "./ISemiFungibleERC741.sol"; contract ERC20Relayer is IERC20, IERC20Metadata, Context { ISemiFungibleERC741 public erc741; modifier onlyNFT() { require( _msgSender() == address(erc741), "onlyNFT can call this function" ); _; } constructor() { erc741 = ISemiFungibleERC741(_msgSender()); } function name() external view override returns (string memory) { return erc741.name(); } function symbol() external view override returns (string memory) { return erc741.symbol(); } function decimals() external view override returns (uint8) { return erc741._decimals(); } function totalSupply() external view override returns (uint256) { return erc741._erc20Supply(); } function balanceOf( address account ) external view override returns (uint256) { return erc741.balanceOfERC20(account); } function transfer( address to, uint256 amount ) external override returns (bool) { bool status = erc741.transferERC20(_msgSender(), to, amount); emit Transfer(_msgSender(), to, amount); return status; } function allowance( address owner, address spender ) external view override returns (uint256) { return erc741.allowance(owner, spender); } function approve( address spender, uint256 amount ) external override returns (bool) { bool status = erc741.approveERC20(_msgSender(), spender, amount); emit Approval(_msgSender(), spender, amount); return status; } function transferFrom( address from, address to, uint256 amount ) external override returns (bool) { bool status = erc741.transferFromERC20(_msgSender(), from, to, amount); emit Transfer(from, to, amount); return status; } function emitTransfer( address from, address to, uint256 amount ) external onlyNFT { emit Transfer(from, to, amount); } }
//SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.21; abstract contract ERC721Receiver { function onERC721Received( address, address, uint256, bytes calldata ) external virtual returns (bytes4) { return ERC721Receiver.onERC721Received.selector; } }
//SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.21; interface ISemiFungibleERC741 { function allowance(address, address) external view returns (uint256); function approve( address spender, uint256 amountOrId ) external returns (bool); function balanceOf(address) external view returns (uint256); function balanceOfERC20(address) external view returns (uint256); function baseTokenURI() external view returns (string memory); function _decimals() external view returns (uint8); function erc721totalSupply() external view returns (uint256); function getApproved(uint256) external view returns (address); function getBurnedToken() external view returns (uint256[] memory); function isApprovedForAll(address, address) external view returns (bool); function maxMintedId() external view returns (uint256); function name() external view returns (string memory); function owner() external view returns (address); function ownerOf(uint256 id) external view returns (address owner); function renounceOwnership() external; function safeTransferFrom(address from, address to, uint256 id) external; function safeTransferFrom( address from, address to, uint256 id, bytes memory data ) external; function setApprovalForAll(address operator, bool approved) external; function setTokenURI(string memory _tokenURI) external; function setWhitelist(address target, bool state) external; function symbol() external view returns (string memory); function tokenIdPool(uint256) external view returns (uint256); function tokenURI(uint256 id) external returns (string memory); function _erc20Supply() external view returns (uint256); function transfer(address to, uint256 amount) external returns (bool); function transferFrom( address from, address to, uint256 amountOrId ) external; function transferOwnership(address newOwner) external; function whitelist(address) external view returns (bool); function transferERC20( address sender, address to, uint256 amount ) external returns (bool); function transferFromERC20( address sender, address from, address to, uint256 amount ) external returns (bool); function approveERC20( address sender, address spender, uint256 amountOrId ) external returns (bool); }
/** * @title SemiFungibleERC741 * @author [email protected] * @notice ERC741 token standard, ERC20 & ERC721 synthetic token standard. * Because it follows the logical rules of how it inherently works, it can take advantage of existing indexers. * email: [email protected] * github: https://github.com/erc-hub/ERC741 */ //SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.21; import {Strings} from "@openzeppelin/contracts/utils/Strings.sol"; import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; import {ERC721Receiver} from "./ERC721Receiver.sol"; import {ERC20Relayer} from "./ERC20Relayer.sol"; abstract contract SemiFungibleERC741 is Ownable { event Approval( address indexed owner, address indexed spender, uint256 amount ); event Transfer( address indexed from, address indexed to, uint256 indexed id ); event ApprovalForAll( address indexed owner, address indexed operator, bool approved ); // Errors error TokenNotFound(); error AlreadyExists(); error InvalidRecipient(); error InvalidSender(); error UnsafeRecipient(); error InvalidId(); error IdNotAssigned(); error PoolIsEmpty(); error InvalidSetWhitelistCondition(); error Unauthorized(); error InvalidOwner(); // Metadata /// @dev Token name string public name; /// @dev Token symbol string public symbol; /// @dev Decimals for fractional representation uint8 public immutable _decimals = 18; /// @dev Total supply in fractionalized representation uint256 public immutable _erc20Supply; /// NFT Metadata /// @dev Base URI for token metadata string public baseTokenURI; /// max supply of native tokens uint256 public erc721totalSupply; /// @dev Array of available ids uint256[] public tokenIdPool; /// @dev Current mint counter, monotonically increasing to ensure accurate ownership uint256 public maxMintedId; /// @dev erc20 relayer contract interface ERC20Relayer public erc20Relayer; // Mappings /// @dev Mapping to check if id is assigned mapping(uint256 => bool) private idAssigned; /// @dev Balance of user in fractional representation mapping(address => uint256) public _balance; /// @dev Allowance of user in fractional representation mapping(address => mapping(address => uint256)) public allowance; /// @dev Approval in native representaion mapping(uint256 => address) public getApproved; /// @dev Approval for all in native representation mapping(address => mapping(address => bool)) public isApprovedForAll; /// @dev Owner of id in native representation mapping(uint256 => address) internal _ownerOf; /// @dev Array of owned ids in native representation mapping(address => uint256[]) internal _owned; /// @dev Tracks indices for the _owned mapping mapping(uint256 => uint256) internal _ownedIndex; /// @dev Addresses ignoreNFT from minting / burning for gas savings (pairs, routers, etc) mapping(address => bool) public excludeNFT; modifier onlyRelayer() { if (_msgSender() != address(erc20Relayer)) { revert Unauthorized(); } _; } // Constructor constructor(string memory _name, string memory _symbol) { name = _name; symbol = _symbol; erc20Relayer = new ERC20Relayer(); } function totalSupply() public view returns (uint256) { return erc721totalSupply; } /// @notice Initialization function to set pairs / etc /// saving gas by avoiding mint / burn on unnecessary targets function setExcludeNFT(address target, bool state) public onlyOwner { /// only can set whitelist when target has no balance if (_balance[target] > 0) { revert InvalidSetWhitelistCondition(); } excludeNFT[target] = state; } /// @notice Function to find owner of a given native token function ownerOf(uint256 id) public view returns (address owner) { owner = _ownerOf[id]; if (owner == address(0)) { revert TokenNotFound(); } } function setTokenURI(string memory _tokenURI) public onlyOwner { baseTokenURI = _tokenURI; } function tokenURI(uint256 id) public virtual returns (string memory) { if (id >= erc721totalSupply || id <= 0) { revert InvalidId(); } return string.concat(baseTokenURI, Strings.toString(id)); } /// @notice Function for token approvals /// @dev This function assumes id / native if amount less than or equal to current max id function approve(address spender, uint256 tokenId) public returns (bool) { address owner = _ownerOf[tokenId]; if (_msgSender() != owner && !isApprovedForAll[owner][_msgSender()]) { revert Unauthorized(); } getApproved[tokenId] = spender; emit Approval(owner, spender, tokenId); return true; } /// @notice Function native approvals function setApprovalForAll(address operator, bool approved) public { isApprovedForAll[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); } /// @notice Function for mixed transfers /// @dev This function assumes id / native if amount less than or equal to current max id function transferFrom(address from, address to, uint256 tokenId) public { if (from != _ownerOf[tokenId]) { revert InvalidSender(); } if (to == address(0)) { revert InvalidRecipient(); } if ( _msgSender() != from && !isApprovedForAll[from][_msgSender()] && _msgSender() != getApproved[tokenId] ) { revert Unauthorized(); } _balance[from] -= _getUnit(); unchecked { _balance[to] += _getUnit(); } _ownerOf[tokenId] = to; delete getApproved[tokenId]; // update _owned for sender uint256 updatedId = _owned[from][_owned[from].length - 1]; _owned[from][_ownedIndex[tokenId]] = updatedId; // pop _owned[from].pop(); // update index for the moved id _ownedIndex[updatedId] = _ownedIndex[tokenId]; // push token to to owned _owned[to].push(tokenId); // update index for to owned _ownedIndex[tokenId] = _owned[to].length - 1; erc20Relayer.emitTransfer(from, to, _getUnit()); emit Transfer(from, to, tokenId); } /// @notice Function for native transfers with contract support and callback data function safeTransferFrom( address from, address to, uint256 id, bytes calldata data ) public { transferFrom(from, to, id); if ( to.code.length != 0 && ERC721Receiver(to).onERC721Received(_msgSender(), from, id, data) != ERC721Receiver.onERC721Received.selector ) { revert UnsafeRecipient(); } } /// @notice Internal function for fractional transfers function _transfer( address from, address to, uint256 amount ) internal returns (bool) { uint256 unit = _getUnit(); uint256 balanceBeforeSender = _balance[from]; uint256 balanceBeforeReceiver = _balance[to]; _balance[from] -= amount; unchecked { _balance[to] += amount; } // Skip burn for certain addresses to save gas if (!excludeNFT[from]) { uint256 tokens_to_burn = (balanceBeforeSender / unit) - (_balance[from] / unit); for (uint256 i = 0; i < tokens_to_burn; i++) { _burn(from); } } // Skip minting for certain addresses to save gas if (!excludeNFT[to]) { uint256 tokens_to_mint = (_balance[to] / unit) - (balanceBeforeReceiver / unit); for (uint256 i = 0; i < tokens_to_mint; i++) { _mint(to); } } return true; } function balanceOf(address account) public view returns (uint256) { return _balance[account] / _getUnit(); } // Internal utility logic function _getUnit() internal pure returns (uint256) { return 10 ** _decimals; } function _getIdFromPool() private returns (uint256) { if (tokenIdPool.length == 0) { revert PoolIsEmpty(); } uint256 randomIndex = uint256( keccak256( abi.encodePacked( block.timestamp, _msgSender(), tokenIdPool.length ) ) ) % tokenIdPool.length; uint256 id = tokenIdPool[randomIndex]; tokenIdPool[randomIndex] = tokenIdPool[tokenIdPool.length - 1]; tokenIdPool.pop(); idAssigned[id] = true; return id; } function _returnIdToPool(uint256 id) private { if (!idAssigned[id]) { revert IdNotAssigned(); } tokenIdPool.push(id); idAssigned[id] = false; } function _mint(address to) internal { if (to == address(0)) { revert InvalidRecipient(); } uint256 id; if (maxMintedId < erc721totalSupply) { maxMintedId++; id = maxMintedId; idAssigned[id] = true; } else if (tokenIdPool.length > 0) { id = _getIdFromPool(); } else { revert PoolIsEmpty(); } _ownerOf[id] = to; _owned[to].push(id); _ownedIndex[id] = _owned[to].length - 1; emit Transfer(address(0), to, id); } function _burn(address from) internal { if (from == address(0)) { revert InvalidSender(); } uint256 id = _owned[from][_owned[from].length - 1]; _returnIdToPool(id); _owned[from].pop(); delete _ownedIndex[id]; delete _ownerOf[id]; delete getApproved[id]; emit Transfer(from, address(0), id); } /// @notice Function for native transfers with contract support function safeTransferFrom(address from, address to, uint256 id) public { transferFrom(from, to, id); if ( to.code.length != 0 && ERC721Receiver(to).onERC721Received(_msgSender(), from, id, "") != ERC721Receiver.onERC721Received.selector ) { revert UnsafeRecipient(); } } function tokenOfOwnerByIndex( address owner, uint256 index ) public view returns (uint256) { return _owned[owner][index]; } /// @notice Function for ERC20 transfers, only callable by the ERC20Relayer function transferERC20( address sender, address to, uint256 amount ) external onlyRelayer returns (bool) { return _transfer(sender, to, amount); } /// @notice Function for ERC20 balance, only callable by the ERC20Relayer function balanceOfERC20(address account) public view returns (uint256) { return _balance[account]; } /// @notice Function for ERC20 allowance, only callable by the ERC20Relayer function transferFromERC20( address sender, address from, address to, uint256 amount ) external onlyRelayer returns (bool) { uint256 allowed = allowance[from][sender]; if (allowed != type(uint256).max) allowance[from][sender] = allowed - amount; return _transfer(from, to, amount); } /// @notice Function for ERC20 approval, only callable by the ERC20Relayer function approveERC20( address sender, address spender, uint256 amount ) external onlyRelayer returns (bool) { allowance[sender][spender] = amount; return true; } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AlreadyExists","type":"error"},{"inputs":[],"name":"IdNotAssigned","type":"error"},{"inputs":[],"name":"InvalidId","type":"error"},{"inputs":[],"name":"InvalidOwner","type":"error"},{"inputs":[],"name":"InvalidRecipient","type":"error"},{"inputs":[],"name":"InvalidSender","type":"error"},{"inputs":[],"name":"InvalidSetWhitelistCondition","type":"error"},{"inputs":[],"name":"PoolIsEmpty","type":"error"},{"inputs":[],"name":"TokenNotFound","type":"error"},{"inputs":[],"name":"Unauthorized","type":"error"},{"inputs":[],"name":"UnsafeRecipient","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":"amount","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","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":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"_balance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_erc20Supply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approveERC20","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOfERC20","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseTokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"erc20Relayer","outputs":[{"internalType":"contract ERC20Relayer","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"erc721totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"excludeNFT","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxMintedId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"owner","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bool","name":"state","type":"bool"}],"name":"setExcludeNFT","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"status","type":"bool"}],"name":"setExcludeNFTPublic","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_tokenURI","type":"string"}],"name":"setTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenIdPool","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferERC20","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":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFromERC20","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
60c0604052601260805234801562000015575f80fd5b506040518060400160405280600681526020016545524337343160d01b81525060405180604001604052806003815260200162242aa160e91b8152506200006b620000656200027c60201b60201c565b62000280565b60016200007983826200037d565b5060026200008882826200037d565b506040516200009790620002cf565b604051809103905ff080158015620000b1573d5f803e3d5ffd5b50600780546001600160a01b0319166001600160a01b0392909216919091179055505069010f0cf064dd5920000060a081905261138860045560095f620000f53390565b6001600160a01b0316815260208101919091526040015f205573c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2466005819003620001465773b4fbf271143f4fbf7b91a5ded31805e42b2208d691505b60405163a167129560e01b81526001600160a01b038316600482015230602482015261271060448201525f90731f98431c8ad98523631ae4a59f267346ea31f9849063a1671295906064016020604051808303815f875af1158015620001ae573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190620001d4919062000445565b335f818152601060205260408082208054600160ff1991821681179092556001600160a01b0386811685528385208054909216909217905560075460a05183516323de665160e01b81526004810186905260248101969096526044860152915194955016926323de665192606480820193929182900301818387803b1580156200025c575f80fd5b505af11580156200026f573d5f803e3d5ffd5b5050505050505062000474565b3390565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b610a1f806200234483390190565b634e487b7160e01b5f52604160045260245ffd5b600181811c908216806200030657607f821691505b6020821081036200032557634e487b7160e01b5f52602260045260245ffd5b50919050565b601f82111562000378575f81815260208120601f850160051c81016020861015620003535750805b601f850160051c820191505b8181101562000374578281556001016200035f565b5050505b505050565b81516001600160401b03811115620003995762000399620002dd565b620003b181620003aa8454620002f1565b846200032b565b602080601f831160018114620003e7575f8415620003cf5750858301515b5f19600386901b1c1916600185901b17855562000374565b5f85815260208120601f198616915b828110156200041757888601518255948401946001909101908401620003f6565b50858210156200043557878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b5f6020828403121562000456575f80fd5b81516001600160a01b03811681146200046d575f80fd5b9392505050565b60805160a051611ea76200049d5f395f61034901525f81816102ea0152610fe80152611ea75ff3fe608060405234801561000f575f80fd5b50600436106101fd575f3560e01c806395d89b4111610114578063d3aceae2116100a9578063dd71105d11610079578063dd71105d146104be578063e0df5b6f146104d1578063e985e9c5146104e4578063f2fde38b14610511578063fd1feeb714610524575f80fd5b8063d3aceae214610445578063d547cfb714610464578063d93db24f1461046c578063dd62ed3e14610494575f80fd5b8063b88d4fde116100e4578063b88d4fde146103f9578063c87b56dd1461040c578063ca4c0e091461041f578063cd9f897714610432575f80fd5b806395d89b41146103b85780639db5dbe4146103c0578063a22cb465146103d3578063a8e5e4aa146103e6575f80fd5b80632f745c59116101955780636d502f52116101655780636d502f52146103445780636e452da51461036b57806370a082311461038d578063715018a6146103a05780638da5cb5b146103a8575f80fd5b80632f745c59146102d257806332424aa3146102e557806342842e0e1461031e5780636352211e14610331575f80fd5b80630d4e1ab4116101d05780630d4e1ab41461029957806318160ddd146102ae57806323b872dd146102b65780632c88797e146102c9575f80fd5b806306fdde031461020157806307c560011461021f578063081812fc14610236578063095ea7b314610276575b5f80fd5b610209610537565b60405161021691906117aa565b60405180910390f35b61022860065481565b604051908152602001610216565b61025e6102443660046117dc565b600b6020525f90815260409020546001600160a01b031681565b6040516001600160a01b039091168152602001610216565b610289610284366004611809565b6105c3565b6040519015158152602001610216565b6102ac6102a7366004611840565b610698565b005b600454610228565b6102ac6102c4366004611860565b6106e4565b61022860045481565b6102286102e0366004611809565b610a29565b61030c7f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff9091168152602001610216565b6102ac61032c366004611860565b610a63565b61025e61033f3660046117dc565b610b4d565b6102287f000000000000000000000000000000000000000000000000000000000000000081565b610289610379366004611899565b60106020525f908152604090205460ff1681565b61022861039b366004611899565b610b87565b6102ac610bb2565b5f546001600160a01b031661025e565b610209610bc5565b6102896103ce366004611860565b610bd2565b6102ac6103e13660046118b2565b610c1a565b6102896103f4366004611860565b610c85565b6102ac6104073660046118e3565b610ce9565b61020961041a3660046117dc565b610db0565b61022861042d3660046117dc565b610e11565b60075461025e906001600160a01b031681565b610228610453366004611899565b60096020525f908152604090205481565b610209610e30565b61022861047a366004611899565b6001600160a01b03165f9081526009602052604090205490565b6102286104a2366004611976565b600a60209081525f928352604080842090915290825290205481565b6102896104cc36600461199e565b610e3d565b6102ac6104df3660046119fa565b610ee4565b6102896104f2366004611976565b600c60209081525f928352604080842090915290825290205460ff1681565b6102ac61051f366004611899565b610efc565b6102ac6105323660046118b2565b610f7a565b6001805461054490611aa5565b80601f016020809104026020016040519081016040528092919081815260200182805461057090611aa5565b80156105bb5780601f10610592576101008083540402835291602001916105bb565b820191905f5260205f20905b81548152906001019060200180831161059e57829003601f168201915b505050505081565b5f818152600d60205260408120546001600160a01b031633811480159061060d57506001600160a01b0381165f908152600c6020908152604080832033845290915290205460ff16155b1561062a576040516282b42960e81b815260040160405180910390fd5b5f838152600b602090815260409182902080546001600160a01b0319166001600160a01b038881169182179092559251868152908416917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a360019150505b92915050565b335f90815260096020526040902054156106c557604051632f57ef6960e01b815260040160405180910390fd5b335f908152601060205260409020805460ff1916911515919091179055565b5f818152600d60205260409020546001600160a01b0384811691161461071d57604051636edaef2f60e11b815260040160405180910390fd5b6001600160a01b03821661074457604051634e46966960e11b815260040160405180910390fd5b336001600160a01b0384161480159061078057506001600160a01b0383165f908152600c6020908152604080832033845290915290205460ff16155b80156107ab57505f818152600b60205260409020546001600160a01b0316336001600160a01b031614155b156107c8576040516282b42960e81b815260040160405180910390fd5b6107d0610fe2565b6001600160a01b0384165f90815260096020526040812080549091906107f7908490611af1565b909155506108059050610fe2565b6001600160a01b038084165f8181526009602090815260408083208054909601909555858252600d815284822080546001600160a01b03199081169094179055600b815284822080549093169092559186168252600e9052908120805461086e90600190611af1565b8154811061087e5761087e611b04565b5f9182526020808320909101546001600160a01b0387168352600e82526040808420868552600f909352909220548154929350839281106108c1576108c1611b04565b5f9182526020808320909101929092556001600160a01b0386168152600e909152604090208054806108f5576108f5611b18565b5f828152602080822083015f19908101839055909201909255838252600f8152604080832054848452818420556001600160a01b038616808452600e835290832080546001818101835582865293852001869055925290546109579190611af1565b5f838152600f60205260409020556007546001600160a01b03166323de66518585610980610fe2565b6040516001600160e01b031960e086901b1681526001600160a01b03938416600482015292909116602483015260448201526064015f604051808303815f87803b1580156109cc575f80fd5b505af11580156109de573d5f803e3d5ffd5b5050505081836001600160a01b0316856001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a450505050565b6001600160a01b0382165f908152600e60205260408120805483908110610a5257610a52611b04565b905f5260205f200154905092915050565b610a6e8383836106e4565b6001600160a01b0382163b15801590610b2a5750630a85bd0160e11b6001600160a01b03831663150b7a02336040516001600160e01b031960e084901b1681526001600160a01b039182166004820152908716602482015260448101859052608060648201525f608482015260a4016020604051808303815f875af1158015610af9573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b1d9190611b2c565b6001600160e01b03191614155b15610b4857604051633da6393160e01b815260040160405180910390fd5b505050565b5f818152600d60205260409020546001600160a01b031680610b8257604051630cbdb7b360e41b815260040160405180910390fd5b919050565b5f610b90610fe2565b6001600160a01b0383165f908152600960205260409020546106929190611b67565b610bba611013565b610bc35f61106c565b565b6002805461054490611aa5565b6007545f906001600160a01b0316336001600160a01b031614610c07576040516282b42960e81b815260040160405180910390fd5b610c128484846110bb565b949350505050565b335f818152600c602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6007545f906001600160a01b0316336001600160a01b031614610cba576040516282b42960e81b815260040160405180910390fd5b506001600160a01b039283165f908152600a602090815260408083209490951682529290925291902055600190565b610cf48585856106e4565b6001600160a01b0384163b15801590610d8b5750604051630a85bd0160e11b808252906001600160a01b0386169063150b7a0290610d3e9033908a90899089908990600401611b7a565b6020604051808303815f875af1158015610d5a573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610d7e9190611b2c565b6001600160e01b03191614155b15610da957604051633da6393160e01b815260040160405180910390fd5b5050505050565b606060045482101580610dc1575081155b15610ddf57604051631bf4348160e31b815260040160405180910390fd5b6003610dea83611227565b604051602001610dfb929190611bcc565b6040516020818303038152906040529050919050565b60058181548110610e20575f80fd5b5f91825260209091200154905081565b6003805461054490611aa5565b6007545f906001600160a01b0316336001600160a01b031614610e72576040516282b42960e81b815260040160405180910390fd5b6001600160a01b038085165f908152600a60209081526040808320938916835292905220545f198114610ecf57610ea98382611af1565b6001600160a01b038087165f908152600a60209081526040808320938b16835292905220555b610eda8585856110bb565b9695505050505050565b610eec611013565b6003610ef88282611c9c565b5050565b610f04611013565b6001600160a01b038116610f6e5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b610f778161106c565b50565b610f82611013565b6001600160a01b0382165f9081526009602052604090205415610fb857604051632f57ef6960e01b815260040160405180910390fd5b6001600160a01b03919091165f908152601060205260409020805460ff1916911515919091179055565b5f61100e7f0000000000000000000000000000000000000000000000000000000000000000600a611e38565b905090565b5f546001600160a01b03163314610bc35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610f65565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b5f806110c5610fe2565b6001600160a01b038087165f818152600960205260408082208054948a16835290822054928252939450919290918691906111008386611af1565b90915550506001600160a01b038087165f90815260096020908152604080832080548a019055928a16825260109052205460ff16611199576001600160a01b0387165f9081526009602052604081205461115b908590611b67565b6111658585611b67565b61116f9190611af1565b90505f5b8181101561119657611184896112b7565b8061118e81611e46565b915050611173565b50505b6001600160a01b0386165f9081526010602052604090205460ff1661121a575f6111c38483611b67565b6001600160a01b0388165f908152600960205260409020546111e6908690611b67565b6111f09190611af1565b90505f5b8181101561121757611205886113d5565b8061120f81611e46565b9150506111f4565b50505b5060019695505050505050565b60605f61123383611510565b60010190505f8167ffffffffffffffff811115611252576112526119e6565b6040519080825280601f01601f19166020018201604052801561127c576020820181803683370190505b5090508181016020015b5f19016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508461128657509392505050565b6001600160a01b0381166112de57604051636edaef2f60e11b815260040160405180910390fd5b6001600160a01b0381165f908152600e60205260408120805461130390600190611af1565b8154811061131357611313611b04565b905f5260205f2001549050611327816115e7565b6001600160a01b0382165f908152600e6020526040902080548061134d5761134d611b18565b5f828152602080822083015f19908101839055909201909255828252600f81526040808320839055600d825280832080546001600160a01b0319908116909155600b9092528083208054909216909155518291906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6001600160a01b0381166113fc57604051634e46966960e11b815260040160405180910390fd5b5f600454600654101561143f5760068054905f61141883611e46565b90915550506006545f818152600860205260409020805460ff19166001179055905061146f565b600554156114565761144f61165c565b905061146f565b60405163ed4421ad60e01b815260040160405180910390fd5b5f818152600d6020908152604080832080546001600160a01b0319166001600160a01b038716908117909155808452600e835290832080546001818101835582865293852001859055925290546114c69190611af1565b5f828152600f602052604080822092909255905182916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b5f8072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b831061154e5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef8100000000831061157a576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061159857662386f26fc10000830492506010015b6305f5e10083106115b0576305f5e100830492506008015b61271083106115c457612710830492506004015b606483106115d6576064830492506002015b600a83106106925760010192915050565b5f8181526008602052604090205460ff16611615576040516335c0139560e21b815260040160405180910390fd5b60058054600181019091557f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db0018190555f908152600860205260409020805460ff19169055565b6005545f9081036116805760405163ed4421ad60e01b815260040160405180910390fd5b600554604080514260208201526bffffffffffffffffffffffff193360601b1691810191909152605481018290525f9190607401604051602081830303815290604052805190602001205f1c6116d69190611e5e565b90505f600582815481106116ec576116ec611b04565b905f5260205f20015490506005600160058054905061170b9190611af1565b8154811061171b5761171b611b04565b905f5260205f2001546005838154811061173757611737611b04565b5f91825260209091200155600580548061175357611753611b18565b5f828152602080822083015f199081018390559092019092558282526008905260409020805460ff1916600117905592915050565b5f5b838110156117a257818101518382015260200161178a565b50505f910152565b602081525f82518060208401526117c8816040850160208701611788565b601f01601f19169190910160400192915050565b5f602082840312156117ec575f80fd5b5035919050565b80356001600160a01b0381168114610b82575f80fd5b5f806040838503121561181a575f80fd5b611823836117f3565b946020939093013593505050565b80358015158114610b82575f80fd5b5f60208284031215611850575f80fd5b61185982611831565b9392505050565b5f805f60608486031215611872575f80fd5b61187b846117f3565b9250611889602085016117f3565b9150604084013590509250925092565b5f602082840312156118a9575f80fd5b611859826117f3565b5f80604083850312156118c3575f80fd5b6118cc836117f3565b91506118da60208401611831565b90509250929050565b5f805f805f608086880312156118f7575f80fd5b611900866117f3565b945061190e602087016117f3565b935060408601359250606086013567ffffffffffffffff80821115611931575f80fd5b818801915088601f830112611944575f80fd5b813581811115611952575f80fd5b896020828501011115611963575f80fd5b9699959850939650602001949392505050565b5f8060408385031215611987575f80fd5b611990836117f3565b91506118da602084016117f3565b5f805f80608085870312156119b1575f80fd5b6119ba856117f3565b93506119c8602086016117f3565b92506119d6604086016117f3565b9396929550929360600135925050565b634e487b7160e01b5f52604160045260245ffd5b5f60208284031215611a0a575f80fd5b813567ffffffffffffffff80821115611a21575f80fd5b818401915084601f830112611a34575f80fd5b813581811115611a4657611a466119e6565b604051601f8201601f19908116603f01168101908382118183101715611a6e57611a6e6119e6565b81604052828152876020848701011115611a86575f80fd5b826020860160208301375f928101602001929092525095945050505050565b600181811c90821680611ab957607f821691505b602082108103611ad757634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52601160045260245ffd5b8181038181111561069257610692611add565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52603160045260245ffd5b5f60208284031215611b3c575f80fd5b81516001600160e01b031981168114611859575f80fd5b634e487b7160e01b5f52601260045260245ffd5b5f82611b7557611b75611b53565b500490565b6001600160a01b038681168252851660208201526040810184905260806060820181905281018290525f828460a08401375f60a0848401015260a0601f19601f85011683010190509695505050505050565b5f808454611bd981611aa5565b60018281168015611bf15760018114611c0657611c32565b60ff1984168752821515830287019450611c32565b885f526020805f205f5b85811015611c295781548a820152908401908201611c10565b50505082870194505b505050508351611c46818360208801611788565b01949350505050565b601f821115610b48575f81815260208120601f850160051c81016020861015611c755750805b601f850160051c820191505b81811015611c9457828155600101611c81565b505050505050565b815167ffffffffffffffff811115611cb657611cb66119e6565b611cca81611cc48454611aa5565b84611c4f565b602080601f831160018114611cfd575f8415611ce65750858301515b5f19600386901b1c1916600185901b178555611c94565b5f85815260208120601f198616915b82811015611d2b57888601518255948401946001909101908401611d0c565b5085821015611d4857878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b600181815b80851115611d9257815f1904821115611d7857611d78611add565b80851615611d8557918102915b93841c9390800290611d5d565b509250929050565b5f82611da857506001610692565b81611db457505f610692565b8160018114611dca5760028114611dd457611df0565b6001915050610692565b60ff841115611de557611de5611add565b50506001821b610692565b5060208310610133831016604e8410600b8410161715611e13575081810a610692565b611e1d8383611d58565b805f1904821115611e3057611e30611add565b029392505050565b5f61185960ff841683611d9a565b5f60018201611e5757611e57611add565b5060010190565b5f82611e6c57611e6c611b53565b50069056fea26469706673582212209599ee3e092ee78eeef2c794fb558a27c288ceb64a9048d0ddada6ee3effdcb164736f6c63430008150033608060405234801561000f575f80fd5b505f80546001600160a01b031916331781556109ef90819061003090395ff3fe608060405234801561000f575f80fd5b50600436106100a6575f3560e01c8063313ce5671161006e578063313ce5671461012957806370a082311461014357806395d89b4114610156578063a9059cbb1461015e578063dd62ed3e14610171578063f798bb0014610184575f80fd5b806306fdde03146100aa578063095ea7b3146100c857806318160ddd146100eb57806323b872dd1461010157806323de665114610114575b5f80fd5b6100b26101ae565b6040516100bf91906107af565b60405180910390f35b6100db6100d63660046107fc565b610220565b60405190151581526020016100bf565b6100f3610300565b6040519081526020016100bf565b6100db61010f366004610824565b610374565b610127610122366004610824565b61045d565b005b610131610515565b60405160ff90911681526020016100bf565b6100f361015136600461085d565b610589565b6100b26105fb565b6100db61016c3660046107fc565b610641565b6100f361017f366004610876565b610712565b5f54610196906001600160a01b031681565b6040516001600160a01b0390911681526020016100bf565b5f8054604080516306fdde0360e01b815290516060936001600160a01b03909316926306fdde0392600480820193918290030181865afa1580156101f4573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261021b91908101906108bb565b905090565b5f805481906001600160a01b031663a8e5e4aa336040516001600160e01b031960e084901b1681526001600160a01b0391821660048201529087166024820152604481018690526064016020604051808303815f875af1158015610286573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906102aa9190610963565b90506001600160a01b038416336001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925856040516102f191815260200190565b60405180910390a39392505050565b5f805f9054906101000a90046001600160a01b03166001600160a01b0316636d502f526040518163ffffffff1660e01b8152600401602060405180830381865afa158015610350573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061021b9190610982565b5f805481906001600160a01b031663dd71105d336040516001600160e01b031960e084901b1681526001600160a01b03918216600482015281891660248201529087166044820152606481018690526084016020604051808303815f875af11580156103e2573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104069190610963565b9050836001600160a01b0316856001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161044d91815260200190565b60405180910390a3949350505050565b5f546001600160a01b0316336001600160a01b0316146104c35760405162461bcd60e51b815260206004820152601e60248201527f6f6e6c794e46542063616e2063616c6c20746869732066756e6374696f6e0000604482015260640160405180910390fd5b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161050891815260200190565b60405180910390a3505050565b5f805f9054906101000a90046001600160a01b03166001600160a01b03166332424aa36040518163ffffffff1660e01b8152600401602060405180830381865afa158015610565573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061021b9190610999565b5f805460405163d93db24f60e01b81526001600160a01b0384811660048301529091169063d93db24f90602401602060405180830381865afa1580156105d1573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105f59190610982565b92915050565b5f8054604080516395d89b4160e01b815290516060936001600160a01b03909316926395d89b4192600480820193918290030181865afa1580156101f4573d5f803e3d5ffd5b5f805481906001600160a01b0316639db5dbe4336040516001600160e01b031960e084901b1681526001600160a01b0391821660048201529087166024820152604481018690526064016020604051808303815f875af11580156106a7573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106cb9190610963565b90506001600160a01b038416336001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516102f191815260200190565b5f8054604051636eb1769f60e11b81526001600160a01b03858116600483015284811660248301529091169063dd62ed3e90604401602060405180830381865afa158015610762573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107869190610982565b9392505050565b5f5b838110156107a757818101518382015260200161078f565b50505f910152565b602081525f82518060208401526107cd81604085016020870161078d565b601f01601f19169190910160400192915050565b80356001600160a01b03811681146107f7575f80fd5b919050565b5f806040838503121561080d575f80fd5b610816836107e1565b946020939093013593505050565b5f805f60608486031215610836575f80fd5b61083f846107e1565b925061084d602085016107e1565b9150604084013590509250925092565b5f6020828403121561086d575f80fd5b610786826107e1565b5f8060408385031215610887575f80fd5b610890836107e1565b915061089e602084016107e1565b90509250929050565b634e487b7160e01b5f52604160045260245ffd5b5f602082840312156108cb575f80fd5b815167ffffffffffffffff808211156108e2575f80fd5b818401915084601f8301126108f5575f80fd5b815181811115610907576109076108a7565b604051601f8201601f19908116603f0116810190838211818310171561092f5761092f6108a7565b81604052828152876020848701011115610947575f80fd5b61095883602083016020880161078d565b979650505050505050565b5f60208284031215610973575f80fd5b81518015158114610786575f80fd5b5f60208284031215610992575f80fd5b5051919050565b5f602082840312156109a9575f80fd5b815160ff81168114610786575f80fdfea264697066735822122014830b80c882d1b035d00eed9255a1de332d53484153aa0c6e3c76b627a0b06064736f6c63430008150033
Deployed Bytecode
0x608060405234801561000f575f80fd5b50600436106101fd575f3560e01c806395d89b4111610114578063d3aceae2116100a9578063dd71105d11610079578063dd71105d146104be578063e0df5b6f146104d1578063e985e9c5146104e4578063f2fde38b14610511578063fd1feeb714610524575f80fd5b8063d3aceae214610445578063d547cfb714610464578063d93db24f1461046c578063dd62ed3e14610494575f80fd5b8063b88d4fde116100e4578063b88d4fde146103f9578063c87b56dd1461040c578063ca4c0e091461041f578063cd9f897714610432575f80fd5b806395d89b41146103b85780639db5dbe4146103c0578063a22cb465146103d3578063a8e5e4aa146103e6575f80fd5b80632f745c59116101955780636d502f52116101655780636d502f52146103445780636e452da51461036b57806370a082311461038d578063715018a6146103a05780638da5cb5b146103a8575f80fd5b80632f745c59146102d257806332424aa3146102e557806342842e0e1461031e5780636352211e14610331575f80fd5b80630d4e1ab4116101d05780630d4e1ab41461029957806318160ddd146102ae57806323b872dd146102b65780632c88797e146102c9575f80fd5b806306fdde031461020157806307c560011461021f578063081812fc14610236578063095ea7b314610276575b5f80fd5b610209610537565b60405161021691906117aa565b60405180910390f35b61022860065481565b604051908152602001610216565b61025e6102443660046117dc565b600b6020525f90815260409020546001600160a01b031681565b6040516001600160a01b039091168152602001610216565b610289610284366004611809565b6105c3565b6040519015158152602001610216565b6102ac6102a7366004611840565b610698565b005b600454610228565b6102ac6102c4366004611860565b6106e4565b61022860045481565b6102286102e0366004611809565b610a29565b61030c7f000000000000000000000000000000000000000000000000000000000000001281565b60405160ff9091168152602001610216565b6102ac61032c366004611860565b610a63565b61025e61033f3660046117dc565b610b4d565b6102287f00000000000000000000000000000000000000000000010f0cf064dd5920000081565b610289610379366004611899565b60106020525f908152604090205460ff1681565b61022861039b366004611899565b610b87565b6102ac610bb2565b5f546001600160a01b031661025e565b610209610bc5565b6102896103ce366004611860565b610bd2565b6102ac6103e13660046118b2565b610c1a565b6102896103f4366004611860565b610c85565b6102ac6104073660046118e3565b610ce9565b61020961041a3660046117dc565b610db0565b61022861042d3660046117dc565b610e11565b60075461025e906001600160a01b031681565b610228610453366004611899565b60096020525f908152604090205481565b610209610e30565b61022861047a366004611899565b6001600160a01b03165f9081526009602052604090205490565b6102286104a2366004611976565b600a60209081525f928352604080842090915290825290205481565b6102896104cc36600461199e565b610e3d565b6102ac6104df3660046119fa565b610ee4565b6102896104f2366004611976565b600c60209081525f928352604080842090915290825290205460ff1681565b6102ac61051f366004611899565b610efc565b6102ac6105323660046118b2565b610f7a565b6001805461054490611aa5565b80601f016020809104026020016040519081016040528092919081815260200182805461057090611aa5565b80156105bb5780601f10610592576101008083540402835291602001916105bb565b820191905f5260205f20905b81548152906001019060200180831161059e57829003601f168201915b505050505081565b5f818152600d60205260408120546001600160a01b031633811480159061060d57506001600160a01b0381165f908152600c6020908152604080832033845290915290205460ff16155b1561062a576040516282b42960e81b815260040160405180910390fd5b5f838152600b602090815260409182902080546001600160a01b0319166001600160a01b038881169182179092559251868152908416917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a360019150505b92915050565b335f90815260096020526040902054156106c557604051632f57ef6960e01b815260040160405180910390fd5b335f908152601060205260409020805460ff1916911515919091179055565b5f818152600d60205260409020546001600160a01b0384811691161461071d57604051636edaef2f60e11b815260040160405180910390fd5b6001600160a01b03821661074457604051634e46966960e11b815260040160405180910390fd5b336001600160a01b0384161480159061078057506001600160a01b0383165f908152600c6020908152604080832033845290915290205460ff16155b80156107ab57505f818152600b60205260409020546001600160a01b0316336001600160a01b031614155b156107c8576040516282b42960e81b815260040160405180910390fd5b6107d0610fe2565b6001600160a01b0384165f90815260096020526040812080549091906107f7908490611af1565b909155506108059050610fe2565b6001600160a01b038084165f8181526009602090815260408083208054909601909555858252600d815284822080546001600160a01b03199081169094179055600b815284822080549093169092559186168252600e9052908120805461086e90600190611af1565b8154811061087e5761087e611b04565b5f9182526020808320909101546001600160a01b0387168352600e82526040808420868552600f909352909220548154929350839281106108c1576108c1611b04565b5f9182526020808320909101929092556001600160a01b0386168152600e909152604090208054806108f5576108f5611b18565b5f828152602080822083015f19908101839055909201909255838252600f8152604080832054848452818420556001600160a01b038616808452600e835290832080546001818101835582865293852001869055925290546109579190611af1565b5f838152600f60205260409020556007546001600160a01b03166323de66518585610980610fe2565b6040516001600160e01b031960e086901b1681526001600160a01b03938416600482015292909116602483015260448201526064015f604051808303815f87803b1580156109cc575f80fd5b505af11580156109de573d5f803e3d5ffd5b5050505081836001600160a01b0316856001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a450505050565b6001600160a01b0382165f908152600e60205260408120805483908110610a5257610a52611b04565b905f5260205f200154905092915050565b610a6e8383836106e4565b6001600160a01b0382163b15801590610b2a5750630a85bd0160e11b6001600160a01b03831663150b7a02336040516001600160e01b031960e084901b1681526001600160a01b039182166004820152908716602482015260448101859052608060648201525f608482015260a4016020604051808303815f875af1158015610af9573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b1d9190611b2c565b6001600160e01b03191614155b15610b4857604051633da6393160e01b815260040160405180910390fd5b505050565b5f818152600d60205260409020546001600160a01b031680610b8257604051630cbdb7b360e41b815260040160405180910390fd5b919050565b5f610b90610fe2565b6001600160a01b0383165f908152600960205260409020546106929190611b67565b610bba611013565b610bc35f61106c565b565b6002805461054490611aa5565b6007545f906001600160a01b0316336001600160a01b031614610c07576040516282b42960e81b815260040160405180910390fd5b610c128484846110bb565b949350505050565b335f818152600c602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6007545f906001600160a01b0316336001600160a01b031614610cba576040516282b42960e81b815260040160405180910390fd5b506001600160a01b039283165f908152600a602090815260408083209490951682529290925291902055600190565b610cf48585856106e4565b6001600160a01b0384163b15801590610d8b5750604051630a85bd0160e11b808252906001600160a01b0386169063150b7a0290610d3e9033908a90899089908990600401611b7a565b6020604051808303815f875af1158015610d5a573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610d7e9190611b2c565b6001600160e01b03191614155b15610da957604051633da6393160e01b815260040160405180910390fd5b5050505050565b606060045482101580610dc1575081155b15610ddf57604051631bf4348160e31b815260040160405180910390fd5b6003610dea83611227565b604051602001610dfb929190611bcc565b6040516020818303038152906040529050919050565b60058181548110610e20575f80fd5b5f91825260209091200154905081565b6003805461054490611aa5565b6007545f906001600160a01b0316336001600160a01b031614610e72576040516282b42960e81b815260040160405180910390fd5b6001600160a01b038085165f908152600a60209081526040808320938916835292905220545f198114610ecf57610ea98382611af1565b6001600160a01b038087165f908152600a60209081526040808320938b16835292905220555b610eda8585856110bb565b9695505050505050565b610eec611013565b6003610ef88282611c9c565b5050565b610f04611013565b6001600160a01b038116610f6e5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b610f778161106c565b50565b610f82611013565b6001600160a01b0382165f9081526009602052604090205415610fb857604051632f57ef6960e01b815260040160405180910390fd5b6001600160a01b03919091165f908152601060205260409020805460ff1916911515919091179055565b5f61100e7f0000000000000000000000000000000000000000000000000000000000000012600a611e38565b905090565b5f546001600160a01b03163314610bc35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610f65565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b5f806110c5610fe2565b6001600160a01b038087165f818152600960205260408082208054948a16835290822054928252939450919290918691906111008386611af1565b90915550506001600160a01b038087165f90815260096020908152604080832080548a019055928a16825260109052205460ff16611199576001600160a01b0387165f9081526009602052604081205461115b908590611b67565b6111658585611b67565b61116f9190611af1565b90505f5b8181101561119657611184896112b7565b8061118e81611e46565b915050611173565b50505b6001600160a01b0386165f9081526010602052604090205460ff1661121a575f6111c38483611b67565b6001600160a01b0388165f908152600960205260409020546111e6908690611b67565b6111f09190611af1565b90505f5b8181101561121757611205886113d5565b8061120f81611e46565b9150506111f4565b50505b5060019695505050505050565b60605f61123383611510565b60010190505f8167ffffffffffffffff811115611252576112526119e6565b6040519080825280601f01601f19166020018201604052801561127c576020820181803683370190505b5090508181016020015b5f19016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508461128657509392505050565b6001600160a01b0381166112de57604051636edaef2f60e11b815260040160405180910390fd5b6001600160a01b0381165f908152600e60205260408120805461130390600190611af1565b8154811061131357611313611b04565b905f5260205f2001549050611327816115e7565b6001600160a01b0382165f908152600e6020526040902080548061134d5761134d611b18565b5f828152602080822083015f19908101839055909201909255828252600f81526040808320839055600d825280832080546001600160a01b0319908116909155600b9092528083208054909216909155518291906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6001600160a01b0381166113fc57604051634e46966960e11b815260040160405180910390fd5b5f600454600654101561143f5760068054905f61141883611e46565b90915550506006545f818152600860205260409020805460ff19166001179055905061146f565b600554156114565761144f61165c565b905061146f565b60405163ed4421ad60e01b815260040160405180910390fd5b5f818152600d6020908152604080832080546001600160a01b0319166001600160a01b038716908117909155808452600e835290832080546001818101835582865293852001859055925290546114c69190611af1565b5f828152600f602052604080822092909255905182916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b5f8072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b831061154e5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef8100000000831061157a576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061159857662386f26fc10000830492506010015b6305f5e10083106115b0576305f5e100830492506008015b61271083106115c457612710830492506004015b606483106115d6576064830492506002015b600a83106106925760010192915050565b5f8181526008602052604090205460ff16611615576040516335c0139560e21b815260040160405180910390fd5b60058054600181019091557f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db0018190555f908152600860205260409020805460ff19169055565b6005545f9081036116805760405163ed4421ad60e01b815260040160405180910390fd5b600554604080514260208201526bffffffffffffffffffffffff193360601b1691810191909152605481018290525f9190607401604051602081830303815290604052805190602001205f1c6116d69190611e5e565b90505f600582815481106116ec576116ec611b04565b905f5260205f20015490506005600160058054905061170b9190611af1565b8154811061171b5761171b611b04565b905f5260205f2001546005838154811061173757611737611b04565b5f91825260209091200155600580548061175357611753611b18565b5f828152602080822083015f199081018390559092019092558282526008905260409020805460ff1916600117905592915050565b5f5b838110156117a257818101518382015260200161178a565b50505f910152565b602081525f82518060208401526117c8816040850160208701611788565b601f01601f19169190910160400192915050565b5f602082840312156117ec575f80fd5b5035919050565b80356001600160a01b0381168114610b82575f80fd5b5f806040838503121561181a575f80fd5b611823836117f3565b946020939093013593505050565b80358015158114610b82575f80fd5b5f60208284031215611850575f80fd5b61185982611831565b9392505050565b5f805f60608486031215611872575f80fd5b61187b846117f3565b9250611889602085016117f3565b9150604084013590509250925092565b5f602082840312156118a9575f80fd5b611859826117f3565b5f80604083850312156118c3575f80fd5b6118cc836117f3565b91506118da60208401611831565b90509250929050565b5f805f805f608086880312156118f7575f80fd5b611900866117f3565b945061190e602087016117f3565b935060408601359250606086013567ffffffffffffffff80821115611931575f80fd5b818801915088601f830112611944575f80fd5b813581811115611952575f80fd5b896020828501011115611963575f80fd5b9699959850939650602001949392505050565b5f8060408385031215611987575f80fd5b611990836117f3565b91506118da602084016117f3565b5f805f80608085870312156119b1575f80fd5b6119ba856117f3565b93506119c8602086016117f3565b92506119d6604086016117f3565b9396929550929360600135925050565b634e487b7160e01b5f52604160045260245ffd5b5f60208284031215611a0a575f80fd5b813567ffffffffffffffff80821115611a21575f80fd5b818401915084601f830112611a34575f80fd5b813581811115611a4657611a466119e6565b604051601f8201601f19908116603f01168101908382118183101715611a6e57611a6e6119e6565b81604052828152876020848701011115611a86575f80fd5b826020860160208301375f928101602001929092525095945050505050565b600181811c90821680611ab957607f821691505b602082108103611ad757634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52601160045260245ffd5b8181038181111561069257610692611add565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52603160045260245ffd5b5f60208284031215611b3c575f80fd5b81516001600160e01b031981168114611859575f80fd5b634e487b7160e01b5f52601260045260245ffd5b5f82611b7557611b75611b53565b500490565b6001600160a01b038681168252851660208201526040810184905260806060820181905281018290525f828460a08401375f60a0848401015260a0601f19601f85011683010190509695505050505050565b5f808454611bd981611aa5565b60018281168015611bf15760018114611c0657611c32565b60ff1984168752821515830287019450611c32565b885f526020805f205f5b85811015611c295781548a820152908401908201611c10565b50505082870194505b505050508351611c46818360208801611788565b01949350505050565b601f821115610b48575f81815260208120601f850160051c81016020861015611c755750805b601f850160051c820191505b81811015611c9457828155600101611c81565b505050505050565b815167ffffffffffffffff811115611cb657611cb66119e6565b611cca81611cc48454611aa5565b84611c4f565b602080601f831160018114611cfd575f8415611ce65750858301515b5f19600386901b1c1916600185901b178555611c94565b5f85815260208120601f198616915b82811015611d2b57888601518255948401946001909101908401611d0c565b5085821015611d4857878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b600181815b80851115611d9257815f1904821115611d7857611d78611add565b80851615611d8557918102915b93841c9390800290611d5d565b509250929050565b5f82611da857506001610692565b81611db457505f610692565b8160018114611dca5760028114611dd457611df0565b6001915050610692565b60ff841115611de557611de5611add565b50506001821b610692565b5060208310610133831016604e8410600b8410161715611e13575081810a610692565b611e1d8383611d58565b805f1904821115611e3057611e30611add565b029392505050565b5f61185960ff841683611d9a565b5f60018201611e5757611e57611add565b5060010190565b5f82611e6c57611e6c611b53565b50069056fea26469706673582212209599ee3e092ee78eeef2c794fb558a27c288ceb64a9048d0ddada6ee3effdcb164736f6c63430008150033
Loading...
Loading
Loading...
Loading
[ 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.