Overview
TokenID
838
Total Transfers
-
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
Dibbles404
Compiler Version
v0.8.19+commit.7dd6d404
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
//SPDX-License-Identifier: UNLICENSED /** * Enabling a new era of Meme utility with the ERC404A, the most gas-optimized solution of ERC404. */ pragma solidity ^0.8.0; import "../ERC404/ERC404A.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; contract Dibbles404 is ERC404A { string public baseTokenURI; constructor( address _owner ) ERC404A("Dibbles 404", "ERRDB", 18, 10000, _owner) { balanceOf[_owner] = 10000 * 10 ** 18; } function setTokenURI(string memory _tokenURI) public onlyOwner { baseTokenURI = _tokenURI; } function setNameSymbol( string memory _name, string memory _symbol ) public onlyOwner { _setNameSymbol(_name, _symbol); } function tokenURI(uint256 id) public view override returns (string memory) { if (bytes(baseTokenURI).length > 0) { return string.concat(baseTokenURI, Strings.toString(id), ".json"); } return "https://bafybeih4yfcubczmulmjdbsunc32n34ep5rs37ejewhcvvd2d2gsfzlpii.ipfs.nftstorage.link/errdb_soon.json"; } }
// 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: UNLICENSED pragma solidity ^0.8.0; /** * @dev A sequence of items with the ability to efficiently push and pop items (i.e. insert and remove) on both ends of * the sequence (called front and back). Among other access patterns, it can be used to implement efficient LIFO and * FIFO queues. Storage use is optimized, and all operations are O(1) constant time. This includes {clear}, given that * the existing queue contents are left in storage. * * The struct is called `Bytes32Deque`. Other types can be cast to and from `bytes32`. This data structure can only be * used in storage, and not in memory. * ```solidity * DoubleEndedQueue.Bytes32Deque queue; * ``` */ library DoubleEndedQueue { /** * @dev An operation (e.g. {front}) couldn't be completed due to the queue being empty. */ error QueueEmpty(); /** * @dev A push operation couldn't be completed due to the queue being full. */ error QueueFull(); /** * @dev An operation (e.g. {at}) couldn't be completed due to an index being out of bounds. */ error QueueOutOfBounds(); /** * @dev Indices are 128 bits so begin and end are packed in a single storage slot for efficient access. * * Struct members have an underscore prefix indicating that they are "private" and should not be read or written to * directly. Use the functions provided below instead. Modifying the struct manually may violate assumptions and * lead to unexpected behavior. * * The first item is at data[begin] and the last item is at data[end - 1]. This range can wrap around. */ struct Uint256Deque { uint128 _begin; uint128 _end; mapping(uint128 index => uint256) _data; } /** * @dev Inserts an item at the end of the queue. * * Reverts with {QueueFull} if the queue is full. */ function pushBack(Uint256Deque storage deque, uint256 value) internal { unchecked { uint128 backIndex = deque._end; if (backIndex + 1 == deque._begin) revert QueueFull(); deque._data[backIndex] = value; deque._end = backIndex + 1; } } /** * @dev Removes the item at the end of the queue and returns it. * * Reverts with {QueueEmpty} if the queue is empty. */ function popBack( Uint256Deque storage deque ) internal returns (uint256 value) { unchecked { uint128 backIndex = deque._end; if (backIndex == deque._begin) revert QueueEmpty(); --backIndex; value = deque._data[backIndex]; delete deque._data[backIndex]; deque._end = backIndex; } } /** * @dev Inserts an item at the beginning of the queue. * * Reverts with {QueueFull} if the queue is full. */ function pushFront(Uint256Deque storage deque, uint256 value) internal { unchecked { uint128 frontIndex = deque._begin - 1; if (frontIndex == deque._end) revert QueueFull(); deque._data[frontIndex] = value; deque._begin = frontIndex; } } /** * @dev Removes the item at the beginning of the queue and returns it. * * Reverts with `QueueEmpty` if the queue is empty. */ function popFront( Uint256Deque storage deque ) internal returns (uint256 value) { unchecked { uint128 frontIndex = deque._begin; if (frontIndex == deque._end) revert QueueEmpty(); value = deque._data[frontIndex]; delete deque._data[frontIndex]; deque._begin = frontIndex + 1; } } /** * @dev Returns the item at the beginning of the queue. * * Reverts with `QueueEmpty` if the queue is empty. */ function front( Uint256Deque storage deque ) internal view returns (uint256 value) { if (empty(deque)) revert QueueEmpty(); return deque._data[deque._begin]; } /** * @dev Returns the item at the end of the queue. * * Reverts with `QueueEmpty` if the queue is empty. */ function back( Uint256Deque storage deque ) internal view returns (uint256 value) { if (empty(deque)) revert QueueEmpty(); unchecked { return deque._data[deque._end - 1]; } } /** * @dev Return the item at a position in the queue given by `index`, with the first item at 0 and last item at * `length(deque) - 1`. * * Reverts with `QueueOutOfBounds` if the index is out of bounds. */ function at( Uint256Deque storage deque, uint256 index ) internal view returns (uint256 value) { if (index >= length(deque)) revert QueueOutOfBounds(); // By construction, length is a uint128, so the check above ensures that index can be safely downcast to uint128 unchecked { return deque._data[deque._begin + uint128(index)]; } } /** * @dev Resets the queue back to being empty. * * NOTE: The current items are left behind in storage. This does not affect the functioning of the queue, but misses * out on potential gas refunds. */ function clear(Uint256Deque storage deque) internal { deque._begin = 0; deque._end = 0; } /** * @dev Returns the number of items in the queue. */ function length( Uint256Deque storage deque ) internal view returns (uint256) { unchecked { return uint256(deque._end - deque._begin); } } /** * @dev Returns true if the queue is empty. */ function empty(Uint256Deque storage deque) internal view returns (bool) { return deque._end == deque._begin; } } abstract contract Ownable { event OwnershipTransferred(address indexed user, address indexed newOwner); error Unauthorized(); error InvalidOwner(); address public owner; modifier onlyOwner() virtual { if (msg.sender != owner) revert Unauthorized(); _; } constructor(address _owner) { if (_owner == address(0)) revert InvalidOwner(); owner = _owner; emit OwnershipTransferred(address(0), _owner); } function transferOwnership(address _owner) public virtual onlyOwner { if (_owner == address(0)) revert InvalidOwner(); owner = _owner; emit OwnershipTransferred(msg.sender, _owner); } function revokeOwnership() public virtual onlyOwner { owner = address(0); emit OwnershipTransferred(msg.sender, address(0)); } } abstract contract ERC721Receiver { function onERC721Received( address, address, uint256, bytes calldata ) external virtual returns (bytes4) { return ERC721Receiver.onERC721Received.selector; } } /// @notice ERC404 /// A gas-efficient, mixed ERC20 / ERC721 implementation /// with native liquidity and fractionalization. /// /// This is an experimental standard designed to integrate /// with pre-existing ERC20 / ERC721 support as smoothly as /// possible. /// /// @dev In order to support full functionality of ERC20 and ERC721 /// supply assumptions are made that slightly constraint usage. /// Ensure decimals are sufficiently large (standard 18 recommended) /// as ids are effectively encoded in the lowest range of amounts. /// /// NFTs are spent on ERC20 functions in a FILO queue, this is by /// design. /// abstract contract ERC404A is Ownable { using DoubleEndedQueue for DoubleEndedQueue.Uint256Deque; /// @dev The queue of ERC-721 tokens stored in the contract. DoubleEndedQueue.Uint256Deque private _storedERC721Ids; // Events event ERC20Transfer( address indexed from, address indexed to, uint256 amount ); event Approval( address indexed owner, address indexed spender, uint256 amount ); event Transfer( address indexed from, address indexed to, uint256 indexed id ); event ERC721Approval( address indexed owner, address indexed spender, uint256 indexed id ); event ApprovalForAll( address indexed owner, address indexed operator, bool approved ); event ERC721Transfer( address indexed from, address indexed to, uint256 indexed id ); // Errors error NotFound(); error AlreadyExists(); error InvalidRecipient(); error InvalidSender(); error UnsafeRecipient(); error InvalidParameter(); error OwnedIndexOverflow(); error NotAllowed(); // Metadata /// @dev Token name string public name; /// @dev Token symbol string public symbol; /// @dev Decimals for fractional representation uint8 public immutable decimals; /// @dev Total supply in fractionalized representation uint256 public immutable totalSupply; /// @dev Total supply uint256 public immutable totalNativeSupply; /// @dev Current mint counter, monotonically increasing to ensure accurate ownership uint256 public minted; // Mappings /// @dev Balance of user in fractional representation mapping(address => uint256) public balanceOf; /// @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 Packed representation of ownerOf and owned indices mapping(uint256 => uint256) internal _ownedData; /// @dev Array of owned ids in native representation mapping(address => uint256[]) internal _owned; /// @dev Address bitmask for packed ownership data uint256 private constant _BITMASK_ADDRESS = (1 << 160) - 1; /// @dev Owned index bitmask for packed ownership data uint256 private constant _BITMASK_OWNED_INDEX = ((1 << 96) - 1) << 160; /// @dev Addresses whitelisted from minting / burning for gas savings (pairs, routers, etc) mapping(address => bool) public whitelist; bool private nftMintBurnPaused; // Constructor constructor( string memory _name, string memory _symbol, uint8 _decimals, uint256 _totalNativeSupply, address _owner ) Ownable(_owner) { name = _name; symbol = _symbol; decimals = _decimals; totalSupply = _totalNativeSupply * (10 ** decimals); totalNativeSupply = _totalNativeSupply; } /// @notice Initialization function to set pairs / etc /// saving gas by avoiding mint / burn on unnecessary targets function setWhitelist(address target, bool state) public onlyOwner { whitelist[target] = state; } function setNftMintBurnPaused(bool state) public onlyOwner { nftMintBurnPaused = state; } /// @notice Function to find owner of a given native token function ownerOf(uint256 id) public view virtual returns (address owner) { owner = _getOwnerOf(id); if (owner == address(0)) { revert NotFound(); } } // function erc721BalanceOf( // address owner // ) public view virtual returns (uint256) { // return balanceOf[owner] / _getUnit(); // } function _getLastTokenId( address from ) internal view returns (uint256 id, uint256 index, uint256 lastSubIndex) { // find last item position if (_owned[from].length == 0) return (0, 0, 0); index = _owned[from].length - 1; uint256 idTemp = _owned[from][index]; lastSubIndex = 15; for (uint256 i = 1; i < 16; i++) { if ((idTemp >> (i * 16)) == 0) { lastSubIndex = i - 1; break; } } id = idTemp >> (lastSubIndex * 16); return (id, index, lastSubIndex); } // Backtest function erc721BalanceOf( address owner ) public view virtual returns (uint256) { if (_owned[owner].length == 0) return 0; ( uint256 tokenId, uint256 index, uint256 lastSubIndex ) = _getLastTokenId(owner); return index * 16 + lastSubIndex + 1; } /// @notice tokenURI must be implemented by child contract function tokenURI(uint256 id) public view virtual returns (string memory); /// @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 amountOrId ) public virtual returns (bool) { if (amountOrId <= minted) { address owner = _getOwnerOf(amountOrId); if (msg.sender != owner && !isApprovedForAll[owner][msg.sender]) { revert Unauthorized(); } getApproved[amountOrId] = spender; emit Approval(owner, spender, amountOrId); } else { allowance[msg.sender][spender] = amountOrId; emit Approval(msg.sender, spender, amountOrId); } return true; } /// @notice Function native approvals function setApprovalForAll(address operator, bool approved) public virtual { isApprovedForAll[msg.sender][operator] = approved; emit ApprovalForAll(msg.sender, 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 amountOrId ) public virtual { if (to == address(0)) { revert InvalidRecipient(); } if (amountOrId <= minted) { uint256 i; if (from != _getOwnerOf(amountOrId)) { revert Unauthorized(); } if ( msg.sender != from && !isApprovedForAll[from][msg.sender] && msg.sender != getApproved[amountOrId] ) { revert Unauthorized(); } balanceOf[from] -= _getUnit(); unchecked { balanceOf[to] += _getUnit(); } _setOwnerOf(amountOrId, to); delete getApproved[amountOrId]; // get last id and remove it uint256 lastIndex = _owned[from].length - 1; uint256 lastIdTemp = _owned[from][lastIndex]; uint256 lastId = 0; if (lastIdTemp >> 16 == 0) { _owned[from].pop(); lastId = lastIdTemp; } else { i = 2; for (; i < 16; i++) { if ((lastIdTemp >> (i * 16)) == 0) { break; } } lastId = lastIdTemp >> ((i - 1) * 16); _owned[from][lastIndex] = lastIdTemp - (lastId << ((i - 1) * 16)); } // move last id to index of amountOrId if (lastId != amountOrId) { _setOwnedIndex(lastId, _getOwnedIndex(amountOrId)); uint256 index = _getOwnedIndex(amountOrId) >> 4; uint256 subIndex = _getOwnedIndex(amountOrId) - (index << 4); uint256 idTemp = _owned[from][index]; _owned[from][index] = idTemp - (amountOrId << (16 * subIndex)) + (lastId << (16 * subIndex)); } // push amountOrId to to uint256 toIndex = 0; uint256 toIdTemp = 0; if (_owned[to].length > 0) { toIndex = _owned[to].length - 1; toIdTemp = _owned[to][toIndex]; } i = 0; for (; i < 16; i++) { if ((toIdTemp >> (i * 16)) == 0) { toIdTemp = toIdTemp | (amountOrId << (i * 16)); if (_owned[to].length == 0) _owned[to].push(toIdTemp); else _owned[to][toIndex] = toIdTemp; _setOwnedIndex(amountOrId, toIndex * 16 + i); break; } } if (i == 16) { _owned[to].push(amountOrId); _setOwnedIndex(amountOrId, (toIndex + 1) * 16); } emit Transfer(from, to, amountOrId); emit ERC20Transfer(from, to, _getUnit()); } else { uint256 allowed = allowance[from][msg.sender]; if (allowed < amountOrId) revert NotAllowed(); if (allowed != type(uint256).max) allowance[from][msg.sender] = allowed - amountOrId; _transfer(from, to, amountOrId); } } /// @notice Function for fractional transfers function transfer( address to, uint256 amount ) public virtual returns (bool) { return _transfer(msg.sender, to, amount); } /// @notice Function for native transfers with contract support function safeTransferFrom( address from, address to, uint256 id ) public virtual { transferFrom(from, to, id); if ( to.code.length != 0 && ERC721Receiver(to).onERC721Received(msg.sender, from, id, "") != ERC721Receiver.onERC721Received.selector ) { revert UnsafeRecipient(); } } /// @notice Function for native transfers with contract support and callback data function safeTransferFrom( address from, address to, uint256 id, bytes calldata data ) public virtual { transferFrom(from, to, id); if ( to.code.length != 0 && ERC721Receiver(to).onERC721Received(msg.sender, 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 = balanceOf[from]; balanceOf[from] -= amount; uint256 balanceBeforeReceiver = balanceOf[to]; unchecked { balanceOf[to] += amount; } if (!nftMintBurnPaused) { if (whitelist[from] && whitelist[to]) {} else if (whitelist[from]) { // [to] is not whitelisted. uint256 tokens_to_mint = (balanceOf[to] / unit) - (balanceBeforeReceiver / unit); if (tokens_to_mint > 0) _mint(to, tokens_to_mint); } else if (whitelist[to]) { // [from] is not whitelisted. uint256 tokens_to_burn = (balanceBeforeSender / unit) - (balanceOf[from] / unit); if (tokens_to_burn > 0) _burn(from, tokens_to_burn); } else { // Both are not whitelisted. // Whole tokens worth of ERC-20s get transferred as ERC-721s without any burning/minting. uint256 nftsToTransfer = amount / unit; for (uint256 i = 0; i < nftsToTransfer; ) { // Pop from sender's ERC-721 stack and transfer them (LIFO) ( uint256 tokenId, uint256 index, uint256 lastSubIndex ) = _getLastTokenId(from); _transferLastERC721(from, to, tokenId, index, lastSubIndex); unchecked { i++; } } uint256 fractionalAmount = amount % unit; if ( (balanceBeforeSender - fractionalAmount) / unit < (balanceBeforeSender / unit) ) { _burn(from, 1); } // Check if the receive causes the receiver to gain a whole new token that should be represented // by an NFT due to receiving a fractional part that completes a whole token. if ( (balanceBeforeReceiver + fractionalAmount) / unit > (balanceBeforeReceiver / unit) ) { _mint(to, 1); } } } emit ERC20Transfer(from, to, amount); return true; } // Internal utility logic function _getUnit() internal view returns (uint256) { return 10 ** decimals; } /// @notice Consolidated record keeping function for transferring ERC-721s. /// @dev Assign the token to the new owner, and remove from the old owner. /// Note that this function allows transfers to and from 0x0. /// Does not handle ERC-721 exemptions. function _transferLastERC721( address from, address to, uint256 id, uint256 index, uint256 lastSubIndex ) internal virtual { // If this is not a mint, handle record keeping for transfer from previous owner. if (from != address(0)) { // On transfer of an NFT, any previous approval is reset. if (lastSubIndex == 0) { _owned[from].pop(); } else { uint256 idTemp = _owned[from][index]; idTemp = idTemp - (id << (lastSubIndex * 16)); _owned[from][index] = idTemp; } // delete _ownedData[id]; delete getApproved[id]; } // If not a burn, update the owner of the token to the new owner. // Update owner of the token to the new owner. _setOwnerOf(id, to); // Push token onto the new owner's stack. ( uint256 toLastTokenId, uint256 toIndex, uint256 toSubIndex ) = _getLastTokenId(to); if (_owned[to].length == 0) { _owned[to].push(id); } else if (toSubIndex == 15) { _owned[to].push(id); toIndex++; toSubIndex = 0; } else { uint256 idTemp = _owned[to][toIndex]; toSubIndex++; idTemp = idTemp | (id << (toSubIndex * 16)); _owned[to][toIndex] = idTemp; } // Update index for new owner's stack. _setOwnedIndex(id, toIndex * 16 + toSubIndex); emit ERC721Transfer(from, to, id); } function _mint(address to, uint256 amount) internal virtual { if (to == address(0)) { revert InvalidRecipient(); } uint256 i; // find last item position uint256 index = 0; uint256 subIndex = 0; uint256 idTemp = 0; bool updateFirst = false; if (_owned[to].length > 0) { index = _owned[to].length - 1; idTemp = _owned[to][index]; for (i = 0; i < 16; i++) { if ((idTemp >> (i * 16)) == 0) { subIndex = i; updateFirst = true; break; } } if (i == 16) { index++; idTemp = 0; } } for (i = 0; i < amount; i++) { uint256 id; if (minted < totalNativeSupply) { // Increase id up to totalNativeSupply minted++; id = minted; } else { if (!DoubleEndedQueue.empty(_storedERC721Ids)) { // If there are any tokens in the bank, use those first. // Pop off the end of the queue (FIFO). id = _storedERC721Ids.popBack(); } else { // Otherwise, mint a new token, should not be able to go over the total fractional supply. minted++; id = minted; } } if (_getOwnerOf(id) != address(0)) { revert AlreadyExists(); } _setOwnerOf(id, to); _setOwnedIndex(id, index * 16 + subIndex); idTemp = idTemp | (id << (subIndex * 16)); subIndex++; if (subIndex == 16) { if (updateFirst) { _owned[to][index] = idTemp; updateFirst = false; } else { _owned[to].push(idTemp); } subIndex = 0; index++; idTemp = 0; } emit Transfer(address(0), to, id); } if (subIndex != 0) { if (updateFirst) { _owned[to][index] = idTemp; } else { _owned[to].push(idTemp); } } } function _burn(address from, uint256 amount) internal virtual { if (from == address(0)) { revert InvalidSender(); } if (_owned[from].length == 0 || amount == 0) { revert InvalidParameter(); } // find last item position uint256 index = _owned[from].length - 1; uint256 idTemp = _owned[from][index]; uint256 lastSubIndex = 15; for (uint256 i = 1; i < 16; i++) { if ((idTemp >> (i * 16)) == 0) { lastSubIndex = i - 1; break; } } for (uint256 i = 0; i < amount; i++) { uint256 id = idTemp; if (lastSubIndex == 0) { lastSubIndex = 15; if (index > 0) index--; idTemp = _owned[from][index]; _owned[from].pop(); } else { id = idTemp >> (lastSubIndex * 16); idTemp = idTemp - (id << (lastSubIndex * 16)); lastSubIndex--; } delete _ownedData[id]; delete getApproved[id]; // Record the token in the contract's bank queue. _storedERC721Ids.pushFront(id); emit Transfer(from, address(0), id); } if (lastSubIndex != 15) { _owned[from][index] = idTemp; } } function _setNameSymbol( string memory _name, string memory _symbol ) internal { name = _name; symbol = _symbol; } function _getOwnerOf( uint256 id_ ) internal view virtual returns (address ownerOf_) { uint256 data = _ownedData[id_]; assembly { ownerOf_ := and(data, _BITMASK_ADDRESS) } } function _setOwnerOf(uint256 id_, address owner_) internal virtual { uint256 data = _ownedData[id_]; assembly { data := add( and(data, _BITMASK_OWNED_INDEX), and(owner_, _BITMASK_ADDRESS) ) } _ownedData[id_] = data; } function _getOwnedIndex( uint256 id_ ) internal view virtual returns (uint256 ownedIndex_) { uint256 data = _ownedData[id_]; assembly { ownedIndex_ := shr(160, data) } } function _setOwnedIndex(uint256 id_, uint256 index_) internal virtual { uint256 data = _ownedData[id_]; if (index_ > _BITMASK_OWNED_INDEX >> 160) { revert OwnedIndexOverflow(); } assembly { data := add( and(data, _BITMASK_ADDRESS), and(shl(160, index_), _BITMASK_OWNED_INDEX) ) } _ownedData[id_] = data; } }
{ "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":[{"internalType":"address","name":"_owner","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AlreadyExists","type":"error"},{"inputs":[],"name":"InvalidOwner","type":"error"},{"inputs":[],"name":"InvalidParameter","type":"error"},{"inputs":[],"name":"InvalidRecipient","type":"error"},{"inputs":[],"name":"InvalidSender","type":"error"},{"inputs":[],"name":"NotAllowed","type":"error"},{"inputs":[],"name":"NotFound","type":"error"},{"inputs":[],"name":"OwnedIndexOverflow","type":"error"},{"inputs":[],"name":"QueueEmpty","type":"error"},{"inputs":[],"name":"QueueFull","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":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ERC20Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"ERC721Approval","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":"ERC721Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","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"},{"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":"amountOrId","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","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":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"erc721BalanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"minted","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":"revokeOwnership","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":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"}],"name":"setNameSymbol","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"state","type":"bool"}],"name":"setNftMintBurnPaused","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_tokenURI","type":"string"}],"name":"setTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bool","name":"state","type":"bool"}],"name":"setWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalNativeSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amountOrId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"whitelist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60e06040523480156200001157600080fd5b5060405162002ed838038062002ed883398101604081905262000034916200015f565b604080518082018252600b81526a111a58989b195cc80d0c0d60aa1b6020808301919091528251808401909352600583526422a929222160d91b9083015290601261271084806001600160a01b038116620000a2576040516349e27cff60e01b815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b03831690811782556040519091907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506003620000f9868262000236565b50600462000108858262000236565b5060ff831660808190526200011f90600a62000417565b6200012b908362000428565b60a0525060c0525050506001600160a01b0316600090815260066020526040902069021e19e0c9bab2400000905562000442565b6000602082840312156200017257600080fd5b81516001600160a01b03811681146200018a57600080fd5b9392505050565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680620001bc57607f821691505b602082108103620001dd57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200023157600081815260208120601f850160051c810160208610156200020c5750805b601f850160051c820191505b818110156200022d5782815560010162000218565b5050505b505050565b81516001600160401b0381111562000252576200025262000191565b6200026a81620002638454620001a7565b84620001e3565b602080601f831160018114620002a25760008415620002895750858301515b600019600386901b1c1916600185901b1785556200022d565b600085815260208120601f198616915b82811015620002d357888601518255948401946001909101908401620002b2565b5085821015620002f25787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052601160045260246000fd5b600181815b80851115620003595781600019048211156200033d576200033d62000302565b808516156200034b57918102915b93841c93908002906200031d565b509250929050565b600082620003725750600162000411565b81620003815750600062000411565b81600181146200039a5760028114620003a557620003c5565b600191505062000411565b60ff841115620003b957620003b962000302565b50506001821b62000411565b5060208310610133831016604e8410600b8410161715620003ea575081810a62000411565b620003f6838362000318565b80600019048211156200040d576200040d62000302565b0290505b92915050565b60006200018a60ff84168362000361565b808202811582820484141762000411576200041162000302565b60805160a05160c051612a5862000480600039600081816103630152611887015260006102500152600081816102a201526112740152612a586000f3fe608060405234801561001057600080fd5b50600436106101c45760003560e01c806381456f48116100f9578063b88d4fde11610097578063dd62ed3e11610071578063dd62ed3e1461042a578063e0df5b6f14610455578063e985e9c514610468578063f2fde38b1461049657600080fd5b8063b88d4fde146103fc578063c87b56dd1461040f578063d547cfb71461042257600080fd5b80639b19251a116100d35780639b19251a146103a0578063a22cb465146103c3578063a9059cbb146103d6578063b3f9ea34146103e957600080fd5b806381456f481461035e5780638da5cb5b1461038557806395d89b411461039857600080fd5b806342842e0e1161016657806353d6fd591161014057806353d6fd59146103055780636352211e14610318578063653c891a1461032b57806370a082311461033e57600080fd5b806342842e0e146102d65780634f02c420146102e9578063504334c2146102f257600080fd5b806318160ddd116101a257806318160ddd1461024b57806323b872dd146102805780632b96895814610295578063313ce5671461029d57600080fd5b806306fdde03146101c9578063081812fc146101e7578063095ea7b314610228575b600080fd5b6101d16104a9565b6040516101de9190612232565b60405180910390f35b6102106101f5366004612265565b6008602052600090815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020016101de565b61023b610236366004612295565b610537565b60405190151581526020016101de565b6102727f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020016101de565b61029361028e3660046122bf565b61067a565b005b610293610d2e565b6102c47f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020016101de565b6102936102e43660046122bf565b610d94565b61027260055481565b61029361030036600461239e565b610e69565b610293610313366004612412565b610ea1565b610210610326366004612265565b610ef6565b610293610339366004612445565b610f31565b61027261034c366004612460565b60066020526000908152604090205481565b6102727f000000000000000000000000000000000000000000000000000000000000000081565b600054610210906001600160a01b031681565b6101d1610f6e565b61023b6103ae366004612460565b600c6020526000908152604090205460ff1681565b6102936103d1366004612412565b610f7b565b61023b6103e4366004612295565b610fe7565b6102726103f7366004612460565b610ffb565b61029361040a36600461247b565b611061565b6101d161041d366004612265565b611124565b6101d161118e565b610272610438366004612516565b600760209081526000928352604080842090915290825290205481565b610293610463366004612540565b61119b565b61023b610476366004612516565b600960209081526000928352604080842090915290825290205460ff1681565b6102936104a4366004612460565b6111d1565b600380546104b69061257d565b80601f01602080910402602001604051908101604052809291908181526020018280546104e29061257d565b801561052f5780601f106105045761010080835404028352916020019161052f565b820191906000526020600020905b81548152906001019060200180831161051257829003601f168201915b505050505081565b60006005548211610614576000828152600a60205260409020546001600160a01b031633811480159061058e57506001600160a01b038116600090815260096020908152604080832033845290915290205460ff16155b156105ab576040516282b42960e81b815260040160405180910390fd5b60008381526008602090815260409182902080546001600160a01b0319166001600160a01b038881169182179092559251868152908416917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a350610670565b3360008181526007602090815260408083206001600160a01b03881680855290835292819020869055518581529192917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a35b5060015b92915050565b6001600160a01b0382166106a157604051634e46966960e11b815260040160405180910390fd5b6005548111610c9e576000818152600a60205260408120546001600160a01b038581169116146106e3576040516282b42960e81b815260040160405180910390fd5b336001600160a01b0385161480159061072057506001600160a01b038416600090815260096020908152604080832033845290915290205460ff16155b801561074357506000828152600860205260409020546001600160a01b03163314155b15610760576040516282b42960e81b815260040160405180910390fd5b61076861126d565b6001600160a01b038516600090815260066020526040812080549091906107909084906125cd565b9091555061079e905061126d565b6001600160a01b0384166000908152600660205260409020805490910190556107c7828461129f565b600082815260086020908152604080832080546001600160a01b03191690556001600160a01b0387168352600b909152812054610806906001906125cd565b6001600160a01b0386166000908152600b602052604081208054929350909183908110610835576108356125e0565b906000526020600020015490506000601082901c600003610895576001600160a01b0387166000908152600b60205260409020805480610877576108776125f6565b6001900381819060005260206000200160009055905581905061093d565b600293505b60108410156108c8576108ae84601061260c565b82901c156108c857836108c081612623565b94505061089a565b6108d36001856125cd565b6108de90601061260c565b82901c90506108ee6001856125cd565b6108f990601061260c565b6109069082901b836125cd565b6001600160a01b0388166000908152600b60205260409020805485908110610930576109306125e0565b6000918252602090912001555b848114610a415761096681610961876000908152600a602052604090205460a01c90565b6112ce565b6000858152600a602052604081205460a481901c919060a01c6bfffffffffffffffffffffff081169061099991906125cd565b6001600160a01b038a166000908152600b6020526040812080549293509091849081106109c8576109c86125e0565b906000526020600020015490508160106109e2919061260c565b84901b6109f083601061260c565b6109fd908a901b836125cd565b610a07919061263c565b6001600160a01b038b166000908152600b60205260409020805485908110610a3157610a316125e0565b6000918252602090912001555050505b6001600160a01b0386166000908152600b6020526040812054819015610ac2576001600160a01b0388166000908152600b6020526040902054610a86906001906125cd565b6001600160a01b0389166000908152600b6020526040902080549193509083908110610ab457610ab46125e0565b906000526020600020015490505b600095505b6010861015610bb257610adb86601061260c565b81901c600003610ba057610af086601061260c565b6001600160a01b0389166000908152600b60205260408120549189901b929092179103610b47576001600160a01b0388166000908152600b6020908152604082208054600181018255908352912001819055610b81565b6001600160a01b0388166000908152600b60205260409020805482919084908110610b7457610b746125e0565b6000918252602090912001555b610b9b8787610b9185601061260c565b610961919061263c565b610bb2565b85610baa81612623565b965050610ac7565b85601003610c04576001600160a01b0388166000908152600b6020908152604082208054600181810183559184529190922001889055610c04908890610bf990859061263c565b61096190601061260c565b86886001600160a01b03168a6001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4876001600160a01b0316896001600160a01b03167fe59fdd36d0d223c0c7d996db7ad796880f45e1936cb0bb7ac102e7082e031487610c8261126d565b60405190815260200160405180910390a3505050505050505050565b6001600160a01b038316600090815260076020908152604080832033845290915290205481811015610ce357604051631eb49d6d60e11b815260040160405180910390fd5b6000198114610d1b57610cf682826125cd565b6001600160a01b03851660009081526007602090815260408083203384529091529020555b610d2684848461133a565b50505b505050565b6000546001600160a01b03163314610d58576040516282b42960e81b815260040160405180910390fd5b600080546001600160a01b031916815560405133907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3565b610d9f83838361067a565b6001600160a01b0382163b15801590610e4b5750604051630a85bd0160e11b8082523360048301526001600160a01b03858116602484015260448301849052608060648401526000608484015290919084169063150b7a029060a4016020604051808303816000875af1158015610e1a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e3e919061264f565b6001600160e01b03191614155b15610d2957604051633da6393160e01b815260040160405180910390fd5b6000546001600160a01b03163314610e93576040516282b42960e81b815260040160405180910390fd5b610e9d82826115d0565b5050565b6000546001600160a01b03163314610ecb576040516282b42960e81b815260040160405180910390fd5b6001600160a01b03919091166000908152600c60205260409020805460ff1916911515919091179055565b6000818152600a60205260409020546001600160a01b031680610f2c5760405163c5723b5160e01b815260040160405180910390fd5b919050565b6000546001600160a01b03163314610f5b576040516282b42960e81b815260040160405180910390fd5b600d805460ff1916911515919091179055565b600480546104b69061257d565b3360008181526009602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6000610ff433848461133a565b9392505050565b6001600160a01b0381166000908152600b6020526040812054810361102257506000919050565b6000806000611030856115e9565b919450925090508061104383601061260c565b61104d919061263c565b61105890600161263c565b95945050505050565b61106c85858561067a565b6001600160a01b0384163b158015906111065750604051630a85bd0160e11b808252906001600160a01b0386169063150b7a02906110b69033908a90899089908990600401612679565b6020604051808303816000875af11580156110d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110f9919061264f565b6001600160e01b03191614155b15610d2657604051633da6393160e01b815260040160405180910390fd5b60606000600e80546111359061257d565b9050111561116f57600e611148836116dc565b6040516020016111599291906126cd565b6040516020818303038152906040529050919050565b6040518060a00160405280606881526020016129bb6068913992915050565b600e80546104b69061257d565b6000546001600160a01b031633146111c5576040516282b42960e81b815260040160405180910390fd5b600e610e9d82826127b2565b6000546001600160a01b031633146111fb576040516282b42960e81b815260040160405180910390fd5b6001600160a01b038116611222576040516349e27cff60e01b815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b0383169081178255604051909133917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a350565b600061129a7f0000000000000000000000000000000000000000000000000000000000000000600a612956565b905090565b6000918252600a602052604090912080546001600160a01b0319166001600160a01b0392909216919091019055565b6000828152600a60205260409020546bffffffffffffffffffffffff82111561130a57604051633f2cd0e360e21b815260040160405180910390fd5b6000928352600a60205260409092206001600160a01b039290921660a09190911b6001600160a01b031916019055565b60008061134561126d565b6001600160a01b03861660009081526006602052604081208054929350859161136e83856125cd565b90915550506001600160a01b03851660009081526006602052604090208054858101909155600d5460ff16611576576001600160a01b0387166000908152600c602052604090205460ff1680156113dd57506001600160a01b0386166000908152600c602052604090205460ff165b611576576001600160a01b0387166000908152600c602052604090205460ff161561145457600061140e848361297b565b6001600160a01b03881660009081526006602052604090205461143290869061297b565b61143c91906125cd565b9050801561144e5761144e878261176f565b50611576565b6001600160a01b0386166000908152600c602052604090205460ff16156114bf576001600160a01b03871660009081526006602052604081205461149990859061297b565b6114a3858561297b565b6114ad91906125cd565b9050801561144e5761144e8882611ae4565b60006114cb848761297b565b905060005b818110156115045760008060006114e68c6115e9565b9250925092506114f98c8c858585611da9565b5050506001016114d0565b506000611511858861298f565b905061151d858561297b565b8561152883876125cd565b611532919061297b565b101561154357611543896001611ae4565b61154d858461297b565b85611558838661263c565b611562919061297b565b11156115735761157388600161176f565b50505b856001600160a01b0316876001600160a01b03167fe59fdd36d0d223c0c7d996db7ad796880f45e1936cb0bb7ac102e7082e031487876040516115bb91815260200190565b60405180910390a35060019695505050505050565b60036115dc83826127b2565b506004610d2982826127b2565b6001600160a01b0381166000908152600b602052604081205481908190810361161a575060009150819050806116d5565b6001600160a01b0384166000908152600b602052604090205461163f906001906125cd565b6001600160a01b0385166000908152600b60205260408120805492945090918490811061166e5761166e6125e0565b600091825260209091200154600f9250905060015b60108110156116c55761169781601061260c565b82901c6000036116b3576116ac6001826125cd565b92506116c5565b806116bd81612623565b915050611683565b506116d182601061260c565b1c92505b9193909250565b606060006116e983612053565b600101905060008167ffffffffffffffff811115611709576117096122fb565b6040519080825280601f01601f191660200182016040528015611733576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508461173d57509392505050565b6001600160a01b03821661179657604051634e46966960e11b815260040160405180910390fd5b6001600160a01b0382166000908152600b6020526040812054819081908190819015611876576001600160a01b0387166000908152600b60205260409020546117e1906001906125cd565b6001600160a01b0388166000908152600b602052604090208054919550908590811061180f5761180f6125e0565b90600052602060002001549150600094505b601085101561185c5761183585601061260c565b82901c60000361184a5750839150600161185c565b8461185481612623565b955050611821565b84601003611876578361186e81612623565b945050600091505b600094505b85851015611a655760007f000000000000000000000000000000000000000000000000000000000000000060055410156118ce57600580549060006118bf83612623565b91905055506005549050611916565b6001546001600160801b03808216600160801b90920416146118fb576118f4600161212b565b9050611916565b6005805490600061190b83612623565b919050555060055490505b6000818152600a60205260409020546001600160a01b03161561194c5760405163119b4fd360e11b815260040160405180910390fd5b611956818961129f565b6119668185610b9188601061260c565b61197184601061260c565b81901b83179250838061198390612623565b94505083601003611a1a5781156119d8576001600160a01b0388166000908152600b602052604090208054849190879081106119c1576119c16125e0565b906000526020600020018190555060009150611a04565b6001600160a01b0388166000908152600b60209081526040822080546001810182559083529120018390555b6000935084611a1281612623565b955050600092505b60405181906001600160a01b038a16906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45084611a5d81612623565b95505061187b565b8215611adb578015611aaf576001600160a01b0387166000908152600b60205260409020805483919086908110611a9e57611a9e6125e0565b600091825260209091200155611adb565b6001600160a01b0387166000908152600b60209081526040822080546001810182559083529120018290555b50505050505050565b6001600160a01b038216611b0b57604051636edaef2f60e11b815260040160405180910390fd5b6001600160a01b0382166000908152600b60205260409020541580611b2e575080155b15611b4c57604051630309cb8760e51b815260040160405180910390fd5b6001600160a01b0382166000908152600b6020526040812054611b71906001906125cd565b6001600160a01b0384166000908152600b602052604081208054929350909183908110611ba057611ba06125e0565b6000918252602090912001549050600f60015b6010811015611bf557611bc781601061260c565b83901c600003611be357611bdc6001826125cd565b9150611bf5565b80611bed81612623565b915050611bb3565b5060005b84811015611d6057826000839003611ca957600f92508415611c235784611c1f816129a3565b9550505b6001600160a01b0387166000908152600b60205260409020805486908110611c4d57611c4d6125e0565b90600052602060002001549350600b6000886001600160a01b03166001600160a01b03168152602001908152602001600020805480611c8e57611c8e6125f6565b60019003818190600052602060002001600090559055611ce1565b611cb483601061260c565b84901c9050611cc483601061260c565b611cd19082901b856125cd565b935082611cdd816129a3565b9350505b6000818152600a602090815260408083208390556008909152902080546001600160a01b0319169055611d1560018261219b565b60405181906000906001600160a01b038a16907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45080611d5881612623565b915050611bf9565b5080600f14610d26576001600160a01b0385166000908152600b60205260409020805483919085908110611d9657611d966125e0565b6000918252602090912001555050505050565b6001600160a01b03851615611ead5780600003611e02576001600160a01b0385166000908152600b60205260409020805480611de757611de76125f6565b60019003818190600052602060002001600090559055611e90565b6001600160a01b0385166000908152600b60205260408120805484908110611e2c57611e2c6125e0565b90600052602060002001549050816010611e46919061260c565b611e539085901b826125cd565b6001600160a01b0387166000908152600b602052604090208054919250829185908110611e8257611e826125e0565b600091825260209091200155505b600083815260086020526040902080546001600160a01b03191690555b611eb7838561129f565b6000806000611ec5876115e9565b6001600160a01b038a166000908152600b6020526040812054939650919450925003611f1b576001600160a01b0387166000908152600b6020908152604082208054600181018255908352912001869055611ff8565b80600f03611f64576001600160a01b0387166000908152600b602090815260408220805460018101825590835291200186905581611f5881612623565b92505060009050611ff8565b6001600160a01b0387166000908152600b60205260408120805484908110611f8e57611f8e6125e0565b906000526020600020015490508180611fa690612623565b9250611fb5905082601061260c565b6001600160a01b0389166000908152600b6020526040902080549189901b9290921791829185908110611fea57611fea6125e0565b600091825260209091200155505b6120088682610b9185601061260c565b85876001600160a01b0316896001600160a01b03167fe5f815dc84b8cecdfd4beedfc3f91ab5be7af100eca4e8fb11552b867995394f60405160405180910390a45050505050505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106120925772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef810000000083106120be576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106120dc57662386f26fc10000830492506010015b6305f5e10083106120f4576305f5e100830492506008015b612710831061210857612710830492506004015b6064831061211a576064830492506002015b600a83106106745760010192915050565b80546000906001600160801b03600160801b8204811691168103612162576040516375e52f4f60e01b815260040160405180910390fd5b600019016001600160801b039081166000818152600185016020526040812080549190558454909216600160801b909102179092555090565b81546001600160801b038082166000190191600160801b90048116908216036121d757604051638acb5f2760e01b815260040160405180910390fd5b6001600160801b0316600081815260018401602052604090209190915581546fffffffffffffffffffffffffffffffff1916179055565b60005b83811015612229578181015183820152602001612211565b50506000910152565b602081526000825180602084015261225181604085016020870161220e565b601f01601f19169190910160400192915050565b60006020828403121561227757600080fd5b5035919050565b80356001600160a01b0381168114610f2c57600080fd5b600080604083850312156122a857600080fd5b6122b18361227e565b946020939093013593505050565b6000806000606084860312156122d457600080fd5b6122dd8461227e565b92506122eb6020850161227e565b9150604084013590509250925092565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261232257600080fd5b813567ffffffffffffffff8082111561233d5761233d6122fb565b604051601f8301601f19908116603f01168101908282118183101715612365576123656122fb565b8160405283815286602085880101111561237e57600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080604083850312156123b157600080fd5b823567ffffffffffffffff808211156123c957600080fd5b6123d586838701612311565b935060208501359150808211156123eb57600080fd5b506123f885828601612311565b9150509250929050565b80358015158114610f2c57600080fd5b6000806040838503121561242557600080fd5b61242e8361227e565b915061243c60208401612402565b90509250929050565b60006020828403121561245757600080fd5b610ff482612402565b60006020828403121561247257600080fd5b610ff48261227e565b60008060008060006080868803121561249357600080fd5b61249c8661227e565b94506124aa6020870161227e565b935060408601359250606086013567ffffffffffffffff808211156124ce57600080fd5b818801915088601f8301126124e257600080fd5b8135818111156124f157600080fd5b89602082850101111561250357600080fd5b9699959850939650602001949392505050565b6000806040838503121561252957600080fd5b6125328361227e565b915061243c6020840161227e565b60006020828403121561255257600080fd5b813567ffffffffffffffff81111561256957600080fd5b61257584828501612311565b949350505050565b600181811c9082168061259157607f821691505b6020821081036125b157634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b81810381811115610674576106746125b7565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b8082028115828204841417610674576106746125b7565b600060018201612635576126356125b7565b5060010190565b80820180821115610674576106746125b7565b60006020828403121561266157600080fd5b81516001600160e01b031981168114610ff457600080fd5b6001600160a01b038681168252851660208201526040810184905260806060820181905281018290526000828460a0840137600060a0848401015260a0601f19601f85011683010190509695505050505050565b60008084546126db8161257d565b600182811680156126f3576001811461270857612737565b60ff1984168752821515830287019450612737565b8860005260208060002060005b8581101561272e5781548a820152908401908201612715565b50505082870194505b50505050835161274b81836020880161220e565b64173539b7b760d91b9101908152600501949350505050565b601f821115610d2957600081815260208120601f850160051c8101602086101561278b5750805b601f850160051c820191505b818110156127aa57828155600101612797565b505050505050565b815167ffffffffffffffff8111156127cc576127cc6122fb565b6127e0816127da845461257d565b84612764565b602080601f83116001811461281557600084156127fd5750858301515b600019600386901b1c1916600185901b1785556127aa565b600085815260208120601f198616915b8281101561284457888601518255948401946001909101908401612825565b50858210156128625787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600181815b808511156128ad578160001904821115612893576128936125b7565b808516156128a057918102915b93841c9390800290612877565b509250929050565b6000826128c457506001610674565b816128d157506000610674565b81600181146128e757600281146128f15761290d565b6001915050610674565b60ff841115612902576129026125b7565b50506001821b610674565b5060208310610133831016604e8410600b8410161715612930575081810a610674565b61293a8383612872565b806000190482111561294e5761294e6125b7565b029392505050565b6000610ff460ff8416836128b5565b634e487b7160e01b600052601260045260246000fd5b60008261298a5761298a612965565b500490565b60008261299e5761299e612965565b500690565b6000816129b2576129b26125b7565b50600019019056fe68747470733a2f2f6261667962656968347966637562637a6d756c6d6a646273756e6333326e333465703572733337656a657768637676643264326773667a6c7069692e697066732e6e667473746f726167652e6c696e6b2f65727264625f736f6f6e2e6a736f6ea264697066735822122063b7b8c481f9dcbf6bc7e37e4dd871dc5e40b0e39d42261194d0478f0d70345464736f6c634300081300330000000000000000000000004fb903f0e446e49b968c8613e1a406fc2f34b838
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101c45760003560e01c806381456f48116100f9578063b88d4fde11610097578063dd62ed3e11610071578063dd62ed3e1461042a578063e0df5b6f14610455578063e985e9c514610468578063f2fde38b1461049657600080fd5b8063b88d4fde146103fc578063c87b56dd1461040f578063d547cfb71461042257600080fd5b80639b19251a116100d35780639b19251a146103a0578063a22cb465146103c3578063a9059cbb146103d6578063b3f9ea34146103e957600080fd5b806381456f481461035e5780638da5cb5b1461038557806395d89b411461039857600080fd5b806342842e0e1161016657806353d6fd591161014057806353d6fd59146103055780636352211e14610318578063653c891a1461032b57806370a082311461033e57600080fd5b806342842e0e146102d65780634f02c420146102e9578063504334c2146102f257600080fd5b806318160ddd116101a257806318160ddd1461024b57806323b872dd146102805780632b96895814610295578063313ce5671461029d57600080fd5b806306fdde03146101c9578063081812fc146101e7578063095ea7b314610228575b600080fd5b6101d16104a9565b6040516101de9190612232565b60405180910390f35b6102106101f5366004612265565b6008602052600090815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020016101de565b61023b610236366004612295565b610537565b60405190151581526020016101de565b6102727f00000000000000000000000000000000000000000000021e19e0c9bab240000081565b6040519081526020016101de565b61029361028e3660046122bf565b61067a565b005b610293610d2e565b6102c47f000000000000000000000000000000000000000000000000000000000000001281565b60405160ff90911681526020016101de565b6102936102e43660046122bf565b610d94565b61027260055481565b61029361030036600461239e565b610e69565b610293610313366004612412565b610ea1565b610210610326366004612265565b610ef6565b610293610339366004612445565b610f31565b61027261034c366004612460565b60066020526000908152604090205481565b6102727f000000000000000000000000000000000000000000000000000000000000271081565b600054610210906001600160a01b031681565b6101d1610f6e565b61023b6103ae366004612460565b600c6020526000908152604090205460ff1681565b6102936103d1366004612412565b610f7b565b61023b6103e4366004612295565b610fe7565b6102726103f7366004612460565b610ffb565b61029361040a36600461247b565b611061565b6101d161041d366004612265565b611124565b6101d161118e565b610272610438366004612516565b600760209081526000928352604080842090915290825290205481565b610293610463366004612540565b61119b565b61023b610476366004612516565b600960209081526000928352604080842090915290825290205460ff1681565b6102936104a4366004612460565b6111d1565b600380546104b69061257d565b80601f01602080910402602001604051908101604052809291908181526020018280546104e29061257d565b801561052f5780601f106105045761010080835404028352916020019161052f565b820191906000526020600020905b81548152906001019060200180831161051257829003601f168201915b505050505081565b60006005548211610614576000828152600a60205260409020546001600160a01b031633811480159061058e57506001600160a01b038116600090815260096020908152604080832033845290915290205460ff16155b156105ab576040516282b42960e81b815260040160405180910390fd5b60008381526008602090815260409182902080546001600160a01b0319166001600160a01b038881169182179092559251868152908416917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a350610670565b3360008181526007602090815260408083206001600160a01b03881680855290835292819020869055518581529192917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a35b5060015b92915050565b6001600160a01b0382166106a157604051634e46966960e11b815260040160405180910390fd5b6005548111610c9e576000818152600a60205260408120546001600160a01b038581169116146106e3576040516282b42960e81b815260040160405180910390fd5b336001600160a01b0385161480159061072057506001600160a01b038416600090815260096020908152604080832033845290915290205460ff16155b801561074357506000828152600860205260409020546001600160a01b03163314155b15610760576040516282b42960e81b815260040160405180910390fd5b61076861126d565b6001600160a01b038516600090815260066020526040812080549091906107909084906125cd565b9091555061079e905061126d565b6001600160a01b0384166000908152600660205260409020805490910190556107c7828461129f565b600082815260086020908152604080832080546001600160a01b03191690556001600160a01b0387168352600b909152812054610806906001906125cd565b6001600160a01b0386166000908152600b602052604081208054929350909183908110610835576108356125e0565b906000526020600020015490506000601082901c600003610895576001600160a01b0387166000908152600b60205260409020805480610877576108776125f6565b6001900381819060005260206000200160009055905581905061093d565b600293505b60108410156108c8576108ae84601061260c565b82901c156108c857836108c081612623565b94505061089a565b6108d36001856125cd565b6108de90601061260c565b82901c90506108ee6001856125cd565b6108f990601061260c565b6109069082901b836125cd565b6001600160a01b0388166000908152600b60205260409020805485908110610930576109306125e0565b6000918252602090912001555b848114610a415761096681610961876000908152600a602052604090205460a01c90565b6112ce565b6000858152600a602052604081205460a481901c919060a01c6bfffffffffffffffffffffff081169061099991906125cd565b6001600160a01b038a166000908152600b6020526040812080549293509091849081106109c8576109c86125e0565b906000526020600020015490508160106109e2919061260c565b84901b6109f083601061260c565b6109fd908a901b836125cd565b610a07919061263c565b6001600160a01b038b166000908152600b60205260409020805485908110610a3157610a316125e0565b6000918252602090912001555050505b6001600160a01b0386166000908152600b6020526040812054819015610ac2576001600160a01b0388166000908152600b6020526040902054610a86906001906125cd565b6001600160a01b0389166000908152600b6020526040902080549193509083908110610ab457610ab46125e0565b906000526020600020015490505b600095505b6010861015610bb257610adb86601061260c565b81901c600003610ba057610af086601061260c565b6001600160a01b0389166000908152600b60205260408120549189901b929092179103610b47576001600160a01b0388166000908152600b6020908152604082208054600181018255908352912001819055610b81565b6001600160a01b0388166000908152600b60205260409020805482919084908110610b7457610b746125e0565b6000918252602090912001555b610b9b8787610b9185601061260c565b610961919061263c565b610bb2565b85610baa81612623565b965050610ac7565b85601003610c04576001600160a01b0388166000908152600b6020908152604082208054600181810183559184529190922001889055610c04908890610bf990859061263c565b61096190601061260c565b86886001600160a01b03168a6001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4876001600160a01b0316896001600160a01b03167fe59fdd36d0d223c0c7d996db7ad796880f45e1936cb0bb7ac102e7082e031487610c8261126d565b60405190815260200160405180910390a3505050505050505050565b6001600160a01b038316600090815260076020908152604080832033845290915290205481811015610ce357604051631eb49d6d60e11b815260040160405180910390fd5b6000198114610d1b57610cf682826125cd565b6001600160a01b03851660009081526007602090815260408083203384529091529020555b610d2684848461133a565b50505b505050565b6000546001600160a01b03163314610d58576040516282b42960e81b815260040160405180910390fd5b600080546001600160a01b031916815560405133907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3565b610d9f83838361067a565b6001600160a01b0382163b15801590610e4b5750604051630a85bd0160e11b8082523360048301526001600160a01b03858116602484015260448301849052608060648401526000608484015290919084169063150b7a029060a4016020604051808303816000875af1158015610e1a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e3e919061264f565b6001600160e01b03191614155b15610d2957604051633da6393160e01b815260040160405180910390fd5b6000546001600160a01b03163314610e93576040516282b42960e81b815260040160405180910390fd5b610e9d82826115d0565b5050565b6000546001600160a01b03163314610ecb576040516282b42960e81b815260040160405180910390fd5b6001600160a01b03919091166000908152600c60205260409020805460ff1916911515919091179055565b6000818152600a60205260409020546001600160a01b031680610f2c5760405163c5723b5160e01b815260040160405180910390fd5b919050565b6000546001600160a01b03163314610f5b576040516282b42960e81b815260040160405180910390fd5b600d805460ff1916911515919091179055565b600480546104b69061257d565b3360008181526009602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6000610ff433848461133a565b9392505050565b6001600160a01b0381166000908152600b6020526040812054810361102257506000919050565b6000806000611030856115e9565b919450925090508061104383601061260c565b61104d919061263c565b61105890600161263c565b95945050505050565b61106c85858561067a565b6001600160a01b0384163b158015906111065750604051630a85bd0160e11b808252906001600160a01b0386169063150b7a02906110b69033908a90899089908990600401612679565b6020604051808303816000875af11580156110d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110f9919061264f565b6001600160e01b03191614155b15610d2657604051633da6393160e01b815260040160405180910390fd5b60606000600e80546111359061257d565b9050111561116f57600e611148836116dc565b6040516020016111599291906126cd565b6040516020818303038152906040529050919050565b6040518060a00160405280606881526020016129bb6068913992915050565b600e80546104b69061257d565b6000546001600160a01b031633146111c5576040516282b42960e81b815260040160405180910390fd5b600e610e9d82826127b2565b6000546001600160a01b031633146111fb576040516282b42960e81b815260040160405180910390fd5b6001600160a01b038116611222576040516349e27cff60e01b815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b0383169081178255604051909133917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a350565b600061129a7f0000000000000000000000000000000000000000000000000000000000000012600a612956565b905090565b6000918252600a602052604090912080546001600160a01b0319166001600160a01b0392909216919091019055565b6000828152600a60205260409020546bffffffffffffffffffffffff82111561130a57604051633f2cd0e360e21b815260040160405180910390fd5b6000928352600a60205260409092206001600160a01b039290921660a09190911b6001600160a01b031916019055565b60008061134561126d565b6001600160a01b03861660009081526006602052604081208054929350859161136e83856125cd565b90915550506001600160a01b03851660009081526006602052604090208054858101909155600d5460ff16611576576001600160a01b0387166000908152600c602052604090205460ff1680156113dd57506001600160a01b0386166000908152600c602052604090205460ff165b611576576001600160a01b0387166000908152600c602052604090205460ff161561145457600061140e848361297b565b6001600160a01b03881660009081526006602052604090205461143290869061297b565b61143c91906125cd565b9050801561144e5761144e878261176f565b50611576565b6001600160a01b0386166000908152600c602052604090205460ff16156114bf576001600160a01b03871660009081526006602052604081205461149990859061297b565b6114a3858561297b565b6114ad91906125cd565b9050801561144e5761144e8882611ae4565b60006114cb848761297b565b905060005b818110156115045760008060006114e68c6115e9565b9250925092506114f98c8c858585611da9565b5050506001016114d0565b506000611511858861298f565b905061151d858561297b565b8561152883876125cd565b611532919061297b565b101561154357611543896001611ae4565b61154d858461297b565b85611558838661263c565b611562919061297b565b11156115735761157388600161176f565b50505b856001600160a01b0316876001600160a01b03167fe59fdd36d0d223c0c7d996db7ad796880f45e1936cb0bb7ac102e7082e031487876040516115bb91815260200190565b60405180910390a35060019695505050505050565b60036115dc83826127b2565b506004610d2982826127b2565b6001600160a01b0381166000908152600b602052604081205481908190810361161a575060009150819050806116d5565b6001600160a01b0384166000908152600b602052604090205461163f906001906125cd565b6001600160a01b0385166000908152600b60205260408120805492945090918490811061166e5761166e6125e0565b600091825260209091200154600f9250905060015b60108110156116c55761169781601061260c565b82901c6000036116b3576116ac6001826125cd565b92506116c5565b806116bd81612623565b915050611683565b506116d182601061260c565b1c92505b9193909250565b606060006116e983612053565b600101905060008167ffffffffffffffff811115611709576117096122fb565b6040519080825280601f01601f191660200182016040528015611733576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508461173d57509392505050565b6001600160a01b03821661179657604051634e46966960e11b815260040160405180910390fd5b6001600160a01b0382166000908152600b6020526040812054819081908190819015611876576001600160a01b0387166000908152600b60205260409020546117e1906001906125cd565b6001600160a01b0388166000908152600b602052604090208054919550908590811061180f5761180f6125e0565b90600052602060002001549150600094505b601085101561185c5761183585601061260c565b82901c60000361184a5750839150600161185c565b8461185481612623565b955050611821565b84601003611876578361186e81612623565b945050600091505b600094505b85851015611a655760007f000000000000000000000000000000000000000000000000000000000000271060055410156118ce57600580549060006118bf83612623565b91905055506005549050611916565b6001546001600160801b03808216600160801b90920416146118fb576118f4600161212b565b9050611916565b6005805490600061190b83612623565b919050555060055490505b6000818152600a60205260409020546001600160a01b03161561194c5760405163119b4fd360e11b815260040160405180910390fd5b611956818961129f565b6119668185610b9188601061260c565b61197184601061260c565b81901b83179250838061198390612623565b94505083601003611a1a5781156119d8576001600160a01b0388166000908152600b602052604090208054849190879081106119c1576119c16125e0565b906000526020600020018190555060009150611a04565b6001600160a01b0388166000908152600b60209081526040822080546001810182559083529120018390555b6000935084611a1281612623565b955050600092505b60405181906001600160a01b038a16906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45084611a5d81612623565b95505061187b565b8215611adb578015611aaf576001600160a01b0387166000908152600b60205260409020805483919086908110611a9e57611a9e6125e0565b600091825260209091200155611adb565b6001600160a01b0387166000908152600b60209081526040822080546001810182559083529120018290555b50505050505050565b6001600160a01b038216611b0b57604051636edaef2f60e11b815260040160405180910390fd5b6001600160a01b0382166000908152600b60205260409020541580611b2e575080155b15611b4c57604051630309cb8760e51b815260040160405180910390fd5b6001600160a01b0382166000908152600b6020526040812054611b71906001906125cd565b6001600160a01b0384166000908152600b602052604081208054929350909183908110611ba057611ba06125e0565b6000918252602090912001549050600f60015b6010811015611bf557611bc781601061260c565b83901c600003611be357611bdc6001826125cd565b9150611bf5565b80611bed81612623565b915050611bb3565b5060005b84811015611d6057826000839003611ca957600f92508415611c235784611c1f816129a3565b9550505b6001600160a01b0387166000908152600b60205260409020805486908110611c4d57611c4d6125e0565b90600052602060002001549350600b6000886001600160a01b03166001600160a01b03168152602001908152602001600020805480611c8e57611c8e6125f6565b60019003818190600052602060002001600090559055611ce1565b611cb483601061260c565b84901c9050611cc483601061260c565b611cd19082901b856125cd565b935082611cdd816129a3565b9350505b6000818152600a602090815260408083208390556008909152902080546001600160a01b0319169055611d1560018261219b565b60405181906000906001600160a01b038a16907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45080611d5881612623565b915050611bf9565b5080600f14610d26576001600160a01b0385166000908152600b60205260409020805483919085908110611d9657611d966125e0565b6000918252602090912001555050505050565b6001600160a01b03851615611ead5780600003611e02576001600160a01b0385166000908152600b60205260409020805480611de757611de76125f6565b60019003818190600052602060002001600090559055611e90565b6001600160a01b0385166000908152600b60205260408120805484908110611e2c57611e2c6125e0565b90600052602060002001549050816010611e46919061260c565b611e539085901b826125cd565b6001600160a01b0387166000908152600b602052604090208054919250829185908110611e8257611e826125e0565b600091825260209091200155505b600083815260086020526040902080546001600160a01b03191690555b611eb7838561129f565b6000806000611ec5876115e9565b6001600160a01b038a166000908152600b6020526040812054939650919450925003611f1b576001600160a01b0387166000908152600b6020908152604082208054600181018255908352912001869055611ff8565b80600f03611f64576001600160a01b0387166000908152600b602090815260408220805460018101825590835291200186905581611f5881612623565b92505060009050611ff8565b6001600160a01b0387166000908152600b60205260408120805484908110611f8e57611f8e6125e0565b906000526020600020015490508180611fa690612623565b9250611fb5905082601061260c565b6001600160a01b0389166000908152600b6020526040902080549189901b9290921791829185908110611fea57611fea6125e0565b600091825260209091200155505b6120088682610b9185601061260c565b85876001600160a01b0316896001600160a01b03167fe5f815dc84b8cecdfd4beedfc3f91ab5be7af100eca4e8fb11552b867995394f60405160405180910390a45050505050505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106120925772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef810000000083106120be576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106120dc57662386f26fc10000830492506010015b6305f5e10083106120f4576305f5e100830492506008015b612710831061210857612710830492506004015b6064831061211a576064830492506002015b600a83106106745760010192915050565b80546000906001600160801b03600160801b8204811691168103612162576040516375e52f4f60e01b815260040160405180910390fd5b600019016001600160801b039081166000818152600185016020526040812080549190558454909216600160801b909102179092555090565b81546001600160801b038082166000190191600160801b90048116908216036121d757604051638acb5f2760e01b815260040160405180910390fd5b6001600160801b0316600081815260018401602052604090209190915581546fffffffffffffffffffffffffffffffff1916179055565b60005b83811015612229578181015183820152602001612211565b50506000910152565b602081526000825180602084015261225181604085016020870161220e565b601f01601f19169190910160400192915050565b60006020828403121561227757600080fd5b5035919050565b80356001600160a01b0381168114610f2c57600080fd5b600080604083850312156122a857600080fd5b6122b18361227e565b946020939093013593505050565b6000806000606084860312156122d457600080fd5b6122dd8461227e565b92506122eb6020850161227e565b9150604084013590509250925092565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261232257600080fd5b813567ffffffffffffffff8082111561233d5761233d6122fb565b604051601f8301601f19908116603f01168101908282118183101715612365576123656122fb565b8160405283815286602085880101111561237e57600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080604083850312156123b157600080fd5b823567ffffffffffffffff808211156123c957600080fd5b6123d586838701612311565b935060208501359150808211156123eb57600080fd5b506123f885828601612311565b9150509250929050565b80358015158114610f2c57600080fd5b6000806040838503121561242557600080fd5b61242e8361227e565b915061243c60208401612402565b90509250929050565b60006020828403121561245757600080fd5b610ff482612402565b60006020828403121561247257600080fd5b610ff48261227e565b60008060008060006080868803121561249357600080fd5b61249c8661227e565b94506124aa6020870161227e565b935060408601359250606086013567ffffffffffffffff808211156124ce57600080fd5b818801915088601f8301126124e257600080fd5b8135818111156124f157600080fd5b89602082850101111561250357600080fd5b9699959850939650602001949392505050565b6000806040838503121561252957600080fd5b6125328361227e565b915061243c6020840161227e565b60006020828403121561255257600080fd5b813567ffffffffffffffff81111561256957600080fd5b61257584828501612311565b949350505050565b600181811c9082168061259157607f821691505b6020821081036125b157634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b81810381811115610674576106746125b7565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b8082028115828204841417610674576106746125b7565b600060018201612635576126356125b7565b5060010190565b80820180821115610674576106746125b7565b60006020828403121561266157600080fd5b81516001600160e01b031981168114610ff457600080fd5b6001600160a01b038681168252851660208201526040810184905260806060820181905281018290526000828460a0840137600060a0848401015260a0601f19601f85011683010190509695505050505050565b60008084546126db8161257d565b600182811680156126f3576001811461270857612737565b60ff1984168752821515830287019450612737565b8860005260208060002060005b8581101561272e5781548a820152908401908201612715565b50505082870194505b50505050835161274b81836020880161220e565b64173539b7b760d91b9101908152600501949350505050565b601f821115610d2957600081815260208120601f850160051c8101602086101561278b5750805b601f850160051c820191505b818110156127aa57828155600101612797565b505050505050565b815167ffffffffffffffff8111156127cc576127cc6122fb565b6127e0816127da845461257d565b84612764565b602080601f83116001811461281557600084156127fd5750858301515b600019600386901b1c1916600185901b1785556127aa565b600085815260208120601f198616915b8281101561284457888601518255948401946001909101908401612825565b50858210156128625787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600181815b808511156128ad578160001904821115612893576128936125b7565b808516156128a057918102915b93841c9390800290612877565b509250929050565b6000826128c457506001610674565b816128d157506000610674565b81600181146128e757600281146128f15761290d565b6001915050610674565b60ff841115612902576129026125b7565b50506001821b610674565b5060208310610133831016604e8410600b8410161715612930575081810a610674565b61293a8383612872565b806000190482111561294e5761294e6125b7565b029392505050565b6000610ff460ff8416836128b5565b634e487b7160e01b600052601260045260246000fd5b60008261298a5761298a612965565b500490565b60008261299e5761299e612965565b500690565b6000816129b2576129b26125b7565b50600019019056fe68747470733a2f2f6261667962656968347966637562637a6d756c6d6a646273756e6333326e333465703572733337656a657768637676643264326773667a6c7069692e697066732e6e667473746f726167652e6c696e6b2f65727264625f736f6f6e2e6a736f6ea264697066735822122063b7b8c481f9dcbf6bc7e37e4dd871dc5e40b0e39d42261194d0478f0d70345464736f6c63430008130033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000004fb903f0e446e49b968c8613e1a406fc2f34b838
-----Decoded View---------------
Arg [0] : _owner (address): 0x4Fb903f0e446e49b968c8613e1A406fc2f34B838
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000004fb903f0e446e49b968c8613e1a406fc2f34b838
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.