Feature Tip: Add private address tag to any address under My Name Tag !
ERC-20
Overview
Max Total Supply
5,000 No Handle 404
Holders
38
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 18 Decimals)
Balance
21.243258303727704825 No Handle 404Value
$0.00Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
NoHandle
Compiler Version
v0.8.18+commit.87f61d96
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2024-02-15 */ // Twitter: https://twitter.com/huaxi_coin // Discord: https://discord.gg/nohandle // Dev: https://twitter.com/sshb3n /* ....... .+@% :*%=@@@@@@@ .+@@: :*@@@@ -#%#=@@@@@@@ .+@@@@: :*@@+=@@. #%%@%@@@@@@@ :*@@*-@@: .*@%= :@@ %#-+=@@+=-+@ *@%= @@. -@@*+++#@@++: #%#@#@@#%%#@ .@@#+***@@#*- .******#@@#*: #@%++*+#+#@@ ++*****@@**- :@@ %@###*%@@#@@ @@. :%# *%%%%%%%%%%# .##. :--.:-::----. -::::: *. +-:::-.--::::*: -=:.-=:-+---. .-.--:: - - ::--:--.:-:-. */ pragma solidity ^0.8.4; /// @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/9deb9ed36a27261a8745db5b7cd7f4cdc3b1cd4e/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/9deb9ed36a27261a8745db5b7cd7f4cdc3b1cd4e/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 { /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* EVENTS */ /*-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»*/ /// @dev Emitted when token `id` is transferred from `from` to `to`. event Transfer(address indexed from, address indexed to, uint256 indexed id); /// @dev Emitted when `owner` enables `account` to manage the `id` token. event Approval(address indexed owner, address indexed account, uint256 indexed id); /// @dev Emitted when `owner` enables or disables `operator` to manage all of their tokens. event ApprovalForAll(address indexed owner, address indexed operator, bool isApproved); /// @dev The ownership is transferred from `oldOwner` to `newOwner`. /// This is for marketplace signaling purposes. This contract has a `pullOwner()` /// function that will sync the owner from the base contract. event OwnershipTransferred(address indexed oldOwner, address indexed newOwner); /// @dev `keccak256(bytes("Transfer(address,address,uint256)"))`. uint256 private constant _TRANSFER_EVENT_SIGNATURE = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef; /// @dev `keccak256(bytes("Approval(address,address,uint256)"))`. uint256 private constant _APPROVAL_EVENT_SIGNATURE = 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925; /// @dev `keccak256(bytes("ApprovalForAll(address,address,bool)"))`. uint256 private constant _APPROVAL_FOR_ALL_EVENT_SIGNATURE = 0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31; /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* CUSTOM ERRORS */ /*-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»*/ /// @dev Thrown when a call for an NFT function did not originate /// from the base DN404 contract. error SenderNotBase(); /// @dev Thrown when a call for an NFT function did not originate from the deployer. error SenderNotDeployer(); /// @dev Thrown when transferring an NFT to a contract address that /// does not implement ERC721Receiver. error TransferToNonERC721ReceiverImplementer(); /// @dev Thrown when linking to the DN404 base contract and the /// DN404 supportsInterface check fails or the call reverts. error CannotLink(); /// @dev Thrown when a linkMirrorContract call is received and the /// NFT mirror contract has already been linked to a DN404 base contract. error AlreadyLinked(); /// @dev Thrown when retrieving the base DN404 address when a link has not /// been established. error NotLinked(); /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* STORAGE */ /*-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»*/ /// @dev Struct contain the NFT mirror contract storage. struct DN404NFTStorage { address baseERC20; address deployer; address owner; } /// @dev Returns a storage pointer for DN404NFTStorage. function _getDN404NFTStorage() internal pure virtual returns (DN404NFTStorage storage $) { /// @solidity memory-safe-assembly assembly { // `uint72(bytes9(keccak256("DN404_MIRROR_STORAGE")))`. $.slot := 0x3602298b8c10b01230 // Truncate to 9 bytes to reduce bytecode size. } } /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* CONSTRUCTOR */ /*-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»*/ constructor(address deployer) { // For non-proxies, we will store the deployer so that only the deployer can // link the base contract. _getDN404NFTStorage().deployer = deployer; } /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* ERC721 OPERATIONS */ /*-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»*/ /// @dev Returns the token collection name from the base DN404 contract. function name() public view virtual returns (string memory result) { return _readString(0x06fdde03, 0); // `symbol()`. } /// @dev Returns the token collection symbol from the base DN404 contract. function symbol() public view virtual returns (string memory result) { return _readString(0x95d89b41, 0); // `symbol()`. } /// @dev Returns the Uniform Resource Identifier (URI) for token `id` from /// the base DN404 contract. function tokenURI(uint256 id) public view virtual returns (string memory result) { return _readString(0xc87b56dd, id); // `tokenURI()`. } /// @dev Returns the total NFT supply from the base DN404 contract. function totalSupply() public view virtual returns (uint256 result) { return _readWord(0xe2c79281, 0, 0); // `totalNFTSupply()`. } /// @dev Returns the number of NFT tokens owned by `nftOwner` from the base DN404 contract. /// /// Requirements: /// - `nftOwner` must not be the zero address. function balanceOf(address nftOwner) public view virtual returns (uint256 result) { return _readWord(0xf5b100ea, uint160(nftOwner), 0); // `balanceOfNFT(address)`. } /// @dev Returns the owner of token `id` from the base DN404 contract. /// /// Requirements: /// - Token `id` must exist. function ownerOf(uint256 id) public view virtual returns (address result) { return address(uint160(_readWord(0x6352211e, id, 0))); // `ownerOf(uint256)`. } /// @dev Sets `spender` as the approved account to manage token `id` in /// the base DN404 contract. /// /// Requirements: /// - Token `id` must exist. /// - The caller must be the owner of the token, /// or an approved operator for the token owner. /// /// Emits an {Approval} event. function approve(address spender, uint256 id) public 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) { return address(uint160(_readWord(0x081812fc, id, 0))); // `getApproved(uint256)`. } /// @dev Sets whether `operator` is approved to manage the tokens of the caller in /// the base DN404 contract. /// /// Emits an {ApprovalForAll} event. function setApprovalForAll(address operator, bool approved) public virtual { address base = baseERC20(); /// @solidity memory-safe-assembly assembly { operator := shr(96, shl(96, operator)) let m := mload(0x40) mstore(0x00, 0x813500fc) // `setApprovalForAll(address,bool,address)`. mstore(0x20, operator) mstore(0x40, iszero(iszero(approved))) mstore(0x60, caller()) if iszero( and(eq(mload(0x00), 1), call(gas(), base, callvalue(), 0x1c, 0x64, 0x00, 0x20)) ) { returndatacopy(m, 0x00, returndatasize()) revert(m, returndatasize()) } // Emit the {ApprovalForAll} event. // The `approved` value is already at 0x40. log3(0x40, 0x20, _APPROVAL_FOR_ALL_EVENT_SIGNATURE, caller(), operator) mstore(0x40, m) // Restore the free memory pointer. mstore(0x60, 0) // Restore the zero pointer. } } /// @dev Returns whether `operator` is approved to manage the tokens of `nftOwner` from /// the base DN404 contract. function isApprovedForAll(address nftOwner, address operator) public view virtual returns (bool result) { // `isApprovedForAll(address,address)`. return _readWord(0xe985e9c5, uint160(nftOwner), uint160(operator)) != 0; } /// @dev Transfers token `id` from `from` to `to`. /// /// Requirements: /// /// - Token `id` must exist. /// - `from` must be the owner of the token. /// - `to` cannot be the zero address. /// - The caller must be the owner of the token, or be approved to manage the token. /// /// Emits a {Transfer} event. function transferFrom(address from, address to, uint256 id) public 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)) } } /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* OWNER SYNCING OPERATIONS */ /*-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»*/ /// @dev Returns the `owner` of the contract, for marketplace signaling purposes. function owner() public view virtual returns (address) { return _getDN404NFTStorage().owner; } /// @dev Permissionless function to pull the owner from the base DN404 contract /// if it implements ownable, for marketplace signaling purposes. function pullOwner() public virtual { address newOwner; address base = baseERC20(); /// @solidity memory-safe-assembly assembly { mstore(0x00, 0x8da5cb5b) // `owner()`. if and(gt(returndatasize(), 0x1f), staticcall(gas(), base, 0x1c, 0x04, 0x00, 0x20)) { newOwner := shr(96, mload(0x0c)) } } DN404NFTStorage storage $ = _getDN404NFTStorage(); address oldOwner = $.owner; if (oldOwner != newOwner) { $.owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } } /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* 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 Helper to read a string from the base DN404 contract. function _readString(uint256 fnSelector, uint256 arg0) private view returns (string memory result) { address base = baseERC20(); /// @solidity memory-safe-assembly assembly { result := mload(0x40) mstore(0x00, fnSelector) mstore(0x20, arg0) if iszero(staticcall(gas(), base, 0x1c, 0x24, 0x00, 0x00)) { returndatacopy(result, 0x00, returndatasize()) revert(result, returndatasize()) } returndatacopy(0x00, 0x00, 0x20) // Copy the offset of the string in returndata. returndatacopy(result, mload(0x00), 0x20) // Copy the length of the string. returndatacopy(add(result, 0x20), add(mload(0x00), 0x20), mload(result)) // Copy the string. mstore(0x40, add(add(result, 0x20), mload(result))) // Allocate memory. } } /// @dev Helper to read a word from the base DN404 contract. function _readWord(uint256 fnSelector, uint256 arg0, uint256 arg1) private view returns (uint256 result) { address base = baseERC20(); /// @solidity memory-safe-assembly assembly { let m := mload(0x40) mstore(0x00, fnSelector) mstore(0x20, arg0) mstore(0x40, arg1) if iszero( and(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 := mload(0x00) } } /// @dev Returns the calldata value at `offset`. function _calldataload(uint256 offset) private pure returns (uint256 value) { /// @solidity memory-safe-assembly assembly { value := calldataload(offset) } } /// @dev Returns if `a` has bytecode of non-zero length. function _hasCode(address a) private view returns (bool result) { /// @solidity memory-safe-assembly assembly { result := extcodesize(a) // Can handle dirty upper bits. } } /// @dev Perform a call to invoke {IERC721Receiver-onERC721Received} on `to`. /// Reverts if the target does not support the function correctly. function _checkOnERC721Received(address from, address to, uint256 id, bytes memory data) private { /// @solidity memory-safe-assembly assembly { // Prepare the calldata. let m := mload(0x40) let onERC721ReceivedSelector := 0x150b7a02 mstore(m, onERC721ReceivedSelector) mstore(add(m, 0x20), caller()) // The `operator`, which is always `msg.sender`. mstore(add(m, 0x40), shr(96, shl(96, from))) mstore(add(m, 0x60), id) mstore(add(m, 0x80), 0x80) let n := mload(data) mstore(add(m, 0xa0), n) if n { pop(staticcall(gas(), 4, add(data, 0x20), n, add(m, 0xc0), n)) } // Revert if the call reverts. if iszero(call(gas(), to, 0, add(m, 0x1c), add(n, 0xa4), m, 0x20)) { if returndatasize() { // Bubble up the revert if the call reverts. returndatacopy(m, 0x00, returndatasize()) revert(m, returndatasize()) } } // Load the returndata and compare it. if iszero(eq(mload(m), shl(224, onERC721ReceivedSelector))) { mstore(0x00, 0xd1a57ed6) // `TransferToNonERC721ReceiverImplementer()`. revert(0x1c, 0x04) } } } } // 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); /// @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; /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* 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 = 10 ** 18; /// @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 A struct to wrap a uint256 in storage. struct Uint256Ref { uint256 value; } /// @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 => Uint256Ref)) 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(); /// @solidity memory-safe-assembly assembly { // Make the call to link the mirror contract. mstore(0x00, 0x0f4599e5) // `linkMirrorContract(address)`. mstore(0x20, caller()) if iszero(and(eq(mload(0x00), 1), call(gas(), mirror, 0, 0x1c, 0x24, 0x00, 0x20))) { mstore(0x00, 0xd125259c) // `LinkMirrorContractFailed()`. revert(0x1c, 0x04) } } $.nextTokenId = 1; $.mirrorERC721 = mirror; if (initialTokenSupply != 0) { if (initialSupplyOwner == address(0)) revert TransferToZeroAddress(); if (initialTokenSupply > _MAX_SUPPLY) revert TotalSupplyOverflow(); $.totalSupply = uint96(initialTokenSupply); AddressData storage initialOwnerAddressData = _addressData(initialSupplyOwner); initialOwnerAddressData.balance = uint96(initialTokenSupply); /// @solidity memory-safe-assembly assembly { // Emit the {Transfer} event. mstore(0x00, initialTokenSupply) log3(0x00, 0x20, _TRANSFER_EVENT_SIGNATURE, 0, shr(96, shl(96, initialSupplyOwner))) } _setSkipNFT(initialSupplyOwner, true); } } /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* 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].value; } /// @dev Sets `amount` as the allowance of `spender` over the caller's tokens. /// /// Emits a {Approval} event. function approve(address spender, uint256 amount) public virtual returns (bool) { _approve(msg.sender, spender, amount); return true; } /// @dev Transfer `amount` tokens from the caller to `to`. /// /// Will burn sender NFTs if balance after transfer is less than /// the amount required to support the current NFT balance. /// /// Will mint NFTs to `to` if the recipient's new balance supports /// additional NFTs ***AND*** the `to` address's skipNFT flag is /// set to false. /// /// Requirements: /// - `from` must at least have `amount`. /// /// Emits a {Transfer} event. function transfer(address to, uint256 amount) public virtual returns (bool) { _transfer(msg.sender, to, amount); return true; } /// @dev Transfers `amount` tokens from `from` to `to`. /// /// Note: Does not update the allowance if it is the maximum uint256 value. /// /// Will burn sender NFTs if balance after transfer is less than /// the amount required to support the current NFT balance. /// /// Will mint NFTs to `to` if the recipient's new balance supports /// additional NFTs ***AND*** the `to` address's skipNFT flag is /// set to false. /// /// Requirements: /// - `from` must at least have `amount`. /// - The caller must have at least `amount` of allowance to transfer the tokens of `from`. /// /// Emits a {Transfer} event. function transferFrom(address from, address to, uint256 amount) public virtual returns (bool) { Uint256Ref storage a = _getDN404Storage().allowance[from][msg.sender]; uint256 allowed = a.value; if (allowed != type(uint256).max) { if (amount > allowed) revert InsufficientAllowance(); unchecked { a.value = 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 (_toUint(amount > _MAX_SUPPLY) | _toUint(currentTokenSupply > _MAX_SUPPLY) != 0) { 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; _PackedLogs memory packedLogs = _packedLogsMalloc(_zeroFloorSub(toEnd, toIndex)); Uint32Map storage oo = $.oo; if (packedLogs.logs.length != 0) { uint256 maxNFTId = currentTokenSupply / _WAD; 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); } } } /// @solidity memory-safe-assembly assembly { // Emit the {Transfer} event. mstore(0x00, amount) log3(0x00, 0x20, _TRANSFER_EVENT_SIGNATURE, 0, shr(96, shl(96, to))) } } /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* INTERNAL BURN FUNCTIONS */ /*-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»*/ /// @dev Burns `amount` tokens from `from`, reducing the total supply. /// /// Will burn sender NFTs if balance after transfer is less than /// the amount required to support the current NFT balance. /// /// Emits a {Transfer} event. function _burn(address from, uint256 amount) internal virtual { 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); if (nftAmountToBurn != 0) { $.totalNFTSupply -= uint32(nftAmountToBurn); _PackedLogs memory packedLogs = _packedLogsMalloc(nftAmountToBurn); Uint32Map storage oo = $.oo; 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); } } /// @solidity memory-safe-assembly assembly { // Emit the {Transfer} event. mstore(0x00, amount) log3(0x00, 0x20, _TRANSFER_EVENT_SIGNATURE, shr(96, shl(96, from)), 0) } } /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* INTERNAL TRANSFER FUNCTIONS */ /*-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»*/ /// @dev Moves `amount` of tokens from `from` to `to`. /// /// Will burn sender NFTs if balance after transfer is less than /// the amount required to support the current NFT balance. /// /// Will mint NFTs to `to` if the recipient's new balance supports /// additional NFTs ***AND*** the `to` address's skipNFT flag is /// set to false. /// /// Emits a {Transfer} event. function _transfer(address from, address to, uint256 amount) internal virtual { if (to == address(0)) revert TransferToZeroAddress(); 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); if (toAddressData.flags & _ADDRESS_DATA_SKIP_NFT_FLAG == 0) { if (from == to) t.toOwnedLength = t.fromOwnedLength - t.nftAmountToBurn; t.nftAmountToMint = _zeroFloorSub(t.toBalance / _WAD, t.toOwnedLength); } _PackedLogs memory packedLogs = _packedLogsMalloc(t.nftAmountToBurn + t.nftAmountToMint); Uint32Map storage oo = $.oo; 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; 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); } } /// @solidity memory-safe-assembly assembly { // Emit the {Transfer} event. mstore(0x00, amount) // forgefmt: disable-next-item log3(0x00, 0x20, _TRANSFER_EVENT_SIGNATURE, shr(96, shl(96, from)), shr(96, shl(96, to))) } } /// @dev Transfers token `id` from `from` to `to`. /// /// Requirements: /// /// - Call must originate from the mirror contract. /// - Token `id` must exist. /// - `from` must be the owner of the token. /// - `to` cannot be the zero address. /// `msgSender` must be the owner of the token, or be approved to manage the token. /// /// Emits a {Transfer} event. function _transferFromNFT(address from, address to, uint256 id, address msgSender) internal virtual { DN404Storage storage $ = _getDN404Storage(); if (to == address(0)) revert TransferToZeroAddress(); Uint32Map storage oo = $.oo; if (from != $.aliasToAddress[_get(oo, _ownershipIndex(id))]) { 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(_WAD); unchecked { toAddressData.balance += uint96(_WAD); mapping(address => Uint32Map) storage owned = $.owned; Uint32Map storage fromOwned = owned[from]; _set(oo, _ownershipIndex(id), _registerAndResolveAlias(toAddressData, to)); delete $.tokenApprovals[id]; uint256 updatedId = _get(fromOwned, --fromAddressData.ownedLength); _set(fromOwned, _get(oo, _ownedIndex(id)), uint32(updatedId)); _set(oo, _ownedIndex(updatedId), _get(oo, _ownedIndex(id))); uint256 n = toAddressData.ownedLength++; _set(owned[to], n, uint32(id)); _set(oo, _ownedIndex(id), uint32(n)); } /// @solidity memory-safe-assembly assembly { // Emit the {Transfer} event. mstore(0x00, _WAD) // forgefmt: disable-next-item log3(0x00, 0x20, _TRANSFER_EVENT_SIGNATURE, shr(96, shl(96, from)), shr(96, shl(96, to))) } } /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* INTERNAL APPROVE FUNCTIONS */ /*-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»*/ /// @dev Sets `amount` as the allowance of `spender` over the tokens of `owner`. /// /// Emits a {Approval} event. function _approve(address owner, address spender, uint256 amount) internal virtual { _getDN404Storage().allowance[owner][spender].value = amount; /// @solidity memory-safe-assembly assembly { // Emit the {Approval} event. mstore(0x00, amount) // forgefmt: disable-next-item log3(0x00, 0x20, _APPROVAL_EVENT_SIGNATURE, shr(96, shl(96, owner)), shr(96, shl(96, spender))) } } /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* DATA HITCHHIKING FUNCTIONS */ /*-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»*/ /// @dev Returns the auxiliary data for `owner`. /// Minting, transferring, burning the tokens of `owner` will not change the auxiliary data. /// Auxiliary data can be set for any address, even if it does not have any tokens. function _getAux(address owner) internal view virtual returns (uint88) { return _getDN404Storage().addressData[owner].aux; } /// @dev Set the auxiliary data for `owner` to `value`. /// Minting, transferring, burning the tokens of `owner` will not change the auxiliary data. /// Auxiliary data can be set for any address, even if it does not have any tokens. function _setAux(address owner, uint88 value) internal virtual { _getDN404Storage().addressData[owner].aux = value; } /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* SKIP NFT FUNCTIONS */ /*-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»*/ /// @dev Returns true if account `owner` will skip NFT minting on token mints and transfers. /// Returns false if account `owner` will mint NFTs on token mints and transfers. function getSkipNFT(address owner) public view virtual returns (bool) { AddressData storage d = _getDN404Storage().addressData[owner]; if (d.flags & _ADDRESS_DATA_INITIALIZED_FLAG == 0) return _hasCode(owner); return d.flags & _ADDRESS_DATA_SKIP_NFT_FLAG != 0; } /// @dev Sets the caller's skipNFT flag to `skipNFT` /// /// Emits a {SkipNFTSet} event. function setSkipNFT(bool skipNFT) public virtual { _setSkipNFT(msg.sender, skipNFT); } /// @dev Internal function to set account `owner` skipNFT flag to `state` /// /// Initializes account `owner` AddressData if it is not currently initialized. /// /// Emits a {SkipNFTSet} event. function _setSkipNFT(address owner, bool state) internal virtual { AddressData storage d = _addressData(owner); if ((d.flags & _ADDRESS_DATA_SKIP_NFT_FLAG != 0) != state) { d.flags ^= _ADDRESS_DATA_SKIP_NFT_FLAG; } emit SkipNFTSet(owner, state); } /// @dev Returns a storage data pointer for account `owner` AddressData /// /// Initializes account `owner` AddressData if it is not currently initialized. function _addressData(address owner) internal virtual returns (AddressData storage d) { d = _getDN404Storage().addressData[owner]; if (d.flags & _ADDRESS_DATA_INITIALIZED_FLAG == 0) { uint8 flags = _ADDRESS_DATA_INITIALIZED_FLAG; if (_hasCode(owner)) 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 owner) { DN404Storage storage $ = _getDN404Storage(); owner = $.aliasToAddress[_get($.oo, _ownershipIndex(id))]; if (msgSender != owner) { if (!$.operatorApprovals[owner][msgSender]) { revert ApprovalCallerNotOwnerNorApproved(); } } $.tokenApprovals[id] = spender; } /// @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 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; // `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); } // `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(_toUint($.operatorApprovals[owner][operator])); } // `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))); } // `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 offset; uint256[] logs; } /// @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 { // Note that `p` implicitly allocates and advances the free memory pointer by // 2 words, which we can safely mutate in `_packedLogsSend`. let logs := mload(0x40) mstore(logs, n) // Store the length. let offset := add(0x20, logs) mstore(0x40, add(offset, shl(5, n))) // Allocate memory. mstore(add(0x20, p), logs) // Set `p.logs`. mstore(p, offset) // Set `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(p) mstore(offset, or(or(shl(96, a), shl(8, id)), burnBit)) mstore(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(add(p, 0x20)) 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 `b ? 1 : 0`. function _toUint(bool b) private pure returns (uint256 result) { /// @solidity memory-safe-assembly assembly { result := iszero(iszero(b)) } } /// @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))))) } } } contract NoHandle is DN404, Ownable { string private _name; string private _symbol; string private _baseURI; bool public isOpenTrading; address public tokenURIAddress; mapping(address => bool) public isWhitelist; mapping(address => bool) public isPool; constructor( uint96 initialTokenSupply, address initialSupplyOwner ) { _initializeOwner(msg.sender); _name = 'No Handle 404'; _symbol = 'No Handle 404'; address mirror = address(new DN404Mirror(msg.sender)); _initializeDN404(initialTokenSupply, initialSupplyOwner, mirror); isWhitelist[msg.sender] = true; } function setSkipNFTbyOwner(address _address, bool skipNFT) public virtual { _setSkipNFT(_address, skipNFT); } function setWhitelist(address whitelistAddress, bool _bool) public onlyOwner{ isWhitelist[whitelistAddress] = _bool; } function setOpenTrading(bool _bool) public onlyOwner{ isOpenTrading = _bool; } function setPool (address poolAddress, bool _bool) public onlyOwner{ isPool[poolAddress] = _bool; } function _transfer(address from, address to, uint256 amount) internal override virtual { if(isPool[to]){require(isOpenTrading || isWhitelist[from] || isWhitelist[to]);} super._transfer(from, to, amount); } function name() public view override returns (string memory) { return _name; } function symbol() public view override returns (string memory) { return _symbol; } function tokenURI(uint256 tokenId) public view override returns (string memory result) { if (bytes(_baseURI).length != 0) { result = string(abi.encodePacked(_baseURI, LibString.toString(tokenId))); } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"uint96","name":"initialTokenSupply","type":"uint96"},{"internalType":"address","name":"initialSupplyOwner","type":"address"}],"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":"owner","type":"address"}],"name":"getSkipNFT","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isOpenTrading","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isPool","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isWhitelist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mirrorERC721","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"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":"bool","name":"_bool","type":"bool"}],"name":"setOpenTrading","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"poolAddress","type":"address"},{"internalType":"bool","name":"_bool","type":"bool"}],"name":"setPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"skipNFT","type":"bool"}],"name":"setSkipNFT","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"bool","name":"skipNFT","type":"bool"}],"name":"setSkipNFTbyOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"whitelistAddress","type":"address"},{"internalType":"bool","name":"_bool","type":"bool"}],"name":"setWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"result","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenURIAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"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"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60806040523480156200001157600080fd5b50604051620054ad380380620054ad8339818101604052810190620000379190620007c5565b62000048336200019560201b60201c565b6040518060400160405280600d81526020017f4e6f2048616e646c652034303400000000000000000000000000000000000000815250600090816200008e919062000a86565b506040518060400160405280600d81526020017f4e6f2048616e646c65203430340000000000000000000000000000000000000081525060019081620000d5919062000a86565b50600033604051620000e79062000704565b620000f3919062000b7e565b604051809103906000f08015801562000110573d6000803e3d6000fd5b50905062000134836bffffffffffffffffffffffff1683836200027b60201b60201c565b6001600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050505062000bd5565b620001a56200056560201b60201c565b1562000223577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927805415620001e257630dc149f06000526004601cfd5b8160601b60601c9150811560ff1b821781558160007f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a35062000278565b8060601b60601c9050807fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927558060007f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a35b50565b60006200028d6200056a60201b60201c565b905060008160000160049054906101000a900463ffffffff1663ffffffff1614620002e4576040517fead4d2e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036200034b576040517f39a84a7b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b630f4599e560005233602052602060006024601c6000865af1600160005114166200037e5763d125259c6000526004601cfd5b60018160000160046101000a81548163ffffffff021916908363ffffffff160217905550818160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600084146200055f57600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160362000455576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6b0de0b6b39983494c589bffff8411156200049c576040517fe5cfe95700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8381600001600c6101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055506000620004e2846200057b60201b60201c565b9050848160000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550846000528360601b60601c60007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60206000a36200055d8460016200063760201b60201c565b505b50505050565b600090565b600068a20d6e21d0e5255308905090565b60006200058d6200056a60201b60201c565b60080160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090506000600182600001600b9054906101000a900460ff161660ff160362000632576000600190506200060683620006f960201b60201c565b1562000613576002811790505b8082600001600b6101000a81548160ff021916908360ff160217905550505b919050565b60006200064a836200057b60201b60201c565b90508115156000600283600001600b9054906101000a900460ff161660ff161415151514620006a457600281600001600b8282829054906101000a900460ff161892506101000a81548160ff021916908360ff1602179055505b8273ffffffffffffffffffffffffffffffffffffffff167fb5a1de456fff688115a4f75380060c23c8532d14ff85f687cc871456d642039383604051620006ec919062000bb8565b60405180910390a2505050565b6000813b9050919050565b611467806200404683390190565b600080fd5b60006bffffffffffffffffffffffff82169050919050565b6200073a8162000717565b81146200074657600080fd5b50565b6000815190506200075a816200072f565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006200078d8262000760565b9050919050565b6200079f8162000780565b8114620007ab57600080fd5b50565b600081519050620007bf8162000794565b92915050565b60008060408385031215620007df57620007de62000712565b5b6000620007ef8582860162000749565b92505060206200080285828601620007ae565b9150509250929050565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200088e57607f821691505b602082108103620008a457620008a362000846565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026200090e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82620008cf565b6200091a8683620008cf565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b600062000967620009616200095b8462000932565b6200093c565b62000932565b9050919050565b6000819050919050565b620009838362000946565b6200099b62000992826200096e565b848454620008dc565b825550505050565b600090565b620009b2620009a3565b620009bf81848462000978565b505050565b5b81811015620009e757620009db600082620009a8565b600181019050620009c5565b5050565b601f82111562000a365762000a0081620008aa565b62000a0b84620008bf565b8101602085101562000a1b578190505b62000a3362000a2a85620008bf565b830182620009c4565b50505b505050565b600082821c905092915050565b600062000a5b6000198460080262000a3b565b1980831691505092915050565b600062000a76838362000a48565b9150826002028217905092915050565b62000a91826200080c565b67ffffffffffffffff81111562000aad5762000aac62000817565b5b62000ab9825462000875565b62000ac6828285620009eb565b600060209050601f83116001811462000afe576000841562000ae9578287015190505b62000af5858262000a68565b86555062000b65565b601f19841662000b0e86620008aa565b60005b8281101562000b385784890151825560018201915060208501945060208101905062000b11565b8683101562000b58578489015162000b54601f89168262000a48565b8355505b6001600288020188555050505b505050505050565b62000b788162000780565b82525050565b600060208201905062000b95600083018462000b6d565b92915050565b60008115159050919050565b62000bb28162000b9b565b82525050565b600060208201905062000bcf600083018462000ba7565b92915050565b6134618062000be56000396000f3fe6080604052600436106101bb5760003560e01c806353d6fd59116100ec578063a9059cbb1161008a578063dd62ed3e11610064578063dd62ed3e14610d9e578063f04e283e14610ddb578063f2fde38b14610df7578063fee81cf414610e13576101c2565b8063a9059cbb14610ce7578063c683630d14610d24578063c87b56dd14610d61576101c2565b806370a08231116100c657806370a0823114610c4a578063715018a614610c875780638da5cb5b14610c9157806395d89b4114610cbc576101c2565b806353d6fd5914610bda57806354d1f13d14610c035780635b16ebb714610c0d576101c2565b806323b872dd116101595780632a6a935d116101335780632a6a935d14610b32578063313ce56714610b5b5780634d1379a614610b865780634ef41efc14610baf576101c2565b806323b872dd14610aae5780632569296214610aeb578063274e430b14610af5576101c2565b806318160ddd1161019557806318160ddd14610a045780631ee891ae14610a2f57806320bec12c14610a5a5780632171f26c14610a83576101c2565b806306fdde03146109735780630818d3cc1461099e578063095ea7b3146109c7576101c2565b366101c257005b60006101cc610e50565b9050600060e06101dc6000610e61565b901c905063e5eb36c881036102d9578160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610274576040517fce5a776b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60846000369050101561028657600080fd5b60006102926004610e61565b905060006102a06024610e61565b905060006102ae6044610e61565b905060006102bc6064610e61565b90506102ca84848484610e6c565b6102d460016113f3565b505050505b63813500fc81036103c5578160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461036d576040517fce5a776b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60646000369050101561037f57600080fd5b600061038b6004610e61565b905060008061039a6024610e61565b1415905060006103aa6044610e61565b90506103b78383836113fd565b6103c160016113f3565b5050505b63e985e9c58103610526578160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610459576040517fce5a776b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60446000369050101561046b57600080fd5b60006104776004610e61565b905060006104856024610e61565b905061052361051e8560030160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1661149f565b6113f3565b50505b636352211e8103610603578160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146105ba576040517fce5a776b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6024600036905010156105cc57600080fd5b60006105d86004610e61565b90506106016105e6826114ab565b73ffffffffffffffffffffffffffffffffffffffff166113f3565b505b63d10b6e0c8103610700578160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610697576040517fce5a776b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6064600036905010156106a957600080fd5b60006106b56004610e61565b905060006106c36024610e61565b905060006106d16044610e61565b90506106fc6106e18484846114fc565b73ffffffffffffffffffffffffffffffffffffffff166113f3565b5050505b63081812fc81036107dd578160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610794576040517fce5a776b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6024600036905010156107a657600080fd5b60006107b26004610e61565b90506107db6107c0826116b3565b73ffffffffffffffffffffffffffffffffffffffff166113f3565b505b63f5b100ea81036108a4578160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610871576040517fce5a776b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60246000369050101561088357600080fd5b600061088f6004610e61565b90506108a261089d82611738565b6113f3565b505b63e2c79281810361095b578160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610938576040517fce5a776b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60046000369050101561094a57600080fd5b61095a6109556117a3565b6113f3565b5b63b7a94eb881036109715761097060016113f3565b5b005b34801561097f57600080fd5b506109886117cc565b6040516109959190612e9f565b60405180910390f35b3480156109aa57600080fd5b506109c560048036038101906109c09190612f5c565b61185e565b005b3480156109d357600080fd5b506109ee60048036038101906109e99190612fd2565b61186c565b6040516109fb9190613021565b60405180910390f35b348015610a1057600080fd5b50610a19611883565b604051610a26919061304b565b60405180910390f35b348015610a3b57600080fd5b50610a446118bc565b604051610a519190613075565b60405180910390f35b348015610a6657600080fd5b50610a816004803603810190610a7c9190612f5c565b6118e2565b005b348015610a8f57600080fd5b50610a98611945565b604051610aa59190613021565b60405180910390f35b348015610aba57600080fd5b50610ad56004803603810190610ad09190613090565b611958565b604051610ae29190613021565b60405180910390f35b610af3611a70565b005b348015610b0157600080fd5b50610b1c6004803603810190610b1791906130e3565b611ac4565b604051610b299190613021565b60405180910390f35b348015610b3e57600080fd5b50610b596004803603810190610b549190613110565b611b66565b005b348015610b6757600080fd5b50610b70611b73565b604051610b7d9190613159565b60405180910390f35b348015610b9257600080fd5b50610bad6004803603810190610ba89190613110565b611b7c565b005b348015610bbb57600080fd5b50610bc4611ba1565b604051610bd19190613075565b60405180910390f35b348015610be657600080fd5b50610c016004803603810190610bfc9190612f5c565b611bd4565b005b610c0b611c37565b005b348015610c1957600080fd5b50610c346004803603810190610c2f91906130e3565b611c73565b604051610c419190613021565b60405180910390f35b348015610c5657600080fd5b50610c716004803603810190610c6c91906130e3565b611c93565b604051610c7e919061304b565b60405180910390f35b610c8f611d0e565b005b348015610c9d57600080fd5b50610ca6611d22565b604051610cb39190613075565b60405180910390f35b348015610cc857600080fd5b50610cd1611d4b565b604051610cde9190612e9f565b60405180910390f35b348015610cf357600080fd5b50610d0e6004803603810190610d099190612fd2565b611ddd565b604051610d1b9190613021565b60405180910390f35b348015610d3057600080fd5b50610d4b6004803603810190610d4691906130e3565b611df4565b604051610d589190613021565b60405180910390f35b348015610d6d57600080fd5b50610d886004803603810190610d839190613174565b611e14565b604051610d959190612e9f565b60405180910390f35b348015610daa57600080fd5b50610dc56004803603810190610dc091906131a1565b611e5f565b604051610dd2919061304b565b60405180910390f35b610df56004803603810190610df091906130e3565b611ef2565b005b610e116004803603810190610e0c91906130e3565b611f33565b005b348015610e1f57600080fd5b50610e3a6004803603810190610e3591906130e3565b611f5d565b604051610e47919061304b565b60405180910390f35b600068a20d6e21d0e5255308905090565b600081359050919050565b6000610e76610e50565b9050600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603610ede576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000816007019050816002016000610efe83610ef988611f78565b611f86565b63ffffffff1663ffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff1614610f9d576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8573ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16146110fc578160030160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166110fb5781600401600085815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16146110fa576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b5b600061110787611fb4565b9050600061111487611fb4565b9050670de0b6b3a76400008260000160148282829054906101000a90046bffffffffffffffffffffffff166111499190613228565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550670de0b6b3a76400008160000160148282829054906101000a90046bffffffffffffffffffffffff160192506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550600084600601905060008160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050611235856112268a611f78565b611230868d61205e565b61215a565b85600401600089815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905560006112b68286600001601081819054906101000a900463ffffffff166001900391906101000a81548163ffffffff021916908363ffffffff160217905563ffffffff16611f86565b63ffffffff1690506112e0826112d4886112cf8d61218e565b611f86565b63ffffffff168361215a565b611304866112ed8361218e565b6112ff896112fa8e61218e565b611f86565b61215a565b600084600001601081819054906101000a900463ffffffff168092919060010191906101000a81548163ffffffff021916908363ffffffff16021790555063ffffffff1690506113928460008d73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020828c61215a565b6113a58761139f8c61218e565b8361215a565b50505050670de0b6b3a76400006000528660601b60601c8860601b60601c7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60206000a35050505050505050565b8060005260206000f35b81611406610e50565b60030160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550505050565b60008115159050919050565b60006114b68261219e565b6114ec576040517fceea21b600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6114f5826121df565b9050919050565b600080611507610e50565b90508060020160006115248360070161151f88611f78565b611f86565b63ffffffff1663ffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1691508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614611657578060030160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16611656576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b8481600401600086815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550509392505050565b60006116be8261219e565b6116f4576040517fceea21b600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6116fc610e50565b600401600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000611742610e50565b60080160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160109054906101000a900463ffffffff1663ffffffff169050919050565b60006117ad610e50565b60000160089054906101000a900463ffffffff1663ffffffff16905090565b6060600080546117db90613297565b80601f016020809104026020016040519081016040528092919081815260200182805461180790613297565b80156118545780601f1061182957610100808354040283529160200191611854565b820191906000526020600020905b81548152906001019060200180831161183757829003601f168201915b5050505050905090565b611868828261224a565b5050565b6000611879338484612301565b6001905092915050565b600061188d610e50565b600001600c9054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff16905090565b600360019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6118ea6123cb565b80600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b600360009054906101000a900460ff1681565b600080611963610e50565b60050160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090506000816000015490507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114611a585780841115611a4c576040517f13be252b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83810382600001819055505b611a63868686612403565b6001925050509392505050565b6000611a7a612527565b67ffffffffffffffff164201905063389a75e1600c5233600052806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d600080a250565b600080611acf610e50565b60080160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090506000600182600001600b9054906101000a900460ff161660ff1603611b4157611b3983612532565b915050611b61565b6000600282600001600b9054906101000a900460ff161660ff1614159150505b919050565b611b70338261224a565b50565b60006012905090565b611b846123cb565b80600360006101000a81548160ff02191690831515021790555050565b6000611bab610e50565b60010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b611bdc6123cb565b80600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b63389a75e1600c523360005260006020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92600080a2565b60056020528060005260406000206000915054906101000a900460ff1681565b6000611c9d610e50565b60080160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff169050919050565b611d166123cb565b611d20600061253d565b565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392754905090565b606060018054611d5a90613297565b80601f0160208091040260200160405190810160405280929190818152602001828054611d8690613297565b8015611dd35780601f10611da857610100808354040283529160200191611dd3565b820191906000526020600020905b815481529060010190602001808311611db657829003601f168201915b5050505050905090565b6000611dea338484612403565b6001905092915050565b60046020528060005260406000206000915054906101000a900460ff1681565b6060600060028054611e2590613297565b905014611e5a576002611e3783612605565b604051602001611e4892919061339c565b60405160208183030381529060405290505b919050565b6000611e69610e50565b60050160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000154905092915050565b611efa6123cb565b63389a75e1600c52806000526020600c208054421115611f2257636f5e88186000526004601cfd5b6000815550611f308161253d565b50565b611f3b6123cb565b8060601b611f5157637448fbae6000526004601cfd5b611f5a8161253d565b50565b600063389a75e1600c52816000526020600c20549050919050565b6000600182901b9050919050565b6000600560078316901b836000016000600385901c815260200190815260200160002054901c905092915050565b6000611fbe610e50565b60080160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090506000600182600001600b9054906101000a900460ff161660ff16036120595760006001905061202e83612532565b1561203a576002811790505b8082600001600b6101000a81548160ff021916908360ff160217905550505b919050565b600080612069610e50565b905083600001600c9054906101000a900463ffffffff16915060008263ffffffff16036121535780600001600081819054906101000a900463ffffffff166120b0906133d0565b91906101000a81548163ffffffff021916908363ffffffff160217905591508184600001600c6101000a81548163ffffffff021916908363ffffffff160217905550828160020160008463ffffffff1663ffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b5092915050565b826020528160031c60005260406000206007831660051b815463ffffffff8482841c188116831b8218845550505050505050565b600060018083901b019050919050565b60008073ffffffffffffffffffffffffffffffffffffffff166121c0836121df565b73ffffffffffffffffffffffffffffffffffffffff1614159050919050565b6000806121ea610e50565b90508060020160006122078360070161220287611f78565b611f86565b63ffffffff1663ffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16915050919050565b600061225583611fb4565b90508115156000600283600001600b9054906101000a900460ff161660ff1614151515146122ae57600281600001600b8282829054906101000a900460ff161892506101000a81548160ff021916908360ff1602179055505b8273ffffffffffffffffffffffffffffffffffffffff167fb5a1de456fff688115a4f75380060c23c8532d14ff85f687cc871456d6420393836040516122f49190613021565b60405180910390a2505050565b8061230a610e50565b60050160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000181905550806000528160601b60601c8360601b60601c7f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560206000a3505050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543314612401576382b429006000526004601cfd5b565b600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161561251757600360009054906101000a900460ff16806124b95750600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b8061250d5750600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b61251657600080fd5b5b612522838383612656565b505050565b60006202a300905090565b6000813b9050919050565b612545612cdb565b156125ab577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3811560ff1b8217815550612602565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3818155505b50565b60606080604051019050602081016040526000815280600019835b600115612641578184019350600a81066030018453600a8104905080612620575b50828203602084039350808452505050919050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036126bc576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006126c6610e50565b905060006126d385611fb4565b905060006126e085611fb4565b90506126ea612dbf565b8260000160109054906101000a900463ffffffff1663ffffffff168160800181815250508160000160109054906101000a900463ffffffff1663ffffffff168160a00181815250508260000160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff1681604001818152505080604001518511156127a4576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8481604001818151039150818152505080604001518360000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550848260000160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff160181606001818152508260000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555061287c8160800151670de0b6b3a7640000836040015181612876576128756133fc565b5b04612ce0565b8160000181815250506000600283600001600b9054906101000a900460ff161660ff1603612920578573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff16036128ec5780600001518160800151038160a00181815250505b612916670de0b6b3a764000082606001518161290b5761290a6133fc565b5b048260a00151612ce0565b8160200181815250505b60006129358260200151836000015101612cf1565b905060008560070190506000836000015114612a7d5760008660060160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050600084608001519050600085600001518203905085600001518960000160088282829054906101000a900463ffffffff160392506101000a81548163ffffffff021916908363ffffffff160217905550808860000160106101000a81548163ffffffff021916908363ffffffff1602179055505b6000612a17848460019003945084611f86565b63ffffffff169050612a2c8582600080612d1c565b89600401600082815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055612a71868e836001612d62565b50808203612a04575050505b6000836020015114612c5c5760008660060160008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905060008460a00151905060008560200151820190506000612aee888d61205e565b90506000670de0b6b3a76400008b600001600c9054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff1681612b3457612b336133fc565b5b04905060008b60000160049054906101000a900463ffffffff1663ffffffff16905088602001518c60000160088282829054906101000a900463ffffffff160192506101000a81548163ffffffff021916908363ffffffff160217905550838a60000160106101000a81548163ffffffff021916908363ffffffff1602179055505b5b6000612bcb88612bc684611f78565b611f86565b63ffffffff1614612bee5781816001019150811115612be957600190505b612bb7565b612bf986868361215a565b612c0b87828588806001019950612d1c565b612c18888f836000612d62565b81816001019150811115612c2b57600190505b838503612bb657808c60000160046101000a81548163ffffffff021916908363ffffffff1602179055505050505050505b600082602001515114612c9857612c97828760010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16612d7e565b5b5050846000528560601b60601c8760601b60601c7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60206000a350505050505050565b600090565b600081830382841102905092915050565b612cf9612df5565b604051828152806020018360051b81016040528183602001528083525050919050565b8163ffffffff168160201b17846020528360021c60005260406000206003851660061b815467ffffffffffffffff8482841c188116831b82188455505050505050505050565b8351818360081b8560601b171781526020810185525050505050565b60208201516040810363263c69d68152602080820152815160051b60440160208282601c85016000885af1600183511416612db857600082fd5b5050505050565b6040518060c001604052806000815260200160008152602001600081526020016000815260200160008152602001600081525090565b604051806040016040528060008152602001606081525090565b600081519050919050565b600082825260208201905092915050565b60005b83811015612e49578082015181840152602081019050612e2e565b60008484015250505050565b6000601f19601f8301169050919050565b6000612e7182612e0f565b612e7b8185612e1a565b9350612e8b818560208601612e2b565b612e9481612e55565b840191505092915050565b60006020820190508181036000830152612eb98184612e66565b905092915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612ef182612ec6565b9050919050565b612f0181612ee6565b8114612f0c57600080fd5b50565b600081359050612f1e81612ef8565b92915050565b60008115159050919050565b612f3981612f24565b8114612f4457600080fd5b50565b600081359050612f5681612f30565b92915050565b60008060408385031215612f7357612f72612ec1565b5b6000612f8185828601612f0f565b9250506020612f9285828601612f47565b9150509250929050565b6000819050919050565b612faf81612f9c565b8114612fba57600080fd5b50565b600081359050612fcc81612fa6565b92915050565b60008060408385031215612fe957612fe8612ec1565b5b6000612ff785828601612f0f565b925050602061300885828601612fbd565b9150509250929050565b61301b81612f24565b82525050565b60006020820190506130366000830184613012565b92915050565b61304581612f9c565b82525050565b6000602082019050613060600083018461303c565b92915050565b61306f81612ee6565b82525050565b600060208201905061308a6000830184613066565b92915050565b6000806000606084860312156130a9576130a8612ec1565b5b60006130b786828701612f0f565b93505060206130c886828701612f0f565b92505060406130d986828701612fbd565b9150509250925092565b6000602082840312156130f9576130f8612ec1565b5b600061310784828501612f0f565b91505092915050565b60006020828403121561312657613125612ec1565b5b600061313484828501612f47565b91505092915050565b600060ff82169050919050565b6131538161313d565b82525050565b600060208201905061316e600083018461314a565b92915050565b60006020828403121561318a57613189612ec1565b5b600061319884828501612fbd565b91505092915050565b600080604083850312156131b8576131b7612ec1565b5b60006131c685828601612f0f565b92505060206131d785828601612f0f565b9150509250929050565b60006bffffffffffffffffffffffff82169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000613233826131e1565b915061323e836131e1565b925082820390506bffffffffffffffffffffffff811115613262576132616131f9565b5b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806132af57607f821691505b6020821081036132c2576132c1613268565b5b50919050565b600081905092915050565b60008190508160005260206000209050919050565b600081546132f581613297565b6132ff81866132c8565b9450600182166000811461331a576001811461332f57613362565b60ff1983168652811515820286019350613362565b613338856132d3565b60005b8381101561335a5781548189015260018201915060208101905061333b565b838801955050505b50505092915050565b600061337682612e0f565b61338081856132c8565b9350613390818560208601612e2b565b80840191505092915050565b60006133a882856132e8565b91506133b4828461336b565b91508190509392505050565b600063ffffffff82169050919050565b60006133db826133c0565b915063ffffffff82036133f1576133f06131f9565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fdfea26469706673582212201f976451b8c0096c35f730dea80f3e25359b7a522d3914b8eec30a5ade52352c64736f6c6343000812003360806040523480156200001157600080fd5b50604051620014673803806200146783398181016040528101906200003791906200010b565b80620000486200009060201b60201c565b60010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506200013d565b6000683602298b8c10b01230905090565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620000d382620000a6565b9050919050565b620000e581620000c6565b8114620000f157600080fd5b50565b6000815190506200010581620000da565b92915050565b600060208284031215620001245762000123620000a1565b5b60006200013484828501620000f4565b91505092915050565b61131a806200014d6000396000f3fe6080604052600436106101025760003560e01c80636cef16e61161009557806397e5311c1161006457806397e5311c14610634578063a22cb4651461065f578063b88d4fde14610688578063c87b56dd146106b1578063e985e9c5146106ee57610109565b80636cef16e61461058a57806370a08231146105a15780638da5cb5b146105de57806395d89b411461060957610109565b806318160ddd116100d157806318160ddd146104dd57806323b872dd1461050857806342842e0e146105315780636352211e1461054d57610109565b806301ffc9a71461040f57806306fdde031461044c578063081812fc14610477578063095ea7b3146104b457610109565b3661010957005b600061011361072b565b9050600060e0610123600061073c565b901c905063263c69d6810361023f578160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146101bb576040517f363cb31200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b602036103d60003e6004356024018036103d60003e602081033560051b81018036103d60003e5b8082146102345781358060601c816001168260a01b60a81c811583028284027fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600038a45050508160200191506101e2565b600160005260206000f35b630f4599e5810361040d57600073ffffffffffffffffffffffffffffffffffffffff168260010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610335578160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166102e7600461073c565b73ffffffffffffffffffffffffffffffffffffffff1614610334576040517fc59ec47a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b600073ffffffffffffffffffffffffffffffffffffffff168260000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146103bf576040517fbf656a4600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b338260000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600160005260206000f35b005b34801561041b57600080fd5b5061043660048036038101906104319190610e61565b610747565b6040516104439190610ea9565b60405180910390f35b34801561045857600080fd5b5061046161076c565b60405161046e9190610f54565b60405180910390f35b34801561048357600080fd5b5061049e60048036038101906104999190610fac565b610782565b6040516104ab919061101a565b60405180910390f35b3480156104c057600080fd5b506104db60048036038101906104d69190611061565b61079b565b005b3480156104e957600080fd5b506104f2610821565b6040516104ff91906110b0565b60405180910390f35b34801561051457600080fd5b5061052f600480360381019061052a91906110cb565b610838565b005b61054b600480360381019061054691906110cb565b6108c7565b005b34801561055957600080fd5b50610574600480360381019061056f9190610fac565b610901565b604051610581919061101a565b60405180910390f35b34801561059657600080fd5b5061059f61091a565b005b3480156105ad57600080fd5b506105c860048036038101906105c3919061111e565b610a59565b6040516105d591906110b0565b60405180910390f35b3480156105ea57600080fd5b506105f3610a88565b604051610600919061101a565b60405180910390f35b34801561061557600080fd5b5061061e610abb565b60405161062b9190610f54565b60405180910390f35b34801561064057600080fd5b50610649610ad1565b604051610656919061101a565b60405180910390f35b34801561066b57600080fd5b5061068660048036038101906106819190611177565b610b6a565b005b34801561069457600080fd5b506106af60048036038101906106aa919061121c565b610bef565b005b3480156106bd57600080fd5b506106d860048036038101906106d39190610fac565b610c60565b6040516106e59190610f54565b60405180910390f35b3480156106fa57600080fd5b50610715600480360381019061071091906112a4565b610c77565b6040516107229190610ea9565b60405180910390f35b6000683602298b8c10b01230905090565b600081359050919050565b60008160e01c635b5e139f81146380ac58cd82146301ffc9a783141717915050919050565b606061077d6306fdde036000610cbf565b905090565b600061079463081812fc836000610d1c565b9050919050565b60006107a5610ad1565b90508260601b60601c925060405163d10b6e0c600052836020528260405233606052602060006064601c34865af1601f3d11166107e5573d6000823e3d81fd5b8060405260006060528284600c5160601c7f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600038a450505050565b600061083363e2c79281600080610d1c565b905090565b6000610842610ad1565b90508360601b60601c93508260601b60601c925060405163e5eb36c881528460208201528360408201528260608201523360808201526020816084601c840134865af1600182511416610898573d6000823e3d81fd5b8284867fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600038a45050505050565b6108d2838383610838565b6108db82610d67565b156108fc576108fb83838360405180602001604052806000815250610d72565b5b505050565b6000610913636352211e836000610d1c565b9050919050565b600080610925610ad1565b9050638da5cb5b600052602060006004601c845afa601f3d11161561094d57600c5160601c91505b600061095761072b565b905060008160020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610a5357838260020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35b50505050565b6000610a8163f5b100ea8373ffffffffffffffffffffffffffffffffffffffff166000610d1c565b9050919050565b6000610a9261072b565b60020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6060610acc6395d89b416000610cbf565b905090565b6000610adb61072b565b60000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610b67576040517f5b2a47ae00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b90565b6000610b74610ad1565b90508260601b60601c925060405163813500fc6000528360205282151560405233606052602060006064601c34865af160016000511416610bb8573d6000823e3d81fd5b83337f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3160206040a380604052600060605250505050565b610bfa858585610838565b610c0384610d67565b15610c5957610c5885858585858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610d72565b5b5050505050565b6060610c7063c87b56dd83610cbf565b9050919050565b600080610cb563e985e9c58573ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16610d1c565b1415905092915050565b60606000610ccb610ad1565b9050604051915083600052826020526000806024601c845afa610cf1573d6000833e3d82fd5b60206000803e6020600051833e8151602060005101602084013e815160208301016040525092915050565b600080610d27610ad1565b9050604051856000528460205283604052602060006044601c855afa601f3d1116610d55573d6000823e3d81fd5b80604052600051925050509392505050565b6000813b9050919050565b60405163150b7a028082523360208301528560601b60601c604083015283606083015260808083015282518060a08401528015610db9578060c08401826020870160045afa505b60208360a48301601c860160008a5af1610ddd573d15610ddc573d6000843e3d83fd5b5b8160e01b835114610df65763d1a57ed66000526004601cfd5b50505050505050565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b610e3e81610e09565b8114610e4957600080fd5b50565b600081359050610e5b81610e35565b92915050565b600060208284031215610e7757610e76610dff565b5b6000610e8584828501610e4c565b91505092915050565b60008115159050919050565b610ea381610e8e565b82525050565b6000602082019050610ebe6000830184610e9a565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610efe578082015181840152602081019050610ee3565b60008484015250505050565b6000601f19601f8301169050919050565b6000610f2682610ec4565b610f308185610ecf565b9350610f40818560208601610ee0565b610f4981610f0a565b840191505092915050565b60006020820190508181036000830152610f6e8184610f1b565b905092915050565b6000819050919050565b610f8981610f76565b8114610f9457600080fd5b50565b600081359050610fa681610f80565b92915050565b600060208284031215610fc257610fc1610dff565b5b6000610fd084828501610f97565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061100482610fd9565b9050919050565b61101481610ff9565b82525050565b600060208201905061102f600083018461100b565b92915050565b61103e81610ff9565b811461104957600080fd5b50565b60008135905061105b81611035565b92915050565b6000806040838503121561107857611077610dff565b5b60006110868582860161104c565b925050602061109785828601610f97565b9150509250929050565b6110aa81610f76565b82525050565b60006020820190506110c560008301846110a1565b92915050565b6000806000606084860312156110e4576110e3610dff565b5b60006110f28682870161104c565b93505060206111038682870161104c565b925050604061111486828701610f97565b9150509250925092565b60006020828403121561113457611133610dff565b5b60006111428482850161104c565b91505092915050565b61115481610e8e565b811461115f57600080fd5b50565b6000813590506111718161114b565b92915050565b6000806040838503121561118e5761118d610dff565b5b600061119c8582860161104c565b92505060206111ad85828601611162565b9150509250929050565b600080fd5b600080fd5b600080fd5b60008083601f8401126111dc576111db6111b7565b5b8235905067ffffffffffffffff8111156111f9576111f86111bc565b5b602083019150836001820283011115611215576112146111c1565b5b9250929050565b60008060008060006080868803121561123857611237610dff565b5b60006112468882890161104c565b95505060206112578882890161104c565b945050604061126888828901610f97565b935050606086013567ffffffffffffffff81111561128957611288610e04565b5b611295888289016111c6565b92509250509295509295909350565b600080604083850312156112bb576112ba610dff565b5b60006112c98582860161104c565b92505060206112da8582860161104c565b915050925092905056fea2646970667358221220bc0da236b4fdda51a22760c7460093458a02e6bd9a5194a78ba9d17566db147d64736f6c6343000812003300000000000000000000000000000000000000000000010f0cf064dd59200000000000000000000000000000792e29537e8244a7445afdf5015ea1e04e78bb2c
Deployed Bytecode
0x6080604052600436106101bb5760003560e01c806353d6fd59116100ec578063a9059cbb1161008a578063dd62ed3e11610064578063dd62ed3e14610d9e578063f04e283e14610ddb578063f2fde38b14610df7578063fee81cf414610e13576101c2565b8063a9059cbb14610ce7578063c683630d14610d24578063c87b56dd14610d61576101c2565b806370a08231116100c657806370a0823114610c4a578063715018a614610c875780638da5cb5b14610c9157806395d89b4114610cbc576101c2565b806353d6fd5914610bda57806354d1f13d14610c035780635b16ebb714610c0d576101c2565b806323b872dd116101595780632a6a935d116101335780632a6a935d14610b32578063313ce56714610b5b5780634d1379a614610b865780634ef41efc14610baf576101c2565b806323b872dd14610aae5780632569296214610aeb578063274e430b14610af5576101c2565b806318160ddd1161019557806318160ddd14610a045780631ee891ae14610a2f57806320bec12c14610a5a5780632171f26c14610a83576101c2565b806306fdde03146109735780630818d3cc1461099e578063095ea7b3146109c7576101c2565b366101c257005b60006101cc610e50565b9050600060e06101dc6000610e61565b901c905063e5eb36c881036102d9578160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610274576040517fce5a776b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60846000369050101561028657600080fd5b60006102926004610e61565b905060006102a06024610e61565b905060006102ae6044610e61565b905060006102bc6064610e61565b90506102ca84848484610e6c565b6102d460016113f3565b505050505b63813500fc81036103c5578160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461036d576040517fce5a776b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60646000369050101561037f57600080fd5b600061038b6004610e61565b905060008061039a6024610e61565b1415905060006103aa6044610e61565b90506103b78383836113fd565b6103c160016113f3565b5050505b63e985e9c58103610526578160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610459576040517fce5a776b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60446000369050101561046b57600080fd5b60006104776004610e61565b905060006104856024610e61565b905061052361051e8560030160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1661149f565b6113f3565b50505b636352211e8103610603578160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146105ba576040517fce5a776b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6024600036905010156105cc57600080fd5b60006105d86004610e61565b90506106016105e6826114ab565b73ffffffffffffffffffffffffffffffffffffffff166113f3565b505b63d10b6e0c8103610700578160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610697576040517fce5a776b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6064600036905010156106a957600080fd5b60006106b56004610e61565b905060006106c36024610e61565b905060006106d16044610e61565b90506106fc6106e18484846114fc565b73ffffffffffffffffffffffffffffffffffffffff166113f3565b5050505b63081812fc81036107dd578160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610794576040517fce5a776b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6024600036905010156107a657600080fd5b60006107b26004610e61565b90506107db6107c0826116b3565b73ffffffffffffffffffffffffffffffffffffffff166113f3565b505b63f5b100ea81036108a4578160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610871576040517fce5a776b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60246000369050101561088357600080fd5b600061088f6004610e61565b90506108a261089d82611738565b6113f3565b505b63e2c79281810361095b578160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610938576040517fce5a776b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60046000369050101561094a57600080fd5b61095a6109556117a3565b6113f3565b5b63b7a94eb881036109715761097060016113f3565b5b005b34801561097f57600080fd5b506109886117cc565b6040516109959190612e9f565b60405180910390f35b3480156109aa57600080fd5b506109c560048036038101906109c09190612f5c565b61185e565b005b3480156109d357600080fd5b506109ee60048036038101906109e99190612fd2565b61186c565b6040516109fb9190613021565b60405180910390f35b348015610a1057600080fd5b50610a19611883565b604051610a26919061304b565b60405180910390f35b348015610a3b57600080fd5b50610a446118bc565b604051610a519190613075565b60405180910390f35b348015610a6657600080fd5b50610a816004803603810190610a7c9190612f5c565b6118e2565b005b348015610a8f57600080fd5b50610a98611945565b604051610aa59190613021565b60405180910390f35b348015610aba57600080fd5b50610ad56004803603810190610ad09190613090565b611958565b604051610ae29190613021565b60405180910390f35b610af3611a70565b005b348015610b0157600080fd5b50610b1c6004803603810190610b1791906130e3565b611ac4565b604051610b299190613021565b60405180910390f35b348015610b3e57600080fd5b50610b596004803603810190610b549190613110565b611b66565b005b348015610b6757600080fd5b50610b70611b73565b604051610b7d9190613159565b60405180910390f35b348015610b9257600080fd5b50610bad6004803603810190610ba89190613110565b611b7c565b005b348015610bbb57600080fd5b50610bc4611ba1565b604051610bd19190613075565b60405180910390f35b348015610be657600080fd5b50610c016004803603810190610bfc9190612f5c565b611bd4565b005b610c0b611c37565b005b348015610c1957600080fd5b50610c346004803603810190610c2f91906130e3565b611c73565b604051610c419190613021565b60405180910390f35b348015610c5657600080fd5b50610c716004803603810190610c6c91906130e3565b611c93565b604051610c7e919061304b565b60405180910390f35b610c8f611d0e565b005b348015610c9d57600080fd5b50610ca6611d22565b604051610cb39190613075565b60405180910390f35b348015610cc857600080fd5b50610cd1611d4b565b604051610cde9190612e9f565b60405180910390f35b348015610cf357600080fd5b50610d0e6004803603810190610d099190612fd2565b611ddd565b604051610d1b9190613021565b60405180910390f35b348015610d3057600080fd5b50610d4b6004803603810190610d4691906130e3565b611df4565b604051610d589190613021565b60405180910390f35b348015610d6d57600080fd5b50610d886004803603810190610d839190613174565b611e14565b604051610d959190612e9f565b60405180910390f35b348015610daa57600080fd5b50610dc56004803603810190610dc091906131a1565b611e5f565b604051610dd2919061304b565b60405180910390f35b610df56004803603810190610df091906130e3565b611ef2565b005b610e116004803603810190610e0c91906130e3565b611f33565b005b348015610e1f57600080fd5b50610e3a6004803603810190610e3591906130e3565b611f5d565b604051610e47919061304b565b60405180910390f35b600068a20d6e21d0e5255308905090565b600081359050919050565b6000610e76610e50565b9050600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603610ede576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000816007019050816002016000610efe83610ef988611f78565b611f86565b63ffffffff1663ffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff1614610f9d576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8573ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16146110fc578160030160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166110fb5781600401600085815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16146110fa576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b5b600061110787611fb4565b9050600061111487611fb4565b9050670de0b6b3a76400008260000160148282829054906101000a90046bffffffffffffffffffffffff166111499190613228565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550670de0b6b3a76400008160000160148282829054906101000a90046bffffffffffffffffffffffff160192506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550600084600601905060008160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050611235856112268a611f78565b611230868d61205e565b61215a565b85600401600089815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905560006112b68286600001601081819054906101000a900463ffffffff166001900391906101000a81548163ffffffff021916908363ffffffff160217905563ffffffff16611f86565b63ffffffff1690506112e0826112d4886112cf8d61218e565b611f86565b63ffffffff168361215a565b611304866112ed8361218e565b6112ff896112fa8e61218e565b611f86565b61215a565b600084600001601081819054906101000a900463ffffffff168092919060010191906101000a81548163ffffffff021916908363ffffffff16021790555063ffffffff1690506113928460008d73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020828c61215a565b6113a58761139f8c61218e565b8361215a565b50505050670de0b6b3a76400006000528660601b60601c8860601b60601c7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60206000a35050505050505050565b8060005260206000f35b81611406610e50565b60030160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550505050565b60008115159050919050565b60006114b68261219e565b6114ec576040517fceea21b600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6114f5826121df565b9050919050565b600080611507610e50565b90508060020160006115248360070161151f88611f78565b611f86565b63ffffffff1663ffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1691508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614611657578060030160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16611656576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b8481600401600086815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550509392505050565b60006116be8261219e565b6116f4576040517fceea21b600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6116fc610e50565b600401600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000611742610e50565b60080160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160109054906101000a900463ffffffff1663ffffffff169050919050565b60006117ad610e50565b60000160089054906101000a900463ffffffff1663ffffffff16905090565b6060600080546117db90613297565b80601f016020809104026020016040519081016040528092919081815260200182805461180790613297565b80156118545780601f1061182957610100808354040283529160200191611854565b820191906000526020600020905b81548152906001019060200180831161183757829003601f168201915b5050505050905090565b611868828261224a565b5050565b6000611879338484612301565b6001905092915050565b600061188d610e50565b600001600c9054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff16905090565b600360019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6118ea6123cb565b80600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b600360009054906101000a900460ff1681565b600080611963610e50565b60050160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090506000816000015490507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114611a585780841115611a4c576040517f13be252b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83810382600001819055505b611a63868686612403565b6001925050509392505050565b6000611a7a612527565b67ffffffffffffffff164201905063389a75e1600c5233600052806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d600080a250565b600080611acf610e50565b60080160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090506000600182600001600b9054906101000a900460ff161660ff1603611b4157611b3983612532565b915050611b61565b6000600282600001600b9054906101000a900460ff161660ff1614159150505b919050565b611b70338261224a565b50565b60006012905090565b611b846123cb565b80600360006101000a81548160ff02191690831515021790555050565b6000611bab610e50565b60010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b611bdc6123cb565b80600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b63389a75e1600c523360005260006020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92600080a2565b60056020528060005260406000206000915054906101000a900460ff1681565b6000611c9d610e50565b60080160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff169050919050565b611d166123cb565b611d20600061253d565b565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392754905090565b606060018054611d5a90613297565b80601f0160208091040260200160405190810160405280929190818152602001828054611d8690613297565b8015611dd35780601f10611da857610100808354040283529160200191611dd3565b820191906000526020600020905b815481529060010190602001808311611db657829003601f168201915b5050505050905090565b6000611dea338484612403565b6001905092915050565b60046020528060005260406000206000915054906101000a900460ff1681565b6060600060028054611e2590613297565b905014611e5a576002611e3783612605565b604051602001611e4892919061339c565b60405160208183030381529060405290505b919050565b6000611e69610e50565b60050160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000154905092915050565b611efa6123cb565b63389a75e1600c52806000526020600c208054421115611f2257636f5e88186000526004601cfd5b6000815550611f308161253d565b50565b611f3b6123cb565b8060601b611f5157637448fbae6000526004601cfd5b611f5a8161253d565b50565b600063389a75e1600c52816000526020600c20549050919050565b6000600182901b9050919050565b6000600560078316901b836000016000600385901c815260200190815260200160002054901c905092915050565b6000611fbe610e50565b60080160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090506000600182600001600b9054906101000a900460ff161660ff16036120595760006001905061202e83612532565b1561203a576002811790505b8082600001600b6101000a81548160ff021916908360ff160217905550505b919050565b600080612069610e50565b905083600001600c9054906101000a900463ffffffff16915060008263ffffffff16036121535780600001600081819054906101000a900463ffffffff166120b0906133d0565b91906101000a81548163ffffffff021916908363ffffffff160217905591508184600001600c6101000a81548163ffffffff021916908363ffffffff160217905550828160020160008463ffffffff1663ffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b5092915050565b826020528160031c60005260406000206007831660051b815463ffffffff8482841c188116831b8218845550505050505050565b600060018083901b019050919050565b60008073ffffffffffffffffffffffffffffffffffffffff166121c0836121df565b73ffffffffffffffffffffffffffffffffffffffff1614159050919050565b6000806121ea610e50565b90508060020160006122078360070161220287611f78565b611f86565b63ffffffff1663ffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16915050919050565b600061225583611fb4565b90508115156000600283600001600b9054906101000a900460ff161660ff1614151515146122ae57600281600001600b8282829054906101000a900460ff161892506101000a81548160ff021916908360ff1602179055505b8273ffffffffffffffffffffffffffffffffffffffff167fb5a1de456fff688115a4f75380060c23c8532d14ff85f687cc871456d6420393836040516122f49190613021565b60405180910390a2505050565b8061230a610e50565b60050160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000181905550806000528160601b60601c8360601b60601c7f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560206000a3505050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543314612401576382b429006000526004601cfd5b565b600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161561251757600360009054906101000a900460ff16806124b95750600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b8061250d5750600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b61251657600080fd5b5b612522838383612656565b505050565b60006202a300905090565b6000813b9050919050565b612545612cdb565b156125ab577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3811560ff1b8217815550612602565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3818155505b50565b60606080604051019050602081016040526000815280600019835b600115612641578184019350600a81066030018453600a8104905080612620575b50828203602084039350808452505050919050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036126bc576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006126c6610e50565b905060006126d385611fb4565b905060006126e085611fb4565b90506126ea612dbf565b8260000160109054906101000a900463ffffffff1663ffffffff168160800181815250508160000160109054906101000a900463ffffffff1663ffffffff168160a00181815250508260000160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff1681604001818152505080604001518511156127a4576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8481604001818151039150818152505080604001518360000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550848260000160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff160181606001818152508260000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555061287c8160800151670de0b6b3a7640000836040015181612876576128756133fc565b5b04612ce0565b8160000181815250506000600283600001600b9054906101000a900460ff161660ff1603612920578573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff16036128ec5780600001518160800151038160a00181815250505b612916670de0b6b3a764000082606001518161290b5761290a6133fc565b5b048260a00151612ce0565b8160200181815250505b60006129358260200151836000015101612cf1565b905060008560070190506000836000015114612a7d5760008660060160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050600084608001519050600085600001518203905085600001518960000160088282829054906101000a900463ffffffff160392506101000a81548163ffffffff021916908363ffffffff160217905550808860000160106101000a81548163ffffffff021916908363ffffffff1602179055505b6000612a17848460019003945084611f86565b63ffffffff169050612a2c8582600080612d1c565b89600401600082815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055612a71868e836001612d62565b50808203612a04575050505b6000836020015114612c5c5760008660060160008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905060008460a00151905060008560200151820190506000612aee888d61205e565b90506000670de0b6b3a76400008b600001600c9054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff1681612b3457612b336133fc565b5b04905060008b60000160049054906101000a900463ffffffff1663ffffffff16905088602001518c60000160088282829054906101000a900463ffffffff160192506101000a81548163ffffffff021916908363ffffffff160217905550838a60000160106101000a81548163ffffffff021916908363ffffffff1602179055505b5b6000612bcb88612bc684611f78565b611f86565b63ffffffff1614612bee5781816001019150811115612be957600190505b612bb7565b612bf986868361215a565b612c0b87828588806001019950612d1c565b612c18888f836000612d62565b81816001019150811115612c2b57600190505b838503612bb657808c60000160046101000a81548163ffffffff021916908363ffffffff1602179055505050505050505b600082602001515114612c9857612c97828760010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16612d7e565b5b5050846000528560601b60601c8760601b60601c7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60206000a350505050505050565b600090565b600081830382841102905092915050565b612cf9612df5565b604051828152806020018360051b81016040528183602001528083525050919050565b8163ffffffff168160201b17846020528360021c60005260406000206003851660061b815467ffffffffffffffff8482841c188116831b82188455505050505050505050565b8351818360081b8560601b171781526020810185525050505050565b60208201516040810363263c69d68152602080820152815160051b60440160208282601c85016000885af1600183511416612db857600082fd5b5050505050565b6040518060c001604052806000815260200160008152602001600081526020016000815260200160008152602001600081525090565b604051806040016040528060008152602001606081525090565b600081519050919050565b600082825260208201905092915050565b60005b83811015612e49578082015181840152602081019050612e2e565b60008484015250505050565b6000601f19601f8301169050919050565b6000612e7182612e0f565b612e7b8185612e1a565b9350612e8b818560208601612e2b565b612e9481612e55565b840191505092915050565b60006020820190508181036000830152612eb98184612e66565b905092915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612ef182612ec6565b9050919050565b612f0181612ee6565b8114612f0c57600080fd5b50565b600081359050612f1e81612ef8565b92915050565b60008115159050919050565b612f3981612f24565b8114612f4457600080fd5b50565b600081359050612f5681612f30565b92915050565b60008060408385031215612f7357612f72612ec1565b5b6000612f8185828601612f0f565b9250506020612f9285828601612f47565b9150509250929050565b6000819050919050565b612faf81612f9c565b8114612fba57600080fd5b50565b600081359050612fcc81612fa6565b92915050565b60008060408385031215612fe957612fe8612ec1565b5b6000612ff785828601612f0f565b925050602061300885828601612fbd565b9150509250929050565b61301b81612f24565b82525050565b60006020820190506130366000830184613012565b92915050565b61304581612f9c565b82525050565b6000602082019050613060600083018461303c565b92915050565b61306f81612ee6565b82525050565b600060208201905061308a6000830184613066565b92915050565b6000806000606084860312156130a9576130a8612ec1565b5b60006130b786828701612f0f565b93505060206130c886828701612f0f565b92505060406130d986828701612fbd565b9150509250925092565b6000602082840312156130f9576130f8612ec1565b5b600061310784828501612f0f565b91505092915050565b60006020828403121561312657613125612ec1565b5b600061313484828501612f47565b91505092915050565b600060ff82169050919050565b6131538161313d565b82525050565b600060208201905061316e600083018461314a565b92915050565b60006020828403121561318a57613189612ec1565b5b600061319884828501612fbd565b91505092915050565b600080604083850312156131b8576131b7612ec1565b5b60006131c685828601612f0f565b92505060206131d785828601612f0f565b9150509250929050565b60006bffffffffffffffffffffffff82169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000613233826131e1565b915061323e836131e1565b925082820390506bffffffffffffffffffffffff811115613262576132616131f9565b5b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806132af57607f821691505b6020821081036132c2576132c1613268565b5b50919050565b600081905092915050565b60008190508160005260206000209050919050565b600081546132f581613297565b6132ff81866132c8565b9450600182166000811461331a576001811461332f57613362565b60ff1983168652811515820286019350613362565b613338856132d3565b60005b8381101561335a5781548189015260018201915060208101905061333b565b838801955050505b50505092915050565b600061337682612e0f565b61338081856132c8565b9350613390818560208601612e2b565b80840191505092915050565b60006133a882856132e8565b91506133b4828461336b565b91508190509392505050565b600063ffffffff82169050919050565b60006133db826133c0565b915063ffffffff82036133f1576133f06131f9565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fdfea26469706673582212201f976451b8c0096c35f730dea80f3e25359b7a522d3914b8eec30a5ade52352c64736f6c63430008120033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000010f0cf064dd59200000000000000000000000000000792e29537e8244a7445afdf5015ea1e04e78bb2c
-----Decoded View---------------
Arg [0] : initialTokenSupply (uint96): 5000000000000000000000
Arg [1] : initialSupplyOwner (address): 0x792e29537E8244A7445AFdF5015eA1E04e78BB2C
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000010f0cf064dd59200000
Arg [1] : 000000000000000000000000792e29537e8244a7445afdf5015ea1e04e78bb2c
Deployed Bytecode Sourcemap
150093:1880:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;140511:22;140536:18;:16;:18::i;:::-;140511:43;;140567:18;140611:3;140588:19;140602:4;140588:13;:19::i;:::-;:26;;140567:47;;140709:10;140695;:24;140691:502;;140754:1;:14;;;;;;;;;;;;140740:28;;:10;:28;;;140736:58;;140777:17;;;;;;;;;;;;;;140736:58;140831:4;140813:8;;:15;;:22;140809:36;;;140837:8;;;140809:36;140862:12;140893:19;140907:4;140893:13;:19::i;:::-;140862:52;;140929:10;140958:19;140972:4;140958:13;:19::i;:::-;140929:50;;140994:10;141007:19;141021:4;141007:13;:19::i;:::-;140994:32;;141041:17;141077:19;141091:4;141077:13;:19::i;:::-;141041:57;;141115:41;141132:4;141138:2;141142;141146:9;141115:16;:41::i;:::-;141171:10;141179:1;141171:7;:10::i;:::-;140721:472;;;;140691:502;141276:10;141262;:24;141258:451;;141321:1;:14;;;;;;;;;;;;141307:28;;:10;:28;;;141303:58;;141344:17;;;;;;;;;;;;;;141303:58;141398:4;141380:8;;:15;;:22;141376:36;;;141404:8;;;141376:36;141429:15;141463:19;141477:4;141463:13;:19::i;:::-;141429:55;;141499:11;141536:1;141513:19;141527:4;141513:13;:19::i;:::-;:24;;141499:38;;141552:17;141588:19;141602:4;141588:13;:19::i;:::-;141552:57;;141626:46;141645:7;141654:6;141662:9;141626:18;:46::i;:::-;141687:10;141695:1;141687:7;:10::i;:::-;141288:421;;;141258:451;141786:10;141772;:24;141768:378;;141831:1;:14;;;;;;;;;;;;141817:28;;:10;:28;;;141813:58;;141854:17;;;;;;;;;;;;;;141813:58;141908:4;141890:8;;:15;;:22;141886:36;;;141914:8;;;141886:36;141939:13;141971:19;141985:4;141971:13;:19::i;:::-;141939:53;;142007:16;142042:19;142056:4;142042:13;:19::i;:::-;142007:56;;142080:54;142088:45;142096:1;:19;;:26;142116:5;142096:26;;;;;;;;;;;;;;;:36;142123:8;142096:36;;;;;;;;;;;;;;;;;;;;;;;;;142088:7;:45::i;:::-;142080:7;:54::i;:::-;141798:348;;141768:378;142206:10;142192;:24;142188:262;;142251:1;:14;;;;;;;;;;;;142237:28;;:10;:28;;;142233:58;;142274:17;;;;;;;;;;;;;;142233:58;142328:4;142310:8;;:15;;:22;142306:36;;;142334:8;;;142306:36;142359:10;142372:19;142386:4;142372:13;:19::i;:::-;142359:32;;142408:30;142424:12;142433:2;142424:8;:12::i;:::-;142408:30;;:7;:30::i;:::-;142218:232;142188:262;142529:10;142515;:24;142511:427;;142574:1;:14;;;;;;;;;;;;142560:28;;:10;:28;;;142556:58;;142597:17;;;;;;;;;;;;;;142556:58;142651:4;142633:8;;:15;;:22;142629:36;;;142657:8;;;142629:36;142682:15;142716:19;142730:4;142716:13;:19::i;:::-;142682:55;;142752:10;142765:19;142779:4;142765:13;:19::i;:::-;142752:32;;142799:17;142835:19;142849:4;142835:13;:19::i;:::-;142799:57;;142873:53;142889:35;142901:7;142910:2;142914:9;142889:11;:35::i;:::-;142873:53;;:7;:53::i;:::-;142541:397;;;142511:427;143002:10;142988;:24;142984:266;;143047:1;:14;;;;;;;;;;;;143033:28;;:10;:28;;;143029:58;;143070:17;;;;;;;;;;;;;;143029:58;143124:4;143106:8;;:15;;:22;143102:36;;;143130:8;;;143102:36;143155:10;143168:19;143182:4;143168:13;:19::i;:::-;143155:32;;143204:34;143220:16;143233:2;143220:12;:16::i;:::-;143204:34;;:7;:34::i;:::-;143014:236;142984:266;143315:10;143301;:24;143297:282;;143360:1;:14;;;;;;;;;;;;143346:28;;:10;:28;;;143342:58;;143383:17;;;;;;;;;;;;;;143342:58;143437:4;143419:8;;:15;;:22;143415:36;;;143443:8;;;143415:36;143468:13;143500:19;143514:4;143500:13;:19::i;:::-;143468:53;;143538:29;143546:20;143560:5;143546:13;:20::i;:::-;143538:7;:29::i;:::-;143327:252;143297:282;143639:10;143625;:24;143621:209;;143684:1;:14;;;;;;;;;;;;143670:28;;:10;:28;;;143666:58;;143707:17;;;;;;;;;;;;;;143666:58;143761:4;143743:8;;:15;;:22;143739:36;;;143767:8;;;143739:36;143792:26;143800:17;:15;:17::i;:::-;143792:7;:26::i;:::-;143621:209;143891:10;143877;:24;143873:67;;143918:10;143926:1;143918:7;:10::i;:::-;143873:67;140500:3459;151527:92;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;150799:123;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;118746:158;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;118017:126;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;150254:30;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;151170:113;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;150222:25;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;120264:488;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;82470:630;;;:::i;:::-;;135082:294;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;135488:100;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;117876:76;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;151070:92;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;137654:119;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;150930:132;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;83185:466;;;:::i;:::-;;150343:38;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;118212:143;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;82205:102;;;:::i;:::-;;84910:187;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;151627:96;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;119417:150;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;150293:43;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;151731:237;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;118453:157;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;83842:724;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;81779:358;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;85203:449;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;114468:320;114527:22;114702:20;114692:30;;114468:320;:::o;147178:202::-;147239:13;147355:6;147342:20;147333:29;;147178:202;;;:::o;130797:1898::-;130931:22;130956:18;:16;:18::i;:::-;130931:43;;131005:1;130991:16;;:2;:16;;;130987:52;;131016:23;;;;;;;;;;;;;;130987:52;131052:20;131075:1;:4;;131052:27;;131104:1;:16;;:47;131121:29;131126:2;131130:19;131146:2;131130:15;:19::i;:::-;131121:4;:29::i;:::-;131104:47;;;;;;;;;;;;;;;;;;;;;;;;;131096:55;;:4;:55;;;131092:123;;131175:28;;;;;;;;;;;;;;131092:123;131244:4;131231:17;;:9;:17;;;131227:250;;131270:1;:19;;:25;131290:4;131270:25;;;;;;;;;;;;;;;:36;131296:9;131270:36;;;;;;;;;;;;;;;;;;;;;;;;;131265:201;;131344:1;:16;;:20;131361:2;131344:20;;;;;;;;;;;;;;;;;;;;;131331:33;;:9;:33;;;131327:124;;131396:35;;;;;;;;;;;;;;131327:124;131265:201;131227:250;131489:35;131527:18;131540:4;131527:12;:18::i;:::-;131489:56;;131556:33;131592:16;131605:2;131592:12;:16::i;:::-;131556:52;;111645:8;131621:15;:23;;;:39;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;111645:8;131698:13;:21;;;:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;131752:43;131798:1;:7;;131752:53;;131820:27;131850:5;:11;131856:4;131850:11;;;;;;;;;;;;;;;131820:41;;131878:74;131883:2;131887:19;131903:2;131887:15;:19::i;:::-;131908:43;131933:13;131948:2;131908:24;:43::i;:::-;131878:4;:74::i;:::-;131974:1;:16;;:20;131991:2;131974:20;;;;;;;;;;;;131967:27;;;;;;;;;;;132011:17;132031:46;132036:9;132049:15;:27;;;132047:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;132031:46;;:4;:46::i;:::-;132011:66;;;;132092:61;132097:9;132108:25;132113:2;132117:15;132129:2;132117:11;:15::i;:::-;132108:4;:25::i;:::-;132092:61;;132142:9;132092:4;:61::i;:::-;132170:59;132175:2;132179:22;132191:9;132179:11;:22::i;:::-;132203:25;132208:2;132212:15;132224:2;132212:11;:15::i;:::-;132203:4;:25::i;:::-;132170:4;:59::i;:::-;132244:9;132256:13;:25;;;:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;132244:39;;;;132298:30;132303:5;:9;132309:2;132303:9;;;;;;;;;;;;;;;132314:1;132324:2;132298:4;:30::i;:::-;132343:36;132348:2;132352:15;132364:2;132352:11;:15::i;:::-;132376:1;132343:4;:36::i;:::-;131673:718;;;;132525:4;132519;132512:18;132672:2;132668;132664:11;132660:2;132656:20;132648:4;132644:2;132640:13;132636:2;132632:22;132605:25;132599:4;132593;132588:89;132454:234;;;;130797:1898;;;;:::o;147473:185::-;147606:1;147600:4;147593:15;147635:4;147629;147622:18;140124:207;140315:8;140255:18;:16;:18::i;:::-;:36;;:47;140292:9;140255:47;;;;;;;;;;;;;;;:57;140303:8;140255:57;;;;;;;;;;;;;;;;:68;;;;;;;;;;;;;;;;;;140124:207;;;:::o;148274:187::-;148321:14;148440:1;148433:9;148426:17;148416:27;;148274:187;;;:::o;138614:163::-;138675:7;138700:11;138708:2;138700:7;:11::i;:::-;138695:44;;138720:19;;;;;;;;;;;;;;138695:44;138757:12;138766:2;138757:8;:12::i;:::-;138750:19;;138614:163;;;:::o;139498:500::-;139620:13;139651:22;139676:18;:16;:18::i;:::-;139651:43;;139715:1;:16;;:49;139732:31;139737:1;:4;;139743:19;139759:2;139743:15;:19::i;:::-;139732:4;:31::i;:::-;139715:49;;;;;;;;;;;;;;;;;;;;;;;;;139707:57;;139794:5;139781:18;;:9;:18;;;139777:171;;139821:1;:19;;:26;139841:5;139821:26;;;;;;;;;;;;;;;:37;139848:9;139821:37;;;;;;;;;;;;;;;;;;;;;;;;;139816:121;;139886:35;;;;;;;;;;;;;;139816:121;139777:171;139983:7;139960:1;:16;;:20;139977:2;139960:20;;;;;;;;;;;;:30;;;;;;;;;;;;;;;;;;139640:358;139498:500;;;;;:::o;139086:192::-;139151:7;139176:11;139184:2;139176:7;:11::i;:::-;139171:44;;139196:19;;;;;;;;;;;;;;139171:44;139233:18;:16;:18::i;:::-;:33;;:37;139267:2;139233:37;;;;;;;;;;;;;;;;;;;;;139226:44;;139086:192;;;:::o;138002:153::-;138071:7;138098:18;:16;:18::i;:::-;:30;;:37;138129:5;138098:37;;;;;;;;;;;;;;;:49;;;;;;;;;;;;138091:56;;;;138002:153;;;:::o;137825:126::-;137883:7;137910:18;:16;:18::i;:::-;:33;;;;;;;;;;;;137903:40;;;;137825:126;:::o;151527:92::-;151573:13;151606:5;151599:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;151527:92;:::o;150799:123::-;150884:30;150896:8;150906:7;150884:11;:30::i;:::-;150799:123;;:::o;118746:158::-;118820:4;118837:37;118846:10;118858:7;118867:6;118837:8;:37::i;:::-;118892:4;118885:11;;118746:158;;;;:::o;118017:126::-;118069:7;118104:18;:16;:18::i;:::-;:30;;;;;;;;;;;;118096:39;;118089:46;;118017:126;:::o;150254:30::-;;;;;;;;;;;;;:::o;151170:113::-;86049:13;:11;:13::i;:::-;151270:5:::1;151248:6;:19;151255:11;151248:19;;;;;;;;;;;;;;;;:27;;;;;;;;;;;;;;;;;;151170:113:::0;;:::o;150222:25::-;;;;;;;;;;;;;:::o;120264:488::-;120352:4;120369:20;120392:18;:16;:18::i;:::-;:28;;:34;120421:4;120392:34;;;;;;;;;;;;;;;:46;120427:10;120392:46;;;;;;;;;;;;;;;120369:69;;120449:15;120467:1;:7;;;120449:25;;120502:17;120491:7;:28;120487:198;;120549:7;120540:6;:16;120536:52;;;120565:23;;;;;;;;;;;;;;120536:52;120652:6;120642:7;:16;120632:1;:7;;:26;;;;120487:198;120695:27;120705:4;120711:2;120715:6;120695:9;:27::i;:::-;120740:4;120733:11;;;;120264:488;;;;;:::o;82470:630::-;82565:15;82601:28;:26;:28::i;:::-;82583:46;;:15;:46;82565:64;;82801:19;82795:4;82788:33;82852:8;82846:4;82839:22;82909:7;82902:4;82896;82886:21;82879:38;83058:8;83011:45;83008:1;83005;83000:67;82701:381;82470:630::o;135082:294::-;135146:4;135163:21;135187:18;:16;:18::i;:::-;:30;;:37;135218:5;135187:37;;;;;;;;;;;;;;;135163:61;;135283:1;112029:6;135239:1;:7;;;;;;;;;;;;:40;:45;;;135235:73;;135293:15;135302:5;135293:8;:15::i;:::-;135286:22;;;;;135235:73;135367:1;112166:6;135326:1;:7;;;;;;;;;;;;:37;:42;;;;135319:49;;;135082:294;;;;:::o;135488:100::-;135548:32;135560:10;135572:7;135548:11;:32::i;:::-;135488:100;:::o;117876:76::-;117917:5;117942:2;117935:9;;117876:76;:::o;151070:92::-;86049:13;:11;:13::i;:::-;151149:5:::1;151133:13;;:21;;;;;;;;;;;;;;;;;;151070:92:::0;:::o;137654:119::-;137707:7;137734:18;:16;:18::i;:::-;:31;;;;;;;;;;;;137727:38;;137654:119;:::o;150930:132::-;86049:13;:11;:13::i;:::-;151049:5:::1;151017:11;:29;151029:16;151017:29;;;;;;;;;;;;;;;;:37;;;;;;;;;;;;;;;;;;150930:132:::0;;:::o;83185:466::-;83391:19;83385:4;83378:33;83438:8;83432:4;83425:22;83491:1;83484:4;83478;83468:21;83461:32;83624:8;83578:44;83575:1;83572;83567:66;83185:466::o;150343:38::-;;;;;;;;;;;;;;;;;;;;;;:::o;118212:143::-;118275:7;118302:18;:16;:18::i;:::-;:30;;:37;118333:5;118302:37;;;;;;;;;;;;;;;:45;;;;;;;;;;;;118295:52;;;;118212:143;;;:::o;82205:102::-;86049:13;:11;:13::i;:::-;82278:21:::1;82296:1;82278:9;:21::i;:::-;82205:102::o:0;84910:187::-;84956:14;85067:11;85061:18;85051:28;;84910:187;:::o;151627:96::-;151675:13;151708:7;151701:14;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;151627:96;:::o;119417:150::-;119487:4;119504:33;119514:10;119526:2;119530:6;119504:9;:33::i;:::-;119555:4;119548:11;;119417:150;;;;:::o;150293:43::-;;;;;;;;;;;;;;;;;;;;;;:::o;151731:237::-;151796:20;151859:1;151839:8;151833:22;;;;;:::i;:::-;;;:27;151829:132;;151910:8;151920:27;151939:7;151920:18;:27::i;:::-;151893:55;;;;;;;;;:::i;:::-;;;;;;;;;;;;;151877:72;;151829:132;151731:237;;;:::o;118453:157::-;118525:7;118552:18;:16;:18::i;:::-;:28;;:35;118581:5;118552:35;;;;;;;;;;;;;;;:44;118588:7;118552:44;;;;;;;;;;;;;;;:50;;;118545:57;;118453:157;;;;:::o;83842:724::-;86049:13;:11;:13::i;:::-;84080:19:::1;84074:4;84067:33;84127:12;84121:4;84114:26;84190:4;84184;84174:21;84298:12;84292:19;84279:11;84276:36;84273:160;;;84345:10;84339:4;84332:24;84413:4;84407;84400:18;84273:160;84512:1;84498:12;84491:23;83996:529;84535:23;84545:12;84535:9;:23::i;:::-;83842:724:::0;:::o;81779:358::-;86049:13;:11;:13::i;:::-;81954:8:::1;81950:2;81946:17;81936:153;;81997:10;81991:4;81984:24;82069:4;82063;82056:18;81936:153;82110:19;82120:8;82110:9;:19::i;:::-;81779:358:::0;:::o;85203:449::-;85326:14;85482:19;85476:4;85469:33;85529:12;85523:4;85516:26;85628:4;85622;85612:21;85606:28;85596:38;;85203:449;;;:::o;147949:99::-;148007:7;148039:1;148034;:6;;148027:13;;147949:99;;;:::o;148529:166::-;148603:13;148684:1;148678;148670:5;:9;148669:16;;148645:3;:7;;:19;148662:1;148653:5;:10;;148645:19;;;;;;;;;;;;:41;;148629:58;;148529:166;;;;:::o;136295:382::-;136358:21;136396:18;:16;:18::i;:::-;:30;;:37;136427:5;136396:37;;;;;;;;;;;;;;;136392:41;;136494:1;112029:6;136450:1;:7;;;;;;;;;;;;:40;:45;;;136446:224;;136512:11;112029:6;136512:44;;136575:15;136584:5;136575:8;:15::i;:::-;136571:57;;;112166:6;136592:36;;;;136571:57;136653:5;136643:1;:7;;;:15;;;;;;;;;;;;;;;;;;136497:173;136446:224;136295:382;;;:::o;136843:469::-;136977:19;137014:22;137039:18;:16;:18::i;:::-;137014:43;;137083:13;:26;;;;;;;;;;;;137068:41;;137140:1;137124:12;:17;;;137120:185;;137175:1;:12;;;137173:14;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;137158:29;;137231:12;137202:13;:26;;;:41;;;;;;;;;;;;;;;;;;137291:2;137258:1;:16;;:30;137275:12;137258:30;;;;;;;;;;;;;;;;:35;;;;;;;;;;;;;;;;;;137120:185;137003:309;136843:469;;;;:::o;148763:542::-;148929:8;148923:4;148916:22;148972:5;148969:1;148965:13;148959:4;148952:27;149018:4;149012;149002:21;149081:1;149074:5;149070:13;149067:1;149063:21;149144:1;149138:8;149192:10;149277:5;149273:1;149270;149266:9;149262:21;149259:1;149255:29;149252:1;149248:37;149245:1;149241:45;149238:1;149231:56;148901:397;;;;148763:542;;;:::o;148094:137::-;148148:7;148211:1;148206;148201;:6;;148200:12;148193:19;;148094:137;;;:::o;138829:118::-;138889:4;138937:1;138913:26;;:12;138922:2;138913:8;:12::i;:::-;:26;;;;138906:33;;138829:118;;;:::o;138294:199::-;138355:7;138375:22;138400:18;:16;:18::i;:::-;138375:43;;138436:1;:16;;:49;138453:31;138458:1;:4;;138464:19;138480:2;138464:15;:19::i;:::-;138453:4;:31::i;:::-;138436:49;;;;;;;;;;;;;;;;;;;;;;;;;138429:56;;;138294:199;;;:::o;135815:301::-;135891:21;135915:19;135928:5;135915:12;:19::i;:::-;135891:43;;135997:5;135949:53;;135991:1;112166:6;135950:1;:7;;;;;;;;;;;;:37;:42;;;;135949:53;;;135945:124;;112166:6;136019:1;:7;;;:38;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;135945:124;136095:5;136084:24;;;136102:5;136084:24;;;;;;:::i;:::-;;;;;;;;135880:236;135815:301;;:::o;133105:466::-;133252:6;133199:18;:16;:18::i;:::-;:28;;:35;133228:5;133199:35;;;;;;;;;;;;;;;:44;133235:7;133199:44;;;;;;;;;;;;;;;:50;;:59;;;;133393:6;133387:4;133380:20;133543:7;133539:2;133535:16;133531:2;133527:25;133518:5;133514:2;133510:14;133506:2;133502:23;133475:25;133469:4;133463;133458:95;133105:466;;;:::o;80700:364::-;80916:11;80910:18;80900:8;80897:32;80887:159;;80963:10;80957:4;80950:24;81026:4;81020;81013:18;80887:159;80700:364::o;151291:228::-;151392:6;:10;151399:2;151392:10;;;;;;;;;;;;;;;;;;;;;;;;;151389:79;;;151412:13;;;;;;;;;;;:34;;;;151429:11;:17;151441:4;151429:17;;;;;;;;;;;;;;;;;;;;;;;;;151412:34;:53;;;;151450:11;:15;151462:2;151450:15;;;;;;;;;;;;;;;;;;;;;;;;;151412:53;151404:62;;;;;;151389:79;151478:33;151494:4;151500:2;151504:6;151478:15;:33::i;:::-;151291:228;;;:::o;81300:112::-;81369:6;81395:9;81388:16;;81300:112;:::o;146899:217::-;146950:11;147064:1;147052:14;147042:24;;146899:217;;;:::o;79526:1113::-;79595:23;:21;:23::i;:::-;79591:1041;;;79728:11;79830:8;79826:2;79822:17;79818:2;79814:26;79802:38;;79986:8;79974:9;79968:16;79928:38;79925:1;79922;79917:78;80101:8;80094:16;80089:3;80085:26;80075:8;80072:40;80061:9;80054:59;79692:436;79591:1041;;;80253:11;80355:8;80351:2;80347:17;80343:2;80339:26;80327:38;;80511:8;80499:9;80493:16;80453:38;80450:1;80447;80442:78;80597:8;80586:9;80579:27;80217:404;79591:1041;79526:1113;:::o;22018:1676::-;22074:17;22526:4;22519;22513:11;22509:22;22502:29;;22627:4;22622:3;22618:14;22612:4;22605:28;22710:1;22705:3;22698:14;22814:3;22846:1;22842:6;23058:5;23040:410;23066:1;23040:410;;;23106:1;23101:3;23097:11;23090:18;;23295:2;23289:4;23285:13;23281:2;23277:22;23272:3;23264:36;23389:2;23383:4;23379:13;23371:21;;23420:4;23040:410;23410:25;23040:410;23044:21;23489:3;23484;23480:13;23604:4;23599:3;23595:14;23588:21;;23669:6;23664:3;23657:19;22157:1530;;;22018:1676;;;:::o;126811:3561::-;126918:1;126904:16;;:2;:16;;;126900:52;;126929:23;;;;;;;;;;;;;;126900:52;126965:22;126990:18;:16;:18::i;:::-;126965:43;;127021:35;127059:18;127072:4;127059:12;:18::i;:::-;127021:56;;127088:33;127124:16;127137:2;127124:12;:16::i;:::-;127088:52;;127153:23;;:::i;:::-;127207:15;:27;;;;;;;;;;;;127187:47;;:1;:17;;:47;;;;;127263:13;:25;;;;;;;;;;;;127245:43;;:1;:15;;:43;;;;;127315:15;:23;;;;;;;;;;;;127299:39;;:1;:13;;:39;;;;;127364:1;:13;;;127355:6;:22;127351:56;;;127386:21;;;;;;;;;;;;;;127351:56;127462:6;127445:1;:13;;:23;;;;;;;;;;;127516:1;:13;;;127483:15;:23;;;:47;;;;;;;;;;;;;;;;;;127614:6;127590:13;:21;;;;;;;;;;;;:30;;;127576:1;:11;;:44;;;;127545:13;:21;;;:76;;;;;;;;;;;;;;;;;;127658:54;127672:1;:17;;;111645:8;127691:1;:13;;;:20;;;;;:::i;:::-;;;127658:13;:54::i;:::-;127638:1;:17;;:74;;;;;127786:1;112166:6;127733:13;:19;;;;;;;;;;;;:49;:54;;;127729:255;;127820:2;127812:10;;:4;:10;;;127808:71;;127862:1;:17;;;127842:1;:17;;;:37;127824:1;:15;;:55;;;;;127808:71;127918:50;111645:8;127932:1;:11;;;:18;;;;;:::i;:::-;;;127952:1;:15;;;127918:13;:50::i;:::-;127898:1;:17;;:70;;;;;127729:255;128000:29;128032:56;128070:1;:17;;;128050:1;:17;;;:37;128032:17;:56::i;:::-;128000:88;;128103:20;128126:1;:4;;128103:27;;128172:1;128151;:17;;;:22;128147:701;;128194:27;128224:1;:7;;:13;128232:4;128224:13;;;;;;;;;;;;;;;128194:43;;128256:17;128276:1;:17;;;128256:37;;128312:15;128342:1;:17;;;128330:9;:29;128312:47;;128405:1;:17;;;128378:1;:16;;;:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;128479:7;128442:15;:27;;;:45;;;;;;;;;;;;;;;;;;128537:296;128563:10;128576:28;128581:9;128592:11;;;;;;;128576:4;:28::i;:::-;128563:41;;;;128627;128655:2;128659;128663:1;128666;128627:27;:41::i;:::-;128698:1;:16;;:20;128715:2;128698:20;;;;;;;;;;;;128691:27;;;;;;;;;;;128741:42;128759:10;128771:4;128777:2;128781:1;128741:17;:42::i;:::-;128540:263;128824:7;128811:9;:20;128537:296;;128175:673;;;128147:701;128889:1;128868;:17;;;:22;128864:1064;;128911:25;128939:1;:7;;:11;128947:2;128939:11;;;;;;;;;;;;;;;128911:39;;128969:15;128987:1;:15;;;128969:33;;129021:13;129047:1;:17;;;129037:7;:27;129021:43;;129083:14;129100:43;129125:13;129140:2;129100:24;:43::i;:::-;129083:60;;129162:16;111645:8;129181:1;:13;;;;;;;;;;;;:20;;;;;;;:::i;:::-;;;129162:39;;129220:10;129233:1;:13;;;;;;;;;;;;129220:26;;;;129292:1;:17;;;129265:1;:16;;;:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;129364:5;129329:13;:25;;;:41;;;;;;;;;;;;;;;;;;129420:448;129446:121;129486:1;129453:29;129458:2;129462:19;129478:2;129462:15;:19::i;:::-;129453:4;:29::i;:::-;:34;;;129446:121;;129527:8;129520:4;;;;;;:15;129516:27;;;129542:1;129537:6;;129516:27;129446:121;;;129589:34;129594:7;129603;129619:2;129589:4;:34::i;:::-;129646:63;129674:2;129678;129682:7;129698:9;;;;;;129646:27;:63::i;:::-;129732:40;129750:10;129762:2;129766;129770:1;129732:17;:40::i;:::-;129806:8;129799:4;;;;;;:15;129795:27;;;129821:1;129816:6;;129795:27;129861:5;129850:7;:16;129420:448;;129909:2;129886:1;:13;;;:26;;;;;;;;;;;;;;;;;;128892:1036;;;;;;128864:1064;129974:1;129948:10;:15;;;:22;:27;129944:111;;129996:43;130012:10;130024:1;:14;;;;;;;;;;;;129996:15;:43::i;:::-;129944:111;127420:2646;;130200:6;130194:4;130187:20;130349:2;130345;130341:11;130337:2;130333:20;130325:4;130321:2;130317:13;130313:2;130309:22;130282:25;130276:4;130270;130265:89;130129:236;;;;126811:3561;;;:::o;77690:78::-;77754:10;77690:78;:::o;147705:204::-;147772:9;147888:1;147885;147881:9;147877:1;147874;147871:8;147867:24;147862:29;;147705:204;;;;:::o;144696:637::-;144756:20;;:::i;:::-;145040:4;145034:11;145072:1;145066:4;145059:15;145133:4;145127;145123:15;145184:1;145181;145177:9;145169:6;145165:22;145159:4;145152:36;145243:4;145239:1;145233:4;145229:12;145222:26;145289:6;145286:1;145279:17;144842:484;;144696:637;;;:::o;149378:708::-;149670:9;149658:10;149654:26;149641:10;149637:2;149633:19;149630:51;149708:8;149702:4;149695:22;149751:2;149748:1;149744:10;149738:4;149731:24;149794:4;149788;149778:21;149854:1;149850:2;149846:10;149843:1;149839:18;149917:1;149911:8;149965:18;150058:5;150054:1;150051;150047:9;150043:21;150040:1;150036:29;150033:1;150029:37;150026:1;150022:45;150019:1;150012:56;149602:477;;;;;149378:708;;;;:::o;145439:355::-;145663:1;145657:8;145725:7;145719:2;145716:1;145712:10;145708:1;145704:2;145700:10;145697:26;145694:39;145686:6;145679:55;145770:4;145762:6;145758:17;145755:1;145748:28;145628:159;145439:355;;;;:::o;145895:645::-;146070:4;146067:1;146063:12;146057:19;146109:4;146103;146099:15;146168:10;146165:1;146158:21;146243:4;146236;146233:1;146229:12;146222:26;146339:4;146333:11;146330:1;146326:19;146320:4;146316:30;146465:4;146462:1;146459;146452:4;146449:1;146445:12;146442:1;146434:6;146427:5;146422:48;146418:1;146414;146408:8;146405:15;146401:70;146391:131;;146502:4;146499:1;146492:15;146391:131;146030:503;;;145895:645;;:::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;1430:117::-;1539:1;1536;1529: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:90::-;2217:7;2260:5;2253:13;2246:21;2235:32;;2183:90;;;:::o;2279:116::-;2349:21;2364:5;2349:21;:::i;:::-;2342:5;2339:32;2329:60;;2385:1;2382;2375:12;2329:60;2279:116;:::o;2401:133::-;2444:5;2482:6;2469:20;2460:29;;2498:30;2522:5;2498:30;:::i;:::-;2401:133;;;;:::o;2540:468::-;2605:6;2613;2662:2;2650:9;2641:7;2637:23;2633:32;2630:119;;;2668:79;;:::i;:::-;2630:119;2788:1;2813:53;2858:7;2849:6;2838:9;2834:22;2813:53;:::i;:::-;2803:63;;2759:117;2915:2;2941:50;2983:7;2974:6;2963:9;2959:22;2941:50;:::i;:::-;2931:60;;2886:115;2540:468;;;;;:::o;3014:77::-;3051:7;3080:5;3069:16;;3014:77;;;:::o;3097:122::-;3170:24;3188:5;3170:24;:::i;:::-;3163:5;3160:35;3150:63;;3209:1;3206;3199:12;3150:63;3097:122;:::o;3225:139::-;3271:5;3309:6;3296:20;3287:29;;3325:33;3352:5;3325:33;:::i;:::-;3225:139;;;;:::o;3370:474::-;3438:6;3446;3495:2;3483:9;3474:7;3470:23;3466:32;3463:119;;;3501:79;;:::i;:::-;3463:119;3621:1;3646:53;3691:7;3682:6;3671:9;3667:22;3646:53;:::i;:::-;3636:63;;3592:117;3748:2;3774:53;3819:7;3810:6;3799:9;3795:22;3774:53;:::i;:::-;3764:63;;3719:118;3370:474;;;;;:::o;3850:109::-;3931:21;3946:5;3931:21;:::i;:::-;3926:3;3919:34;3850:109;;:::o;3965:210::-;4052:4;4090:2;4079:9;4075:18;4067:26;;4103:65;4165:1;4154:9;4150:17;4141:6;4103:65;:::i;:::-;3965:210;;;;:::o;4181:118::-;4268:24;4286:5;4268:24;:::i;:::-;4263:3;4256:37;4181:118;;:::o;4305:222::-;4398:4;4436:2;4425:9;4421:18;4413:26;;4449:71;4517:1;4506:9;4502:17;4493:6;4449:71;:::i;:::-;4305:222;;;;:::o;4533:118::-;4620:24;4638:5;4620:24;:::i;:::-;4615:3;4608:37;4533:118;;:::o;4657:222::-;4750:4;4788:2;4777:9;4773:18;4765:26;;4801:71;4869:1;4858:9;4854:17;4845:6;4801:71;:::i;:::-;4657:222;;;;:::o;4885:619::-;4962:6;4970;4978;5027:2;5015:9;5006:7;5002:23;4998:32;4995:119;;;5033:79;;:::i;:::-;4995:119;5153:1;5178:53;5223:7;5214:6;5203:9;5199:22;5178:53;:::i;:::-;5168:63;;5124:117;5280:2;5306:53;5351:7;5342:6;5331:9;5327:22;5306:53;:::i;:::-;5296:63;;5251:118;5408:2;5434:53;5479:7;5470:6;5459:9;5455:22;5434:53;:::i;:::-;5424:63;;5379:118;4885:619;;;;;:::o;5510:329::-;5569:6;5618:2;5606:9;5597:7;5593:23;5589:32;5586:119;;;5624:79;;:::i;:::-;5586:119;5744:1;5769:53;5814:7;5805:6;5794:9;5790:22;5769:53;:::i;:::-;5759:63;;5715:117;5510:329;;;;:::o;5845:323::-;5901:6;5950:2;5938:9;5929:7;5925:23;5921:32;5918:119;;;5956:79;;:::i;:::-;5918:119;6076:1;6101:50;6143:7;6134:6;6123:9;6119:22;6101:50;:::i;:::-;6091:60;;6047:114;5845:323;;;;:::o;6174:86::-;6209:7;6249:4;6242:5;6238:16;6227:27;;6174:86;;;:::o;6266:112::-;6349:22;6365:5;6349:22;:::i;:::-;6344:3;6337:35;6266:112;;:::o;6384:214::-;6473:4;6511:2;6500:9;6496:18;6488:26;;6524:67;6588:1;6577:9;6573:17;6564:6;6524:67;:::i;:::-;6384:214;;;;:::o;6604:329::-;6663:6;6712:2;6700:9;6691:7;6687:23;6683:32;6680:119;;;6718:79;;:::i;:::-;6680:119;6838:1;6863:53;6908:7;6899:6;6888:9;6884:22;6863:53;:::i;:::-;6853:63;;6809:117;6604:329;;;;:::o;6939:474::-;7007:6;7015;7064:2;7052:9;7043:7;7039:23;7035:32;7032:119;;;7070:79;;:::i;:::-;7032:119;7190:1;7215:53;7260:7;7251:6;7240:9;7236:22;7215:53;:::i;:::-;7205:63;;7161:117;7317:2;7343:53;7388:7;7379:6;7368:9;7364:22;7343:53;:::i;:::-;7333:63;;7288:118;6939:474;;;;;:::o;7419:109::-;7455:7;7495:26;7488:5;7484:38;7473:49;;7419:109;;;:::o;7534:180::-;7582:77;7579:1;7572:88;7679:4;7676:1;7669:15;7703:4;7700:1;7693:15;7720:216;7759:4;7779:19;7796:1;7779:19;:::i;:::-;7774:24;;7812:19;7829:1;7812:19;:::i;:::-;7807:24;;7855:1;7852;7848:9;7840:17;;7879:26;7873:4;7870:36;7867:62;;;7909:18;;:::i;:::-;7867:62;7720:216;;;;:::o;7942:180::-;7990:77;7987:1;7980:88;8087:4;8084:1;8077:15;8111:4;8108:1;8101:15;8128:320;8172:6;8209:1;8203:4;8199:12;8189:22;;8256:1;8250:4;8246:12;8277:18;8267:81;;8333:4;8325:6;8321:17;8311:27;;8267:81;8395:2;8387:6;8384:14;8364:18;8361:38;8358:84;;8414:18;;:::i;:::-;8358:84;8179:269;8128:320;;;:::o;8454:148::-;8556:11;8593:3;8578:18;;8454:148;;;;:::o;8608:141::-;8657:4;8680:3;8672:11;;8703:3;8700:1;8693:14;8737:4;8734:1;8724:18;8716:26;;8608:141;;;:::o;8779:874::-;8882:3;8919:5;8913:12;8948:36;8974:9;8948:36;:::i;:::-;9000:89;9082:6;9077:3;9000:89;:::i;:::-;8993:96;;9120:1;9109:9;9105:17;9136:1;9131:166;;;;9311:1;9306:341;;;;9098:549;;9131:166;9215:4;9211:9;9200;9196:25;9191:3;9184:38;9277:6;9270:14;9263:22;9255:6;9251:35;9246:3;9242:45;9235:52;;9131:166;;9306:341;9373:38;9405:5;9373:38;:::i;:::-;9433:1;9447:154;9461:6;9458:1;9455:13;9447:154;;;9535:7;9529:14;9525:1;9520:3;9516:11;9509:35;9585:1;9576:7;9572:15;9561:26;;9483:4;9480:1;9476:12;9471:17;;9447:154;;;9630:6;9625:3;9621:16;9614:23;;9313:334;;9098:549;;8886:767;;8779:874;;;;:::o;9659:390::-;9765:3;9793:39;9826:5;9793:39;:::i;:::-;9848:89;9930:6;9925:3;9848:89;:::i;:::-;9841:96;;9946:65;10004:6;9999:3;9992:4;9985:5;9981:16;9946:65;:::i;:::-;10036:6;10031:3;10027:16;10020:23;;9769:280;9659:390;;;;:::o;10055:429::-;10232:3;10254:92;10342:3;10333:6;10254:92;:::i;:::-;10247:99;;10363:95;10454:3;10445:6;10363:95;:::i;:::-;10356:102;;10475:3;10468:10;;10055:429;;;;;:::o;10490:93::-;10526:7;10566:10;10559:5;10555:22;10544:33;;10490:93;;;:::o;10589:175::-;10627:3;10650:23;10667:5;10650:23;:::i;:::-;10641:32;;10695:10;10688:5;10685:21;10682:47;;10709:18;;:::i;:::-;10682:47;10756:1;10749:5;10745:13;10738:20;;10589:175;;;:::o;10770:180::-;10818:77;10815:1;10808:88;10915:4;10912:1;10905:15;10939:4;10936:1;10929:15
Swarm Source
ipfs://bc0da236b4fdda51a22760c7460093458a02e6bd9a5194a78ba9d17566db147d
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.