ERC-20
Overview
Max Total Supply
100 EXIT369
Holders
81
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 18 Decimals)
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Source Code Verified (Exact Match)
Contract Name:
BaseERC404
Compiler Version
v0.8.23+commit.f704f362
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2024-07-03 */ // 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; } } // 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); } } } // 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); } } } // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); } pragma solidity >=0.6.2; interface IUniswapV2Router01 { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidity( address tokenA, address tokenB, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB, uint liquidity); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); function removeLiquidity( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB); function removeLiquidityETH( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountToken, uint amountETH); function removeLiquidityWithPermit( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountA, uint amountB); function removeLiquidityETHWithPermit( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountToken, uint amountETH); function swapExactTokensForTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapTokensForExactTokens( uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB); function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut); function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn); function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts); function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts); } // OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol) pragma solidity ^0.8.0; /** * @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); } } pragma solidity 0.8.23; pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } /** * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a * `nonReentrant` function in the call stack. */ function _reentrancyGuardEntered() internal view returns (bool) { return _status == _ENTERED; } } /// @title BaseToken /// @notice A base contract for all tokens abstract contract BaseToken is ReentrancyGuard { using SafeERC20 for IERC20; address public immutable treasury; IERC20 public immutable wnt; IUniswapV2Router02 public immutable univ2router; uint256 public constant SWAP_TAX = 125; // 0.25% uint256 public constant PRECISION = 10000; // ============================================================================================ // Constructor // ============================================================================================ constructor( IERC20 _wnt, IUniswapV2Router02 _univ2router, address _treasury ) { wnt = _wnt; univ2router = _univ2router; treasury = _treasury; if (block.chainid == 252) { // https://docs.frax.com/fraxtal/fraxtal-incentives/fraxtal-incentives-delegation#setting-delegations-for-smart-contracts address _delegationRegistry = 0x4392dC16867D53DBFE227076606455634d4c2795; _delegationRegistry.call( abi.encodeWithSignature( "setDelegationForSelf(address)", _treasury ) ); _delegationRegistry.call( abi.encodeWithSignature("disableSelfManagingDelegations()") ); } } // ============================================================================================ // External Functions // ============================================================================================ } // OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol) pragma solidity ^0.8.0; /** * @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)); } } pragma solidity ^0.8.4; /// @title DN404Mirror /// @notice DN404Mirror provides an interface for interacting with the /// NFT tokens in a DN404 implementation. /// /// @author vectorized.eth (@optimizoor) /// @author Quit (@0xQuit) /// @author Michael Amadi (@AmadiMichaels) /// @author cygaar (@0xCygaar) /// @author Thomas (@0xjustadev) /// @author Harrison (@PopPunkOnChain) /// /// @dev Note: /// - The ERC721 data is stored in the base DN404 contract. contract DN404Mirror { /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* EVENTS */ /*-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»*/ /// @dev Emitted when token `id` is transferred from `from` to `to`. event Transfer(address indexed from, address indexed to, uint256 indexed id); /// @dev Emitted when `owner` enables `account` to manage the `id` token. event Approval(address indexed owner, address indexed account, uint256 indexed id); /// @dev Emitted when `owner` enables or disables `operator` to manage all of their tokens. event ApprovalForAll(address indexed owner, address indexed operator, bool isApproved); /// @dev The ownership is transferred from `oldOwner` to `newOwner`. /// This is for marketplace signaling purposes. This contract has a `pullOwner()` /// function that will sync the owner from the base contract. event OwnershipTransferred(address indexed oldOwner, address indexed newOwner); /// @dev `keccak256(bytes("Transfer(address,address,uint256)"))`. uint256 private constant _TRANSFER_EVENT_SIGNATURE = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef; /// @dev `keccak256(bytes("Approval(address,address,uint256)"))`. uint256 private constant _APPROVAL_EVENT_SIGNATURE = 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925; /// @dev `keccak256(bytes("ApprovalForAll(address,address,bool)"))`. uint256 private constant _APPROVAL_FOR_ALL_EVENT_SIGNATURE = 0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31; /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* CUSTOM ERRORS */ /*-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»*/ /// @dev Thrown when a call for an NFT function did not originate /// from the base DN404 contract. error SenderNotBase(); /// @dev Thrown when a call for an NFT function did not originate from the deployer. error SenderNotDeployer(); /// @dev Thrown when transferring an NFT to a contract address that /// does not implement ERC721Receiver. error TransferToNonERC721ReceiverImplementer(); /// @dev Thrown when linking to the DN404 base contract and the /// DN404 supportsInterface check fails or the call reverts. error CannotLink(); /// @dev Thrown when a linkMirrorContract call is received and the /// NFT mirror contract has already been linked to a DN404 base contract. error AlreadyLinked(); /// @dev Thrown when retrieving the base DN404 address when a link has not /// been established. error NotLinked(); /// @dev The function selector is not recognized. error FnSelectorNotRecognized(); /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* STORAGE */ /*-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»*/ /// @dev Struct contain the NFT mirror contract storage. struct DN404NFTStorage { // Address of the ERC20 base contract. address baseERC20; // The deployer, if provided. If non-zero, the initialization of the // ERC20 <-> ERC721 link can only be done be the deployer via the ERC20 base contract. address deployer; // The owner of the ERC20 base contract. For marketplace signaling. address owner; } /// @dev Returns a storage pointer for DN404NFTStorage. function _getDN404NFTStorage() internal pure virtual returns (DN404NFTStorage storage $) { /// @solidity memory-safe-assembly assembly { // `uint72(bytes9(keccak256("DN404_MIRROR_STORAGE")))`. $.slot := 0x3602298b8c10b01230 // Truncate to 9 bytes to reduce bytecode size. } } /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* CONSTRUCTOR */ /*-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»*/ constructor(address deployer) { // For non-proxies, we will store the deployer so that only the deployer can // link the base contract. _getDN404NFTStorage().deployer = deployer; } /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* ERC721 OPERATIONS */ /*-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»*/ /// @dev Returns the token collection name from the base DN404 contract. function name() public view virtual returns (string memory) { return _readString(0x06fdde03, 0); // `name()`. } /// @dev Returns the token collection symbol from the base DN404 contract. function symbol() public view virtual returns (string memory) { return _readString(0x95d89b41, 0); // `symbol()`. } /// @dev Returns the Uniform Resource Identifier (URI) for token `id` from /// the base DN404 contract. function tokenURI(uint256 id) public view virtual returns (string memory) { return _readString(0xc87b56dd, id); // `tokenURI()`. } /// @dev Returns the total NFT supply from the base DN404 contract. function totalSupply() public view virtual returns (uint256) { return _readWord(0xe2c79281, 0, 0); // `totalNFTSupply()`. } /// @dev Returns the number of NFT tokens owned by `nftOwner` from the base DN404 contract. /// /// Requirements: /// - `nftOwner` must not be the zero address. function balanceOf(address nftOwner) public view virtual returns (uint256) { return _readWord(0xf5b100ea, uint160(nftOwner), 0); // `balanceOfNFT(address)`. } /// @dev Returns the owner of token `id` from the base DN404 contract. /// /// Requirements: /// - Token `id` must exist. function ownerOf(uint256 id) public view virtual returns (address) { return address(uint160(_readWord(0x6352211e, id, 0))); // `ownerOf(uint256)`. } /// @dev Returns the owner of token `id` from the base DN404 contract. /// Returns `address(0)` instead of reverting if the token does not exist. function ownerAt(uint256 id) public view virtual returns (address) { return address(uint160(_readWord(0x24359879, id, 0))); // `ownerAt(uint256)`. } /// @dev Sets `spender` as the approved account to manage token `id` in /// the base DN404 contract. /// /// Requirements: /// - Token `id` must exist. /// - The caller must be the owner of the token, /// or an approved operator for the token owner. /// /// Emits an {Approval} event. function approve(address spender, uint256 id) public payable virtual { address base = baseERC20(); /// @solidity memory-safe-assembly assembly { spender := shr(96, shl(96, spender)) let m := mload(0x40) mstore(0x00, 0xd10b6e0c) // `approveNFT(address,uint256,address)`. mstore(0x20, spender) mstore(0x40, id) mstore(0x60, caller()) if iszero( and( // Arguments of `and` are evaluated last to first. gt(returndatasize(), 0x1f), // The call must return at least 32 bytes. call(gas(), base, callvalue(), 0x1c, 0x64, 0x00, 0x20) ) ) { returndatacopy(m, 0x00, returndatasize()) revert(m, returndatasize()) } mstore(0x40, m) // Restore the free memory pointer. mstore(0x60, 0) // Restore the zero pointer. // Emit the {Approval} event. log4(codesize(), 0x00, _APPROVAL_EVENT_SIGNATURE, shr(96, mload(0x0c)), spender, id) } } /// @dev Returns the account approved to manage token `id` from /// the base DN404 contract. /// /// Requirements: /// - Token `id` must exist. function getApproved(uint256 id) public view virtual returns (address) { return address(uint160(_readWord(0x081812fc, id, 0))); // `getApproved(uint256)`. } /// @dev Sets whether `operator` is approved to manage the tokens of the caller in /// the base DN404 contract. /// /// Emits an {ApprovalForAll} event. function setApprovalForAll(address operator, bool approved) public virtual { address base = baseERC20(); /// @solidity memory-safe-assembly assembly { operator := shr(96, shl(96, operator)) let m := mload(0x40) mstore(0x00, 0x813500fc) // `setApprovalForAll(address,bool,address)`. mstore(0x20, operator) mstore(0x40, iszero(iszero(approved))) mstore(0x60, caller()) if iszero( and( // Arguments of `and` are evaluated last to first. eq(mload(0x00), 1), // The call must return 1. call(gas(), base, callvalue(), 0x1c, 0x64, 0x00, 0x20) ) ) { returndatacopy(m, 0x00, returndatasize()) revert(m, returndatasize()) } // Emit the {ApprovalForAll} event. // The `approved` value is already at 0x40. log3(0x40, 0x20, _APPROVAL_FOR_ALL_EVENT_SIGNATURE, caller(), operator) mstore(0x40, m) // Restore the free memory pointer. mstore(0x60, 0) // Restore the zero pointer. } } /// @dev Returns whether `operator` is approved to manage the tokens of `nftOwner` from /// the base DN404 contract. function isApprovedForAll(address nftOwner, address operator) public view virtual returns (bool) { // `isApprovedForAll(address,address)`. return _readWord(0xe985e9c5, uint160(nftOwner), uint160(operator)) != 0; } /// @dev Transfers token `id` from `from` to `to`. /// /// Requirements: /// /// - Token `id` must exist. /// - `from` must be the owner of the token. /// - `to` cannot be the zero address. /// - The caller must be the owner of the token, or be approved to manage the token. /// /// Emits a {Transfer} event. function transferFrom(address from, address to, uint256 id) public payable virtual { address base = baseERC20(); /// @solidity memory-safe-assembly assembly { from := shr(96, shl(96, from)) to := shr(96, shl(96, to)) let m := mload(0x40) mstore(m, 0xe5eb36c8) // `transferFromNFT(address,address,uint256,address)`. mstore(add(m, 0x20), from) mstore(add(m, 0x40), to) mstore(add(m, 0x60), id) mstore(add(m, 0x80), caller()) if iszero( and( // Arguments of `and` are evaluated last to first. eq(mload(m), 1), // The call must return 1. call(gas(), base, callvalue(), add(m, 0x1c), 0x84, m, 0x20) ) ) { returndatacopy(m, 0x00, returndatasize()) revert(m, returndatasize()) } // Emit the {Transfer} event. log4(codesize(), 0x00, _TRANSFER_EVENT_SIGNATURE, from, to, id) } } /// @dev Equivalent to `safeTransferFrom(from, to, id, "")`. function safeTransferFrom(address from, address to, uint256 id) public payable virtual { transferFrom(from, to, id); if (_hasCode(to)) _checkOnERC721Received(from, to, id, ""); } /// @dev Transfers token `id` from `from` to `to`. /// /// Requirements: /// /// - Token `id` must exist. /// - `from` must be the owner of the token. /// - `to` cannot be the zero address. /// - The caller must be the owner of the token, or be approved to manage the token. /// - If `to` refers to a smart contract, it must implement /// {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. /// /// Emits a {Transfer} event. function safeTransferFrom(address from, address to, uint256 id, bytes calldata data) public payable virtual { transferFrom(from, to, id); if (_hasCode(to)) _checkOnERC721Received(from, to, id, data); } /// @dev Returns true if this contract implements the interface defined by `interfaceId`. /// See: https://eips.ethereum.org/EIPS/eip-165 /// This function call must use less than 30000 gas. function supportsInterface(bytes4 interfaceId) public view virtual returns (bool result) { /// @solidity memory-safe-assembly assembly { let s := shr(224, interfaceId) // ERC165: 0x01ffc9a7, ERC721: 0x80ac58cd, ERC721Metadata: 0x5b5e139f. result := or(or(eq(s, 0x01ffc9a7), eq(s, 0x80ac58cd)), eq(s, 0x5b5e139f)) } } /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* OWNER SYNCING OPERATIONS */ /*-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»*/ /// @dev Returns the `owner` of the contract, for marketplace signaling purposes. function owner() public view virtual returns (address) { return _getDN404NFTStorage().owner; } /// @dev Permissionless function to pull the owner from the base DN404 contract /// if it implements ownable, for marketplace signaling purposes. function pullOwner() public virtual returns (bool) { address newOwner; address base = baseERC20(); /// @solidity memory-safe-assembly assembly { mstore(0x00, 0x8da5cb5b) // `owner()`. let success := staticcall(gas(), base, 0x1c, 0x04, 0x00, 0x20) newOwner := mul(shr(96, mload(0x0c)), and(gt(returndatasize(), 0x1f), success)) } DN404NFTStorage storage $ = _getDN404NFTStorage(); address oldOwner = $.owner; if (oldOwner != newOwner) { $.owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } return true; } /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* MIRROR OPERATIONS */ /*-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»*/ /// @dev Returns the address of the base DN404 contract. function baseERC20() public view virtual returns (address base) { base = _getDN404NFTStorage().baseERC20; if (base == address(0)) revert NotLinked(); } /// @dev Fallback modifier to execute calls from the base DN404 contract. modifier dn404NFTFallback() virtual { DN404NFTStorage storage $ = _getDN404NFTStorage(); uint256 fnSelector = _calldataload(0x00) >> 224; // `logTransfer(uint256[])`. if (fnSelector == 0x263c69d6) { if (msg.sender != $.baseERC20) revert SenderNotBase(); /// @solidity memory-safe-assembly assembly { let o := add(0x24, calldataload(0x04)) // Packed logs offset. let end := add(o, shl(5, calldataload(sub(o, 0x20)))) for {} iszero(eq(o, end)) { o := add(0x20, o) } { let d := calldataload(o) // Entry in the packed logs. let a := shr(96, d) // The address. let b := and(1, d) // Whether it is a burn. log4( codesize(), 0x00, _TRANSFER_EVENT_SIGNATURE, mul(a, b), // `from`. mul(a, iszero(b)), // `to`. shr(168, shl(160, d)) // `id`. ) } mstore(0x00, 0x01) return(0x00, 0x20) } } // `logDirectTransfer(address,address,uint256[])`. if (fnSelector == 0x144027d3) { if (msg.sender != $.baseERC20) revert SenderNotBase(); /// @solidity memory-safe-assembly assembly { let from := calldataload(0x04) let to := calldataload(0x24) let o := add(0x24, calldataload(0x44)) // Direct logs offset. let end := add(o, shl(5, calldataload(sub(o, 0x20)))) for {} iszero(eq(o, end)) { o := add(0x20, o) } { log4(codesize(), 0x00, _TRANSFER_EVENT_SIGNATURE, from, to, calldataload(o)) } mstore(0x00, 0x01) return(0x00, 0x20) } } // `linkMirrorContract(address)`. if (fnSelector == 0x0f4599e5) { if ($.deployer != address(0)) { if (address(uint160(_calldataload(0x04))) != $.deployer) { revert SenderNotDeployer(); } } if ($.baseERC20 != address(0)) revert AlreadyLinked(); $.baseERC20 = msg.sender; /// @solidity memory-safe-assembly assembly { mstore(0x00, 0x01) return(0x00, 0x20) } } _; } /// @dev Fallback function for calls from base DN404 contract. /// Override this if you need to implement your custom /// fallback with utilities like Solady's `LibZip.cdFallback()`. /// And always remember to always wrap the fallback with `dn404NFTFallback`. fallback() external payable virtual dn404NFTFallback { revert FnSelectorNotRecognized(); // Not mandatory. Just for quality of life. } /// @dev This is to silence the compiler warning. /// Override and remove the revert if you want your contract to receive ETH via receive. receive() external payable virtual { if (msg.value != 0) revert(); } /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* PRIVATE HELPERS */ /*-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»*/ /// @dev Helper to read a string from the base DN404 contract. function _readString(uint256 fnSelector, uint256 arg0) private view returns (string memory result) { address base = baseERC20(); /// @solidity memory-safe-assembly assembly { result := mload(0x40) mstore(0x00, fnSelector) mstore(0x20, arg0) if iszero(staticcall(gas(), base, 0x1c, 0x24, 0x00, 0x00)) { returndatacopy(result, 0x00, returndatasize()) revert(result, returndatasize()) } returndatacopy(0x00, 0x00, 0x20) // Copy the offset of the string in returndata. returndatacopy(result, mload(0x00), 0x20) // Copy the length of the string. returndatacopy(add(result, 0x20), add(mload(0x00), 0x20), mload(result)) // Copy the string. let end := add(add(result, 0x20), mload(result)) mstore(end, 0) // Zeroize the word after the string. mstore(0x40, add(end, 0x20)) // Allocate memory. } } /// @dev Helper to read a word from the base DN404 contract. function _readWord(uint256 fnSelector, uint256 arg0, uint256 arg1) private view returns (uint256 result) { address base = baseERC20(); /// @solidity memory-safe-assembly assembly { let m := mload(0x40) mstore(0x00, fnSelector) mstore(0x20, arg0) mstore(0x40, arg1) if iszero( and( // Arguments of `and` are evaluated last to first. gt(returndatasize(), 0x1f), // The call must return at least 32 bytes. staticcall(gas(), base, 0x1c, 0x44, 0x00, 0x20) ) ) { returndatacopy(m, 0x00, returndatasize()) revert(m, returndatasize()) } mstore(0x40, m) // Restore the free memory pointer. result := mload(0x00) } } /// @dev Returns the calldata value at `offset`. function _calldataload(uint256 offset) private pure returns (uint256 value) { /// @solidity memory-safe-assembly assembly { value := calldataload(offset) } } /// @dev Returns if `a` has bytecode of non-zero length. function _hasCode(address a) private view returns (bool result) { /// @solidity memory-safe-assembly assembly { result := extcodesize(a) // Can handle dirty upper bits. } } /// @dev Perform a call to invoke {IERC721Receiver-onERC721Received} on `to`. /// Reverts if the target does not support the function correctly. function _checkOnERC721Received(address from, address to, uint256 id, bytes memory data) private { /// @solidity memory-safe-assembly assembly { // Prepare the calldata. let m := mload(0x40) let onERC721ReceivedSelector := 0x150b7a02 mstore(m, onERC721ReceivedSelector) mstore(add(m, 0x20), caller()) // The `operator`, which is always `msg.sender`. mstore(add(m, 0x40), shr(96, shl(96, from))) mstore(add(m, 0x60), id) mstore(add(m, 0x80), 0x80) let n := mload(data) mstore(add(m, 0xa0), n) if n { pop(staticcall(gas(), 4, add(data, 0x20), n, add(m, 0xc0), n)) } // Revert if the call reverts. if iszero(call(gas(), to, 0, add(m, 0x1c), add(n, 0xa4), m, 0x20)) { if returndatasize() { // Bubble up the revert if the call reverts. returndatacopy(m, 0x00, returndatasize()) revert(m, returndatasize()) } } // Load the returndata and compare it. if iszero(eq(mload(m), shl(224, onERC721ReceivedSelector))) { mstore(0x00, 0xd1a57ed6) // `TransferToNonERC721ReceiverImplementer()`. revert(0x1c, 0x04) } } } } pragma solidity ^0.8.4; /// @title DN404 /// @notice DN404 is a hybrid ERC20 and ERC721 implementation that mints /// and burns NFTs based on an account's ERC20 token balance. /// /// @author vectorized.eth (@optimizoor) /// @author Quit (@0xQuit) /// @author Michael Amadi (@AmadiMichaels) /// @author cygaar (@0xCygaar) /// @author Thomas (@0xjustadev) /// @author Harrison (@PopPunkOnChain) /// /// @dev Note: /// - The ERC721 data is stored in this base DN404 contract, however a /// DN404Mirror contract ***MUST*** be deployed and linked during /// initialization. abstract contract DN404 { /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* EVENTS */ /*-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»*/ /// @dev Emitted when `amount` tokens is transferred from `from` to `to`. event Transfer(address indexed from, address indexed to, uint256 amount); /// @dev Emitted when `amount` tokens is approved by `owner` to be used by `spender`. event Approval(address indexed owner, address indexed spender, uint256 amount); /// @dev Emitted when `target` sets their skipNFT flag to `status`. event SkipNFTSet(address indexed target, bool status); /// @dev `keccak256(bytes("Transfer(address,address,uint256)"))`. uint256 private constant _TRANSFER_EVENT_SIGNATURE = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef; /// @dev `keccak256(bytes("Approval(address,address,uint256)"))`. uint256 private constant _APPROVAL_EVENT_SIGNATURE = 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925; /// @dev `keccak256(bytes("SkipNFTSet(address,bool)"))`. uint256 private constant _SKIP_NFT_SET_EVENT_SIGNATURE = 0xb5a1de456fff688115a4f75380060c23c8532d14ff85f687cc871456d6420393; /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* CUSTOM ERRORS */ /*-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»*/ /// @dev Thrown when attempting to double-initialize the contract. error DNAlreadyInitialized(); /// @dev Thrown when attempting to transfer or burn more tokens than sender's balance. error InsufficientBalance(); /// @dev Thrown when a spender attempts to transfer tokens with an insufficient allowance. error InsufficientAllowance(); /// @dev Thrown when minting an amount of tokens that would overflow the max tokens. error TotalSupplyOverflow(); /// @dev The unit cannot be zero. error UnitIsZero(); /// @dev Thrown when the caller for a fallback NFT function is not the mirror contract. error SenderNotMirror(); /// @dev Thrown when attempting to transfer tokens to the zero address. error TransferToZeroAddress(); /// @dev Thrown when the mirror address provided for initialization is the zero address. error MirrorAddressIsZero(); /// @dev Thrown when the link call to the mirror contract reverts. error LinkMirrorContractFailed(); /// @dev Thrown when setting an NFT token approval /// and the caller is not the owner or an approved operator. error ApprovalCallerNotOwnerNorApproved(); /// @dev Thrown when transferring an NFT /// and the caller is not the owner or an approved operator. error TransferCallerNotOwnerNorApproved(); /// @dev Thrown when transferring an NFT and the from address is not the current owner. error TransferFromIncorrectOwner(); /// @dev Thrown when checking the owner or approved address for a non-existent NFT. error TokenDoesNotExist(); /// @dev The function selector is not recognized. error FnSelectorNotRecognized(); /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* CONSTANTS */ /*-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»*/ /// @dev The flag to denote that the address data is initialized. uint8 internal constant _ADDRESS_DATA_INITIALIZED_FLAG = 1 << 0; /// @dev The flag to denote that the address should skip NFTs. uint8 internal constant _ADDRESS_DATA_SKIP_NFT_FLAG = 1 << 1; /// @dev The flag to denote that the address has overridden the default Permit2 allowance. uint8 internal constant _ADDRESS_DATA_OVERRIDE_PERMIT2_FLAG = 1 << 2; /// @dev The canonical Permit2 address. /// For signature-based allowance granting for single transaction ERC20 `transferFrom`. /// To enable, override `_givePermit2DefaultInfiniteAllowance()`. /// [Github](https://github.com/Uniswap/permit2) /// [Etherscan](https://etherscan.io/address/0x000000000022D473030F116dDEE9F6B43aC78BA3) address internal constant _PERMIT2 = 0x000000000022D473030F116dDEE9F6B43aC78BA3; /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* STORAGE */ /*-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»*/ /// @dev Struct containing an address's token data and settings. struct AddressData { // Auxiliary data. uint88 aux; // Flags for `initialized` and `skipNFT`. uint8 flags; // The alias for the address. Zero means absence of an alias. uint32 addressAlias; // The number of NFT tokens. uint32 ownedLength; // The token balance in wei. uint96 balance; } /// @dev A uint32 map in storage. struct Uint32Map { uint256 spacer; } /// @dev A bitmap in storage. struct Bitmap { uint256 spacer; } /// @dev A struct to wrap a uint256 in storage. struct Uint256Ref { uint256 value; } /// @dev A mapping of an address pair to a Uint256Ref. struct AddressPairToUint256RefMap { uint256 spacer; } /// @dev Struct containing the base token contract storage. struct DN404Storage { // Current number of address aliases assigned. uint32 numAliases; // Next NFT ID to assign for a mint. uint32 nextTokenId; // The head of the burned pool. uint32 burnedPoolHead; // The tail of the burned pool. uint32 burnedPoolTail; // Total number of NFTs in existence. uint32 totalNFTSupply; // Total supply of tokens. uint96 totalSupply; // Address of the NFT mirror contract. address mirrorERC721; // Mapping of a user alias number to their address. mapping(uint32 => address) aliasToAddress; // Mapping of user operator approvals for NFTs. AddressPairToUint256RefMap operatorApprovals; // Mapping of NFT approvals to approved operators. mapping(uint256 => address) nftApprovals; // Bitmap of whether an non-zero NFT approval may exist. Bitmap mayHaveNFTApproval; // Bitmap of whether a NFT ID exists. Ignored if `_useExistsLookup()` returns false. Bitmap exists; // Mapping of user allowances for ERC20 spenders. AddressPairToUint256RefMap allowance; // Mapping of NFT IDs owned by an address. mapping(address => Uint32Map) owned; // The pool of burned NFT IDs. Uint32Map burnedPool; // Even indices: owner aliases. Odd indices: owned indices. Uint32Map oo; // Mapping of user account AddressData. mapping(address => AddressData) addressData; } /// @dev Returns a storage pointer for DN404Storage. function _getDN404Storage() internal pure virtual returns (DN404Storage storage $) { /// @solidity memory-safe-assembly assembly { // `uint72(bytes9(keccak256("DN404_STORAGE")))`. $.slot := 0xa20d6e21d0e5255308 // Truncate to 9 bytes to reduce bytecode size. } } /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* INITIALIZER */ /*-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»*/ /// @dev Initializes the DN404 contract with an /// `initialTokenSupply`, `initialTokenOwner` and `mirror` NFT contract address. function _initializeDN404( uint256 initialTokenSupply, address initialSupplyOwner, address mirror ) internal virtual { DN404Storage storage $ = _getDN404Storage(); if (_unit() == 0) revert UnitIsZero(); if ($.mirrorERC721 != address(0)) revert DNAlreadyInitialized(); if (mirror == address(0)) revert MirrorAddressIsZero(); /// @solidity memory-safe-assembly assembly { // Make the call to link the mirror contract. mstore(0x00, 0x0f4599e5) // `linkMirrorContract(address)`. mstore(0x20, caller()) if iszero(and(eq(mload(0x00), 1), call(gas(), mirror, 0, 0x1c, 0x24, 0x00, 0x20))) { mstore(0x00, 0xd125259c) // `LinkMirrorContractFailed()`. revert(0x1c, 0x04) } } $.nextTokenId = 1; $.mirrorERC721 = mirror; if (initialTokenSupply != 0) { if (initialSupplyOwner == address(0)) revert TransferToZeroAddress(); if (_totalSupplyOverflows(initialTokenSupply)) revert TotalSupplyOverflow(); $.totalSupply = uint96(initialTokenSupply); AddressData storage initialOwnerAddressData = _addressData(initialSupplyOwner); initialOwnerAddressData.balance = uint96(initialTokenSupply); /// @solidity memory-safe-assembly assembly { // Emit the {Transfer} event. mstore(0x00, initialTokenSupply) log3(0x00, 0x20, _TRANSFER_EVENT_SIGNATURE, 0, shr(96, shl(96, initialSupplyOwner))) } _setSkipNFT(initialSupplyOwner, true); } } /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* BASE UNIT FUNCTION TO OVERRIDE */ /*-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»*/ /// @dev Amount of token balance that is equal to one NFT. function _unit() internal view virtual returns (uint256) { return 10 ** 18; } /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* METADATA FUNCTIONS TO OVERRIDE */ /*-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»*/ /// @dev Returns the name of the token. function name() public view virtual returns (string memory); /// @dev Returns the symbol of the token. function symbol() public view virtual returns (string memory); /// @dev Returns the Uniform Resource Identifier (URI) for token `id`. function tokenURI(uint256 id) public view virtual returns (string memory); /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* CONFIGURABLES */ /*-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»*/ /// @dev Returns if direct NFT transfers should be used during ERC20 transfers /// whenever possible, instead of burning and re-minting. function _useDirectTransfersIfPossible() internal view virtual returns (bool) { return true; } /// @dev Returns if burns should be added to the burn pool. /// This returns false by default, which means the NFT IDs are re-minted in a cycle. function _addToBurnedPool(uint256 totalNFTSupplyAfterBurn, uint256 totalSupplyAfterBurn) internal view virtual returns (bool) { // Silence unused variable compiler warning. totalSupplyAfterBurn = totalNFTSupplyAfterBurn; return false; } /// @dev Returns whether to use the exists bitmap for more efficient /// scanning of an empty token ID slot. /// Recommended for collections that do not use the burn pool, /// and are expected to have nearly all possible NFTs materialized. /// /// Note: The returned value must be constant after initialization. function _useExistsLookup() internal view virtual returns (bool) { return true; } /// @dev Hook that is called after any NFT token transfers, including minting and burning. function _afterNFTTransfer(address from, address to, uint256 id) internal virtual {} /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* ERC20 OPERATIONS */ /*-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»*/ /// @dev Returns the decimals places of the token. Always 18. function decimals() public pure returns (uint8) { return 18; } /// @dev Returns the amount of tokens in existence. function totalSupply() public view virtual returns (uint256) { return uint256(_getDN404Storage().totalSupply); } /// @dev Returns the amount of tokens owned by `owner`. function balanceOf(address owner) public view virtual returns (uint256) { return _getDN404Storage().addressData[owner].balance; } /// @dev Returns the amount of tokens that `spender` can spend on behalf of `owner`. function allowance(address owner, address spender) public view returns (uint256) { if (_givePermit2DefaultInfiniteAllowance() && spender == _PERMIT2) { uint8 flags = _getDN404Storage().addressData[owner].flags; if (flags & _ADDRESS_DATA_OVERRIDE_PERMIT2_FLAG == 0) return type(uint256).max; } return _ref(_getDN404Storage().allowance, owner, spender).value; } /// @dev Sets `amount` as the allowance of `spender` over the caller's tokens. /// /// Emits a {Approval} event. function approve(address spender, uint256 amount) public virtual returns (bool) { _approve(msg.sender, spender, amount); return true; } /// @dev Transfer `amount` tokens from the caller to `to`. /// /// Will burn sender NFTs if balance after transfer is less than /// the amount required to support the current NFT balance. /// /// Will mint NFTs to `to` if the recipient's new balance supports /// additional NFTs ***AND*** the `to` address's skipNFT flag is /// set to false. /// /// Requirements: /// - `from` must at least have `amount`. /// /// Emits a {Transfer} event. function transfer(address to, uint256 amount) public virtual returns (bool) { _transfer(msg.sender, to, amount); return true; } /// @dev Transfers `amount` tokens from `from` to `to`. /// /// Note: Does not update the allowance if it is the maximum uint256 value. /// /// Will burn sender NFTs if balance after transfer is less than /// the amount required to support the current NFT balance. /// /// Will mint NFTs to `to` if the recipient's new balance supports /// additional NFTs ***AND*** the `to` address's skipNFT flag is /// set to false. /// /// Requirements: /// - `from` must at least have `amount`. /// - The caller must have at least `amount` of allowance to transfer the tokens of `from`. /// /// Emits a {Transfer} event. function transferFrom(address from, address to, uint256 amount) public virtual returns (bool) { Uint256Ref storage a = _ref(_getDN404Storage().allowance, from, msg.sender); uint256 allowed = _givePermit2DefaultInfiniteAllowance() && msg.sender == _PERMIT2 && (_getDN404Storage().addressData[from].flags & _ADDRESS_DATA_OVERRIDE_PERMIT2_FLAG) == 0 ? type(uint256).max : a.value; if (allowed != type(uint256).max) { if (amount > allowed) revert InsufficientAllowance(); unchecked { a.value = allowed - amount; } } _transfer(from, to, amount); return true; } /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* PERMIT2 */ /*-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»*/ /// @dev Whether Permit2 has infinite allowances by default for all owners. /// For signature-based allowance granting for single transaction ERC20 `transferFrom`. /// To enable, override this function to return true. function _givePermit2DefaultInfiniteAllowance() internal view virtual returns (bool) { return false; } /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* INTERNAL MINT FUNCTIONS */ /*-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»*/ /// @dev Mints `amount` tokens to `to`, increasing the total supply. /// /// Will mint NFTs to `to` if the recipient's new balance supports /// additional NFTs ***AND*** the `to` address's skipNFT flag is set to false. /// /// Emits a {Transfer} event. function _mint(address to, uint256 amount) internal virtual { if (to == address(0)) revert TransferToZeroAddress(); AddressData storage toAddressData = _addressData(to); DN404Storage storage $ = _getDN404Storage(); if ($.mirrorERC721 == address(0)) revert(); _DNMintTemps memory t; unchecked { uint256 toBalance = uint256(toAddressData.balance) + amount; toAddressData.balance = uint96(toBalance); t.toEnd = toBalance / _unit(); } uint256 maxId; unchecked { uint256 totalSupply_ = uint256($.totalSupply) + amount; $.totalSupply = uint96(totalSupply_); uint256 overflows = _toUint(_totalSupplyOverflows(totalSupply_)); if (overflows | _toUint(totalSupply_ < amount) != 0) revert TotalSupplyOverflow(); maxId = totalSupply_ / _unit(); } unchecked { if (toAddressData.flags & _ADDRESS_DATA_SKIP_NFT_FLAG == 0) { Uint32Map storage toOwned = $.owned[to]; Uint32Map storage oo = $.oo; uint256 toIndex = toAddressData.ownedLength; _DNPackedLogs memory packedLogs = _packedLogsMalloc(_zeroFloorSub(t.toEnd, toIndex)); if (packedLogs.logs.length != 0) { _packedLogsSet(packedLogs, to, 0); $.totalNFTSupply += uint32(packedLogs.logs.length); toAddressData.ownedLength = uint32(t.toEnd); t.toAlias = _registerAndResolveAlias(toAddressData, to); uint32 burnedPoolHead = $.burnedPoolHead; t.burnedPoolTail = $.burnedPoolTail; t.nextTokenId = _wrapNFTId($.nextTokenId, maxId); // Mint loop. do { uint256 id; if (burnedPoolHead != t.burnedPoolTail) { id = _get($.burnedPool, burnedPoolHead++); } else { id = t.nextTokenId; while (_get(oo, _ownershipIndex(id)) != 0) { id = _useExistsLookup() ? _wrapNFTId(_findFirstUnset($.exists, id + 1, maxId + 1), maxId) : _wrapNFTId(id + 1, maxId); } t.nextTokenId = _wrapNFTId(id + 1, maxId); } if (_useExistsLookup()) _set($.exists, id, true); _set(toOwned, toIndex, uint32(id)); _setOwnerAliasAndOwnedIndex(oo, id, t.toAlias, uint32(toIndex++)); _packedLogsAppend(packedLogs, id); _afterNFTTransfer(address(0), to, id); } while (toIndex != t.toEnd); $.nextTokenId = uint32(t.nextTokenId); $.burnedPoolHead = burnedPoolHead; _packedLogsSend(packedLogs, $.mirrorERC721); } } } /// @solidity memory-safe-assembly assembly { // Emit the {Transfer} event. mstore(0x00, amount) log3(0x00, 0x20, _TRANSFER_EVENT_SIGNATURE, 0, shr(96, shl(96, to))) } } /// @dev Mints `amount` tokens to `to`, increasing the total supply. /// This variant mints NFT tokens starting from ID `preTotalSupply / _unit() + 1`. /// This variant will not touch the `burnedPool` and `nextTokenId`. /// /// Will mint NFTs to `to` if the recipient's new balance supports /// additional NFTs ***AND*** the `to` address's skipNFT flag is set to false. /// /// Emits a {Transfer} event. function _mintNext(address to, uint256 amount) internal virtual { if (to == address(0)) revert TransferToZeroAddress(); AddressData storage toAddressData = _addressData(to); DN404Storage storage $ = _getDN404Storage(); if ($.mirrorERC721 == address(0)) revert(); _DNMintTemps memory t; unchecked { uint256 toBalance = uint256(toAddressData.balance) + amount; toAddressData.balance = uint96(toBalance); t.toEnd = toBalance / _unit(); } uint256 startId; uint256 maxId; unchecked { uint256 preTotalSupply = uint256($.totalSupply); startId = preTotalSupply / _unit() + 1; uint256 totalSupply_ = uint256(preTotalSupply) + amount; $.totalSupply = uint96(totalSupply_); uint256 overflows = _toUint(_totalSupplyOverflows(totalSupply_)); if (overflows | _toUint(totalSupply_ < amount) != 0) revert TotalSupplyOverflow(); maxId = totalSupply_ / _unit(); } unchecked { if (toAddressData.flags & _ADDRESS_DATA_SKIP_NFT_FLAG == 0) { Uint32Map storage toOwned = $.owned[to]; Uint32Map storage oo = $.oo; uint256 toIndex = toAddressData.ownedLength; _DNPackedLogs memory packedLogs = _packedLogsMalloc(_zeroFloorSub(t.toEnd, toIndex)); if (packedLogs.logs.length != 0) { _packedLogsSet(packedLogs, to, 0); $.totalNFTSupply += uint32(packedLogs.logs.length); toAddressData.ownedLength = uint32(t.toEnd); t.toAlias = _registerAndResolveAlias(toAddressData, to); // Mint loop. do { uint256 id = startId; while (_get(oo, _ownershipIndex(id)) != 0) { id = _useExistsLookup() ? _wrapNFTId(_findFirstUnset($.exists, id + 1, maxId + 1), maxId) : _wrapNFTId(id + 1, maxId); } startId = _wrapNFTId(id + 1, maxId); if (_useExistsLookup()) _set($.exists, id, true); _set(toOwned, toIndex, uint32(id)); _setOwnerAliasAndOwnedIndex(oo, id, t.toAlias, uint32(toIndex++)); _packedLogsAppend(packedLogs, id); _afterNFTTransfer(address(0), to, id); } while (toIndex != t.toEnd); _packedLogsSend(packedLogs, $.mirrorERC721); } } } /// @solidity memory-safe-assembly assembly { // Emit the {Transfer} event. mstore(0x00, amount) log3(0x00, 0x20, _TRANSFER_EVENT_SIGNATURE, 0, shr(96, shl(96, to))) } } /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* INTERNAL BURN FUNCTIONS */ /*-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»*/ /// @dev Burns `amount` tokens from `from`, reducing the total supply. /// /// Will burn sender NFTs if balance after transfer is less than /// the amount required to support the current NFT balance. /// /// Emits a {Transfer} event. function _burn(address from, uint256 amount) internal virtual { AddressData storage fromAddressData = _addressData(from); DN404Storage storage $ = _getDN404Storage(); if ($.mirrorERC721 == address(0)) revert(); uint256 fromBalance = fromAddressData.balance; if (amount > fromBalance) revert InsufficientBalance(); unchecked { fromAddressData.balance = uint96(fromBalance -= amount); uint256 totalSupply_ = uint256($.totalSupply) - amount; $.totalSupply = uint96(totalSupply_); Uint32Map storage fromOwned = $.owned[from]; uint256 fromIndex = fromAddressData.ownedLength; uint256 numNFTBurns = _zeroFloorSub(fromIndex, fromBalance / _unit()); if (numNFTBurns != 0) { _DNPackedLogs memory packedLogs = _packedLogsMalloc(numNFTBurns); _packedLogsSet(packedLogs, from, 1); bool addToBurnedPool; { uint256 totalNFTSupply = uint256($.totalNFTSupply) - numNFTBurns; $.totalNFTSupply = uint32(totalNFTSupply); addToBurnedPool = _addToBurnedPool(totalNFTSupply, totalSupply_); } Uint32Map storage oo = $.oo; uint256 fromEnd = fromIndex - numNFTBurns; fromAddressData.ownedLength = uint32(fromEnd); uint32 burnedPoolTail = $.burnedPoolTail; // Burn loop. do { uint256 id = _get(fromOwned, --fromIndex); _setOwnerAliasAndOwnedIndex(oo, id, 0, 0); _packedLogsAppend(packedLogs, id); if (_useExistsLookup()) _set($.exists, id, false); if (addToBurnedPool) _set($.burnedPool, burnedPoolTail++, uint32(id)); if (_get($.mayHaveNFTApproval, id)) { _set($.mayHaveNFTApproval, id, false); delete $.nftApprovals[id]; } _afterNFTTransfer(from, address(0), id); } while (fromIndex != fromEnd); if (addToBurnedPool) $.burnedPoolTail = burnedPoolTail; _packedLogsSend(packedLogs, $.mirrorERC721); } } /// @solidity memory-safe-assembly assembly { // Emit the {Transfer} event. mstore(0x00, amount) log3(0x00, 0x20, _TRANSFER_EVENT_SIGNATURE, shr(96, shl(96, from)), 0) } } /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* INTERNAL TRANSFER FUNCTIONS */ /*-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»*/ /// @dev Moves `amount` of tokens from `from` to `to`. /// /// Will burn sender NFTs if balance after transfer is less than /// the amount required to support the current NFT balance. /// /// Will mint NFTs to `to` if the recipient's new balance supports /// additional NFTs ***AND*** the `to` address's skipNFT flag is /// set to false. /// /// Emits a {Transfer} event. function _transfer(address from, address to, uint256 amount) internal virtual { if (to == address(0)) revert TransferToZeroAddress(); AddressData storage fromAddressData = _addressData(from); AddressData storage toAddressData = _addressData(to); DN404Storage storage $ = _getDN404Storage(); if ($.mirrorERC721 == address(0)) revert(); _DNTransferTemps memory t; t.fromOwnedLength = fromAddressData.ownedLength; t.toOwnedLength = toAddressData.ownedLength; t.totalSupply = $.totalSupply; if (amount > (t.fromBalance = fromAddressData.balance)) revert InsufficientBalance(); unchecked { fromAddressData.balance = uint96(t.fromBalance -= amount); toAddressData.balance = uint96(t.toBalance = uint256(toAddressData.balance) + amount); t.numNFTBurns = _zeroFloorSub(t.fromOwnedLength, t.fromBalance / _unit()); if (toAddressData.flags & _ADDRESS_DATA_SKIP_NFT_FLAG == 0) { if (from == to) t.toOwnedLength = t.fromOwnedLength - t.numNFTBurns; t.numNFTMints = _zeroFloorSub(t.toBalance / _unit(), t.toOwnedLength); } while (_useDirectTransfersIfPossible()) { uint256 n = _min(t.fromOwnedLength, _min(t.numNFTBurns, t.numNFTMints)); if (n == 0) break; t.numNFTBurns -= n; t.numNFTMints -= n; if (from == to) { t.toOwnedLength += n; break; } _DNDirectLogs memory directLogs = _directLogsMalloc(n, from, to); Uint32Map storage fromOwned = $.owned[from]; Uint32Map storage toOwned = $.owned[to]; t.toAlias = _registerAndResolveAlias(toAddressData, to); uint256 toIndex = t.toOwnedLength; // Direct transfer loop. do { uint256 id = _get(fromOwned, --t.fromOwnedLength); _set(toOwned, toIndex, uint32(id)); _setOwnerAliasAndOwnedIndex($.oo, id, t.toAlias, uint32(toIndex++)); _directLogsAppend(directLogs, id); if (_get($.mayHaveNFTApproval, id)) { _set($.mayHaveNFTApproval, id, false); delete $.nftApprovals[id]; } _afterNFTTransfer(from, to, id); } while (--n != 0); toAddressData.ownedLength = uint32(t.toOwnedLength = toIndex); fromAddressData.ownedLength = uint32(t.fromOwnedLength); _directLogsSend(directLogs, $.mirrorERC721); break; } t.totalNFTSupply = uint256($.totalNFTSupply) + t.numNFTMints - t.numNFTBurns; $.totalNFTSupply = uint32(t.totalNFTSupply); Uint32Map storage oo = $.oo; _DNPackedLogs memory packedLogs = _packedLogsMalloc(t.numNFTBurns + t.numNFTMints); t.burnedPoolTail = $.burnedPoolTail; if (t.numNFTBurns != 0) { _packedLogsSet(packedLogs, from, 1); bool addToBurnedPool = _addToBurnedPool(t.totalNFTSupply, t.totalSupply); Uint32Map storage fromOwned = $.owned[from]; uint256 fromIndex = t.fromOwnedLength; fromAddressData.ownedLength = uint32(t.fromEnd = fromIndex - t.numNFTBurns); uint32 burnedPoolTail = t.burnedPoolTail; // Burn loop. do { uint256 id = _get(fromOwned, --fromIndex); _setOwnerAliasAndOwnedIndex(oo, id, 0, 0); _packedLogsAppend(packedLogs, id); if (_useExistsLookup()) _set($.exists, id, false); if (addToBurnedPool) _set($.burnedPool, burnedPoolTail++, uint32(id)); if (_get($.mayHaveNFTApproval, id)) { _set($.mayHaveNFTApproval, id, false); delete $.nftApprovals[id]; } _afterNFTTransfer(from, address(0), id); } while (fromIndex != t.fromEnd); if (addToBurnedPool) $.burnedPoolTail = (t.burnedPoolTail = burnedPoolTail); } if (t.numNFTMints != 0) { _packedLogsSet(packedLogs, to, 0); Uint32Map storage toOwned = $.owned[to]; t.toAlias = _registerAndResolveAlias(toAddressData, to); uint256 maxId = t.totalSupply / _unit(); t.nextTokenId = _wrapNFTId($.nextTokenId, maxId); uint256 toIndex = t.toOwnedLength; toAddressData.ownedLength = uint32(t.toEnd = toIndex + t.numNFTMints); uint32 burnedPoolHead = $.burnedPoolHead; // Mint loop. do { uint256 id; if (burnedPoolHead != t.burnedPoolTail) { id = _get($.burnedPool, burnedPoolHead++); } else { id = t.nextTokenId; while (_get(oo, _ownershipIndex(id)) != 0) { id = _useExistsLookup() ? _wrapNFTId(_findFirstUnset($.exists, id + 1, maxId + 1), maxId) : _wrapNFTId(id + 1, maxId); } t.nextTokenId = _wrapNFTId(id + 1, maxId); } if (_useExistsLookup()) _set($.exists, id, true); _set(toOwned, toIndex, uint32(id)); _setOwnerAliasAndOwnedIndex(oo, id, t.toAlias, uint32(toIndex++)); _packedLogsAppend(packedLogs, id); _afterNFTTransfer(address(0), to, id); } while (toIndex != t.toEnd); $.burnedPoolHead = burnedPoolHead; $.nextTokenId = uint32(t.nextTokenId); } if (packedLogs.logs.length != 0) _packedLogsSend(packedLogs, $.mirrorERC721); } /// @solidity memory-safe-assembly assembly { // Emit the {Transfer} event. mstore(0x00, amount) // forgefmt: disable-next-item log3(0x00, 0x20, _TRANSFER_EVENT_SIGNATURE, shr(96, shl(96, from)), shr(96, shl(96, to))) } } /// @dev Transfers token `id` from `from` to `to`. /// /// Requirements: /// /// - Call must originate from the mirror contract. /// - Token `id` must exist. /// - `from` must be the owner of the token. /// - `to` cannot be the zero address. /// `msgSender` must be the owner of the token, or be approved to manage the token. /// /// Emits a {Transfer} event. function _transferFromNFT(address from, address to, uint256 id, address msgSender) internal virtual { if (to == address(0)) revert TransferToZeroAddress(); DN404Storage storage $ = _getDN404Storage(); if ($.mirrorERC721 == address(0)) revert(); Uint32Map storage oo = $.oo; if (from != $.aliasToAddress[_get(oo, _ownershipIndex(_restrictNFTId(id)))]) { revert TransferFromIncorrectOwner(); } if (msgSender != from) { if (_ref($.operatorApprovals, from, msgSender).value == 0) { if (msgSender != $.nftApprovals[id]) { revert TransferCallerNotOwnerNorApproved(); } } } AddressData storage fromAddressData = _addressData(from); AddressData storage toAddressData = _addressData(to); uint256 unit = _unit(); mapping(address => Uint32Map) storage owned = $.owned; Uint32Map storage fromOwned = owned[from]; unchecked { uint256 fromBalance = fromAddressData.balance; if (unit > fromBalance) revert InsufficientBalance(); fromAddressData.balance = uint96(fromBalance - unit); toAddressData.balance += uint96(unit); } if (_get($.mayHaveNFTApproval, id)) { _set($.mayHaveNFTApproval, id, false); delete $.nftApprovals[id]; } unchecked { uint32 updatedId = _get(fromOwned, --fromAddressData.ownedLength); uint32 i = _get(oo, _ownedIndex(id)); _set(fromOwned, i, updatedId); _set(oo, _ownedIndex(updatedId), i); } unchecked { uint32 n = toAddressData.ownedLength++; _set(owned[to], n, uint32(id)); _setOwnerAliasAndOwnedIndex(oo, id, _registerAndResolveAlias(toAddressData, to), n); } _afterNFTTransfer(from, to, id); /// @solidity memory-safe-assembly assembly { // Emit the {Transfer} event. mstore(0x00, unit) // forgefmt: disable-next-item log3(0x00, 0x20, _TRANSFER_EVENT_SIGNATURE, shr(96, shl(96, from)), shr(96, shl(96, to))) } } /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* INTERNAL APPROVE FUNCTIONS */ /*-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»*/ /// @dev Sets `amount` as the allowance of `spender` over the tokens of `owner`. /// /// Emits a {Approval} event. function _approve(address owner, address spender, uint256 amount) internal virtual { if (_givePermit2DefaultInfiniteAllowance() && spender == _PERMIT2) { _getDN404Storage().addressData[owner].flags |= _ADDRESS_DATA_OVERRIDE_PERMIT2_FLAG; } _ref(_getDN404Storage().allowance, owner, spender).value = amount; /// @solidity memory-safe-assembly assembly { // Emit the {Approval} event. mstore(0x00, amount) // forgefmt: disable-next-item log3(0x00, 0x20, _APPROVAL_EVENT_SIGNATURE, shr(96, shl(96, owner)), shr(96, shl(96, spender))) } } /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* DATA HITCHHIKING FUNCTIONS */ /*-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»*/ /// @dev Returns the auxiliary data for `owner`. /// Minting, transferring, burning the tokens of `owner` will not change the auxiliary data. /// Auxiliary data can be set for any address, even if it does not have any tokens. function _getAux(address owner) internal view virtual returns (uint88) { return _getDN404Storage().addressData[owner].aux; } /// @dev Set the auxiliary data for `owner` to `value`. /// Minting, transferring, burning the tokens of `owner` will not change the auxiliary data. /// Auxiliary data can be set for any address, even if it does not have any tokens. function _setAux(address owner, uint88 value) internal virtual { _getDN404Storage().addressData[owner].aux = value; } /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* SKIP NFT FUNCTIONS */ /*-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»*/ /// @dev Returns true if minting and transferring ERC20s to `owner` will skip minting NFTs. /// Returns false otherwise. function getSkipNFT(address owner) public view virtual returns (bool) { AddressData storage d = _getDN404Storage().addressData[owner]; if (d.flags & _ADDRESS_DATA_INITIALIZED_FLAG == 0) return _hasCode(owner); return d.flags & _ADDRESS_DATA_SKIP_NFT_FLAG != 0; } /// @dev Sets the caller's skipNFT flag to `skipNFT`. Returns true. /// /// Emits a {SkipNFTSet} event. function setSkipNFT(bool skipNFT) public virtual returns (bool) { _setSkipNFT(msg.sender, skipNFT); return true; } /// @dev Internal function to set account `owner` skipNFT flag to `state` /// /// Initializes account `owner` AddressData if it is not currently initialized. /// /// Emits a {SkipNFTSet} event. function _setSkipNFT(address owner, bool state) internal virtual { AddressData storage d = _addressData(owner); if ((d.flags & _ADDRESS_DATA_SKIP_NFT_FLAG != 0) != state) { d.flags ^= _ADDRESS_DATA_SKIP_NFT_FLAG; } /// @solidity memory-safe-assembly assembly { mstore(0x00, iszero(iszero(state))) log2(0x00, 0x20, _SKIP_NFT_SET_EVENT_SIGNATURE, shr(96, shl(96, owner))) } } /// @dev Returns a storage data pointer for account `owner` AddressData /// /// Initializes account `owner` AddressData if it is not currently initialized. function _addressData(address owner) internal virtual returns (AddressData storage d) { d = _getDN404Storage().addressData[owner]; unchecked { if (d.flags & _ADDRESS_DATA_INITIALIZED_FLAG == 0) { uint256 skipNFT = _toUint(_hasCode(owner)) * _ADDRESS_DATA_SKIP_NFT_FLAG; d.flags = uint8(skipNFT | _ADDRESS_DATA_INITIALIZED_FLAG); } } } /// @dev Returns the `addressAlias` of account `to`. /// /// Assigns and registers the next alias if `to` alias was not previously registered. function _registerAndResolveAlias(AddressData storage toAddressData, address to) internal virtual returns (uint32 addressAlias) { DN404Storage storage $ = _getDN404Storage(); addressAlias = toAddressData.addressAlias; if (addressAlias == 0) { unchecked { addressAlias = ++$.numAliases; } toAddressData.addressAlias = addressAlias; $.aliasToAddress[addressAlias] = to; if (addressAlias == 0) revert(); // Overflow. } } /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* MIRROR OPERATIONS */ /*-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»*/ /// @dev Returns the address of the mirror NFT contract. function mirrorERC721() public view virtual returns (address) { return _getDN404Storage().mirrorERC721; } /// @dev Returns the total NFT supply. function _totalNFTSupply() internal view virtual returns (uint256) { return _getDN404Storage().totalNFTSupply; } /// @dev Returns `owner` NFT balance. function _balanceOfNFT(address owner) internal view virtual returns (uint256) { return _getDN404Storage().addressData[owner].ownedLength; } /// @dev Returns the owner of token `id`. /// Returns the zero address instead of reverting if the token does not exist. function _ownerAt(uint256 id) internal view virtual returns (address) { DN404Storage storage $ = _getDN404Storage(); return $.aliasToAddress[_get($.oo, _ownershipIndex(_restrictNFTId(id)))]; } /// @dev Returns the owner of token `id`. /// /// Requirements: /// - Token `id` must exist. function _ownerOf(uint256 id) internal view virtual returns (address) { if (!_exists(id)) revert TokenDoesNotExist(); return _ownerAt(id); } /// @dev Returns if token `id` exists. function _exists(uint256 id) internal view virtual returns (bool) { return _ownerAt(id) != address(0); } /// @dev Returns the account approved to manage token `id`. /// /// Requirements: /// - Token `id` must exist. function _getApproved(uint256 id) internal view virtual returns (address) { if (!_exists(id)) revert TokenDoesNotExist(); return _getDN404Storage().nftApprovals[id]; } /// @dev Sets `spender` as the approved account to manage token `id`, using `msgSender`. /// /// Requirements: /// - `msgSender` must be the owner or an approved operator for the token owner. function _approveNFT(address spender, uint256 id, address msgSender) internal virtual returns (address owner) { DN404Storage storage $ = _getDN404Storage(); owner = $.aliasToAddress[_get($.oo, _ownershipIndex(_restrictNFTId(id)))]; if (msgSender != owner) { if (_ref($.operatorApprovals, owner, msgSender).value == 0) { revert ApprovalCallerNotOwnerNorApproved(); } } $.nftApprovals[id] = spender; _set($.mayHaveNFTApproval, id, spender != address(0)); } /// @dev Approve or remove the `operator` as an operator for `msgSender`, /// without authorization checks. function _setApprovalForAll(address operator, bool approved, address msgSender) internal virtual { _ref(_getDN404Storage().operatorApprovals, msgSender, operator).value = _toUint(approved); } /// @dev Returns the NFT IDs of `owner` in range `[begin, end)`. /// Optimized for smaller bytecode size, as this function is intended for off-chain calling. function _ownedIds(address owner, uint256 begin, uint256 end) internal view virtual returns (uint256[] memory ids) { DN404Storage storage $ = _getDN404Storage(); Uint32Map storage owned = $.owned[owner]; uint256 n = _min($.addressData[owner].ownedLength, end); /// @solidity memory-safe-assembly assembly { ids := mload(0x40) let i := begin for {} lt(i, n) { i := add(i, 1) } { let s := add(shl(96, owned.slot), shr(3, i)) // Storage slot. let id := and(0xffffffff, shr(shl(5, and(i, 7)), sload(s))) mstore(add(add(ids, 0x20), shl(5, sub(i, begin))), id) // Append to. } mstore(ids, sub(i, begin)) // Store the length. mstore(0x40, add(add(ids, 0x20), shl(5, sub(i, begin)))) // Allocate memory. } } /// @dev Fallback modifier to dispatch calls from the mirror NFT contract /// to internal functions in this contract. modifier dn404Fallback() virtual { DN404Storage storage $ = _getDN404Storage(); uint256 fnSelector = _calldataload(0x00) >> 224; address mirror = $.mirrorERC721; // `transferFromNFT(address,address,uint256,address)`. if (fnSelector == 0xe5eb36c8) { if (msg.sender != mirror) revert SenderNotMirror(); _transferFromNFT( address(uint160(_calldataload(0x04))), // `from`. address(uint160(_calldataload(0x24))), // `to`. _calldataload(0x44), // `id`. address(uint160(_calldataload(0x64))) // `msgSender`. ); _return(1); } // `setApprovalForAll(address,bool,address)`. if (fnSelector == 0x813500fc) { if (msg.sender != mirror) revert SenderNotMirror(); _setApprovalForAll( address(uint160(_calldataload(0x04))), // `spender`. _calldataload(0x24) != 0, // `status`. address(uint160(_calldataload(0x44))) // `msgSender`. ); _return(1); } // `isApprovedForAll(address,address)`. if (fnSelector == 0xe985e9c5) { if (msg.sender != mirror) revert SenderNotMirror(); Uint256Ref storage ref = _ref( $.operatorApprovals, address(uint160(_calldataload(0x04))), // `owner`. address(uint160(_calldataload(0x24))) // `operator`. ); _return(ref.value); } // `ownerOf(uint256)`. if (fnSelector == 0x6352211e) { if (msg.sender != mirror) revert SenderNotMirror(); _return(uint160(_ownerOf(_calldataload(0x04)))); } // `ownerAt(uint256)`. if (fnSelector == 0x24359879) { if (msg.sender != mirror) revert SenderNotMirror(); _return(uint160(_ownerAt(_calldataload(0x04)))); } // `approveNFT(address,uint256,address)`. if (fnSelector == 0xd10b6e0c) { if (msg.sender != mirror) revert SenderNotMirror(); address owner = _approveNFT( address(uint160(_calldataload(0x04))), // `spender`. _calldataload(0x24), // `id`. address(uint160(_calldataload(0x44))) // `msgSender`. ); _return(uint160(owner)); } // `getApproved(uint256)`. if (fnSelector == 0x081812fc) { if (msg.sender != mirror) revert SenderNotMirror(); _return(uint160(_getApproved(_calldataload(0x04)))); } // `balanceOfNFT(address)`. if (fnSelector == 0xf5b100ea) { if (msg.sender != mirror) revert SenderNotMirror(); _return(_balanceOfNFT(address(uint160(_calldataload(0x04))))); } // `totalNFTSupply()`. if (fnSelector == 0xe2c79281) { if (msg.sender != mirror) revert SenderNotMirror(); _return(_totalNFTSupply()); } // `implementsDN404()`. if (fnSelector == 0xb7a94eb8) { _return(1); } _; } /// @dev Fallback function for calls from mirror NFT contract. /// Override this if you need to implement your custom /// fallback with utilities like Solady's `LibZip.cdFallback()`. /// And always remember to always wrap the fallback with `dn404Fallback`. fallback() external payable virtual dn404Fallback { revert FnSelectorNotRecognized(); // Not mandatory. Just for quality of life. } /// @dev This is to silence the compiler warning. /// Override and remove the revert if you want your contract to receive ETH via receive. receive() external payable virtual { if (msg.value != 0) revert(); } /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* INTERNAL / PRIVATE HELPERS */ /*-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»*/ /// @dev Returns `(i - 1) << 1`. function _ownershipIndex(uint256 i) internal pure returns (uint256) { unchecked { return (i - 1) << 1; // Minus 1 as token IDs start from 1. } } /// @dev Returns `((i - 1) << 1) + 1`. function _ownedIndex(uint256 i) internal pure returns (uint256) { unchecked { return ((i - 1) << 1) + 1; // Minus 1 as token IDs start from 1. } } /// @dev Returns the uint32 value at `index` in `map`. function _get(Uint32Map storage map, uint256 index) internal view returns (uint32 result) { /// @solidity memory-safe-assembly assembly { let s := add(shl(96, map.slot), shr(3, index)) // Storage slot. result := and(0xffffffff, shr(shl(5, and(index, 7)), sload(s))) } } /// @dev Updates the uint32 value at `index` in `map`. function _set(Uint32Map storage map, uint256 index, uint32 value) internal { /// @solidity memory-safe-assembly assembly { let s := add(shl(96, map.slot), shr(3, index)) // Storage slot. let o := shl(5, and(index, 7)) // Storage slot offset (bits). let v := sload(s) // Storage slot value. sstore(s, xor(v, shl(o, and(0xffffffff, xor(value, shr(o, v)))))) } } /// @dev Sets the owner alias and the owned index together. function _setOwnerAliasAndOwnedIndex( Uint32Map storage map, uint256 id, uint32 ownership, uint32 ownedIndex ) internal { /// @solidity memory-safe-assembly assembly { let i := sub(id, 1) // Index of the uint64 combined value. let s := add(shl(96, map.slot), shr(2, i)) // Storage slot. let v := sload(s) // Storage slot value. let o := shl(6, and(i, 3)) // Storage slot offset (bits). let combined := or(shl(32, ownedIndex), and(0xffffffff, ownership)) sstore(s, xor(v, shl(o, and(0xffffffffffffffff, xor(shr(o, v), combined))))) } } /// @dev Returns the boolean value of the bit at `index` in `bitmap`. function _get(Bitmap storage bitmap, uint256 index) internal view returns (bool result) { /// @solidity memory-safe-assembly assembly { let s := add(shl(96, bitmap.slot), shr(8, index)) // Storage slot. result := and(1, shr(and(0xff, index), sload(s))) } } /// @dev Updates the bit at `index` in `bitmap` to `value`. function _set(Bitmap storage bitmap, uint256 index, bool value) internal { /// @solidity memory-safe-assembly assembly { let s := add(shl(96, bitmap.slot), shr(8, index)) // Storage slot. let o := and(0xff, index) // Storage slot offset (bits). sstore(s, or(and(sload(s), not(shl(o, 1))), shl(o, iszero(iszero(value))))) } } /// @dev Returns the index of the least significant unset bit in `[begin, end)`. /// If no unset bit is found, returns `type(uint256).max`. function _findFirstUnset(Bitmap storage bitmap, uint256 begin, uint256 end) internal view returns (uint256 unsetBitIndex) { /// @solidity memory-safe-assembly assembly { unsetBitIndex := not(0) // Initialize to `type(uint256).max`. let s := shl(96, bitmap.slot) // Storage offset of the bitmap. let bucket := add(s, shr(8, begin)) let negBits := shl(and(0xff, begin), shr(and(0xff, begin), not(sload(bucket)))) if iszero(negBits) { let lastBucket := add(s, shr(8, end)) for {} 1 {} { bucket := add(bucket, 1) negBits := not(sload(bucket)) if or(negBits, gt(bucket, lastBucket)) { break } } if gt(bucket, lastBucket) { negBits := shr(and(0xff, not(end)), shl(and(0xff, not(end)), negBits)) } } if negBits { // Find-first-set routine. let b := and(negBits, add(not(negBits), 1)) // Isolate the least significant bit. let r := shl(7, lt(0xffffffffffffffffffffffffffffffff, b)) r := or(r, shl(6, lt(0xffffffffffffffff, shr(r, b)))) r := or(r, shl(5, lt(0xffffffff, shr(r, b)))) // For the remaining 32 bits, use a De Bruijn lookup. // forgefmt: disable-next-item r := or(r, byte(and(div(0xd76453e0, shr(r, b)), 0x1f), 0x001f0d1e100c1d070f090b19131c1706010e11080a1a141802121b1503160405)) r := or(shl(8, sub(bucket, s)), r) unsetBitIndex := or(r, sub(0, or(iszero(lt(r, end)), lt(r, begin)))) } } } /// @dev Returns a storage reference to the value at (`a0`, `a1`) in `map`. function _ref(AddressPairToUint256RefMap storage map, address a0, address a1) internal pure returns (Uint256Ref storage ref) { /// @solidity memory-safe-assembly assembly { mstore(0x28, a1) mstore(0x14, a0) mstore(0x00, map.slot) ref.slot := keccak256(0x00, 0x48) // Clear the part of the free memory pointer that was overwritten. mstore(0x28, 0x00) } } /// @dev Wraps the NFT ID. function _wrapNFTId(uint256 id, uint256 maxId) internal pure returns (uint256 result) { /// @solidity memory-safe-assembly assembly { result := or(mul(iszero(gt(id, maxId)), id), gt(id, maxId)) } } /// @dev Returns `id > type(uint32).max ? 0 : id`. function _restrictNFTId(uint256 id) internal pure returns (uint256 result) { /// @solidity memory-safe-assembly assembly { result := mul(id, lt(id, 0x100000000)) } } /// @dev Returns whether `amount` is a valid `totalSupply`. function _totalSupplyOverflows(uint256 amount) internal view returns (bool result) { uint256 unit = _unit(); /// @solidity memory-safe-assembly assembly { result := iszero(iszero(or(shr(96, amount), lt(0xfffffffe, div(amount, unit))))) } } /// @dev Returns `max(0, x - y)`. function _zeroFloorSub(uint256 x, uint256 y) internal pure returns (uint256 z) { /// @solidity memory-safe-assembly assembly { z := mul(gt(x, y), sub(x, y)) } } /// @dev Returns `x < y ? x : y`. function _min(uint256 x, uint256 y) internal pure returns (uint256 z) { /// @solidity memory-safe-assembly assembly { z := xor(x, mul(xor(x, y), lt(y, x))) } } /// @dev Returns `b ? 1 : 0`. function _toUint(bool b) internal pure returns (uint256 result) { /// @solidity memory-safe-assembly assembly { result := iszero(iszero(b)) } } /// @dev Struct containing direct transfer log data for {Transfer} events to be /// emitted by the mirror NFT contract. struct _DNDirectLogs { uint256 offset; address from; address to; uint256[] logs; } /// @dev Initiates memory allocation for direct logs with `n` log items. function _directLogsMalloc(uint256 n, address from, address to) private pure returns (_DNDirectLogs memory p) { /// @solidity memory-safe-assembly assembly { // Note that `p` implicitly allocates and advances the free memory pointer by // 4 words, which we can safely mutate in `_directLogsSend`. let logs := mload(0x40) mstore(logs, n) // Store the length. let offset := add(0x20, logs) // Skip the word for `p.logs.length`. mstore(0x40, add(offset, shl(5, n))) // Allocate memory. mstore(add(0x60, p), logs) // Set `p.logs`. mstore(add(0x40, p), to) // Set `p.to`. mstore(add(0x20, p), from) // Set `p.from`. mstore(p, offset) // Set `p.offset`. } } /// @dev Adds a direct log item to `p` with token `id`. function _directLogsAppend(_DNDirectLogs memory p, uint256 id) private pure { /// @solidity memory-safe-assembly assembly { let offset := mload(p) mstore(offset, id) mstore(p, add(offset, 0x20)) } } /// @dev Calls the `mirror` NFT contract to emit {Transfer} events for packed logs `p`. function _directLogsSend(_DNDirectLogs memory p, address mirror) private { /// @solidity memory-safe-assembly assembly { let logs := mload(add(p, 0x60)) let n := add(0x84, shl(5, mload(logs))) // Length of calldata to send. let o := sub(logs, 0x80) // Start of calldata to send. mstore(o, 0x144027d3) // `logDirectTransfer(address,address,uint256[])`. let from := mload(add(0x20, p)) let to := mload(add(0x40, p)) mstore(add(o, 0x20), from) mstore(add(o, 0x40), to) mstore(add(o, 0x60), 0x60) // Offset of `logs` in the calldata to send. if iszero(and(eq(mload(o), 1), call(gas(), mirror, 0, add(o, 0x1c), n, o, 0x20))) { revert(o, 0x00) } } } /// @dev Struct containing packed log data for {Transfer} events to be /// emitted by the mirror NFT contract. struct _DNPackedLogs { uint256 offset; uint256 addressAndBit; uint256[] logs; } /// @dev Initiates memory allocation for packed logs with `n` log items. function _packedLogsMalloc(uint256 n) private pure returns (_DNPackedLogs memory p) { /// @solidity memory-safe-assembly assembly { // Note that `p` implicitly allocates and advances the free memory pointer by // 3 words, which we can safely mutate in `_packedLogsSend`. let logs := mload(0x40) mstore(logs, n) // Store the length. let offset := add(0x20, logs) // Skip the word for `p.logs.length`. mstore(0x40, add(offset, shl(5, n))) // Allocate memory. mstore(add(0x40, p), logs) // Set `p.logs`. mstore(p, offset) // Set `p.offset`. } } /// @dev Set the current address and the burn bit. function _packedLogsSet(_DNPackedLogs memory p, address a, uint256 burnBit) private pure { /// @solidity memory-safe-assembly assembly { mstore(add(p, 0x20), or(shl(96, a), burnBit)) // Set `p.addressAndBit`. } } /// @dev Adds a packed log item to `p` with token `id`. function _packedLogsAppend(_DNPackedLogs memory p, uint256 id) private pure { /// @solidity memory-safe-assembly assembly { let offset := mload(p) mstore(offset, or(mload(add(p, 0x20)), shl(8, id))) // `p.addressAndBit | (id << 8)`. mstore(p, add(offset, 0x20)) } } /// @dev Calls the `mirror` NFT contract to emit {Transfer} events for packed logs `p`. function _packedLogsSend(_DNPackedLogs memory p, address mirror) private { /// @solidity memory-safe-assembly assembly { let logs := mload(add(p, 0x40)) let o := sub(logs, 0x40) // Start of calldata to send. mstore(o, 0x263c69d6) // `logTransfer(uint256[])`. mstore(add(o, 0x20), 0x20) // Offset of `logs` in the calldata to send. let n := add(0x44, shl(5, mload(logs))) // Length of calldata to send. if iszero(and(eq(mload(o), 1), call(gas(), mirror, 0, add(o, 0x1c), n, o, 0x20))) { revert(o, 0x00) } } } /// @dev Struct of temporary variables for transfers. struct _DNTransferTemps { uint256 numNFTBurns; uint256 numNFTMints; uint256 fromBalance; uint256 toBalance; uint256 fromOwnedLength; uint256 toOwnedLength; uint256 totalSupply; uint256 totalNFTSupply; uint256 fromEnd; uint256 toEnd; uint32 toAlias; uint256 nextTokenId; uint32 burnedPoolTail; } /// @dev Struct of temporary variables for mints. struct _DNMintTemps { uint256 nextTokenId; uint32 burnedPoolTail; uint256 toEnd; uint32 toAlias; } /// @dev Returns if `a` has bytecode of non-zero length. function _hasCode(address a) private view returns (bool result) { /// @solidity memory-safe-assembly assembly { result := extcodesize(a) // Can handle dirty upper bits. } } /// @dev Returns the calldata value at `offset`. function _calldataload(uint256 offset) private pure returns (uint256 value) { /// @solidity memory-safe-assembly assembly { value := calldataload(offset) } } /// @dev Executes a return opcode to return `x` and end the current call frame. function _return(uint256 x) private pure { /// @solidity memory-safe-assembly assembly { mstore(0x00, x) return(0x00, 0x20) } } } // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; /** * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } /** * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful. */ function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove(IERC20 token, address spender, uint256 value) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } /** * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 oldAllowance = token.allowance(address(this), spender); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value)); } /** * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value)); } } /** * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. Compatible with tokens that require the approval to be set to * 0 before setting it to a non-zero value. */ function forceApprove(IERC20 token, address spender, uint256 value) internal { bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value); if (!_callOptionalReturnBool(token, approvalCall)) { _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0)); _callOptionalReturn(token, approvalCall); } } /** * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`. * Revert on invalid signature. */ function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). * * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead. */ function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false // and not revert is the subcall reverts. (bool success, bytes memory returndata) = address(token).call(data); return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token)); } } // 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); } pragma solidity >=0.5.0; interface IUniswapV2Factory { event PairCreated(address indexed token0, address indexed token1, address pair, uint); function feeTo() external view returns (address); function feeToSetter() external view returns (address); function getPair(address tokenA, address tokenB) external view returns (address pair); function allPairs(uint) external view returns (address pair); function allPairsLength() external view returns (uint); function createPair(address tokenA, address tokenB) external returns (address pair); function setFeeTo(address) external; function setFeeToSetter(address) external; } pragma solidity >=0.6.2; interface IUniswapV2Router02 is IUniswapV2Router01 { function removeLiquidityETHSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountETH); function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountETH); function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint amountOutMin, address[] calldata path, address to, uint deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; } // OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * * Furthermore, `isContract` will also return true if the target contract within * the same transaction is already scheduled for destruction by `SELFDESTRUCT`, * which only has an effect at the end of a transaction. * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } // OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol) pragma solidity 0.8.23; /// @title BaseERC404 /// @notice A standard ERC404 token contract BaseERC404 is DN404, BaseToken { string private _name; string private _symbol; string private _baseURI; IUniswapV2Router02 public router; address public pair; address tokenFactory; uint256 private tokenLiquidityThreshold; bool public isSwapping; constructor( IERC20 _wnt, IUniswapV2Router02 _univ2router, address _treasury, string memory name_, string memory symbol_, string memory baseURI_, uint96 _totalSupply, uint256 _tokenLiquidityThreshold, IUniswapV2Factory univ2factory ) BaseToken(_wnt, _univ2router, _treasury) { _name = name_; _symbol = symbol_; _baseURI = baseURI_; _initializeDN404( _totalSupply, // initialTokenSupply msg.sender, // initialSupplyOwner, TokenFactory address(new DN404Mirror(address(0))) // Mirror ); tokenFactory = msg.sender; pair = univ2factory.createPair(address(this), address(_wnt)); router = _univ2router; tokenLiquidityThreshold = _tokenLiquidityThreshold; _approve(address(this), address(router), type(uint256).max); isSwapping = false; } function name() public view override returns (string memory) { return _name; } function symbol() public view override returns (string memory) { return _symbol; } function tokenURI( uint256 _tokenId ) public view override returns (string memory _result) { if (bytes(_baseURI).length != 0) _result = string( abi.encodePacked(_baseURI, Strings.toString(_tokenId)) ); } function _transfer( address from, address to, uint256 value ) internal override { require(value > 0, "Transfer amount must be greater than zero"); uint256 fee = 0; if (to == pair || from == pair) { if (!(to == address(this) || from == address(this))) { if (from != tokenFactory) { fee = ((value * SWAP_TAX) / PRECISION); if (from != pair) { handle_fees(); } } } } super._transfer(from, to, value - fee); if (fee > 0) { super._transfer(from, address(this), fee); } } function handle_fees() private { uint256 contractBalance = balanceOf(address(this)); if (contractBalance >= tokenLiquidityThreshold) { swapTokensForETH(contractBalance); } } function swapTokensForETH(uint256 tokenAmount) private { if (isSwapping) return; isSwapping = true; address[] memory path = new address[](2); path[0] = address(this); path[1] = router.WETH(); router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, treasury, block.timestamp ); isSwapping = false; } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"contract IERC20","name":"_wnt","type":"address"},{"internalType":"contract IUniswapV2Router02","name":"_univ2router","type":"address"},{"internalType":"address","name":"_treasury","type":"address"},{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"},{"internalType":"string","name":"baseURI_","type":"string"},{"internalType":"uint96","name":"_totalSupply","type":"uint96"},{"internalType":"uint256","name":"_tokenLiquidityThreshold","type":"uint256"},{"internalType":"contract IUniswapV2Factory","name":"univ2factory","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"DNAlreadyInitialized","type":"error"},{"inputs":[],"name":"FnSelectorNotRecognized","type":"error"},{"inputs":[],"name":"InsufficientAllowance","type":"error"},{"inputs":[],"name":"InsufficientBalance","type":"error"},{"inputs":[],"name":"LinkMirrorContractFailed","type":"error"},{"inputs":[],"name":"MirrorAddressIsZero","type":"error"},{"inputs":[],"name":"SenderNotMirror","type":"error"},{"inputs":[],"name":"TokenDoesNotExist","type":"error"},{"inputs":[],"name":"TotalSupplyOverflow","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"UnitIsZero","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":"target","type":"address"},{"indexed":false,"internalType":"bool","name":"status","type":"bool"}],"name":"SkipNFTSet","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":"Transfer","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"PRECISION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SWAP_TAX","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"getSkipNFT","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isSwapping","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mirrorERC721","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pair","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"router","outputs":[{"internalType":"contract IUniswapV2Router02","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"skipNFT","type":"bool"}],"name":"setSkipNFT","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"_result","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasury","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"univ2router","outputs":[{"internalType":"contract IUniswapV2Router02","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"wnt","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60e06040523480156200001157600080fd5b5060405162003bc338038062003bc3833981016040819052620000349162000735565b60016000556001600160a01b03808a1660a05280891660c05287166080528888884660fc0362000193576040516001600160a01b0382166024820152734392dc16867d53dbfe227076606455634d4c279590819060440160408051601f198184030181529181526020820180516001600160e01b03166302b8a21d60e01b17905251620000c291906200082f565b6000604051808303816000865af19150503d806000811462000101576040519150601f19603f3d011682016040523d82523d6000602084013e62000106565b606091505b505060408051600481526024810182526020810180516001600160e01b03166325ce9a3760e01b17905290516001600160a01b03841692506200014a91906200082f565b6000604051808303816000865af19150503d806000811462000189576040519150601f19603f3d011682016040523d82523d6000602084013e6200018e565b606091505b505050505b5060019150620001a690508782620008de565b506002620001b58682620008de565b506003620001c48582620008de565b5062000218836001600160601b0316336000604051620001e4906200061c565b6001600160a01b039091168152602001604051809103906000f08015801562000211573d6000803e3d6000fd5b50620002fc565b600680546001600160a01b031916331790556040516364e329cb60e11b81523060048201526001600160a01b038a8116602483015282169063c9c65396906044016020604051808303816000875af115801562000279573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200029f9190620009aa565b600580546001600160a01b039283166001600160a01b03199182161790915560048054928b1692909116821790556007839055620002e2903090600019620004be565b50506008805460ff1916905550620009d195505050505050565b68a20d6e21d0e52553095468a20d6e21d0e5255308906001600160a01b0316156200033a57604051633ab534b960e21b815260040160405180910390fd5b6001600160a01b03821662000362576040516339a84a7b60e01b815260040160405180910390fd5b630f4599e560005233602052602060006024601c6000865af160016000511416620003955763d125259c6000526004601cfd5b805463ffffffff60201b19166401000000001781556001810180546001600160a01b0384166001600160a01b03199091161790558315620004b8576001600160a01b038316620003f857604051633a954ecd60e21b815260040160405180910390fd5b606084901c670de0b6b3a7640000850463fffffffe1017156200042e5760405163e5cfe95760e01b815260040160405180910390fd5b80546001600160a01b0316600160a01b6001600160601b038616021781556000620004598462000520565b80546001600160601b038716600160a01b026001600160a01b0391821617825560008781529192508516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef602082a3620004b68460016200058b565b505b50505050565b6028828152601484905268a20d6e21d0e525530f600090815260488120915281905560008181526001600160a01b0380841691908516907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590602090a3505050565b6001600160a01b038116600090815268a20d6e21d0e525531360205260408120805490916b01000000000000000000000090910460011690036200058657805460ff60581b19166b01000000000000000000000060ff843b151560020260011716021781555b919050565b6000620005988362000520565b80549091506b0100000000000000000000009004600216151582151514620005e457805460ff6b01000000000000000000000080830482166002189091160260ff60581b199091161781555b8115156000528260601b60601c7fb5a1de456fff688115a4f75380060c23c8532d14ff85f687cc871456d642039360206000a2505050565b610d8b8062002e3883390190565b6001600160a01b03811681146200064057600080fd5b50565b805162000586816200062a565b634e487b7160e01b600052604160045260246000fd5b60005b838110156200068357818101518382015260200162000669565b50506000910152565b600082601f8301126200069e57600080fd5b81516001600160401b0380821115620006bb57620006bb62000650565b604051601f8301601f19908116603f01168101908282118183101715620006e657620006e662000650565b816040528381528660208588010111156200070057600080fd5b6200071384602083016020890162000666565b9695505050505050565b80516001600160601b03811681146200058657600080fd5b60008060008060008060008060006101208a8c0312156200075557600080fd5b620007608a62000643565b98506200077060208b0162000643565b97506200078060408b0162000643565b60608b01519097506001600160401b03808211156200079e57600080fd5b620007ac8d838e016200068c565b975060808c0151915080821115620007c357600080fd5b620007d18d838e016200068c565b965060a08c0151915080821115620007e857600080fd5b50620007f78c828d016200068c565b9450506200080860c08b016200071d565b925060e08a01519150620008206101008b0162000643565b90509295985092959850929598565b600082516200084381846020870162000666565b9190910192915050565b600181811c908216806200086257607f821691505b6020821081036200088357634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620008d9576000816000526020600020601f850160051c81016020861015620008b45750805b601f850160051c820191505b81811015620008d557828155600101620008c0565b5050505b505050565b81516001600160401b03811115620008fa57620008fa62000650565b62000912816200090b84546200084d565b8462000889565b602080601f8311600181146200094a5760008415620009315750858301515b600019600386901b1c1916600185901b178555620008d5565b600085815260208120601f198616915b828110156200097b578886015182559484019460019091019084016200095a565b50858210156200099a5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600060208284031215620009bd57600080fd5b8151620009ca816200062a565b9392505050565b60805160a05160c05161243062000a0860003960006105900152600061050d0152600081816106660152611e3401526124306000f3fe60806040526004361061012e5760003560e01c806361d027b3116100ab578063a9059cbb1161006f578063a9059cbb146106f2578063aaf5eb6814610712578063b886311514610728578063c87b56dd14610742578063dd62ed3e14610762578063f887ea40146107a157610140565b806361d027b31461065457806370a082311461068857806395d89b41146106a857806399e37dff146106bd578063a8aa1b31146106d257610140565b806323b872dd116100f257806323b872dd146105b2578063274e430b146105d25780632a6a935d146105f2578063313ce567146106125780634ef41efc1461062e57610140565b806306fdde03146104a0578063095ea7b3146104cb578063126846ec146104fb57806318160ddd1461054757806319eff2b91461057e57610140565b3661014057341561013e57600080fd5b005b68a20d6e21d0e52553095468a20d6e21d0e52553089060003560e01c906001600160a01b031663e5eb36c88290036101b957336001600160a01b0382161461019b5760405163ce5a776b60e01b815260040160405180910390fd5b6101af6004356024356044356064356107c1565b6101b96001610b51565b8163813500fc0361022157336001600160a01b038216146101ed5760405163ce5a776b60e01b815260040160405180910390fd5b600435602890815260443560145268a20d6e21d0e525530b6000908152604881209152602435151590556102216001610b51565b8163e985e9c50361027f57336001600160a01b038216146102555760405163ce5a776b60e01b815260040160405180910390fd5b6024356028908152600435601452600384016000908152604881209152805461027d90610b51565b505b81636352211e036102cf57336001600160a01b038216146102b35760405163ce5a776b60e01b815260040160405180910390fd5b6102cf6102c1600435610b5b565b6001600160a01b0316610b51565b8163243598790361031157336001600160a01b038216146103035760405163ce5a776b60e01b815260040160405180910390fd5b6103116102c1600435610b92565b8163d10b6e0c0361036e57336001600160a01b038216146103455760405163ce5a776b60e01b815260040160405180910390fd5b6000610358600435602435604435610bef565b905061036c816001600160a01b0316610b51565b505b8163081812fc036103b057336001600160a01b038216146103a25760405163ce5a776b60e01b815260040160405180910390fd5b6103b06102c1600435610ce7565b8163f5b100ea0361041d57336001600160a01b038216146103e45760405163ce5a776b60e01b815260040160405180910390fd5b6001600160a01b0360043516600090815268a20d6e21d0e5255313602052604090205461041d90600160801b900463ffffffff16610b51565b8163e2c792810361047257336001600160a01b038216146104515760405163ce5a776b60e01b815260040160405180910390fd5b68a20d6e21d0e52553085461047290600160801b900463ffffffff16610b51565b8163b7a94eb803610487576104876001610b51565b604051631e085ca760e11b815260040160405180910390fd5b3480156104ac57600080fd5b506104b5610d33565b6040516104c2919061207e565b60405180910390f35b3480156104d757600080fd5b506104eb6104e63660046120c6565b610dc5565b60405190151581526020016104c2565b34801561050757600080fd5b5061052f7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016104c2565b34801561055357600080fd5b5068a20d6e21d0e525530854600160a01b90046001600160601b03165b6040519081526020016104c2565b34801561058a57600080fd5b5061052f7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105be57600080fd5b506104eb6105cd3660046120f2565b610ddb565b3480156105de57600080fd5b506104eb6105ed366004612133565b610e49565b3480156105fe57600080fd5b506104eb61060d366004612150565b610e98565b34801561061e57600080fd5b50604051601281526020016104c2565b34801561063a57600080fd5b5068a20d6e21d0e5255309546001600160a01b031661052f565b34801561066057600080fd5b5061052f7f000000000000000000000000000000000000000000000000000000000000000081565b34801561069457600080fd5b506105706106a3366004612133565b610eac565b3480156106b457600080fd5b506104b5610edf565b3480156106c957600080fd5b50610570607d81565b3480156106de57600080fd5b5060055461052f906001600160a01b031681565b3480156106fe57600080fd5b506104eb61070d3660046120c6565b610eee565b34801561071e57600080fd5b5061057061271081565b34801561073457600080fd5b506008546104eb9060ff1681565b34801561074e57600080fd5b506104b561075d366004612172565b610efb565b34801561076e57600080fd5b5061057061077d36600461218b565b602890815260149190915268a20d6e21d0e525530f60009081526048812091525490565b3480156107ad57600080fd5b5060045461052f906001600160a01b031681565b6001600160a01b0383166107e857604051633a954ecd60e21b815260040160405180910390fd5b68a20d6e21d0e52553095468a20d6e21d0e5255308906001600160a01b031661081057600080fd5b600a810160028201600061085a83610836640100000000891089025b6000190160011b90565b60008160031c8360601b0180546007841660051b1c63ffffffff1691505092915050565b63ffffffff1681526020810191909152604001600020546001600160a01b0387811691161461089b5760405162a1148160e81b815260040160405180910390fd5b856001600160a01b0316836001600160a01b0316146109115760288381526014879052600383016000908152604881209152546000036109115760008481526004830160205260409020546001600160a01b0384811691161461091157604051632ce44b5f60e11b815260040160405180910390fd5b600061091c87610f44565b9050600061092987610f44565b6001600160a01b038916600090815260088601602081905260409091208454929350670de0b6b3a764000092600160a01b90046001600160601b03168084111561098657604051631e9acf1760e31b815260040160405180910390fd5b85546001600160601b03918590038216600160a01b9081026001600160a01b039283161788558654818104841687019093160291161784556005870160601b60088a901c015460ff8a161c60011615610a12576005870160601b60088a901c018054600160ff8c161b191690556000898152600488016020526040902080546001600160a01b03191690555b845463ffffffff60801b198116600160801b9182900463ffffffff90811660001901808216909302919091178755606083901b631fffffff600384901c16015460009260e060059190911b161c1690506000610a78886000198d01600190811b01610836565b9050610a8b838263ffffffff1684610fa4565b610aa68860001963ffffffff851601600190811b0183610fa4565b5050835463ffffffff60801b198116600160801b9182900463ffffffff908116600181019091169092021785556001600160a01b038b166000908152602084905260409020610af690828c610fa4565b610b0b878b610b05888f610fcf565b84611062565b50826000528960601b60601c8b60601b60601c7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60206000a35050505050505050505050565b8060005260206000f35b6000610b66826110a5565b610b835760405163677510db60e11b815260040160405180910390fd5b610b8c82610b92565b92915050565b600068a20d6e21d0e525530868a20d6e21d0e525530a82610bc868a20d6e21d0e52553126108366401000000008810880261082c565b63ffffffff1681526020810191909152604001600020546001600160a01b03169392505050565b600068a20d6e21d0e525530868a20d6e21d0e525530a82610c2568a20d6e21d0e52553126108366401000000008910890261082c565b63ffffffff1681526020810191909152604001600020546001600160a01b03908116925083168214610c8b576028838152601483905260038201600090815260488120915254600003610c8b576040516367d9dca160e11b815260040160405180910390fd5b6000848152600482016020526040902080546001600160a01b0319166001600160a01b0387169081179091556005820160601b600886901c018054600160ff881690811b1991909116921515901b919091179055509392505050565b6000610cf2826110a5565b610d0f5760405163677510db60e11b815260040160405180910390fd5b50600090815268a20d6e21d0e525530c60205260409020546001600160a01b031690565b606060018054610d42906121c4565b80601f0160208091040260200160405190810160405280929190818152602001828054610d6e906121c4565b8015610dbb5780601f10610d9057610100808354040283529160200191610dbb565b820191906000526020600020905b815481529060010190602001808311610d9e57829003601f168201915b5050505050905090565b6000610dd23384846110c2565b50600192915050565b336028908152601484905268a20d6e21d0e525530f6000908152604881209181905281549091906000198114610e325780841115610e2c576040516313be252b60e01b815260040160405180910390fd5b83810382555b610e3d868686611124565b50600195945050505050565b6001600160a01b038116600090815268a20d6e21d0e5255313602052604081208054600160581b90046001168203610e8557823b5b9392505050565b54600160581b9004600216151592915050565b6000610ea43383611256565b506001919050565b6001600160a01b0316600090815268a20d6e21d0e52553136020526040902054600160a01b90046001600160601b031690565b606060028054610d42906121c4565b6000610dd2338484611124565b606060038054610f0a906121c4565b159050610f3f576003610f1c836112d4565b604051602001610f2d92919061221a565b60405160208183030381529060405290505b919050565b6001600160a01b038116600090815268a20d6e21d0e52553136020526040812080549091600160581b9091046001169003610f3f57805460ff60581b1916600160581b60ff933b1515600202600117939093169290920291909117815590565b8160031c8360601b016007831660051b815480821c841863ffffffff16821b81188355505050505050565b8154600160601b900463ffffffff1668a20d6e21d0e5255308600082900361105b57805463ffffffff198116600163ffffffff928316019182169081178355855463ffffffff60601b1916600160601b82021786556000818152600284016020526040812080546001600160a01b0319166001600160a01b038816179055919350900361105b57600080fd5b5092915050565b600183038060021c8560601b0180546003831660061b92508463ffffffff168460201b178082851c1867ffffffffffffffff16841b821883555050505050505050565b6000806110b183610b92565b6001600160a01b0316141592915050565b6028828152601484905268a20d6e21d0e525530f600090815260488120915281905560008181526001600160a01b0380841691908516907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590602090a3505050565b6000811161118a5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b606482015260840160405180910390fd5b6005546000906001600160a01b03848116911614806111b657506005546001600160a01b038581169116145b1561122b576001600160a01b0383163014806111da57506001600160a01b03841630145b61122b576006546001600160a01b0385811691161461122b57612710611201607d846122dc565b61120b9190612309565b6005549091506001600160a01b0385811691161461122b5761122b611367565b61123f848461123a848661232b565b611389565b801561125057611250843083611389565b50505050565b600061126183610f44565b8054909150600160581b900460021615158215151461129c57805460ff600160581b80830482166002189091160260ff60581b199091161781555b8115156000528260601b60601c7fb5a1de456fff688115a4f75380060c23c8532d14ff85f687cc871456d642039360206000a2505050565b606060006112e183611c25565b600101905060008167ffffffffffffffff8111156113015761130161233e565b6040519080825280601f01601f19166020018201604052801561132b576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508461133557509392505050565b600061137230610eac565b905060075481106113865761138681611cfd565b50565b6001600160a01b0382166113b057604051633a954ecd60e21b815260040160405180910390fd5b60006113bb84610f44565b905060006113c884610f44565b68a20d6e21d0e52553095490915068a20d6e21d0e5255308906001600160a01b03166113f357600080fd5b61146a604051806101a0016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600063ffffffff16815260200160008152602001600063ffffffff1681525090565b835463ffffffff600160801b808304821660808501528554041660a083015282546001600160601b03600160a01b91829004811660c0850152910416604082018190528511156114cd57604051631e9acf1760e31b815260040160405180910390fd5b6040810180518690039081905284546001600160601b03918216600160a01b9081026001600160a01b0392831617875585548181048416890160608601819052909316029116178355608081015161154a9061152e670de0b6b3a764000090565b836040015181611540576115406122f3565b0480821191030290565b81528254600160581b90046002166000036115b957856001600160a01b0316876001600160a01b03160361158657805160808201510360a08201525b6115b3670de0b6b3a76400008260600151816115a4576115a46122f3565b048260a0015180821191030290565b60208201525b60006115e682608001516115db84600001518560200151808218908211021890565b808218908211021890565b9050806000036115f657506117ca565b8151819003825260208201805182900390526001600160a01b038088169089160361162b5760a08201805190910190526117ca565b604080516080810182526000808252602080830182815283850183815260608086019081528651888152600589901b81018501885290819052908d9052908d9052810183526001600160a01b03808d16835260088801909152838220908b16825292902090919061169c878b610fcf565b63ffffffff1661014086015260a08501515b6080860180516000190190819052600381901c606085901b015460009160051b60e0161c63ffffffff1663ffffffff1690506116eb838383610fa4565b61170588600a018289610140015185806001019650611062565b84518181526020018552600881901c6005890160601b015460ff82161c60011615611763576005880160601b600882901c018054600160ff84161b191690556000818152600489016020526040902080546001600160a01b03191690555b506000198501946000036001016116ae5760a08601819052875463ffffffff808316600160801b90810263ffffffff60801b19938416178b5560808901518c54921602911617895560018701546117c49085906001600160a01b0316611e9c565b50505050505b80516020820151835463ffffffff600160801b8083048216840185900360e087018190529091160263ffffffff60801b19909116178455600a8401916000916118139101611ef0565b8454600160601b900463ffffffff166101808501528351909150156119a657606089901b6001176020828101919091526001600160a01b038a16600090815260088601909152604081206080850151855181036101008701819052895463ffffffff909116600160801b0263ffffffff60801b199091161789556101808601515b60001991909101600381901c606084901b0154909190600583901b60e0161c63ffffffff166118c68782600080611062565b8551602080880151600884901b1782520186526006890160601b600882901c018054600160ff84161b19169055841561191357611913896009018380600101945063ffffffff1683610fa4565b600881901c60058a0160601b015460ff82161c60011615611967576005890160601b600882901c018054600160ff84161b19169055600081815260048a016020526040902080546001600160a01b03191690555b5086610100015182036118945783156119a15763ffffffff81166101808801819052885463ffffffff60601b1916600160601b9091021788555b505050505b602083015115611bbe57606088901b60208201526001600160a01b038816600090815260088501602052604090206119de868a610fcf565b63ffffffff166101408501526000670de0b6b3a76400008560c0015181611a0757611a076122f3565b87549190049150640100000000900463ffffffff1681811180159091021761016086015260a0850151602086015181016101208701819052885463ffffffff60801b1916600160801b63ffffffff928316021789558754600160401b9004165b600087610180015163ffffffff168263ffffffff1614611ab7576009890160601b631fffffff600384901c160154600183019260e060059190911b161c63ffffffff1663ffffffff169050611b19565b506101608701515b611ad087600019830160011b610836565b63ffffffff1615611b0557611afe611af28a6006018360010187600101611f37565b85811180159091021790565b9050611abf565b600181018481118015909102176101608901525b600881901c60068a0160601b018054600160ff84161b8019909116179055611b42858483610fa4565b611b5987828a610140015186806001019750611062565b8551602080880151600884901b178252018652508661012001518203611a6757875461016088015163ffffffff9081166401000000000267ffffffff000000001991909316600160401b02166bffffffffffffffff0000000019909116171787555050505b60408101515115611be2576001840154611be29082906001600160a01b031661201e565b5050846000528560601b60601c8760601b60601c7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60206000a350505050505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310611c645772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310611c90576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310611cae57662386f26fc10000830492506010015b6305f5e1008310611cc6576305f5e100830492506008015b6127108310611cda57612710830492506004015b60648310611cec576064830492506002015b600a8310610b8c5760010192915050565b60085460ff1615611d0b5750565b6008805460ff191660011790556040805160028082526060820183526000926020830190803683370190505090503081600081518110611d4d57611d4d612354565b60200260200101906001600160a01b031690816001600160a01b031681525050600460009054906101000a90046001600160a01b03166001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015611dc0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611de4919061236a565b81600181518110611df757611df7612354565b6001600160a01b0392831660209182029290920101526004805460405163791ac94760e01b815292169163791ac94791611e5c91869160009187917f000000000000000000000000000000000000000000000000000000000000000091429101612387565b600060405180830381600087803b158015611e7657600080fd5b505af1158015611e8a573d6000803e3d6000fd5b50506008805460ff1916905550505050565b6060820151805160051b60840160808203915063144027d3825283602001518460400151816020850152806040850152505060608083015260208282601c85016000875af160018351141661125057600082fd5b611f1460405180606001604052806000815260200160008152602001606081525090565b604051828152806020018360051b81016040528183604001528083525050919050565b6000801990508360601b8360081c81018054198560ff161c8560ff161b80611f8c578460081c83015b6001830192508254199150808311821715611f605780831115611f8a5760ff86191691821b90911c905b505b80156120145782820360081b7e1f0d1e100c1d070f090b19131c1706010e11080a1a141802121b1503160405821960010183166fffffffffffffffffffffffffffffffff811160071b81811c67ffffffffffffffff1060061b1781811c63ffffffff1060051b1790811c63d76453e004601f169190911a171785811015878210176000031793505b5050509392505050565b60408201516040810363263c69d68152602080820152815160051b604401915060208183601c84016000875af160018251141661125057600081fd5b60005b8381101561207557818101518382015260200161205d565b50506000910152565b602081526000825180602084015261209d81604085016020870161205a565b601f01601f19169190910160400192915050565b6001600160a01b038116811461138657600080fd5b600080604083850312156120d957600080fd5b82356120e4816120b1565b946020939093013593505050565b60008060006060848603121561210757600080fd5b8335612112816120b1565b92506020840135612122816120b1565b929592945050506040919091013590565b60006020828403121561214557600080fd5b8135610e7e816120b1565b60006020828403121561216257600080fd5b81358015158114610e7e57600080fd5b60006020828403121561218457600080fd5b5035919050565b6000806040838503121561219e57600080fd5b82356121a9816120b1565b915060208301356121b9816120b1565b809150509250929050565b600181811c908216806121d857607f821691505b6020821081036121f857634e487b7160e01b600052602260045260246000fd5b50919050565b6000815161221081856020860161205a565b9290920192915050565b60008084548160018260011c9150600183168061223857607f831692505b6020808410820361225757634e487b7160e01b86526022600452602486fd5b81801561226b5760018114612280576122ad565b60ff19861689528415158502890196506122ad565b60008b81526020902060005b868110156122a55781548b82015290850190830161228c565b505084890196505b5050505050506122bd81856121fe565b95945050505050565b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417610b8c57610b8c6122c6565b634e487b7160e01b600052601260045260246000fd5b60008261232657634e487b7160e01b600052601260045260246000fd5b500490565b81810381811115610b8c57610b8c6122c6565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60006020828403121561237c57600080fd5b8151610e7e816120b1565b600060a08201878352602087602085015260a0604085015281875180845260c08601915060208901935060005b818110156123d95784516001600160a01b0316835293830193918301916001016123b4565b50506001600160a01b0396909616606085015250505060800152939250505056fea26469706673582212206a5d879c091983fcabef0f9ead22900339abb07de9b63742128105d0364f055864736f6c63430008170033608060405234801561001057600080fd5b50604051610d8b380380610d8b83398101604081905261002f9161005c565b683602298b8c10b0123180546001600160a01b0319166001600160a01b039290921691909117905561008c565b60006020828403121561006e57600080fd5b81516001600160a01b038116811461008557600080fd5b9392505050565b610cf08061009b6000396000f3fe60806040526004361061010d5760003560e01c80636cef16e61161009557806397e5311c1161006457806397e5311c146104d7578063a22cb465146104ec578063b88d4fde1461050c578063c87b56dd1461051f578063e985e9c51461053f5761011f565b80636cef16e61461046757806370a082311461047c5780638da5cb5b1461049c57806395d89b41146104c25761011f565b806318160ddd116100dc57806318160ddd146103de57806323b872dd14610401578063243598791461041457806342842e0e146104345780636352211e146104475761011f565b806301ffc9a71461031f57806306fdde0314610371578063081812fc14610393578063095ea7b3146103cb5761011f565b3661011f57341561011d57600080fd5b005b683602298b8c10b0123060003560e01c63263c69d68190036101d55781546001600160a01b0316331461016557604051631b1e598960e11b815260040160405180910390fd5b600435602401602081033560051b81015b8082146101c85781358060601c816001168260a01b60a81c811583028284027fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600038a4505050816020019150610176565b5050600160005260206000f35b8063144027d30361026b5781546001600160a01b0316331461020a57604051631b1e598960e11b815260040160405180910390fd5b600435602435604435602401602081033560051b81015b80821461025c57813583857fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600038a4816020019150610221565b50505050600160005260206000f35b80630f4599e5036103065760018201546001600160a01b0316156102c15760018201546001600160a01b03166004356001600160a01b0316146102c1576040516362cf623d60e11b815260040160405180910390fd5b81546001600160a01b0316156102ea57604051635fb2b52360e11b815260040160405180910390fd5b81546001600160a01b0319163317825560016000908152602090f35b604051631e085ca760e11b815260040160405180910390fd5b34801561032b57600080fd5b5061035c61033a366004610a7a565b6301ffc9a760e09190911c9081146380ac58cd821417635b5e139f9091141790565b60405190151581526020015b60405180910390f35b34801561037d57600080fd5b5061038661055f565b6040516103689190610aab565b34801561039f57600080fd5b506103b36103ae366004610afa565b610575565b6040516001600160a01b039091168152602001610368565b61011d6103d9366004610b2f565b61058d565b3480156103ea57600080fd5b506103f3610613565b604051908152602001610368565b61011d61040f366004610b59565b610625565b34801561042057600080fd5b506103b361042f366004610afa565b6106b4565b61011d610442366004610b59565b6106c6565b34801561045357600080fd5b506103b3610462366004610afa565b6106f8565b34801561047357600080fd5b5061035c61070a565b34801561048857600080fd5b506103f3610497366004610b95565b6107c5565b3480156104a857600080fd5b50683602298b8c10b01232546001600160a01b03166103b3565b3480156104ce57600080fd5b506103866107e0565b3480156104e357600080fd5b506103b36107f1565b3480156104f857600080fd5b5061011d610507366004610bb0565b610826565b61011d61051a366004610bec565b6108a9565b34801561052b57600080fd5b5061038661053a366004610afa565b610904565b34801561054b57600080fd5b5061035c61055a366004610c87565b610914565b60606105706306fdde036000610940565b905090565b600061058763081812fc8360006109a6565b92915050565b60006105976107f1565b90508260601b60601c925060405163d10b6e0c600052836020528260405233606052602060006064601c34865af1601f3d11166105d7573d6000823e3d81fd5b806040525060006060528183600c5160601c7f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600038a4505050565b600061057063e2c792816000806109a6565b600061062f6107f1565b90508360601b60601c93508260601b60601c925060405163e5eb36c881528460208201528360408201528260608201523360808201526020816084601c840134865af1600182511416610685573d6000823e3d81fd5b508183857fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600038a450505050565b600061058763243598798360006109a6565b6106d1838383610625565b813b156106f3576106f3838383604051806020016040528060008152506109ee565b505050565b6000610587636352211e8360006109a6565b60008060006107176107f1565b9050638da5cb5b600052602060006004601c845afa600c51683602298b8c10b0123254601f3d119290921660609190911c029250683602298b8c10b01230906001600160a01b0390811690841681146107ba576002820180546001600160a01b0319166001600160a01b0386811691821790925560405190918316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35b600194505050505090565b600061058763f5b100ea836001600160a01b031660006109a6565b60606105706395d89b416000610940565b683602298b8c10b01230546001600160a01b03168061082357604051632d9523d760e11b815260040160405180910390fd5b90565b60006108306107f1565b90508260601b60601c925060405163813500fc6000528360205282151560405233606052602060006064601c34865af160016000511416610874573d6000823e3d81fd5b83337f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3160206040a36040525050600060605250565b6108b4858585610625565b833b156108fd576108fd85858585858080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506109ee92505050565b5050505050565b606061058763c87b56dd83610940565b600061093763e985e9c5846001600160a01b0316846001600160a01b03166109a6565b15159392505050565b6060600061094c6107f1565b9050604051915083600052826020526000806024601c845afa610972573d6000833e3d82fd5b60206000803e6020600051833e8151602060005101602084013e815160208301016000815260208101604052505092915050565b6000806109b16107f1565b9050604051856000528460205283604052602060006044601c855afa601f3d11166109df573d6000823e3d81fd5b60405250506000519392505050565b60405163150b7a028082523360208301528560601b60601c604083015283606083015260808083015282518060a08401528015610a35578060c08401826020870160045afa505b60208360a48301601c860160008a5af1610a58573d15610a58573d6000843e3d83fd5b508060e01b825114610a725763d1a57ed66000526004601cfd5b505050505050565b600060208284031215610a8c57600080fd5b81356001600160e01b031981168114610aa457600080fd5b9392505050565b60006020808352835180602085015260005b81811015610ad957858101830151858201604001528201610abd565b506000604082860101526040601f19601f8301168501019250505092915050565b600060208284031215610b0c57600080fd5b5035919050565b80356001600160a01b0381168114610b2a57600080fd5b919050565b60008060408385031215610b4257600080fd5b610b4b83610b13565b946020939093013593505050565b600080600060608486031215610b6e57600080fd5b610b7784610b13565b9250610b8560208501610b13565b9150604084013590509250925092565b600060208284031215610ba757600080fd5b610aa482610b13565b60008060408385031215610bc357600080fd5b610bcc83610b13565b915060208301358015158114610be157600080fd5b809150509250929050565b600080600080600060808688031215610c0457600080fd5b610c0d86610b13565b9450610c1b60208701610b13565b935060408601359250606086013567ffffffffffffffff80821115610c3f57600080fd5b818801915088601f830112610c5357600080fd5b813581811115610c6257600080fd5b896020828501011115610c7457600080fd5b9699959850939650602001949392505050565b60008060408385031215610c9a57600080fd5b610ca383610b13565b9150610cb160208401610b13565b9050925092905056fea26469706673582212208292be7b9e6e4702a992db95c86b40b6a19145922563b146b28acdc87a60f8dc64736f6c63430008170033000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d0000000000000000000000006086c9b923c301d936129de4c0ffec16d11f93e90000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001a00000000000000000000000000000000000000000000000056bc75e2d6310000000000000000000000000000000000000000000000000000000470de4df8200000000000000000000000000005c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f00000000000000000000000000000000000000000000000000000000000000074558495433363900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000745584954333639000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000036697066733a2f2f516d584e536938454446633448754754624a4c7847474b444838786350315755644d7154646a59515535736556562f00000000000000000000
Deployed Bytecode
0x60806040526004361061012e5760003560e01c806361d027b3116100ab578063a9059cbb1161006f578063a9059cbb146106f2578063aaf5eb6814610712578063b886311514610728578063c87b56dd14610742578063dd62ed3e14610762578063f887ea40146107a157610140565b806361d027b31461065457806370a082311461068857806395d89b41146106a857806399e37dff146106bd578063a8aa1b31146106d257610140565b806323b872dd116100f257806323b872dd146105b2578063274e430b146105d25780632a6a935d146105f2578063313ce567146106125780634ef41efc1461062e57610140565b806306fdde03146104a0578063095ea7b3146104cb578063126846ec146104fb57806318160ddd1461054757806319eff2b91461057e57610140565b3661014057341561013e57600080fd5b005b68a20d6e21d0e52553095468a20d6e21d0e52553089060003560e01c906001600160a01b031663e5eb36c88290036101b957336001600160a01b0382161461019b5760405163ce5a776b60e01b815260040160405180910390fd5b6101af6004356024356044356064356107c1565b6101b96001610b51565b8163813500fc0361022157336001600160a01b038216146101ed5760405163ce5a776b60e01b815260040160405180910390fd5b600435602890815260443560145268a20d6e21d0e525530b6000908152604881209152602435151590556102216001610b51565b8163e985e9c50361027f57336001600160a01b038216146102555760405163ce5a776b60e01b815260040160405180910390fd5b6024356028908152600435601452600384016000908152604881209152805461027d90610b51565b505b81636352211e036102cf57336001600160a01b038216146102b35760405163ce5a776b60e01b815260040160405180910390fd5b6102cf6102c1600435610b5b565b6001600160a01b0316610b51565b8163243598790361031157336001600160a01b038216146103035760405163ce5a776b60e01b815260040160405180910390fd5b6103116102c1600435610b92565b8163d10b6e0c0361036e57336001600160a01b038216146103455760405163ce5a776b60e01b815260040160405180910390fd5b6000610358600435602435604435610bef565b905061036c816001600160a01b0316610b51565b505b8163081812fc036103b057336001600160a01b038216146103a25760405163ce5a776b60e01b815260040160405180910390fd5b6103b06102c1600435610ce7565b8163f5b100ea0361041d57336001600160a01b038216146103e45760405163ce5a776b60e01b815260040160405180910390fd5b6001600160a01b0360043516600090815268a20d6e21d0e5255313602052604090205461041d90600160801b900463ffffffff16610b51565b8163e2c792810361047257336001600160a01b038216146104515760405163ce5a776b60e01b815260040160405180910390fd5b68a20d6e21d0e52553085461047290600160801b900463ffffffff16610b51565b8163b7a94eb803610487576104876001610b51565b604051631e085ca760e11b815260040160405180910390fd5b3480156104ac57600080fd5b506104b5610d33565b6040516104c2919061207e565b60405180910390f35b3480156104d757600080fd5b506104eb6104e63660046120c6565b610dc5565b60405190151581526020016104c2565b34801561050757600080fd5b5061052f7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b6040516001600160a01b0390911681526020016104c2565b34801561055357600080fd5b5068a20d6e21d0e525530854600160a01b90046001600160601b03165b6040519081526020016104c2565b34801561058a57600080fd5b5061052f7f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d81565b3480156105be57600080fd5b506104eb6105cd3660046120f2565b610ddb565b3480156105de57600080fd5b506104eb6105ed366004612133565b610e49565b3480156105fe57600080fd5b506104eb61060d366004612150565b610e98565b34801561061e57600080fd5b50604051601281526020016104c2565b34801561063a57600080fd5b5068a20d6e21d0e5255309546001600160a01b031661052f565b34801561066057600080fd5b5061052f7f0000000000000000000000006086c9b923c301d936129de4c0ffec16d11f93e981565b34801561069457600080fd5b506105706106a3366004612133565b610eac565b3480156106b457600080fd5b506104b5610edf565b3480156106c957600080fd5b50610570607d81565b3480156106de57600080fd5b5060055461052f906001600160a01b031681565b3480156106fe57600080fd5b506104eb61070d3660046120c6565b610eee565b34801561071e57600080fd5b5061057061271081565b34801561073457600080fd5b506008546104eb9060ff1681565b34801561074e57600080fd5b506104b561075d366004612172565b610efb565b34801561076e57600080fd5b5061057061077d36600461218b565b602890815260149190915268a20d6e21d0e525530f60009081526048812091525490565b3480156107ad57600080fd5b5060045461052f906001600160a01b031681565b6001600160a01b0383166107e857604051633a954ecd60e21b815260040160405180910390fd5b68a20d6e21d0e52553095468a20d6e21d0e5255308906001600160a01b031661081057600080fd5b600a810160028201600061085a83610836640100000000891089025b6000190160011b90565b60008160031c8360601b0180546007841660051b1c63ffffffff1691505092915050565b63ffffffff1681526020810191909152604001600020546001600160a01b0387811691161461089b5760405162a1148160e81b815260040160405180910390fd5b856001600160a01b0316836001600160a01b0316146109115760288381526014879052600383016000908152604881209152546000036109115760008481526004830160205260409020546001600160a01b0384811691161461091157604051632ce44b5f60e11b815260040160405180910390fd5b600061091c87610f44565b9050600061092987610f44565b6001600160a01b038916600090815260088601602081905260409091208454929350670de0b6b3a764000092600160a01b90046001600160601b03168084111561098657604051631e9acf1760e31b815260040160405180910390fd5b85546001600160601b03918590038216600160a01b9081026001600160a01b039283161788558654818104841687019093160291161784556005870160601b60088a901c015460ff8a161c60011615610a12576005870160601b60088a901c018054600160ff8c161b191690556000898152600488016020526040902080546001600160a01b03191690555b845463ffffffff60801b198116600160801b9182900463ffffffff90811660001901808216909302919091178755606083901b631fffffff600384901c16015460009260e060059190911b161c1690506000610a78886000198d01600190811b01610836565b9050610a8b838263ffffffff1684610fa4565b610aa68860001963ffffffff851601600190811b0183610fa4565b5050835463ffffffff60801b198116600160801b9182900463ffffffff908116600181019091169092021785556001600160a01b038b166000908152602084905260409020610af690828c610fa4565b610b0b878b610b05888f610fcf565b84611062565b50826000528960601b60601c8b60601b60601c7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60206000a35050505050505050505050565b8060005260206000f35b6000610b66826110a5565b610b835760405163677510db60e11b815260040160405180910390fd5b610b8c82610b92565b92915050565b600068a20d6e21d0e525530868a20d6e21d0e525530a82610bc868a20d6e21d0e52553126108366401000000008810880261082c565b63ffffffff1681526020810191909152604001600020546001600160a01b03169392505050565b600068a20d6e21d0e525530868a20d6e21d0e525530a82610c2568a20d6e21d0e52553126108366401000000008910890261082c565b63ffffffff1681526020810191909152604001600020546001600160a01b03908116925083168214610c8b576028838152601483905260038201600090815260488120915254600003610c8b576040516367d9dca160e11b815260040160405180910390fd5b6000848152600482016020526040902080546001600160a01b0319166001600160a01b0387169081179091556005820160601b600886901c018054600160ff881690811b1991909116921515901b919091179055509392505050565b6000610cf2826110a5565b610d0f5760405163677510db60e11b815260040160405180910390fd5b50600090815268a20d6e21d0e525530c60205260409020546001600160a01b031690565b606060018054610d42906121c4565b80601f0160208091040260200160405190810160405280929190818152602001828054610d6e906121c4565b8015610dbb5780601f10610d9057610100808354040283529160200191610dbb565b820191906000526020600020905b815481529060010190602001808311610d9e57829003601f168201915b5050505050905090565b6000610dd23384846110c2565b50600192915050565b336028908152601484905268a20d6e21d0e525530f6000908152604881209181905281549091906000198114610e325780841115610e2c576040516313be252b60e01b815260040160405180910390fd5b83810382555b610e3d868686611124565b50600195945050505050565b6001600160a01b038116600090815268a20d6e21d0e5255313602052604081208054600160581b90046001168203610e8557823b5b9392505050565b54600160581b9004600216151592915050565b6000610ea43383611256565b506001919050565b6001600160a01b0316600090815268a20d6e21d0e52553136020526040902054600160a01b90046001600160601b031690565b606060028054610d42906121c4565b6000610dd2338484611124565b606060038054610f0a906121c4565b159050610f3f576003610f1c836112d4565b604051602001610f2d92919061221a565b60405160208183030381529060405290505b919050565b6001600160a01b038116600090815268a20d6e21d0e52553136020526040812080549091600160581b9091046001169003610f3f57805460ff60581b1916600160581b60ff933b1515600202600117939093169290920291909117815590565b8160031c8360601b016007831660051b815480821c841863ffffffff16821b81188355505050505050565b8154600160601b900463ffffffff1668a20d6e21d0e5255308600082900361105b57805463ffffffff198116600163ffffffff928316019182169081178355855463ffffffff60601b1916600160601b82021786556000818152600284016020526040812080546001600160a01b0319166001600160a01b038816179055919350900361105b57600080fd5b5092915050565b600183038060021c8560601b0180546003831660061b92508463ffffffff168460201b178082851c1867ffffffffffffffff16841b821883555050505050505050565b6000806110b183610b92565b6001600160a01b0316141592915050565b6028828152601484905268a20d6e21d0e525530f600090815260488120915281905560008181526001600160a01b0380841691908516907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590602090a3505050565b6000811161118a5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b606482015260840160405180910390fd5b6005546000906001600160a01b03848116911614806111b657506005546001600160a01b038581169116145b1561122b576001600160a01b0383163014806111da57506001600160a01b03841630145b61122b576006546001600160a01b0385811691161461122b57612710611201607d846122dc565b61120b9190612309565b6005549091506001600160a01b0385811691161461122b5761122b611367565b61123f848461123a848661232b565b611389565b801561125057611250843083611389565b50505050565b600061126183610f44565b8054909150600160581b900460021615158215151461129c57805460ff600160581b80830482166002189091160260ff60581b199091161781555b8115156000528260601b60601c7fb5a1de456fff688115a4f75380060c23c8532d14ff85f687cc871456d642039360206000a2505050565b606060006112e183611c25565b600101905060008167ffffffffffffffff8111156113015761130161233e565b6040519080825280601f01601f19166020018201604052801561132b576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508461133557509392505050565b600061137230610eac565b905060075481106113865761138681611cfd565b50565b6001600160a01b0382166113b057604051633a954ecd60e21b815260040160405180910390fd5b60006113bb84610f44565b905060006113c884610f44565b68a20d6e21d0e52553095490915068a20d6e21d0e5255308906001600160a01b03166113f357600080fd5b61146a604051806101a0016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600063ffffffff16815260200160008152602001600063ffffffff1681525090565b835463ffffffff600160801b808304821660808501528554041660a083015282546001600160601b03600160a01b91829004811660c0850152910416604082018190528511156114cd57604051631e9acf1760e31b815260040160405180910390fd5b6040810180518690039081905284546001600160601b03918216600160a01b9081026001600160a01b0392831617875585548181048416890160608601819052909316029116178355608081015161154a9061152e670de0b6b3a764000090565b836040015181611540576115406122f3565b0480821191030290565b81528254600160581b90046002166000036115b957856001600160a01b0316876001600160a01b03160361158657805160808201510360a08201525b6115b3670de0b6b3a76400008260600151816115a4576115a46122f3565b048260a0015180821191030290565b60208201525b60006115e682608001516115db84600001518560200151808218908211021890565b808218908211021890565b9050806000036115f657506117ca565b8151819003825260208201805182900390526001600160a01b038088169089160361162b5760a08201805190910190526117ca565b604080516080810182526000808252602080830182815283850183815260608086019081528651888152600589901b81018501885290819052908d9052908d9052810183526001600160a01b03808d16835260088801909152838220908b16825292902090919061169c878b610fcf565b63ffffffff1661014086015260a08501515b6080860180516000190190819052600381901c606085901b015460009160051b60e0161c63ffffffff1663ffffffff1690506116eb838383610fa4565b61170588600a018289610140015185806001019650611062565b84518181526020018552600881901c6005890160601b015460ff82161c60011615611763576005880160601b600882901c018054600160ff84161b191690556000818152600489016020526040902080546001600160a01b03191690555b506000198501946000036001016116ae5760a08601819052875463ffffffff808316600160801b90810263ffffffff60801b19938416178b5560808901518c54921602911617895560018701546117c49085906001600160a01b0316611e9c565b50505050505b80516020820151835463ffffffff600160801b8083048216840185900360e087018190529091160263ffffffff60801b19909116178455600a8401916000916118139101611ef0565b8454600160601b900463ffffffff166101808501528351909150156119a657606089901b6001176020828101919091526001600160a01b038a16600090815260088601909152604081206080850151855181036101008701819052895463ffffffff909116600160801b0263ffffffff60801b199091161789556101808601515b60001991909101600381901c606084901b0154909190600583901b60e0161c63ffffffff166118c68782600080611062565b8551602080880151600884901b1782520186526006890160601b600882901c018054600160ff84161b19169055841561191357611913896009018380600101945063ffffffff1683610fa4565b600881901c60058a0160601b015460ff82161c60011615611967576005890160601b600882901c018054600160ff84161b19169055600081815260048a016020526040902080546001600160a01b03191690555b5086610100015182036118945783156119a15763ffffffff81166101808801819052885463ffffffff60601b1916600160601b9091021788555b505050505b602083015115611bbe57606088901b60208201526001600160a01b038816600090815260088501602052604090206119de868a610fcf565b63ffffffff166101408501526000670de0b6b3a76400008560c0015181611a0757611a076122f3565b87549190049150640100000000900463ffffffff1681811180159091021761016086015260a0850151602086015181016101208701819052885463ffffffff60801b1916600160801b63ffffffff928316021789558754600160401b9004165b600087610180015163ffffffff168263ffffffff1614611ab7576009890160601b631fffffff600384901c160154600183019260e060059190911b161c63ffffffff1663ffffffff169050611b19565b506101608701515b611ad087600019830160011b610836565b63ffffffff1615611b0557611afe611af28a6006018360010187600101611f37565b85811180159091021790565b9050611abf565b600181018481118015909102176101608901525b600881901c60068a0160601b018054600160ff84161b8019909116179055611b42858483610fa4565b611b5987828a610140015186806001019750611062565b8551602080880151600884901b178252018652508661012001518203611a6757875461016088015163ffffffff9081166401000000000267ffffffff000000001991909316600160401b02166bffffffffffffffff0000000019909116171787555050505b60408101515115611be2576001840154611be29082906001600160a01b031661201e565b5050846000528560601b60601c8760601b60601c7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60206000a350505050505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310611c645772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310611c90576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310611cae57662386f26fc10000830492506010015b6305f5e1008310611cc6576305f5e100830492506008015b6127108310611cda57612710830492506004015b60648310611cec576064830492506002015b600a8310610b8c5760010192915050565b60085460ff1615611d0b5750565b6008805460ff191660011790556040805160028082526060820183526000926020830190803683370190505090503081600081518110611d4d57611d4d612354565b60200260200101906001600160a01b031690816001600160a01b031681525050600460009054906101000a90046001600160a01b03166001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015611dc0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611de4919061236a565b81600181518110611df757611df7612354565b6001600160a01b0392831660209182029290920101526004805460405163791ac94760e01b815292169163791ac94791611e5c91869160009187917f0000000000000000000000006086c9b923c301d936129de4c0ffec16d11f93e991429101612387565b600060405180830381600087803b158015611e7657600080fd5b505af1158015611e8a573d6000803e3d6000fd5b50506008805460ff1916905550505050565b6060820151805160051b60840160808203915063144027d3825283602001518460400151816020850152806040850152505060608083015260208282601c85016000875af160018351141661125057600082fd5b611f1460405180606001604052806000815260200160008152602001606081525090565b604051828152806020018360051b81016040528183604001528083525050919050565b6000801990508360601b8360081c81018054198560ff161c8560ff161b80611f8c578460081c83015b6001830192508254199150808311821715611f605780831115611f8a5760ff86191691821b90911c905b505b80156120145782820360081b7e1f0d1e100c1d070f090b19131c1706010e11080a1a141802121b1503160405821960010183166fffffffffffffffffffffffffffffffff811160071b81811c67ffffffffffffffff1060061b1781811c63ffffffff1060051b1790811c63d76453e004601f169190911a171785811015878210176000031793505b5050509392505050565b60408201516040810363263c69d68152602080820152815160051b604401915060208183601c84016000875af160018251141661125057600081fd5b60005b8381101561207557818101518382015260200161205d565b50506000910152565b602081526000825180602084015261209d81604085016020870161205a565b601f01601f19169190910160400192915050565b6001600160a01b038116811461138657600080fd5b600080604083850312156120d957600080fd5b82356120e4816120b1565b946020939093013593505050565b60008060006060848603121561210757600080fd5b8335612112816120b1565b92506020840135612122816120b1565b929592945050506040919091013590565b60006020828403121561214557600080fd5b8135610e7e816120b1565b60006020828403121561216257600080fd5b81358015158114610e7e57600080fd5b60006020828403121561218457600080fd5b5035919050565b6000806040838503121561219e57600080fd5b82356121a9816120b1565b915060208301356121b9816120b1565b809150509250929050565b600181811c908216806121d857607f821691505b6020821081036121f857634e487b7160e01b600052602260045260246000fd5b50919050565b6000815161221081856020860161205a565b9290920192915050565b60008084548160018260011c9150600183168061223857607f831692505b6020808410820361225757634e487b7160e01b86526022600452602486fd5b81801561226b5760018114612280576122ad565b60ff19861689528415158502890196506122ad565b60008b81526020902060005b868110156122a55781548b82015290850190830161228c565b505084890196505b5050505050506122bd81856121fe565b95945050505050565b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417610b8c57610b8c6122c6565b634e487b7160e01b600052601260045260246000fd5b60008261232657634e487b7160e01b600052601260045260246000fd5b500490565b81810381811115610b8c57610b8c6122c6565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60006020828403121561237c57600080fd5b8151610e7e816120b1565b600060a08201878352602087602085015260a0604085015281875180845260c08601915060208901935060005b818110156123d95784516001600160a01b0316835293830193918301916001016123b4565b50506001600160a01b0396909616606085015250505060800152939250505056fea26469706673582212206a5d879c091983fcabef0f9ead22900339abb07de9b63742128105d0364f055864736f6c63430008170033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d0000000000000000000000006086c9b923c301d936129de4c0ffec16d11f93e90000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001a00000000000000000000000000000000000000000000000056bc75e2d6310000000000000000000000000000000000000000000000000000000470de4df8200000000000000000000000000005c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f00000000000000000000000000000000000000000000000000000000000000074558495433363900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000745584954333639000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000036697066733a2f2f516d584e536938454446633448754754624a4c7847474b444838786350315755644d7154646a59515535736556562f00000000000000000000
-----Decoded View---------------
Arg [0] : _wnt (address): 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
Arg [1] : _univ2router (address): 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D
Arg [2] : _treasury (address): 0x6086C9b923c301D936129De4C0FFEc16d11f93e9
Arg [3] : name_ (string): EXIT369
Arg [4] : symbol_ (string): EXIT369
Arg [5] : baseURI_ (string): ipfs://QmXNSi8EDFc4HuGTbJLxGGKDH8xcP1WUdMqTdjYQU5seVV/
Arg [6] : _totalSupply (uint96): 100000000000000000000
Arg [7] : _tokenLiquidityThreshold (uint256): 20000000000000000
Arg [8] : univ2factory (address): 0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f
-----Encoded View---------------
16 Constructor Arguments found :
Arg [0] : 000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
Arg [1] : 0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d
Arg [2] : 0000000000000000000000006086c9b923c301d936129de4c0ffec16d11f93e9
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000120
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000160
Arg [5] : 00000000000000000000000000000000000000000000000000000000000001a0
Arg [6] : 0000000000000000000000000000000000000000000000056bc75e2d63100000
Arg [7] : 00000000000000000000000000000000000000000000000000470de4df820000
Arg [8] : 0000000000000000000000005c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000007
Arg [10] : 4558495433363900000000000000000000000000000000000000000000000000
Arg [11] : 0000000000000000000000000000000000000000000000000000000000000007
Arg [12] : 4558495433363900000000000000000000000000000000000000000000000000
Arg [13] : 0000000000000000000000000000000000000000000000000000000000000036
Arg [14] : 697066733a2f2f516d584e536938454446633448754754624a4c7847474b4448
Arg [15] : 38786350315755644d7154646a59515535736556562f00000000000000000000
Deployed Bytecode Sourcemap
142045:3193:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;106638:9;:14;106634:28;;106654:8;;;106634:28;142045:3193;;102961:14;;63319:20;;102830:22;120290:20;102930:3;102907:26;;-1:-1:-1;;;;;102961:14:0;103070:10;103056:24;;;103052:429;;103101:10;-1:-1:-1;;;;;103101:20:0;;;103097:50;;103130:17;;-1:-1:-1;;;103130:17:0;;;;;;;;;;;103097:50;103162:282;103227:4;120290:20;103294:4;120290:20;103343:4;120290:20;103406:4;120290:20;103162:16;:282::i;:::-;103459:10;103467:1;103459:7;:10::i;:::-;103550;103564;103550:24;103546:378;;103595:10;-1:-1:-1;;;;;103595:20:0;;;103591:50;;103624:17;;-1:-1:-1;;;103624:17:0;;;;;;;;;;;103591:50;103723:4;120290:20;112241:4;112234:16;;;103849:4;120290:20;112271:4;112264:16;101454:36;112126:22;112294;;;112358:4;112342:21;;112457:18;;103777:4;120290:20;103763:24;;101449:89;;103902:10;103910:1;103902:7;:10::i;:::-;103987;104001;103987:24;103983:376;;104032:10;-1:-1:-1;;;;;104032:20:0;;;104028:50;;104061:17;;-1:-1:-1;;;104061:17:0;;;;;;;;;;;104028:50;104277:4;120290:20;112241:4;112234:16;;;104209:4;120290:20;112271:4;112264:16;104141:19;;;104093:22;112294;;;112358:4;112342:21;;112457:18;;104337:9;;104329:18;;:7;:18::i;:::-;104013:346;103983:376;104405:10;104419;104405:24;104401:169;;104450:10;-1:-1:-1;;;;;104450:20:0;;;104446:50;;104479:17;;-1:-1:-1;;;104479:17:0;;;;;;;;;;;104446:50;104511:47;104527:29;104550:4;120290:20;104527:8;:29::i;:::-;-1:-1:-1;;;;;104511:47:0;:7;:47::i;:::-;104616:10;104630;104616:24;104612:169;;104661:10;-1:-1:-1;;;;;104661:20:0;;;104657:50;;104690:17;;-1:-1:-1;;;104690:17:0;;;;;;;;;;;104657:50;104722:47;104738:29;104761:4;120290:20;104738:8;:29::i;104722:47::-;104846:10;104860;104846:24;104842:391;;104891:10;-1:-1:-1;;;;;104891:20:0;;;104887:50;;104920:17;;-1:-1:-1;;;104920:17:0;;;;;;;;;;;104887:50;104952:13;104968:215;105028:4;120290:20;105082:4;120290:20;105145:4;120290:20;104968:11;:215::i;:::-;104952:231;;105198:23;105214:5;-1:-1:-1;;;;;105198:23:0;:7;:23::i;:::-;104872:361;104842:391;105283:10;105297;105283:24;105279:173;;105328:10;-1:-1:-1;;;;;105328:20:0;;;105324:50;;105357:17;;-1:-1:-1;;;105357:17:0;;;;;;;;;;;105324:50;105389:51;105405:33;105432:4;120290:20;105405:12;:33::i;105389:51::-;105503:10;105517;105503:24;105499:183;;105548:10;-1:-1:-1;;;;;105548:20:0;;;105544:50;;105577:17;;-1:-1:-1;;;105577:17:0;;;;;;;;;;;105544:50;-1:-1:-1;;;;;105661:4:0;120290:20;99184:37;99157:7;99184:37;;;:30;:37;;;;;:49;105609:61;;-1:-1:-1;;;99184:49:0;;;;105609:7;:61::i;:::-;105728:10;105742;105728:24;105724:148;;105773:10;-1:-1:-1;;;;;105773:20:0;;;105769:50;;105802:17;;-1:-1:-1;;;105802:17:0;;;;;;;;;;;105769:50;63319:20;98996:33;105834:26;;-1:-1:-1;;;98996:33:0;;;;105609:7;:61::i;105834:26::-;105919:10;105933;105919:24;105915:67;;105960:10;105968:1;105960:7;:10::i;:::-;106354:25:::1;;-1:-1:-1::0;;;106354:25:0::1;;;;;;;;;;;143320:92:::0;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;69763:158;;;;;;;;;;-1:-1:-1;69763:158:0;;;;;:::i;:::-;;:::i;:::-;;;1291:14:1;;1284:22;1266:41;;1254:2;1239:18;69763:158:0;1126:187:1;27065:27:0;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1497:32:1;;;1479:51;;1467:2;1452:18;27065:27:0;1318:218:1;68774:126:0;;;;;;;;;;-1:-1:-1;63319:20:0;68861:30;-1:-1:-1;;;68861:30:0;;-1:-1:-1;;;;;68861:30:0;68774:126;;;1687:25:1;;;1675:2;1660:18;68774:126:0;1541:177:1;27099:47:0;;;;;;;;;;;;;;;71281:713;;;;;;;;;;-1:-1:-1;71281:713:0;;;;;:::i;:::-;;:::i;95799:294::-;;;;;;;;;;-1:-1:-1;95799:294:0;;;;;:::i;:::-;;:::i;96220:137::-;;;;;;;;;;-1:-1:-1;96220:137:0;;;;;:::i;:::-;;:::i;68633:76::-;;;;;;;;;;-1:-1:-1;68633:76:0;;68699:2;3091:36:1;;3079:2;3064:18;68633:76:0;2949:184:1;98740:119:0;;;;;;;;;;-1:-1:-1;98820:31:0;;-1:-1:-1;;;;;98820:31:0;98740:119;;27023:33;;;;;;;;;;;;;;;68969:143;;;;;;;;;;-1:-1:-1;68969:143:0;;;;;:::i;:::-;;:::i;143420:96::-;;;;;;;;;;;;;:::i;27155:38::-;;;;;;;;;;;;27190:3;27155:38;;142221:19;;;;;;;;;;-1:-1:-1;142221:19:0;;;;-1:-1:-1;;;;;142221:19:0;;;70434:150;;;;;;;;;;-1:-1:-1;70434:150:0;;;;;:::i;:::-;;:::i;27209:41::-;;;;;;;;;;;;27245:5;27209:41;;142322:22;;;;;;;;;;-1:-1:-1;142322:22:0;;;;;;;;143524:274;;;;;;;;;;-1:-1:-1;143524:274:0;;;;;:::i;:::-;;:::i;69210:417::-;;;;;;;;;;-1:-1:-1;69210:417:0;;;;;:::i;:::-;112241:4;112234:16;;;112271:4;112264:16;;;;69568:28;112126:22;112294;;;112358:4;112342:21;;112457:18;;69563:56;;69210:417;142180:32;;;;;;;;;;-1:-1:-1;142180:32:0;;;;-1:-1:-1;;;;;142180:32:0;;;90967:2307;-1:-1:-1;;;;;91105:16:0;;91101:52;;91130:23;;-1:-1:-1;;;91130:23:0;;;;;;;;;;;91101:52;91224:14;;63319:20;;-1:-1:-1;;;;;91224:14:0;91220:42;;91254:8;;;91220:42;91298:4;;;91327:16;;;91275:20;91344:45;91298:4;91353:35;113018:11;113011:19;;113003:28;;91369:18;-1:-1:-1;;107100:5:0;107110:1;107099:12;;106988:180;91353:35;107545:13;107678:5;107675:1;107671:13;107660:8;107656:2;107652:17;107648:37;107775:1;107769:8;107764:1;107757:5;107753:13;107750:1;107746:21;107742:36;107730:10;107726:53;107716:63;;;107470:327;;;;;91344:45;91327:63;;;;;;;;;;;;;-1:-1:-1;91327:63:0;;-1:-1:-1;;;;;91319:71:0;;;91327:63;;91319:71;91315:139;;91414:28;;-1:-1:-1;;;91414:28:0;;;;;;;;;;;91315:139;91483:4;-1:-1:-1;;;;;91470:17:0;:9;-1:-1:-1;;;;;91470:17:0;;91466:264;;112241:4;112234:16;;;112271:4;112264:16;;;91513:19;;;112126:22;112294;;;112358:4;112342:21;;112457:18;;91508:48;;:53;91504:215;;91599:18;;;;:14;;;:18;;;;;;-1:-1:-1;;;;;91586:31:0;;;91599:18;;91586:31;91582:122;;91649:35;;-1:-1:-1;;;91649:35:0;;;;;;;;;;;91582:122;91742:35;91780:18;91793:4;91780:12;:18::i;:::-;91742:56;;91809:33;91845:16;91858:2;91845:12;:16::i;:::-;-1:-1:-1;;;;;92001:11:0;;91874:12;92001:11;;;91953:7;;;92001:11;;;;;;;;92072:23;;91809:52;;-1:-1:-1;65970:8:0;;-1:-1:-1;;;92072:23:0;;-1:-1:-1;;;;;92072:23:0;92114:18;;;92110:52;;;92141:21;;-1:-1:-1;;;92141:21:0;;;;;;;;;;;92110:52;92177;;-1:-1:-1;;;;;92210:18:0;;;;92177:52;;-1:-1:-1;;;92177:52:0;;;-1:-1:-1;;;;;92177:52:0;;;;;;92244:37;;;;;;;;;;;;;;;;;;92312:20;;;109333:2;109329:20;109355:1;109351:13;;;109325:40;109435:8;109421:4;109417:16;;109413:31;-1:-1:-1;109406:39:0;92303:140;;;92359:20;;;109705:2;109701:20;109727:1;109723:13;;;109697:40;109855:8;;109896:13;109781:4;109777:16;;109869:9;109865:14;109851:29;109838:75;;92413:18;;;;:14;;;:18;;;;;92406:25;;-1:-1:-1;;;;;;92406:25:0;;;92303:140;92513:29;;-1:-1:-1;;;;92513:29:0;;-1:-1:-1;;;92513:29:0;;;;;;;;-1:-1:-1;;92513:29:0;;;;;;;;;;;;;107656:2;107652:17;;;107671:13;107675:1;107671:13;;;;107648:37;107769:8;-1:-1:-1;;107746:21:0;107750:1;107746:21;;;;;107742:36;107726:53;92478:65;-1:-1:-1;92558:8:0;92569:25;92574:2;-1:-1:-1;;107329:5:0;;107339:1;107328:12;;;107327:18;92578:15;107220:182;92569:25;92558:36;;92609:29;92614:9;92625:1;92609:29;;92628:9;92609:4;:29::i;:::-;92653:35;92658:2;-1:-1:-1;;92662:22:0;;;107329:5;107339:1;107328:12;;;107327:18;92686:1;92653:4;:35::i;:::-;-1:-1:-1;;92746:27:0;;-1:-1:-1;;;;92746:27:0;;-1:-1:-1;;;92746:27:0;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;92793:9:0;;-1:-1:-1;92793:9:0;;;;;;;;;;92788:30;;92746:27;92814:2;92788:4;:30::i;:::-;92833:83;92861:2;92865;92869:43;92894:13;92909:2;92869:24;:43::i;:::-;92914:1;92833:27;:83::i;:::-;92710:218;93104:4;93098;93091:18;93251:2;93247;93243:11;93239:2;93235:20;93227:4;93223:2;93219:13;93215:2;93211:22;93184:25;93178:4;93172;93167:89;93033:234;;;;;;;90967:2307;;;;:::o;120421:185::-;120554:1;120548:4;120541:15;120583:4;120577;120570:18;99716:163;99777:7;99802:11;99810:2;99802:7;:11::i;:::-;99797:44;;99822:19;;-1:-1:-1;;;99822:19:0;;;;;;;;;;;99797:44;99859:12;99868:2;99859:8;:12::i;:::-;99852:19;99716:163;-1:-1:-1;;99716:163:0:o;99380:215::-;99441:7;63319:20;99522:16;99441:7;99539:47;99544:4;99550:35;113018:11;113011:19;;113003:28;;99566:18;112839:210;99539:47;99522:65;;;;;;;;;;;;;-1:-1:-1;99522:65:0;;-1:-1:-1;;;;;99522:65:0;;99380:215;-1:-1:-1;;;99380:215:0:o;100598:594::-;100720:13;63319:20;100815:16;100720:13;100832:47;100837:4;100843:35;113018:11;113011:19;;113003:28;;100859:18;112839:210;100832:47;100815:65;;;;;;;;;;;;;-1:-1:-1;100815:65:0;;-1:-1:-1;;;;;100815:65:0;;;;-1:-1:-1;100897:18:0;;;;100893:187;;112241:4;112234:16;;;112271:4;112264:16;;;100941:19;;;112126:22;112294;;;112358:4;112342:21;;112457:18;;100936:49;;:54;100932:137;;101018:35;;-1:-1:-1;;;101018:35:0;;;;;;;;;;;100932:137;101092:18;;;;:14;;;:18;;;;;:28;;-1:-1:-1;;;;;;101092:28:0;-1:-1:-1;;;;;101092:28:0;;;;;;;;101136:20;;;109705:2;109701:20;109727:1;109723:13;;;109697:40;109855:8;;-1:-1:-1;109781:4:0;109777:16;;109869:9;;;109865:14;109851:29;;;;101162:21;;;109882:29;;109848:64;;;;109838:75;;100740:452;100598:594;;;;;:::o;100188:190::-;100253:7;100278:11;100286:2;100278:7;:11::i;:::-;100273:44;;100298:19;;-1:-1:-1;;;100298:19:0;;;;;;;;;;;100273:44;-1:-1:-1;100335:35:0;;;;:31;:35;;;;;;-1:-1:-1;;;;;100335:35:0;;100188:190::o;143320:92::-;143366:13;143399:5;143392:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;143320:92;:::o;69763:158::-;69837:4;69854:37;69863:10;69875:7;69884:6;69854:8;:37::i;:::-;-1:-1:-1;69909:4:0;69763:158;;;;:::o;71281:713::-;71450:10;112241:4;112234:16;;;112271:4;112264:16;;;71414:28;71369:4;112294:22;;;112358:4;112342:21;;112457:18;;;;71709:7;;71369:4;;112342:21;-1:-1:-1;;71733:28:0;;71729:198;;71791:7;71782:6;:16;71778:52;;;71807:23;;-1:-1:-1;;;71807:23:0;;;;;;;;;;;71778:52;71884:16;;;71874:26;;71729:198;71937:27;71947:4;71953:2;71957:6;71937:9;:27::i;:::-;-1:-1:-1;71982:4:0;;71281:713;-1:-1:-1;;;;;71281:713:0:o;95799:294::-;-1:-1:-1;;;;;95904:37:0;;95863:4;95904:37;;;:30;:37;;;;;95956:7;;-1:-1:-1;;;95956:7:0;;59439:6;95956:40;:45;;95952:73;;120000:14;;96010:15;96003:22;95799:294;-1:-1:-1;;;95799:294:0:o;95952:73::-;96043:7;-1:-1:-1;;;96043:7:0;;59576:6;96043:37;:42;;;95799:294;-1:-1:-1;;95799:294:0:o;96220:137::-;96278:4;96295:32;96307:10;96319:7;96295:11;:32::i;:::-;-1:-1:-1;96345:4:0;;96220:137;-1:-1:-1;96220:137:0:o;68969:143::-;-1:-1:-1;;;;;69059:37:0;69032:7;69059:37;;;:30;:37;;;;;:45;-1:-1:-1;;;69059:45:0;;-1:-1:-1;;;;;69059:45:0;;68969:143::o;143420:96::-;143468:13;143501:7;143494:14;;;;;:::i;70434:150::-;70504:4;70521:33;70531:10;70543:2;70547:6;70521:9;:33::i;143524:274::-;143606:21;143650:8;143644:22;;;;;:::i;:::-;:27;;-1:-1:-1;143640:150:0;;143738:8;143748:26;143765:8;143748:16;:26::i;:::-;143721:54;;;;;;;;;:::i;:::-;;;;;;;;;;;;;143686:104;;143640:150;143524:274;;;:::o;97234:426::-;-1:-1:-1;;;;;97335:37:0;;97297:21;97335:37;;;:30;:37;;;;;97412:7;;97335:37;;-1:-1:-1;;;97412:7:0;;;59439:6;97412:40;:45;;97408:234;;97569:57;;-1:-1:-1;;;;97569:57:0;-1:-1:-1;;;97585:40:0;120000:14;;114121:9;114114:17;59576:6;97496:54;59439:6;97585:40;97569:57;;;;;;;;;;;;;;;97234:426::o;107865:443::-;108058:5;108055:1;108051:13;108040:8;108036:2;108032:17;108028:37;108123:1;108116:5;108112:13;108109:1;108105:21;108186:1;108180:8;108283:1;108280;108276:9;108269:5;108265:21;108253:10;108249:38;108246:1;108242:46;108239:1;108235:54;108232:1;108225:65;;;;107865:443;;;:::o;97826:572::-;98066:26;;-1:-1:-1;;;98066:26:0;;;;63319:20;97960:19;98107:17;;;98103:288;;98185:14;;-1:-1:-1;;98185:14:0;;;;;;;;;;;;;;;;98229:41;;-1:-1:-1;;;;98229:41:0;-1:-1:-1;;;98229:41:0;;;;;-1:-1:-1;98285:30:0;;;:16;;;:30;;;;;:35;;-1:-1:-1;;;;;;98285:35:0;-1:-1:-1;;;;;98285:35:0;;;;;98185:14;;-1:-1:-1;98339:17:0;;98335:31;;98358:8;;;98335:31;97986:412;97826:572;;;;:::o;108381:685::-;108638:1;108634:2;108630:10;108732:1;108729;108725:9;108714:8;108710:2;108706:17;108702:33;108781:1;108775:8;108843:1;108840;108836:9;108833:1;108829:17;108820:26;;108947:9;108935:10;108931:26;108918:10;108914:2;108910:19;108907:51;109035:8;109031:1;109028;109024:9;109020:24;109000:18;108996:49;108993:1;108989:57;108986:1;108982:65;108979:1;108972:76;;;;;108381:685;;;;:::o;99931:118::-;99991:4;;100015:12;100024:2;100015:8;:12::i;:::-;-1:-1:-1;;;;;100015:26:0;;;;99931:118;-1:-1:-1;;99931:118:0:o;93684:658::-;112241:4;112234:16;;;112271:4;112264:16;;;93969:28;112126:22;112294;;;112358:4;112342:21;;112457:18;;94023:6;;93964:65;:56;94151:20;;;-1:-1:-1;;;;;94298:25:0;;;;94273:23;;;;94246:25;;94240:4;;94229:95;93684:658;;;:::o;143806:728::-;143945:1;143937:5;:9;143929:63;;;;-1:-1:-1;;;143929:63:0;;6046:2:1;143929:63:0;;;6028:21:1;6085:2;6065:18;;;6058:30;6124:34;6104:18;;;6097:62;-1:-1:-1;;;6175:18:1;;;6168:39;6224:19;;143929:63:0;;;;;;;;144041:4;;144005:11;;-1:-1:-1;;;;;144035:10:0;;;144041:4;;144035:10;;:26;;-1:-1:-1;144057:4:0;;-1:-1:-1;;;;;144049:12:0;;;144057:4;;144049:12;144035:26;144031:356;;;-1:-1:-1;;;;;144084:19:0;;144098:4;144084:19;;:44;;-1:-1:-1;;;;;;144107:21:0;;144123:4;144107:21;144084:44;144078:298;;144162:12;;-1:-1:-1;;;;;144154:20:0;;;144162:12;;144154:20;144150:211;;27245:5;144207:16;27190:3;144207:5;:16;:::i;:::-;144206:30;;;;:::i;:::-;144272:4;;144199:38;;-1:-1:-1;;;;;;144264:12:0;;;144272:4;;144264:12;144260:82;;144305:13;:11;:13::i;:::-;144397:38;144413:4;144419:2;144423:11;144431:3;144423:5;:11;:::i;:::-;144397:15;:38::i;:::-;144450:7;;144446:81;;144474:41;144490:4;144504;144511:3;144474:15;:41::i;:::-;143918:616;143806:728;;;:::o;96584:471::-;96660:21;96684:19;96697:5;96684:12;:19::i;:::-;96719:7;;96660:43;;-1:-1:-1;;;;96719:7:0;;59576:6;96719:37;:42;;96718:53;;;;96714:124;;96788:38;;;-1:-1:-1;;;96788:38:0;;;;;59576:6;96788:38;;;;;-1:-1:-1;;;;96788:38:0;;;;;;96714:124;96943:5;96936:13;96929:21;96923:4;96916:35;97029:5;97025:2;97021:14;97017:2;97013:23;96982:29;96976:4;96970;96965:72;96901:147;96584:471;;:::o;28910:716::-;28966:13;29017:14;29034:17;29045:5;29034:10;:17::i;:::-;29054:1;29034:21;29017:38;;29070:20;29104:6;29093:18;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;29093:18:0;-1:-1:-1;29070:41:0;-1:-1:-1;29235:28:0;;;29251:2;29235:28;29292:288;-1:-1:-1;;29324:5:0;-1:-1:-1;;;29461:2:0;29450:14;;29445:30;29324:5;29432:44;29522:2;29513:11;;;-1:-1:-1;29543:21:0;29292:288;29543:21;-1:-1:-1;29601:6:0;28910:716;-1:-1:-1;;;28910:716:0:o;144542:218::-;144584:23;144610:24;144628:4;144610:9;:24::i;:::-;144584:50;;144668:23;;144649:15;:42;144645:108;;144708:33;144725:15;144708:16;:33::i;:::-;144573:187;144542:218::o;83948:6594::-;-1:-1:-1;;;;;84041:16:0;;84037:52;;84066:23;;-1:-1:-1;;;84066:23:0;;;;;;;;;;;84037:52;84102:35;84140:18;84153:4;84140:12;:18::i;:::-;84102:56;;84169:33;84205:16;84218:2;84205:12;:16::i;:::-;84290:14;;84169:52;;-1:-1:-1;63319:20:0;;-1:-1:-1;;;;;84290:14:0;84286:42;;84320:8;;;84286:42;84341:25;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;84341:25:0;84397:27;;;-1:-1:-1;;;84397:27:0;;;;;84377:17;;;:47;84453:25;;;;84435:15;;;:43;84505:13;;-1:-1:-1;;;;;;;;84505:13:0;;;;;;84489;;;:29;84561:23;;;84545:13;;;:39;;;84535:50;;84531:84;;;84594:21;;-1:-1:-1;;;84594:21:0;;;;;;;;;;;84531:84;84686:13;;;:23;;;;;;;;;84653:57;;-1:-1:-1;;;;;84653:57:0;;;-1:-1:-1;;;84653:57:0;;;-1:-1:-1;;;;;84653:57:0;;;;;;84778:21;;;;;;;84770:39;;84756:11;;;:53;;;84725:85;;;;;;;;;84857:17;;;;84843:57;;84892:7;65970:8;;65895:91;84892:7;84876:1;:13;;;:23;;;;;:::i;:::-;;113629:8;;;113639:9;;113625:24;;113462:205;84843:57;84827:73;;84921:19;;-1:-1:-1;;;84921:19:0;;59576:6;84921:49;84827:13;84921:54;84917:250;;85008:2;-1:-1:-1;;;;;85000:10:0;:4;-1:-1:-1;;;;;85000:10:0;;84996:67;;85050:13;;85030:17;;;;:33;85012:15;;;:51;84996:67;85098:53;65970:8;85112:1;:11;;;:21;;;;;:::i;:::-;;85135:1;:15;;;113629:8;;;113639:9;;113625:24;;113462:205;85098:53;85082:13;;;:69;84917:250;85242:9;85254:59;85259:1;:17;;;85278:34;85283:1;:13;;;85298:1;:13;;;113879:9;;;113890:8;;-1:-1:-1;113875:24:0;113868:32;;113714:204;85278:34;113879:9;;;113890:8;;-1:-1:-1;113875:24:0;113868:32;;113714:204;85254:59;85242:71;;85336:1;85341;85336:6;85332:17;;85344:5;;;85332:17;85368:18;;;;;;;85405:13;;;:18;;;;;;;-1:-1:-1;;;;;85446:10:0;;;;;;;85442:107;;85481:15;;;:20;;;;;;;85524:5;;85442:107;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;114894:11:0;;114919:15;;;115079:1;115075:9;;;115063:22;;;;115050:36;;115120:26;;;;115177:24;;;;115230:26;;;;114983:15;;115287:17;;-1:-1:-1;;;;;85680:13:0;;;;;:7;;;:13;;;;;;85740:11;;;;;;;;-1:-1:-1;;85680:13:0;85782:43;85807:13;115177:24;85782;:43::i;:::-;85770:55;;:9;;;:55;85862:15;;;;85938:568;85995:17;;;85993:19;;-1:-1:-1;;85993:19:0;;;;;107675:1;107671:13;;;107656:2;107652:17;;;107648:37;107769:8;-1:-1:-1;;107750:1:0;107746:21;;;107742:36;107730:10;107726:53;85964:49;;;;86036:34;86041:7;86050;86066:2;86036:4;:34::i;:::-;86093:67;86121:1;:4;;86127:2;86131:1;:9;;;86149;;;;;;86093:27;:67::i;:::-;115579:8;;115601:18;;;115655:4;115643:17;115633:28;;109355:1;109351:13;;;86248:20;;;109333:2;109329:20;109325:40;109435:8;109421:4;109417:16;;109413:31;109410:1;109406:39;86239:176;;;86307:20;;;109705:2;109701:20;109727:1;109723:13;;;109697:40;109855:8;;109896:13;109781:4;109777:16;;109869:9;109865:14;109851:29;109838:75;;86373:18;;;;:14;;;:18;;;;;86366:25;;-1:-1:-1;;;;;;86366:25:0;;;86239:176;-1:-1:-1;;;86496:3:0;;;86503:1;86496:8;:3;:8;85938:568;;86561:15;;;:25;;;86526:61;;;;;;-1:-1:-1;;;86526:61:0;;;-1:-1:-1;;;;86526:61:0;;;;;;86643:17;;;;86606:55;;;;;;;;;;-1:-1:-1;86708:14:0;;;86680:43;;86696:10;;-1:-1:-1;;;;;86708:14:0;86680:15;:43::i;:::-;86742:5;;;;;85183:1580;86842:13;;86826;;;;86806:16;;;-1:-1:-1;;;86806:16:0;;;;;86798:41;;:57;;;86779:16;;;:76;;;86870:43;;;;-1:-1:-1;;;;86870:43:0;;;;;;86953:4;;;;86842:13;;87006:48;;87024:29;87006:17;:48::i;:::-;87090:16;;-1:-1:-1;;;87090:16:0;;;;87071;;;:35;87125:13;;86972:82;;-1:-1:-1;87125:18:0;87121:1264;;117878:2;117874:10;;;87197:1;117871:23;117864:4;117857:12;;;117850:45;;;;-1:-1:-1;;;;;87339:13:0;;87218:20;87339:13;;;:7;;;:13;;;;;;87391:17;;;;87488:13;;87476:25;;87464:9;;;:37;;;87427:75;;;;;;-1:-1:-1;;;87427:75:0;-1:-1:-1;;;;87427:75:0;;;;;;87545:16;;;;87611:663;-1:-1:-1;;87666:11:0;;;;107675:1;107671:13;;;107656:2;107652:17;;;107648:37;107769:8;87666:11;;-1:-1:-1;107750:1:0;107746:21;;;;;107742:36;107730:10;107726:53;87701:41;87729:2;107726:53;87637:10;;87701:27;:41::i;:::-;118177:8;;118230:4;118223:12;;;118217:19;118242:1;118238:10;;;118214:35;118199:51;;118308:17;118298:28;;87850:8;;;109705:2;109701:20;109727:1;109723:13;;;109697:40;109855:8;;109896:13;109781:4;109777:16;;109869:9;109865:14;109851:29;109838:75;;87897:15;87893:69;;;87914:48;87919:1;:12;;87933:16;;;;;;87914:48;;87958:2;87914:4;:48::i;:::-;109355:1;109351:13;;;87994:20;;;109333:2;109329:20;109325:40;109435:8;109421:4;109417:16;;109413:31;109410:1;109406:39;87985:176;;;88053:20;;;109705:2;109701:20;109727:1;109723:13;;;109697:40;109855:8;;109896:13;109781:4;109777:16;;109869:9;109865:14;109851:29;109838:75;;88119:18;;;;:14;;;:18;;;;;88112:25;;-1:-1:-1;;;;;;88112:25:0;;;87985:176;87614:628;88263:1;:9;;;88250;:22;87611:663;;88298:15;88294:75;;;88335:33;;;:16;;;:33;;;88315:54;;-1:-1:-1;;;;88315:54:0;-1:-1:-1;;;88315:54:0;;;;;;88294:75;87145:1240;;;;87121:1264;88405:13;;;;:18;88401:1731;;117878:2;117874:10;;;117864:4;117857:12;;117850:45;-1:-1:-1;;;;;88524:11:0;;88496:25;88524:11;;;:7;;;:11;;;;;88566:43;88591:13;88532:2;88566:24;:43::i;:::-;88554:55;;:9;;;:55;88628:13;65970:8;88644:1;:13;;;:23;;;;;:::i;:::-;88713:13;;88644:23;;;;-1:-1:-1;88713:13:0;;;;;112743;;;112715:21;;112711:30;;;112708:49;88686:13;;;:48;88771:15;;;;88860:13;;;;88850:23;;88840:7;;;:33;;;88805:69;;-1:-1:-1;;;;88805:69:0;-1:-1:-1;;;88805:69:0;;;;;;;;88917:16;;-1:-1:-1;;;88917:16:0;;;88983:1024;89009:10;89064:1;:16;;;89046:34;;:14;:34;;;89042:586;;89119:12;;;107656:2;107652:17;107671:13;107675:1;107671:13;;;;107648:37;107769:8;89133:16;;;;107746:21;107750:1;107746:21;;;;;107742:36;89114;107726:53;89109:41;;;;89042:586;;;-1:-1:-1;89212:13:0;;;;89252:285;89259:29;89264:2;-1:-1:-1;;107100:5:0;;107110:1;107099:12;89268:19;106988:180;89259:29;:34;;;89252:285;;89385:63;89396:44;89412:1;:8;;89422:2;89427:1;89422:6;89430:5;89438:1;89430:9;89396:15;:44::i;:::-;89442:5;112743:13;;112715:21;;112711:30;;;112708:49;;112533:242;89385:63;89326:183;;89252:285;;;89595:1;89590:6;;112743:13;;;112715:21;;112711:30;;;112708:49;89563:13;;;:41;89042:586;109727:1;109723:13;;;89679:8;;;109705:2;109701:20;109697:40;109855:8;;89693:4;109781;109777:16;;109882:29;109865:14;;109851:29;;;109848:64;109838:75;;89721:34;89726:7;89735;89751:2;89721:4;:34::i;:::-;89778:65;89806:2;89810;89814:1;:9;;;89832;;;;;;89778:27;:65::i;:::-;118177:8;;118230:4;118223:12;;;118217:19;118242:1;118238:10;;;118214:35;118199:51;;118308:17;118298:28;;88986:993;89998:1;:7;;;89987;:18;88983:1024;;90027:33;;90102:13;;;;90027:33;90079:37;;;;;-1:-1:-1;;90027:33:0;;;;-1:-1:-1;;;90027:33:0;90079:37;-1:-1:-1;;90079:37:0;;;;;;;-1:-1:-1;;;88401:1731:0;90152:15;;;;:22;:27;90148:76;;90209:14;;;;90181:43;;90197:10;;-1:-1:-1;;;;;90209:14:0;90181:15;:43::i;:::-;84628:5608;;90370:6;90364:4;90357:20;90519:2;90515;90511:11;90507:2;90503:20;90495:4;90491:2;90487:13;90483:2;90479:22;90452:25;90446:4;90440;90435:89;90299:236;;;;83948:6594;;;:::o;12469:948::-;12522:7;;-1:-1:-1;;;12600:17:0;;12596:106;;-1:-1:-1;;;12638:17:0;;;-1:-1:-1;12684:2:0;12674:12;12596:106;12729:8;12720:5;:17;12716:106;;12767:8;12758:17;;;-1:-1:-1;12804:2:0;12794:12;12716:106;12849:8;12840:5;:17;12836:106;;12887:8;12878:17;;;-1:-1:-1;12924:2:0;12914:12;12836:106;12969:7;12960:5;:16;12956:103;;13006:7;12997:16;;;-1:-1:-1;13042:1:0;13032:11;12956:103;13086:7;13077:5;:16;13073:103;;13123:7;13114:16;;;-1:-1:-1;13159:1:0;13149:11;13073:103;13203:7;13194:5;:16;13190:103;;13240:7;13231:16;;;-1:-1:-1;13276:1:0;13266:11;13190:103;13320:7;13311:5;:16;13307:68;;13358:1;13348:11;13403:6;12469:948;-1:-1:-1;;12469:948:0:o;144768:467::-;144838:10;;;;144834:23;;;144768:467;:::o;144834:23::-;144867:10;:17;;-1:-1:-1;;144867:17:0;144880:4;144867:17;;;144919:16;;;144933:1;144919:16;;;;;;;;-1:-1:-1;;144919:16:0;;;;;;;;;;-1:-1:-1;144919:16:0;144895:40;;144964:4;144946;144951:1;144946:7;;;;;;;;:::i;:::-;;;;;;:23;-1:-1:-1;;;;;144946:23:0;;;-1:-1:-1;;;;;144946:23:0;;;;;144990:6;;;;;;;;;-1:-1:-1;;;;;144990:6:0;-1:-1:-1;;;;;144990:11:0;;:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;144980:4;144985:1;144980:7;;;;;;;;:::i;:::-;-1:-1:-1;;;;;144980:23:0;;;:7;;;;;;;;;:23;145016:6;;;:182;;-1:-1:-1;;;145016:182:0;;:6;;;:57;;:182;;145088:11;;145016:6;;145130:4;;145149:8;;145172:15;;145016:182;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;145209:10:0;:18;;-1:-1:-1;;145209:18:0;;;-1:-1:-1;;;;144768:467:0:o;115780:835::-;115957:4;115954:1;115950:12;115944:19;116009:4;116003:11;116000:1;115996:19;115990:4;115986:30;116080:4;116074;116070:15;116061:24;;116139:10;116136:1;116129:21;116243:1;116237:4;116233:12;116227:19;116286:1;116280:4;116276:12;116270:19;116324:4;116317;116314:1;116310:12;116303:26;116364:2;116357:4;116354:1;116350:12;116343:24;;;116402:4;116395;116392:1;116388:12;116381:26;116540:4;116537:1;116534;116527:4;116524:1;116520:12;116517:1;116509:6;116502:5;116497:48;116493:1;116489;116483:8;116480:15;116476:70;116466:131;;116577:4;116574:1;116567:15;116941:677;117001:22;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;117001:22:0;117287:4;117281:11;117319:1;117313:4;117306:15;117380:4;117374;117370:15;117469:1;117466;117462:9;117454:6;117450:22;117444:4;117437:36;117528:4;117524:1;117518:4;117514:12;117507:26;117574:6;117571:1;117564:17;;;116941:677;;;:::o;110089:1820::-;110215:21;110343:1;110339:6;110322:23;;110414:11;110410:2;110406:20;110501:5;110498:1;110494:13;110491:1;110487:21;110591:6;110585:13;110581:18;110573:5;110567:4;110563:16;110559:41;110551:5;110545:4;110541:16;110537:64;110625:7;110615:463;;110685:3;110682:1;110678:11;110675:1;110671:19;110708:199;110765:1;110757:6;110753:14;110743:24;;110810:6;110804:13;110800:18;110789:29;;110866:10;110858:6;110855:22;110846:7;110843:35;110840:48;110708:199;110840:48;110939:10;110931:6;110928:22;110925:138;;;111018:4;111024:8;;111014:19;111010:33;;;110985:59;;;;110925:138;;110615:463;111095:7;111092:799;;;111771:14;;;111768:1;111764:22;111670:66;111192:12;;111206:1;111188:20;111175:34;;111284;111281:41;-1:-1:-1;111278:1:0;111274:49;111382:9;;;111362:18;111359:33;111356:1;111352:41;111346:48;111445:9;;;111433:10;111430:25;111427:1;111423:33;111417:40;111630:9;;;111618:10;111614:26;111642:4;111610:37;111605:132;;;;111599:139;111761:29;111848:10;;;111841:18;111861:12;;;111838:36;111835:1;111831:44;111825:51;;-1:-1:-1;111092:799:0;;;;110089:1820;;;;;:::o;118445:647::-;118622:4;118619:1;118615:12;118609:19;118661:4;118655;118651:15;118720:10;118717:1;118710:21;118795:4;118788;118785:1;118781:12;118774:26;118891:4;118885:11;118882:1;118878:19;118872:4;118868:30;118859:39;;119017:4;119014:1;119011;119004:4;119001:1;118997:12;118994:1;118986:6;118979:5;118974:48;118970:1;118966;118960:8;118957:15;118953:70;118943:131;;119054:4;119051:1;119044:15;14:250:1;99:1;109:113;123:6;120:1;117:13;109:113;;;199:11;;;193:18;180:11;;;173:39;145:2;138:10;109:113;;;-1:-1:-1;;256:1:1;238:16;;231:27;14:250::o;269:396::-;418:2;407:9;400:21;381:4;450:6;444:13;493:6;488:2;477:9;473:18;466:34;509:79;581:6;576:2;565:9;561:18;556:2;548:6;544:15;509:79;:::i;:::-;649:2;628:15;-1:-1:-1;;624:29:1;609:45;;;;656:2;605:54;;269:396;-1:-1:-1;;269:396:1:o;670:131::-;-1:-1:-1;;;;;745:31:1;;735:42;;725:70;;791:1;788;781:12;806:315;874:6;882;935:2;923:9;914:7;910:23;906:32;903:52;;;951:1;948;941:12;903:52;990:9;977:23;1009:31;1034:5;1009:31;:::i;:::-;1059:5;1111:2;1096:18;;;;1083:32;;-1:-1:-1;;;806:315:1:o;1958:456::-;2035:6;2043;2051;2104:2;2092:9;2083:7;2079:23;2075:32;2072:52;;;2120:1;2117;2110:12;2072:52;2159:9;2146:23;2178:31;2203:5;2178:31;:::i;:::-;2228:5;-1:-1:-1;2285:2:1;2270:18;;2257:32;2298:33;2257:32;2298:33;:::i;:::-;1958:456;;2350:7;;-1:-1:-1;;;2404:2:1;2389:18;;;;2376:32;;1958:456::o;2419:247::-;2478:6;2531:2;2519:9;2510:7;2506:23;2502:32;2499:52;;;2547:1;2544;2537:12;2499:52;2586:9;2573:23;2605:31;2630:5;2605:31;:::i;2671:273::-;2727:6;2780:2;2768:9;2759:7;2755:23;2751:32;2748:52;;;2796:1;2793;2786:12;2748:52;2835:9;2822:23;2888:5;2881:13;2874:21;2867:5;2864:32;2854:60;;2910:1;2907;2900:12;3346:180;3405:6;3458:2;3446:9;3437:7;3433:23;3429:32;3426:52;;;3474:1;3471;3464:12;3426:52;-1:-1:-1;3497:23:1;;3346:180;-1:-1:-1;3346:180:1:o;3531:388::-;3599:6;3607;3660:2;3648:9;3639:7;3635:23;3631:32;3628:52;;;3676:1;3673;3666:12;3628:52;3715:9;3702:23;3734:31;3759:5;3734:31;:::i;:::-;3784:5;-1:-1:-1;3841:2:1;3826:18;;3813:32;3854:33;3813:32;3854:33;:::i;:::-;3906:7;3896:17;;;3531:388;;;;;:::o;3924:380::-;4003:1;3999:12;;;;4046;;;4067:61;;4121:4;4113:6;4109:17;4099:27;;4067:61;4174:2;4166:6;4163:14;4143:18;4140:38;4137:161;;4220:10;4215:3;4211:20;4208:1;4201:31;4255:4;4252:1;4245:15;4283:4;4280:1;4273:15;4137:161;;3924:380;;;:::o;4435:198::-;4477:3;4515:5;4509:12;4530:65;4588:6;4583:3;4576:4;4569:5;4565:16;4530:65;:::i;:::-;4611:16;;;;;4435:198;-1:-1:-1;;4435:198:1:o;4638:1201::-;4814:3;4843:1;4876:6;4870:13;4906:3;4928:1;4955:9;4952:1;4948:17;4938:27;;5015:1;5004:9;5000:17;5036:18;5026:61;;5080:4;5072:6;5068:17;5058:27;;5026:61;5106:2;5154;5146:6;5143:14;5123:18;5120:38;5117:165;;-1:-1:-1;;;5181:33:1;;5237:4;5234:1;5227:15;5267:4;5188:3;5255:17;5117:165;5298:18;5325:133;;;;5472:1;5467:320;;;;5291:496;;5325:133;-1:-1:-1;;5358:24:1;;5346:37;;5431:14;;5424:22;5412:35;;5403:45;;;-1:-1:-1;5325:133:1;;5467:320;4382:1;4375:14;;;4419:4;4406:18;;5562:1;5576:165;5590:6;5587:1;5584:13;5576:165;;;5668:14;;5655:11;;;5648:35;5711:16;;;;5605:10;;5576:165;;;5580:3;;5770:6;5765:3;5761:16;5754:23;;5291:496;;;;;;;5803:30;5829:3;5821:6;5803:30;:::i;:::-;5796:37;4638:1201;-1:-1:-1;;;;;4638:1201:1:o;6254:127::-;6315:10;6310:3;6306:20;6303:1;6296:31;6346:4;6343:1;6336:15;6370:4;6367:1;6360:15;6386:168;6459:9;;;6490;;6507:15;;;6501:22;;6487:37;6477:71;;6528:18;;:::i;6559:127::-;6620:10;6615:3;6611:20;6608:1;6601:31;6651:4;6648:1;6641:15;6675:4;6672:1;6665:15;6691:217;6731:1;6757;6747:132;;6801:10;6796:3;6792:20;6789:1;6782:31;6836:4;6833:1;6826:15;6864:4;6861:1;6854:15;6747:132;-1:-1:-1;6893:9:1;;6691:217::o;6913:128::-;6980:9;;;7001:11;;;6998:37;;;7015:18;;:::i;7046:127::-;7107:10;7102:3;7098:20;7095:1;7088:31;7138:4;7135:1;7128:15;7162:4;7159:1;7152:15;7178:127;7239:10;7234:3;7230:20;7227:1;7220:31;7270:4;7267:1;7260:15;7294:4;7291:1;7284:15;7310:251;7380:6;7433:2;7421:9;7412:7;7408:23;7404:32;7401:52;;;7449:1;7446;7439:12;7401:52;7481:9;7475:16;7500:31;7525:5;7500:31;:::i;7566:980::-;7828:4;7876:3;7865:9;7861:19;7907:6;7896:9;7889:25;7933:2;7971:6;7966:2;7955:9;7951:18;7944:34;8014:3;8009:2;7998:9;7994:18;7987:31;8038:6;8073;8067:13;8104:6;8096;8089:22;8142:3;8131:9;8127:19;8120:26;;8181:2;8173:6;8169:15;8155:29;;8202:1;8212:195;8226:6;8223:1;8220:13;8212:195;;;8291:13;;-1:-1:-1;;;;;8287:39:1;8275:52;;8382:15;;;;8347:12;;;;8323:1;8241:9;8212:195;;;-1:-1:-1;;;;;;;8463:32:1;;;;8458:2;8443:18;;8436:60;-1:-1:-1;;;8527:3:1;8512:19;8505:35;8424:3;7566:980;-1:-1:-1;;;7566:980:1:o
Swarm Source
ipfs://8292be7b9e6e4702a992db95c86b40b6a19145922563b146b28acdc87a60f8dc
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.