Feature Tip: Add private address tag to any address under My Name Tag !
ERC-20
Overview
Max Total Supply
1 HIDDEN
Holders
18
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 18 Decimals)
Balance
0.002704994819652949 HIDDENValue
$0.00Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Source Code Verified (Exact Match)
Contract Name:
HiddenOne404
Compiler Version
v0.8.24+commit.e11b9ed9
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2024-02-16 */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.4; // File: https://github.com/Vectorized/solady/blob/main/src/utils/SafeTransferLib.sol /// @notice Safe ETH and ERC20 transfer library that gracefully handles missing return values. /// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/SafeTransferLib.sol) /// @author Modified from Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/SafeTransferLib.sol) /// /// @dev Note: /// - For ETH transfers, please use `forceSafeTransferETH` for DoS protection. /// - For ERC20s, this implementation won't check that a token has code, /// responsibility is delegated to the caller. library SafeTransferLib { /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* CUSTOM ERRORS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev The ETH transfer has failed. error ETHTransferFailed(); /// @dev The ERC20 `transferFrom` has failed. error TransferFromFailed(); /// @dev The ERC20 `transfer` has failed. error TransferFailed(); /// @dev The ERC20 `approve` has failed. error ApproveFailed(); /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* CONSTANTS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Suggested gas stipend for contract receiving ETH that disallows any storage writes. uint256 internal constant GAS_STIPEND_NO_STORAGE_WRITES = 2300; /// @dev Suggested gas stipend for contract receiving ETH to perform a few /// storage reads and writes, but low enough to prevent griefing. uint256 internal constant GAS_STIPEND_NO_GRIEF = 100000; /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* ETH OPERATIONS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ // If the ETH transfer MUST succeed with a reasonable gas budget, use the force variants. // // The regular variants: // - Forwards all remaining gas to the target. // - Reverts if the target reverts. // - Reverts if the current contract has insufficient balance. // // The force variants: // - Forwards with an optional gas stipend // (defaults to `GAS_STIPEND_NO_GRIEF`, which is sufficient for most cases). // - If the target reverts, or if the gas stipend is exhausted, // creates a temporary contract to force send the ETH via `SELFDESTRUCT`. // Future compatible with `SENDALL`: https://eips.ethereum.org/EIPS/eip-4758. // - Reverts if the current contract has insufficient balance. // // The try variants: // - Forwards with a mandatory gas stipend. // - Instead of reverting, returns whether the transfer succeeded. /// @dev Sends `amount` (in wei) ETH to `to`. function safeTransferETH(address to, uint256 amount) internal { /// @solidity memory-safe-assembly assembly { if iszero(call(gas(), to, amount, codesize(), 0x00, codesize(), 0x00)) { mstore(0x00, 0xb12d13eb) // `ETHTransferFailed()`. revert(0x1c, 0x04) } } } /// @dev Sends all the ETH in the current contract to `to`. function safeTransferAllETH(address to) internal { /// @solidity memory-safe-assembly assembly { // Transfer all the ETH and check if it succeeded or not. if iszero(call(gas(), to, selfbalance(), codesize(), 0x00, codesize(), 0x00)) { mstore(0x00, 0xb12d13eb) // `ETHTransferFailed()`. revert(0x1c, 0x04) } } } /// @dev Force sends `amount` (in wei) ETH to `to`, with a `gasStipend`. function forceSafeTransferETH(address to, uint256 amount, uint256 gasStipend) internal { /// @solidity memory-safe-assembly assembly { if lt(selfbalance(), amount) { mstore(0x00, 0xb12d13eb) // `ETHTransferFailed()`. revert(0x1c, 0x04) } if iszero(call(gasStipend, to, amount, codesize(), 0x00, codesize(), 0x00)) { mstore(0x00, to) // Store the address in scratch space. mstore8(0x0b, 0x73) // Opcode `PUSH20`. mstore8(0x20, 0xff) // Opcode `SELFDESTRUCT`. if iszero(create(amount, 0x0b, 0x16)) { revert(codesize(), codesize()) } // For gas estimation. } } } /// @dev Force sends all the ETH in the current contract to `to`, with a `gasStipend`. function forceSafeTransferAllETH(address to, uint256 gasStipend) internal { /// @solidity memory-safe-assembly assembly { if iszero(call(gasStipend, to, selfbalance(), codesize(), 0x00, codesize(), 0x00)) { mstore(0x00, to) // Store the address in scratch space. mstore8(0x0b, 0x73) // Opcode `PUSH20`. mstore8(0x20, 0xff) // Opcode `SELFDESTRUCT`. if iszero(create(selfbalance(), 0x0b, 0x16)) { revert(codesize(), codesize()) } // For gas estimation. } } } /// @dev Force sends `amount` (in wei) ETH to `to`, with `GAS_STIPEND_NO_GRIEF`. function forceSafeTransferETH(address to, uint256 amount) internal { /// @solidity memory-safe-assembly assembly { if lt(selfbalance(), amount) { mstore(0x00, 0xb12d13eb) // `ETHTransferFailed()`. revert(0x1c, 0x04) } if iszero(call(GAS_STIPEND_NO_GRIEF, to, amount, codesize(), 0x00, codesize(), 0x00)) { mstore(0x00, to) // Store the address in scratch space. mstore8(0x0b, 0x73) // Opcode `PUSH20`. mstore8(0x20, 0xff) // Opcode `SELFDESTRUCT`. if iszero(create(amount, 0x0b, 0x16)) { revert(codesize(), codesize()) } // For gas estimation. } } } /// @dev Force sends all the ETH in the current contract to `to`, with `GAS_STIPEND_NO_GRIEF`. function forceSafeTransferAllETH(address to) internal { /// @solidity memory-safe-assembly assembly { // forgefmt: disable-next-item if iszero(call(GAS_STIPEND_NO_GRIEF, to, selfbalance(), codesize(), 0x00, codesize(), 0x00)) { mstore(0x00, to) // Store the address in scratch space. mstore8(0x0b, 0x73) // Opcode `PUSH20`. mstore8(0x20, 0xff) // Opcode `SELFDESTRUCT`. if iszero(create(selfbalance(), 0x0b, 0x16)) { revert(codesize(), codesize()) } // For gas estimation. } } } /// @dev Sends `amount` (in wei) ETH to `to`, with a `gasStipend`. function trySafeTransferETH(address to, uint256 amount, uint256 gasStipend) internal returns (bool success) { /// @solidity memory-safe-assembly assembly { success := call(gasStipend, to, amount, codesize(), 0x00, codesize(), 0x00) } } /// @dev Sends all the ETH in the current contract to `to`, with a `gasStipend`. function trySafeTransferAllETH(address to, uint256 gasStipend) internal returns (bool success) { /// @solidity memory-safe-assembly assembly { success := call(gasStipend, to, selfbalance(), codesize(), 0x00, codesize(), 0x00) } } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* ERC20 OPERATIONS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Sends `amount` of ERC20 `token` from `from` to `to`. /// Reverts upon failure. /// /// The `from` account must have at least `amount` approved for /// the current contract to manage. function safeTransferFrom(address token, address from, address to, uint256 amount) internal { /// @solidity memory-safe-assembly assembly { let m := mload(0x40) // Cache the free memory pointer. mstore(0x60, amount) // Store the `amount` argument. mstore(0x40, to) // Store the `to` argument. mstore(0x2c, shl(96, from)) // Store the `from` argument. mstore(0x0c, 0x23b872dd000000000000000000000000) // `transferFrom(address,address,uint256)`. // Perform the transfer, reverting upon failure. if iszero( and( // The arguments of `and` are evaluated from right to left. or(eq(mload(0x00), 1), iszero(returndatasize())), // Returned 1 or nothing. call(gas(), token, 0, 0x1c, 0x64, 0x00, 0x20) ) ) { mstore(0x00, 0x7939f424) // `TransferFromFailed()`. revert(0x1c, 0x04) } mstore(0x60, 0) // Restore the zero slot to zero. mstore(0x40, m) // Restore the free memory pointer. } } /// @dev Sends all of ERC20 `token` from `from` to `to`. /// Reverts upon failure. /// /// The `from` account must have their entire balance approved for /// the current contract to manage. function safeTransferAllFrom(address token, address from, address to) internal returns (uint256 amount) { /// @solidity memory-safe-assembly assembly { let m := mload(0x40) // Cache the free memory pointer. mstore(0x40, to) // Store the `to` argument. mstore(0x2c, shl(96, from)) // Store the `from` argument. mstore(0x0c, 0x70a08231000000000000000000000000) // `balanceOf(address)`. // Read the balance, reverting upon failure. if iszero( and( // The arguments of `and` are evaluated from right to left. gt(returndatasize(), 0x1f), // At least 32 bytes returned. staticcall(gas(), token, 0x1c, 0x24, 0x60, 0x20) ) ) { mstore(0x00, 0x7939f424) // `TransferFromFailed()`. revert(0x1c, 0x04) } mstore(0x00, 0x23b872dd) // `transferFrom(address,address,uint256)`. amount := mload(0x60) // The `amount` is already at 0x60. We'll need to return it. // Perform the transfer, reverting upon failure. if iszero( and( // The arguments of `and` are evaluated from right to left. or(eq(mload(0x00), 1), iszero(returndatasize())), // Returned 1 or nothing. call(gas(), token, 0, 0x1c, 0x64, 0x00, 0x20) ) ) { mstore(0x00, 0x7939f424) // `TransferFromFailed()`. revert(0x1c, 0x04) } mstore(0x60, 0) // Restore the zero slot to zero. mstore(0x40, m) // Restore the free memory pointer. } } /// @dev Sends `amount` of ERC20 `token` from the current contract to `to`. /// Reverts upon failure. function safeTransfer(address token, address to, uint256 amount) internal { /// @solidity memory-safe-assembly assembly { mstore(0x14, to) // Store the `to` argument. mstore(0x34, amount) // Store the `amount` argument. mstore(0x00, 0xa9059cbb000000000000000000000000) // `transfer(address,uint256)`. // Perform the transfer, reverting upon failure. if iszero( and( // The arguments of `and` are evaluated from right to left. or(eq(mload(0x00), 1), iszero(returndatasize())), // Returned 1 or nothing. call(gas(), token, 0, 0x10, 0x44, 0x00, 0x20) ) ) { mstore(0x00, 0x90b8ec18) // `TransferFailed()`. revert(0x1c, 0x04) } mstore(0x34, 0) // Restore the part of the free memory pointer that was overwritten. } } /// @dev Sends all of ERC20 `token` from the current contract to `to`. /// Reverts upon failure. function safeTransferAll(address token, address to) internal returns (uint256 amount) { /// @solidity memory-safe-assembly assembly { mstore(0x00, 0x70a08231) // Store the function selector of `balanceOf(address)`. mstore(0x20, address()) // Store the address of the current contract. // Read the balance, reverting upon failure. if iszero( and( // The arguments of `and` are evaluated from right to left. gt(returndatasize(), 0x1f), // At least 32 bytes returned. staticcall(gas(), token, 0x1c, 0x24, 0x34, 0x20) ) ) { mstore(0x00, 0x90b8ec18) // `TransferFailed()`. revert(0x1c, 0x04) } mstore(0x14, to) // Store the `to` argument. amount := mload(0x34) // The `amount` is already at 0x34. We'll need to return it. mstore(0x00, 0xa9059cbb000000000000000000000000) // `transfer(address,uint256)`. // Perform the transfer, reverting upon failure. if iszero( and( // The arguments of `and` are evaluated from right to left. or(eq(mload(0x00), 1), iszero(returndatasize())), // Returned 1 or nothing. call(gas(), token, 0, 0x10, 0x44, 0x00, 0x20) ) ) { mstore(0x00, 0x90b8ec18) // `TransferFailed()`. revert(0x1c, 0x04) } mstore(0x34, 0) // Restore the part of the free memory pointer that was overwritten. } } /// @dev Sets `amount` of ERC20 `token` for `to` to manage on behalf of the current contract. /// Reverts upon failure. function safeApprove(address token, address to, uint256 amount) internal { /// @solidity memory-safe-assembly assembly { mstore(0x14, to) // Store the `to` argument. mstore(0x34, amount) // Store the `amount` argument. mstore(0x00, 0x095ea7b3000000000000000000000000) // `approve(address,uint256)`. // Perform the approval, reverting upon failure. if iszero( and( // The arguments of `and` are evaluated from right to left. or(eq(mload(0x00), 1), iszero(returndatasize())), // Returned 1 or nothing. call(gas(), token, 0, 0x10, 0x44, 0x00, 0x20) ) ) { mstore(0x00, 0x3e3f8f73) // `ApproveFailed()`. revert(0x1c, 0x04) } mstore(0x34, 0) // Restore the part of the free memory pointer that was overwritten. } } /// @dev Sets `amount` of ERC20 `token` for `to` to manage on behalf of the current contract. /// If the initial attempt to approve fails, attempts to reset the approved amount to zero, /// then retries the approval again (some tokens, e.g. USDT, requires this). /// Reverts upon failure. function safeApproveWithRetry(address token, address to, uint256 amount) internal { /// @solidity memory-safe-assembly assembly { mstore(0x14, to) // Store the `to` argument. mstore(0x34, amount) // Store the `amount` argument. mstore(0x00, 0x095ea7b3000000000000000000000000) // `approve(address,uint256)`. // Perform the approval, retrying upon failure. if iszero( and( // The arguments of `and` are evaluated from right to left. or(eq(mload(0x00), 1), iszero(returndatasize())), // Returned 1 or nothing. call(gas(), token, 0, 0x10, 0x44, 0x00, 0x20) ) ) { mstore(0x34, 0) // Store 0 for the `amount`. mstore(0x00, 0x095ea7b3000000000000000000000000) // `approve(address,uint256)`. pop(call(gas(), token, 0, 0x10, 0x44, codesize(), 0x00)) // Reset the approval. mstore(0x34, amount) // Store back the original `amount`. // Retry the approval, reverting upon failure. if iszero( and( or(eq(mload(0x00), 1), iszero(returndatasize())), // Returned 1 or nothing. call(gas(), token, 0, 0x10, 0x44, 0x00, 0x20) ) ) { mstore(0x00, 0x3e3f8f73) // `ApproveFailed()`. revert(0x1c, 0x04) } } mstore(0x34, 0) // Restore the part of the free memory pointer that was overwritten. } } /// @dev Returns the amount of ERC20 `token` owned by `account`. /// Returns zero if the `token` does not exist. function balanceOf(address token, address account) internal view returns (uint256 amount) { /// @solidity memory-safe-assembly assembly { mstore(0x14, account) // Store the `account` argument. mstore(0x00, 0x70a08231000000000000000000000000) // `balanceOf(address)`. amount := mul( mload(0x20), and( // The arguments of `and` are evaluated from right to left. gt(returndatasize(), 0x1f), // At least 32 bytes returned. staticcall(gas(), token, 0x10, 0x24, 0x20, 0x20) ) ) } } } // File: https://github.com/Vectorized/solady/blob/main/src/utils/LibString.sol pragma solidity ^0.8.4; /// @notice Library for converting numbers into strings and other string operations. /// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/LibString.sol) /// @author Modified from Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/LibString.sol) /// /// @dev Note: /// For performance and bytecode compactness, most of the string operations are restricted to /// byte strings (7-bit ASCII), except where otherwise specified. /// Usage of byte string operations on charsets with runes spanning two or more bytes /// can lead to undefined behavior. library LibString { /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* CUSTOM ERRORS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev The length of the output is too small to contain all the hex digits. error HexLengthInsufficient(); /// @dev The length of the string is more than 32 bytes. error TooBigForSmallString(); /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* CONSTANTS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev The constant returned when the `search` is not found in the string. uint256 internal constant NOT_FOUND = type(uint256).max; /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* DECIMAL OPERATIONS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Returns the base 10 decimal representation of `value`. function toString(uint256 value) internal pure returns (string memory str) { /// @solidity memory-safe-assembly assembly { // The maximum value of a uint256 contains 78 digits (1 byte per digit), but // we allocate 0xa0 bytes to keep the free memory pointer 32-byte word aligned. // We will need 1 word for the trailing zeros padding, 1 word for the length, // and 3 words for a maximum of 78 digits. str := add(mload(0x40), 0x80) // Update the free memory pointer to allocate. mstore(0x40, add(str, 0x20)) // Zeroize the slot after the string. mstore(str, 0) // Cache the end of the memory to calculate the length later. let end := str let w := not(0) // Tsk. // We write the string from rightmost digit to leftmost digit. // The following is essentially a do-while loop that also handles the zero case. for { let temp := value } 1 {} { str := add(str, w) // `sub(str, 1)`. // Write the character to the pointer. // The ASCII index of the '0' character is 48. mstore8(str, add(48, mod(temp, 10))) // Keep dividing `temp` until zero. temp := div(temp, 10) if iszero(temp) { break } } let length := sub(end, str) // Move the pointer 32 bytes leftwards to make room for the length. str := sub(str, 0x20) // Store the length. mstore(str, length) } } /// @dev Returns the base 10 decimal representation of `value`. function toString(int256 value) internal pure returns (string memory str) { if (value >= 0) { return toString(uint256(value)); } unchecked { str = toString(~uint256(value) + 1); } /// @solidity memory-safe-assembly assembly { // We still have some spare memory space on the left, // as we have allocated 3 words (96 bytes) for up to 78 digits. let length := mload(str) // Load the string length. mstore(str, 0x2d) // Store the '-' character. str := sub(str, 1) // Move back the string pointer by a byte. mstore(str, add(length, 1)) // Update the string length. } } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* HEXADECIMAL OPERATIONS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Returns the hexadecimal representation of `value`, /// left-padded to an input length of `length` bytes. /// The output is prefixed with "0x" encoded using 2 hexadecimal digits per byte, /// giving a total length of `length * 2 + 2` bytes. /// Reverts if `length` is too small for the output to contain all the digits. function toHexString(uint256 value, uint256 length) internal pure returns (string memory str) { str = toHexStringNoPrefix(value, length); /// @solidity memory-safe-assembly assembly { let strLength := add(mload(str), 2) // Compute the length. mstore(str, 0x3078) // Write the "0x" prefix. str := sub(str, 2) // Move the pointer. mstore(str, strLength) // Write the length. } } /// @dev Returns the hexadecimal representation of `value`, /// left-padded to an input length of `length` bytes. /// The output is prefixed with "0x" encoded using 2 hexadecimal digits per byte, /// giving a total length of `length * 2` bytes. /// Reverts if `length` is too small for the output to contain all the digits. function toHexStringNoPrefix(uint256 value, uint256 length) internal pure returns (string memory str) { /// @solidity memory-safe-assembly assembly { // We need 0x20 bytes for the trailing zeros padding, `length * 2` bytes // for the digits, 0x02 bytes for the prefix, and 0x20 bytes for the length. // We add 0x20 to the total and round down to a multiple of 0x20. // (0x20 + 0x20 + 0x02 + 0x20) = 0x62. str := add(mload(0x40), and(add(shl(1, length), 0x42), not(0x1f))) // Allocate the memory. mstore(0x40, add(str, 0x20)) // Zeroize the slot after the string. mstore(str, 0) // Cache the end to calculate the length later. let end := str // Store "0123456789abcdef" in scratch space. mstore(0x0f, 0x30313233343536373839616263646566) let start := sub(str, add(length, length)) let w := not(1) // Tsk. let temp := value // We write the string from rightmost digit to leftmost digit. // The following is essentially a do-while loop that also handles the zero case. for {} 1 {} { str := add(str, w) // `sub(str, 2)`. mstore8(add(str, 1), mload(and(temp, 15))) mstore8(str, mload(and(shr(4, temp), 15))) temp := shr(8, temp) if iszero(xor(str, start)) { break } } if temp { mstore(0x00, 0x2194895a) // `HexLengthInsufficient()`. revert(0x1c, 0x04) } // Compute the string's length. let strLength := sub(end, str) // Move the pointer and write the length. str := sub(str, 0x20) mstore(str, strLength) } } /// @dev Returns the hexadecimal representation of `value`. /// The output is prefixed with "0x" and encoded using 2 hexadecimal digits per byte. /// As address are 20 bytes long, the output will left-padded to have /// a length of `20 * 2 + 2` bytes. function toHexString(uint256 value) internal pure returns (string memory str) { str = toHexStringNoPrefix(value); /// @solidity memory-safe-assembly assembly { let strLength := add(mload(str), 2) // Compute the length. mstore(str, 0x3078) // Write the "0x" prefix. str := sub(str, 2) // Move the pointer. mstore(str, strLength) // Write the length. } } /// @dev Returns the hexadecimal representation of `value`. /// The output is prefixed with "0x". /// The output excludes leading "0" from the `toHexString` output. /// `0x00: "0x0", 0x01: "0x1", 0x12: "0x12", 0x123: "0x123"`. function toMinimalHexString(uint256 value) internal pure returns (string memory str) { str = toHexStringNoPrefix(value); /// @solidity memory-safe-assembly assembly { let o := eq(byte(0, mload(add(str, 0x20))), 0x30) // Whether leading zero is present. let strLength := add(mload(str), 2) // Compute the length. mstore(add(str, o), 0x3078) // Write the "0x" prefix, accounting for leading zero. str := sub(add(str, o), 2) // Move the pointer, accounting for leading zero. mstore(str, sub(strLength, o)) // Write the length, accounting for leading zero. } } /// @dev Returns the hexadecimal representation of `value`. /// The output excludes leading "0" from the `toHexStringNoPrefix` output. /// `0x00: "0", 0x01: "1", 0x12: "12", 0x123: "123"`. function toMinimalHexStringNoPrefix(uint256 value) internal pure returns (string memory str) { str = toHexStringNoPrefix(value); /// @solidity memory-safe-assembly assembly { let o := eq(byte(0, mload(add(str, 0x20))), 0x30) // Whether leading zero is present. let strLength := mload(str) // Get the length. str := add(str, o) // Move the pointer, accounting for leading zero. mstore(str, sub(strLength, o)) // Write the length, accounting for leading zero. } } /// @dev Returns the hexadecimal representation of `value`. /// The output is encoded using 2 hexadecimal digits per byte. /// As address are 20 bytes long, the output will left-padded to have /// a length of `20 * 2` bytes. function toHexStringNoPrefix(uint256 value) internal pure returns (string memory str) { /// @solidity memory-safe-assembly assembly { // We need 0x20 bytes for the trailing zeros padding, 0x20 bytes for the length, // 0x02 bytes for the prefix, and 0x40 bytes for the digits. // The next multiple of 0x20 above (0x20 + 0x20 + 0x02 + 0x40) is 0xa0. str := add(mload(0x40), 0x80) // Allocate the memory. mstore(0x40, add(str, 0x20)) // Zeroize the slot after the string. mstore(str, 0) // Cache the end to calculate the length later. let end := str // Store "0123456789abcdef" in scratch space. mstore(0x0f, 0x30313233343536373839616263646566) let w := not(1) // Tsk. // We write the string from rightmost digit to leftmost digit. // The following is essentially a do-while loop that also handles the zero case. for { let temp := value } 1 {} { str := add(str, w) // `sub(str, 2)`. mstore8(add(str, 1), mload(and(temp, 15))) mstore8(str, mload(and(shr(4, temp), 15))) temp := shr(8, temp) if iszero(temp) { break } } // Compute the string's length. let strLength := sub(end, str) // Move the pointer and write the length. str := sub(str, 0x20) mstore(str, strLength) } } /// @dev Returns the hexadecimal representation of `value`. /// The output is prefixed with "0x", encoded using 2 hexadecimal digits per byte, /// and the alphabets are capitalized conditionally according to /// https://eips.ethereum.org/EIPS/eip-55 function toHexStringChecksummed(address value) internal pure returns (string memory str) { str = toHexString(value); /// @solidity memory-safe-assembly assembly { let mask := shl(6, div(not(0), 255)) // `0b010000000100000000 ...` let o := add(str, 0x22) let hashed := and(keccak256(o, 40), mul(34, mask)) // `0b10001000 ... ` let t := shl(240, 136) // `0b10001000 << 240` for { let i := 0 } 1 {} { mstore(add(i, i), mul(t, byte(i, hashed))) i := add(i, 1) if eq(i, 20) { break } } mstore(o, xor(mload(o), shr(1, and(mload(0x00), and(mload(o), mask))))) o := add(o, 0x20) mstore(o, xor(mload(o), shr(1, and(mload(0x20), and(mload(o), mask))))) } } /// @dev Returns the hexadecimal representation of `value`. /// The output is prefixed with "0x" and encoded using 2 hexadecimal digits per byte. function toHexString(address value) internal pure returns (string memory str) { str = toHexStringNoPrefix(value); /// @solidity memory-safe-assembly assembly { let strLength := add(mload(str), 2) // Compute the length. mstore(str, 0x3078) // Write the "0x" prefix. str := sub(str, 2) // Move the pointer. mstore(str, strLength) // Write the length. } } /// @dev Returns the hexadecimal representation of `value`. /// The output is encoded using 2 hexadecimal digits per byte. function toHexStringNoPrefix(address value) internal pure returns (string memory str) { /// @solidity memory-safe-assembly assembly { str := mload(0x40) // Allocate the memory. // We need 0x20 bytes for the trailing zeros padding, 0x20 bytes for the length, // 0x02 bytes for the prefix, and 0x28 bytes for the digits. // The next multiple of 0x20 above (0x20 + 0x20 + 0x02 + 0x28) is 0x80. mstore(0x40, add(str, 0x80)) // Store "0123456789abcdef" in scratch space. mstore(0x0f, 0x30313233343536373839616263646566) str := add(str, 2) mstore(str, 40) let o := add(str, 0x20) mstore(add(o, 40), 0) value := shl(96, value) // We write the string from rightmost digit to leftmost digit. // The following is essentially a do-while loop that also handles the zero case. for { let i := 0 } 1 {} { let p := add(o, add(i, i)) let temp := byte(i, value) mstore8(add(p, 1), mload(and(temp, 15))) mstore8(p, mload(shr(4, temp))) i := add(i, 1) if eq(i, 20) { break } } } } /// @dev Returns the hex encoded string from the raw bytes. /// The output is encoded using 2 hexadecimal digits per byte. function toHexString(bytes memory raw) internal pure returns (string memory str) { str = toHexStringNoPrefix(raw); /// @solidity memory-safe-assembly assembly { let strLength := add(mload(str), 2) // Compute the length. mstore(str, 0x3078) // Write the "0x" prefix. str := sub(str, 2) // Move the pointer. mstore(str, strLength) // Write the length. } } /// @dev Returns the hex encoded string from the raw bytes. /// The output is encoded using 2 hexadecimal digits per byte. function toHexStringNoPrefix(bytes memory raw) internal pure returns (string memory str) { /// @solidity memory-safe-assembly assembly { let length := mload(raw) str := add(mload(0x40), 2) // Skip 2 bytes for the optional prefix. mstore(str, add(length, length)) // Store the length of the output. // Store "0123456789abcdef" in scratch space. mstore(0x0f, 0x30313233343536373839616263646566) let o := add(str, 0x20) let end := add(raw, length) for {} iszero(eq(raw, end)) {} { raw := add(raw, 1) mstore8(add(o, 1), mload(and(mload(raw), 15))) mstore8(o, mload(and(shr(4, mload(raw)), 15))) o := add(o, 2) } mstore(o, 0) // Zeroize the slot after the string. mstore(0x40, add(o, 0x20)) // Allocate the memory. } } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* RUNE STRING OPERATIONS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Returns the number of UTF characters in the string. function runeCount(string memory s) internal pure returns (uint256 result) { /// @solidity memory-safe-assembly assembly { if mload(s) { mstore(0x00, div(not(0), 255)) mstore(0x20, 0x0202020202020202020202020202020202020202020202020303030304040506) let o := add(s, 0x20) let end := add(o, mload(s)) for { result := 1 } 1 { result := add(result, 1) } { o := add(o, byte(0, mload(shr(250, mload(o))))) if iszero(lt(o, end)) { break } } } } } /// @dev Returns if this string is a 7-bit ASCII string. /// (i.e. all characters codes are in [0..127]) function is7BitASCII(string memory s) internal pure returns (bool result) { /// @solidity memory-safe-assembly assembly { let mask := shl(7, div(not(0), 255)) result := 1 let n := mload(s) if n { let o := add(s, 0x20) let end := add(o, n) let last := mload(end) mstore(end, 0) for {} 1 {} { if and(mask, mload(o)) { result := 0 break } o := add(o, 0x20) if iszero(lt(o, end)) { break } } mstore(end, last) } } } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* BYTE STRING OPERATIONS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ // For performance and bytecode compactness, byte string operations are restricted // to 7-bit ASCII strings. All offsets are byte offsets, not UTF character offsets. // Usage of byte string operations on charsets with runes spanning two or more bytes // can lead to undefined behavior. /// @dev Returns `subject` all occurrences of `search` replaced with `replacement`. function replace(string memory subject, string memory search, string memory replacement) internal pure returns (string memory result) { /// @solidity memory-safe-assembly assembly { let subjectLength := mload(subject) let searchLength := mload(search) let replacementLength := mload(replacement) subject := add(subject, 0x20) search := add(search, 0x20) replacement := add(replacement, 0x20) result := add(mload(0x40), 0x20) let subjectEnd := add(subject, subjectLength) if iszero(gt(searchLength, subjectLength)) { let subjectSearchEnd := add(sub(subjectEnd, searchLength), 1) let h := 0 if iszero(lt(searchLength, 0x20)) { h := keccak256(search, searchLength) } let m := shl(3, sub(0x20, and(searchLength, 0x1f))) let s := mload(search) for {} 1 {} { let t := mload(subject) // Whether the first `searchLength % 32` bytes of // `subject` and `search` matches. if iszero(shr(m, xor(t, s))) { if h { if iszero(eq(keccak256(subject, searchLength), h)) { mstore(result, t) result := add(result, 1) subject := add(subject, 1) if iszero(lt(subject, subjectSearchEnd)) { break } continue } } // Copy the `replacement` one word at a time. for { let o := 0 } 1 {} { mstore(add(result, o), mload(add(replacement, o))) o := add(o, 0x20) if iszero(lt(o, replacementLength)) { break } } result := add(result, replacementLength) subject := add(subject, searchLength) if searchLength { if iszero(lt(subject, subjectSearchEnd)) { break } continue } } mstore(result, t) result := add(result, 1) subject := add(subject, 1) if iszero(lt(subject, subjectSearchEnd)) { break } } } let resultRemainder := result result := add(mload(0x40), 0x20) let k := add(sub(resultRemainder, result), sub(subjectEnd, subject)) // Copy the rest of the string one word at a time. for {} lt(subject, subjectEnd) {} { mstore(resultRemainder, mload(subject)) resultRemainder := add(resultRemainder, 0x20) subject := add(subject, 0x20) } result := sub(result, 0x20) let last := add(add(result, 0x20), k) // Zeroize the slot after the string. mstore(last, 0) mstore(0x40, add(last, 0x20)) // Allocate the memory. mstore(result, k) // Store the length. } } /// @dev Returns the byte index of the first location of `search` in `subject`, /// searching from left to right, starting from `from`. /// Returns `NOT_FOUND` (i.e. `type(uint256).max`) if the `search` is not found. function indexOf(string memory subject, string memory search, uint256 from) internal pure returns (uint256 result) { /// @solidity memory-safe-assembly assembly { for { let subjectLength := mload(subject) } 1 {} { if iszero(mload(search)) { if iszero(gt(from, subjectLength)) { result := from break } result := subjectLength break } let searchLength := mload(search) let subjectStart := add(subject, 0x20) result := not(0) // Initialize to `NOT_FOUND`. subject := add(subjectStart, from) let end := add(sub(add(subjectStart, subjectLength), searchLength), 1) let m := shl(3, sub(0x20, and(searchLength, 0x1f))) let s := mload(add(search, 0x20)) if iszero(and(lt(subject, end), lt(from, subjectLength))) { break } if iszero(lt(searchLength, 0x20)) { for { let h := keccak256(add(search, 0x20), searchLength) } 1 {} { if iszero(shr(m, xor(mload(subject), s))) { if eq(keccak256(subject, searchLength), h) { result := sub(subject, subjectStart) break } } subject := add(subject, 1) if iszero(lt(subject, end)) { break } } break } for {} 1 {} { if iszero(shr(m, xor(mload(subject), s))) { result := sub(subject, subjectStart) break } subject := add(subject, 1) if iszero(lt(subject, end)) { break } } break } } } /// @dev Returns the byte index of the first location of `search` in `subject`, /// searching from left to right. /// Returns `NOT_FOUND` (i.e. `type(uint256).max`) if the `search` is not found. function indexOf(string memory subject, string memory search) internal pure returns (uint256 result) { result = indexOf(subject, search, 0); } /// @dev Returns the byte index of the first location of `search` in `subject`, /// searching from right to left, starting from `from`. /// Returns `NOT_FOUND` (i.e. `type(uint256).max`) if the `search` is not found. function lastIndexOf(string memory subject, string memory search, uint256 from) internal pure returns (uint256 result) { /// @solidity memory-safe-assembly assembly { for {} 1 {} { result := not(0) // Initialize to `NOT_FOUND`. let searchLength := mload(search) if gt(searchLength, mload(subject)) { break } let w := result let fromMax := sub(mload(subject), searchLength) if iszero(gt(fromMax, from)) { from := fromMax } let end := add(add(subject, 0x20), w) subject := add(add(subject, 0x20), from) if iszero(gt(subject, end)) { break } // As this function is not too often used, // we shall simply use keccak256 for smaller bytecode size. for { let h := keccak256(add(search, 0x20), searchLength) } 1 {} { if eq(keccak256(subject, searchLength), h) { result := sub(subject, add(end, 1)) break } subject := add(subject, w) // `sub(subject, 1)`. if iszero(gt(subject, end)) { break } } break } } } /// @dev Returns the byte index of the first location of `search` in `subject`, /// searching from right to left. /// Returns `NOT_FOUND` (i.e. `type(uint256).max`) if the `search` is not found. function lastIndexOf(string memory subject, string memory search) internal pure returns (uint256 result) { result = lastIndexOf(subject, search, uint256(int256(-1))); } /// @dev Returns true if `search` is found in `subject`, false otherwise. function contains(string memory subject, string memory search) internal pure returns (bool) { return indexOf(subject, search) != NOT_FOUND; } /// @dev Returns whether `subject` starts with `search`. function startsWith(string memory subject, string memory search) internal pure returns (bool result) { /// @solidity memory-safe-assembly assembly { let searchLength := mload(search) // Just using keccak256 directly is actually cheaper. // forgefmt: disable-next-item result := and( iszero(gt(searchLength, mload(subject))), eq( keccak256(add(subject, 0x20), searchLength), keccak256(add(search, 0x20), searchLength) ) ) } } /// @dev Returns whether `subject` ends with `search`. function endsWith(string memory subject, string memory search) internal pure returns (bool result) { /// @solidity memory-safe-assembly assembly { let searchLength := mload(search) let subjectLength := mload(subject) // Whether `search` is not longer than `subject`. let withinRange := iszero(gt(searchLength, subjectLength)) // Just using keccak256 directly is actually cheaper. // forgefmt: disable-next-item result := and( withinRange, eq( keccak256( // `subject + 0x20 + max(subjectLength - searchLength, 0)`. add(add(subject, 0x20), mul(withinRange, sub(subjectLength, searchLength))), searchLength ), keccak256(add(search, 0x20), searchLength) ) ) } } /// @dev Returns `subject` repeated `times`. function repeat(string memory subject, uint256 times) internal pure returns (string memory result) { /// @solidity memory-safe-assembly assembly { let subjectLength := mload(subject) if iszero(or(iszero(times), iszero(subjectLength))) { subject := add(subject, 0x20) result := mload(0x40) let output := add(result, 0x20) for {} 1 {} { // Copy the `subject` one word at a time. for { let o := 0 } 1 {} { mstore(add(output, o), mload(add(subject, o))) o := add(o, 0x20) if iszero(lt(o, subjectLength)) { break } } output := add(output, subjectLength) times := sub(times, 1) if iszero(times) { break } } mstore(output, 0) // Zeroize the slot after the string. let resultLength := sub(output, add(result, 0x20)) mstore(result, resultLength) // Store the length. // Allocate the memory. mstore(0x40, add(result, add(resultLength, 0x20))) } } } /// @dev Returns a copy of `subject` sliced from `start` to `end` (exclusive). /// `start` and `end` are byte offsets. function slice(string memory subject, uint256 start, uint256 end) internal pure returns (string memory result) { /// @solidity memory-safe-assembly assembly { let subjectLength := mload(subject) if iszero(gt(subjectLength, end)) { end := subjectLength } if iszero(gt(subjectLength, start)) { start := subjectLength } if lt(start, end) { result := mload(0x40) let resultLength := sub(end, start) mstore(result, resultLength) subject := add(subject, start) let w := not(0x1f) // Copy the `subject` one word at a time, backwards. for { let o := and(add(resultLength, 0x1f), w) } 1 {} { mstore(add(result, o), mload(add(subject, o))) o := add(o, w) // `sub(o, 0x20)`. if iszero(o) { break } } // Zeroize the slot after the string. mstore(add(add(result, 0x20), resultLength), 0) // Allocate memory for the length and the bytes, // rounded up to a multiple of 32. mstore(0x40, add(result, and(add(resultLength, 0x3f), w))) } } } /// @dev Returns a copy of `subject` sliced from `start` to the end of the string. /// `start` is a byte offset. function slice(string memory subject, uint256 start) internal pure returns (string memory result) { result = slice(subject, start, uint256(int256(-1))); } /// @dev Returns all the indices of `search` in `subject`. /// The indices are byte offsets. function indicesOf(string memory subject, string memory search) internal pure returns (uint256[] memory result) { /// @solidity memory-safe-assembly assembly { let subjectLength := mload(subject) let searchLength := mload(search) if iszero(gt(searchLength, subjectLength)) { subject := add(subject, 0x20) search := add(search, 0x20) result := add(mload(0x40), 0x20) let subjectStart := subject let subjectSearchEnd := add(sub(add(subject, subjectLength), searchLength), 1) let h := 0 if iszero(lt(searchLength, 0x20)) { h := keccak256(search, searchLength) } let m := shl(3, sub(0x20, and(searchLength, 0x1f))) let s := mload(search) for {} 1 {} { let t := mload(subject) // Whether the first `searchLength % 32` bytes of // `subject` and `search` matches. if iszero(shr(m, xor(t, s))) { if h { if iszero(eq(keccak256(subject, searchLength), h)) { subject := add(subject, 1) if iszero(lt(subject, subjectSearchEnd)) { break } continue } } // Append to `result`. mstore(result, sub(subject, subjectStart)) result := add(result, 0x20) // Advance `subject` by `searchLength`. subject := add(subject, searchLength) if searchLength { if iszero(lt(subject, subjectSearchEnd)) { break } continue } } subject := add(subject, 1) if iszero(lt(subject, subjectSearchEnd)) { break } } let resultEnd := result // Assign `result` to the free memory pointer. result := mload(0x40) // Store the length of `result`. mstore(result, shr(5, sub(resultEnd, add(result, 0x20)))) // Allocate memory for result. // We allocate one more word, so this array can be recycled for {split}. mstore(0x40, add(resultEnd, 0x20)) } } } /// @dev Returns a arrays of strings based on the `delimiter` inside of the `subject` string. function split(string memory subject, string memory delimiter) internal pure returns (string[] memory result) { uint256[] memory indices = indicesOf(subject, delimiter); /// @solidity memory-safe-assembly assembly { let w := not(0x1f) let indexPtr := add(indices, 0x20) let indicesEnd := add(indexPtr, shl(5, add(mload(indices), 1))) mstore(add(indicesEnd, w), mload(subject)) mstore(indices, add(mload(indices), 1)) let prevIndex := 0 for {} 1 {} { let index := mload(indexPtr) mstore(indexPtr, 0x60) if iszero(eq(index, prevIndex)) { let element := mload(0x40) let elementLength := sub(index, prevIndex) mstore(element, elementLength) // Copy the `subject` one word at a time, backwards. for { let o := and(add(elementLength, 0x1f), w) } 1 {} { mstore(add(element, o), mload(add(add(subject, prevIndex), o))) o := add(o, w) // `sub(o, 0x20)`. if iszero(o) { break } } // Zeroize the slot after the string. mstore(add(add(element, 0x20), elementLength), 0) // Allocate memory for the length and the bytes, // rounded up to a multiple of 32. mstore(0x40, add(element, and(add(elementLength, 0x3f), w))) // Store the `element` into the array. mstore(indexPtr, element) } prevIndex := add(index, mload(delimiter)) indexPtr := add(indexPtr, 0x20) if iszero(lt(indexPtr, indicesEnd)) { break } } result := indices if iszero(mload(delimiter)) { result := add(indices, 0x20) mstore(result, sub(mload(indices), 2)) } } } /// @dev Returns a concatenated string of `a` and `b`. /// Cheaper than `string.concat()` and does not de-align the free memory pointer. function concat(string memory a, string memory b) internal pure returns (string memory result) { /// @solidity memory-safe-assembly assembly { let w := not(0x1f) result := mload(0x40) let aLength := mload(a) // Copy `a` one word at a time, backwards. for { let o := and(add(aLength, 0x20), w) } 1 {} { mstore(add(result, o), mload(add(a, o))) o := add(o, w) // `sub(o, 0x20)`. if iszero(o) { break } } let bLength := mload(b) let output := add(result, aLength) // Copy `b` one word at a time, backwards. for { let o := and(add(bLength, 0x20), w) } 1 {} { mstore(add(output, o), mload(add(b, o))) o := add(o, w) // `sub(o, 0x20)`. if iszero(o) { break } } let totalLength := add(aLength, bLength) let last := add(add(result, 0x20), totalLength) // Zeroize the slot after the string. mstore(last, 0) // Stores the length. mstore(result, totalLength) // Allocate memory for the length and the bytes, // rounded up to a multiple of 32. mstore(0x40, and(add(last, 0x1f), w)) } } /// @dev Returns a copy of the string in either lowercase or UPPERCASE. /// WARNING! This function is only compatible with 7-bit ASCII strings. function toCase(string memory subject, bool toUpper) internal pure returns (string memory result) { /// @solidity memory-safe-assembly assembly { let length := mload(subject) if length { result := add(mload(0x40), 0x20) subject := add(subject, 1) let flags := shl(add(70, shl(5, toUpper)), 0x3ffffff) let w := not(0) for { let o := length } 1 {} { o := add(o, w) let b := and(0xff, mload(add(subject, o))) mstore8(add(result, o), xor(b, and(shr(b, flags), 0x20))) if iszero(o) { break } } result := mload(0x40) mstore(result, length) // Store the length. let last := add(add(result, 0x20), length) mstore(last, 0) // Zeroize the slot after the string. mstore(0x40, add(last, 0x20)) // Allocate the memory. } } } /// @dev Returns a string from a small bytes32 string. /// `s` must be null-terminated, or behavior will be undefined. function fromSmallString(bytes32 s) internal pure returns (string memory result) { /// @solidity memory-safe-assembly assembly { result := mload(0x40) let n := 0 for {} byte(n, s) { n := add(n, 1) } {} // Scan for '\0'. mstore(result, n) let o := add(result, 0x20) mstore(o, s) mstore(add(o, n), 0) mstore(0x40, add(result, 0x40)) } } /// @dev Returns the small string, with all bytes after the first null byte zeroized. function normalizeSmallString(bytes32 s) internal pure returns (bytes32 result) { /// @solidity memory-safe-assembly assembly { for {} byte(result, s) { result := add(result, 1) } {} // Scan for '\0'. mstore(0x00, s) mstore(result, 0x00) result := mload(0x00) } } /// @dev Returns the string as a normalized null-terminated small string. function toSmallString(string memory s) internal pure returns (bytes32 result) { /// @solidity memory-safe-assembly assembly { result := mload(s) if iszero(lt(result, 33)) { mstore(0x00, 0xec92f9a3) // `TooBigForSmallString()`. revert(0x1c, 0x04) } result := shl(shl(3, sub(32, result)), mload(add(s, result))) } } /// @dev Returns a lowercased copy of the string. /// WARNING! This function is only compatible with 7-bit ASCII strings. function lower(string memory subject) internal pure returns (string memory result) { result = toCase(subject, false); } /// @dev Returns an UPPERCASED copy of the string. /// WARNING! This function is only compatible with 7-bit ASCII strings. function upper(string memory subject) internal pure returns (string memory result) { result = toCase(subject, true); } /// @dev Escapes the string to be used within HTML tags. function escapeHTML(string memory s) internal pure returns (string memory result) { /// @solidity memory-safe-assembly assembly { let end := add(s, mload(s)) result := add(mload(0x40), 0x20) // Store the bytes of the packed offsets and strides into the scratch space. // `packed = (stride << 5) | offset`. Max offset is 20. Max stride is 6. mstore(0x1f, 0x900094) mstore(0x08, 0xc0000000a6ab) // Store ""&'<>" into the scratch space. mstore(0x00, shl(64, 0x2671756f743b26616d703b262333393b266c743b2667743b)) for {} iszero(eq(s, end)) {} { s := add(s, 1) let c := and(mload(s), 0xff) // Not in `["\"","'","&","<",">"]`. if iszero(and(shl(c, 1), 0x500000c400000000)) { mstore8(result, c) result := add(result, 1) continue } let t := shr(248, mload(c)) mstore(result, mload(and(t, 0x1f))) result := add(result, shr(5, t)) } let last := result mstore(last, 0) // Zeroize the slot after the string. result := mload(0x40) mstore(result, sub(last, add(result, 0x20))) // Store the length. mstore(0x40, add(last, 0x20)) // Allocate the memory. } } /// @dev Escapes the string to be used within double-quotes in a JSON. /// If `addDoubleQuotes` is true, the result will be enclosed in double-quotes. function escapeJSON(string memory s, bool addDoubleQuotes) internal pure returns (string memory result) { /// @solidity memory-safe-assembly assembly { let end := add(s, mload(s)) result := add(mload(0x40), 0x20) if addDoubleQuotes { mstore8(result, 34) result := add(1, result) } // Store "\\u0000" in scratch space. // Store "0123456789abcdef" in scratch space. // Also, store `{0x08:"b", 0x09:"t", 0x0a:"n", 0x0c:"f", 0x0d:"r"}`. // into the scratch space. mstore(0x15, 0x5c75303030303031323334353637383961626364656662746e006672) // Bitmask for detecting `["\"","\\"]`. let e := or(shl(0x22, 1), shl(0x5c, 1)) for {} iszero(eq(s, end)) {} { s := add(s, 1) let c := and(mload(s), 0xff) if iszero(lt(c, 0x20)) { if iszero(and(shl(c, 1), e)) { // Not in `["\"","\\"]`. mstore8(result, c) result := add(result, 1) continue } mstore8(result, 0x5c) // "\\". mstore8(add(result, 1), c) result := add(result, 2) continue } if iszero(and(shl(c, 1), 0x3700)) { // Not in `["\b","\t","\n","\f","\d"]`. mstore8(0x1d, mload(shr(4, c))) // Hex value. mstore8(0x1e, mload(and(c, 15))) // Hex value. mstore(result, mload(0x19)) // "\\u00XX". result := add(result, 6) continue } mstore8(result, 0x5c) // "\\". mstore8(add(result, 1), mload(add(c, 8))) result := add(result, 2) } if addDoubleQuotes { mstore8(result, 34) result := add(1, result) } let last := result mstore(last, 0) // Zeroize the slot after the string. result := mload(0x40) mstore(result, sub(last, add(result, 0x20))) // Store the length. mstore(0x40, add(last, 0x20)) // Allocate the memory. } } /// @dev Escapes the string to be used within double-quotes in a JSON. function escapeJSON(string memory s) internal pure returns (string memory result) { result = escapeJSON(s, false); } /// @dev Returns whether `a` equals `b`. function eq(string memory a, string memory b) internal pure returns (bool result) { /// @solidity memory-safe-assembly assembly { result := eq(keccak256(add(a, 0x20), mload(a)), keccak256(add(b, 0x20), mload(b))) } } /// @dev Returns whether `a` equals `b`, where `b` is a null-terminated small string. function eqs(string memory a, bytes32 b) internal pure returns (bool result) { /// @solidity memory-safe-assembly assembly { // These should be evaluated on compile time, as far as possible. let m := not(shl(7, div(not(iszero(b)), 255))) // `0x7f7f ...`. let x := not(or(m, or(b, add(m, and(b, m))))) let r := shl(7, iszero(iszero(shr(128, x)))) r := or(r, shl(6, iszero(iszero(shr(64, shr(r, x)))))) r := or(r, shl(5, lt(0xffffffff, shr(r, x)))) r := or(r, shl(4, lt(0xffff, shr(r, x)))) r := or(r, shl(3, lt(0xff, shr(r, x)))) // forgefmt: disable-next-item result := gt(eq(mload(a), add(iszero(x), xor(31, shr(3, r)))), xor(shr(add(8, r), b), shr(add(8, r), mload(add(a, 0x20))))) } } /// @dev Packs a single string with its length into a single word. /// Returns `bytes32(0)` if the length is zero or greater than 31. function packOne(string memory a) internal pure returns (bytes32 result) { /// @solidity memory-safe-assembly assembly { // We don't need to zero right pad the string, // since this is our own custom non-standard packing scheme. result := mul( // Load the length and the bytes. mload(add(a, 0x1f)), // `length != 0 && length < 32`. Abuses underflow. // Assumes that the length is valid and within the block gas limit. lt(sub(mload(a), 1), 0x1f) ) } } /// @dev Unpacks a string packed using {packOne}. /// Returns the empty string if `packed` is `bytes32(0)`. /// If `packed` is not an output of {packOne}, the output behavior is undefined. function unpackOne(bytes32 packed) internal pure returns (string memory result) { /// @solidity memory-safe-assembly assembly { // Grab the free memory pointer. result := mload(0x40) // Allocate 2 words (1 for the length, 1 for the bytes). mstore(0x40, add(result, 0x40)) // Zeroize the length slot. mstore(result, 0) // Store the length and bytes. mstore(add(result, 0x1f), packed) // Right pad with zeroes. mstore(add(add(result, 0x20), mload(result)), 0) } } /// @dev Packs two strings with their lengths into a single word. /// Returns `bytes32(0)` if combined length is zero or greater than 30. function packTwo(string memory a, string memory b) internal pure returns (bytes32 result) { /// @solidity memory-safe-assembly assembly { let aLength := mload(a) // We don't need to zero right pad the strings, // since this is our own custom non-standard packing scheme. result := mul( // Load the length and the bytes of `a` and `b`. or( shl(shl(3, sub(0x1f, aLength)), mload(add(a, aLength))), mload(sub(add(b, 0x1e), aLength)) ), // `totalLength != 0 && totalLength < 31`. Abuses underflow. // Assumes that the lengths are valid and within the block gas limit. lt(sub(add(aLength, mload(b)), 1), 0x1e) ) } } /// @dev Unpacks strings packed using {packTwo}. /// Returns the empty strings if `packed` is `bytes32(0)`. /// If `packed` is not an output of {packTwo}, the output behavior is undefined. function unpackTwo(bytes32 packed) internal pure returns (string memory resultA, string memory resultB) { /// @solidity memory-safe-assembly assembly { // Grab the free memory pointer. resultA := mload(0x40) resultB := add(resultA, 0x40) // Allocate 2 words for each string (1 for the length, 1 for the byte). Total 4 words. mstore(0x40, add(resultB, 0x40)) // Zeroize the length slots. mstore(resultA, 0) mstore(resultB, 0) // Store the lengths and bytes. mstore(add(resultA, 0x1f), packed) mstore(add(resultB, 0x1f), mload(add(add(resultA, 0x20), mload(resultA)))) // Right pad with zeroes. mstore(add(add(resultA, 0x20), mload(resultA)), 0) mstore(add(add(resultB, 0x20), mload(resultB)), 0) } } /// @dev Directly returns `a` without copying. function directReturn(string memory a) internal pure { assembly { // Assumes that the string does not start from the scratch space. let retStart := sub(a, 0x20) let retSize := add(mload(a), 0x40) // Right pad with zeroes. Just in case the string is produced // by a method that doesn't zero right pad. mstore(add(retStart, retSize), 0) // Store the return offset. mstore(retStart, 0x20) // End the transaction, returning the string. return(retStart, retSize) } } } // File: https://github.com/Vectorized/solady/blob/main/src/auth/Ownable.sol pragma solidity ^0.8.4; /// @notice Simple single owner authorization mixin. /// @author Solady (https://github.com/vectorized/solady/blob/main/src/auth/Ownable.sol) /// /// @dev Note: /// This implementation does NOT auto-initialize the owner to `msg.sender`. /// You MUST call the `_initializeOwner` in the constructor / initializer. /// /// While the ownable portion follows /// [EIP-173](https://eips.ethereum.org/EIPS/eip-173) for compatibility, /// the nomenclature for the 2-step ownership handover may be unique to this codebase. abstract contract Ownable { /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* CUSTOM ERRORS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev The caller is not authorized to call the function. error Unauthorized(); /// @dev The `newOwner` cannot be the zero address. error NewOwnerIsZeroAddress(); /// @dev The `pendingOwner` does not have a valid handover request. error NoHandoverRequest(); /// @dev Cannot double-initialize. error AlreadyInitialized(); /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* EVENTS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev The ownership is transferred from `oldOwner` to `newOwner`. /// This event is intentionally kept the same as OpenZeppelin's Ownable to be /// compatible with indexers and [EIP-173](https://eips.ethereum.org/EIPS/eip-173), /// despite it not being as lightweight as a single argument event. event OwnershipTransferred(address indexed oldOwner, address indexed newOwner); /// @dev An ownership handover to `pendingOwner` has been requested. event OwnershipHandoverRequested(address indexed pendingOwner); /// @dev The ownership handover to `pendingOwner` has been canceled. event OwnershipHandoverCanceled(address indexed pendingOwner); /// @dev `keccak256(bytes("OwnershipTransferred(address,address)"))`. uint256 private constant _OWNERSHIP_TRANSFERRED_EVENT_SIGNATURE = 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0; /// @dev `keccak256(bytes("OwnershipHandoverRequested(address)"))`. uint256 private constant _OWNERSHIP_HANDOVER_REQUESTED_EVENT_SIGNATURE = 0xdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d; /// @dev `keccak256(bytes("OwnershipHandoverCanceled(address)"))`. uint256 private constant _OWNERSHIP_HANDOVER_CANCELED_EVENT_SIGNATURE = 0xfa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92; /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* STORAGE */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev The owner slot is given by: /// `bytes32(~uint256(uint32(bytes4(keccak256("_OWNER_SLOT_NOT")))))`. /// It is intentionally chosen to be a high value /// to avoid collision with lower slots. /// The choice of manual storage layout is to enable compatibility /// with both regular and upgradeable contracts. bytes32 internal constant _OWNER_SLOT = 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927; /// The ownership handover slot of `newOwner` is given by: /// ``` /// mstore(0x00, or(shl(96, user), _HANDOVER_SLOT_SEED)) /// let handoverSlot := keccak256(0x00, 0x20) /// ``` /// It stores the expiry timestamp of the two-step ownership handover. uint256 private constant _HANDOVER_SLOT_SEED = 0x389a75e1; /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* INTERNAL FUNCTIONS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Override to return true to make `_initializeOwner` prevent double-initialization. function _guardInitializeOwner() internal pure virtual returns (bool guard) {} /// @dev Initializes the owner directly without authorization guard. /// This function must be called upon initialization, /// regardless of whether the contract is upgradeable or not. /// This is to enable generalization to both regular and upgradeable contracts, /// and to save gas in case the initial owner is not the caller. /// For performance reasons, this function will not check if there /// is an existing owner. function _initializeOwner(address newOwner) internal virtual { if (_guardInitializeOwner()) { /// @solidity memory-safe-assembly assembly { let ownerSlot := _OWNER_SLOT if sload(ownerSlot) { mstore(0x00, 0x0dc149f0) // `AlreadyInitialized()`. revert(0x1c, 0x04) } // Clean the upper 96 bits. newOwner := shr(96, shl(96, newOwner)) // Store the new value. sstore(ownerSlot, or(newOwner, shl(255, iszero(newOwner)))) // Emit the {OwnershipTransferred} event. log3(0, 0, _OWNERSHIP_TRANSFERRED_EVENT_SIGNATURE, 0, newOwner) } } else { /// @solidity memory-safe-assembly assembly { // Clean the upper 96 bits. newOwner := shr(96, shl(96, newOwner)) // Store the new value. sstore(_OWNER_SLOT, newOwner) // Emit the {OwnershipTransferred} event. log3(0, 0, _OWNERSHIP_TRANSFERRED_EVENT_SIGNATURE, 0, newOwner) } } } /// @dev Sets the owner directly without authorization guard. function _setOwner(address newOwner) internal virtual { if (_guardInitializeOwner()) { /// @solidity memory-safe-assembly assembly { let ownerSlot := _OWNER_SLOT // Clean the upper 96 bits. newOwner := shr(96, shl(96, newOwner)) // Emit the {OwnershipTransferred} event. log3(0, 0, _OWNERSHIP_TRANSFERRED_EVENT_SIGNATURE, sload(ownerSlot), newOwner) // Store the new value. sstore(ownerSlot, or(newOwner, shl(255, iszero(newOwner)))) } } else { /// @solidity memory-safe-assembly assembly { let ownerSlot := _OWNER_SLOT // Clean the upper 96 bits. newOwner := shr(96, shl(96, newOwner)) // Emit the {OwnershipTransferred} event. log3(0, 0, _OWNERSHIP_TRANSFERRED_EVENT_SIGNATURE, sload(ownerSlot), newOwner) // Store the new value. sstore(ownerSlot, newOwner) } } } /// @dev Throws if the sender is not the owner. function _checkOwner() internal view virtual { /// @solidity memory-safe-assembly assembly { // If the caller is not the stored owner, revert. if iszero(eq(caller(), sload(_OWNER_SLOT))) { mstore(0x00, 0x82b42900) // `Unauthorized()`. revert(0x1c, 0x04) } } } /// @dev Returns how long a two-step ownership handover is valid for in seconds. /// Override to return a different value if needed. /// Made internal to conserve bytecode. Wrap it in a public function if needed. function _ownershipHandoverValidFor() internal view virtual returns (uint64) { return 48 * 3600; } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* PUBLIC UPDATE FUNCTIONS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Allows the owner to transfer the ownership to `newOwner`. function transferOwnership(address newOwner) public payable virtual onlyOwner { /// @solidity memory-safe-assembly assembly { if iszero(shl(96, newOwner)) { mstore(0x00, 0x7448fbae) // `NewOwnerIsZeroAddress()`. revert(0x1c, 0x04) } } _setOwner(newOwner); } /// @dev Allows the owner to renounce their ownership. function renounceOwnership() public payable virtual onlyOwner { _setOwner(address(0)); } /// @dev Request a two-step ownership handover to the caller. /// The request will automatically expire in 48 hours (172800 seconds) by default. function requestOwnershipHandover() public payable virtual { unchecked { uint256 expires = block.timestamp + _ownershipHandoverValidFor(); /// @solidity memory-safe-assembly assembly { // Compute and set the handover slot to `expires`. mstore(0x0c, _HANDOVER_SLOT_SEED) mstore(0x00, caller()) sstore(keccak256(0x0c, 0x20), expires) // Emit the {OwnershipHandoverRequested} event. log2(0, 0, _OWNERSHIP_HANDOVER_REQUESTED_EVENT_SIGNATURE, caller()) } } } /// @dev Cancels the two-step ownership handover to the caller, if any. function cancelOwnershipHandover() public payable virtual { /// @solidity memory-safe-assembly assembly { // Compute and set the handover slot to 0. mstore(0x0c, _HANDOVER_SLOT_SEED) mstore(0x00, caller()) sstore(keccak256(0x0c, 0x20), 0) // Emit the {OwnershipHandoverCanceled} event. log2(0, 0, _OWNERSHIP_HANDOVER_CANCELED_EVENT_SIGNATURE, caller()) } } /// @dev Allows the owner to complete the two-step ownership handover to `pendingOwner`. /// Reverts if there is no existing ownership handover requested by `pendingOwner`. function completeOwnershipHandover(address pendingOwner) public payable virtual onlyOwner { /// @solidity memory-safe-assembly assembly { // Compute and set the handover slot to 0. mstore(0x0c, _HANDOVER_SLOT_SEED) mstore(0x00, pendingOwner) let handoverSlot := keccak256(0x0c, 0x20) // If the handover does not exist, or has expired. if gt(timestamp(), sload(handoverSlot)) { mstore(0x00, 0x6f5e8818) // `NoHandoverRequest()`. revert(0x1c, 0x04) } // Set the handover slot to 0. sstore(handoverSlot, 0) } _setOwner(pendingOwner); } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* PUBLIC READ FUNCTIONS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Returns the owner of the contract. function owner() public view virtual returns (address result) { /// @solidity memory-safe-assembly assembly { result := sload(_OWNER_SLOT) } } /// @dev Returns the expiry timestamp for the two-step ownership handover to `pendingOwner`. function ownershipHandoverExpiresAt(address pendingOwner) public view virtual returns (uint256 result) { /// @solidity memory-safe-assembly assembly { // Compute the handover slot. mstore(0x0c, _HANDOVER_SLOT_SEED) mstore(0x00, pendingOwner) // Load the handover slot. result := sload(keccak256(0x0c, 0x20)) } } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* MODIFIERS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Marks a function as only callable by the owner. modifier onlyOwner() virtual { _checkOwner(); _; } } // File: https://github.com/Vectorized/dn404/blob/main/src/DN404Mirror.sol 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 is Ownable { /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* 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 `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(); /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* STORAGE */ /*-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»*/ /// @dev Struct contain the NFT mirror contract storage. struct DN404NFTStorage { address baseERC20; address deployer; } /// @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; _initializeOwner(deployer); } /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* ERC721 OPERATIONS */ /*-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»*/ /// @dev Returns the token collection name from the base DN404 contract. function name() public view virtual returns (string memory result) { address base = baseERC20(); /// @solidity memory-safe-assembly assembly { result := mload(0x40) mstore(0x00, 0x06fdde03) // `name()`. if iszero(staticcall(gas(), base, 0x1c, 0x04, 0x00, 0x00)) { returndatacopy(result, 0x00, returndatasize()) revert(result, returndatasize()) } returndatacopy(0x00, 0x00, 0x20) returndatacopy(result, mload(0x00), 0x20) returndatacopy(add(result, 0x20), add(mload(0x00), 0x20), mload(result)) mstore(0x40, add(add(result, 0x20), mload(result))) } } /// @dev Returns the token collection symbol from the base DN404 contract. function symbol() public view virtual returns (string memory result) { address base = baseERC20(); /// @solidity memory-safe-assembly assembly { result := mload(0x40) mstore(0x00, 0x95d89b41) // `symbol()`. if iszero(staticcall(gas(), base, 0x1c, 0x04, 0x00, 0x00)) { returndatacopy(result, 0x00, returndatasize()) revert(result, returndatasize()) } returndatacopy(0x00, 0x00, 0x20) returndatacopy(result, mload(0x00), 0x20) returndatacopy(add(result, 0x20), add(mload(0x00), 0x20), mload(result)) mstore(0x40, add(add(result, 0x20), mload(result))) } } /// @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 result) { address base = baseERC20(); /// @solidity memory-safe-assembly assembly { result := mload(0x40) mstore(0x20, id) mstore(0x00, 0xc87b56dd) // `tokenURI()`. if iszero(staticcall(gas(), base, 0x1c, 0x24, 0x00, 0x00)) { returndatacopy(result, 0x00, returndatasize()) revert(result, returndatasize()) } returndatacopy(0x00, 0x00, 0x20) returndatacopy(result, mload(0x00), 0x20) returndatacopy(add(result, 0x20), add(mload(0x00), 0x20), mload(result)) mstore(0x40, add(add(result, 0x20), mload(result))) } } /// @dev Returns the total NFT supply from the base DN404 contract. function totalSupply() public view virtual returns (uint256 result) { address base = baseERC20(); /// @solidity memory-safe-assembly assembly { mstore(0x00, 0xe2c79281) // `totalNFTSupply()`. if iszero( and(gt(returndatasize(), 0x1f), staticcall(gas(), base, 0x1c, 0x04, 0x00, 0x20)) ) { returndatacopy(mload(0x40), 0x00, returndatasize()) revert(mload(0x40), returndatasize()) } result := mload(0x00) } } /// @dev Returns the number of NFT tokens owned by `owner` from the base DN404 contract. /// /// Requirements: /// - `owner` must not be the zero address. function balanceOf(address owner) public view virtual returns (uint256 result) { address base = baseERC20(); /// @solidity memory-safe-assembly assembly { mstore(0x20, shr(96, shl(96, owner))) mstore(0x00, 0xf5b100ea) // `balanceOfNFT(address)`. if iszero( and(gt(returndatasize(), 0x1f), staticcall(gas(), base, 0x1c, 0x24, 0x00, 0x20)) ) { returndatacopy(mload(0x40), 0x00, returndatasize()) revert(mload(0x40), returndatasize()) } result := mload(0x00) } } /// @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 result) { address base = baseERC20(); /// @solidity memory-safe-assembly assembly { mstore(0x00, 0x6352211e) // `ownerOf(uint256)`. mstore(0x20, id) if iszero( and(gt(returndatasize(), 0x1f), staticcall(gas(), base, 0x1c, 0x24, 0x00, 0x20)) ) { returndatacopy(mload(0x40), 0x00, returndatasize()) revert(mload(0x40), returndatasize()) } result := shr(96, mload(0x0c)) } } /// @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 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( gt(returndatasize(), 0x1f), 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 result) { address base = baseERC20(); /// @solidity memory-safe-assembly assembly { mstore(0x00, 0x081812fc) // `getApproved(uint256)`. mstore(0x20, id) if iszero( and(gt(returndatasize(), 0x1f), staticcall(gas(), base, 0x1c, 0x24, 0x00, 0x20)) ) { returndatacopy(mload(0x40), 0x00, returndatasize()) revert(mload(0x40), returndatasize()) } result := shr(96, mload(0x0c)) } } /// @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(eq(mload(0x00), 1), call(gas(), base, callvalue(), 0x1c, 0x64, 0x00, 0x20)) ) { returndatacopy(m, 0x00, returndatasize()) revert(m, returndatasize()) } // Emit the {ApprovalForAll} event. 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 `owner` from /// the base DN404 contract. function isApprovedForAll(address owner, address operator) public view virtual returns (bool result) { address base = baseERC20(); /// @solidity memory-safe-assembly assembly { let m := mload(0x40) mstore(0x40, operator) mstore(0x2c, shl(96, owner)) mstore(0x0c, 0xe985e9c5000000000000000000000000) // `isApprovedForAll(address,address)`. if iszero( and(gt(returndatasize(), 0x1f), staticcall(gas(), base, 0x1c, 0x44, 0x00, 0x20)) ) { returndatacopy(m, 0x00, returndatasize()) revert(m, returndatasize()) } mstore(0x40, m) // Restore the free memory pointer. result := iszero(iszero(mload(0x00))) } } /// @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 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(eq(mload(m), 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 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)) } } /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* 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 { // When returndatacopy copies 1 or more out-of-bounds bytes, it reverts. returndatacopy(0x00, returndatasize(), lt(calldatasize(), 0x20)) let o := add(0x24, calldataload(0x04)) // Packed logs offset. returndatacopy(0x00, returndatasize(), lt(calldatasize(), o)) let end := add(o, shl(5, calldataload(sub(o, 0x20)))) returndatacopy(0x00, returndatasize(), lt(calldatasize(), end)) 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), mul(a, iszero(b)), shr(168, shl(160, d)) ) } 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. fallback() external payable virtual dn404NFTFallback {} receive() external payable virtual {} /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* PRIVATE HELPERS */ /*-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»*/ /// @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) } } } } // File: https://github.com/Vectorized/dn404/blob/main/src/DN404.sol 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); /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* 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 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 an non-existent NFT. error TokenDoesNotExist(); /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* CONSTANTS */ /*-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»*/ /// @dev Amount of token balance that is equal to one NFT. uint256 internal constant _WAD = 100; /// @dev The maximum token ID allowed for an NFT. uint256 internal constant _MAX_TOKEN_ID = 0xffffffff; /// @dev The maximum possible token supply. uint256 internal constant _MAX_SUPPLY = 10 ** 18 * 0xffffffff - 1; /// @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; /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* 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 { mapping(uint256 => uint256) map; } /// @dev Struct containing the base token contract storage. struct DN404Storage { // Current number of address aliases assigned. uint32 numAliases; // Next token ID to assign for an NFT mint. uint32 nextTokenId; // Total supply of minted NFTs. 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. mapping(address => mapping(address => bool)) operatorApprovals; // Mapping of NFT token approvals to approved operators. mapping(uint256 => address) tokenApprovals; // Mapping of user allowances for token spenders. mapping(address => mapping(address => uint256)) allowance; // Mapping of NFT token IDs owned by an address. mapping(address => Uint32Map) owned; // 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 ($.nextTokenId != 0) revert DNAlreadyInitialized(); if (mirror == address(0)) revert MirrorAddressIsZero(); _linkMirrorContract(mirror); $.nextTokenId = 1; $.mirrorERC721 = mirror; if (initialTokenSupply > 0) { if (initialSupplyOwner == address(0)) revert TransferToZeroAddress(); if (initialTokenSupply > _MAX_SUPPLY) revert TotalSupplyOverflow(); $.totalSupply = uint96(initialTokenSupply); AddressData storage initialOwnerAddressData = _addressData(initialSupplyOwner); initialOwnerAddressData.balance = uint96(initialTokenSupply); emit Transfer(address(0), initialSupplyOwner, initialTokenSupply); _setSkipNFT(initialSupplyOwner, true); } } /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* 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); /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* 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) { return _getDN404Storage().allowance[owner][spender]; } /// @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) { DN404Storage storage $ = _getDN404Storage(); $.allowance[msg.sender][spender] = amount; emit Approval(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) { DN404Storage storage $ = _getDN404Storage(); uint256 allowed = $.allowance[from][msg.sender]; if (allowed != type(uint256).max) { if (amount > allowed) revert InsufficientAllowance(); unchecked { $.allowance[from][msg.sender] = allowed - amount; } } _transfer(from, to, amount); return true; } /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* 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(); DN404Storage storage $ = _getDN404Storage(); AddressData storage toAddressData = _addressData(to); unchecked { uint256 currentTokenSupply = uint256($.totalSupply) + amount; if (amount > _MAX_SUPPLY || currentTokenSupply > _MAX_SUPPLY) { revert TotalSupplyOverflow(); } $.totalSupply = uint96(currentTokenSupply); uint256 toBalance = toAddressData.balance + amount; toAddressData.balance = uint96(toBalance); if (toAddressData.flags & _ADDRESS_DATA_SKIP_NFT_FLAG == 0) { Uint32Map storage toOwned = $.owned[to]; uint256 toIndex = toAddressData.ownedLength; uint256 toEnd = toBalance * _WAD / 10**18; _PackedLogs memory packedLogs = _packedLogsMalloc(_zeroFloorSub(toEnd, toIndex)); if (packedLogs.logs.length != 0) { uint256 maxNFTId = $.totalSupply * _WAD / 10**18; uint32 toAlias = _registerAndResolveAlias(toAddressData, to); uint256 id = $.nextTokenId; $.totalNFTSupply += uint32(packedLogs.logs.length); toAddressData.ownedLength = uint32(toEnd); // Mint loop. do { while (_get($.oo, _ownershipIndex(id)) != 0) { if (++id > maxNFTId) id = 1; } _set(toOwned, toIndex, uint32(id)); _setOwnerAliasAndOwnedIndex($.oo, id, toAlias, uint32(toIndex++)); _packedLogsAppend(packedLogs, to, id, 0); if (++id > maxNFTId) id = 1; } while (toIndex != toEnd); $.nextTokenId = uint32(id); _packedLogsSend(packedLogs, $.mirrorERC721); } } } emit Transfer(address(0), to, amount); } /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* 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 { DN404Storage storage $ = _getDN404Storage(); AddressData storage fromAddressData = _addressData(from); uint256 fromBalance = fromAddressData.balance; if (amount > fromBalance) revert InsufficientBalance(); uint256 currentTokenSupply = $.totalSupply; unchecked { fromBalance -= amount; fromAddressData.balance = uint96(fromBalance); currentTokenSupply -= amount; $.totalSupply = uint96(currentTokenSupply); Uint32Map storage fromOwned = $.owned[from]; uint256 fromIndex = fromAddressData.ownedLength; uint256 nftAmountToBurn = _zeroFloorSub(fromIndex, fromBalance * _WAD / 10**18); if (nftAmountToBurn != 0) { $.totalNFTSupply -= uint32(nftAmountToBurn); _PackedLogs memory packedLogs = _packedLogsMalloc(nftAmountToBurn); uint256 fromEnd = fromIndex - nftAmountToBurn; // Burn loop. do { uint256 id = _get(fromOwned, --fromIndex); _setOwnerAliasAndOwnedIndex($.oo, id, 0, 0); delete $.tokenApprovals[id]; _packedLogsAppend(packedLogs, from, id, 1); } while (fromIndex != fromEnd); fromAddressData.ownedLength = uint32(fromIndex); _packedLogsSend(packedLogs, $.mirrorERC721); } } emit Transfer(from, address(0), amount); } /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* 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(); DN404Storage storage $ = _getDN404Storage(); AddressData storage fromAddressData = _addressData(from); AddressData storage toAddressData = _addressData(to); _TransferTemps memory t; t.fromOwnedLength = fromAddressData.ownedLength; t.toOwnedLength = toAddressData.ownedLength; t.fromBalance = fromAddressData.balance; if (amount > t.fromBalance) revert InsufficientBalance(); unchecked { t.fromBalance -= amount; fromAddressData.balance = uint96(t.fromBalance); toAddressData.balance = uint96(t.toBalance = toAddressData.balance + amount); t.nftAmountToBurn = _zeroFloorSub(t.fromOwnedLength, t.fromBalance * _WAD / 10**18); if (toAddressData.flags & _ADDRESS_DATA_SKIP_NFT_FLAG == 0) { if (from == to) t.toOwnedLength = t.fromOwnedLength - t.nftAmountToBurn; t.nftAmountToMint = _zeroFloorSub(t.toBalance * _WAD / 10**18, t.toOwnedLength); } _PackedLogs memory packedLogs = _packedLogsMalloc(t.nftAmountToBurn + t.nftAmountToMint); if (t.nftAmountToBurn != 0) { Uint32Map storage fromOwned = $.owned[from]; uint256 fromIndex = t.fromOwnedLength; uint256 fromEnd = fromIndex - t.nftAmountToBurn; $.totalNFTSupply -= uint32(t.nftAmountToBurn); fromAddressData.ownedLength = uint32(fromEnd); // Burn loop. do { uint256 id = _get(fromOwned, --fromIndex); _setOwnerAliasAndOwnedIndex($.oo, id, 0, 0); delete $.tokenApprovals[id]; _packedLogsAppend(packedLogs, from, id, 1); } while (fromIndex != fromEnd); } if (t.nftAmountToMint != 0) { Uint32Map storage toOwned = $.owned[to]; uint256 toIndex = t.toOwnedLength; uint256 toEnd = toIndex + t.nftAmountToMint; uint32 toAlias = _registerAndResolveAlias(toAddressData, to); uint256 maxNFTId = $.totalSupply * _WAD / 10**18; uint256 id = $.nextTokenId; $.totalNFTSupply += uint32(t.nftAmountToMint); toAddressData.ownedLength = uint32(toEnd); // Mint loop. do { while (_get($.oo, _ownershipIndex(id)) != 0) { if (++id > maxNFTId) id = 1; } _set(toOwned, toIndex, uint32(id)); _setOwnerAliasAndOwnedIndex($.oo, id, toAlias, uint32(toIndex++)); _packedLogsAppend(packedLogs, to, id, 0); if (++id > maxNFTId) id = 1; } while (toIndex != toEnd); $.nextTokenId = uint32(id); } if (packedLogs.logs.length != 0) { _packedLogsSend(packedLogs, $.mirrorERC721); } } emit Transfer(from, to, amount); } /// @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 { DN404Storage storage $ = _getDN404Storage(); if (to == address(0)) revert TransferToZeroAddress(); address owner = $.aliasToAddress[_get($.oo, _ownershipIndex(id))]; if (from != owner) revert TransferFromIncorrectOwner(); if (msgSender != from) { if (!$.operatorApprovals[from][msgSender]) { if (msgSender != $.tokenApprovals[id]) { revert TransferCallerNotOwnerNorApproved(); } } } AddressData storage fromAddressData = _addressData(from); AddressData storage toAddressData = _addressData(to); fromAddressData.balance -= uint96(1); unchecked { toAddressData.balance += uint96(1); _set($.oo, _ownershipIndex(id), _registerAndResolveAlias(toAddressData, to)); delete $.tokenApprovals[id]; uint256 updatedId = _get($.owned[from], --fromAddressData.ownedLength); _set($.owned[from], _get($.oo, _ownedIndex(id)), uint32(updatedId)); uint256 n = toAddressData.ownedLength++; _set($.oo, _ownedIndex(updatedId), _get($.oo, _ownedIndex(id))); _set($.owned[to], n, uint32(id)); _set($.oo, _ownedIndex(id), uint32(n)); } emit Transfer(from, to, 1); } /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* 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 account `a` will skip NFT minting on token mints and transfers. /// Returns false if account `a` will mint NFTs on token mints and transfers. function getSkipNFT(address a) public view virtual returns (bool) { AddressData storage d = _getDN404Storage().addressData[a]; if (d.flags & _ADDRESS_DATA_INITIALIZED_FLAG == 0) return _hasCode(a); return d.flags & _ADDRESS_DATA_SKIP_NFT_FLAG != 0; } /// @dev Sets the caller's skipNFT flag to `skipNFT` /// /// Emits a {SkipNFTSet} event. function setSkipNFT(bool skipNFT) public virtual { _setSkipNFT(msg.sender, skipNFT); } /// @dev Internal function to set account `a` skipNFT flag to `state` /// /// Initializes account `a` AddressData if it is not currently initialized. /// /// Emits a {SkipNFTSet} event. function _setSkipNFT(address a, bool state) internal virtual { AddressData storage d = _addressData(a); if ((d.flags & _ADDRESS_DATA_SKIP_NFT_FLAG != 0) != state) { d.flags ^= _ADDRESS_DATA_SKIP_NFT_FLAG; } emit SkipNFTSet(a, state); } /// @dev Returns a storage data pointer for account `a` AddressData /// /// Initializes account `a` AddressData if it is not currently initialized. function _addressData(address a) internal virtual returns (AddressData storage d) { DN404Storage storage $ = _getDN404Storage(); d = $.addressData[a]; if (d.flags & _ADDRESS_DATA_INITIALIZED_FLAG == 0) { uint8 flags = _ADDRESS_DATA_INITIALIZED_FLAG; if (_hasCode(a)) flags |= _ADDRESS_DATA_SKIP_NFT_FLAG; d.flags = flags; } } /// @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) { addressAlias = ++$.numAliases; toAddressData.addressAlias = addressAlias; $.aliasToAddress[addressAlias] = to; } } /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* 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(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().tokenApprovals[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) { DN404Storage storage $ = _getDN404Storage(); address owner = $.aliasToAddress[_get($.oo, _ownershipIndex(id))]; if (msgSender != owner) { if (!$.operatorApprovals[owner][msgSender]) { revert ApprovalCallerNotOwnerNorApproved(); } } $.tokenApprovals[id] = spender; return owner; } /// @dev Approve or remove the `operator` as an operator for `msgSender`, /// without authorization checks. function _setApprovalForAll(address operator, bool approved, address msgSender) internal virtual { _getDN404Storage().operatorApprovals[msgSender][operator] = approved; } /// @dev Calls the mirror contract to link it to this contract. /// /// Reverts if the call to the mirror contract reverts. function _linkMirrorContract(address mirror) internal virtual { /// @solidity memory-safe-assembly assembly { 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) } } } /// @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; // `isApprovedForAll(address,address)`. if (fnSelector == 0xe985e9c5) { if (msg.sender != $.mirrorERC721) revert SenderNotMirror(); if (msg.data.length < 0x44) revert(); address owner = address(uint160(_calldataload(0x04))); address operator = address(uint160(_calldataload(0x24))); _return($.operatorApprovals[owner][operator] ? 1 : 0); } // `ownerOf(uint256)`. if (fnSelector == 0x6352211e) { if (msg.sender != $.mirrorERC721) revert SenderNotMirror(); if (msg.data.length < 0x24) revert(); uint256 id = _calldataload(0x04); _return(uint160(_ownerOf(id))); } // `transferFromNFT(address,address,uint256,address)`. if (fnSelector == 0xe5eb36c8) { if (msg.sender != $.mirrorERC721) revert SenderNotMirror(); if (msg.data.length < 0x84) revert(); address from = address(uint160(_calldataload(0x04))); address to = address(uint160(_calldataload(0x24))); uint256 id = _calldataload(0x44); address msgSender = address(uint160(_calldataload(0x64))); _transferFromNFT(from, to, id, msgSender); _return(1); } // `setApprovalForAll(address,bool,address)`. if (fnSelector == 0x813500fc) { if (msg.sender != $.mirrorERC721) revert SenderNotMirror(); if (msg.data.length < 0x64) revert(); address spender = address(uint160(_calldataload(0x04))); bool status = _calldataload(0x24) != 0; address msgSender = address(uint160(_calldataload(0x44))); _setApprovalForAll(spender, status, msgSender); _return(1); } // `approveNFT(address,uint256,address)`. if (fnSelector == 0xd10b6e0c) { if (msg.sender != $.mirrorERC721) revert SenderNotMirror(); if (msg.data.length < 0x64) revert(); address spender = address(uint160(_calldataload(0x04))); uint256 id = _calldataload(0x24); address msgSender = address(uint160(_calldataload(0x44))); _return(uint160(_approveNFT(spender, id, msgSender))); } // `getApproved(uint256)`. if (fnSelector == 0x081812fc) { if (msg.sender != $.mirrorERC721) revert SenderNotMirror(); if (msg.data.length < 0x24) revert(); uint256 id = _calldataload(0x04); _return(uint160(_getApproved(id))); } // `balanceOfNFT(address)`. if (fnSelector == 0xf5b100ea) { if (msg.sender != $.mirrorERC721) revert SenderNotMirror(); if (msg.data.length < 0x24) revert(); address owner = address(uint160(_calldataload(0x04))); _return(_balanceOfNFT(owner)); } // `totalNFTSupply()`. if (fnSelector == 0xe2c79281) { if (msg.sender != $.mirrorERC721) revert SenderNotMirror(); if (msg.data.length < 0x04) revert(); _return(_totalNFTSupply()); } // `implementsDN404()`. if (fnSelector == 0xb7a94eb8) { _return(1); } _; } /// @dev Fallback function for calls from mirror NFT contract. fallback() external payable virtual dn404Fallback {} receive() external payable virtual {} /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* PRIVATE HELPERS */ /*-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»*/ /// @dev Struct containing packed log data for `Transfer` events to be /// emitted by the mirror NFT contract. struct _PackedLogs { uint256[] logs; uint256 offset; } /// @dev Initiates memory allocation for packed logs with `n` log items. function _packedLogsMalloc(uint256 n) private pure returns (_PackedLogs memory p) { /// @solidity memory-safe-assembly assembly { let logs := add(mload(0x40), 0x40) // Offset by 2 words for `_packedLogsSend`. mstore(logs, n) let offset := add(0x20, logs) mstore(0x40, add(offset, shl(5, n))) mstore(p, logs) mstore(add(0x20, p), offset) } } /// @dev Adds a packed log item to `p` with address `a`, token `id` and burn flag `burnBit`. function _packedLogsAppend(_PackedLogs memory p, address a, uint256 id, uint256 burnBit) private pure { /// @solidity memory-safe-assembly assembly { let offset := mload(add(0x20, p)) mstore(offset, or(or(shl(96, a), shl(8, id)), burnBit)) mstore(add(0x20, p), add(offset, 0x20)) } } /// @dev Calls the `mirror` NFT contract to emit Transfer events for packed logs `p`. function _packedLogsSend(_PackedLogs memory p, address mirror) private { /// @solidity memory-safe-assembly assembly { let logs := mload(p) 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 _TransferTemps { uint256 nftAmountToBurn; uint256 nftAmountToMint; uint256 fromBalance; uint256 toBalance; uint256 fromOwnedLength; uint256 toOwnedLength; } /// @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) } } /// @dev Returns `max(0, x - y)`. function _zeroFloorSub(uint256 x, uint256 y) private pure returns (uint256 z) { /// @solidity memory-safe-assembly assembly { z := mul(gt(x, y), sub(x, y)) } } /// @dev Returns `i << 1`. function _ownershipIndex(uint256 i) private pure returns (uint256) { return i << 1; } /// @dev Returns `(i << 1) + 1`. function _ownedIndex(uint256 i) private pure returns (uint256) { unchecked { return (i << 1) + 1; } } /// @dev Returns the uint32 value at `index` in `map`. function _get(Uint32Map storage map, uint256 index) private view returns (uint32 result) { result = uint32(map.map[index >> 3] >> ((index & 7) << 5)); } /// @dev Updates the uint32 value at `index` in `map`. function _set(Uint32Map storage map, uint256 index, uint32 value) private { /// @solidity memory-safe-assembly assembly { mstore(0x20, map.slot) mstore(0x00, shr(3, index)) let s := keccak256(0x00, 0x40) // Storage slot. let o := shl(5, and(index, 7)) // Storage slot offset (bits). let v := sload(s) // Storage slot value. let m := 0xffffffff // Value mask. sstore(s, xor(v, shl(o, and(m, xor(shr(o, v), value))))) } } /// @dev Sets the owner alias and the owned index together. function _setOwnerAliasAndOwnedIndex( Uint32Map storage map, uint256 id, uint32 ownership, uint32 ownedIndex ) private { /// @solidity memory-safe-assembly assembly { let value := or(shl(32, ownedIndex), and(0xffffffff, ownership)) mstore(0x20, map.slot) mstore(0x00, shr(2, id)) let s := keccak256(0x00, 0x40) // Storage slot. let o := shl(6, and(id, 3)) // Storage slot offset (bits). let v := sload(s) // Storage slot value. let m := 0xffffffffffffffff // Value mask. sstore(s, xor(v, shl(o, and(m, xor(shr(o, v), value))))) } } } pragma solidity ^0.8.4; contract HiddenOne404 is DN404, Ownable { string private _name; string private _symbol; string private _baseURI; uint256 public maxWallet; constructor() { _initializeOwner(msg.sender); _name = "Hidden One 404"; _symbol = "HIDDEN"; _baseURI = "ipfs://QmbMSdYdZoK31NgLKyvxHA2MQC8qb81ioDRAd99oGGWVWT/"; maxWallet = 200000000000000000; // 0.2 per wallet address mirror = address(new DN404Mirror(msg.sender)); _initializeDN404(1000000000000000000, msg.sender, mirror); // 1 token max supply } function name() public view override returns (string memory) { return _name; } function symbol() public view override returns (string memory) { return _symbol; } function transfer(address to, uint256 amount) public override returns (bool) { if (!getSkipNFT(to)){ require(balanceOf(to) + amount <= maxWallet, "This transfer will exceed receiver max holding amount of tokens"); } return super.transfer(to, amount); } function setMaxWallet(uint256 _maxWallet) public onlyOwner { maxWallet = _maxWallet; } function tokenURI(uint256 tokenId) public view override returns (string memory result) { result = string(abi.encodePacked(_baseURI, LibString.toString(tokenId),".json")); } function sendMultiple(address[] memory to, uint256[] memory amount) public onlyOwner{ require(to.length == amount.length, "Lists lengths mismatch"); for (uint256 i = 0; i < to.length; i++){ _transfer(owner(), to[i], amount[i]); } } function withdrawETH() public onlyOwner { SafeTransferLib.safeTransferAllETH(msg.sender); } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AlreadyInitialized","type":"error"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"DNAlreadyInitialized","type":"error"},{"inputs":[],"name":"InsufficientAllowance","type":"error"},{"inputs":[],"name":"InsufficientBalance","type":"error"},{"inputs":[],"name":"LinkMirrorContractFailed","type":"error"},{"inputs":[],"name":"MirrorAddressIsZero","type":"error"},{"inputs":[],"name":"NewOwnerIsZeroAddress","type":"error"},{"inputs":[],"name":"NoHandoverRequest","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":"Unauthorized","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":"pendingOwner","type":"address"}],"name":"OwnershipHandoverCanceled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"pendingOwner","type":"address"}],"name":"OwnershipHandoverRequested","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","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":[{"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":"cancelOwnershipHandover","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"pendingOwner","type":"address"}],"name":"completeOwnershipHandover","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"a","type":"address"}],"name":"getSkipNFT","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxWallet","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"owner","outputs":[{"internalType":"address","name":"result","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"pendingOwner","type":"address"}],"name":"ownershipHandoverExpiresAt","outputs":[{"internalType":"uint256","name":"result","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"requestOwnershipHandover","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address[]","name":"to","type":"address[]"},{"internalType":"uint256[]","name":"amount","type":"uint256[]"}],"name":"sendMultiple","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxWallet","type":"uint256"}],"name":"setMaxWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"skipNFT","type":"bool"}],"name":"setSkipNFT","outputs":[],"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":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"withdrawETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
608060405234801562000010575f80fd5b5062000022336200014460201b60201c565b6040518060400160405280600e81526020017f48696464656e204f6e65203430340000000000000000000000000000000000008152505f908162000067919062000950565b506040518060400160405280600681526020017f48494444454e000000000000000000000000000000000000000000000000000081525060019081620000ae919062000950565b50604051806060016040528060368152602001620058196036913960029081620000d9919062000950565b506702c68af0bb1400006003819055505f33604051620000f990620006de565b62000105919062000a77565b604051809103905ff0801580156200011f573d5f803e3d5ffd5b5090506200013d670de0b6b3a764000033836200022560201b60201c565b5062000af5565b620001546200051760201b60201c565b15620001cf577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278054156200019057630dc149f05f526004601cfd5b8160601b60601c9150811560ff1b82178155815f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a35062000222565b8060601b60601c9050807fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392755805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a35b50565b5f620002366200051b60201b60201c565b90505f815f0160049054906101000a900463ffffffff1663ffffffff16146200028b576040517fead4d2e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603620002f1576040517f39a84a7b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b62000302826200052b60201b60201c565b6001815f0160046101000a81548163ffffffff021916908363ffffffff16021790555081816001015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505f84111562000511575f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603620003d6576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6b0de0b6b39983494c589bffff8411156200041d576040517fe5cfe95700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83815f01600c6101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055505f62000461846200055c60201b60201c565b905084815f0160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508373ffffffffffffffffffffffffffffffffffffffff165f73ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef87604051620004f4919062000aa3565b60405180910390a36200050f8460016200061660201b60201c565b505b50505050565b5f90565b5f68a20d6e21d0e5255308905090565b630f4599e55f523360205260205f6024601c5f855af160015f511416620005595763d125259c5f526004601cfd5b50565b5f806200056e6200051b60201b60201c565b9050806008015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2091505f6001835f01600b9054906101000a900460ff161660ff160362000610575f60019050620005e584620006d460201b60201c565b15620005f2576002811790505b80835f01600b6101000a81548160ff021916908360ff160217905550505b50919050565b5f62000628836200055c60201b60201c565b90508115155f6002835f01600b9054906101000a900460ff161660ff1614151515146200067f576002815f01600b8282829054906101000a900460ff161892506101000a81548160ff021916908360ff1602179055505b8273ffffffffffffffffffffffffffffffffffffffff167fb5a1de456fff688115a4f75380060c23c8532d14ff85f687cc871456d642039383604051620006c7919062000ada565b60405180910390a2505050565b5f813b9050919050565b61172380620040f683390190565b5f81519050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f60028204905060018216806200076857607f821691505b6020821081036200077e576200077d62000723565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f60088302620007e27fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82620007a5565b620007ee8683620007a5565b95508019841693508086168417925050509392505050565b5f819050919050565b5f819050919050565b5f62000838620008326200082c8462000806565b6200080f565b62000806565b9050919050565b5f819050919050565b620008538362000818565b6200086b62000862826200083f565b848454620007b1565b825550505050565b5f90565b6200088162000873565b6200088e81848462000848565b505050565b5b81811015620008b557620008a95f8262000877565b60018101905062000894565b5050565b601f8211156200090457620008ce8162000784565b620008d98462000796565b81016020851015620008e9578190505b62000901620008f88562000796565b83018262000893565b50505b505050565b5f82821c905092915050565b5f620009265f198460080262000909565b1980831691505092915050565b5f62000940838362000915565b9150826002028217905092915050565b6200095b82620006ec565b67ffffffffffffffff811115620009775762000976620006f6565b5b62000983825462000750565b62000990828285620008b9565b5f60209050601f831160018114620009c6575f8415620009b1578287015190505b620009bd858262000933565b86555062000a2c565b601f198416620009d68662000784565b5f5b82811015620009ff57848901518255600182019150602085019450602081019050620009d8565b8683101562000a1f578489015162000a1b601f89168262000915565b8355505b6001600288020188555050505b505050505050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f62000a5f8262000a34565b9050919050565b62000a718162000a53565b82525050565b5f60208201905062000a8c5f83018462000a66565b92915050565b62000a9d8162000806565b82525050565b5f60208201905062000ab85f83018462000a92565b92915050565b5f8115159050919050565b62000ad48162000abe565b82525050565b5f60208201905062000aef5f83018462000ac9565b92915050565b6135f38062000b035f395ff3fe60806040526004361061014e575f3560e01c8063715018a6116100b5578063e086e5ec1161006e578063e086e5ec14610bed578063e8d6c36d14610c03578063f04e283e14610c2b578063f2fde38b14610c47578063f8b45b0514610c63578063fee81cf414610c8d57610155565b8063715018a614610adb5780638da5cb5b14610ae557806395d89b4114610b0f578063a9059cbb14610b39578063c87b56dd14610b75578063dd62ed3e14610bb157610155565b80632a6a935d116101075780632a6a935d146109f1578063313ce56714610a195780634ef41efc14610a4357806354d1f13d14610a6d5780635d0044ca14610a7757806370a0823114610a9f57610155565b806306fdde03146108df578063095ea7b31461090957806318160ddd1461094557806323b872dd1461096f57806325692962146109ab578063274e430b146109b557610155565b3661015557005b5f61015e610cc9565b90505f60e061016c5f610cd9565b901c905063e985e9c581036102cf57816001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610203576040517fce5a776b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60445f3690501015610213575f80fd5b5f61021e6004610cd9565b90505f61022b6024610cd9565b90506102cc846003015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff166102c1575f6102c4565b60015b60ff16610ce3565b50505b636352211e81036103a857816001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610362576040517fce5a776b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60245f3690501015610372575f80fd5b5f61037d6004610cd9565b90506103a661038b82610ceb565b73ffffffffffffffffffffffffffffffffffffffff16610ce3565b505b63e5eb36c8810361049a57816001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461043b576040517fce5a776b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60845f369050101561044b575f80fd5b5f6104566004610cd9565b90505f6104636024610cd9565b90505f6104706044610cd9565b90505f61047d6064610cd9565b905061048b84848484610d3b565b6104956001610ce3565b505050505b63813500fc810361058057816001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461052d576040517fce5a776b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60645f369050101561053d575f80fd5b5f6105486004610cd9565b90505f806105566024610cd9565b141590505f6105656044610cd9565b9050610572838383611301565b61057c6001610ce3565b5050505b63d10b6e0c810361067757816001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610613576040517fce5a776b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60645f3690501015610623575f80fd5b5f61062e6004610cd9565b90505f61063b6024610cd9565b90505f6106486044610cd9565b905061067361065884848461139e565b73ffffffffffffffffffffffffffffffffffffffff16610ce3565b5050505b63081812fc810361075057816001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461070a576040517fce5a776b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60245f369050101561071a575f80fd5b5f6107256004610cd9565b905061074e6107338261154e565b73ffffffffffffffffffffffffffffffffffffffff16610ce3565b505b63f5b100ea810361081357816001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146107e3576040517fce5a776b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60245f36905010156107f3575f80fd5b5f6107fe6004610cd9565b905061081161080c826115cf565b610ce3565b505b63e2c7928181036108c757816001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146108a6576040517fce5a776b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60045f36905010156108b6575f80fd5b6108c66108c1611636565b610ce3565b5b63b7a94eb881036108dd576108dc6001610ce3565b5b005b3480156108ea575f80fd5b506108f361165d565b6040516109009190612c1f565b60405180910390f35b348015610914575f80fd5b5061092f600480360381019061092a9190612cdd565b6116ec565b60405161093c9190612d35565b60405180910390f35b348015610950575f80fd5b506109596117e7565b6040516109669190612d5d565b60405180910390f35b34801561097a575f80fd5b5061099560048036038101906109909190612d76565b61181e565b6040516109a29190612d35565b60405180910390f35b6109b36119a3565b005b3480156109c0575f80fd5b506109db60048036038101906109d69190612dc6565b6119f4565b6040516109e89190612d35565b60405180910390f35b3480156109fc575f80fd5b50610a176004803603810190610a129190612e1b565b611a8f565b005b348015610a24575f80fd5b50610a2d611a9c565b604051610a3a9190612e61565b60405180910390f35b348015610a4e575f80fd5b50610a57611aa4565b604051610a649190612e89565b60405180910390f35b610a75611ad5565b005b348015610a82575f80fd5b50610a9d6004803603810190610a989190612ea2565b611b0e565b005b348015610aaa575f80fd5b50610ac56004803603810190610ac09190612dc6565b611b20565b604051610ad29190612d5d565b60405180910390f35b610ae3611b97565b005b348015610af0575f80fd5b50610af9611baa565b604051610b069190612e89565b60405180910390f35b348015610b1a575f80fd5b50610b23611bd2565b604051610b309190612c1f565b60405180910390f35b348015610b44575f80fd5b50610b5f6004803603810190610b5a9190612cdd565b611c62565b604051610b6c9190612d35565b60405180910390f35b348015610b80575f80fd5b50610b9b6004803603810190610b969190612ea2565b611cdb565b604051610ba89190612c1f565b60405180910390f35b348015610bbc575f80fd5b50610bd76004803603810190610bd29190612ecd565b611d0f565b604051610be49190612d5d565b60405180910390f35b348015610bf8575f80fd5b50610c01611d9a565b005b348015610c0e575f80fd5b50610c296004803603810190610c24919061310b565b611dad565b005b610c456004803603810190610c409190612dc6565b611e5c565b005b610c616004803603810190610c5c9190612dc6565b611e9a565b005b348015610c6e575f80fd5b50610c77611ec3565b604051610c849190612d5d565b60405180910390f35b348015610c98575f80fd5b50610cb36004803603810190610cae9190612dc6565b611ec9565b604051610cc09190612d5d565b60405180910390f35b5f68a20d6e21d0e5255308905090565b5f81359050919050565b805f5260205ff35b5f610cf582611ee2565b610d2b576040517fceea21b600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610d3482611f22565b9050919050565b5f610d44610cc9565b90505f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603610dab576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f816002015f610dc684600701610dc188611f89565b611f96565b63ffffffff1663ffffffff1681526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff1614610e66576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8573ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610fbd57816003015f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16610fbc57816004015f8581526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610fbb576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b5b5f610fc787611fc0565b90505f610fd387611fc0565b90506001825f0160148282829054906101000a90046bffffffffffffffffffffffff1661100091906131c5565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055506001815f0160148282829054906101000a90046bffffffffffffffffffffffff160192506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555061109d8460070161108e88611f89565b611098848b612068565b61215b565b836004015f8781526020019081526020015f205f6101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690555f611157856006015f8b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20845f01601081819054906101000a900463ffffffff166001900391906101000a81548163ffffffff021916908363ffffffff160217905563ffffffff16611f96565b63ffffffff1690506111c2856006015f8b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f206111b6876007016111b18b61218d565b611f96565b63ffffffff168361215b565b5f825f01601081819054906101000a900463ffffffff168092919060010191906101000a81548163ffffffff021916908363ffffffff16021790555063ffffffff169050611230866007016112168461218d565b61122b896007016112268d61218d565b611f96565b61215b565b611279866006015f8b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20828a61215b565b61128f866007016112898a61218d565b8361215b565b50508673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60016040516112ef9190613246565b60405180910390a35050505050505050565b8161130a610cc9565b6003015f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff021916908315150217905550505050565b5f806113a8610cc9565b90505f816002015f6113c5846007016113c089611f89565b611f96565b63ffffffff1663ffffffff1681526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16146114f157816003015f8273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff166114f0576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b85826004015f8781526020019081526020015f205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080925050509392505050565b5f61155882611ee2565b61158e576040517fceea21b600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611596610cc9565b6004015f8381526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b5f6115d8610cc9565b6008015f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f0160109054906101000a900463ffffffff1663ffffffff169050919050565b5f61163f610cc9565b5f0160089054906101000a900463ffffffff1663ffffffff16905090565b60605f805461166b9061328c565b80601f01602080910402602001604051908101604052809291908181526020018280546116979061328c565b80156116e25780601f106116b9576101008083540402835291602001916116e2565b820191905f5260205f20905b8154815290600101906020018083116116c557829003601f168201915b5050505050905090565b5f806116f6610cc9565b905082816005015f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925856040516117d49190612d5d565b60405180910390a3600191505092915050565b5f6117f0610cc9565b5f01600c9054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff16905090565b5f80611828610cc9565b90505f816005015f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205490507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811461198b5780841115611909576040517f13be252b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b838103826005015f8873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055505b61199686868661219c565b6001925050509392505050565b5f6119ac612824565b67ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b5f806119fe610cc9565b6008015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2090505f6001825f01600b9054906101000a900460ff161660ff1603611a6c57611a648361282e565b915050611a8a565b5f6002825f01600b9054906101000a900460ff161660ff1614159150505b919050565b611a993382612838565b50565b5f6012905090565b5f611aad610cc9565b6001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b611b166128eb565b8060038190555050565b5f611b29610cc9565b6008015f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f0160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff169050919050565b611b9f6128eb565b611ba85f612922565b565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392754905090565b606060018054611be19061328c565b80601f0160208091040260200160405190810160405280929190818152602001828054611c0d9061328c565b8015611c585780601f10611c2f57610100808354040283529160200191611c58565b820191905f5260205f20905b815481529060010190602001808311611c3b57829003601f168201915b5050505050905090565b5f611c6c836119f4565b611cc95760035482611c7d85611b20565b611c8791906132bc565b1115611cc8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cbf9061335f565b60405180910390fd5b5b611cd383836129e8565b905092915050565b60606002611ce8836129fe565b604051602001611cf9929190613493565b6040516020818303038152906040529050919050565b5f611d18610cc9565b6005015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905092915050565b611da26128eb565b611dab33612a4d565b565b611db56128eb565b8051825114611df9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611df09061350b565b60405180910390fd5b5f5b8251811015611e5757611e4a611e0f611baa565b848381518110611e2257611e21613529565b5b6020026020010151848481518110611e3d57611e3c613529565b5b602002602001015161219c565b8080600101915050611dfb565b505050565b611e646128eb565b63389a75e1600c52805f526020600c208054421115611e8a57636f5e88185f526004601cfd5b5f815550611e9781612922565b50565b611ea26128eb565b8060601b611eb757637448fbae5f526004601cfd5b611ec081612922565b50565b60035481565b5f63389a75e1600c52815f526020600c20549050919050565b5f8073ffffffffffffffffffffffffffffffffffffffff16611f0383611f22565b73ffffffffffffffffffffffffffffffffffffffff1614159050919050565b5f80611f2c610cc9565b9050806002015f611f4883600701611f4387611f89565b611f96565b63ffffffff1663ffffffff1681526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16915050919050565b5f600182901b9050919050565b5f600560078316901b835f015f600385901c81526020019081526020015f2054901c905092915050565b5f80611fca610cc9565b9050806008015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2091505f6001835f01600b9054906101000a900460ff161660ff1603612062575f600190506120388461282e565b15612044576002811790505b80835f01600b6101000a81548160ff021916908360ff160217905550505b50919050565b5f80612072610cc9565b9050835f01600c9054906101000a900463ffffffff1691505f8263ffffffff160361215457805f015f81819054906101000a900463ffffffff166120b590613565565b91906101000a81548163ffffffff021916908363ffffffff1602179055915081845f01600c6101000a81548163ffffffff021916908363ffffffff16021790555082816002015f8463ffffffff1663ffffffff1681526020019081526020015f205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b5092915050565b826020528160031c5f5260405f206007831660051b815463ffffffff8482841c188116831b8218845550505050505050565b5f60018083901b019050919050565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603612201576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61220a610cc9565b90505f61221685611fc0565b90505f61222285611fc0565b905061222c612b4c565b825f0160109054906101000a900463ffffffff1663ffffffff16816080018181525050815f0160109054906101000a900463ffffffff1663ffffffff168160a0018181525050825f0160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff1681604001818152505080604001518511156122e3576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b848160400181815103915081815250508060400151835f0160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555084825f0160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff16018160600181815250825f0160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055506123bb8160800151670de0b6b3a76400006064846040015102816123b5576123b4613590565b5b04612a69565b815f0181815250505f6002835f01600b9054906101000a900460ff161660ff160361245e578573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff160361242757805f01518160800151038160a00181815250505b612454670de0b6b3a764000060648360600151028161244957612448613590565b5b048260a00151612a69565b8160200181815250505b5f6124718260200151835f015101612a79565b90505f825f0151146125a4575f856006015f8a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2090505f836080015190505f845f015182039050845f0151885f0160088282829054906101000a900463ffffffff160392506101000a81548163ffffffff021916908363ffffffff16021790555080875f0160106101000a81548163ffffffff021916908363ffffffff1602179055505b5f61253f848460019003945084611f96565b63ffffffff16905061255689600701825f80612aa6565b886004015f8281526020019081526020015f205f6101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055612598858d836001612aea565b5080820361252d575050505b5f82602001511461277c575f856006015f8973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2090505f8360a0015190505f8460200151820190505f61260e878c612068565b90505f670de0b6b3a764000060648b5f01600c9054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff16028161265557612654613590565b5b0490505f8a5f0160049054906101000a900463ffffffff1663ffffffff16905087602001518b5f0160088282829054906101000a900463ffffffff160192506101000a81548163ffffffff021916908363ffffffff16021790555083895f0160106101000a81548163ffffffff021916908363ffffffff1602179055505b5b5f6126ea8c6007016126e584611f89565b611f96565b63ffffffff161461270d578181600101915081111561270857600190505b6126d4565b61271886868361215b565b61272d8b600701828588806001019950612aa6565b612739878e835f612aea565b8181600101915081111561274c57600190505b8385036126d357808b5f0160046101000a81548163ffffffff021916908363ffffffff1602179055505050505050505b5f815f015151146127b5576127b481866001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16612b0c565b5b508573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef876040516128139190612d5d565b60405180910390a350505050505050565b5f6202a300905090565b5f813b9050919050565b5f61284283611fc0565b90508115155f6002835f01600b9054906101000a900460ff161660ff161415151514612898576002815f01600b8282829054906101000a900460ff161892506101000a81548160ff021916908360ff1602179055505b8273ffffffffffffffffffffffffffffffffffffffff167fb5a1de456fff688115a4f75380060c23c8532d14ff85f687cc871456d6420393836040516128de9190612d35565b60405180910390a2505050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543314612920576382b429005f526004601cfd5b565b61292a612b48565b1561298f577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3811560ff1b82178155506129e5565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3818155505b50565b5f6129f433848461219c565b6001905092915050565b60606080604051019050602081016040525f8152805f19835b600115612a38578184019350600a81066030018453600a8104905080612a17575b50828203602084039350808452505050919050565b5f385f3847855af1612a665763b12d13eb5f526004601cfd5b50565b5f81830382841102905092915050565b612a81612b7c565b6040805101828152806020018360051b81016040528183528083602001525050919050565b8163ffffffff168160201b17846020528360021c5f5260405f206003851660061b815467ffffffffffffffff8482841c188116831b82188455505050505050505050565b8360200151818360081b8560601b171781526020810185602001525050505050565b81516040810363263c69d68152602080820152815160051b60440160208282601c85015f885af1600183511416612b41575f82fd5b5050505050565b5f90565b6040518060c001604052805f81526020015f81526020015f81526020015f81526020015f81526020015f81525090565b6040518060400160405280606081526020015f81525090565b5f81519050919050565b5f82825260208201905092915050565b5f5b83811015612bcc578082015181840152602081019050612bb1565b5f8484015250505050565b5f601f19601f8301169050919050565b5f612bf182612b95565b612bfb8185612b9f565b9350612c0b818560208601612baf565b612c1481612bd7565b840191505092915050565b5f6020820190508181035f830152612c378184612be7565b905092915050565b5f604051905090565b5f80fd5b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f612c7982612c50565b9050919050565b612c8981612c6f565b8114612c93575f80fd5b50565b5f81359050612ca481612c80565b92915050565b5f819050919050565b612cbc81612caa565b8114612cc6575f80fd5b50565b5f81359050612cd781612cb3565b92915050565b5f8060408385031215612cf357612cf2612c48565b5b5f612d0085828601612c96565b9250506020612d1185828601612cc9565b9150509250929050565b5f8115159050919050565b612d2f81612d1b565b82525050565b5f602082019050612d485f830184612d26565b92915050565b612d5781612caa565b82525050565b5f602082019050612d705f830184612d4e565b92915050565b5f805f60608486031215612d8d57612d8c612c48565b5b5f612d9a86828701612c96565b9350506020612dab86828701612c96565b9250506040612dbc86828701612cc9565b9150509250925092565b5f60208284031215612ddb57612dda612c48565b5b5f612de884828501612c96565b91505092915050565b612dfa81612d1b565b8114612e04575f80fd5b50565b5f81359050612e1581612df1565b92915050565b5f60208284031215612e3057612e2f612c48565b5b5f612e3d84828501612e07565b91505092915050565b5f60ff82169050919050565b612e5b81612e46565b82525050565b5f602082019050612e745f830184612e52565b92915050565b612e8381612c6f565b82525050565b5f602082019050612e9c5f830184612e7a565b92915050565b5f60208284031215612eb757612eb6612c48565b5b5f612ec484828501612cc9565b91505092915050565b5f8060408385031215612ee357612ee2612c48565b5b5f612ef085828601612c96565b9250506020612f0185828601612c96565b9150509250929050565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b612f4582612bd7565b810181811067ffffffffffffffff82111715612f6457612f63612f0f565b5b80604052505050565b5f612f76612c3f565b9050612f828282612f3c565b919050565b5f67ffffffffffffffff821115612fa157612fa0612f0f565b5b602082029050602081019050919050565b5f80fd5b5f612fc8612fc384612f87565b612f6d565b90508083825260208201905060208402830185811115612feb57612fea612fb2565b5b835b8181101561301457806130008882612c96565b845260208401935050602081019050612fed565b5050509392505050565b5f82601f83011261303257613031612f0b565b5b8135613042848260208601612fb6565b91505092915050565b5f67ffffffffffffffff82111561306557613064612f0f565b5b602082029050602081019050919050565b5f6130886130838461304b565b612f6d565b905080838252602082019050602084028301858111156130ab576130aa612fb2565b5b835b818110156130d457806130c08882612cc9565b8452602084019350506020810190506130ad565b5050509392505050565b5f82601f8301126130f2576130f1612f0b565b5b8135613102848260208601613076565b91505092915050565b5f806040838503121561312157613120612c48565b5b5f83013567ffffffffffffffff81111561313e5761313d612c4c565b5b61314a8582860161301e565b925050602083013567ffffffffffffffff81111561316b5761316a612c4c565b5b613177858286016130de565b9150509250929050565b5f6bffffffffffffffffffffffff82169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6131cf82613181565b91506131da83613181565b925082820390506bffffffffffffffffffffffff8111156131fe576131fd613198565b5b92915050565b5f819050919050565b5f819050919050565b5f61323061322b61322684613204565b61320d565b612caa565b9050919050565b61324081613216565b82525050565b5f6020820190506132595f830184613237565b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f60028204905060018216806132a357607f821691505b6020821081036132b6576132b561325f565b5b50919050565b5f6132c682612caa565b91506132d183612caa565b92508282019050808211156132e9576132e8613198565b5b92915050565b7f54686973207472616e736665722077696c6c20657863656564207265636569765f8201527f6572206d617820686f6c64696e6720616d6f756e74206f6620746f6b656e7300602082015250565b5f613349603f83612b9f565b9150613354826132ef565b604082019050919050565b5f6020820190508181035f8301526133768161333d565b9050919050565b5f81905092915050565b5f819050815f5260205f209050919050565b5f81546133a58161328c565b6133af818661337d565b9450600182165f81146133c957600181146133de57613410565b60ff1983168652811515820286019350613410565b6133e785613387565b5f5b83811015613408578154818901526001820191506020810190506133e9565b838801955050505b50505092915050565b5f61342382612b95565b61342d818561337d565b935061343d818560208601612baf565b80840191505092915050565b7f2e6a736f6e0000000000000000000000000000000000000000000000000000005f82015250565b5f61347d60058361337d565b915061348882613449565b600582019050919050565b5f61349e8285613399565b91506134aa8284613419565b91506134b582613471565b91508190509392505050565b7f4c69737473206c656e67746873206d69736d61746368000000000000000000005f82015250565b5f6134f5601683612b9f565b9150613500826134c1565b602082019050919050565b5f6020820190508181035f830152613522816134e9565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f63ffffffff82169050919050565b5f61356f82613556565b915063ffffffff820361358557613584613198565b5b600182019050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffdfea2646970667358221220ccf54508644d6a37d6ebbb0d62e18d4683ac1ebf317bd1179e97bb59d7cb60d964736f6c63430008180033608060405234801562000010575f80fd5b5060405162001723380380620017238339818101604052810190620000369190620001f9565b80620000476200009f60201b60201c565b6001015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506200009881620000af60201b60201c565b5062000229565b5f683602298b8c10b01230905090565b620000bf6200019060201b60201c565b156200013a577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927805415620000fb57630dc149f05f526004601cfd5b8160601b60601c9150811560ff1b82178155815f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3506200018d565b8060601b60601c9050807fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392755805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a35b50565b5f90565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f620001c38262000198565b9050919050565b620001d581620001b7565b8114620001e0575f80fd5b50565b5f81519050620001f381620001ca565b92915050565b5f6020828403121562000211576200021062000194565b5b5f6200022084828501620001e3565b91505092915050565b6114ec80620002375f395ff3fe608060405260043610610138575f3560e01c8063715018a6116100aa578063b88d4fde1161006e578063b88d4fde146106a4578063c87b56dd146106cc578063e985e9c514610708578063f04e283e14610744578063f2fde38b14610760578063fee81cf41461077c5761013f565b8063715018a6146105f45780638da5cb5b146105fe57806395d89b411461062857806397e5311c14610652578063a22cb4651461067c5761013f565b806323b872dd116100fc57806323b872dd14610524578063256929621461054c57806342842e0e1461055657806354d1f13d146105725780636352211e1461057c57806370a08231146105b85761013f565b806301ffc9a71461043057806306fdde031461046c578063081812fc14610496578063095ea7b3146104d257806318160ddd146104fa5761013f565b3661013f57005b5f6101486107b8565b90505f60e06101565f6107c8565b901c905063263c69d6810361026a57815f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146101ec576040517f363cb31200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b602036103d5f3e6004356024018036103d5f3e602081033560051b81018036103d5f3e5b8082146102615781358060601c816001168260a01b60a81c811583028284027fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef5f38a4505050816020019150610210565b60015f5260205ff35b630f4599e5810361042e575f73ffffffffffffffffffffffffffffffffffffffff16826001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461035d57816001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661030f60046107c8565b73ffffffffffffffffffffffffffffffffffffffff161461035c576040517fc59ec47a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b5f73ffffffffffffffffffffffffffffffffffffffff16825f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146103e4576040517fbf656a4600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b33825f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060015f5260205ff35b005b34801561043b575f80fd5b5061045660048036038101906104519190611062565b6107d2565b60405161046391906110a7565b60405180910390f35b348015610477575f80fd5b506104806107f6565b60405161048d919061114a565b60405180910390f35b3480156104a1575f80fd5b506104bc60048036038101906104b7919061119d565b610849565b6040516104c99190611207565b60405180910390f35b3480156104dd575f80fd5b506104f860048036038101906104f3919061124a565b61088d565b005b348015610505575f80fd5b5061050e61090d565b60405161051b9190611297565b60405180910390f35b34801561052f575f80fd5b5061054a600480360381019061054591906112b0565b610947565b005b6105546109d3565b005b610570600480360381019061056b91906112b0565b610a24565b005b61057a610a5d565b005b348015610587575f80fd5b506105a2600480360381019061059d919061119d565b610a96565b6040516105af9190611207565b60405180910390f35b3480156105c3575f80fd5b506105de60048036038101906105d99190611300565b610ada565b6040516105eb9190611297565b60405180910390f35b6105fc610b20565b005b348015610609575f80fd5b50610612610b33565b60405161061f9190611207565b60405180910390f35b348015610633575f80fd5b5061063c610b5b565b604051610649919061114a565b60405180910390f35b34801561065d575f80fd5b50610666610bae565b6040516106739190611207565b60405180910390f35b348015610687575f80fd5b506106a2600480360381019061069d9190611355565b610c43565b005b3480156106af575f80fd5b506106ca60048036038101906106c591906113f4565b610cc2565b005b3480156106d7575f80fd5b506106f260048036038101906106ed919061119d565b610d32565b6040516106ff919061114a565b60405180910390f35b348015610713575f80fd5b5061072e60048036038101906107299190611478565b610d8b565b60405161073b91906110a7565b60405180910390f35b61075e60048036038101906107599190611300565b610de6565b005b61077a60048036038101906107759190611300565b610e24565b005b348015610787575f80fd5b506107a2600480360381019061079d9190611300565b610e4d565b6040516107af9190611297565b60405180910390f35b5f683602298b8c10b01230905090565b5f81359050919050565b5f8160e01c635b5e139f81146380ac58cd82146301ffc9a783141717915050919050565b60605f610801610bae565b905060405191506306fdde035f525f806004601c845afa610824573d5f833e3d82fd5b60205f803e60205f51833e815160205f5101602084013e815160208301016040525090565b5f80610853610bae565b905063081812fc5f528260205260205f6024601c845afa601f3d111661087f573d5f6040513e3d604051fd5b600c5160601c915050919050565b5f610896610bae565b90508260601b60601c925060405163d10b6e0c5f5283602052826040523360605260205f6064601c34865af1601f3d11166108d3573d5f823e3d81fd5b806040525f6060528284600c5160601c7f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9255f38a450505050565b5f80610917610bae565b905063e2c792815f5260205f6004601c845afa601f3d111661093f573d5f6040513e3d604051fd5b5f5191505090565b5f610950610bae565b90508360601b60601c93508260601b60601c925060405163e5eb36c881528460208201528360408201528260608201523360808201526020816084601c840134865af16001825114166109a5573d5f823e3d81fd5b8284867fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef5f38a45050505050565b5f6109dc610e66565b67ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b610a2f838383610947565b610a3882610e70565b15610a5857610a5783838360405180602001604052805f815250610e7a565b5b505050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b5f80610aa0610bae565b9050636352211e5f528260205260205f6024601c845afa601f3d1116610acc573d5f6040513e3d604051fd5b600c5160601c915050919050565b5f80610ae4610bae565b90508260601b60601c60205263f5b100ea5f5260205f6024601c845afa601f3d1116610b16573d5f6040513e3d604051fd5b5f51915050919050565b610b28610f04565b610b315f610f3b565b565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392754905090565b60605f610b66610bae565b905060405191506395d89b415f525f806004601c845afa610b89573d5f833e3d82fd5b60205f803e60205f51833e815160205f5101602084013e815160208301016040525090565b5f610bb76107b8565b5f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610c40576040517f5b2a47ae00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b90565b5f610c4c610bae565b90508260601b60601c925060405163813500fc5f52836020528215156040523360605260205f6064601c34865af160015f511416610c8c573d5f823e3d81fd5b83337f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3160206040a3806040525f60605250505050565b610ccd858585610947565b610cd684610e70565b15610d2b57610d2a85858585858080601f0160208091040260200160405190810160405280939291908181526020018383808284375f81840152601f19601f82011690508083019250505050505050610e7a565b5b5050505050565b60605f610d3d610bae565b905060405191508260205263c87b56dd5f525f806024601c845afa610d64573d5f833e3d82fd5b60205f803e60205f51833e815160205f5101602084013e8151602083010160405250919050565b5f80610d95610bae565b9050604051836040528460601b602c526fe985e9c5000000000000000000000000600c5260205f6044601c855afa601f3d1116610dd4573d5f823e3d81fd5b806040525f5115159250505092915050565b610dee610f04565b63389a75e1600c52805f526020600c208054421115610e1457636f5e88185f526004601cfd5b5f815550610e2181610f3b565b50565b610e2c610f04565b8060601b610e4157637448fbae5f526004601cfd5b610e4a81610f3b565b50565b5f63389a75e1600c52815f526020600c20549050919050565b5f6202a300905090565b5f813b9050919050565b60405163150b7a028082523360208301528560601b60601c604083015283606083015260808083015282518060a08401528015610ec1578060c08401826020870160045afa505b60208360a48301601c86015f8a5af1610ee3573d15610ee2573d5f843e3d83fd5b5b8160e01b835114610efb5763d1a57ed65f526004601cfd5b50505050505050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543314610f39576382b429005f526004601cfd5b565b610f43611001565b15610fa8577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3811560ff1b8217815550610ffe565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3818155505b50565b5f90565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6110418161100d565b811461104b575f80fd5b50565b5f8135905061105c81611038565b92915050565b5f6020828403121561107757611076611005565b5b5f6110848482850161104e565b91505092915050565b5f8115159050919050565b6110a18161108d565b82525050565b5f6020820190506110ba5f830184611098565b92915050565b5f81519050919050565b5f82825260208201905092915050565b5f5b838110156110f75780820151818401526020810190506110dc565b5f8484015250505050565b5f601f19601f8301169050919050565b5f61111c826110c0565b61112681856110ca565b93506111368185602086016110da565b61113f81611102565b840191505092915050565b5f6020820190508181035f8301526111628184611112565b905092915050565b5f819050919050565b61117c8161116a565b8114611186575f80fd5b50565b5f8135905061119781611173565b92915050565b5f602082840312156111b2576111b1611005565b5b5f6111bf84828501611189565b91505092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6111f1826111c8565b9050919050565b611201816111e7565b82525050565b5f60208201905061121a5f8301846111f8565b92915050565b611229816111e7565b8114611233575f80fd5b50565b5f8135905061124481611220565b92915050565b5f80604083850312156112605761125f611005565b5b5f61126d85828601611236565b925050602061127e85828601611189565b9150509250929050565b6112918161116a565b82525050565b5f6020820190506112aa5f830184611288565b92915050565b5f805f606084860312156112c7576112c6611005565b5b5f6112d486828701611236565b93505060206112e586828701611236565b92505060406112f686828701611189565b9150509250925092565b5f6020828403121561131557611314611005565b5b5f61132284828501611236565b91505092915050565b6113348161108d565b811461133e575f80fd5b50565b5f8135905061134f8161132b565b92915050565b5f806040838503121561136b5761136a611005565b5b5f61137885828601611236565b925050602061138985828601611341565b9150509250929050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f8401126113b4576113b3611393565b5b8235905067ffffffffffffffff8111156113d1576113d0611397565b5b6020830191508360018202830111156113ed576113ec61139b565b5b9250929050565b5f805f805f6080868803121561140d5761140c611005565b5b5f61141a88828901611236565b955050602061142b88828901611236565b945050604061143c88828901611189565b935050606086013567ffffffffffffffff81111561145d5761145c611009565b5b6114698882890161139f565b92509250509295509295909350565b5f806040838503121561148e5761148d611005565b5b5f61149b85828601611236565b92505060206114ac85828601611236565b915050925092905056fea26469706673582212200b6c572b3c6cb899904046e2ff2811def52575269dc4d8926a7744fb2e54156364736f6c63430008180033697066733a2f2f516d624d536459645a6f4b33314e674c4b7976784841324d51433871623831696f4452416439396f4747575657542f
Deployed Bytecode
0x60806040526004361061014e575f3560e01c8063715018a6116100b5578063e086e5ec1161006e578063e086e5ec14610bed578063e8d6c36d14610c03578063f04e283e14610c2b578063f2fde38b14610c47578063f8b45b0514610c63578063fee81cf414610c8d57610155565b8063715018a614610adb5780638da5cb5b14610ae557806395d89b4114610b0f578063a9059cbb14610b39578063c87b56dd14610b75578063dd62ed3e14610bb157610155565b80632a6a935d116101075780632a6a935d146109f1578063313ce56714610a195780634ef41efc14610a4357806354d1f13d14610a6d5780635d0044ca14610a7757806370a0823114610a9f57610155565b806306fdde03146108df578063095ea7b31461090957806318160ddd1461094557806323b872dd1461096f57806325692962146109ab578063274e430b146109b557610155565b3661015557005b5f61015e610cc9565b90505f60e061016c5f610cd9565b901c905063e985e9c581036102cf57816001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610203576040517fce5a776b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60445f3690501015610213575f80fd5b5f61021e6004610cd9565b90505f61022b6024610cd9565b90506102cc846003015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff166102c1575f6102c4565b60015b60ff16610ce3565b50505b636352211e81036103a857816001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610362576040517fce5a776b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60245f3690501015610372575f80fd5b5f61037d6004610cd9565b90506103a661038b82610ceb565b73ffffffffffffffffffffffffffffffffffffffff16610ce3565b505b63e5eb36c8810361049a57816001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461043b576040517fce5a776b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60845f369050101561044b575f80fd5b5f6104566004610cd9565b90505f6104636024610cd9565b90505f6104706044610cd9565b90505f61047d6064610cd9565b905061048b84848484610d3b565b6104956001610ce3565b505050505b63813500fc810361058057816001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461052d576040517fce5a776b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60645f369050101561053d575f80fd5b5f6105486004610cd9565b90505f806105566024610cd9565b141590505f6105656044610cd9565b9050610572838383611301565b61057c6001610ce3565b5050505b63d10b6e0c810361067757816001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610613576040517fce5a776b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60645f3690501015610623575f80fd5b5f61062e6004610cd9565b90505f61063b6024610cd9565b90505f6106486044610cd9565b905061067361065884848461139e565b73ffffffffffffffffffffffffffffffffffffffff16610ce3565b5050505b63081812fc810361075057816001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461070a576040517fce5a776b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60245f369050101561071a575f80fd5b5f6107256004610cd9565b905061074e6107338261154e565b73ffffffffffffffffffffffffffffffffffffffff16610ce3565b505b63f5b100ea810361081357816001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146107e3576040517fce5a776b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60245f36905010156107f3575f80fd5b5f6107fe6004610cd9565b905061081161080c826115cf565b610ce3565b505b63e2c7928181036108c757816001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146108a6576040517fce5a776b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60045f36905010156108b6575f80fd5b6108c66108c1611636565b610ce3565b5b63b7a94eb881036108dd576108dc6001610ce3565b5b005b3480156108ea575f80fd5b506108f361165d565b6040516109009190612c1f565b60405180910390f35b348015610914575f80fd5b5061092f600480360381019061092a9190612cdd565b6116ec565b60405161093c9190612d35565b60405180910390f35b348015610950575f80fd5b506109596117e7565b6040516109669190612d5d565b60405180910390f35b34801561097a575f80fd5b5061099560048036038101906109909190612d76565b61181e565b6040516109a29190612d35565b60405180910390f35b6109b36119a3565b005b3480156109c0575f80fd5b506109db60048036038101906109d69190612dc6565b6119f4565b6040516109e89190612d35565b60405180910390f35b3480156109fc575f80fd5b50610a176004803603810190610a129190612e1b565b611a8f565b005b348015610a24575f80fd5b50610a2d611a9c565b604051610a3a9190612e61565b60405180910390f35b348015610a4e575f80fd5b50610a57611aa4565b604051610a649190612e89565b60405180910390f35b610a75611ad5565b005b348015610a82575f80fd5b50610a9d6004803603810190610a989190612ea2565b611b0e565b005b348015610aaa575f80fd5b50610ac56004803603810190610ac09190612dc6565b611b20565b604051610ad29190612d5d565b60405180910390f35b610ae3611b97565b005b348015610af0575f80fd5b50610af9611baa565b604051610b069190612e89565b60405180910390f35b348015610b1a575f80fd5b50610b23611bd2565b604051610b309190612c1f565b60405180910390f35b348015610b44575f80fd5b50610b5f6004803603810190610b5a9190612cdd565b611c62565b604051610b6c9190612d35565b60405180910390f35b348015610b80575f80fd5b50610b9b6004803603810190610b969190612ea2565b611cdb565b604051610ba89190612c1f565b60405180910390f35b348015610bbc575f80fd5b50610bd76004803603810190610bd29190612ecd565b611d0f565b604051610be49190612d5d565b60405180910390f35b348015610bf8575f80fd5b50610c01611d9a565b005b348015610c0e575f80fd5b50610c296004803603810190610c24919061310b565b611dad565b005b610c456004803603810190610c409190612dc6565b611e5c565b005b610c616004803603810190610c5c9190612dc6565b611e9a565b005b348015610c6e575f80fd5b50610c77611ec3565b604051610c849190612d5d565b60405180910390f35b348015610c98575f80fd5b50610cb36004803603810190610cae9190612dc6565b611ec9565b604051610cc09190612d5d565b60405180910390f35b5f68a20d6e21d0e5255308905090565b5f81359050919050565b805f5260205ff35b5f610cf582611ee2565b610d2b576040517fceea21b600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610d3482611f22565b9050919050565b5f610d44610cc9565b90505f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603610dab576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f816002015f610dc684600701610dc188611f89565b611f96565b63ffffffff1663ffffffff1681526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff1614610e66576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8573ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610fbd57816003015f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16610fbc57816004015f8581526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610fbb576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b5b5f610fc787611fc0565b90505f610fd387611fc0565b90506001825f0160148282829054906101000a90046bffffffffffffffffffffffff1661100091906131c5565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055506001815f0160148282829054906101000a90046bffffffffffffffffffffffff160192506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555061109d8460070161108e88611f89565b611098848b612068565b61215b565b836004015f8781526020019081526020015f205f6101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690555f611157856006015f8b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20845f01601081819054906101000a900463ffffffff166001900391906101000a81548163ffffffff021916908363ffffffff160217905563ffffffff16611f96565b63ffffffff1690506111c2856006015f8b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f206111b6876007016111b18b61218d565b611f96565b63ffffffff168361215b565b5f825f01601081819054906101000a900463ffffffff168092919060010191906101000a81548163ffffffff021916908363ffffffff16021790555063ffffffff169050611230866007016112168461218d565b61122b896007016112268d61218d565b611f96565b61215b565b611279866006015f8b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20828a61215b565b61128f866007016112898a61218d565b8361215b565b50508673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60016040516112ef9190613246565b60405180910390a35050505050505050565b8161130a610cc9565b6003015f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff021916908315150217905550505050565b5f806113a8610cc9565b90505f816002015f6113c5846007016113c089611f89565b611f96565b63ffffffff1663ffffffff1681526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16146114f157816003015f8273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff166114f0576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b85826004015f8781526020019081526020015f205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080925050509392505050565b5f61155882611ee2565b61158e576040517fceea21b600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611596610cc9565b6004015f8381526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b5f6115d8610cc9565b6008015f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f0160109054906101000a900463ffffffff1663ffffffff169050919050565b5f61163f610cc9565b5f0160089054906101000a900463ffffffff1663ffffffff16905090565b60605f805461166b9061328c565b80601f01602080910402602001604051908101604052809291908181526020018280546116979061328c565b80156116e25780601f106116b9576101008083540402835291602001916116e2565b820191905f5260205f20905b8154815290600101906020018083116116c557829003601f168201915b5050505050905090565b5f806116f6610cc9565b905082816005015f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925856040516117d49190612d5d565b60405180910390a3600191505092915050565b5f6117f0610cc9565b5f01600c9054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff16905090565b5f80611828610cc9565b90505f816005015f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205490507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811461198b5780841115611909576040517f13be252b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b838103826005015f8873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055505b61199686868661219c565b6001925050509392505050565b5f6119ac612824565b67ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b5f806119fe610cc9565b6008015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2090505f6001825f01600b9054906101000a900460ff161660ff1603611a6c57611a648361282e565b915050611a8a565b5f6002825f01600b9054906101000a900460ff161660ff1614159150505b919050565b611a993382612838565b50565b5f6012905090565b5f611aad610cc9565b6001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b611b166128eb565b8060038190555050565b5f611b29610cc9565b6008015f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f0160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff169050919050565b611b9f6128eb565b611ba85f612922565b565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392754905090565b606060018054611be19061328c565b80601f0160208091040260200160405190810160405280929190818152602001828054611c0d9061328c565b8015611c585780601f10611c2f57610100808354040283529160200191611c58565b820191905f5260205f20905b815481529060010190602001808311611c3b57829003601f168201915b5050505050905090565b5f611c6c836119f4565b611cc95760035482611c7d85611b20565b611c8791906132bc565b1115611cc8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cbf9061335f565b60405180910390fd5b5b611cd383836129e8565b905092915050565b60606002611ce8836129fe565b604051602001611cf9929190613493565b6040516020818303038152906040529050919050565b5f611d18610cc9565b6005015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905092915050565b611da26128eb565b611dab33612a4d565b565b611db56128eb565b8051825114611df9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611df09061350b565b60405180910390fd5b5f5b8251811015611e5757611e4a611e0f611baa565b848381518110611e2257611e21613529565b5b6020026020010151848481518110611e3d57611e3c613529565b5b602002602001015161219c565b8080600101915050611dfb565b505050565b611e646128eb565b63389a75e1600c52805f526020600c208054421115611e8a57636f5e88185f526004601cfd5b5f815550611e9781612922565b50565b611ea26128eb565b8060601b611eb757637448fbae5f526004601cfd5b611ec081612922565b50565b60035481565b5f63389a75e1600c52815f526020600c20549050919050565b5f8073ffffffffffffffffffffffffffffffffffffffff16611f0383611f22565b73ffffffffffffffffffffffffffffffffffffffff1614159050919050565b5f80611f2c610cc9565b9050806002015f611f4883600701611f4387611f89565b611f96565b63ffffffff1663ffffffff1681526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16915050919050565b5f600182901b9050919050565b5f600560078316901b835f015f600385901c81526020019081526020015f2054901c905092915050565b5f80611fca610cc9565b9050806008015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2091505f6001835f01600b9054906101000a900460ff161660ff1603612062575f600190506120388461282e565b15612044576002811790505b80835f01600b6101000a81548160ff021916908360ff160217905550505b50919050565b5f80612072610cc9565b9050835f01600c9054906101000a900463ffffffff1691505f8263ffffffff160361215457805f015f81819054906101000a900463ffffffff166120b590613565565b91906101000a81548163ffffffff021916908363ffffffff1602179055915081845f01600c6101000a81548163ffffffff021916908363ffffffff16021790555082816002015f8463ffffffff1663ffffffff1681526020019081526020015f205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b5092915050565b826020528160031c5f5260405f206007831660051b815463ffffffff8482841c188116831b8218845550505050505050565b5f60018083901b019050919050565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603612201576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61220a610cc9565b90505f61221685611fc0565b90505f61222285611fc0565b905061222c612b4c565b825f0160109054906101000a900463ffffffff1663ffffffff16816080018181525050815f0160109054906101000a900463ffffffff1663ffffffff168160a0018181525050825f0160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff1681604001818152505080604001518511156122e3576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b848160400181815103915081815250508060400151835f0160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555084825f0160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff16018160600181815250825f0160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055506123bb8160800151670de0b6b3a76400006064846040015102816123b5576123b4613590565b5b04612a69565b815f0181815250505f6002835f01600b9054906101000a900460ff161660ff160361245e578573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff160361242757805f01518160800151038160a00181815250505b612454670de0b6b3a764000060648360600151028161244957612448613590565b5b048260a00151612a69565b8160200181815250505b5f6124718260200151835f015101612a79565b90505f825f0151146125a4575f856006015f8a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2090505f836080015190505f845f015182039050845f0151885f0160088282829054906101000a900463ffffffff160392506101000a81548163ffffffff021916908363ffffffff16021790555080875f0160106101000a81548163ffffffff021916908363ffffffff1602179055505b5f61253f848460019003945084611f96565b63ffffffff16905061255689600701825f80612aa6565b886004015f8281526020019081526020015f205f6101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055612598858d836001612aea565b5080820361252d575050505b5f82602001511461277c575f856006015f8973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2090505f8360a0015190505f8460200151820190505f61260e878c612068565b90505f670de0b6b3a764000060648b5f01600c9054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff16028161265557612654613590565b5b0490505f8a5f0160049054906101000a900463ffffffff1663ffffffff16905087602001518b5f0160088282829054906101000a900463ffffffff160192506101000a81548163ffffffff021916908363ffffffff16021790555083895f0160106101000a81548163ffffffff021916908363ffffffff1602179055505b5b5f6126ea8c6007016126e584611f89565b611f96565b63ffffffff161461270d578181600101915081111561270857600190505b6126d4565b61271886868361215b565b61272d8b600701828588806001019950612aa6565b612739878e835f612aea565b8181600101915081111561274c57600190505b8385036126d357808b5f0160046101000a81548163ffffffff021916908363ffffffff1602179055505050505050505b5f815f015151146127b5576127b481866001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16612b0c565b5b508573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef876040516128139190612d5d565b60405180910390a350505050505050565b5f6202a300905090565b5f813b9050919050565b5f61284283611fc0565b90508115155f6002835f01600b9054906101000a900460ff161660ff161415151514612898576002815f01600b8282829054906101000a900460ff161892506101000a81548160ff021916908360ff1602179055505b8273ffffffffffffffffffffffffffffffffffffffff167fb5a1de456fff688115a4f75380060c23c8532d14ff85f687cc871456d6420393836040516128de9190612d35565b60405180910390a2505050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543314612920576382b429005f526004601cfd5b565b61292a612b48565b1561298f577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3811560ff1b82178155506129e5565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3818155505b50565b5f6129f433848461219c565b6001905092915050565b60606080604051019050602081016040525f8152805f19835b600115612a38578184019350600a81066030018453600a8104905080612a17575b50828203602084039350808452505050919050565b5f385f3847855af1612a665763b12d13eb5f526004601cfd5b50565b5f81830382841102905092915050565b612a81612b7c565b6040805101828152806020018360051b81016040528183528083602001525050919050565b8163ffffffff168160201b17846020528360021c5f5260405f206003851660061b815467ffffffffffffffff8482841c188116831b82188455505050505050505050565b8360200151818360081b8560601b171781526020810185602001525050505050565b81516040810363263c69d68152602080820152815160051b60440160208282601c85015f885af1600183511416612b41575f82fd5b5050505050565b5f90565b6040518060c001604052805f81526020015f81526020015f81526020015f81526020015f81526020015f81525090565b6040518060400160405280606081526020015f81525090565b5f81519050919050565b5f82825260208201905092915050565b5f5b83811015612bcc578082015181840152602081019050612bb1565b5f8484015250505050565b5f601f19601f8301169050919050565b5f612bf182612b95565b612bfb8185612b9f565b9350612c0b818560208601612baf565b612c1481612bd7565b840191505092915050565b5f6020820190508181035f830152612c378184612be7565b905092915050565b5f604051905090565b5f80fd5b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f612c7982612c50565b9050919050565b612c8981612c6f565b8114612c93575f80fd5b50565b5f81359050612ca481612c80565b92915050565b5f819050919050565b612cbc81612caa565b8114612cc6575f80fd5b50565b5f81359050612cd781612cb3565b92915050565b5f8060408385031215612cf357612cf2612c48565b5b5f612d0085828601612c96565b9250506020612d1185828601612cc9565b9150509250929050565b5f8115159050919050565b612d2f81612d1b565b82525050565b5f602082019050612d485f830184612d26565b92915050565b612d5781612caa565b82525050565b5f602082019050612d705f830184612d4e565b92915050565b5f805f60608486031215612d8d57612d8c612c48565b5b5f612d9a86828701612c96565b9350506020612dab86828701612c96565b9250506040612dbc86828701612cc9565b9150509250925092565b5f60208284031215612ddb57612dda612c48565b5b5f612de884828501612c96565b91505092915050565b612dfa81612d1b565b8114612e04575f80fd5b50565b5f81359050612e1581612df1565b92915050565b5f60208284031215612e3057612e2f612c48565b5b5f612e3d84828501612e07565b91505092915050565b5f60ff82169050919050565b612e5b81612e46565b82525050565b5f602082019050612e745f830184612e52565b92915050565b612e8381612c6f565b82525050565b5f602082019050612e9c5f830184612e7a565b92915050565b5f60208284031215612eb757612eb6612c48565b5b5f612ec484828501612cc9565b91505092915050565b5f8060408385031215612ee357612ee2612c48565b5b5f612ef085828601612c96565b9250506020612f0185828601612c96565b9150509250929050565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b612f4582612bd7565b810181811067ffffffffffffffff82111715612f6457612f63612f0f565b5b80604052505050565b5f612f76612c3f565b9050612f828282612f3c565b919050565b5f67ffffffffffffffff821115612fa157612fa0612f0f565b5b602082029050602081019050919050565b5f80fd5b5f612fc8612fc384612f87565b612f6d565b90508083825260208201905060208402830185811115612feb57612fea612fb2565b5b835b8181101561301457806130008882612c96565b845260208401935050602081019050612fed565b5050509392505050565b5f82601f83011261303257613031612f0b565b5b8135613042848260208601612fb6565b91505092915050565b5f67ffffffffffffffff82111561306557613064612f0f565b5b602082029050602081019050919050565b5f6130886130838461304b565b612f6d565b905080838252602082019050602084028301858111156130ab576130aa612fb2565b5b835b818110156130d457806130c08882612cc9565b8452602084019350506020810190506130ad565b5050509392505050565b5f82601f8301126130f2576130f1612f0b565b5b8135613102848260208601613076565b91505092915050565b5f806040838503121561312157613120612c48565b5b5f83013567ffffffffffffffff81111561313e5761313d612c4c565b5b61314a8582860161301e565b925050602083013567ffffffffffffffff81111561316b5761316a612c4c565b5b613177858286016130de565b9150509250929050565b5f6bffffffffffffffffffffffff82169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6131cf82613181565b91506131da83613181565b925082820390506bffffffffffffffffffffffff8111156131fe576131fd613198565b5b92915050565b5f819050919050565b5f819050919050565b5f61323061322b61322684613204565b61320d565b612caa565b9050919050565b61324081613216565b82525050565b5f6020820190506132595f830184613237565b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f60028204905060018216806132a357607f821691505b6020821081036132b6576132b561325f565b5b50919050565b5f6132c682612caa565b91506132d183612caa565b92508282019050808211156132e9576132e8613198565b5b92915050565b7f54686973207472616e736665722077696c6c20657863656564207265636569765f8201527f6572206d617820686f6c64696e6720616d6f756e74206f6620746f6b656e7300602082015250565b5f613349603f83612b9f565b9150613354826132ef565b604082019050919050565b5f6020820190508181035f8301526133768161333d565b9050919050565b5f81905092915050565b5f819050815f5260205f209050919050565b5f81546133a58161328c565b6133af818661337d565b9450600182165f81146133c957600181146133de57613410565b60ff1983168652811515820286019350613410565b6133e785613387565b5f5b83811015613408578154818901526001820191506020810190506133e9565b838801955050505b50505092915050565b5f61342382612b95565b61342d818561337d565b935061343d818560208601612baf565b80840191505092915050565b7f2e6a736f6e0000000000000000000000000000000000000000000000000000005f82015250565b5f61347d60058361337d565b915061348882613449565b600582019050919050565b5f61349e8285613399565b91506134aa8284613419565b91506134b582613471565b91508190509392505050565b7f4c69737473206c656e67746873206d69736d61746368000000000000000000005f82015250565b5f6134f5601683612b9f565b9150613500826134c1565b602082019050919050565b5f6020820190508181035f830152613522816134e9565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f63ffffffff82169050919050565b5f61356f82613556565b915063ffffffff820361358557613584613198565b5b600182019050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffdfea2646970667358221220ccf54508644d6a37d6ebbb0d62e18d4683ac1ebf317bd1179e97bb59d7cb60d964736f6c63430008180033
Deployed Bytecode Sourcemap
124637:1697:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;116760:22;116785:18;:16;:18::i;:::-;116760:43;;116810:18;116854:3;116831:19;116845:4;116831:13;:19::i;:::-;:26;;116810:47;;116925:10;116911;:24;116907:326;;116961:1;:14;;;;;;;;;;;;116947:28;;:10;:28;;;116943:58;;116984:17;;;;;;;;;;;;;;116943:58;117029:4;117011:8;;:15;;:22;117007:36;;;117035:8;;;117007:36;117051:13;117083:19;117097:4;117083:13;:19::i;:::-;117051:53;;117110:16;117145:19;117159:4;117145:13;:19::i;:::-;117110:56;;117174:53;117182:1;:19;;:26;117202:5;117182:26;;;;;;;;;;;;;;;:36;117209:8;117182:36;;;;;;;;;;;;;;;;;;;;;;;;;:44;;117225:1;117182:44;;;117221:1;117182:44;117174:53;;:7;:53::i;:::-;116937:296;;116907:326;117281:10;117267;:24;117263:220;;117317:1;:14;;;;;;;;;;;;117303:28;;:10;:28;;;117299:58;;117340:17;;;;;;;;;;;;;;117299:58;117385:4;117367:8;;:15;;:22;117363:36;;;117391:8;;;117363:36;117407:10;117420:19;117434:4;117420:13;:19::i;:::-;117407:32;;117447:30;117463:12;117472:2;117463:8;:12::i;:::-;117447:30;;:7;:30::i;:::-;117293:190;117263:220;117563:10;117549;:24;117545:424;;117599:1;:14;;;;;;;;;;;;117585:28;;:10;:28;;;117581:58;;117622:17;;;;;;;;;;;;;;117581:58;117667:4;117649:8;;:15;;:22;117645:36;;;117673:8;;;117645:36;117689:12;117720:19;117734:4;117720:13;:19::i;:::-;117689:52;;117747:10;117776:19;117790:4;117776:13;:19::i;:::-;117747:50;;117803:10;117816:19;117830:4;117816:13;:19::i;:::-;117803:32;;117841:17;117877:19;117891:4;117877:13;:19::i;:::-;117841:57;;117906:41;117923:4;117929:2;117933;117937:9;117906:16;:41::i;:::-;117953:10;117961:1;117953:7;:10::i;:::-;117575:394;;;;117545:424;118040:10;118026;:24;118022:382;;118076:1;:14;;;;;;;;;;;;118062:28;;:10;:28;;;118058:58;;118099:17;;;;;;;;;;;;;;118058:58;118144:4;118126:8;;:15;;:22;118122:36;;;118150:8;;;118122:36;118166:15;118200:19;118214:4;118200:13;:19::i;:::-;118166:55;;118227:11;118264:1;118241:19;118255:4;118241:13;:19::i;:::-;:24;;118227:38;;118271:17;118307:19;118321:4;118307:13;:19::i;:::-;118271:57;;118336:46;118355:7;118364:6;118372:9;118336:18;:46::i;:::-;118388:10;118396:1;118388:7;:10::i;:::-;118052:352;;;118022:382;118471:10;118457;:24;118453:367;;118507:1;:14;;;;;;;;;;;;118493:28;;:10;:28;;;118489:58;;118530:17;;;;;;;;;;;;;;118489:58;118575:4;118557:8;;:15;;:22;118553:36;;;118581:8;;;118553:36;118597:15;118631:19;118645:4;118631:13;:19::i;:::-;118597:55;;118658:10;118671:19;118685:4;118671:13;:19::i;:::-;118658:32;;118696:17;118732:19;118746:4;118732:13;:19::i;:::-;118696:57;;118761:53;118777:35;118789:7;118798:2;118802:9;118777:11;:35::i;:::-;118761:53;;:7;:53::i;:::-;118483:337;;;118453:367;118872:10;118858;:24;118854:224;;118908:1;:14;;;;;;;;;;;;118894:28;;:10;:28;;;118890:58;;118931:17;;;;;;;;;;;;;;118890:58;118976:4;118958:8;;:15;;:22;118954:36;;;118982:8;;;118954:36;118998:10;119011:19;119025:4;119011:13;:19::i;:::-;118998:32;;119038:34;119054:16;119067:2;119054:12;:16::i;:::-;119038:34;;:7;:34::i;:::-;118884:194;118854:224;119131:10;119117;:24;119113:240;;119167:1;:14;;;;;;;;;;;;119153:28;;:10;:28;;;119149:58;;119190:17;;;;;;;;;;;;;;119149:58;119235:4;119217:8;;:15;;:22;119213:36;;;119241:8;;;119213:36;119257:13;119289:19;119303:4;119289:13;:19::i;:::-;119257:53;;119318:29;119326:20;119340:5;119326:13;:20::i;:::-;119318:7;:29::i;:::-;119143:210;119113:240;119401:10;119387;:24;119383:176;;119437:1;:14;;;;;;;;;;;;119423:28;;:10;:28;;;119419:58;;119460:17;;;;;;;;;;;;;;119419:58;119505:4;119487:8;;:15;;:22;119483:36;;;119511:8;;;119483:36;119527:26;119535:17;:15;:17::i;:::-;119527:7;:26::i;:::-;119383:176;119608:10;119594;:24;119590:52;;119626:10;119634:1;119626:7;:10::i;:::-;119590:52;116755:2897;125188:83;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;98921:248;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;98249:117;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;100421:434;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;67465:507;;;:::i;:::-;;111343:261;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;111704:91;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;98123:67;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;113636:110;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;68051:391;;;:::i;:::-;;125673:91;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;98429:134;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;67218:93;;;:::i;:::-;;69545:157;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;125276:87;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;125371:294;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;125769:177;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;98655:142;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;126235:96;;;;;;;;;;;;;:::i;:::-;;125954:276;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;68624:592;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;66867:289;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;124763:24;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;69802:356;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;95586:281;95645:22;95790:20;95780:30;;95586:281;:::o;122312:172::-;122373:13;122468:6;122455:20;122446:29;;122312:172;;;:::o;122571:146::-;122683:1;122677:4;122670:15;122703:4;122697;122690:18;114518:148;114579:7;114598:11;114606:2;114598:7;:11::i;:::-;114593:44;;114618:19;;;;;;;;;;;;;;114593:44;114649:12;114658:2;114649:8;:12::i;:::-;114642:19;;114518:148;;;:::o;108639:1270::-;108752:22;108777:18;:16;:18::i;:::-;108752:43;;108820:1;108806:16;;:2;:16;;;108802:52;;108831:23;;;;;;;;;;;;;;108802:52;108861:13;108877:1;:16;;:49;108894:31;108899:1;:4;;108905:19;108921:2;108905:15;:19::i;:::-;108894:4;:31::i;:::-;108877:49;;;;;;;;;;;;;;;;;;;;;;;;;108861:65;;108945:5;108937:13;;:4;:13;;;108933:54;;108959:28;;;;;;;;;;;;;;108933:54;109011:4;108998:17;;:9;:17;;;108994:187;;109028:1;:19;;:25;109048:4;109028:25;;;;;;;;;;;;;;;:36;109054:9;109028:36;;;;;;;;;;;;;;;;;;;;;;;;;109023:153;;109090:1;:16;;:20;109107:2;109090:20;;;;;;;;;;;;;;;;;;;;;109077:33;;:9;:33;;;109073:97;;109127:35;;;;;;;;;;;;;;109073:97;109023:153;108994:187;109187:35;109225:18;109238:4;109225:12;:18::i;:::-;109187:56;;109248:33;109284:16;109297:2;109284:12;:16::i;:::-;109248:52;;109341:1;109307:15;:23;;;:36;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;109398:1;109366:13;:21;;;:34;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;109408:76;109413:1;:4;;109419:19;109435:2;109419:15;:19::i;:::-;109440:43;109465:13;109480:2;109440:24;:43::i;:::-;109408:4;:76::i;:::-;109497:1;:16;;:20;109514:2;109497:20;;;;;;;;;;;;109490:27;;;;;;;;;;;109525:17;109545:50;109550:1;:7;;:13;109558:4;109550:13;;;;;;;;;;;;;;;109567:15;:27;;;109565:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;109545:50;;:4;:50::i;:::-;109525:70;;;;109601:67;109606:1;:7;;:13;109614:4;109606:13;;;;;;;;;;;;;;;109621:27;109626:1;:4;;109632:15;109644:2;109632:11;:15::i;:::-;109621:4;:27::i;:::-;109601:67;;109657:9;109601:4;:67::i;:::-;109676:9;109688:13;:25;;;:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;109676:39;;;;109721:63;109726:1;:4;;109732:22;109744:9;109732:11;:22::i;:::-;109756:27;109761:1;:4;;109767:15;109779:2;109767:11;:15::i;:::-;109756:4;:27::i;:::-;109721:4;:63::i;:::-;109790:32;109795:1;:7;;:11;109803:2;109795:11;;;;;;;;;;;;;;;109808:1;109818:2;109790:4;:32::i;:::-;109828:38;109833:1;:4;;109839:15;109851:2;109839:11;:15::i;:::-;109863:1;109828:4;:38::i;:::-;109350:522;;109898:2;109883:21;;109892:4;109883:21;;;109902:1;109883:21;;;;;;:::i;:::-;;;;;;;;108747:1162;;;;108639:1270;;;;:::o;115881:183::-;116051:8;115991:18;:16;:18::i;:::-;:36;;:47;116028:9;115991:47;;;;;;;;;;;;;;;:57;116039:8;115991:57;;;;;;;;;;;;;;;;:68;;;;;;;;;;;;;;;;;;115881:183;;;:::o;115327:437::-;115431:7;115447:22;115472:18;:16;:18::i;:::-;115447:43;;115497:13;115513:1;:16;;:49;115530:31;115535:1;:4;;115541:19;115557:2;115541:15;:19::i;:::-;115530:4;:31::i;:::-;115513:49;;;;;;;;;;;;;;;;;;;;;;;;;115497:65;;115586:5;115573:18;;:9;:18;;;115569:135;;115604:1;:19;;:26;115624:5;115604:26;;;;;;;;;;;;;;;:37;115631:9;115604:37;;;;;;;;;;;;;;;;;;;;;;;;;115599:100;;115657:35;;;;;;;;;;;;;;115599:100;115569:135;115733:7;115710:1;:16;;:20;115727:2;115710:20;;;;;;;;;;;;:30;;;;;;;;;;;;;;;;;;115754:5;115747:12;;;;115327:437;;;;;:::o;114945:177::-;115010:7;115029:11;115037:2;115029:7;:11::i;:::-;115024:44;;115049:19;;;;;;;;;;;;;;115024:44;115080:18;:16;:18::i;:::-;:33;;:37;115114:2;115080:37;;;;;;;;;;;;;;;;;;;;;115073:44;;114945:177;;;:::o;113954:144::-;114023:7;114044:18;:16;:18::i;:::-;:30;;:37;114075:5;114044:37;;;;;;;;;;;;;;;:49;;;;;;;;;;;;114037:56;;;;113954:144;;;:::o;113792:117::-;113850:7;113871:18;:16;:18::i;:::-;:33;;;;;;;;;;;;113864:40;;;;113792:117;:::o;125188:83::-;125234:13;125261:5;125254:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;125188:83;:::o;98921:248::-;98995:4;99006:22;99031:18;:16;:18::i;:::-;99006:43;;99091:6;99056:1;:11;;:23;99068:10;99056:23;;;;;;;;;;;;;;;:32;99080:7;99056:32;;;;;;;;;;;;;;;:41;;;;99130:7;99109:37;;99118:10;99109:37;;;99139:6;99109:37;;;;;;:::i;:::-;;;;;;;;99160:4;99153:11;;;98921:248;;;;:::o;98249:117::-;98301:7;98330:18;:16;:18::i;:::-;:30;;;;;;;;;;;;98322:39;;98315:46;;98249:117;:::o;100421:434::-;100509:4;100520:22;100545:18;:16;:18::i;:::-;100520:43;;100570:15;100588:1;:11;;:17;100600:4;100588:17;;;;;;;;;;;;;;;:29;100606:10;100588:29;;;;;;;;;;;;;;;;100570:47;;100639:17;100628:7;:28;100624:175;;100677:7;100668:6;:16;100664:52;;;100693:23;;;;;;;;;;;;;;100664:52;100781:6;100771:7;:16;100739:1;:11;;:17;100751:4;100739:17;;;;;;;;;;;;;;;:29;100757:10;100739:29;;;;;;;;;;;;;;;:48;;;;100624:175;100805:27;100815:4;100821:2;100825:6;100805:9;:27::i;:::-;100846:4;100839:11;;;;100421:434;;;;;:::o;67465:507::-;67545:15;67581:28;:26;:28::i;:::-;67563:46;;:15;:46;67545:64;;67739:19;67733:4;67726:33;67778:8;67772:4;67765:22;67823:7;67816:4;67810;67800:21;67793:38;67948:8;67901:45;67898:1;67895;67890:67;67663:300;67465:507::o;111343:261::-;111403:4;111414:21;111438:18;:16;:18::i;:::-;:30;;:33;111469:1;111438:33;;;;;;;;;;;;;;;111414:57;;111524:1;93519:6;111480:1;:7;;;;;;;;;;;;:40;:45;;;111476:69;;111534:11;111543:1;111534:8;:11::i;:::-;111527:18;;;;;111476:69;111598:1;93650:6;111557:1;:7;;;;;;;;;;;;:37;:42;;;;111550:49;;;111343:261;;;;:::o;111704:91::-;111758:32;111770:10;111782:7;111758:11;:32::i;:::-;111704:91;:::o;98123:67::-;98164:5;98183:2;98176:9;;98123:67;:::o;113636:110::-;113689:7;113710:18;:16;:18::i;:::-;:31;;;;;;;;;;;;113703:38;;113636:110;:::o;68051:391::-;68227:19;68221:4;68214:33;68265:8;68259:4;68252:22;68309:1;68302:4;68296;68286:21;68279:32;68424:8;68378:44;68375:1;68372;68367:66;68051:391::o;125673:91::-;70534:13;:11;:13::i;:::-;125749:10:::1;125737:9;:22;;;;125673:91:::0;:::o;98429:134::-;98492:7;98513:18;:16;:18::i;:::-;:30;;:37;98544:5;98513:37;;;;;;;;;;;;;;;:45;;;;;;;;;;;;98506:52;;;;98429:134;;;:::o;67218:93::-;70534:13;:11;:13::i;:::-;67285:21:::1;67303:1;67285:9;:21::i;:::-;67218:93::o:0;69545:157::-;69591:14;69681:11;69675:18;69665:28;;69545:157;:::o;125276:87::-;125324:13;125351:7;125344:14;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;125276:87;:::o;125371:294::-;125442:4;125464:14;125475:2;125464:10;:14::i;:::-;125459:158;;125528:9;;125518:6;125502:13;125512:2;125502:9;:13::i;:::-;:22;;;;:::i;:::-;:35;;125494:111;;;;;;;;;;;;:::i;:::-;;;;;;;;;125459:158;125634:26;125649:2;125653:6;125634:14;:26::i;:::-;125627:33;;125371:294;;;;:::o;125769:177::-;125834:20;125894:8;125904:27;125923:7;125904:18;:27::i;:::-;125877:63;;;;;;;;;:::i;:::-;;;;;;;;;;;;;125861:80;;125769:177;;;:::o;98655:142::-;98727:7;98748:18;:16;:18::i;:::-;:28;;:35;98777:5;98748:35;;;;;;;;;;;;;;;:44;98784:7;98748:44;;;;;;;;;;;;;;;;98741:51;;98655:142;;;;:::o;126235:96::-;70534:13;:11;:13::i;:::-;126280:46:::1;126315:10;126280:34;:46::i;:::-;126235:96::o:0;125954:276::-;70534:13;:11;:13::i;:::-;126070:6:::1;:13;126057:2;:9;:26;126049:61;;;;;;;;;;;;:::i;:::-;;;;;;;;;126126:9;126121:102;126145:2;:9;126141:1;:13;126121:102;;;126175:36;126185:7;:5;:7::i;:::-;126194:2;126197:1;126194:5;;;;;;;;:::i;:::-;;;;;;;;126201:6;126208:1;126201:9;;;;;;;;:::i;:::-;;;;;;;;126175;:36::i;:::-;126156:3;;;;;;;126121:102;;;;125954:276:::0;;:::o;68624:592::-;70534:13;:11;:13::i;:::-;68832:19:::1;68826:4;68819:33;68870:12;68864:4;68857:26;68924:4;68918;68908:21;69014:12;69008:19;68995:11;68992:36;68989:127;;;69049:10;69043:4;69036:24;69105:4;69099;69092:18;68989:127;69177:1;69163:12;69156:23;68766:418;69188:23;69198:12;69188:9;:23::i;:::-;68624:592:::0;:::o;66867:289::-;70534:13;:11;:13::i;:::-;67021:8:::1;67017:2;67013:17;67003:120;;67052:10;67046:4;67039:24;67112:4;67106;67099:18;67003:120;67132:19;67142:8;67132:9;:19::i;:::-;66867:289:::0;:::o;124763:24::-;;;;:::o;69802:356::-;69901:14;70024:19;70018:4;70011:33;70062:12;70056:4;70049:26;70143:4;70137;70127:21;70121:28;70111:38;;69802:356;;;:::o;114712:109::-;114772:4;114814:1;114790:26;;:12;114799:2;114790:8;:12::i;:::-;:26;;;;114783:33;;114712:109;;;:::o;114228:184::-;114289:7;114303:22;114328:18;:16;:18::i;:::-;114303:43;;114358:1;:16;;:49;114375:31;114380:1;:4;;114386:19;114402:2;114386:15;:19::i;:::-;114375:4;:31::i;:::-;114358:49;;;;;;;;;;;;;;;;;;;;;;;;;114351:56;;;114228:184;;;:::o;122966:90::-;123024:7;123050:1;123045;:6;;123038:13;;122966:90;;;:::o;123271:157::-;123345:13;123420:1;123414;123406:5;:9;123405:16;;123381:3;:7;;:19;123398:1;123389:5;:10;;123381:19;;;;;;;;;;;;:41;;123365:58;;123271:157;;;;:::o;112408:353::-;112467:21;112495:22;112520:18;:16;:18::i;:::-;112495:43;;112547:1;:13;;:16;112561:1;112547:16;;;;;;;;;;;;;;;112543:20;;112618:1;93519:6;112574:1;:7;;;;;;;;;;;;:40;:45;;;112570:187;;112627:11;93519:6;112627:44;;112681:11;112690:1;112681:8;:11::i;:::-;112677:53;;;93650:6;112694:36;;;;112677:53;112746:5;112736:1;:7;;;:15;;;;;;;;;;;;;;;;;;112621:136;112570:187;112490:271;112408:353;;;:::o;112915:394::-;113031:19;113059:22;113084:18;:16;:18::i;:::-;113059:43;;113122:13;:26;;;;;;;;;;;;113107:41;;113173:1;113157:12;:17;;;113153:152;;113199:1;:12;;;113197:14;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;113182:29;;113246:12;113217:13;:26;;;:41;;;;;;;;;;;;;;;;;;113297:2;113264:1;:16;;:30;113281:12;113264:30;;;;;;;;;;;;;;;;:35;;;;;;;;;;;;;;;;;;113153:152;113054:255;112915:394;;;;:::o;123490:458::-;123635:8;123629:4;123622:22;123669:5;123666:1;123662:13;123656:4;123649:27;123706:4;123700;123690:21;123760:1;123753:5;123749:13;123746:1;123742:21;123814:1;123808:8;123853:10;123929:5;123925:1;123922;123918:9;123914:21;123911:1;123907:29;123904:1;123900:37;123897:1;123893:45;123890:1;123883:56;123616:328;;;;123490:458;;;:::o;123096:113::-;123150:7;123198:1;123193;123188;:6;;123187:12;123180:19;;123096:113;;;:::o;105591:2659::-;105692:1;105678:16;;:2;:16;;;105674:52;;105703:23;;;;;;;;;;;;;;105674:52;105733:22;105758:18;:16;:18::i;:::-;105733:43;;105783:35;105821:18;105834:4;105821:12;:18::i;:::-;105783:56;;105844:33;105880:16;105893:2;105880:12;:16::i;:::-;105844:52;;105903:23;;:::i;:::-;105951:15;:27;;;;;;;;;;;;105931:47;;:1;:17;;:47;;;;;106001:13;:25;;;;;;;;;;;;105983:43;;:1;:15;;:43;;;;;106047:15;:23;;;;;;;;;;;;106031:39;;:1;:13;;:39;;;;;106090:1;:13;;;106081:6;:22;106077:56;;;106112:21;;;;;;;;;;;;;;106077:56;106173:6;106156:1;:13;;:23;;;;;;;;;;;106218:1;:13;;;106185:15;:23;;;:47;;;;;;;;;;;;;;;;;;106307:6;106283:13;:21;;;;;;;;;;;;:30;;;106269:1;:11;;:44;;;;106238:13;:21;;;:76;;;;;;;;;;;;;;;;;;106342:63;106356:1;:17;;;106398:6;93158:3;106375:1;:13;;;:20;:29;;;;;:::i;:::-;;;106342:13;:63::i;:::-;106322:1;:17;;:83;;;;;106470:1;93650:6;106417:13;:19;;;;;;;;;;;;:49;:54;;;106413:231;;106492:2;106484:10;;:4;:10;;;106480:71;;106534:1;:17;;;106514:1;:17;;;:37;106496:1;:15;;:55;;;;;106480:71;106578:59;106613:6;93158:3;106592:1;:11;;;:18;:27;;;;;:::i;:::-;;;106621:1;:15;;;106578:13;:59::i;:::-;106558:1;:17;;:79;;;;;106413:231;106651:29;106683:56;106721:1;:17;;;106701:1;:17;;;:37;106683:17;:56::i;:::-;106651:88;;106772:1;106751;:17;;;:22;106747:538;;106782:27;106812:1;:7;;:13;106820:4;106812:13;;;;;;;;;;;;;;;106782:43;;106832:17;106852:1;:17;;;106832:37;;106876:15;106906:1;:17;;;106894:9;:29;106876:47;;106957:1;:17;;;106930:1;:16;;;:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;107019:7;106982:15;:27;;;:45;;;;;;;;;;;;;;;;;;107053:226;107064:10;107077:28;107082:9;107093:11;;;;;;;107077:4;:28::i;:::-;107064:41;;;;107113:43;107141:1;:4;;107147:2;107151:1;107154;107113:27;:43::i;:::-;107171:1;:16;;:20;107188:2;107171:20;;;;;;;;;;;;107164:27;;;;;;;;;;;107199:42;107217:10;107229:4;107235:2;107239:1;107199:17;:42::i;:::-;107056:193;107270:7;107257:9;:20;107053:226;;106775:510;;;106747:538;107317:1;107296;:17;;;:22;107292:816;;107327:25;107355:1;:7;;:11;107363:2;107355:11;;;;;;;;;;;;;;;107327:39;;107373:15;107391:1;:15;;;107373:33;;107413:13;107439:1;:17;;;107429:7;:27;107413:43;;107463:14;107480:43;107505:13;107520:2;107480:24;:43::i;:::-;107463:60;;107530:16;107572:6;93158:3;107549:1;:13;;;;;;;;;;;;:20;;;:29;;;;;:::i;:::-;;;107530:48;;107585:10;107598:1;:13;;;;;;;;;;;;107585:26;;;;107645:1;:17;;;107618:1;:16;;;:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;107705:5;107670:13;:25;;;:41;;;;;;;;;;;;;;;;;;107737:332;107748:90;107790:1;107755:31;107760:1;:4;;107766:19;107782:2;107766:15;:19::i;:::-;107755:4;:31::i;:::-;:36;;;107748:90;;107813:8;107806:4;;;;;;:15;107802:27;;;107828:1;107823:6;;107802:27;107748:90;;;107845:34;107850:7;107859;107875:2;107845:4;:34::i;:::-;107887:65;107915:1;:4;;107921:2;107925:7;107941:9;;;;;;107887:27;:65::i;:::-;107960:40;107978:10;107990:2;107994;107998:1;107960:17;:40::i;:::-;108019:8;108012:4;;;;;;:15;108008:27;;;108034:1;108029:6;;108008:27;108062:5;108051:7;:16;107737:332;;108098:2;108075:1;:13;;;:26;;;;;;;;;;;;;;;;;;107320:788;;;;;;107292:816;108145:1;108119:10;:15;;;:22;:27;108115:90;;108155:43;108171:10;108183:1;:14;;;;;;;;;;;;108155:15;:43::i;:::-;108115:90;106140:2070;108234:2;108219:26;;108228:4;108219:26;;;108238:6;108219:26;;;;;;:::i;:::-;;;;;;;;105669:2581;;;;105591:2659;;;:::o;66412:103::-;66481:6;66501:9;66494:16;;66412:103;:::o;122069:187::-;122120:11;122213:1;122201:14;122191:24;;122069:187;;;:::o;111996:253::-;112062:21;112086:15;112099:1;112086:12;:15::i;:::-;112062:39;;112158:5;112110:53;;112152:1;93650:6;112111:1;:7;;;;;;;;;;;;:37;:42;;;;112110:53;;;112106:109;;93650:6;112171:1;:7;;;:38;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;112106:109;112235:1;112224:20;;;112238:5;112224:20;;;;;;:::i;:::-;;;;;;;;112057:192;111996:253;;:::o;65896:292::-;66082:11;66076:18;66066:8;66063:32;66053:126;;66117:10;66111:4;66104:24;66168:4;66162;66155:18;66053:126;65896:292::o;64971:870::-;65034:23;:21;:23::i;:::-;65030:807;;;65137:11;65215:8;65211:2;65207:17;65203:2;65199:26;65187:38;;65347:8;65335:9;65329:16;65289:38;65286:1;65283;65278:78;65438:8;65431:16;65426:3;65422:26;65412:8;65409:40;65398:9;65391:59;65113:343;65030:807;;;65545:11;65623:8;65619:2;65615:17;65611:2;65607:26;65595:38;;65755:8;65743:9;65737:16;65697:38;65694:1;65691;65686:78;65817:8;65806:9;65799:27;65521:311;65030:807;64971:870;:::o;99640:135::-;99710:4;99721:33;99731:10;99743:2;99747:6;99721:9;:33::i;:::-;99766:4;99759:11;;99640:135;;;;:::o;17699:1382::-;17755:17;18150:4;18143;18137:11;18133:22;18126:29;;18233:4;18228:3;18224:14;18218:4;18211:28;18298:1;18293:3;18286:14;18384:3;18407:1;18403:6;18592:5;18574:317;18600:1;18574:317;;;18628:1;18623:3;18619:11;18612:18;;18781:2;18775:4;18771:13;18767:2;18763:22;18758:3;18750:36;18851:2;18845:4;18841:13;18833:21;;18870:4;18574:317;18860:25;18574:317;18578:21;18921:3;18916;18912:13;19018:4;19013:3;19009:14;19002:21;;19065:6;19060:3;19053:19;17826:1251;;;17699:1382;;;:::o;3485:343::-;3725:4;3713:10;3707:4;3695:10;3680:13;3676:2;3669:5;3664:66;3654:165;;3752:10;3746:4;3739:24;3808:4;3802;3795:18;3654:165;3485:343;:::o;122758:174::-;122825:9;122920:1;122917;122913:9;122909:1;122906;122903:8;122899:24;122894:29;;122758:174;;;;:::o;120341:375::-;120401:20;;:::i;:::-;120510:4;120503;120497:11;120493:22;120577:1;120571:4;120564:15;120608:4;120602;120598:15;120650:1;120647;120643:9;120635:6;120631:22;120625:4;120618:36;120669:4;120666:1;120659:15;120700:6;120696:1;120690:4;120686:12;120679:28;120475:237;;120341:375;;;:::o;124015:588::-;124259:9;124247:10;124243:26;124230:10;124226:2;124222:19;124219:51;124288:8;124282:4;124275:22;124322:2;124319:1;124315:10;124309:4;124302:24;124356:4;124350;124340:21;124407:1;124403:2;124399:10;124396:1;124392:18;124461:1;124455:8;124500:18;124584:5;124580:1;124577;124573:9;124569:21;124566:1;124562:29;124559:1;124555:37;124552:1;124548:45;124545:1;124538:56;124200:399;;;;;124015:588;;;;:::o;120816:314::-;121014:1;121008:4;121004:12;120998:19;121068:7;121062:2;121059:1;121055:10;121051:1;121047:2;121043:10;121040:26;121037:39;121029:6;121022:55;121115:4;121107:6;121103:17;121099:1;121093:4;121089:12;121082:39;120978:148;120816:314;;;;:::o;121223:538::-;121370:1;121364:8;121396:4;121390;121386:15;121446:10;121443:1;121436:21;121512:4;121505;121502:1;121498:12;121491:26;121599:4;121593:11;121590:1;121586:19;121580:4;121576:30;121716:4;121713:1;121710;121703:4;121700:1;121696:12;121693:1;121685:6;121678:5;121673:48;121669:1;121665;121659:8;121656:15;121652:70;121642:110;;121741:4;121738:1;121731:15;121642:110;121346:411;;;121223:538;;:::o;63450:78::-;63514:10;63450:78;:::o;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;:::o;7:99:1:-;59:6;93:5;87:12;77:22;;7:99;;;:::o;112:169::-;196:11;230:6;225:3;218:19;270:4;265:3;261:14;246:29;;112:169;;;;:::o;287:246::-;368:1;378:113;392:6;389:1;386:13;378:113;;;477:1;472:3;468:11;462:18;458:1;453:3;449:11;442:39;414:2;411:1;407:10;402:15;;378:113;;;525:1;516:6;511:3;507:16;500:27;349:184;287:246;;;:::o;539:102::-;580:6;631:2;627:7;622:2;615:5;611:14;607:28;597:38;;539:102;;;:::o;647:377::-;735:3;763:39;796:5;763:39;:::i;:::-;818:71;882:6;877:3;818:71;:::i;:::-;811:78;;898:65;956:6;951:3;944:4;937:5;933:16;898:65;:::i;:::-;988:29;1010:6;988:29;:::i;:::-;983:3;979:39;972:46;;739:285;647:377;;;;:::o;1030:313::-;1143:4;1181:2;1170:9;1166:18;1158:26;;1230:9;1224:4;1220:20;1216:1;1205:9;1201:17;1194:47;1258:78;1331:4;1322:6;1258:78;:::i;:::-;1250:86;;1030:313;;;;:::o;1349:75::-;1382:6;1415:2;1409:9;1399:19;;1349:75;:::o;1430:117::-;1539:1;1536;1529:12;1553:117;1662:1;1659;1652:12;1676:126;1713:7;1753:42;1746:5;1742:54;1731:65;;1676:126;;;:::o;1808:96::-;1845:7;1874:24;1892:5;1874:24;:::i;:::-;1863:35;;1808:96;;;:::o;1910:122::-;1983:24;2001:5;1983:24;:::i;:::-;1976:5;1973:35;1963:63;;2022:1;2019;2012:12;1963:63;1910:122;:::o;2038:139::-;2084:5;2122:6;2109:20;2100:29;;2138:33;2165:5;2138:33;:::i;:::-;2038:139;;;;:::o;2183:77::-;2220:7;2249:5;2238:16;;2183:77;;;:::o;2266:122::-;2339:24;2357:5;2339:24;:::i;:::-;2332:5;2329:35;2319:63;;2378:1;2375;2368:12;2319:63;2266:122;:::o;2394:139::-;2440:5;2478:6;2465:20;2456:29;;2494:33;2521:5;2494:33;:::i;:::-;2394:139;;;;:::o;2539:474::-;2607:6;2615;2664:2;2652:9;2643:7;2639:23;2635:32;2632:119;;;2670:79;;:::i;:::-;2632:119;2790:1;2815:53;2860:7;2851:6;2840:9;2836:22;2815:53;:::i;:::-;2805:63;;2761:117;2917:2;2943:53;2988:7;2979:6;2968:9;2964:22;2943:53;:::i;:::-;2933:63;;2888:118;2539:474;;;;;:::o;3019:90::-;3053:7;3096:5;3089:13;3082:21;3071:32;;3019:90;;;:::o;3115:109::-;3196:21;3211:5;3196:21;:::i;:::-;3191:3;3184:34;3115:109;;:::o;3230:210::-;3317:4;3355:2;3344:9;3340:18;3332:26;;3368:65;3430:1;3419:9;3415:17;3406:6;3368:65;:::i;:::-;3230:210;;;;:::o;3446:118::-;3533:24;3551:5;3533:24;:::i;:::-;3528:3;3521:37;3446:118;;:::o;3570:222::-;3663:4;3701:2;3690:9;3686:18;3678:26;;3714:71;3782:1;3771:9;3767:17;3758:6;3714:71;:::i;:::-;3570:222;;;;:::o;3798:619::-;3875:6;3883;3891;3940:2;3928:9;3919:7;3915:23;3911:32;3908:119;;;3946:79;;:::i;:::-;3908:119;4066:1;4091:53;4136:7;4127:6;4116:9;4112:22;4091:53;:::i;:::-;4081:63;;4037:117;4193:2;4219:53;4264:7;4255:6;4244:9;4240:22;4219:53;:::i;:::-;4209:63;;4164:118;4321:2;4347:53;4392:7;4383:6;4372:9;4368:22;4347:53;:::i;:::-;4337:63;;4292:118;3798:619;;;;;:::o;4423:329::-;4482:6;4531:2;4519:9;4510:7;4506:23;4502:32;4499:119;;;4537:79;;:::i;:::-;4499:119;4657:1;4682:53;4727:7;4718:6;4707:9;4703:22;4682:53;:::i;:::-;4672:63;;4628:117;4423:329;;;;:::o;4758:116::-;4828:21;4843:5;4828:21;:::i;:::-;4821:5;4818:32;4808:60;;4864:1;4861;4854:12;4808:60;4758:116;:::o;4880:133::-;4923:5;4961:6;4948:20;4939:29;;4977:30;5001:5;4977:30;:::i;:::-;4880:133;;;;:::o;5019:323::-;5075:6;5124:2;5112:9;5103:7;5099:23;5095:32;5092:119;;;5130:79;;:::i;:::-;5092:119;5250:1;5275:50;5317:7;5308:6;5297:9;5293:22;5275:50;:::i;:::-;5265:60;;5221:114;5019:323;;;;:::o;5348:86::-;5383:7;5423:4;5416:5;5412:16;5401:27;;5348:86;;;:::o;5440:112::-;5523:22;5539:5;5523:22;:::i;:::-;5518:3;5511:35;5440:112;;:::o;5558:214::-;5647:4;5685:2;5674:9;5670:18;5662:26;;5698:67;5762:1;5751:9;5747:17;5738:6;5698:67;:::i;:::-;5558:214;;;;:::o;5778:118::-;5865:24;5883:5;5865:24;:::i;:::-;5860:3;5853:37;5778:118;;:::o;5902:222::-;5995:4;6033:2;6022:9;6018:18;6010:26;;6046:71;6114:1;6103:9;6099:17;6090:6;6046:71;:::i;:::-;5902:222;;;;:::o;6130:329::-;6189:6;6238:2;6226:9;6217:7;6213:23;6209:32;6206:119;;;6244:79;;:::i;:::-;6206:119;6364:1;6389:53;6434:7;6425:6;6414:9;6410:22;6389:53;:::i;:::-;6379:63;;6335:117;6130:329;;;;:::o;6465:474::-;6533:6;6541;6590:2;6578:9;6569:7;6565:23;6561:32;6558:119;;;6596:79;;:::i;:::-;6558:119;6716:1;6741:53;6786:7;6777:6;6766:9;6762:22;6741:53;:::i;:::-;6731:63;;6687:117;6843:2;6869:53;6914:7;6905:6;6894:9;6890:22;6869:53;:::i;:::-;6859:63;;6814:118;6465:474;;;;;:::o;6945:117::-;7054:1;7051;7044:12;7068:180;7116:77;7113:1;7106:88;7213:4;7210:1;7203:15;7237:4;7234:1;7227:15;7254:281;7337:27;7359:4;7337:27;:::i;:::-;7329:6;7325:40;7467:6;7455:10;7452:22;7431:18;7419:10;7416:34;7413:62;7410:88;;;7478:18;;:::i;:::-;7410:88;7518:10;7514:2;7507:22;7297:238;7254:281;;:::o;7541:129::-;7575:6;7602:20;;:::i;:::-;7592:30;;7631:33;7659:4;7651:6;7631:33;:::i;:::-;7541:129;;;:::o;7676:311::-;7753:4;7843:18;7835:6;7832:30;7829:56;;;7865:18;;:::i;:::-;7829:56;7915:4;7907:6;7903:17;7895:25;;7975:4;7969;7965:15;7957:23;;7676:311;;;:::o;7993:117::-;8102:1;8099;8092:12;8133:710;8229:5;8254:81;8270:64;8327:6;8270:64;:::i;:::-;8254:81;:::i;:::-;8245:90;;8355:5;8384:6;8377:5;8370:21;8418:4;8411:5;8407:16;8400:23;;8471:4;8463:6;8459:17;8451:6;8447:30;8500:3;8492:6;8489:15;8486:122;;;8519:79;;:::i;:::-;8486:122;8634:6;8617:220;8651:6;8646:3;8643:15;8617:220;;;8726:3;8755:37;8788:3;8776:10;8755:37;:::i;:::-;8750:3;8743:50;8822:4;8817:3;8813:14;8806:21;;8693:144;8677:4;8672:3;8668:14;8661:21;;8617:220;;;8621:21;8235:608;;8133:710;;;;;:::o;8866:370::-;8937:5;8986:3;8979:4;8971:6;8967:17;8963:27;8953:122;;8994:79;;:::i;:::-;8953:122;9111:6;9098:20;9136:94;9226:3;9218:6;9211:4;9203:6;9199:17;9136:94;:::i;:::-;9127:103;;8943:293;8866:370;;;;:::o;9242:311::-;9319:4;9409:18;9401:6;9398:30;9395:56;;;9431:18;;:::i;:::-;9395:56;9481:4;9473:6;9469:17;9461:25;;9541:4;9535;9531:15;9523:23;;9242:311;;;:::o;9576:710::-;9672:5;9697:81;9713:64;9770:6;9713:64;:::i;:::-;9697:81;:::i;:::-;9688:90;;9798:5;9827:6;9820:5;9813:21;9861:4;9854:5;9850:16;9843:23;;9914:4;9906:6;9902:17;9894:6;9890:30;9943:3;9935:6;9932:15;9929:122;;;9962:79;;:::i;:::-;9929:122;10077:6;10060:220;10094:6;10089:3;10086:15;10060:220;;;10169:3;10198:37;10231:3;10219:10;10198:37;:::i;:::-;10193:3;10186:50;10265:4;10260:3;10256:14;10249:21;;10136:144;10120:4;10115:3;10111:14;10104:21;;10060:220;;;10064:21;9678:608;;9576:710;;;;;:::o;10309:370::-;10380:5;10429:3;10422:4;10414:6;10410:17;10406:27;10396:122;;10437:79;;:::i;:::-;10396:122;10554:6;10541:20;10579:94;10669:3;10661:6;10654:4;10646:6;10642:17;10579:94;:::i;:::-;10570:103;;10386:293;10309:370;;;;:::o;10685:894::-;10803:6;10811;10860:2;10848:9;10839:7;10835:23;10831:32;10828:119;;;10866:79;;:::i;:::-;10828:119;11014:1;11003:9;10999:17;10986:31;11044:18;11036:6;11033:30;11030:117;;;11066:79;;:::i;:::-;11030:117;11171:78;11241:7;11232:6;11221:9;11217:22;11171:78;:::i;:::-;11161:88;;10957:302;11326:2;11315:9;11311:18;11298:32;11357:18;11349:6;11346:30;11343:117;;;11379:79;;:::i;:::-;11343:117;11484:78;11554:7;11545:6;11534:9;11530:22;11484:78;:::i;:::-;11474:88;;11269:303;10685:894;;;;;:::o;11585:109::-;11621:7;11661:26;11654:5;11650:38;11639:49;;11585:109;;;:::o;11700:180::-;11748:77;11745:1;11738:88;11845:4;11842:1;11835:15;11869:4;11866:1;11859:15;11886:216;11925:4;11945:19;11962:1;11945:19;:::i;:::-;11940:24;;11978:19;11995:1;11978:19;:::i;:::-;11973:24;;12021:1;12018;12014:9;12006:17;;12045:26;12039:4;12036:36;12033:62;;;12075:18;;:::i;:::-;12033:62;11886:216;;;;:::o;12108:85::-;12153:7;12182:5;12171:16;;12108:85;;;:::o;12199:60::-;12227:3;12248:5;12241:12;;12199:60;;;:::o;12265:158::-;12323:9;12356:61;12374:42;12383:32;12409:5;12383:32;:::i;:::-;12374:42;:::i;:::-;12356:61;:::i;:::-;12343:74;;12265:158;;;:::o;12429:147::-;12524:45;12563:5;12524:45;:::i;:::-;12519:3;12512:58;12429:147;;:::o;12582:238::-;12683:4;12721:2;12710:9;12706:18;12698:26;;12734:79;12810:1;12799:9;12795:17;12786:6;12734:79;:::i;:::-;12582:238;;;;:::o;12826:180::-;12874:77;12871:1;12864:88;12971:4;12968:1;12961:15;12995:4;12992:1;12985:15;13012:320;13056:6;13093:1;13087:4;13083:12;13073:22;;13140:1;13134:4;13130:12;13161:18;13151:81;;13217:4;13209:6;13205:17;13195:27;;13151:81;13279:2;13271:6;13268:14;13248:18;13245:38;13242:84;;13298:18;;:::i;:::-;13242:84;13063:269;13012:320;;;:::o;13338:191::-;13378:3;13397:20;13415:1;13397:20;:::i;:::-;13392:25;;13431:20;13449:1;13431:20;:::i;:::-;13426:25;;13474:1;13471;13467:9;13460:16;;13495:3;13492:1;13489:10;13486:36;;;13502:18;;:::i;:::-;13486:36;13338:191;;;;:::o;13535:250::-;13675:34;13671:1;13663:6;13659:14;13652:58;13744:33;13739:2;13731:6;13727:15;13720:58;13535:250;:::o;13791:366::-;13933:3;13954:67;14018:2;14013:3;13954:67;:::i;:::-;13947:74;;14030:93;14119:3;14030:93;:::i;:::-;14148:2;14143:3;14139:12;14132:19;;13791:366;;;:::o;14163:419::-;14329:4;14367:2;14356:9;14352:18;14344:26;;14416:9;14410:4;14406:20;14402:1;14391:9;14387:17;14380:47;14444:131;14570:4;14444:131;:::i;:::-;14436:139;;14163:419;;;:::o;14588:148::-;14690:11;14727:3;14712:18;;14588:148;;;;:::o;14742:141::-;14791:4;14814:3;14806:11;;14837:3;14834:1;14827:14;14871:4;14868:1;14858:18;14850:26;;14742:141;;;:::o;14913:874::-;15016:3;15053:5;15047:12;15082:36;15108:9;15082:36;:::i;:::-;15134:89;15216:6;15211:3;15134:89;:::i;:::-;15127:96;;15254:1;15243:9;15239:17;15270:1;15265:166;;;;15445:1;15440:341;;;;15232:549;;15265:166;15349:4;15345:9;15334;15330:25;15325:3;15318:38;15411:6;15404:14;15397:22;15389:6;15385:35;15380:3;15376:45;15369:52;;15265:166;;15440:341;15507:38;15539:5;15507:38;:::i;:::-;15567:1;15581:154;15595:6;15592:1;15589:13;15581:154;;;15669:7;15663:14;15659:1;15654:3;15650:11;15643:35;15719:1;15710:7;15706:15;15695:26;;15617:4;15614:1;15610:12;15605:17;;15581:154;;;15764:6;15759:3;15755:16;15748:23;;15447:334;;15232:549;;15020:767;;14913:874;;;;:::o;15793:390::-;15899:3;15927:39;15960:5;15927:39;:::i;:::-;15982:89;16064:6;16059:3;15982:89;:::i;:::-;15975:96;;16080:65;16138:6;16133:3;16126:4;16119:5;16115:16;16080:65;:::i;:::-;16170:6;16165:3;16161:16;16154:23;;15903:280;15793:390;;;;:::o;16189:155::-;16329:7;16325:1;16317:6;16313:14;16306:31;16189:155;:::o;16350:400::-;16510:3;16531:84;16613:1;16608:3;16531:84;:::i;:::-;16524:91;;16624:93;16713:3;16624:93;:::i;:::-;16742:1;16737:3;16733:11;16726:18;;16350:400;;;:::o;16756:695::-;17034:3;17056:92;17144:3;17135:6;17056:92;:::i;:::-;17049:99;;17165:95;17256:3;17247:6;17165:95;:::i;:::-;17158:102;;17277:148;17421:3;17277:148;:::i;:::-;17270:155;;17442:3;17435:10;;16756:695;;;;;:::o;17457:172::-;17597:24;17593:1;17585:6;17581:14;17574:48;17457:172;:::o;17635:366::-;17777:3;17798:67;17862:2;17857:3;17798:67;:::i;:::-;17791:74;;17874:93;17963:3;17874:93;:::i;:::-;17992:2;17987:3;17983:12;17976:19;;17635:366;;;:::o;18007:419::-;18173:4;18211:2;18200:9;18196:18;18188:26;;18260:9;18254:4;18250:20;18246:1;18235:9;18231:17;18224:47;18288:131;18414:4;18288:131;:::i;:::-;18280:139;;18007:419;;;:::o;18432:180::-;18480:77;18477:1;18470:88;18577:4;18574:1;18567:15;18601:4;18598:1;18591:15;18618:93;18654:7;18694:10;18687:5;18683:22;18672:33;;18618:93;;;:::o;18717:175::-;18755:3;18778:23;18795:5;18778:23;:::i;:::-;18769:32;;18823:10;18816:5;18813:21;18810:47;;18837:18;;:::i;:::-;18810:47;18884:1;18877:5;18873:13;18866:20;;18717:175;;;:::o;18898:180::-;18946:77;18943:1;18936:88;19043:4;19040:1;19033:15;19067:4;19064:1;19057:15
Swarm Source
ipfs://0b6c572b3c6cb899904046e2ff2811def52575269dc4d8926a7744fb2e541563
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.