ERC-20
Overview
Max Total Supply
1,000,000,000,000,000,000,000 NANA
Holders
31
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 0 Decimals)
Balance
2,350,589,460,251,298,406 NANAValue
$0.00Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
BananaFarm404
Compiler Version
v0.8.20+commit.a1b79de6
Contract Source Code (Solidity Multiple files format)
/** Welcome to the BananaFarm, where DN404 meets Olympus DAO! 🍌🏦 dApp: https://nana404.finance/ Docs: https://bananafarm404.gitbook.io/bananafarm404/ Twitter: https://twitter.com/NANAdn404 TG: https://t.me/NANAdn404 */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "./DN404.sol"; import "./DN404Mirror.sol"; 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) ) ) } } } 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) } } } 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(); _; } } abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } } interface IAccessControl { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged( bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole ); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted( bytes32 indexed role, address indexed account, address indexed sender ); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked( bytes32 indexed role, address indexed account, address indexed sender ); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole( bytes32 role, address account ) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) external; } interface IAccessControlEnumerable is IAccessControl { /** * @dev Returns one of the accounts that have `role`. `index` must be a * value between 0 and {getRoleMemberCount}, non-inclusive. * * Role bearers are not sorted in any particular way, and their ordering may * change at any point. * * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure * you perform all queries on the same block. See the following * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] * for more information. */ function getRoleMember( bytes32 role, uint256 index ) external view returns (address); /** * @dev Returns the number of accounts that have `role`. Can be used * together with {getRoleMember} to enumerate all bearers of a role. */ function getRoleMemberCount(bytes32 role) external view returns (uint256); } interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); } abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface( bytes4 interfaceId ) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } } library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv( uint256 x, uint256 y, uint256 denominator ) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv( uint256 x, uint256 y, uint256 denominator, Rounding rounding ) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt( uint256 a, Rounding rounding ) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2( uint256 value, Rounding rounding ) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10 ** 64) { value /= 10 ** 64; result += 64; } if (value >= 10 ** 32) { value /= 10 ** 32; result += 32; } if (value >= 10 ** 16) { value /= 10 ** 16; result += 16; } if (value >= 10 ** 8) { value /= 10 ** 8; result += 8; } if (value >= 10 ** 4) { value /= 10 ** 4; result += 4; } if (value >= 10 ** 2) { value /= 10 ** 2; result += 2; } if (value >= 10 ** 1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10( uint256 value, Rounding rounding ) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256( uint256 value, Rounding rounding ) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0); } } } library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString( uint256 value, uint256 length ) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } } abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with a standardized message including the required role. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ * * _Available since v4.1._ */ modifier onlyRole(bytes32 role) { _checkRole(role); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface( bytes4 interfaceId ) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole( bytes32 role, address account ) public view virtual override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `_msgSender()` is missing `role`. * Overriding this function changes the behavior of the {onlyRole} modifier. * * Format of the revert message is described in {_checkRole}. * * _Available since v4.6._ */ function _checkRole(bytes32 role) internal view virtual { _checkRole(role, _msgSender()); } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ */ function _checkRole(bytes32 role, address account) internal view virtual { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", Strings.toHexString(account), " is missing role ", Strings.toHexString(uint256(role), 32) ) ) ); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin( bytes32 role ) public view virtual override returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleGranted} event. */ function grantRole( bytes32 role, address account ) public virtual override onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleRevoked} event. */ function revokeRole( bytes32 role, address account ) public virtual override onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. * * May emit a {RoleRevoked} event. */ function renounceRole( bytes32 role, address account ) public virtual override { require( account == _msgSender(), "AccessControl: can only renounce roles for self" ); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * May emit a {RoleGranted} event. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== * * NOTE: This function is deprecated in favor of {_grantRole}. */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Grants `role` to `account`. * * Internal function without access restriction. * * May emit a {RoleGranted} event. */ function _grantRole(bytes32 role, address account) internal virtual { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } /** * @dev Revokes `role` from `account`. * * Internal function without access restriction. * * May emit a {RoleRevoked} event. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } } library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; if (lastIndex != toDeleteIndex) { bytes32 lastValue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastValue; // Update the index for the moved value set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex } // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains( Set storage set, bytes32 value ) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at( Set storage set, uint256 index ) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add( Bytes32Set storage set, bytes32 value ) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove( Bytes32Set storage set, bytes32 value ) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains( Bytes32Set storage set, bytes32 value ) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at( Bytes32Set storage set, uint256 index ) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values( Bytes32Set storage set ) internal view returns (bytes32[] memory) { bytes32[] memory store = _values(set._inner); bytes32[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add( AddressSet storage set, address value ) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove( AddressSet storage set, address value ) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains( AddressSet storage set, address value ) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at( AddressSet storage set, uint256 index ) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values( AddressSet storage set ) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove( UintSet storage set, uint256 value ) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains( UintSet storage set, uint256 value ) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values in the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at( UintSet storage set, uint256 index ) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values( UintSet storage set ) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } } abstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl { using EnumerableSet for EnumerableSet.AddressSet; mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface( bytes4 interfaceId ) public view virtual override returns (bool) { return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns one of the accounts that have `role`. `index` must be a * value between 0 and {getRoleMemberCount}, non-inclusive. * * Role bearers are not sorted in any particular way, and their ordering may * change at any point. * * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure * you perform all queries on the same block. See the following * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] * for more information. */ function getRoleMember( bytes32 role, uint256 index ) public view virtual override returns (address) { return _roleMembers[role].at(index); } /** * @dev Returns the number of accounts that have `role`. Can be used * together with {getRoleMember} to enumerate all bearers of a role. */ function getRoleMemberCount( bytes32 role ) public view virtual override returns (uint256) { return _roleMembers[role].length(); } /** * @dev Overload {_grantRole} to track enumerable memberships */ function _grantRole( bytes32 role, address account ) internal virtual override { super._grantRole(role, account); _roleMembers[role].add(account); } /** * @dev Overload {_revokeRole} to track enumerable memberships */ function _revokeRole( bytes32 role, address account ) internal virtual override { super._revokeRole(role, account); _roleMembers[role].remove(account); } } contract Minter is Context, AccessControlEnumerable { bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); constructor() { _setupRole(DEFAULT_ADMIN_ROLE, _msgSender()); _setupRole(MINTER_ROLE, _msgSender()); } } pragma solidity ^0.8.20; /** * @title SimpleDN404 * @notice Sample DN404 contract that demonstrates the owner selling fungile tokens. * When a user has at least one base unit (10^18) amount of tokens, they will automatically receive an NFT. * NFTs are minted as an address accumulates each base unit amount of tokens. */ contract BananaFarm404 is DN404, Minter, Ownable { string private _name; string private _symbol; string private _baseURI; uint256 public constant MINT_COST = 0.1 ether; constructor( string memory name_, string memory symbol_, uint96 initialTokenSupply, address initialSupplyOwner ) { _initializeOwner(msg.sender); _name = name_; _symbol = symbol_; address mirror = address(new DN404Mirror(msg.sender)); _initializeDN404(initialTokenSupply, initialSupplyOwner, mirror); } 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) { uint256 seed = uint256(keccak256(abi.encodePacked(tokenId))); // we have 5 images string memory image; uint256 index = seed % 100; if(index < 40) { image = "bronze.png"; } else if(index < 70) { image = "silver.png"; } else if(index < 90) { image = "gold.png"; } else if(index < 97) { image = "diamond.png"; } else { image = "emerald.png"; } return string(abi.encodePacked(_baseURI, image)); } } // This allows the owner of the contract to mint more tokens. function mint(address to, uint256 amount) external { require(hasRole(MINTER_ROLE, _msgSender()), "Must have minter role"); _mint(to, amount); } function setBaseURI(string calldata baseURI_) public onlyOwner { _baseURI = baseURI_; } function withdraw() public onlyOwner { SafeTransferLib.safeTransferAllETH(msg.sender); } function mintEarly() external payable { address _this = address(this); uint256 _available = balanceOf(_this); require(1 <= _available); uint256 _cost = 1 * MINT_COST; require(msg.value >= _cost); _transfer(address(this), msg.sender, 1 ether); payable(owner()).transfer(_cost); if (msg.value > _cost) { payable(msg.sender).transfer(msg.value - _cost); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; /// @title DN404 /// @notice DN404 is a hybrid ERC20 and ERC721 implementation that mints /// and burns NFTs based on an account's ERC20 token balance. /// /// @author vectorized.eth (@optimizoor) /// @author Quit (@0xQuit) /// @author Michael Amadi (@AmadiMichaels) /// @author cygaar (@0xCygaar) /// @author Thomas (@0xjustadev) /// @author Harrison (@PopPunkOnChain) /// /// @dev Note: /// - The ERC721 data is stored in this base DN404 contract, however a /// DN404Mirror contract ***MUST*** be deployed and linked during /// initialization. abstract contract DN404 { /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* EVENTS */ /*-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»*/ /// @dev Emitted when `amount` tokens is transferred from `from` to `to`. event Transfer(address indexed from, address indexed to, uint256 amount); /// @dev Emitted when `amount` tokens is approved by `owner` to be used by `spender`. event Approval(address indexed owner, address indexed spender, uint256 amount); /// @dev Emitted when `target` sets their skipNFT flag to `status`. event SkipNFTSet(address indexed target, bool status); /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* CUSTOM ERRORS */ /*-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»*/ /// @dev Thrown when attempting to double-initialize the contract. error DNAlreadyInitialized(); /// @dev Thrown when attempting to transfer or burn more tokens than sender's balance. error InsufficientBalance(); /// @dev Thrown when a spender attempts to transfer tokens with an insufficient allowance. error InsufficientAllowance(); /// @dev Thrown when minting an amount of tokens that would overflow the max tokens. error TotalSupplyOverflow(); /// @dev Thrown when the caller for a fallback NFT function is not the mirror contract. error SenderNotMirror(); /// @dev Thrown when attempting to transfer tokens to the zero address. error TransferToZeroAddress(); /// @dev Thrown when the mirror address provided for initialization is the zero address. error MirrorAddressIsZero(); /// @dev Thrown when the link call to the mirror contract reverts. error LinkMirrorContractFailed(); /// @dev Thrown when setting an NFT token approval /// and the caller is not the owner or an approved operator. error ApprovalCallerNotOwnerNorApproved(); /// @dev Thrown when transferring an NFT /// and the caller is not the owner or an approved operator. error TransferCallerNotOwnerNorApproved(); /// @dev Thrown when transferring an NFT and the from address is not the current owner. error TransferFromIncorrectOwner(); /// @dev Thrown when checking the owner or approved address for an non-existent NFT. error TokenDoesNotExist(); /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* CONSTANTS */ /*-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»*/ /// @dev Amount of token balance that is equal to one NFT. uint256 internal constant _WAD = 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 Struct containing the base token contract storage. struct DN404Storage { // Current number of address aliases assigned. uint32 numAliases; // Next token ID to assign for an NFT mint. uint32 nextTokenId; // Total supply of minted NFTs. uint32 totalNFTSupply; // Total supply of tokens. uint96 totalSupply; // Address of the NFT mirror contract. address mirrorERC721; // Mapping of a user alias number to their address. mapping(uint32 => address) aliasToAddress; // Mapping of user operator approvals for NFTs. mapping(address => mapping(address => bool)) operatorApprovals; // Mapping of NFT token approvals to approved operators. mapping(uint256 => address) tokenApprovals; // Mapping of user allowances for token spenders. mapping(address => mapping(address => uint256)) allowance; // Mapping of NFT token IDs owned by an address. mapping(address => Uint32Map) owned; // Even indices: owner aliases. Odd indices: owned indices. Uint32Map oo; // Mapping of user account AddressData mapping(address => AddressData) addressData; } /// @dev Returns a storage pointer for DN404Storage. function _getDN404Storage() internal pure virtual returns (DN404Storage storage $) { /// @solidity memory-safe-assembly assembly { // `uint72(bytes9(keccak256("DN404_STORAGE")))`. $.slot := 0xa20d6e21d0e5255308 // Truncate to 9 bytes to reduce bytecode size. } } /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* INITIALIZER */ /*-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»*/ /// @dev Initializes the DN404 contract with an /// `initialTokenSupply`, `initialTokenOwner` and `mirror` NFT contract address. function _initializeDN404( uint256 initialTokenSupply, address initialSupplyOwner, address mirror ) internal virtual { DN404Storage storage $ = _getDN404Storage(); if ($.nextTokenId != 0) revert DNAlreadyInitialized(); if (mirror == address(0)) revert MirrorAddressIsZero(); _linkMirrorContract(mirror); $.nextTokenId = 1; $.mirrorERC721 = mirror; if (initialTokenSupply > 0) { if (initialSupplyOwner == address(0)) revert TransferToZeroAddress(); if (initialTokenSupply > _MAX_SUPPLY) revert TotalSupplyOverflow(); $.totalSupply = uint96(initialTokenSupply); AddressData storage initialOwnerAddressData = _addressData(initialSupplyOwner); initialOwnerAddressData.balance = uint96(initialTokenSupply); emit Transfer(address(0), initialSupplyOwner, initialTokenSupply); _setSkipNFT(initialSupplyOwner, true); } } /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* METADATA FUNCTIONS TO OVERRIDE */ /*-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»*/ /// @dev Returns the name of the token. function name() public view virtual returns (string memory); /// @dev Returns the symbol of the token. function symbol() public view virtual returns (string memory); /// @dev Returns the Uniform Resource Identifier (URI) for token `id`. function tokenURI(uint256 id) public view virtual returns (string memory); /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* ERC20 OPERATIONS */ /*-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»*/ /// @dev Returns the decimals places of the token. Always 18. function decimals() public pure returns (uint8) { return 18; } /// @dev Returns the amount of tokens in existence. function totalSupply() public view virtual returns (uint256) { return uint256(_getDN404Storage().totalSupply); } /// @dev Returns the amount of tokens owned by `owner`. function balanceOf(address owner) public view virtual returns (uint256) { return _getDN404Storage().addressData[owner].balance; } /// @dev Returns the amount of tokens that `spender` can spend on behalf of `owner`. function allowance(address owner, address spender) public view returns (uint256) { return _getDN404Storage().allowance[owner][spender]; } /// @dev Sets `amount` as the allowance of `spender` over the caller's tokens. /// /// Emits a {Approval} event. function approve(address spender, uint256 amount) public virtual returns (bool) { DN404Storage storage $ = _getDN404Storage(); $.allowance[msg.sender][spender] = amount; emit Approval(msg.sender, spender, amount); return true; } /// @dev Transfer `amount` tokens from the caller to `to`. /// /// Will burn sender NFTs if balance after transfer is less than /// the amount required to support the current NFT balance. /// /// Will mint NFTs to `to` if the recipient's new balance supports /// additional NFTs ***AND*** the `to` address's skipNFT flag is /// set to false. /// /// Requirements: /// - `from` must at least have `amount`. /// /// Emits a {Transfer} event. function transfer(address to, uint256 amount) public virtual returns (bool) { _transfer(msg.sender, to, amount); return true; } /// @dev Transfers `amount` tokens from `from` to `to`. /// /// Note: Does not update the allowance if it is the maximum uint256 value. /// /// Will burn sender NFTs if balance after transfer is less than /// the amount required to support the current NFT balance. /// /// Will mint NFTs to `to` if the recipient's new balance supports /// additional NFTs ***AND*** the `to` address's skipNFT flag is /// set to false. /// /// Requirements: /// - `from` must at least have `amount`. /// - The caller must have at least `amount` of allowance to transfer the tokens of `from`. /// /// Emits a {Transfer} event. function transferFrom(address from, address to, uint256 amount) public virtual returns (bool) { DN404Storage storage $ = _getDN404Storage(); uint256 allowed = $.allowance[from][msg.sender]; if (allowed != type(uint256).max) { if (amount > allowed) revert InsufficientAllowance(); unchecked { $.allowance[from][msg.sender] = allowed - amount; } } _transfer(from, to, amount); return true; } /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* INTERNAL MINT FUNCTIONS */ /*-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»*/ /// @dev Mints `amount` tokens to `to`, increasing the total supply. /// /// Will mint NFTs to `to` if the recipient's new balance supports /// additional NFTs ***AND*** the `to` address's skipNFT flag is /// set to false. /// /// Emits a {Transfer} event. function _mint(address to, uint256 amount) internal virtual { if (to == address(0)) revert TransferToZeroAddress(); DN404Storage storage $ = _getDN404Storage(); AddressData storage toAddressData = _addressData(to); unchecked { uint256 currentTokenSupply = uint256($.totalSupply) + amount; if (amount > _MAX_SUPPLY || currentTokenSupply > _MAX_SUPPLY) { revert TotalSupplyOverflow(); } $.totalSupply = uint96(currentTokenSupply); uint256 toBalance = toAddressData.balance + amount; toAddressData.balance = uint96(toBalance); if (toAddressData.flags & _ADDRESS_DATA_SKIP_NFT_FLAG == 0) { Uint32Map storage toOwned = $.owned[to]; uint256 toIndex = toAddressData.ownedLength; uint256 toEnd = toBalance / _WAD; _PackedLogs memory packedLogs = _packedLogsMalloc(_zeroFloorSub(toEnd, toIndex)); 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); } } } emit Transfer(address(0), to, amount); } /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* INTERNAL BURN FUNCTIONS */ /*-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»*/ /// @dev Burns `amount` tokens from `from`, reducing the total supply. /// /// Will burn sender NFTs if balance after transfer is less than /// the amount required to support the current NFT balance. /// /// Emits a {Transfer} event. function _burn(address from, uint256 amount) internal virtual { DN404Storage storage $ = _getDN404Storage(); AddressData storage fromAddressData = _addressData(from); uint256 fromBalance = fromAddressData.balance; if (amount > fromBalance) revert InsufficientBalance(); uint256 currentTokenSupply = $.totalSupply; unchecked { fromBalance -= amount; fromAddressData.balance = uint96(fromBalance); currentTokenSupply -= amount; $.totalSupply = uint96(currentTokenSupply); Uint32Map storage fromOwned = $.owned[from]; uint256 fromIndex = fromAddressData.ownedLength; uint256 nftAmountToBurn = _zeroFloorSub(fromIndex, fromBalance / _WAD); if (nftAmountToBurn != 0) { $.totalNFTSupply -= uint32(nftAmountToBurn); _PackedLogs memory packedLogs = _packedLogsMalloc(nftAmountToBurn); uint256 fromEnd = fromIndex - nftAmountToBurn; // Burn loop. do { uint256 id = _get(fromOwned, --fromIndex); _setOwnerAliasAndOwnedIndex($.oo, id, 0, 0); delete $.tokenApprovals[id]; _packedLogsAppend(packedLogs, from, id, 1); } while (fromIndex != fromEnd); fromAddressData.ownedLength = uint32(fromIndex); _packedLogsSend(packedLogs, $.mirrorERC721); } } emit Transfer(from, address(0), amount); } /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* INTERNAL TRANSFER FUNCTIONS */ /*-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»*/ /// @dev Moves `amount` of tokens from `from` to `to`. /// /// Will burn sender NFTs if balance after transfer is less than /// the amount required to support the current NFT balance. /// /// Will mint NFTs to `to` if the recipient's new balance supports /// additional NFTs ***AND*** the `to` address's skipNFT flag is /// set to false. /// /// Emits a {Transfer} event. function _transfer(address from, address to, uint256 amount) internal virtual { if (to == address(0)) revert TransferToZeroAddress(); DN404Storage storage $ = _getDN404Storage(); AddressData storage fromAddressData = _addressData(from); AddressData storage toAddressData = _addressData(to); _TransferTemps memory t; t.fromOwnedLength = fromAddressData.ownedLength; t.toOwnedLength = toAddressData.ownedLength; t.fromBalance = fromAddressData.balance; if (amount > t.fromBalance) revert InsufficientBalance(); unchecked { t.fromBalance -= amount; fromAddressData.balance = uint96(t.fromBalance); toAddressData.balance = uint96(t.toBalance = toAddressData.balance + amount); t.nftAmountToBurn = _zeroFloorSub(t.fromOwnedLength, t.fromBalance / _WAD); 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); 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); } } emit Transfer(from, to, amount); } /// @dev Transfers token `id` from `from` to `to`. /// /// Requirements: /// /// - Call must originate from the mirror contract. /// - Token `id` must exist. /// - `from` must be the owner of the token. /// - `to` cannot be the zero address. /// `msgSender` must be the owner of the token, or be approved to manage the token. /// /// Emits a {Transfer} event. function _transferFromNFT(address from, address to, uint256 id, address msgSender) internal virtual { DN404Storage storage $ = _getDN404Storage(); if (to == address(0)) revert TransferToZeroAddress(); address owner = $.aliasToAddress[_get($.oo, _ownershipIndex(id))]; if (from != owner) revert TransferFromIncorrectOwner(); if (msgSender != from) { if (!$.operatorApprovals[from][msgSender]) { if (msgSender != $.tokenApprovals[id]) { revert TransferCallerNotOwnerNorApproved(); } } } AddressData storage fromAddressData = _addressData(from); AddressData storage toAddressData = _addressData(to); fromAddressData.balance -= uint96(_WAD); unchecked { toAddressData.balance += uint96(_WAD); _set($.oo, _ownershipIndex(id), _registerAndResolveAlias(toAddressData, to)); delete $.tokenApprovals[id]; uint256 updatedId = _get($.owned[from], --fromAddressData.ownedLength); _set($.owned[from], _get($.oo, _ownedIndex(id)), uint32(updatedId)); uint256 n = toAddressData.ownedLength++; _set($.oo, _ownedIndex(updatedId), _get($.oo, _ownedIndex(id))); _set($.owned[to], n, uint32(id)); _set($.oo, _ownedIndex(id), uint32(n)); } emit Transfer(from, to, _WAD); } /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* DATA HITCHHIKING FUNCTIONS */ /*-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»*/ /// @dev Returns the auxiliary data for `owner`. /// Minting, transferring, burning the tokens of `owner` will not change the auxiliary data. /// Auxiliary data can be set for any address, even if it does not have any tokens. function _getAux(address owner) internal view virtual returns (uint88) { return _getDN404Storage().addressData[owner].aux; } /// @dev Set the auxiliary data for `owner` to `value`. /// Minting, transferring, burning the tokens of `owner` will not change the auxiliary data. /// Auxiliary data can be set for any address, even if it does not have any tokens. function _setAux(address owner, uint88 value) internal virtual { _getDN404Storage().addressData[owner].aux = value; } /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* SKIP NFT FUNCTIONS */ /*-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»*/ /// @dev Returns true if account `a` will skip NFT minting on token mints and transfers. /// Returns false if account `a` will mint NFTs on token mints and transfers. function getSkipNFT(address a) public view virtual returns (bool) { AddressData storage d = _getDN404Storage().addressData[a]; if (d.flags & _ADDRESS_DATA_INITIALIZED_FLAG == 0) return _hasCode(a); return d.flags & _ADDRESS_DATA_SKIP_NFT_FLAG != 0; } /// @dev Sets the caller's skipNFT flag to `skipNFT` /// /// Emits a {SkipNFTSet} event. function setSkipNFT(bool skipNFT) public virtual { _setSkipNFT(msg.sender, skipNFT); } /// @dev Internal function to set account `a` skipNFT flag to `state` /// /// Initializes account `a` AddressData if it is not currently initialized. /// /// Emits a {SkipNFTSet} event. function _setSkipNFT(address a, bool state) internal virtual { AddressData storage d = _addressData(a); if ((d.flags & _ADDRESS_DATA_SKIP_NFT_FLAG != 0) != state) { d.flags ^= _ADDRESS_DATA_SKIP_NFT_FLAG; } emit SkipNFTSet(a, state); } /// @dev Returns a storage data pointer for account `a` AddressData /// /// Initializes account `a` AddressData if it is not currently initialized. function _addressData(address a) internal virtual returns (AddressData storage d) { DN404Storage storage $ = _getDN404Storage(); d = $.addressData[a]; if (d.flags & _ADDRESS_DATA_INITIALIZED_FLAG == 0) { uint8 flags = _ADDRESS_DATA_INITIALIZED_FLAG; if (_hasCode(a)) flags |= _ADDRESS_DATA_SKIP_NFT_FLAG; d.flags = flags; } } /// @dev Returns the `addressAlias` of account `to`. /// /// Assigns and registers the next alias if `to` alias was not previously registered. function _registerAndResolveAlias(AddressData storage toAddressData, address to) internal virtual returns (uint32 addressAlias) { DN404Storage storage $ = _getDN404Storage(); addressAlias = toAddressData.addressAlias; if (addressAlias == 0) { addressAlias = ++$.numAliases; toAddressData.addressAlias = addressAlias; $.aliasToAddress[addressAlias] = to; } } /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* MIRROR OPERATIONS */ /*-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»*/ /// @dev Returns the address of the mirror NFT contract. function mirrorERC721() public view virtual returns (address) { return _getDN404Storage().mirrorERC721; } /// @dev Returns the total NFT supply. function _totalNFTSupply() internal view virtual returns (uint256) { return _getDN404Storage().totalNFTSupply; } /// @dev Returns `owner` NFT balance. function _balanceOfNFT(address owner) internal view virtual returns (uint256) { return _getDN404Storage().addressData[owner].ownedLength; } /// @dev Returns the owner of token `id`. /// Returns the zero address instead of reverting if the token does not exist. function _ownerAt(uint256 id) internal view virtual returns (address) { DN404Storage storage $ = _getDN404Storage(); return $.aliasToAddress[_get($.oo, _ownershipIndex(id))]; } /// @dev Returns the owner of token `id`. /// /// Requirements: /// - Token `id` must exist. function _ownerOf(uint256 id) internal view virtual returns (address) { if (!_exists(id)) revert TokenDoesNotExist(); return _ownerAt(id); } /// @dev Returns if token `id` exists. function _exists(uint256 id) internal view virtual returns (bool) { return _ownerAt(id) != address(0); } /// @dev Returns the account approved to manage token `id`. /// /// Requirements: /// - Token `id` must exist. function _getApproved(uint256 id) internal view virtual returns (address) { if (!_exists(id)) revert TokenDoesNotExist(); return _getDN404Storage().tokenApprovals[id]; } /// @dev Sets `spender` as the approved account to manage token `id`, using `msgSender`. /// /// Requirements: /// - `msgSender` must be the owner or an approved operator for the token owner. function _approveNFT(address spender, uint256 id, address msgSender) internal virtual returns (address) { DN404Storage storage $ = _getDN404Storage(); address owner = $.aliasToAddress[_get($.oo, _ownershipIndex(id))]; if (msgSender != owner) { if (!$.operatorApprovals[owner][msgSender]) { revert ApprovalCallerNotOwnerNorApproved(); } } $.tokenApprovals[id] = spender; return owner; } /// @dev Approve or remove the `operator` as an operator for `msgSender`, /// without authorization checks. function _setApprovalForAll(address operator, bool approved, address msgSender) internal virtual { _getDN404Storage().operatorApprovals[msgSender][operator] = approved; } /// @dev Calls the mirror contract to link it to this contract. /// /// Reverts if the call to the mirror contract reverts. function _linkMirrorContract(address mirror) internal virtual { /// @solidity memory-safe-assembly assembly { mstore(0x00, 0x0f4599e5) // `linkMirrorContract(address)`. mstore(0x20, caller()) if iszero(and(eq(mload(0x00), 1), call(gas(), mirror, 0, 0x1c, 0x24, 0x00, 0x20))) { mstore(0x00, 0xd125259c) // `LinkMirrorContractFailed()`. revert(0x1c, 0x04) } } } /// @dev Fallback modifier to dispatch calls from the mirror NFT contract /// to internal functions in this contract. modifier dn404Fallback() virtual { DN404Storage storage $ = _getDN404Storage(); uint256 fnSelector = _calldataload(0x00) >> 224; // `isApprovedForAll(address,address)`. if (fnSelector == 0xe985e9c5) { if (msg.sender != $.mirrorERC721) revert SenderNotMirror(); if (msg.data.length < 0x44) revert(); address owner = address(uint160(_calldataload(0x04))); address operator = address(uint160(_calldataload(0x24))); _return($.operatorApprovals[owner][operator] ? 1 : 0); } // `ownerOf(uint256)`. if (fnSelector == 0x6352211e) { if (msg.sender != $.mirrorERC721) revert SenderNotMirror(); if (msg.data.length < 0x24) revert(); uint256 id = _calldataload(0x04); _return(uint160(_ownerOf(id))); } // `transferFromNFT(address,address,uint256,address)`. if (fnSelector == 0xe5eb36c8) { if (msg.sender != $.mirrorERC721) revert SenderNotMirror(); if (msg.data.length < 0x84) revert(); address from = address(uint160(_calldataload(0x04))); address to = address(uint160(_calldataload(0x24))); uint256 id = _calldataload(0x44); address msgSender = address(uint160(_calldataload(0x64))); _transferFromNFT(from, to, id, msgSender); _return(1); } // `setApprovalForAll(address,bool,address)`. if (fnSelector == 0x813500fc) { if (msg.sender != $.mirrorERC721) revert SenderNotMirror(); if (msg.data.length < 0x64) revert(); address spender = address(uint160(_calldataload(0x04))); bool status = _calldataload(0x24) != 0; address msgSender = address(uint160(_calldataload(0x44))); _setApprovalForAll(spender, status, msgSender); _return(1); } // `approveNFT(address,uint256,address)`. if (fnSelector == 0xd10b6e0c) { if (msg.sender != $.mirrorERC721) revert SenderNotMirror(); if (msg.data.length < 0x64) revert(); address spender = address(uint160(_calldataload(0x04))); uint256 id = _calldataload(0x24); address msgSender = address(uint160(_calldataload(0x44))); _return(uint160(_approveNFT(spender, id, msgSender))); } // `getApproved(uint256)`. if (fnSelector == 0x081812fc) { if (msg.sender != $.mirrorERC721) revert SenderNotMirror(); if (msg.data.length < 0x24) revert(); uint256 id = _calldataload(0x04); _return(uint160(_getApproved(id))); } // `balanceOfNFT(address)`. if (fnSelector == 0xf5b100ea) { if (msg.sender != $.mirrorERC721) revert SenderNotMirror(); if (msg.data.length < 0x24) revert(); address owner = address(uint160(_calldataload(0x04))); _return(_balanceOfNFT(owner)); } // `totalNFTSupply()`. if (fnSelector == 0xe2c79281) { if (msg.sender != $.mirrorERC721) revert SenderNotMirror(); if (msg.data.length < 0x04) revert(); _return(_totalNFTSupply()); } // `implementsDN404()`. if (fnSelector == 0xb7a94eb8) { _return(1); } _; } /// @dev Fallback function for calls from mirror NFT contract. fallback() external payable virtual dn404Fallback {} receive() external payable virtual {} /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* PRIVATE HELPERS */ /*-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»*/ /// @dev Struct containing packed log data for `Transfer` events to be /// emitted by the mirror NFT contract. struct _PackedLogs { uint256[] logs; uint256 offset; } /// @dev Initiates memory allocation for packed logs with `n` log items. function _packedLogsMalloc(uint256 n) private pure returns (_PackedLogs memory p) { /// @solidity memory-safe-assembly assembly { let logs := add(mload(0x40), 0x40) // Offset by 2 words for `_packedLogsSend`. mstore(logs, n) let offset := add(0x20, logs) mstore(0x40, add(offset, shl(5, n))) mstore(p, logs) mstore(add(0x20, p), offset) } } /// @dev Adds a packed log item to `p` with address `a`, token `id` and burn flag `burnBit`. function _packedLogsAppend(_PackedLogs memory p, address a, uint256 id, uint256 burnBit) private pure { /// @solidity memory-safe-assembly assembly { let offset := mload(add(0x20, p)) mstore(offset, or(or(shl(96, a), shl(8, id)), burnBit)) mstore(add(0x20, p), add(offset, 0x20)) } } /// @dev Calls the `mirror` NFT contract to emit Transfer events for packed logs `p`. function _packedLogsSend(_PackedLogs memory p, address mirror) private { /// @solidity memory-safe-assembly assembly { let logs := mload(p) let o := sub(logs, 0x40) // Start of calldata to send. mstore(o, 0x263c69d6) // `logTransfer(uint256[])`. mstore(add(o, 0x20), 0x20) // Offset of `logs` in the calldata to send. let n := add(0x44, shl(5, mload(logs))) // Length of calldata to send. if iszero(and(eq(mload(o), 1), call(gas(), mirror, 0, add(o, 0x1c), n, o, 0x20))) { revert(o, 0x00) } } } /// @dev Struct of temporary variables for transfers. struct _TransferTemps { uint256 nftAmountToBurn; uint256 nftAmountToMint; uint256 fromBalance; uint256 toBalance; uint256 fromOwnedLength; uint256 toOwnedLength; } /// @dev Returns if `a` has bytecode of non-zero length. function _hasCode(address a) private view returns (bool result) { /// @solidity memory-safe-assembly assembly { result := extcodesize(a) // Can handle dirty upper bits. } } /// @dev Returns the calldata value at `offset`. function _calldataload(uint256 offset) private pure returns (uint256 value) { /// @solidity memory-safe-assembly assembly { value := calldataload(offset) } } /// @dev Executes a return opcode to return `x` and end the current call frame. function _return(uint256 x) private pure { /// @solidity memory-safe-assembly assembly { mstore(0x00, x) return(0x00, 0x20) } } /// @dev Returns `max(0, x - y)`. function _zeroFloorSub(uint256 x, uint256 y) private pure returns (uint256 z) { /// @solidity memory-safe-assembly assembly { z := mul(gt(x, y), sub(x, y)) } } /// @dev Returns `i << 1`. function _ownershipIndex(uint256 i) private pure returns (uint256) { return i << 1; } /// @dev Returns `(i << 1) + 1`. function _ownedIndex(uint256 i) private pure returns (uint256) { unchecked { return (i << 1) + 1; } } /// @dev Returns the uint32 value at `index` in `map`. function _get(Uint32Map storage map, uint256 index) private view returns (uint32 result) { result = uint32(map.map[index >> 3] >> ((index & 7) << 5)); } /// @dev Updates the uint32 value at `index` in `map`. function _set(Uint32Map storage map, uint256 index, uint32 value) private { /// @solidity memory-safe-assembly assembly { mstore(0x20, map.slot) mstore(0x00, shr(3, index)) let s := keccak256(0x00, 0x40) // Storage slot. let o := shl(5, and(index, 7)) // Storage slot offset (bits). let v := sload(s) // Storage slot value. let m := 0xffffffff // Value mask. sstore(s, xor(v, shl(o, and(m, xor(shr(o, v), value))))) } } /// @dev Sets the owner alias and the owned index together. function _setOwnerAliasAndOwnedIndex( Uint32Map storage map, uint256 id, uint32 ownership, uint32 ownedIndex ) private { /// @solidity memory-safe-assembly assembly { let value := or(shl(32, ownedIndex), and(0xffffffff, ownership)) mstore(0x20, map.slot) mstore(0x00, shr(2, id)) let s := keccak256(0x00, 0x40) // Storage slot. let o := shl(6, and(id, 3)) // Storage slot offset (bits). let v := sload(s) // Storage slot value. let m := 0xffffffffffffffff // Value mask. sstore(s, xor(v, shl(o, and(m, xor(shr(o, v), value))))) } } }
// SPDX-License-Identifier: MIT 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 `keccak256(bytes("Transfer(address,address,uint256)"))`. uint256 private constant _TRANSFER_EVENT_SIGNATURE = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef; /// @dev `keccak256(bytes("Approval(address,address,uint256)"))`. uint256 private constant _APPROVAL_EVENT_SIGNATURE = 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925; /// @dev `keccak256(bytes("ApprovalForAll(address,address,bool)"))`. uint256 private constant _APPROVAL_FOR_ALL_EVENT_SIGNATURE = 0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31; /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* CUSTOM ERRORS */ /*-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»*/ /// @dev Thrown when a call for an NFT function did not originate /// from the base DN404 contract. error SenderNotBase(); /// @dev Thrown when a call for an NFT function did not originate from the deployer. error SenderNotDeployer(); /// @dev Thrown when transferring an NFT to a contract address that /// does not implement ERC721Receiver. error TransferToNonERC721ReceiverImplementer(); /// @dev Thrown when linking to the DN404 base contract and the /// DN404 supportsInterface check fails or the call reverts. error CannotLink(); /// @dev Thrown when a linkMirrorContract call is received and the /// NFT mirror contract has already been linked to a DN404 base contract. error AlreadyLinked(); /// @dev Thrown when retrieving the base DN404 address when a link has not /// been established. error NotLinked(); /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* STORAGE */ /*-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»*/ /// @dev Struct contain the NFT mirror contract storage. struct DN404NFTStorage { address baseERC20; address deployer; } /// @dev Returns a storage pointer for DN404NFTStorage. function _getDN404NFTStorage() internal pure virtual returns (DN404NFTStorage storage $) { /// @solidity memory-safe-assembly assembly { // `uint72(bytes9(keccak256("DN404_MIRROR_STORAGE")))`. $.slot := 0x3602298b8c10b01230 // Truncate to 9 bytes to reduce bytecode size. } } /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* CONSTRUCTOR */ /*-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»*/ constructor(address deployer) { // For non-proxies, we will store the deployer so that only the deployer can // link the base contract. _getDN404NFTStorage().deployer = deployer; } /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* ERC721 OPERATIONS */ /*-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»*/ /// @dev Returns the token collection name from the base DN404 contract. function name() public view virtual returns (string memory result) { address base = baseERC20(); /// @solidity memory-safe-assembly assembly { result := mload(0x40) mstore(0x00, 0x06fdde03) // `name()`. if iszero(staticcall(gas(), base, 0x1c, 0x04, 0x00, 0x00)) { returndatacopy(result, 0x00, returndatasize()) revert(result, returndatasize()) } returndatacopy(0x00, 0x00, 0x20) returndatacopy(result, mload(0x00), 0x20) returndatacopy(add(result, 0x20), add(mload(0x00), 0x20), mload(result)) mstore(0x40, add(add(result, 0x20), mload(result))) } } /// @dev Returns the token collection symbol from the base DN404 contract. function symbol() public view virtual returns (string memory result) { address base = baseERC20(); /// @solidity memory-safe-assembly assembly { result := mload(0x40) mstore(0x00, 0x95d89b41) // `symbol()`. if iszero(staticcall(gas(), base, 0x1c, 0x04, 0x00, 0x00)) { returndatacopy(result, 0x00, returndatasize()) revert(result, returndatasize()) } returndatacopy(0x00, 0x00, 0x20) returndatacopy(result, mload(0x00), 0x20) returndatacopy(add(result, 0x20), add(mload(0x00), 0x20), mload(result)) mstore(0x40, add(add(result, 0x20), mload(result))) } } /// @dev Returns the Uniform Resource Identifier (URI) for token `id` from /// the base DN404 contract. function tokenURI(uint256 id) public view virtual returns (string memory result) { address base = baseERC20(); /// @solidity memory-safe-assembly assembly { result := mload(0x40) mstore(0x20, id) mstore(0x00, 0xc87b56dd) // `tokenURI()`. if iszero(staticcall(gas(), base, 0x1c, 0x24, 0x00, 0x00)) { returndatacopy(result, 0x00, returndatasize()) revert(result, returndatasize()) } returndatacopy(0x00, 0x00, 0x20) returndatacopy(result, mload(0x00), 0x20) returndatacopy(add(result, 0x20), add(mload(0x00), 0x20), mload(result)) mstore(0x40, add(add(result, 0x20), mload(result))) } } /// @dev Returns the total NFT supply from the base DN404 contract. function totalSupply() public view virtual returns (uint256 result) { address base = baseERC20(); /// @solidity memory-safe-assembly assembly { mstore(0x00, 0xe2c79281) // `totalNFTSupply()`. if iszero( and(gt(returndatasize(), 0x1f), staticcall(gas(), base, 0x1c, 0x04, 0x00, 0x20)) ) { returndatacopy(mload(0x40), 0x00, returndatasize()) revert(mload(0x40), returndatasize()) } result := mload(0x00) } } /// @dev Returns the number of NFT tokens owned by `owner` from the base DN404 contract. /// /// Requirements: /// - `owner` must not be the zero address. function balanceOf(address owner) public view virtual returns (uint256 result) { address base = baseERC20(); /// @solidity memory-safe-assembly assembly { mstore(0x20, shr(96, shl(96, owner))) mstore(0x00, 0xf5b100ea) // `balanceOfNFT(address)`. if iszero( and(gt(returndatasize(), 0x1f), staticcall(gas(), base, 0x1c, 0x24, 0x00, 0x20)) ) { returndatacopy(mload(0x40), 0x00, returndatasize()) revert(mload(0x40), returndatasize()) } result := mload(0x00) } } /// @dev Returns the owner of token `id` from the base DN404 contract. /// /// Requirements: /// - Token `id` must exist. function ownerOf(uint256 id) public view virtual returns (address result) { address base = baseERC20(); /// @solidity memory-safe-assembly assembly { mstore(0x00, 0x6352211e) // `ownerOf(uint256)`. mstore(0x20, id) if iszero( and(gt(returndatasize(), 0x1f), staticcall(gas(), base, 0x1c, 0x24, 0x00, 0x20)) ) { returndatacopy(mload(0x40), 0x00, returndatasize()) revert(mload(0x40), returndatasize()) } result := shr(96, mload(0x0c)) } } /// @dev Sets `spender` as the approved account to manage token `id` in /// the base DN404 contract. /// /// Requirements: /// - Token `id` must exist. /// - The caller must be the owner of the token, /// or an approved operator for the token owner. /// /// Emits an {Approval} event. function approve(address spender, uint256 id) public virtual { address base = baseERC20(); /// @solidity memory-safe-assembly assembly { spender := shr(96, shl(96, spender)) let m := mload(0x40) mstore(0x00, 0xd10b6e0c) // `approveNFT(address,uint256,address)`. mstore(0x20, spender) mstore(0x40, id) mstore(0x60, caller()) if iszero( and( gt(returndatasize(), 0x1f), call(gas(), base, callvalue(), 0x1c, 0x64, 0x00, 0x20) ) ) { returndatacopy(m, 0x00, returndatasize()) revert(m, returndatasize()) } mstore(0x40, m) // Restore the free memory pointer. mstore(0x60, 0) // Restore the zero pointer. // Emit the {Approval} event. log4(codesize(), 0x00, _APPROVAL_EVENT_SIGNATURE, shr(96, mload(0x0c)), spender, id) } } /// @dev Returns the account approved to manage token `id` from /// the base DN404 contract. /// /// Requirements: /// - Token `id` must exist. function getApproved(uint256 id) public view virtual returns (address result) { address base = baseERC20(); /// @solidity memory-safe-assembly assembly { mstore(0x00, 0x081812fc) // `getApproved(uint256)`. mstore(0x20, id) if iszero( and(gt(returndatasize(), 0x1f), staticcall(gas(), base, 0x1c, 0x24, 0x00, 0x20)) ) { returndatacopy(mload(0x40), 0x00, returndatasize()) revert(mload(0x40), returndatasize()) } result := shr(96, mload(0x0c)) } } /// @dev Sets whether `operator` is approved to manage the tokens of the caller in /// the base DN404 contract. /// /// Emits an {ApprovalForAll} event. function setApprovalForAll(address operator, bool approved) public virtual { address base = baseERC20(); /// @solidity memory-safe-assembly assembly { operator := shr(96, shl(96, operator)) let m := mload(0x40) mstore(0x00, 0x813500fc) // `setApprovalForAll(address,bool,address)`. mstore(0x20, operator) mstore(0x40, iszero(iszero(approved))) mstore(0x60, caller()) if iszero( and(eq(mload(0x00), 1), call(gas(), base, callvalue(), 0x1c, 0x64, 0x00, 0x20)) ) { returndatacopy(m, 0x00, returndatasize()) revert(m, returndatasize()) } // Emit the {ApprovalForAll} event. log3(0x40, 0x20, _APPROVAL_FOR_ALL_EVENT_SIGNATURE, caller(), operator) mstore(0x40, m) // Restore the free memory pointer. mstore(0x60, 0) // Restore the zero pointer. } } /// @dev Returns whether `operator` is approved to manage the tokens of `owner` from /// the base DN404 contract. function isApprovedForAll(address owner, address operator) public view virtual returns (bool result) { address base = baseERC20(); /// @solidity memory-safe-assembly assembly { let m := mload(0x40) mstore(0x40, operator) mstore(0x2c, shl(96, owner)) mstore(0x0c, 0xe985e9c5000000000000000000000000) // `isApprovedForAll(address,address)`. if iszero( and(gt(returndatasize(), 0x1f), staticcall(gas(), base, 0x1c, 0x44, 0x00, 0x20)) ) { returndatacopy(m, 0x00, returndatasize()) revert(m, returndatasize()) } mstore(0x40, m) // Restore the free memory pointer. result := iszero(iszero(mload(0x00))) } } /// @dev Transfers token `id` from `from` to `to`. /// /// Requirements: /// /// - Token `id` must exist. /// - `from` must be the owner of the token. /// - `to` cannot be the zero address. /// - The caller must be the owner of the token, or be approved to manage the token. /// /// Emits a {Transfer} event. function transferFrom(address from, address to, uint256 id) public virtual { address base = baseERC20(); /// @solidity memory-safe-assembly assembly { from := shr(96, shl(96, from)) to := shr(96, shl(96, to)) let m := mload(0x40) mstore(m, 0xe5eb36c8) // `transferFromNFT(address,address,uint256,address)`. mstore(add(m, 0x20), from) mstore(add(m, 0x40), to) mstore(add(m, 0x60), id) mstore(add(m, 0x80), caller()) if iszero( and(eq(mload(m), 1), call(gas(), base, callvalue(), add(m, 0x1c), 0x84, m, 0x20)) ) { returndatacopy(m, 0x00, returndatasize()) revert(m, returndatasize()) } // Emit the {Transfer} event. log4(codesize(), 0x00, _TRANSFER_EVENT_SIGNATURE, from, to, id) } } /// @dev Equivalent to `safeTransferFrom(from, to, id, "")`. function safeTransferFrom(address from, address to, uint256 id) public payable virtual { transferFrom(from, to, id); if (_hasCode(to)) _checkOnERC721Received(from, to, id, ""); } /// @dev Transfers token `id` from `from` to `to`. /// /// Requirements: /// /// - Token `id` must exist. /// - `from` must be the owner of the token. /// - `to` cannot be the zero address. /// - The caller must be the owner of the token, or be approved to manage the token. /// - If `to` refers to a smart contract, it must implement /// {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. /// /// Emits a {Transfer} event. function safeTransferFrom(address from, address to, uint256 id, bytes calldata data) public virtual { transferFrom(from, to, id); if (_hasCode(to)) _checkOnERC721Received(from, to, id, data); } /// @dev Returns true if this contract implements the interface defined by `interfaceId`. /// See: https://eips.ethereum.org/EIPS/eip-165 /// This function call must use less than 30000 gas. function supportsInterface(bytes4 interfaceId) public view virtual returns (bool result) { /// @solidity memory-safe-assembly assembly { let s := shr(224, interfaceId) // ERC165: 0x01ffc9a7, ERC721: 0x80ac58cd, ERC721Metadata: 0x5b5e139f. result := or(or(eq(s, 0x01ffc9a7), eq(s, 0x80ac58cd)), eq(s, 0x5b5e139f)) } } /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* MIRROR OPERATIONS */ /*-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»*/ /// @dev Returns the address of the base DN404 contract. function baseERC20() public view virtual returns (address base) { base = _getDN404NFTStorage().baseERC20; if (base == address(0)) revert NotLinked(); } /// @dev Fallback modifier to execute calls from the base DN404 contract. modifier dn404NFTFallback() virtual { DN404NFTStorage storage $ = _getDN404NFTStorage(); uint256 fnSelector = _calldataload(0x00) >> 224; // `logTransfer(uint256[])`. if (fnSelector == 0x263c69d6) { if (msg.sender != $.baseERC20) revert SenderNotBase(); /// @solidity memory-safe-assembly assembly { // When returndatacopy copies 1 or more out-of-bounds bytes, it reverts. returndatacopy(0x00, returndatasize(), lt(calldatasize(), 0x20)) let o := add(0x24, calldataload(0x04)) // Packed logs offset. returndatacopy(0x00, returndatasize(), lt(calldatasize(), o)) let end := add(o, shl(5, calldataload(sub(o, 0x20)))) returndatacopy(0x00, returndatasize(), lt(calldatasize(), end)) for {} iszero(eq(o, end)) { o := add(0x20, o) } { let d := calldataload(o) // Entry in the packed logs. let a := shr(96, d) // The address. let b := and(1, d) // Whether it is a burn. log4( codesize(), 0x00, _TRANSFER_EVENT_SIGNATURE, mul(a, b), mul(a, iszero(b)), shr(168, shl(160, d)) ) } mstore(0x00, 0x01) return(0x00, 0x20) } } // `linkMirrorContract(address)`. if (fnSelector == 0x0f4599e5) { if ($.deployer != address(0)) { if (address(uint160(_calldataload(0x04))) != $.deployer) { revert SenderNotDeployer(); } } if ($.baseERC20 != address(0)) revert AlreadyLinked(); $.baseERC20 = msg.sender; /// @solidity memory-safe-assembly assembly { mstore(0x00, 0x01) return(0x00, 0x20) } } _; } /// @dev Fallback function for calls from base DN404 contract. fallback() external payable virtual dn404NFTFallback {} receive() external payable virtual {} /*«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-«-*/ /* PRIVATE HELPERS */ /*-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»*/ /// @dev Returns the calldata value at `offset`. function _calldataload(uint256 offset) private pure returns (uint256 value) { /// @solidity memory-safe-assembly assembly { value := calldataload(offset) } } /// @dev Returns if `a` has bytecode of non-zero length. function _hasCode(address a) private view returns (bool result) { /// @solidity memory-safe-assembly assembly { result := extcodesize(a) // Can handle dirty upper bits. } } /// @dev Perform a call to invoke {IERC721Receiver-onERC721Received} on `to`. /// Reverts if the target does not support the function correctly. function _checkOnERC721Received(address from, address to, uint256 id, bytes memory data) private { /// @solidity memory-safe-assembly assembly { // Prepare the calldata. let m := mload(0x40) let onERC721ReceivedSelector := 0x150b7a02 mstore(m, onERC721ReceivedSelector) mstore(add(m, 0x20), caller()) // The `operator`, which is always `msg.sender`. mstore(add(m, 0x40), shr(96, shl(96, from))) mstore(add(m, 0x60), id) mstore(add(m, 0x80), 0x80) let n := mload(data) mstore(add(m, 0xa0), n) if n { pop(staticcall(gas(), 4, add(data, 0x20), n, add(m, 0xc0), n)) } // Revert if the call reverts. if iszero(call(gas(), to, 0, add(m, 0x1c), add(n, 0xa4), m, 0x20)) { if returndatasize() { // Bubble up the revert if the call reverts. returndatacopy(m, 0x00, returndatasize()) revert(m, returndatasize()) } } // Load the returndata and compare it. if iszero(eq(mload(m), shl(224, onERC721ReceivedSelector))) { mstore(0x00, 0xd1a57ed6) // `TransferToNonERC721ReceiverImplementer()`. revert(0x1c, 0x04) } } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"},{"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":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"target","type":"address"},{"indexed":false,"internalType":"bool","name":"status","type":"bool"}],"name":"SkipNFTSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Transfer","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINTER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINT_COST","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"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":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"a","type":"address"}],"name":"getSkipNFT","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintEarly","outputs":[],"stateMutability":"payable","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":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"requestOwnershipHandover","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseURI_","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"skipNFT","type":"bool"}],"name":"setSkipNFT","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"result","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
608060405234801562000010575f80fd5b5060405162006fc238038062006fc2833981810160405281019062000036919062000b75565b620000595f801b6200004d6200013460201b60201c565b6200013b60201b60201c565b6200009a7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a66200008e6200013460201b60201c565b6200013b60201b60201c565b620000ab336200015160201b60201c565b8360029081620000bc919062000e59565b508260039081620000ce919062000e59565b505f33604051620000df906200093b565b620000eb919062000f4e565b604051809103905ff08015801562000105573d5f803e3d5ffd5b50905062000129836bffffffffffffffffffffffff1683836200023260201b60201c565b505050505062000fcc565b5f33905090565b6200014d82826200052460201b60201c565b5050565b620001616200056060201b60201c565b15620001dc577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278054156200019d57630dc149f05f526004601cfd5b8160601b60601c9150811560ff1b82178155815f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3506200022f565b8060601b60601c9050807fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392755805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a35b50565b5f620002436200056460201b60201c565b90505f815f0160049054906101000a900463ffffffff1663ffffffff161462000298576040517fead4d2e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603620002fe576040517f39a84a7b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6200030f826200057460201b60201c565b6001815f0160046101000a81548163ffffffff021916908363ffffffff16021790555081816001015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505f8411156200051e575f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603620003e3576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6b0de0b6b39983494c589bffff8411156200042a576040517fe5cfe95700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83815f01600c6101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055505f6200046e84620005a560201b60201c565b905084815f0160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508373ffffffffffffffffffffffffffffffffffffffff165f73ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8760405162000501919062000f7a565b60405180910390a36200051c8460016200065f60201b60201c565b505b50505050565b6200053682826200071d60201b60201c565b6200055b8160015f8581526020019081526020015f206200080860201b90919060201c565b505050565b5f90565b5f68a20d6e21d0e5255308905090565b630f4599e55f523360205260205f6024601c5f855af160015f511416620005a25763d125259c5f526004601cfd5b50565b5f80620005b76200056460201b60201c565b9050806008015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2091505f6001835f01600b9054906101000a900460ff161660ff160362000659575f600190506200062e846200083d60201b60201c565b156200063b576002811790505b80835f01600b6101000a81548160ff021916908360ff160217905550505b50919050565b5f6200067183620005a560201b60201c565b90508115155f6002835f01600b9054906101000a900460ff161660ff161415151514620006c8576002815f01600b8282829054906101000a900460ff161892506101000a81548160ff021916908360ff1602179055505b8273ffffffffffffffffffffffffffffffffffffffff167fb5a1de456fff688115a4f75380060c23c8532d14ff85f687cc871456d64203938360405162000710919062000fb1565b60405180910390a2505050565b6200072f82826200084760201b60201c565b620008045760015f808481526020019081526020015f205f015f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff021916908315150217905550620007a96200013460201b60201c565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b5f62000835835f018373ffffffffffffffffffffffffffffffffffffffff165f1b620008aa60201b60201c565b905092915050565b5f813b9050919050565b5f805f8481526020019081526020015f205f015f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16905092915050565b5f620008bd83836200091b60201b60201c565b6200091157825f0182908060018154018082558091505060019003905f5260205f20015f9091909190915055825f0180549050836001015f8481526020019081526020015f20819055506001905062000915565b5f90505b92915050565b5f80836001015f8481526020019081526020015f20541415905092915050565b6112d48062005cee83390190565b5f604051905090565b5f80fd5b5f80fd5b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b620009aa8262000962565b810181811067ffffffffffffffff82111715620009cc57620009cb62000972565b5b80604052505050565b5f620009e062000949565b9050620009ee82826200099f565b919050565b5f67ffffffffffffffff82111562000a105762000a0f62000972565b5b62000a1b8262000962565b9050602081019050919050565b5f5b8381101562000a4757808201518184015260208101905062000a2a565b5f8484015250505050565b5f62000a6862000a6284620009f3565b620009d5565b90508281526020810184848401111562000a875762000a866200095e565b5b62000a9484828562000a28565b509392505050565b5f82601f83011262000ab35762000ab26200095a565b5b815162000ac584826020860162000a52565b91505092915050565b5f6bffffffffffffffffffffffff82169050919050565b62000af08162000ace565b811462000afb575f80fd5b50565b5f8151905062000b0e8162000ae5565b92915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f62000b3f8262000b14565b9050919050565b62000b518162000b33565b811462000b5c575f80fd5b50565b5f8151905062000b6f8162000b46565b92915050565b5f805f806080858703121562000b905762000b8f62000952565b5b5f85015167ffffffffffffffff81111562000bb05762000baf62000956565b5b62000bbe8782880162000a9c565b945050602085015167ffffffffffffffff81111562000be25762000be162000956565b5b62000bf08782880162000a9c565b935050604062000c038782880162000afe565b925050606062000c168782880162000b5f565b91505092959194509250565b5f81519050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168062000c7157607f821691505b60208210810362000c875762000c8662000c2c565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f6008830262000ceb7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8262000cae565b62000cf7868362000cae565b95508019841693508086168417925050509392505050565b5f819050919050565b5f819050919050565b5f62000d4162000d3b62000d358462000d0f565b62000d18565b62000d0f565b9050919050565b5f819050919050565b62000d5c8362000d21565b62000d7462000d6b8262000d48565b84845462000cba565b825550505050565b5f90565b62000d8a62000d7c565b62000d9781848462000d51565b505050565b5b8181101562000dbe5762000db25f8262000d80565b60018101905062000d9d565b5050565b601f82111562000e0d5762000dd78162000c8d565b62000de28462000c9f565b8101602085101562000df2578190505b62000e0a62000e018562000c9f565b83018262000d9c565b50505b505050565b5f82821c905092915050565b5f62000e2f5f198460080262000e12565b1980831691505092915050565b5f62000e49838362000e1e565b9150826002028217905092915050565b62000e648262000c22565b67ffffffffffffffff81111562000e805762000e7f62000972565b5b62000e8c825462000c59565b62000e9982828562000dc2565b5f60209050601f83116001811462000ecf575f841562000eba578287015190505b62000ec6858262000e3c565b86555062000f35565b601f19841662000edf8662000c8d565b5f5b8281101562000f085784890151825560018201915060208501945060208101905062000ee1565b8683101562000f28578489015162000f24601f89168262000e1e565b8355505b6001600288020188555050505b505050505050565b62000f488162000b33565b82525050565b5f60208201905062000f635f83018462000f3d565b92915050565b62000f748162000d0f565b82525050565b5f60208201905062000f8f5f83018462000f69565b92915050565b5f8115159050919050565b62000fab8162000f95565b82525050565b5f60208201905062000fc65f83018462000fa0565b92915050565b614d148062000fda5f395ff3fe608060405260043610610207575f3560e01c80635b2fcf0511610117578063c662e4811161009f578063d547741f1161006e578063d547741f14610eac578063dd62ed3e14610ed4578063f04e283e14610f10578063f2fde38b14610f2c578063fee81cf414610f485761020e565b8063c662e48114610de0578063c87b56dd14610e0a578063ca15c87314610e46578063d539139314610e825761020e565b80639010d07c116100e65780639010d07c14610cd857806391d1485414610d1457806395d89b4114610d50578063a217fddf14610d7a578063a9059cbb14610da45761020e565b80635b2fcf0514610c5e57806370a0823114610c68578063715018a614610ca45780638da5cb5b14610cae5761020e565b80632a6a935d1161019a5780633ccfd60b116101695780633ccfd60b14610bc457806340c10f1914610bda5780634ef41efc14610c0257806354d1f13d14610c2c57806355f804b314610c365761020e565b80632a6a935d14610b225780632f2ff15d14610b4a578063313ce56714610b7257806336568abe14610b9c5761020e565b806323b872dd116101d657806323b872dd14610a64578063248a9ca314610aa05780632569296214610adc578063274e430b14610ae65761020e565b806301ffc9a71461099857806306fdde03146109d4578063095ea7b3146109fe57806318160ddd14610a3a5761020e565b3661020e57005b5f610217610f84565b90505f60e06102255f610f94565b901c905063e985e9c5810361038857816001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146102bc576040517fce5a776b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60445f36905010156102cc575f80fd5b5f6102d76004610f94565b90505f6102e46024610f94565b9050610385846003015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff1661037a575f61037d565b60015b60ff16610f9e565b50505b636352211e810361046157816001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461041b576040517fce5a776b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60245f369050101561042b575f80fd5b5f6104366004610f94565b905061045f61044482610fa6565b73ffffffffffffffffffffffffffffffffffffffff16610f9e565b505b63e5eb36c8810361055357816001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146104f4576040517fce5a776b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60845f3690501015610504575f80fd5b5f61050f6004610f94565b90505f61051c6024610f94565b90505f6105296044610f94565b90505f6105366064610f94565b905061054484848484610ff6565b61054e6001610f9e565b505050505b63813500fc810361063957816001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146105e6576040517fce5a776b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60645f36905010156105f6575f80fd5b5f6106016004610f94565b90505f8061060f6024610f94565b141590505f61061e6044610f94565b905061062b8383836115d1565b6106356001610f9e565b5050505b63d10b6e0c810361073057816001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146106cc576040517fce5a776b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60645f36905010156106dc575f80fd5b5f6106e76004610f94565b90505f6106f46024610f94565b90505f6107016044610f94565b905061072c61071184848461166e565b73ffffffffffffffffffffffffffffffffffffffff16610f9e565b5050505b63081812fc810361080957816001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146107c3576040517fce5a776b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60245f36905010156107d3575f80fd5b5f6107de6004610f94565b90506108076107ec8261181e565b73ffffffffffffffffffffffffffffffffffffffff16610f9e565b505b63f5b100ea81036108cc57816001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461089c576040517fce5a776b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60245f36905010156108ac575f80fd5b5f6108b76004610f94565b90506108ca6108c58261189f565b610f9e565b505b63e2c79281810361098057816001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461095f576040517fce5a776b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60045f369050101561096f575f80fd5b61097f61097a611906565b610f9e565b5b63b7a94eb88103610996576109956001610f9e565b5b005b3480156109a3575f80fd5b506109be60048036038101906109b99190613f1e565b61192d565b6040516109cb9190613f63565b60405180910390f35b3480156109df575f80fd5b506109e86119a6565b6040516109f59190614006565b60405180910390f35b348015610a09575f80fd5b50610a246004803603810190610a1f91906140b3565b611a36565b604051610a319190613f63565b60405180910390f35b348015610a45575f80fd5b50610a4e611b31565b604051610a5b9190614100565b60405180910390f35b348015610a6f575f80fd5b50610a8a6004803603810190610a859190614119565b611b68565b604051610a979190613f63565b60405180910390f35b348015610aab575f80fd5b50610ac66004803603810190610ac1919061419c565b611ced565b604051610ad391906141d6565b60405180910390f35b610ae4611d09565b005b348015610af1575f80fd5b50610b0c6004803603810190610b0791906141ef565b611d5a565b604051610b199190613f63565b60405180910390f35b348015610b2d575f80fd5b50610b486004803603810190610b439190614244565b611df5565b005b348015610b55575f80fd5b50610b706004803603810190610b6b919061426f565b611e02565b005b348015610b7d575f80fd5b50610b86611e23565b604051610b9391906142c8565b60405180910390f35b348015610ba7575f80fd5b50610bc26004803603810190610bbd919061426f565b611e2b565b005b348015610bcf575f80fd5b50610bd8611eae565b005b348015610be5575f80fd5b50610c006004803603810190610bfb91906140b3565b611ec1565b005b348015610c0d575f80fd5b50610c16611f3f565b604051610c2391906142f0565b60405180910390f35b610c34611f70565b005b348015610c41575f80fd5b50610c5c6004803603810190610c57919061436a565b611fa9565b005b610c66611fc7565b005b348015610c73575f80fd5b50610c8e6004803603810190610c8991906141ef565b6120c3565b604051610c9b9190614100565b60405180910390f35b610cac61213a565b005b348015610cb9575f80fd5b50610cc261214d565b604051610ccf91906142f0565b60405180910390f35b348015610ce3575f80fd5b50610cfe6004803603810190610cf991906143b5565b612175565b604051610d0b91906142f0565b60405180910390f35b348015610d1f575f80fd5b50610d3a6004803603810190610d35919061426f565b6121a1565b604051610d479190613f63565b60405180910390f35b348015610d5b575f80fd5b50610d64612204565b604051610d719190614006565b60405180910390f35b348015610d85575f80fd5b50610d8e612294565b604051610d9b91906141d6565b60405180910390f35b348015610daf575f80fd5b50610dca6004803603810190610dc591906140b3565b61229a565b604051610dd79190613f63565b60405180910390f35b348015610deb575f80fd5b50610df46122b0565b604051610e019190614100565b60405180910390f35b348015610e15575f80fd5b50610e306004803603810190610e2b91906143f3565b6122bc565b604051610e3d9190614006565b60405180910390f35b348015610e51575f80fd5b50610e6c6004803603810190610e67919061419c565b612498565b604051610e799190614100565b60405180910390f35b348015610e8d575f80fd5b50610e966124b9565b604051610ea391906141d6565b60405180910390f35b348015610eb7575f80fd5b50610ed26004803603810190610ecd919061426f565b6124dd565b005b348015610edf575f80fd5b50610efa6004803603810190610ef5919061441e565b6124fe565b604051610f079190614100565b60405180910390f35b610f2a6004803603810190610f2591906141ef565b612589565b005b610f466004803603810190610f4191906141ef565b6125c7565b005b348015610f53575f80fd5b50610f6e6004803603810190610f6991906141ef565b6125f0565b604051610f7b9190614100565b60405180910390f35b5f68a20d6e21d0e5255308905090565b5f81359050919050565b805f5260205ff35b5f610fb082612609565b610fe6576040517fceea21b600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610fef82612649565b9050919050565b5f610fff610f84565b90505f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603611066576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f816002015f6110818460070161107c886126b0565b6126bd565b63ffffffff1663ffffffff1681526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff1614611121576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8573ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161461127857816003015f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff1661127757816004015f8581526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614611276576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b5b5f611282876126e7565b90505f61128e876126e7565b9050670de0b6b3a7640000825f0160148282829054906101000a90046bffffffffffffffffffffffff166112c291906144a0565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550670de0b6b3a7640000815f0160148282829054906101000a90046bffffffffffffffffffffffff160192506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555061136684600701611357886126b0565b611361848b61278f565b612882565b836004015f8781526020019081526020015f205f6101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690555f611420856006015f8b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20845f01601081819054906101000a900463ffffffff166001900391906101000a81548163ffffffff021916908363ffffffff160217905563ffffffff166126bd565b63ffffffff16905061148b856006015f8b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2061147f8760070161147a8b6128b4565b6126bd565b63ffffffff1683612882565b5f825f01601081819054906101000a900463ffffffff168092919060010191906101000a81548163ffffffff021916908363ffffffff16021790555063ffffffff1690506114f9866007016114df846128b4565b6114f4896007016114ef8d6128b4565b6126bd565b612882565b611542866006015f8b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20828a612882565b611558866007016115528a6128b4565b83612882565b50508673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef670de0b6b3a76400006040516115bf9190614100565b60405180910390a35050505050505050565b816115da610f84565b6003015f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff021916908315150217905550505050565b5f80611678610f84565b90505f816002015f61169584600701611690896126b0565b6126bd565b63ffffffff1663ffffffff1681526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16146117c157816003015f8273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff166117c0576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b85826004015f8781526020019081526020015f205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080925050509392505050565b5f61182882612609565b61185e576040517fceea21b600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611866610f84565b6004015f8381526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b5f6118a8610f84565b6008015f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f0160109054906101000a900463ffffffff1663ffffffff169050919050565b5f61190f610f84565b5f0160089054906101000a900463ffffffff1663ffffffff16905090565b5f7f5a05180f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061199f575061199e826128c3565b5b9050919050565b6060600280546119b59061450c565b80601f01602080910402602001604051908101604052809291908181526020018280546119e19061450c565b8015611a2c5780601f10611a0357610100808354040283529160200191611a2c565b820191905f5260205f20905b815481529060010190602001808311611a0f57829003601f168201915b5050505050905090565b5f80611a40610f84565b905082816005015f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92585604051611b1e9190614100565b60405180910390a3600191505092915050565b5f611b3a610f84565b5f01600c9054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff16905090565b5f80611b72610f84565b90505f816005015f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205490507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114611cd55780841115611c53576040517f13be252b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b838103826005015f8873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055505b611ce086868661293c565b6001925050509392505050565b5f805f8381526020019081526020015f20600101549050919050565b5f611d12612fbb565b67ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b5f80611d64610f84565b6008015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2090505f6001825f01600b9054906101000a900460ff161660ff1603611dd257611dca83612fc5565b915050611df0565b5f6002825f01600b9054906101000a900460ff161660ff1614159150505b919050565b611dff3382612fcf565b50565b611e0b82611ced565b611e1481613082565b611e1e8383613096565b505050565b5f6012905090565b611e336130c8565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611ea0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e97906145ac565b60405180910390fd5b611eaa82826130cf565b5050565b611eb6613101565b611ebf33613138565b565b611ef27f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6611eed6130c8565b6121a1565b611f31576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f2890614614565b60405180910390fd5b611f3b8282613154565b5050565b5f611f48610f84565b6001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b611fb1613101565b818160049182611fc2929190614806565b505050565b5f3090505f611fd5826120c3565b90508060011115611fe4575f80fd5b5f67016345785d8a00006001611ffa91906148d3565b905080341015612008575f80fd5b61201b3033670de0b6b3a764000061293c565b61202361214d565b73ffffffffffffffffffffffffffffffffffffffff166108fc8290811502906040515f60405180830381858888f19350505050158015612065573d5f803e3d5ffd5b50803411156120be573373ffffffffffffffffffffffffffffffffffffffff166108fc82346120949190614914565b90811502906040515f60405180830381858888f193505050501580156120bc573d5f803e3d5ffd5b505b505050565b5f6120cc610f84565b6008015f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f0160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff169050919050565b612142613101565b61214b5f61358f565b565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392754905090565b5f6121998260015f8681526020019081526020015f2061365590919063ffffffff16565b905092915050565b5f805f8481526020019081526020015f205f015f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16905092915050565b6060600380546122139061450c565b80601f016020809104026020016040519081016040528092919081815260200182805461223f9061450c565b801561228a5780601f106122615761010080835404028352916020019161228a565b820191905f5260205f20905b81548152906001019060200180831161226d57829003601f168201915b5050505050905090565b5f801b81565b5f6122a633848461293c565b6001905092915050565b67016345785d8a000081565b60605f600480546122cc9061450c565b905014612492575f826040516020016122e59190614967565b604051602081830303815290604052805190602001205f1c905060605f60648361230f91906149ae565b90506028811015612357576040518060400160405280600a81526020017f62726f6e7a652e706e67000000000000000000000000000000000000000000008152509150612465565b604681101561239d576040518060400160405280600a81526020017f73696c7665722e706e67000000000000000000000000000000000000000000008152509150612464565b605a8110156123e3576040518060400160405280600881526020017f676f6c642e706e670000000000000000000000000000000000000000000000008152509150612463565b6061811015612429576040518060400160405280600b81526020017f6469616d6f6e642e706e670000000000000000000000000000000000000000008152509150612462565b6040518060400160405280600b81526020017f656d6572616c642e706e6700000000000000000000000000000000000000000081525091505b5b5b5b600482604051602001612479929190614a98565b6040516020818303038152906040529350505050612493565b5b919050565b5f6124b260015f8481526020019081526020015f2061366c565b9050919050565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b6124e682611ced565b6124ef81613082565b6124f983836130cf565b505050565b5f612507610f84565b6005015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905092915050565b612591613101565b63389a75e1600c52805f526020600c2080544211156125b757636f5e88185f526004601cfd5b5f8155506125c48161358f565b50565b6125cf613101565b8060601b6125e457637448fbae5f526004601cfd5b6125ed8161358f565b50565b5f63389a75e1600c52815f526020600c20549050919050565b5f8073ffffffffffffffffffffffffffffffffffffffff1661262a83612649565b73ffffffffffffffffffffffffffffffffffffffff1614159050919050565b5f80612653610f84565b9050806002015f61266f8360070161266a876126b0565b6126bd565b63ffffffff1663ffffffff1681526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16915050919050565b5f600182901b9050919050565b5f600560078316901b835f015f600385901c81526020019081526020015f2054901c905092915050565b5f806126f1610f84565b9050806008015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2091505f6001835f01600b9054906101000a900460ff161660ff1603612789575f6001905061275f84612fc5565b1561276b576002811790505b80835f01600b6101000a81548160ff021916908360ff160217905550505b50919050565b5f80612799610f84565b9050835f01600c9054906101000a900463ffffffff1691505f8263ffffffff160361287b57805f015f81819054906101000a900463ffffffff166127dc90614aca565b91906101000a81548163ffffffff021916908363ffffffff1602179055915081845f01600c6101000a81548163ffffffff021916908363ffffffff16021790555082816002015f8463ffffffff1663ffffffff1681526020019081526020015f205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b5092915050565b826020528160031c5f5260405f206007831660051b815463ffffffff8482841c188116831b8218845550505050505050565b5f60018083901b019050919050565b5f7f7965db0b000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061293557506129348261367f565b5b9050919050565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036129a1576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f6129aa610f84565b90505f6129b6856126e7565b90505f6129c2856126e7565b90506129cc613e78565b825f0160109054906101000a900463ffffffff1663ffffffff16816080018181525050815f0160109054906101000a900463ffffffff1663ffffffff168160a0018181525050825f0160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff168160400181815250508060400151851115612a83576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b848160400181815103915081815250508060400151835f0160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555084825f0160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff16018160600181815250825f0160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550612b588160800151670de0b6b3a7640000836040015181612b5257612b51614981565b5b046136e8565b815f0181815250505f6002835f01600b9054906101000a900460ff161660ff1603612bf8578573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff1603612bc457805f01518160800151038160a00181815250505b612bee670de0b6b3a7640000826060015181612be357612be2614981565b5b048260a001516136e8565b8160200181815250505b5f612c0b8260200151835f0151016136f8565b90505f825f015114612d3e575f856006015f8a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2090505f836080015190505f845f015182039050845f0151885f0160088282829054906101000a900463ffffffff160392506101000a81548163ffffffff021916908363ffffffff16021790555080875f0160106101000a81548163ffffffff021916908363ffffffff1602179055505b5f612cd98484600190039450846126bd565b63ffffffff169050612cf089600701825f80613725565b886004015f8281526020019081526020015f205f6101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055612d32858d836001613769565b50808203612cc7575050505b5f826020015114612f13575f856006015f8973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2090505f8360a0015190505f8460200151820190505f612da8878c61278f565b90505f670de0b6b3a76400008a5f01600c9054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff1681612dec57612deb614981565b5b0490505f8a5f0160049054906101000a900463ffffffff1663ffffffff16905087602001518b5f0160088282829054906101000a900463ffffffff160192506101000a81548163ffffffff021916908363ffffffff16021790555083895f0160106101000a81548163ffffffff021916908363ffffffff1602179055505b5b5f612e818c600701612e7c846126b0565b6126bd565b63ffffffff1614612ea45781816001019150811115612e9f57600190505b612e6b565b612eaf868683612882565b612ec48b600701828588806001019950613725565b612ed0878e835f613769565b81816001019150811115612ee357600190505b838503612e6a57808b5f0160046101000a81548163ffffffff021916908363ffffffff1602179055505050505050505b5f815f01515114612f4c57612f4b81866001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1661378b565b5b508573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef87604051612faa9190614100565b60405180910390a350505050505050565b5f6202a300905090565b5f813b9050919050565b5f612fd9836126e7565b90508115155f6002835f01600b9054906101000a900460ff161660ff16141515151461302f576002815f01600b8282829054906101000a900460ff161892506101000a81548160ff021916908360ff1602179055505b8273ffffffffffffffffffffffffffffffffffffffff167fb5a1de456fff688115a4f75380060c23c8532d14ff85f687cc871456d6420393836040516130759190613f63565b60405180910390a2505050565b6130938161308e6130c8565b6137c7565b50565b6130a0828261384b565b6130c38160015f8581526020019081526020015f2061392590919063ffffffff16565b505050565b5f33905090565b6130d98282613952565b6130fc8160015f8581526020019081526020015f20613a2c90919063ffffffff16565b505050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543314613136576382b429005f526004601cfd5b565b5f385f3847855af16131515763b12d13eb5f526004601cfd5b50565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036131b9576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f6131c2610f84565b90505f6131ce846126e7565b90505f83835f01600c9054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff160190506b0de0b6b39983494c589bffff84118061322457506b0de0b6b39983494c589bffff81115b1561325b576040517fe5cfe95700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80835f01600c6101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055505f84835f0160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff1601905080835f0160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055505f6002845f01600b9054906101000a900460ff161660ff1603613522575f846006015f8873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2090505f845f0160109054906101000a900463ffffffff1663ffffffff1690505f670de0b6b3a7640000848161338357613382614981565b5b0490505f61339961339483856136e8565b6136f8565b90505f815f0151511461351d575f670de0b6b3a764000087816133bf576133be614981565b5b0490505f6133cd898d61278f565b90505f8a5f0160049054906101000a900463ffffffff1663ffffffff169050835f0151518b5f0160088282829054906101000a900463ffffffff160192506101000a81548163ffffffff021916908363ffffffff160217905550848a5f0160106101000a81548163ffffffff021916908363ffffffff1602179055505b5b5f6134618c60070161345c846126b0565b6126bd565b63ffffffff1614613484578281600101915081111561347f57600190505b61344b565b61348f878783612882565b6134a48b600701828489806001019a50613725565b6134b0848e835f613769565b828160010191508111156134c357600190505b84860361344a57808b5f0160046101000a81548163ffffffff021916908363ffffffff160217905550613519848c6001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1661378b565b5050505b505050505b50508373ffffffffffffffffffffffffffffffffffffffff165f73ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516135819190614100565b60405180910390a350505050565b613597613a59565b156135fc577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3811560ff1b8217815550613652565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3818155505b50565b5f613662835f0183613a5d565b5f1c905092915050565b5f613678825f01613a84565b9050919050565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b5f81830382841102905092915050565b613700613ea8565b6040805101828152806020018360051b81016040528183528083602001525050919050565b8163ffffffff168160201b17846020528360021c5f5260405f206003851660061b815467ffffffffffffffff8482841c188116831b82188455505050505050505050565b8360200151818360081b8560601b171781526020810185602001525050505050565b81516040810363263c69d68152602080820152815160051b60440160208282601c85015f885af16001835114166137c0575f82fd5b5050505050565b6137d182826121a1565b613847576137de81613a93565b6137eb835f1c6020613ac0565b6040516020016137fc929190614b89565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161383e9190614006565b60405180910390fd5b5050565b61385582826121a1565b6139215760015f808481526020019081526020015f205f015f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055506138c66130c8565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b5f61394a835f018373ffffffffffffffffffffffffffffffffffffffff165f1b613cf5565b905092915050565b61395c82826121a1565b15613a28575f805f8481526020019081526020015f205f015f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055506139cd6130c8565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45b5050565b5f613a51835f018373ffffffffffffffffffffffffffffffffffffffff165f1b613d5c565b905092915050565b5f90565b5f825f018281548110613a7357613a72614bc2565b5b905f5260205f200154905092915050565b5f815f01805490509050919050565b6060613ab98273ffffffffffffffffffffffffffffffffffffffff16601460ff16613ac0565b9050919050565b60605f6002836002613ad291906148d3565b613adc9190614bef565b67ffffffffffffffff811115613af557613af461463c565b5b6040519080825280601f01601f191660200182016040528015613b275781602001600182028036833780820191505090505b5090507f3000000000000000000000000000000000000000000000000000000000000000815f81518110613b5e57613b5d614bc2565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191690815f1a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110613bc157613bc0614bc2565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191690815f1a9053505f6001846002613bff91906148d3565b613c099190614bef565b90505b6001811115613ca8577f3031323334353637383961626364656600000000000000000000000000000000600f861660108110613c4b57613c4a614bc2565b5b1a60f81b828281518110613c6257613c61614bc2565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191690815f1a905350600485901c945080613ca190614c22565b9050613c0c565b505f8414613ceb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613ce290614c93565b60405180910390fd5b8091505092915050565b5f613d008383613e58565b613d5257825f0182908060018154018082558091505060019003905f5260205f20015f9091909190915055825f0180549050836001015f8481526020019081526020015f208190555060019050613d56565b5f90505b92915050565b5f80836001015f8481526020019081526020015f205490505f8114613e4d575f600182613d899190614914565b90505f6001865f0180549050613d9f9190614914565b9050818114613e05575f865f018281548110613dbe57613dbd614bc2565b5b905f5260205f200154905080875f018481548110613ddf57613dde614bc2565b5b905f5260205f20018190555083876001015f8381526020019081526020015f2081905550505b855f01805480613e1857613e17614cb1565b5b600190038181905f5260205f20015f90559055856001015f8681526020019081526020015f205f905560019350505050613e52565b5f9150505b92915050565b5f80836001015f8481526020019081526020015f20541415905092915050565b6040518060c001604052805f81526020015f81526020015f81526020015f81526020015f81526020015f81525090565b6040518060400160405280606081526020015f81525090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b613efd81613ec9565b8114613f07575f80fd5b50565b5f81359050613f1881613ef4565b92915050565b5f60208284031215613f3357613f32613ec1565b5b5f613f4084828501613f0a565b91505092915050565b5f8115159050919050565b613f5d81613f49565b82525050565b5f602082019050613f765f830184613f54565b92915050565b5f81519050919050565b5f82825260208201905092915050565b5f5b83811015613fb3578082015181840152602081019050613f98565b5f8484015250505050565b5f601f19601f8301169050919050565b5f613fd882613f7c565b613fe28185613f86565b9350613ff2818560208601613f96565b613ffb81613fbe565b840191505092915050565b5f6020820190508181035f83015261401e8184613fce565b905092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61404f82614026565b9050919050565b61405f81614045565b8114614069575f80fd5b50565b5f8135905061407a81614056565b92915050565b5f819050919050565b61409281614080565b811461409c575f80fd5b50565b5f813590506140ad81614089565b92915050565b5f80604083850312156140c9576140c8613ec1565b5b5f6140d68582860161406c565b92505060206140e78582860161409f565b9150509250929050565b6140fa81614080565b82525050565b5f6020820190506141135f8301846140f1565b92915050565b5f805f606084860312156141305761412f613ec1565b5b5f61413d8682870161406c565b935050602061414e8682870161406c565b925050604061415f8682870161409f565b9150509250925092565b5f819050919050565b61417b81614169565b8114614185575f80fd5b50565b5f8135905061419681614172565b92915050565b5f602082840312156141b1576141b0613ec1565b5b5f6141be84828501614188565b91505092915050565b6141d081614169565b82525050565b5f6020820190506141e95f8301846141c7565b92915050565b5f6020828403121561420457614203613ec1565b5b5f6142118482850161406c565b91505092915050565b61422381613f49565b811461422d575f80fd5b50565b5f8135905061423e8161421a565b92915050565b5f6020828403121561425957614258613ec1565b5b5f61426684828501614230565b91505092915050565b5f806040838503121561428557614284613ec1565b5b5f61429285828601614188565b92505060206142a38582860161406c565b9150509250929050565b5f60ff82169050919050565b6142c2816142ad565b82525050565b5f6020820190506142db5f8301846142b9565b92915050565b6142ea81614045565b82525050565b5f6020820190506143035f8301846142e1565b92915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f84011261432a57614329614309565b5b8235905067ffffffffffffffff8111156143475761434661430d565b5b60208301915083600182028301111561436357614362614311565b5b9250929050565b5f80602083850312156143805761437f613ec1565b5b5f83013567ffffffffffffffff81111561439d5761439c613ec5565b5b6143a985828601614315565b92509250509250929050565b5f80604083850312156143cb576143ca613ec1565b5b5f6143d885828601614188565b92505060206143e98582860161409f565b9150509250929050565b5f6020828403121561440857614407613ec1565b5b5f6144158482850161409f565b91505092915050565b5f806040838503121561443457614433613ec1565b5b5f6144418582860161406c565b92505060206144528582860161406c565b9150509250929050565b5f6bffffffffffffffffffffffff82169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6144aa8261445c565b91506144b58361445c565b925082820390506bffffffffffffffffffffffff8111156144d9576144d8614473565b5b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061452357607f821691505b602082108103614536576145356144df565b5b50919050565b7f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e63655f8201527f20726f6c657320666f722073656c660000000000000000000000000000000000602082015250565b5f614596602f83613f86565b91506145a18261453c565b604082019050919050565b5f6020820190508181035f8301526145c38161458a565b9050919050565b7f4d7573742068617665206d696e74657220726f6c6500000000000000000000005f82015250565b5f6145fe601583613f86565b9150614609826145ca565b602082019050919050565b5f6020820190508181035f83015261462b816145f2565b9050919050565b5f82905092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026146c57fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8261468a565b6146cf868361468a565b95508019841693508086168417925050509392505050565b5f819050919050565b5f61470a61470561470084614080565b6146e7565b614080565b9050919050565b5f819050919050565b614723836146f0565b61473761472f82614711565b848454614696565b825550505050565b5f90565b61474b61473f565b61475681848461471a565b505050565b5b818110156147795761476e5f82614743565b60018101905061475c565b5050565b601f8211156147be5761478f81614669565b6147988461467b565b810160208510156147a7578190505b6147bb6147b38561467b565b83018261475b565b50505b505050565b5f82821c905092915050565b5f6147de5f19846008026147c3565b1980831691505092915050565b5f6147f683836147cf565b9150826002028217905092915050565b6148108383614632565b67ffffffffffffffff8111156148295761482861463c565b5b614833825461450c565b61483e82828561477d565b5f601f83116001811461486b575f8415614859578287013590505b61486385826147eb565b8655506148ca565b601f19841661487986614669565b5f5b828110156148a05784890135825560018201915060208501945060208101905061487b565b868310156148bd57848901356148b9601f8916826147cf565b8355505b6001600288020188555050505b50505050505050565b5f6148dd82614080565b91506148e883614080565b92508282026148f681614080565b9150828204841483151761490d5761490c614473565b5b5092915050565b5f61491e82614080565b915061492983614080565b925082820390508181111561494157614940614473565b5b92915050565b5f819050919050565b61496161495c82614080565b614947565b82525050565b5f6149728284614950565b60208201915081905092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f6149b882614080565b91506149c383614080565b9250826149d3576149d2614981565b5b828206905092915050565b5f81905092915050565b5f81546149f48161450c565b6149fe81866149de565b9450600182165f8114614a185760018114614a2d57614a5f565b60ff1983168652811515820286019350614a5f565b614a3685614669565b5f5b83811015614a5757815481890152600182019150602081019050614a38565b838801955050505b50505092915050565b5f614a7282613f7c565b614a7c81856149de565b9350614a8c818560208601613f96565b80840191505092915050565b5f614aa382856149e8565b9150614aaf8284614a68565b91508190509392505050565b5f63ffffffff82169050919050565b5f614ad482614abb565b915063ffffffff8203614aea57614ae9614473565b5b600182019050919050565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000005f82015250565b5f614b296017836149de565b9150614b3482614af5565b601782019050919050565b7f206973206d697373696e6720726f6c65200000000000000000000000000000005f82015250565b5f614b736011836149de565b9150614b7e82614b3f565b601182019050919050565b5f614b9382614b1d565b9150614b9f8285614a68565b9150614baa82614b67565b9150614bb68284614a68565b91508190509392505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f614bf982614080565b9150614c0483614080565b9250828201905080821115614c1c57614c1b614473565b5b92915050565b5f614c2c82614080565b91505f8203614c3e57614c3d614473565b5b600182039050919050565b7f537472696e67733a20686578206c656e67746820696e73756666696369656e745f82015250565b5f614c7d602083613f86565b9150614c8882614c49565b602082019050919050565b5f6020820190508181035f830152614caa81614c71565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603160045260245ffdfea2646970667358221220c37ea4c217fdf50e5e81c2cff631e7406f436afafc3f12b4b7c4a334ff241b0a64736f6c63430008140033608060405234801562000010575f80fd5b50604051620012d4380380620012d4833981810160405281019062000036919062000103565b80620000476200008e60201b60201c565b6001015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505062000133565b5f683602298b8c10b01230905090565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f620000cd82620000a2565b9050919050565b620000df81620000c1565b8114620000ea575f80fd5b50565b5f81519050620000fd81620000d4565b92915050565b5f602082840312156200011b576200011a6200009e565b5b5f6200012a84828501620000ed565b91505092915050565b61119380620001415f395ff3fe6080604052600436106100eb575f3560e01c80636352211e11610089578063a22cb46511610058578063a22cb465146105e7578063b88d4fde1461060f578063c87b56dd14610637578063e985e9c514610673576100f2565b80636352211e1461051b57806370a082311461055757806395d89b411461059357806397e5311c146105bd576100f2565b8063095ea7b3116100c5578063095ea7b31461048557806318160ddd146104ad57806323b872dd146104d757806342842e0e146104ff576100f2565b806301ffc9a7146103e357806306fdde031461041f578063081812fc14610449576100f2565b366100f257005b5f6100fb6106af565b90505f60e06101095f6106bf565b901c905063263c69d6810361021d57815f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461019f576040517f363cb31200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b602036103d5f3e6004356024018036103d5f3e602081033560051b81018036103d5f3e5b8082146102145781358060601c816001168260a01b60a81c811583028284027fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef5f38a45050508160200191506101c3565b60015f5260205ff35b630f4599e581036103e1575f73ffffffffffffffffffffffffffffffffffffffff16826001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461031057816001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166102c260046106bf565b73ffffffffffffffffffffffffffffffffffffffff161461030f576040517fc59ec47a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b5f73ffffffffffffffffffffffffffffffffffffffff16825f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610397576040517fbf656a4600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b33825f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060015f5260205ff35b005b3480156103ee575f80fd5b5061040960048036038101906104049190610d09565b6106c9565b6040516104169190610d4e565b60405180910390f35b34801561042a575f80fd5b506104336106ed565b6040516104409190610df1565b60405180910390f35b348015610454575f80fd5b5061046f600480360381019061046a9190610e44565b610740565b60405161047c9190610eae565b60405180910390f35b348015610490575f80fd5b506104ab60048036038101906104a69190610ef1565b610784565b005b3480156104b8575f80fd5b506104c1610804565b6040516104ce9190610f3e565b60405180910390f35b3480156104e2575f80fd5b506104fd60048036038101906104f89190610f57565b61083e565b005b61051960048036038101906105149190610f57565b6108ca565b005b348015610526575f80fd5b50610541600480360381019061053c9190610e44565b610903565b60405161054e9190610eae565b60405180910390f35b348015610562575f80fd5b5061057d60048036038101906105789190610fa7565b610947565b60405161058a9190610f3e565b60405180910390f35b34801561059e575f80fd5b506105a761098d565b6040516105b49190610df1565b60405180910390f35b3480156105c8575f80fd5b506105d16109e0565b6040516105de9190610eae565b60405180910390f35b3480156105f2575f80fd5b5061060d60048036038101906106089190610ffc565b610a75565b005b34801561061a575f80fd5b506106356004803603810190610630919061109b565b610af4565b005b348015610642575f80fd5b5061065d60048036038101906106589190610e44565b610b64565b60405161066a9190610df1565b60405180910390f35b34801561067e575f80fd5b506106996004803603810190610694919061111f565b610bbd565b6040516106a69190610d4e565b60405180910390f35b5f683602298b8c10b01230905090565b5f81359050919050565b5f8160e01c635b5e139f81146380ac58cd82146301ffc9a783141717915050919050565b60605f6106f86109e0565b905060405191506306fdde035f525f806004601c845afa61071b573d5f833e3d82fd5b60205f803e60205f51833e815160205f5101602084013e815160208301016040525090565b5f8061074a6109e0565b905063081812fc5f528260205260205f6024601c845afa601f3d1116610776573d5f6040513e3d604051fd5b600c5160601c915050919050565b5f61078d6109e0565b90508260601b60601c925060405163d10b6e0c5f5283602052826040523360605260205f6064601c34865af1601f3d11166107ca573d5f823e3d81fd5b806040525f6060528284600c5160601c7f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9255f38a450505050565b5f8061080e6109e0565b905063e2c792815f5260205f6004601c845afa601f3d1116610836573d5f6040513e3d604051fd5b5f5191505090565b5f6108476109e0565b90508360601b60601c93508260601b60601c925060405163e5eb36c881528460208201528360408201528260608201523360808201526020816084601c840134865af160018251141661089c573d5f823e3d81fd5b8284867fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef5f38a45050505050565b6108d583838361083e565b6108de82610c18565b156108fe576108fd83838360405180602001604052805f815250610c22565b5b505050565b5f8061090d6109e0565b9050636352211e5f528260205260205f6024601c845afa601f3d1116610939573d5f6040513e3d604051fd5b600c5160601c915050919050565b5f806109516109e0565b90508260601b60601c60205263f5b100ea5f5260205f6024601c845afa601f3d1116610983573d5f6040513e3d604051fd5b5f51915050919050565b60605f6109986109e0565b905060405191506395d89b415f525f806004601c845afa6109bb573d5f833e3d82fd5b60205f803e60205f51833e815160205f5101602084013e815160208301016040525090565b5f6109e96106af565b5f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610a72576040517f5b2a47ae00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b90565b5f610a7e6109e0565b90508260601b60601c925060405163813500fc5f52836020528215156040523360605260205f6064601c34865af160015f511416610abe573d5f823e3d81fd5b83337f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3160206040a3806040525f60605250505050565b610aff85858561083e565b610b0884610c18565b15610b5d57610b5c85858585858080601f0160208091040260200160405190810160405280939291908181526020018383808284375f81840152601f19601f82011690508083019250505050505050610c22565b5b5050505050565b60605f610b6f6109e0565b905060405191508260205263c87b56dd5f525f806024601c845afa610b96573d5f833e3d82fd5b60205f803e60205f51833e815160205f5101602084013e8151602083010160405250919050565b5f80610bc76109e0565b9050604051836040528460601b602c526fe985e9c5000000000000000000000000600c5260205f6044601c855afa601f3d1116610c06573d5f823e3d81fd5b806040525f5115159250505092915050565b5f813b9050919050565b60405163150b7a028082523360208301528560601b60601c604083015283606083015260808083015282518060a08401528015610c69578060c08401826020870160045afa505b60208360a48301601c86015f8a5af1610c8b573d15610c8a573d5f843e3d83fd5b5b8160e01b835114610ca35763d1a57ed65f526004601cfd5b50505050505050565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b610ce881610cb4565b8114610cf2575f80fd5b50565b5f81359050610d0381610cdf565b92915050565b5f60208284031215610d1e57610d1d610cac565b5b5f610d2b84828501610cf5565b91505092915050565b5f8115159050919050565b610d4881610d34565b82525050565b5f602082019050610d615f830184610d3f565b92915050565b5f81519050919050565b5f82825260208201905092915050565b5f5b83811015610d9e578082015181840152602081019050610d83565b5f8484015250505050565b5f601f19601f8301169050919050565b5f610dc382610d67565b610dcd8185610d71565b9350610ddd818560208601610d81565b610de681610da9565b840191505092915050565b5f6020820190508181035f830152610e098184610db9565b905092915050565b5f819050919050565b610e2381610e11565b8114610e2d575f80fd5b50565b5f81359050610e3e81610e1a565b92915050565b5f60208284031215610e5957610e58610cac565b5b5f610e6684828501610e30565b91505092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f610e9882610e6f565b9050919050565b610ea881610e8e565b82525050565b5f602082019050610ec15f830184610e9f565b92915050565b610ed081610e8e565b8114610eda575f80fd5b50565b5f81359050610eeb81610ec7565b92915050565b5f8060408385031215610f0757610f06610cac565b5b5f610f1485828601610edd565b9250506020610f2585828601610e30565b9150509250929050565b610f3881610e11565b82525050565b5f602082019050610f515f830184610f2f565b92915050565b5f805f60608486031215610f6e57610f6d610cac565b5b5f610f7b86828701610edd565b9350506020610f8c86828701610edd565b9250506040610f9d86828701610e30565b9150509250925092565b5f60208284031215610fbc57610fbb610cac565b5b5f610fc984828501610edd565b91505092915050565b610fdb81610d34565b8114610fe5575f80fd5b50565b5f81359050610ff681610fd2565b92915050565b5f806040838503121561101257611011610cac565b5b5f61101f85828601610edd565b925050602061103085828601610fe8565b9150509250929050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f84011261105b5761105a61103a565b5b8235905067ffffffffffffffff8111156110785761107761103e565b5b60208301915083600182028301111561109457611093611042565b5b9250929050565b5f805f805f608086880312156110b4576110b3610cac565b5b5f6110c188828901610edd565b95505060206110d288828901610edd565b94505060406110e388828901610e30565b935050606086013567ffffffffffffffff81111561110457611103610cb0565b5b61111088828901611046565b92509250509295509295909350565b5f806040838503121561113557611134610cac565b5b5f61114285828601610edd565b925050602061115385828601610edd565b915050925092905056fea2646970667358221220e1f95b236b1f33d20003b0ab5951aa7a6186e428e6dd1c0ff9d5d9be21ad49c864736f6c63430008140033000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000003635c9adc5dea00000000000000000000000000000d4ddcdd4519035b7a94c029738de010b0374ef3f000000000000000000000000000000000000000000000000000000000000000d42616e616e614661726d3430340000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044e414e4100000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x608060405260043610610207575f3560e01c80635b2fcf0511610117578063c662e4811161009f578063d547741f1161006e578063d547741f14610eac578063dd62ed3e14610ed4578063f04e283e14610f10578063f2fde38b14610f2c578063fee81cf414610f485761020e565b8063c662e48114610de0578063c87b56dd14610e0a578063ca15c87314610e46578063d539139314610e825761020e565b80639010d07c116100e65780639010d07c14610cd857806391d1485414610d1457806395d89b4114610d50578063a217fddf14610d7a578063a9059cbb14610da45761020e565b80635b2fcf0514610c5e57806370a0823114610c68578063715018a614610ca45780638da5cb5b14610cae5761020e565b80632a6a935d1161019a5780633ccfd60b116101695780633ccfd60b14610bc457806340c10f1914610bda5780634ef41efc14610c0257806354d1f13d14610c2c57806355f804b314610c365761020e565b80632a6a935d14610b225780632f2ff15d14610b4a578063313ce56714610b7257806336568abe14610b9c5761020e565b806323b872dd116101d657806323b872dd14610a64578063248a9ca314610aa05780632569296214610adc578063274e430b14610ae65761020e565b806301ffc9a71461099857806306fdde03146109d4578063095ea7b3146109fe57806318160ddd14610a3a5761020e565b3661020e57005b5f610217610f84565b90505f60e06102255f610f94565b901c905063e985e9c5810361038857816001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146102bc576040517fce5a776b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60445f36905010156102cc575f80fd5b5f6102d76004610f94565b90505f6102e46024610f94565b9050610385846003015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff1661037a575f61037d565b60015b60ff16610f9e565b50505b636352211e810361046157816001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461041b576040517fce5a776b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60245f369050101561042b575f80fd5b5f6104366004610f94565b905061045f61044482610fa6565b73ffffffffffffffffffffffffffffffffffffffff16610f9e565b505b63e5eb36c8810361055357816001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146104f4576040517fce5a776b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60845f3690501015610504575f80fd5b5f61050f6004610f94565b90505f61051c6024610f94565b90505f6105296044610f94565b90505f6105366064610f94565b905061054484848484610ff6565b61054e6001610f9e565b505050505b63813500fc810361063957816001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146105e6576040517fce5a776b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60645f36905010156105f6575f80fd5b5f6106016004610f94565b90505f8061060f6024610f94565b141590505f61061e6044610f94565b905061062b8383836115d1565b6106356001610f9e565b5050505b63d10b6e0c810361073057816001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146106cc576040517fce5a776b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60645f36905010156106dc575f80fd5b5f6106e76004610f94565b90505f6106f46024610f94565b90505f6107016044610f94565b905061072c61071184848461166e565b73ffffffffffffffffffffffffffffffffffffffff16610f9e565b5050505b63081812fc810361080957816001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146107c3576040517fce5a776b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60245f36905010156107d3575f80fd5b5f6107de6004610f94565b90506108076107ec8261181e565b73ffffffffffffffffffffffffffffffffffffffff16610f9e565b505b63f5b100ea81036108cc57816001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461089c576040517fce5a776b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60245f36905010156108ac575f80fd5b5f6108b76004610f94565b90506108ca6108c58261189f565b610f9e565b505b63e2c79281810361098057816001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461095f576040517fce5a776b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60045f369050101561096f575f80fd5b61097f61097a611906565b610f9e565b5b63b7a94eb88103610996576109956001610f9e565b5b005b3480156109a3575f80fd5b506109be60048036038101906109b99190613f1e565b61192d565b6040516109cb9190613f63565b60405180910390f35b3480156109df575f80fd5b506109e86119a6565b6040516109f59190614006565b60405180910390f35b348015610a09575f80fd5b50610a246004803603810190610a1f91906140b3565b611a36565b604051610a319190613f63565b60405180910390f35b348015610a45575f80fd5b50610a4e611b31565b604051610a5b9190614100565b60405180910390f35b348015610a6f575f80fd5b50610a8a6004803603810190610a859190614119565b611b68565b604051610a979190613f63565b60405180910390f35b348015610aab575f80fd5b50610ac66004803603810190610ac1919061419c565b611ced565b604051610ad391906141d6565b60405180910390f35b610ae4611d09565b005b348015610af1575f80fd5b50610b0c6004803603810190610b0791906141ef565b611d5a565b604051610b199190613f63565b60405180910390f35b348015610b2d575f80fd5b50610b486004803603810190610b439190614244565b611df5565b005b348015610b55575f80fd5b50610b706004803603810190610b6b919061426f565b611e02565b005b348015610b7d575f80fd5b50610b86611e23565b604051610b9391906142c8565b60405180910390f35b348015610ba7575f80fd5b50610bc26004803603810190610bbd919061426f565b611e2b565b005b348015610bcf575f80fd5b50610bd8611eae565b005b348015610be5575f80fd5b50610c006004803603810190610bfb91906140b3565b611ec1565b005b348015610c0d575f80fd5b50610c16611f3f565b604051610c2391906142f0565b60405180910390f35b610c34611f70565b005b348015610c41575f80fd5b50610c5c6004803603810190610c57919061436a565b611fa9565b005b610c66611fc7565b005b348015610c73575f80fd5b50610c8e6004803603810190610c8991906141ef565b6120c3565b604051610c9b9190614100565b60405180910390f35b610cac61213a565b005b348015610cb9575f80fd5b50610cc261214d565b604051610ccf91906142f0565b60405180910390f35b348015610ce3575f80fd5b50610cfe6004803603810190610cf991906143b5565b612175565b604051610d0b91906142f0565b60405180910390f35b348015610d1f575f80fd5b50610d3a6004803603810190610d35919061426f565b6121a1565b604051610d479190613f63565b60405180910390f35b348015610d5b575f80fd5b50610d64612204565b604051610d719190614006565b60405180910390f35b348015610d85575f80fd5b50610d8e612294565b604051610d9b91906141d6565b60405180910390f35b348015610daf575f80fd5b50610dca6004803603810190610dc591906140b3565b61229a565b604051610dd79190613f63565b60405180910390f35b348015610deb575f80fd5b50610df46122b0565b604051610e019190614100565b60405180910390f35b348015610e15575f80fd5b50610e306004803603810190610e2b91906143f3565b6122bc565b604051610e3d9190614006565b60405180910390f35b348015610e51575f80fd5b50610e6c6004803603810190610e67919061419c565b612498565b604051610e799190614100565b60405180910390f35b348015610e8d575f80fd5b50610e966124b9565b604051610ea391906141d6565b60405180910390f35b348015610eb7575f80fd5b50610ed26004803603810190610ecd919061426f565b6124dd565b005b348015610edf575f80fd5b50610efa6004803603810190610ef5919061441e565b6124fe565b604051610f079190614100565b60405180910390f35b610f2a6004803603810190610f2591906141ef565b612589565b005b610f466004803603810190610f4191906141ef565b6125c7565b005b348015610f53575f80fd5b50610f6e6004803603810190610f6991906141ef565b6125f0565b604051610f7b9190614100565b60405180910390f35b5f68a20d6e21d0e5255308905090565b5f81359050919050565b805f5260205ff35b5f610fb082612609565b610fe6576040517fceea21b600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610fef82612649565b9050919050565b5f610fff610f84565b90505f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603611066576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f816002015f6110818460070161107c886126b0565b6126bd565b63ffffffff1663ffffffff1681526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff1614611121576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8573ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161461127857816003015f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff1661127757816004015f8581526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614611276576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b5b5f611282876126e7565b90505f61128e876126e7565b9050670de0b6b3a7640000825f0160148282829054906101000a90046bffffffffffffffffffffffff166112c291906144a0565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550670de0b6b3a7640000815f0160148282829054906101000a90046bffffffffffffffffffffffff160192506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555061136684600701611357886126b0565b611361848b61278f565b612882565b836004015f8781526020019081526020015f205f6101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690555f611420856006015f8b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20845f01601081819054906101000a900463ffffffff166001900391906101000a81548163ffffffff021916908363ffffffff160217905563ffffffff166126bd565b63ffffffff16905061148b856006015f8b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2061147f8760070161147a8b6128b4565b6126bd565b63ffffffff1683612882565b5f825f01601081819054906101000a900463ffffffff168092919060010191906101000a81548163ffffffff021916908363ffffffff16021790555063ffffffff1690506114f9866007016114df846128b4565b6114f4896007016114ef8d6128b4565b6126bd565b612882565b611542866006015f8b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20828a612882565b611558866007016115528a6128b4565b83612882565b50508673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef670de0b6b3a76400006040516115bf9190614100565b60405180910390a35050505050505050565b816115da610f84565b6003015f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff021916908315150217905550505050565b5f80611678610f84565b90505f816002015f61169584600701611690896126b0565b6126bd565b63ffffffff1663ffffffff1681526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16146117c157816003015f8273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff166117c0576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b85826004015f8781526020019081526020015f205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080925050509392505050565b5f61182882612609565b61185e576040517fceea21b600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611866610f84565b6004015f8381526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b5f6118a8610f84565b6008015f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f0160109054906101000a900463ffffffff1663ffffffff169050919050565b5f61190f610f84565b5f0160089054906101000a900463ffffffff1663ffffffff16905090565b5f7f5a05180f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061199f575061199e826128c3565b5b9050919050565b6060600280546119b59061450c565b80601f01602080910402602001604051908101604052809291908181526020018280546119e19061450c565b8015611a2c5780601f10611a0357610100808354040283529160200191611a2c565b820191905f5260205f20905b815481529060010190602001808311611a0f57829003601f168201915b5050505050905090565b5f80611a40610f84565b905082816005015f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92585604051611b1e9190614100565b60405180910390a3600191505092915050565b5f611b3a610f84565b5f01600c9054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff16905090565b5f80611b72610f84565b90505f816005015f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205490507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114611cd55780841115611c53576040517f13be252b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b838103826005015f8873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055505b611ce086868661293c565b6001925050509392505050565b5f805f8381526020019081526020015f20600101549050919050565b5f611d12612fbb565b67ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b5f80611d64610f84565b6008015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2090505f6001825f01600b9054906101000a900460ff161660ff1603611dd257611dca83612fc5565b915050611df0565b5f6002825f01600b9054906101000a900460ff161660ff1614159150505b919050565b611dff3382612fcf565b50565b611e0b82611ced565b611e1481613082565b611e1e8383613096565b505050565b5f6012905090565b611e336130c8565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611ea0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e97906145ac565b60405180910390fd5b611eaa82826130cf565b5050565b611eb6613101565b611ebf33613138565b565b611ef27f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6611eed6130c8565b6121a1565b611f31576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f2890614614565b60405180910390fd5b611f3b8282613154565b5050565b5f611f48610f84565b6001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b611fb1613101565b818160049182611fc2929190614806565b505050565b5f3090505f611fd5826120c3565b90508060011115611fe4575f80fd5b5f67016345785d8a00006001611ffa91906148d3565b905080341015612008575f80fd5b61201b3033670de0b6b3a764000061293c565b61202361214d565b73ffffffffffffffffffffffffffffffffffffffff166108fc8290811502906040515f60405180830381858888f19350505050158015612065573d5f803e3d5ffd5b50803411156120be573373ffffffffffffffffffffffffffffffffffffffff166108fc82346120949190614914565b90811502906040515f60405180830381858888f193505050501580156120bc573d5f803e3d5ffd5b505b505050565b5f6120cc610f84565b6008015f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f0160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff169050919050565b612142613101565b61214b5f61358f565b565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392754905090565b5f6121998260015f8681526020019081526020015f2061365590919063ffffffff16565b905092915050565b5f805f8481526020019081526020015f205f015f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16905092915050565b6060600380546122139061450c565b80601f016020809104026020016040519081016040528092919081815260200182805461223f9061450c565b801561228a5780601f106122615761010080835404028352916020019161228a565b820191905f5260205f20905b81548152906001019060200180831161226d57829003601f168201915b5050505050905090565b5f801b81565b5f6122a633848461293c565b6001905092915050565b67016345785d8a000081565b60605f600480546122cc9061450c565b905014612492575f826040516020016122e59190614967565b604051602081830303815290604052805190602001205f1c905060605f60648361230f91906149ae565b90506028811015612357576040518060400160405280600a81526020017f62726f6e7a652e706e67000000000000000000000000000000000000000000008152509150612465565b604681101561239d576040518060400160405280600a81526020017f73696c7665722e706e67000000000000000000000000000000000000000000008152509150612464565b605a8110156123e3576040518060400160405280600881526020017f676f6c642e706e670000000000000000000000000000000000000000000000008152509150612463565b6061811015612429576040518060400160405280600b81526020017f6469616d6f6e642e706e670000000000000000000000000000000000000000008152509150612462565b6040518060400160405280600b81526020017f656d6572616c642e706e6700000000000000000000000000000000000000000081525091505b5b5b5b600482604051602001612479929190614a98565b6040516020818303038152906040529350505050612493565b5b919050565b5f6124b260015f8481526020019081526020015f2061366c565b9050919050565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b6124e682611ced565b6124ef81613082565b6124f983836130cf565b505050565b5f612507610f84565b6005015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905092915050565b612591613101565b63389a75e1600c52805f526020600c2080544211156125b757636f5e88185f526004601cfd5b5f8155506125c48161358f565b50565b6125cf613101565b8060601b6125e457637448fbae5f526004601cfd5b6125ed8161358f565b50565b5f63389a75e1600c52815f526020600c20549050919050565b5f8073ffffffffffffffffffffffffffffffffffffffff1661262a83612649565b73ffffffffffffffffffffffffffffffffffffffff1614159050919050565b5f80612653610f84565b9050806002015f61266f8360070161266a876126b0565b6126bd565b63ffffffff1663ffffffff1681526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16915050919050565b5f600182901b9050919050565b5f600560078316901b835f015f600385901c81526020019081526020015f2054901c905092915050565b5f806126f1610f84565b9050806008015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2091505f6001835f01600b9054906101000a900460ff161660ff1603612789575f6001905061275f84612fc5565b1561276b576002811790505b80835f01600b6101000a81548160ff021916908360ff160217905550505b50919050565b5f80612799610f84565b9050835f01600c9054906101000a900463ffffffff1691505f8263ffffffff160361287b57805f015f81819054906101000a900463ffffffff166127dc90614aca565b91906101000a81548163ffffffff021916908363ffffffff1602179055915081845f01600c6101000a81548163ffffffff021916908363ffffffff16021790555082816002015f8463ffffffff1663ffffffff1681526020019081526020015f205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b5092915050565b826020528160031c5f5260405f206007831660051b815463ffffffff8482841c188116831b8218845550505050505050565b5f60018083901b019050919050565b5f7f7965db0b000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061293557506129348261367f565b5b9050919050565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036129a1576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f6129aa610f84565b90505f6129b6856126e7565b90505f6129c2856126e7565b90506129cc613e78565b825f0160109054906101000a900463ffffffff1663ffffffff16816080018181525050815f0160109054906101000a900463ffffffff1663ffffffff168160a0018181525050825f0160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff168160400181815250508060400151851115612a83576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b848160400181815103915081815250508060400151835f0160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555084825f0160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff16018160600181815250825f0160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550612b588160800151670de0b6b3a7640000836040015181612b5257612b51614981565b5b046136e8565b815f0181815250505f6002835f01600b9054906101000a900460ff161660ff1603612bf8578573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff1603612bc457805f01518160800151038160a00181815250505b612bee670de0b6b3a7640000826060015181612be357612be2614981565b5b048260a001516136e8565b8160200181815250505b5f612c0b8260200151835f0151016136f8565b90505f825f015114612d3e575f856006015f8a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2090505f836080015190505f845f015182039050845f0151885f0160088282829054906101000a900463ffffffff160392506101000a81548163ffffffff021916908363ffffffff16021790555080875f0160106101000a81548163ffffffff021916908363ffffffff1602179055505b5f612cd98484600190039450846126bd565b63ffffffff169050612cf089600701825f80613725565b886004015f8281526020019081526020015f205f6101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055612d32858d836001613769565b50808203612cc7575050505b5f826020015114612f13575f856006015f8973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2090505f8360a0015190505f8460200151820190505f612da8878c61278f565b90505f670de0b6b3a76400008a5f01600c9054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff1681612dec57612deb614981565b5b0490505f8a5f0160049054906101000a900463ffffffff1663ffffffff16905087602001518b5f0160088282829054906101000a900463ffffffff160192506101000a81548163ffffffff021916908363ffffffff16021790555083895f0160106101000a81548163ffffffff021916908363ffffffff1602179055505b5b5f612e818c600701612e7c846126b0565b6126bd565b63ffffffff1614612ea45781816001019150811115612e9f57600190505b612e6b565b612eaf868683612882565b612ec48b600701828588806001019950613725565b612ed0878e835f613769565b81816001019150811115612ee357600190505b838503612e6a57808b5f0160046101000a81548163ffffffff021916908363ffffffff1602179055505050505050505b5f815f01515114612f4c57612f4b81866001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1661378b565b5b508573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef87604051612faa9190614100565b60405180910390a350505050505050565b5f6202a300905090565b5f813b9050919050565b5f612fd9836126e7565b90508115155f6002835f01600b9054906101000a900460ff161660ff16141515151461302f576002815f01600b8282829054906101000a900460ff161892506101000a81548160ff021916908360ff1602179055505b8273ffffffffffffffffffffffffffffffffffffffff167fb5a1de456fff688115a4f75380060c23c8532d14ff85f687cc871456d6420393836040516130759190613f63565b60405180910390a2505050565b6130938161308e6130c8565b6137c7565b50565b6130a0828261384b565b6130c38160015f8581526020019081526020015f2061392590919063ffffffff16565b505050565b5f33905090565b6130d98282613952565b6130fc8160015f8581526020019081526020015f20613a2c90919063ffffffff16565b505050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543314613136576382b429005f526004601cfd5b565b5f385f3847855af16131515763b12d13eb5f526004601cfd5b50565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036131b9576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f6131c2610f84565b90505f6131ce846126e7565b90505f83835f01600c9054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff160190506b0de0b6b39983494c589bffff84118061322457506b0de0b6b39983494c589bffff81115b1561325b576040517fe5cfe95700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80835f01600c6101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055505f84835f0160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff1601905080835f0160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055505f6002845f01600b9054906101000a900460ff161660ff1603613522575f846006015f8873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2090505f845f0160109054906101000a900463ffffffff1663ffffffff1690505f670de0b6b3a7640000848161338357613382614981565b5b0490505f61339961339483856136e8565b6136f8565b90505f815f0151511461351d575f670de0b6b3a764000087816133bf576133be614981565b5b0490505f6133cd898d61278f565b90505f8a5f0160049054906101000a900463ffffffff1663ffffffff169050835f0151518b5f0160088282829054906101000a900463ffffffff160192506101000a81548163ffffffff021916908363ffffffff160217905550848a5f0160106101000a81548163ffffffff021916908363ffffffff1602179055505b5b5f6134618c60070161345c846126b0565b6126bd565b63ffffffff1614613484578281600101915081111561347f57600190505b61344b565b61348f878783612882565b6134a48b600701828489806001019a50613725565b6134b0848e835f613769565b828160010191508111156134c357600190505b84860361344a57808b5f0160046101000a81548163ffffffff021916908363ffffffff160217905550613519848c6001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1661378b565b5050505b505050505b50508373ffffffffffffffffffffffffffffffffffffffff165f73ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516135819190614100565b60405180910390a350505050565b613597613a59565b156135fc577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3811560ff1b8217815550613652565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3818155505b50565b5f613662835f0183613a5d565b5f1c905092915050565b5f613678825f01613a84565b9050919050565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b5f81830382841102905092915050565b613700613ea8565b6040805101828152806020018360051b81016040528183528083602001525050919050565b8163ffffffff168160201b17846020528360021c5f5260405f206003851660061b815467ffffffffffffffff8482841c188116831b82188455505050505050505050565b8360200151818360081b8560601b171781526020810185602001525050505050565b81516040810363263c69d68152602080820152815160051b60440160208282601c85015f885af16001835114166137c0575f82fd5b5050505050565b6137d182826121a1565b613847576137de81613a93565b6137eb835f1c6020613ac0565b6040516020016137fc929190614b89565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161383e9190614006565b60405180910390fd5b5050565b61385582826121a1565b6139215760015f808481526020019081526020015f205f015f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055506138c66130c8565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b5f61394a835f018373ffffffffffffffffffffffffffffffffffffffff165f1b613cf5565b905092915050565b61395c82826121a1565b15613a28575f805f8481526020019081526020015f205f015f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055506139cd6130c8565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45b5050565b5f613a51835f018373ffffffffffffffffffffffffffffffffffffffff165f1b613d5c565b905092915050565b5f90565b5f825f018281548110613a7357613a72614bc2565b5b905f5260205f200154905092915050565b5f815f01805490509050919050565b6060613ab98273ffffffffffffffffffffffffffffffffffffffff16601460ff16613ac0565b9050919050565b60605f6002836002613ad291906148d3565b613adc9190614bef565b67ffffffffffffffff811115613af557613af461463c565b5b6040519080825280601f01601f191660200182016040528015613b275781602001600182028036833780820191505090505b5090507f3000000000000000000000000000000000000000000000000000000000000000815f81518110613b5e57613b5d614bc2565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191690815f1a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110613bc157613bc0614bc2565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191690815f1a9053505f6001846002613bff91906148d3565b613c099190614bef565b90505b6001811115613ca8577f3031323334353637383961626364656600000000000000000000000000000000600f861660108110613c4b57613c4a614bc2565b5b1a60f81b828281518110613c6257613c61614bc2565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191690815f1a905350600485901c945080613ca190614c22565b9050613c0c565b505f8414613ceb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613ce290614c93565b60405180910390fd5b8091505092915050565b5f613d008383613e58565b613d5257825f0182908060018154018082558091505060019003905f5260205f20015f9091909190915055825f0180549050836001015f8481526020019081526020015f208190555060019050613d56565b5f90505b92915050565b5f80836001015f8481526020019081526020015f205490505f8114613e4d575f600182613d899190614914565b90505f6001865f0180549050613d9f9190614914565b9050818114613e05575f865f018281548110613dbe57613dbd614bc2565b5b905f5260205f200154905080875f018481548110613ddf57613dde614bc2565b5b905f5260205f20018190555083876001015f8381526020019081526020015f2081905550505b855f01805480613e1857613e17614cb1565b5b600190038181905f5260205f20015f90559055856001015f8681526020019081526020015f205f905560019350505050613e52565b5f9150505b92915050565b5f80836001015f8481526020019081526020015f20541415905092915050565b6040518060c001604052805f81526020015f81526020015f81526020015f81526020015f81526020015f81525090565b6040518060400160405280606081526020015f81525090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b613efd81613ec9565b8114613f07575f80fd5b50565b5f81359050613f1881613ef4565b92915050565b5f60208284031215613f3357613f32613ec1565b5b5f613f4084828501613f0a565b91505092915050565b5f8115159050919050565b613f5d81613f49565b82525050565b5f602082019050613f765f830184613f54565b92915050565b5f81519050919050565b5f82825260208201905092915050565b5f5b83811015613fb3578082015181840152602081019050613f98565b5f8484015250505050565b5f601f19601f8301169050919050565b5f613fd882613f7c565b613fe28185613f86565b9350613ff2818560208601613f96565b613ffb81613fbe565b840191505092915050565b5f6020820190508181035f83015261401e8184613fce565b905092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61404f82614026565b9050919050565b61405f81614045565b8114614069575f80fd5b50565b5f8135905061407a81614056565b92915050565b5f819050919050565b61409281614080565b811461409c575f80fd5b50565b5f813590506140ad81614089565b92915050565b5f80604083850312156140c9576140c8613ec1565b5b5f6140d68582860161406c565b92505060206140e78582860161409f565b9150509250929050565b6140fa81614080565b82525050565b5f6020820190506141135f8301846140f1565b92915050565b5f805f606084860312156141305761412f613ec1565b5b5f61413d8682870161406c565b935050602061414e8682870161406c565b925050604061415f8682870161409f565b9150509250925092565b5f819050919050565b61417b81614169565b8114614185575f80fd5b50565b5f8135905061419681614172565b92915050565b5f602082840312156141b1576141b0613ec1565b5b5f6141be84828501614188565b91505092915050565b6141d081614169565b82525050565b5f6020820190506141e95f8301846141c7565b92915050565b5f6020828403121561420457614203613ec1565b5b5f6142118482850161406c565b91505092915050565b61422381613f49565b811461422d575f80fd5b50565b5f8135905061423e8161421a565b92915050565b5f6020828403121561425957614258613ec1565b5b5f61426684828501614230565b91505092915050565b5f806040838503121561428557614284613ec1565b5b5f61429285828601614188565b92505060206142a38582860161406c565b9150509250929050565b5f60ff82169050919050565b6142c2816142ad565b82525050565b5f6020820190506142db5f8301846142b9565b92915050565b6142ea81614045565b82525050565b5f6020820190506143035f8301846142e1565b92915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f84011261432a57614329614309565b5b8235905067ffffffffffffffff8111156143475761434661430d565b5b60208301915083600182028301111561436357614362614311565b5b9250929050565b5f80602083850312156143805761437f613ec1565b5b5f83013567ffffffffffffffff81111561439d5761439c613ec5565b5b6143a985828601614315565b92509250509250929050565b5f80604083850312156143cb576143ca613ec1565b5b5f6143d885828601614188565b92505060206143e98582860161409f565b9150509250929050565b5f6020828403121561440857614407613ec1565b5b5f6144158482850161409f565b91505092915050565b5f806040838503121561443457614433613ec1565b5b5f6144418582860161406c565b92505060206144528582860161406c565b9150509250929050565b5f6bffffffffffffffffffffffff82169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6144aa8261445c565b91506144b58361445c565b925082820390506bffffffffffffffffffffffff8111156144d9576144d8614473565b5b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061452357607f821691505b602082108103614536576145356144df565b5b50919050565b7f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e63655f8201527f20726f6c657320666f722073656c660000000000000000000000000000000000602082015250565b5f614596602f83613f86565b91506145a18261453c565b604082019050919050565b5f6020820190508181035f8301526145c38161458a565b9050919050565b7f4d7573742068617665206d696e74657220726f6c6500000000000000000000005f82015250565b5f6145fe601583613f86565b9150614609826145ca565b602082019050919050565b5f6020820190508181035f83015261462b816145f2565b9050919050565b5f82905092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026146c57fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8261468a565b6146cf868361468a565b95508019841693508086168417925050509392505050565b5f819050919050565b5f61470a61470561470084614080565b6146e7565b614080565b9050919050565b5f819050919050565b614723836146f0565b61473761472f82614711565b848454614696565b825550505050565b5f90565b61474b61473f565b61475681848461471a565b505050565b5b818110156147795761476e5f82614743565b60018101905061475c565b5050565b601f8211156147be5761478f81614669565b6147988461467b565b810160208510156147a7578190505b6147bb6147b38561467b565b83018261475b565b50505b505050565b5f82821c905092915050565b5f6147de5f19846008026147c3565b1980831691505092915050565b5f6147f683836147cf565b9150826002028217905092915050565b6148108383614632565b67ffffffffffffffff8111156148295761482861463c565b5b614833825461450c565b61483e82828561477d565b5f601f83116001811461486b575f8415614859578287013590505b61486385826147eb565b8655506148ca565b601f19841661487986614669565b5f5b828110156148a05784890135825560018201915060208501945060208101905061487b565b868310156148bd57848901356148b9601f8916826147cf565b8355505b6001600288020188555050505b50505050505050565b5f6148dd82614080565b91506148e883614080565b92508282026148f681614080565b9150828204841483151761490d5761490c614473565b5b5092915050565b5f61491e82614080565b915061492983614080565b925082820390508181111561494157614940614473565b5b92915050565b5f819050919050565b61496161495c82614080565b614947565b82525050565b5f6149728284614950565b60208201915081905092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f6149b882614080565b91506149c383614080565b9250826149d3576149d2614981565b5b828206905092915050565b5f81905092915050565b5f81546149f48161450c565b6149fe81866149de565b9450600182165f8114614a185760018114614a2d57614a5f565b60ff1983168652811515820286019350614a5f565b614a3685614669565b5f5b83811015614a5757815481890152600182019150602081019050614a38565b838801955050505b50505092915050565b5f614a7282613f7c565b614a7c81856149de565b9350614a8c818560208601613f96565b80840191505092915050565b5f614aa382856149e8565b9150614aaf8284614a68565b91508190509392505050565b5f63ffffffff82169050919050565b5f614ad482614abb565b915063ffffffff8203614aea57614ae9614473565b5b600182019050919050565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000005f82015250565b5f614b296017836149de565b9150614b3482614af5565b601782019050919050565b7f206973206d697373696e6720726f6c65200000000000000000000000000000005f82015250565b5f614b736011836149de565b9150614b7e82614b3f565b601182019050919050565b5f614b9382614b1d565b9150614b9f8285614a68565b9150614baa82614b67565b9150614bb68284614a68565b91508190509392505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f614bf982614080565b9150614c0483614080565b9250828201905080821115614c1c57614c1b614473565b5b92915050565b5f614c2c82614080565b91505f8203614c3e57614c3d614473565b5b600182039050919050565b7f537472696e67733a20686578206c656e67746820696e73756666696369656e745f82015250565b5f614c7d602083613f86565b9150614c8882614c49565b602082019050919050565b5f6020820190508181035f830152614caa81614c71565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603160045260245ffdfea2646970667358221220c37ea4c217fdf50e5e81c2cff631e7406f436afafc3f12b4b7c4a334ff241b0a64736f6c63430008140033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000003635c9adc5dea00000000000000000000000000000d4ddcdd4519035b7a94c029738de010b0374ef3f000000000000000000000000000000000000000000000000000000000000000d42616e616e614661726d3430340000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044e414e4100000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : name_ (string): BananaFarm404
Arg [1] : symbol_ (string): NANA
Arg [2] : initialTokenSupply (uint96): 1000000000000000000000
Arg [3] : initialSupplyOwner (address): 0xD4DDcDD4519035B7A94c029738De010B0374EF3F
-----Encoded View---------------
8 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [2] : 00000000000000000000000000000000000000000000003635c9adc5dea00000
Arg [3] : 000000000000000000000000d4ddcdd4519035b7a94c029738de010b0374ef3f
Arg [4] : 000000000000000000000000000000000000000000000000000000000000000d
Arg [5] : 42616e616e614661726d34303400000000000000000000000000000000000000
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [7] : 4e414e4100000000000000000000000000000000000000000000000000000000
Deployed Bytecode Sourcemap
123202:2426:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;29736:22:1;29761:18;:16;:18::i;:::-;29736:43;;29790:18;29834:3;29811:19;29825:4;29811:13;:19::i;:::-;:26;;29790:47;;29914:10;29900;:24;29896:369;;29958:1;:14;;;;;;;;;;;;29944:28;;:10;:28;;;29940:58;;29981:17;;;;;;;;;;;;;;29940:58;30034:4;30016:8;;:15;;:22;30012:36;;;30040:8;;;30012:36;30063:13;30095:19;30109:4;30095:13;:19::i;:::-;30063:53;;30130:16;30165:19;30179:4;30165:13;:19::i;:::-;30130:56;;30201:53;30209:1;:19;;:26;30229:5;30209:26;;;;;;;;;;;;;;;:36;30236:8;30209:36;;;;;;;;;;;;;;;;;;;;;;;;;:44;;30252:1;30209:44;;;30248:1;30209:44;30201:53;;:7;:53::i;:::-;29926:339;;29896:369;30323:10;30309;:24;30305:255;;30367:1;:14;;;;;;;;;;;;30353:28;;:10;:28;;;30349:58;;30390:17;;;;;;;;;;;;;;30349:58;30443:4;30425:8;;:15;;:22;30421:36;;;30449:8;;;30421:36;30472:10;30485:19;30499:4;30485:13;:19::i;:::-;30472:32;;30519:30;30535:12;30544:2;30535:8;:12::i;:::-;30519:30;;:7;:30::i;:::-;30335:225;30305:255;30650:10;30636;:24;30632:491;;30694:1;:14;;;;;;;;;;;;30680:28;;:10;:28;;;30676:58;;30717:17;;;;;;;;;;;;;;30676:58;30770:4;30752:8;;:15;;:22;30748:36;;;30776:8;;;30748:36;30799:12;30830:19;30844:4;30830:13;:19::i;:::-;30799:52;;30865:10;30894:19;30908:4;30894:13;:19::i;:::-;30865:50;;30929:10;30942:19;30956:4;30942:13;:19::i;:::-;30929:32;;30975:17;31011:19;31025:4;31011:13;:19::i;:::-;30975:57;;31047:41;31064:4;31070:2;31074;31078:9;31047:16;:41::i;:::-;31102:10;31110:1;31102:7;:10::i;:::-;30662:461;;;;30632:491;31204:10;31190;:24;31186:441;;31248:1;:14;;;;;;;;;;;;31234:28;;:10;:28;;;31230:58;;31271:17;;;;;;;;;;;;;;31230:58;31324:4;31306:8;;:15;;:22;31302:36;;;31330:8;;;31302:36;31353:15;31387:19;31401:4;31387:13;:19::i;:::-;31353:55;;31422:11;31459:1;31436:19;31450:4;31436:13;:19::i;:::-;:24;;31422:38;;31474:17;31510:19;31524:4;31510:13;:19::i;:::-;31474:57;;31546:46;31565:7;31574:6;31582:9;31546:18;:46::i;:::-;31606:10;31614:1;31606:7;:10::i;:::-;31216:411;;;31186:441;31704:10;31690;:24;31686:418;;31748:1;:14;;;;;;;;;;;;31734:28;;:10;:28;;;31730:58;;31771:17;;;;;;;;;;;;;;31730:58;31824:4;31806:8;;:15;;:22;31802:36;;;31830:8;;;31802:36;31853:15;31887:19;31901:4;31887:13;:19::i;:::-;31853:55;;31922:10;31935:19;31949:4;31935:13;:19::i;:::-;31922:32;;31968:17;32004:19;32018:4;32004:13;:19::i;:::-;31968:57;;32040:53;32056:35;32068:7;32077:2;32081:9;32056:11;:35::i;:::-;32040:53;;:7;:53::i;:::-;31716:388;;;31686:418;32166:10;32152;:24;32148:259;;32210:1;:14;;;;;;;;;;;;32196:28;;:10;:28;;;32192:58;;32233:17;;;;;;;;;;;;;;32192:58;32286:4;32268:8;;:15;;:22;32264:36;;;32292:8;;;32264:36;32315:10;32328:19;32342:4;32328:13;:19::i;:::-;32315:32;;32362:34;32378:16;32391:2;32378:12;:16::i;:::-;32362:34;;:7;:34::i;:::-;32178:229;32148:259;32470:10;32456;:24;32452:275;;32514:1;:14;;;;;;;;;;;;32500:28;;:10;:28;;;32496:58;;32537:17;;;;;;;;;;;;;;32496:58;32590:4;32572:8;;:15;;:22;32568:36;;;32596:8;;;32568:36;32619:13;32651:19;32665:4;32651:13;:19::i;:::-;32619:53;;32687:29;32695:20;32709:5;32695:13;:20::i;:::-;32687:7;:29::i;:::-;32482:245;32452:275;32785:10;32771;:24;32767:204;;32829:1;:14;;;;;;;;;;;;32815:28;;:10;:28;;;32811:58;;32852:17;;;;;;;;;;;;;;32811:58;32905:4;32887:8;;:15;;:22;32883:36;;;32911:8;;;32883:36;32934:26;32942:17;:15;:17::i;:::-;32934:7;:26::i;:::-;32767:204;33030:10;33016;:24;33012:65;;33056:10;33064:1;33056:7;:10::i;:::-;33012:65;29726:3368;120719:250:0;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;123782:90;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;9732:267:1;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;9026:124;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;11323:497;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;104633:143:0;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;79057:617;;;:::i;:::-;;23828:278:1;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;24213:98;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;105072:167:0;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;8890:74:1;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;106225:270:0;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;125077:100;;;;;;;;;;;;;:::i;:::-;;124803:163;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;26323:117:1;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;79756:456:0;;;:::i;:::-;;124972:99;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;125183:443;;;:::i;:::-;;9216:141:1;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;78798:100:0;;;:::i;:::-;;81444:182;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;121554:173;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;103128:167;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;123878:94;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;102222:49;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;10497:147:1;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;123341:45:0;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;123978:753;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;121895:154;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;122679:62;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;105519:169;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;9452:149:1;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;80399:708:0;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;78384:349;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;81729:435;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;6180:314:1;6239:22;6410:20;6400:30;;6180:314;:::o;36057:197::-;36118:13;36231:6;36218:20;36209:29;;36057:197;;;:::o;36344:179::-;36474:1;36468:4;36461:15;36502:4;36496;36489:18;27258:160;27319:7;27343:11;27351:2;27343:7;:11::i;:::-;27338:44;;27363:19;;;;;;;;;;;;;;27338:44;27399:12;27408:2;27399:8;:12::i;:::-;27392:19;;27258:160;;;:::o;20885:1466::-;21015:22;21040:18;:16;:18::i;:::-;21015:43;;21087:1;21073:16;;:2;:16;;;21069:52;;21098:23;;;;;;;;;;;;;;21069:52;21132:13;21148:1;:16;;:49;21165:31;21170:1;:4;;21176:19;21192:2;21176:15;:19::i;:::-;21165:4;:31::i;:::-;21148:49;;;;;;;;;;;;;;;;;;;;;;;;;21132:65;;21220:5;21212:13;;:4;:13;;;21208:54;;21234:28;;;;;;;;;;;;;;21208:54;21290:4;21277:17;;:9;:17;;;21273:244;;21315:1;:19;;:25;21335:4;21315:25;;;;;;;;;;;;;;;:36;21341:9;21315:36;;;;;;;;;;;;;;;;;;;;;;;;;21310:197;;21388:1;:16;;:20;21405:2;21388:20;;;;;;;;;;;;;;;;;;;;;21375:33;;:9;:33;;;21371:122;;21439:35;;;;;;;;;;;;;;21371:122;21310:197;21273:244;21527:35;21565:18;21578:4;21565:12;:18::i;:::-;21527:56;;21593:33;21629:16;21642:2;21629:12;:16::i;:::-;21593:52;;3537:8;21656:15;:23;;;:39;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;3537:8;21730:13;:21;;;:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;21782:76;21787:1;:4;;21793:19;21809:2;21793:15;:19::i;:::-;21814:43;21839:13;21854:2;21814:24;:43::i;:::-;21782:4;:76::i;:::-;21879:1;:16;;:20;21896:2;21879:20;;;;;;;;;;;;21872:27;;;;;;;;;;;21914:17;21934:50;21939:1;:7;;:13;21947:4;21939:13;;;;;;;;;;;;;;;21956:15;:27;;;21954:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;21934:50;;:4;:50::i;:::-;21914:70;;;;21998:67;22003:1;:7;;:13;22011:4;22003:13;;;;;;;;;;;;;;;22018:27;22023:1;:4;;22029:15;22041:2;22029:11;:15::i;:::-;22018:4;:27::i;:::-;21998:67;;22054:9;21998:4;:67::i;:::-;22080:9;22092:13;:25;;;:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;22080:39;;;;22133:63;22138:1;:4;;22144:22;22156:9;22144:11;:22::i;:::-;22168:27;22173:1;:4;;22179:15;22191:2;22179:11;:15::i;:::-;22168:4;:27::i;:::-;22133:4;:63::i;:::-;22210:32;22215:1;:7;;:11;22223:2;22215:11;;;;;;;;;;;;;;;22228:1;22238:2;22210:4;:32::i;:::-;22256:38;22261:1;:4;;22267:15;22279:2;22267:11;:15::i;:::-;22291:1;22256:4;:38::i;:::-;21706:599;;22335:2;22320:24;;22329:4;22320:24;;;3537:8;22320:24;;;;;;:::i;:::-;;;;;;;;21005:1346;;;;20885:1466;;;;:::o;28750:202::-;28937:8;28877:18;:16;:18::i;:::-;:36;;:47;28914:9;28877:47;;;;;;;;;;;;;;;:57;28925:8;28877:57;;;;;;;;;;;;;;;;:68;;;;;;;;;;;;;;;;;;28750:202;;;:::o;28119:509::-;28238:7;28261:22;28286:18;:16;:18::i;:::-;28261:43;;28315:13;28331:1;:16;;:49;28348:31;28353:1;:4;;28359:19;28375:2;28359:15;:19::i;:::-;28348:4;:31::i;:::-;28331:49;;;;;;;;;;;;;;;;;;;;;;;;;28315:65;;28408:5;28395:18;;:9;:18;;;28391:167;;28434:1;:19;;:26;28454:5;28434:26;;;;;;;;;;;;;;;:37;28461:9;28434:37;;;;;;;;;;;;;;;;;;;;;;;;;28429:119;;28498:35;;;;;;;;;;;;;;28429:119;28391:167;28591:7;28568:1;:16;;:20;28585:2;28568:20;;;;;;;;;;;;:30;;;;;;;;;;;;;;;;;;28616:5;28609:12;;;;28119:509;;;;;:::o;27716:189::-;27781:7;27805:11;27813:2;27805:7;:11::i;:::-;27800:44;;27825:19;;;;;;;;;;;;;;27800:44;27861:18;:16;:18::i;:::-;:33;;:37;27895:2;27861:37;;;;;;;;;;;;;;;;;;;;;27854:44;;27716:189;;;:::o;26661:151::-;26730:7;26756:18;:16;:18::i;:::-;:30;;:37;26787:5;26756:37;;;;;;;;;;;;;;;:49;;;;;;;;;;;;26749:56;;;;26661:151;;;:::o;26489:124::-;26547:7;26573:18;:16;:18::i;:::-;:33;;;;;;;;;;;;26566:40;;;;26489:124;:::o;120719:250:0:-;120818:4;120868:42;120853:57;;;:11;:57;;;;:109;;;;120926:36;120950:11;120926:23;:36::i;:::-;120853:109;120834:128;;120719:250;;;:::o;123782:90::-;123828:13;123860:5;123853:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;123782:90;:::o;9732:267:1:-;9806:4;9822:22;9847:18;:16;:18::i;:::-;9822:43;;9911:6;9876:1;:11;;:23;9888:10;9876:23;;;;;;;;;;;;;;;:32;9900:7;9876:32;;;;;;;;;;;;;;;:41;;;;9954:7;9933:37;;9942:10;9933:37;;;9963:6;9933:37;;;;;;:::i;:::-;;;;;;;;9988:4;9981:11;;;9732:267;;;;:::o;9026:124::-;9078:7;9112:18;:16;:18::i;:::-;:30;;;;;;;;;;;;9104:39;;9097:46;;9026:124;:::o;11323:497::-;11411:4;11427:22;11452:18;:16;:18::i;:::-;11427:43;;11481:15;11499:1;:11;;:17;11511:4;11499:17;;;;;;;;;;;;;;;:29;11517:10;11499:29;;;;;;;;;;;;;;;;11481:47;;11554:17;11543:7;:28;11539:215;;11600:7;11591:6;:16;11587:52;;;11616:23;;;;;;;;;;;;;;11587:52;11723:6;11713:7;:16;11681:1;:11;;:17;11693:4;11681:17;;;;;;;;;;;;;;;:29;11699:10;11681:29;;;;;;;;;;;;;;;:48;;;;11539:215;11764:27;11774:4;11780:2;11784:6;11764:9;:27::i;:::-;11809:4;11802:11;;;;11323:497;;;;;:::o;104633:143:0:-;104721:7;104747:6;:12;104754:4;104747:12;;;;;;;;;;;:22;;;104740:29;;104633:143;;;:::o;79057:617::-;79150:15;79186:28;:26;:28::i;:::-;79168:46;;:15;:46;79150:64;;79382:19;79376:4;79369:33;79432:8;79426:4;79419:22;79488:7;79481:4;79475;79465:21;79458:38;79635:8;79588:45;79585:1;79582;79577:67;79284:374;79057:617::o;23828:278:1:-;23888:4;23904:21;23928:18;:16;:18::i;:::-;:30;;:33;23959:1;23928:33;;;;;;;;;;;;;;;23904:57;;24019:1;3912:6;23975:1;:7;;;;;;;;;;;;:40;:45;;;23971:69;;24029:11;24038:1;24029:8;:11::i;:::-;24022:18;;;;;23971:69;24098:1;4046:6;24057:1;:7;;;;;;;;;;;;:37;:42;;;;24050:49;;;23828:278;;;;:::o;24213:98::-;24272:32;24284:10;24296:7;24272:11;:32::i;:::-;24213:98;:::o;105072:167:0:-;105177:18;105190:4;105177:12;:18::i;:::-;102700:16;102711:4;102700:10;:16::i;:::-;105207:25:::1;105218:4;105224:7;105207:10;:25::i;:::-;105072:167:::0;;;:::o;8890:74:1:-;8931:5;8955:2;8948:9;;8890:74;:::o;106225:270:0:-;106366:12;:10;:12::i;:::-;106355:23;;:7;:23;;;106334:117;;;;;;;;;;;;:::i;:::-;;;;;;;;;106462:26;106474:4;106480:7;106462:11;:26::i;:::-;106225:270;;:::o;125077:100::-;82553:13;:11;:13::i;:::-;125124:46:::1;125159:10;125124:34;:46::i;:::-;125077:100::o:0;124803:163::-;124872:34;122717:24;124893:12;:10;:12::i;:::-;124872:7;:34::i;:::-;124864:68;;;;;;;;;;;;:::i;:::-;;;;;;;;;124942:17;124948:2;124952:6;124942:5;:17::i;:::-;124803:163;;:::o;26323:117:1:-;26376:7;26402:18;:16;:18::i;:::-;:31;;;;;;;;;;;;26395:38;;26323:117;:::o;79756:456:0:-;79958:19;79952:4;79945:33;80004:8;79998:4;79991:22;80056:1;80049:4;80043;80033:21;80026:32;80187:8;80141:44;80138:1;80135;80130:66;79756:456::o;124972:99::-;82553:13;:11;:13::i;:::-;125056:8:::1;;125045;:19;;;;;;;:::i;:::-;;124972:99:::0;;:::o;125183:443::-;125231:13;125255:4;125231:29;;125270:18;125291:16;125301:5;125291:9;:16::i;:::-;125270:37;;125330:10;125325:1;:15;;125317:24;;;;;;125351:13;123377:9;125367:1;:13;;;;:::i;:::-;125351:29;;125411:5;125398:9;:18;;125390:27;;;;;;125427:45;125445:4;125452:10;125464:7;125427:9;:45::i;:::-;125490:7;:5;:7::i;:::-;125482:25;;:32;125508:5;125482:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;125540:5;125528:9;:17;125524:96;;;125570:10;125562:28;;:47;125603:5;125591:9;:17;;;;:::i;:::-;125562:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;125524:96;125221:405;;;125183:443::o;9216:141:1:-;9279:7;9305:18;:16;:18::i;:::-;:30;;:37;9336:5;9305:37;;;;;;;;;;;;;;;:45;;;;;;;;;;;;9298:52;;;;9216:141;;;:::o;78798:100:0:-;82553:13;:11;:13::i;:::-;78870:21:::1;78888:1;78870:9;:21::i;:::-;78798:100::o:0;81444:182::-;81490:14;81598:11;81592:18;81582:28;;81444:182;:::o;121554:173::-;121666:7;121692:28;121714:5;121692:12;:18;121705:4;121692:18;;;;;;;;;;;:21;;:28;;;;:::i;:::-;121685:35;;121554:173;;;;:::o;103128:167::-;103236:4;103259:6;:12;103266:4;103259:12;;;;;;;;;;;:20;;:29;103280:7;103259:29;;;;;;;;;;;;;;;;;;;;;;;;;103252:36;;103128:167;;;;:::o;123878:94::-;123926:13;123958:7;123951:14;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;123878:94;:::o;102222:49::-;102267:4;102222:49;;;:::o;10497:147:1:-;10567:4;10583:33;10593:10;10605:2;10609:6;10583:9;:33::i;:::-;10633:4;10626:11;;10497:147;;;;:::o;123341:45:0:-;123377:9;123341:45;:::o;123978:753::-;124043:20;124105:1;124085:8;124079:22;;;;;:::i;:::-;;;:27;124075:650;;124122:12;124172:7;124155:25;;;;;;;;:::i;:::-;;;;;;;;;;;;;124145:36;;;;;;124137:45;;124122:60;;124228:19;124262:13;124285:3;124278:4;:10;;;;:::i;:::-;124262:26;;124313:2;124305:5;:10;124302:351;;;124336:20;;;;;;;;;;;;;;;;;;;124302:351;;;124388:2;124380:5;:10;124377:276;;;124410:20;;;;;;;;;;;;;;;;;;;124377:276;;;124462:2;124454:5;:10;124451:202;;;124485:18;;;;;;;;;;;;;;;;;;;124451:202;;;124535:2;124527:5;:10;124524:129;;;124557:21;;;;;;;;;;;;;;;;;;;124524:129;;;124617:21;;;;;;;;;;;;;;;;;;;124524:129;124451:202;124377:276;124302:351;124697:8;124707:5;124680:33;;;;;;;;;:::i;:::-;;;;;;;;;;;;;124666:48;;;;;;;124075:650;123978:753;;;;:::o;121895:154::-;121989:7;122015:27;:12;:18;122028:4;122015:18;;;;;;;;;;;:25;:27::i;:::-;122008:34;;121895:154;;;:::o;122679:62::-;122717:24;122679:62;:::o;105519:169::-;105625:18;105638:4;105625:12;:18::i;:::-;102700:16;102711:4;102700:10;:16::i;:::-;105655:26:::1;105667:4;105673:7;105655:11;:26::i;:::-;105519:169:::0;;;:::o;9452:149:1:-;9524:7;9550:18;:16;:18::i;:::-;:28;;:35;9579:5;9550:35;;;;;;;;;;;;;;;:44;9586:7;9550:44;;;;;;;;;;;;;;;;9543:51;;9452:149;;;;:::o;80399:708:0:-;82553:13;:11;:13::i;:::-;80633:19:::1;80627:4;80620:33;80679:12;80673:4;80666:26;80741:4;80735;80725:21;80847:12;80841:19;80828:11;80825:36;80822:157;;;80893:10;80887:4;80880:24;80960:4;80954;80947:18;80822:157;81056:1;81042:12;81035:23;80551:517;81077:23;81087:12;81077:9;:23::i;:::-;80399:708:::0;:::o;78384:349::-;82553:13;:11;:13::i;:::-;78556:8:::1;78552:2;78548:17;78538:150;;78598:10;78592:4;78585:24;78669:4;78663;78656:18;78538:150;78707:19;78717:8;78707:9;:19::i;:::-;78384:349:::0;:::o;81729:435::-;81848:14;81999:19;81993:4;81986:33;82045:12;82039:4;82032:26;82142:4;82136;82126:21;82120:28;82110:38;;81729:435;;;:::o;27467:116:1:-;27527:4;27574:1;27550:26;;:12;27559:2;27550:8;:12::i;:::-;:26;;;;27543:33;;27467:116;;;:::o;26947:196::-;27008:7;27027:22;27052:18;:16;:18::i;:::-;27027:43;;27087:1;:16;;:49;27104:31;27109:1;:4;;27115:19;27131:2;27115:15;:19::i;:::-;27104:4;:31::i;:::-;27087:49;;;;;;;;;;;;;;;;;;;;;;;;;27080:56;;;26947:196;;;:::o;36803:97::-;36861:7;36892:1;36887;:6;;36880:13;;36803:97;;;:::o;37141:164::-;37215:13;37295:1;37289;37281:5;:9;37280:16;;37256:3;:7;;:19;37273:1;37264:5;:10;;37256:19;;;;;;;;;;;;:41;;37240:58;;37141:164;;;;:::o;24972:398::-;25031:21;25064:22;25089:18;:16;:18::i;:::-;25064:43;;25121:1;:13;;:16;25135:1;25121:16;;;;;;;;;;;;;;;25117:20;;25196:1;3912:6;25152:1;:7;;;;;;;;;;;;:40;:45;;;25148:216;;25213:11;3912:6;25213:44;;25275:11;25284:1;25275:8;:11::i;:::-;25271:53;;;4046:6;25288:36;;;;25271:53;25348:5;25338:1;:7;;;:15;;;;;;;;;;;;;;;;;;25199:165;25148:216;25054:316;24972:398;;;:::o;25531:457::-;25662:19;25697:22;25722:18;:16;:18::i;:::-;25697:43;;25765:13;:26;;;;;;;;;;;;25750:41;;25821:1;25805:12;:17;;;25801:181;;25855:1;:12;;;25853:14;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;25838:29;;25910:12;25881:13;:26;;;:41;;;;;;;;;;;;;;;;;;25969:2;25936:1;:16;;:30;25953:12;25936:30;;;;;;;;;;;;;;;;:35;;;;;;;;;;;;;;;;;;25801:181;25687:301;25531:457;;;;:::o;37370:531::-;37533:8;37527:4;37520:22;37575:5;37572:1;37568:13;37562:4;37555:27;37620:4;37614;37604:21;37682:1;37675:5;37671:13;37668:1;37664:21;37744:1;37738:8;37791:10;37875:5;37871:1;37868;37864:9;37860:21;37857:1;37853:29;37850:1;37846:37;37843:1;37839:45;37836:1;37829:56;37506:389;;;;37370:531;;;:::o;36943:133::-;36997:7;37058:1;37053;37048;:6;;37047:12;37040:19;;36943:133;;;:::o;102801:240:0:-;102900:4;102950:32;102935:47;;;:11;:47;;;;:99;;;;102998:36;103022:11;102998:23;:36::i;:::-;102935:99;102916:118;;102801:240;;;:::o;17276:3197:1:-;17382:1;17368:16;;:2;:16;;;17364:52;;17393:23;;;;;;;;;;;;;;17364:52;17427:22;17452:18;:16;:18::i;:::-;17427:43;;17481:35;17519:18;17532:4;17519:12;:18::i;:::-;17481:56;;17547:33;17583:16;17596:2;17583:12;:16::i;:::-;17547:52;;17610:23;;:::i;:::-;17663:15;:27;;;;;;;;;;;;17643:47;;:1;:17;;:47;;;;;17718:13;:25;;;;;;;;;;;;17700:43;;:1;:15;;:43;;;;;17769:15;:23;;;;;;;;;;;;17753:39;;:1;:13;;:39;;;;;17816:1;:13;;;17807:6;:22;17803:56;;;17838:21;;;;;;;;;;;;;;17803:56;17911:6;17894:1;:13;;:23;;;;;;;;;;;17964:1;:13;;;17931:15;:23;;;:47;;;;;;;;;;;;;;;;;;18061:6;18037:13;:21;;;;;;;;;;;;:30;;;18023:1;:11;;:44;;;;17992:13;:21;;;:76;;;;;;;;;;;;;;;;;;18103:54;18117:1;:17;;;3537:8;18136:1;:13;;;:20;;;;;:::i;:::-;;;18103:13;:54::i;:::-;18083:1;:17;;:74;;;;;18229:1;4046:6;18176:13;:19;;;;;;;;;;;;:49;:54;;;18172:252;;18262:2;18254:10;;:4;:10;;;18250:71;;18304:1;:17;;;18284:1;:17;;;:37;18266:1;:15;;:55;;;;;18250:71;18359:50;3537:8;18373:1;:11;;;:18;;;;;:::i;:::-;;;18393:1;:15;;;18359:13;:50::i;:::-;18339:1;:17;;:70;;;;;18172:252;18438:29;18470:56;18508:1;:17;;;18488:1;:17;;;:37;18470:17;:56::i;:::-;18438:88;;18566:1;18545;:17;;;:22;18541:690;;18587:27;18617:1;:7;;:13;18625:4;18617:13;;;;;;;;;;;;;;;18587:43;;18648:17;18668:1;:17;;;18648:37;;18703:15;18733:1;:17;;;18721:9;:29;18703:47;;18795:1;:17;;;18768:1;:16;;;:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;18868:7;18831:15;:27;;;:45;;;;;;;;;;;;;;;;;;18924:293;18949:10;18962:28;18967:9;18978:11;;;;;;;18962:4;:28::i;:::-;18949:41;;;;19012:43;19040:1;:4;;19046:2;19050:1;19053;19012:27;:43::i;:::-;19084:1;:16;;:20;19101:2;19084:20;;;;;;;;;;;;19077:27;;;;;;;;;;;19126:42;19144:10;19156:4;19162:2;19166:1;19126:17;:42::i;:::-;18927:260;19208:7;19195:9;:20;18924:293;;18569:662;;;18541:690;19270:1;19249;:17;;;:22;19245:1048;;19291:25;19319:1;:7;;:11;19327:2;19319:11;;;;;;;;;;;;;;;19291:39;;19348:15;19366:1;:15;;;19348:33;;19399:13;19425:1;:17;;;19415:7;:27;19399:43;;19460:14;19477:43;19502:13;19517:2;19477:24;:43::i;:::-;19460:60;;19538:16;3537:8;19557:1;:13;;;;;;;;;;;;:20;;;;;;;:::i;:::-;;;19538:39;;19595:10;19608:1;:13;;;;;;;;;;;;19595:26;;;;19666:1;:17;;;19639:1;:16;;;:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;19737:5;19702:13;:25;;;:41;;;;;;;;;;;;;;;;;;19791:444;19816:121;19858:1;19823:31;19828:1;:4;;19834:19;19850:2;19834:15;:19::i;:::-;19823:4;:31::i;:::-;:36;;;19816:121;;19898:8;19891:4;;;;;;:15;19887:27;;;19913:1;19908:6;;19887:27;19816:121;;;19958:34;19963:7;19972;19988:2;19958:4;:34::i;:::-;20014:65;20042:1;:4;;20048:2;20052:7;20068:9;;;;;;20014:27;:65::i;:::-;20101:40;20119:10;20131:2;20135;20139:1;20101:17;:40::i;:::-;20174:8;20167:4;;;;;;:15;20163:27;;;20189:1;20184:6;;20163:27;20228:5;20217:7;:16;19791:444;;20275:2;20252:1;:13;;;:26;;;;;;;;;;;;;;;;;;19273:1020;;;;;;19245:1048;20337:1;20311:10;:15;;;:22;:27;20307:109;;20358:43;20374:10;20386:1;:14;;;;;;;;;;;;20358:15;:43::i;:::-;20307:109;17870:2556;20455:2;20440:26;;20449:4;20440:26;;;20459:6;20440:26;;;;;;:::i;:::-;;;;;;;;17354:3119;;;;17276:3197;;;:::o;77914:110:0:-;77983:6;78008:9;78001:16;;77914:110;:::o;35786:212:1:-;35837:11;35948:1;35936:14;35926:24;;35786:212;;;:::o;24523:283::-;24594:21;24618:15;24631:1;24618:12;:15::i;:::-;24594:39;;24695:5;24647:53;;24689:1;4046:6;24648:1;:7;;;;;;;;;;;;:37;:42;;;;24647:53;;;24643:122;;4046:6;24716:1;:7;;;:38;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24643:122;24790:1;24779:20;;;24793:5;24779:20;;;;;;:::i;:::-;;;;;;;;24584:222;24523:283;;:::o;103589:103:0:-;103655:30;103666:4;103672:12;:10;:12::i;:::-;103655:10;:30::i;:::-;103589:103;:::o;122137:188::-;122246:31;122263:4;122269:7;122246:16;:31::i;:::-;122287;122310:7;122287:12;:18;122300:4;122287:18;;;;;;;;;;;:22;;:31;;;;:::i;:::-;;122137:188;;:::o;82620:96::-;82673:7;82699:10;82692:17;;82620:96;:::o;122414:193::-;122524:32;122542:4;122548:7;122524:17;:32::i;:::-;122566:34;122592:7;122566:12;:18;122579:4;122566:18;;;;;;;;;;;:25;;:34;;;;:::i;:::-;;122414:193;;:::o;77328:355::-;77540:11;77534:18;77524:8;77521:32;77511:156;;77586:10;77580:4;77573:24;77648:4;77642;77635:18;77511:156;77328:355::o;3821:406::-;4087:4;4075:10;4069:4;4057:10;4042:13;4038:2;4031:5;4026:66;4016:195;;4125:10;4119:4;4112:24;4192:4;4186;4179:18;4016:195;3821:406;:::o;12379:2110:1:-;12467:1;12453:16;;:2;:16;;;12449:52;;12478:23;;;;;;;;;;;;;;12449:52;12512:22;12537:18;:16;:18::i;:::-;12512:43;;12566:33;12602:16;12615:2;12602:12;:16::i;:::-;12566:52;;12653:26;12707:6;12690:1;:13;;;;;;;;;;;;12682:22;;:31;12653:60;;3753:25;12731:6;:20;:56;;;;3753:25;12755:18;:32;12731:56;12727:123;;;12814:21;;;;;;;;;;;;;;12727:123;12886:18;12863:1;:13;;;:42;;;;;;;;;;;;;;;;;;12920:17;12964:6;12940:13;:21;;;;;;;;;;;;:30;;;12920:50;;13015:9;12984:13;:21;;;:41;;;;;;;;;;;;;;;;;;13097:1;4046:6;13044:13;:19;;;;;;;;;;;;:49;:54;;;13040:1386;;13118:25;13146:1;:7;;:11;13154:2;13146:11;;;;;;;;;;;;;;;13118:39;;13175:15;13193:13;:25;;;;;;;;;;;;13175:43;;;;13236:13;3537:8;13252:9;:16;;;;;:::i;:::-;;;13236:32;;13286:29;13318:48;13336:29;13350:5;13357:7;13336:13;:29::i;:::-;13318:17;:48::i;:::-;13286:80;;13415:1;13389:10;:15;;;:22;:27;13385:1027;;13440:16;3537:8;13459:18;:25;;;;;:::i;:::-;;;13440:44;;13506:14;13523:43;13548:13;13563:2;13523:24;:43::i;:::-;13506:60;;13588:10;13601:1;:13;;;;;;;;;;;;13588:26;;;;13663:10;:15;;;:22;13636:1;:16;;;:50;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13743:5;13708:13;:25;;;:41;;;;;;;;;;;;;;;;;;13805:476;13834:129;13876:1;13841:31;13846:1;:4;;13852:19;13868:2;13852:15;:19::i;:::-;13841:4;:31::i;:::-;:36;;;13834:129;;13920:8;13913:4;;;;;;:15;13909:27;;;13935:1;13930:6;;13909:27;13834:129;;;13988:34;13993:7;14002;14018:2;13988:4;:34::i;:::-;14048:65;14076:1;:4;;14082:2;14086:7;14102:9;;;;;;14048:27;:65::i;:::-;14139:40;14157:10;14169:2;14173;14177:1;14139:17;:40::i;:::-;14216:8;14209:4;;;;;;:15;14205:27;;;14231:1;14226:6;;14205:27;14274:5;14263:7;:16;13805:476;;14325:2;14302:1;:13;;;:26;;;;;;;;;;;;;;;;;;14350:43;14366:10;14378:1;:14;;;;;;;;;;;;14350:15;:43::i;:::-;13418:994;;;13385:1027;13100:1326;;;;13040:1386;12629:1807;;14471:2;14450:32;;14467:1;14450:32;;;14475:6;14450:32;;;;;;:::i;:::-;;;;;;;;12439:2050;;12379:2110;;:::o;76181:1089:0:-;76249:23;:21;:23::i;:::-;76245:1019;;;76379:11;76479:8;76475:2;76471:17;76467:2;76463:26;76451:38;;76633:8;76621:9;76615:16;76575:38;76572:1;76569;76564:78;76746:8;76739:16;76734:3;76730:26;76720:8;76717:40;76706:9;76699:59;76344:428;76245:1019;;;76893:11;76993:8;76989:2;76985:17;76981:2;76977:26;76965:38;;77147:8;77135:9;77129:16;77089:38;77086:1;77083;77078:78;77231:8;77220:9;77213:27;76858:396;76245:1019;76181:1089;:::o;116918:178::-;117014:7;117064:22;117068:3;:10;;117080:5;117064:3;:22::i;:::-;117056:31;;117033:56;;116918:178;;;;:::o;116461:115::-;116524:7;116550:19;116558:3;:10;;116550:7;:19::i;:::-;116543:26;;116461:115;;;:::o;87191:169::-;87290:4;87328:25;87313:40;;;:11;:40;;;;87306:47;;87191:169;;;:::o;36567:199:1:-;36634:9;36747:1;36744;36740:9;36736:1;36733;36730:8;36726:24;36721:29;;36567:199;;;;:::o;33812:440::-;33872:20;;:::i;:::-;33999:4;33992;33986:11;33982:22;34074:1;34068:4;34061:15;34113:4;34107;34103:15;34163:1;34160;34156:9;34148:6;34144:22;34138:4;34131:36;34190:4;34187:1;34180:15;34229:6;34225:1;34219:4;34215:12;34208:28;33956:290;;33812:440;;;:::o;37971:691::-;38255:9;38243:10;38239:26;38226:10;38222:2;38218:19;38215:51;38292:8;38286:4;38279:22;38334:2;38331:1;38327:10;38321:4;38314:24;38376:4;38370;38360:21;38435:1;38431:2;38427:10;38424:1;38420:18;38497:1;38491:8;38544:18;38636:5;38632:1;38629;38625:9;38621:21;38618:1;38614:29;38611:1;38607:37;38604:1;38600:45;38597:1;38590:56;38188:468;;;;;37971:691;;;;:::o;34355:367::-;34583:1;34577:4;34573:12;34567:19;34645:7;34639:2;34636:1;34632:10;34628:1;34624:2;34620:10;34617:26;34614:39;34606:6;34599:55;34700:4;34692:6;34688:17;34684:1;34678:4;34674:12;34667:39;34539:177;34355:367;;;;:::o;34818:622::-;34983:1;34977:8;35017:4;35011;35007:15;35075:10;35072:1;35065:21;35149:4;35142;35139:1;35135:12;35128:26;35244:4;35238:11;35235:1;35231:19;35225:4;35221:30;35369:4;35366:1;35363;35356:4;35353:1;35349:12;35346:1;35338:6;35331:5;35326:48;35322:1;35318;35312:8;35309:15;35305:70;35295:129;;35405:4;35402:1;35395:15;35295:129;34951:483;;;34818:622;;:::o;103973:479:0:-;104061:22;104069:4;104075:7;104061;:22::i;:::-;104056:390;;104244:28;104264:7;104244:19;:28::i;:::-;104343:38;104371:4;104363:13;;104378:2;104343:19;:38::i;:::-;104151:252;;;;;;;;;:::i;:::-;;;;;;;;;;;;;104099:336;;;;;;;;;;;:::i;:::-;;;;;;;;104056:390;103973:479;;:::o;107830:233::-;107913:22;107921:4;107927:7;107913;:22::i;:::-;107908:149;;107983:4;107951:6;:12;107958:4;107951:12;;;;;;;;;;;:20;;:29;107972:7;107951:29;;;;;;;;;;;;;;;;:36;;;;;;;;;;;;;;;;;;108033:12;:10;:12::i;:::-;108006:40;;108024:7;108006:40;;108018:4;108006:40;;;;;;;;;;107908:149;107830:233;;:::o;115594:172::-;115686:4;115709:50;115714:3;:10;;115750:5;115734:23;;115726:32;;115709:4;:50::i;:::-;115702:57;;115594:172;;;;:::o;108234:234::-;108317:22;108325:4;108331:7;108317;:22::i;:::-;108313:149;;;108387:5;108355:6;:12;108362:4;108355:12;;;;;;;;;;;:20;;:29;108376:7;108355:29;;;;;;;;;;;;;;;;:37;;;;;;;;;;;;;;;;;;108438:12;:10;:12::i;:::-;108411:40;;108429:7;108411:40;;108423:4;108411:40;;;;;;;;;;108313:149;108234:234;;:::o;115934:178::-;116029:4;116052:53;116060:3;:10;;116096:5;116080:23;;116072:32;;116052:7;:53::i;:::-;116045:60;;115934:178;;;;:::o;74384:78::-;74448:10;74384:78;:::o;112077:140::-;112166:7;112192:3;:11;;112204:5;112192:18;;;;;;;;:::i;:::-;;;;;;;;;;112185:25;;112077:140;;;;:::o;111628:107::-;111684:7;111710:3;:11;;:18;;;;111703:25;;111628:107;;;:::o;101848:149::-;101906:13;101938:52;101966:4;101950:22;;100035:2;101938:52;;:11;:52::i;:::-;101931:59;;101848:149;;;:::o;101237:459::-;101334:13;101359:19;101404:1;101395:6;101391:1;:10;;;;:::i;:::-;:14;;;;:::i;:::-;101381:25;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;101359:47;;101416:15;:6;101423:1;101416:9;;;;;;;;:::i;:::-;;;;;:15;;;;;;;;;;;101441;:6;101448:1;101441:9;;;;;;;;:::i;:::-;;;;;:15;;;;;;;;;;;101471:9;101496:1;101487:6;101483:1;:10;;;;:::i;:::-;:14;;;;:::i;:::-;101471:26;;101466:128;101503:1;101499;:5;101466:128;;;101537:8;101554:3;101546:5;:11;101537:21;;;;;;;:::i;:::-;;;;;101525:6;101532:1;101525:9;;;;;;;;:::i;:::-;;;;;:33;;;;;;;;;;;101582:1;101572:11;;;;;101506:3;;;;:::i;:::-;;;101466:128;;;;101620:1;101611:5;:10;101603:55;;;;;;;;;;;;:::i;:::-;;;;;;;;;101682:6;101668:21;;;101237:459;;;;:::o;109357:404::-;109420:4;109441:21;109451:3;109456:5;109441:9;:21::i;:::-;109436:319;;109478:3;:11;;109495:5;109478:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;109658:3;:11;;:18;;;;109636:3;:12;;:19;109649:5;109636:19;;;;;;;;;;;:40;;;;109697:4;109690:11;;;;109436:319;109739:5;109732:12;;109357:404;;;;;:::o;109929:1388::-;109995:4;110111:18;110132:3;:12;;:19;110145:5;110132:19;;;;;;;;;;;;110111:40;;110180:1;110166:10;:15;110162:1149;;110535:21;110572:1;110559:10;:14;;;;:::i;:::-;110535:38;;110587:17;110628:1;110607:3;:11;;:18;;;;:22;;;;:::i;:::-;110587:42;;110661:13;110648:9;:26;110644:398;;110694:17;110714:3;:11;;110726:9;110714:22;;;;;;;;:::i;:::-;;;;;;;;;;110694:42;;110865:9;110836:3;:11;;110848:13;110836:26;;;;;;;;:::i;:::-;;;;;;;;;:38;;;;110974:10;110948:3;:12;;:23;110961:9;110948:23;;;;;;;;;;;:36;;;;110676:366;110644:398;111120:3;:11;;:17;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;111212:3;:12;;:19;111225:5;111212:19;;;;;;;;;;;111205:26;;;111253:4;111246:11;;;;;;;110162:1149;111295:5;111288:12;;;109929:1388;;;;;:::o;111398:149::-;111493:4;111539:1;111516:3;:12;;:19;111529:5;111516:19;;;;;;;;;;;;:24;;111509:31;;111398:149;;;;:::o;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;:::o;88:117:3:-;197:1;194;187:12;211:117;320:1;317;310:12;334:149;370:7;410:66;403:5;399:78;388:89;;334:149;;;:::o;489:120::-;561:23;578:5;561:23;:::i;:::-;554:5;551:34;541:62;;599:1;596;589:12;541:62;489:120;:::o;615:137::-;660:5;698:6;685:20;676:29;;714:32;740:5;714:32;:::i;:::-;615:137;;;;:::o;758:327::-;816:6;865:2;853:9;844:7;840:23;836:32;833:119;;;871:79;;:::i;:::-;833:119;991:1;1016:52;1060:7;1051:6;1040:9;1036:22;1016:52;:::i;:::-;1006:62;;962:116;758:327;;;;:::o;1091:90::-;1125:7;1168:5;1161:13;1154:21;1143:32;;1091:90;;;:::o;1187:109::-;1268:21;1283:5;1268:21;:::i;:::-;1263:3;1256:34;1187:109;;:::o;1302:210::-;1389:4;1427:2;1416:9;1412:18;1404:26;;1440:65;1502:1;1491:9;1487:17;1478:6;1440:65;:::i;:::-;1302:210;;;;:::o;1518:99::-;1570:6;1604:5;1598:12;1588:22;;1518:99;;;:::o;1623:169::-;1707:11;1741:6;1736:3;1729:19;1781:4;1776:3;1772:14;1757:29;;1623:169;;;;:::o;1798:246::-;1879:1;1889:113;1903:6;1900:1;1897:13;1889:113;;;1988:1;1983:3;1979:11;1973:18;1969:1;1964:3;1960:11;1953:39;1925:2;1922:1;1918:10;1913:15;;1889:113;;;2036:1;2027:6;2022:3;2018:16;2011:27;1860:184;1798:246;;;:::o;2050:102::-;2091:6;2142:2;2138:7;2133:2;2126:5;2122:14;2118:28;2108:38;;2050:102;;;:::o;2158:377::-;2246:3;2274:39;2307:5;2274:39;:::i;:::-;2329:71;2393:6;2388:3;2329:71;:::i;:::-;2322:78;;2409:65;2467:6;2462:3;2455:4;2448:5;2444:16;2409:65;:::i;:::-;2499:29;2521:6;2499:29;:::i;:::-;2494:3;2490:39;2483:46;;2250:285;2158:377;;;;:::o;2541:313::-;2654:4;2692:2;2681:9;2677:18;2669:26;;2741:9;2735:4;2731:20;2727:1;2716:9;2712:17;2705:47;2769:78;2842:4;2833:6;2769:78;:::i;:::-;2761:86;;2541:313;;;;:::o;2860:126::-;2897:7;2937:42;2930:5;2926:54;2915:65;;2860:126;;;:::o;2992:96::-;3029:7;3058:24;3076:5;3058:24;:::i;:::-;3047:35;;2992:96;;;:::o;3094:122::-;3167:24;3185:5;3167:24;:::i;:::-;3160:5;3157:35;3147:63;;3206:1;3203;3196:12;3147:63;3094:122;:::o;3222:139::-;3268:5;3306:6;3293:20;3284:29;;3322:33;3349:5;3322:33;:::i;:::-;3222:139;;;;:::o;3367:77::-;3404:7;3433:5;3422:16;;3367:77;;;:::o;3450:122::-;3523:24;3541:5;3523:24;:::i;:::-;3516:5;3513:35;3503:63;;3562:1;3559;3552:12;3503:63;3450:122;:::o;3578:139::-;3624:5;3662:6;3649:20;3640:29;;3678:33;3705:5;3678:33;:::i;:::-;3578:139;;;;:::o;3723:474::-;3791:6;3799;3848:2;3836:9;3827:7;3823:23;3819:32;3816:119;;;3854:79;;:::i;:::-;3816:119;3974:1;3999:53;4044:7;4035:6;4024:9;4020:22;3999:53;:::i;:::-;3989:63;;3945:117;4101:2;4127:53;4172:7;4163:6;4152:9;4148:22;4127:53;:::i;:::-;4117:63;;4072:118;3723:474;;;;;:::o;4203:118::-;4290:24;4308:5;4290:24;:::i;:::-;4285:3;4278:37;4203:118;;:::o;4327:222::-;4420:4;4458:2;4447:9;4443:18;4435:26;;4471:71;4539:1;4528:9;4524:17;4515:6;4471:71;:::i;:::-;4327:222;;;;:::o;4555:619::-;4632:6;4640;4648;4697:2;4685:9;4676:7;4672:23;4668:32;4665:119;;;4703:79;;:::i;:::-;4665:119;4823:1;4848:53;4893:7;4884:6;4873:9;4869:22;4848:53;:::i;:::-;4838:63;;4794:117;4950:2;4976:53;5021:7;5012:6;5001:9;4997:22;4976:53;:::i;:::-;4966:63;;4921:118;5078:2;5104:53;5149:7;5140:6;5129:9;5125:22;5104:53;:::i;:::-;5094:63;;5049:118;4555:619;;;;;:::o;5180:77::-;5217:7;5246:5;5235:16;;5180:77;;;:::o;5263:122::-;5336:24;5354:5;5336:24;:::i;:::-;5329:5;5326:35;5316:63;;5375:1;5372;5365:12;5316:63;5263:122;:::o;5391:139::-;5437:5;5475:6;5462:20;5453:29;;5491:33;5518:5;5491:33;:::i;:::-;5391:139;;;;:::o;5536:329::-;5595:6;5644:2;5632:9;5623:7;5619:23;5615:32;5612:119;;;5650:79;;:::i;:::-;5612:119;5770:1;5795:53;5840:7;5831:6;5820:9;5816:22;5795:53;:::i;:::-;5785:63;;5741:117;5536:329;;;;:::o;5871:118::-;5958:24;5976:5;5958:24;:::i;:::-;5953:3;5946:37;5871:118;;:::o;5995:222::-;6088:4;6126:2;6115:9;6111:18;6103:26;;6139:71;6207:1;6196:9;6192:17;6183:6;6139:71;:::i;:::-;5995:222;;;;:::o;6223:329::-;6282:6;6331:2;6319:9;6310:7;6306:23;6302:32;6299:119;;;6337:79;;:::i;:::-;6299:119;6457:1;6482:53;6527:7;6518:6;6507:9;6503:22;6482:53;:::i;:::-;6472:63;;6428:117;6223:329;;;;:::o;6558:116::-;6628:21;6643:5;6628:21;:::i;:::-;6621:5;6618:32;6608:60;;6664:1;6661;6654:12;6608:60;6558:116;:::o;6680:133::-;6723:5;6761:6;6748:20;6739:29;;6777:30;6801:5;6777:30;:::i;:::-;6680:133;;;;:::o;6819:323::-;6875:6;6924:2;6912:9;6903:7;6899:23;6895:32;6892:119;;;6930:79;;:::i;:::-;6892:119;7050:1;7075:50;7117:7;7108:6;7097:9;7093:22;7075:50;:::i;:::-;7065:60;;7021:114;6819:323;;;;:::o;7148:474::-;7216:6;7224;7273:2;7261:9;7252:7;7248:23;7244:32;7241:119;;;7279:79;;:::i;:::-;7241:119;7399:1;7424:53;7469:7;7460:6;7449:9;7445:22;7424:53;:::i;:::-;7414:63;;7370:117;7526:2;7552:53;7597:7;7588:6;7577:9;7573:22;7552:53;:::i;:::-;7542:63;;7497:118;7148:474;;;;;:::o;7628:86::-;7663:7;7703:4;7696:5;7692:16;7681:27;;7628:86;;;:::o;7720:112::-;7803:22;7819:5;7803:22;:::i;:::-;7798:3;7791:35;7720:112;;:::o;7838:214::-;7927:4;7965:2;7954:9;7950:18;7942:26;;7978:67;8042:1;8031:9;8027:17;8018:6;7978:67;:::i;:::-;7838:214;;;;:::o;8058:118::-;8145:24;8163:5;8145:24;:::i;:::-;8140:3;8133:37;8058:118;;:::o;8182:222::-;8275:4;8313:2;8302:9;8298:18;8290:26;;8326:71;8394:1;8383:9;8379:17;8370:6;8326:71;:::i;:::-;8182:222;;;;:::o;8410:117::-;8519:1;8516;8509:12;8533:117;8642:1;8639;8632:12;8656:117;8765:1;8762;8755:12;8793:553;8851:8;8861:6;8911:3;8904:4;8896:6;8892:17;8888:27;8878:122;;8919:79;;:::i;:::-;8878:122;9032:6;9019:20;9009:30;;9062:18;9054:6;9051:30;9048:117;;;9084:79;;:::i;:::-;9048:117;9198:4;9190:6;9186:17;9174:29;;9252:3;9244:4;9236:6;9232:17;9222:8;9218:32;9215:41;9212:128;;;9259:79;;:::i;:::-;9212:128;8793:553;;;;;:::o;9352:529::-;9423:6;9431;9480:2;9468:9;9459:7;9455:23;9451:32;9448:119;;;9486:79;;:::i;:::-;9448:119;9634:1;9623:9;9619:17;9606:31;9664:18;9656:6;9653:30;9650:117;;;9686:79;;:::i;:::-;9650:117;9799:65;9856:7;9847:6;9836:9;9832:22;9799:65;:::i;:::-;9781:83;;;;9577:297;9352:529;;;;;:::o;9887:474::-;9955:6;9963;10012:2;10000:9;9991:7;9987:23;9983:32;9980:119;;;10018:79;;:::i;:::-;9980:119;10138:1;10163:53;10208:7;10199:6;10188:9;10184:22;10163:53;:::i;:::-;10153:63;;10109:117;10265:2;10291:53;10336:7;10327:6;10316:9;10312:22;10291:53;:::i;:::-;10281:63;;10236:118;9887:474;;;;;:::o;10367:329::-;10426:6;10475:2;10463:9;10454:7;10450:23;10446:32;10443:119;;;10481:79;;:::i;:::-;10443:119;10601:1;10626:53;10671:7;10662:6;10651:9;10647:22;10626:53;:::i;:::-;10616:63;;10572:117;10367:329;;;;:::o;10702:474::-;10770:6;10778;10827:2;10815:9;10806:7;10802:23;10798:32;10795:119;;;10833:79;;:::i;:::-;10795:119;10953:1;10978:53;11023:7;11014:6;11003:9;10999:22;10978:53;:::i;:::-;10968:63;;10924:117;11080:2;11106:53;11151:7;11142:6;11131:9;11127:22;11106:53;:::i;:::-;11096:63;;11051:118;10702:474;;;;;:::o;11182:109::-;11218:7;11258:26;11251:5;11247:38;11236:49;;11182:109;;;:::o;11297:180::-;11345:77;11342:1;11335:88;11442:4;11439:1;11432:15;11466:4;11463:1;11456:15;11483:216;11522:4;11542:19;11559:1;11542:19;:::i;:::-;11537:24;;11575:19;11592:1;11575:19;:::i;:::-;11570:24;;11618:1;11615;11611:9;11603:17;;11642:26;11636:4;11633:36;11630:62;;;11672:18;;:::i;:::-;11630:62;11483:216;;;;:::o;11705:180::-;11753:77;11750:1;11743:88;11850:4;11847:1;11840:15;11874:4;11871:1;11864:15;11891:320;11935:6;11972:1;11966:4;11962:12;11952:22;;12019:1;12013:4;12009:12;12040:18;12030:81;;12096:4;12088:6;12084:17;12074:27;;12030:81;12158:2;12150:6;12147:14;12127:18;12124:38;12121:84;;12177:18;;:::i;:::-;12121:84;11942:269;11891:320;;;:::o;12217:234::-;12357:34;12353:1;12345:6;12341:14;12334:58;12426:17;12421:2;12413:6;12409:15;12402:42;12217:234;:::o;12457:366::-;12599:3;12620:67;12684:2;12679:3;12620:67;:::i;:::-;12613:74;;12696:93;12785:3;12696:93;:::i;:::-;12814:2;12809:3;12805:12;12798:19;;12457:366;;;:::o;12829:419::-;12995:4;13033:2;13022:9;13018:18;13010:26;;13082:9;13076:4;13072:20;13068:1;13057:9;13053:17;13046:47;13110:131;13236:4;13110:131;:::i;:::-;13102:139;;12829:419;;;:::o;13254:171::-;13394:23;13390:1;13382:6;13378:14;13371:47;13254:171;:::o;13431:366::-;13573:3;13594:67;13658:2;13653:3;13594:67;:::i;:::-;13587:74;;13670:93;13759:3;13670:93;:::i;:::-;13788:2;13783:3;13779:12;13772:19;;13431:366;;;:::o;13803:419::-;13969:4;14007:2;13996:9;13992:18;13984:26;;14056:9;14050:4;14046:20;14042:1;14031:9;14027:17;14020:47;14084:131;14210:4;14084:131;:::i;:::-;14076:139;;13803:419;;;:::o;14228:97::-;14287:6;14315:3;14305:13;;14228:97;;;;:::o;14331:180::-;14379:77;14376:1;14369:88;14476:4;14473:1;14466:15;14500:4;14497:1;14490:15;14517:141;14566:4;14589:3;14581:11;;14612:3;14609:1;14602:14;14646:4;14643:1;14633:18;14625:26;;14517:141;;;:::o;14664:93::-;14701:6;14748:2;14743;14736:5;14732:14;14728:23;14718:33;;14664:93;;;:::o;14763:107::-;14807:8;14857:5;14851:4;14847:16;14826:37;;14763:107;;;;:::o;14876:393::-;14945:6;14995:1;14983:10;14979:18;15018:97;15048:66;15037:9;15018:97;:::i;:::-;15136:39;15166:8;15155:9;15136:39;:::i;:::-;15124:51;;15208:4;15204:9;15197:5;15193:21;15184:30;;15257:4;15247:8;15243:19;15236:5;15233:30;15223:40;;14952:317;;14876:393;;;;;:::o;15275:60::-;15303:3;15324:5;15317:12;;15275:60;;;:::o;15341:142::-;15391:9;15424:53;15442:34;15451:24;15469:5;15451:24;:::i;:::-;15442:34;:::i;:::-;15424:53;:::i;:::-;15411:66;;15341:142;;;:::o;15489:75::-;15532:3;15553:5;15546:12;;15489:75;;;:::o;15570:269::-;15680:39;15711:7;15680:39;:::i;:::-;15741:91;15790:41;15814:16;15790:41;:::i;:::-;15782:6;15775:4;15769:11;15741:91;:::i;:::-;15735:4;15728:105;15646:193;15570:269;;;:::o;15845:73::-;15890:3;15845:73;:::o;15924:189::-;16001:32;;:::i;:::-;16042:65;16100:6;16092;16086:4;16042:65;:::i;:::-;15977:136;15924:189;;:::o;16119:186::-;16179:120;16196:3;16189:5;16186:14;16179:120;;;16250:39;16287:1;16280:5;16250:39;:::i;:::-;16223:1;16216:5;16212:13;16203:22;;16179:120;;;16119:186;;:::o;16311:543::-;16412:2;16407:3;16404:11;16401:446;;;16446:38;16478:5;16446:38;:::i;:::-;16530:29;16548:10;16530:29;:::i;:::-;16520:8;16516:44;16713:2;16701:10;16698:18;16695:49;;;16734:8;16719:23;;16695:49;16757:80;16813:22;16831:3;16813:22;:::i;:::-;16803:8;16799:37;16786:11;16757:80;:::i;:::-;16416:431;;16401:446;16311:543;;;:::o;16860:117::-;16914:8;16964:5;16958:4;16954:16;16933:37;;16860:117;;;;:::o;16983:169::-;17027:6;17060:51;17108:1;17104:6;17096:5;17093:1;17089:13;17060:51;:::i;:::-;17056:56;17141:4;17135;17131:15;17121:25;;17034:118;16983:169;;;;:::o;17157:295::-;17233:4;17379:29;17404:3;17398:4;17379:29;:::i;:::-;17371:37;;17441:3;17438:1;17434:11;17428:4;17425:21;17417:29;;17157:295;;;;:::o;17457:1403::-;17581:44;17621:3;17616;17581:44;:::i;:::-;17690:18;17682:6;17679:30;17676:56;;;17712:18;;:::i;:::-;17676:56;17756:38;17788:4;17782:11;17756:38;:::i;:::-;17841:67;17901:6;17893;17887:4;17841:67;:::i;:::-;17935:1;17964:2;17956:6;17953:14;17981:1;17976:632;;;;18652:1;18669:6;18666:84;;;18725:9;18720:3;18716:19;18703:33;18694:42;;18666:84;18776:67;18836:6;18829:5;18776:67;:::i;:::-;18770:4;18763:81;18625:229;17946:908;;17976:632;18028:4;18024:9;18016:6;18012:22;18062:37;18094:4;18062:37;:::i;:::-;18121:1;18135:215;18149:7;18146:1;18143:14;18135:215;;;18235:9;18230:3;18226:19;18213:33;18205:6;18198:49;18286:1;18278:6;18274:14;18264:24;;18333:2;18322:9;18318:18;18305:31;;18172:4;18169:1;18165:12;18160:17;;18135:215;;;18378:6;18369:7;18366:19;18363:186;;;18443:9;18438:3;18434:19;18421:33;18486:48;18528:4;18520:6;18516:17;18505:9;18486:48;:::i;:::-;18478:6;18471:64;18386:163;18363:186;18595:1;18591;18583:6;18579:14;18575:22;18569:4;18562:36;17983:625;;;17946:908;;17556:1304;;;17457:1403;;;:::o;18866:410::-;18906:7;18929:20;18947:1;18929:20;:::i;:::-;18924:25;;18963:20;18981:1;18963:20;:::i;:::-;18958:25;;19018:1;19015;19011:9;19040:30;19058:11;19040:30;:::i;:::-;19029:41;;19219:1;19210:7;19206:15;19203:1;19200:22;19180:1;19173:9;19153:83;19130:139;;19249:18;;:::i;:::-;19130:139;18914:362;18866:410;;;;:::o;19282:194::-;19322:4;19342:20;19360:1;19342:20;:::i;:::-;19337:25;;19376:20;19394:1;19376:20;:::i;:::-;19371:25;;19420:1;19417;19413:9;19405:17;;19444:1;19438:4;19435:11;19432:37;;;19449:18;;:::i;:::-;19432:37;19282:194;;;;:::o;19482:79::-;19521:7;19550:5;19539:16;;19482:79;;;:::o;19567:157::-;19672:45;19692:24;19710:5;19692:24;:::i;:::-;19672:45;:::i;:::-;19667:3;19660:58;19567:157;;:::o;19730:256::-;19842:3;19857:75;19928:3;19919:6;19857:75;:::i;:::-;19957:2;19952:3;19948:12;19941:19;;19977:3;19970:10;;19730:256;;;;:::o;19992:180::-;20040:77;20037:1;20030:88;20137:4;20134:1;20127:15;20161:4;20158:1;20151:15;20178:176;20210:1;20227:20;20245:1;20227:20;:::i;:::-;20222:25;;20261:20;20279:1;20261:20;:::i;:::-;20256:25;;20300:1;20290:35;;20305:18;;:::i;:::-;20290:35;20346:1;20343;20339:9;20334:14;;20178:176;;;;:::o;20360:148::-;20462:11;20499:3;20484:18;;20360:148;;;;:::o;20538:874::-;20641:3;20678:5;20672:12;20707:36;20733:9;20707:36;:::i;:::-;20759:89;20841:6;20836:3;20759:89;:::i;:::-;20752:96;;20879:1;20868:9;20864:17;20895:1;20890:166;;;;21070:1;21065:341;;;;20857:549;;20890:166;20974:4;20970:9;20959;20955:25;20950:3;20943:38;21036:6;21029:14;21022:22;21014:6;21010:35;21005:3;21001:45;20994:52;;20890:166;;21065:341;21132:38;21164:5;21132:38;:::i;:::-;21192:1;21206:154;21220:6;21217:1;21214:13;21206:154;;;21294:7;21288:14;21284:1;21279:3;21275:11;21268:35;21344:1;21335:7;21331:15;21320:26;;21242:4;21239:1;21235:12;21230:17;;21206:154;;;21389:6;21384:3;21380:16;21373:23;;21072:334;;20857:549;;20645:767;;20538:874;;;;:::o;21418:390::-;21524:3;21552:39;21585:5;21552:39;:::i;:::-;21607:89;21689:6;21684:3;21607:89;:::i;:::-;21600:96;;21705:65;21763:6;21758:3;21751:4;21744:5;21740:16;21705:65;:::i;:::-;21795:6;21790:3;21786:16;21779:23;;21528:280;21418:390;;;;:::o;21814:429::-;21991:3;22013:92;22101:3;22092:6;22013:92;:::i;:::-;22006:99;;22122:95;22213:3;22204:6;22122:95;:::i;:::-;22115:102;;22234:3;22227:10;;21814:429;;;;;:::o;22249:93::-;22285:7;22325:10;22318:5;22314:22;22303:33;;22249:93;;;:::o;22348:175::-;22386:3;22409:23;22426:5;22409:23;:::i;:::-;22400:32;;22454:10;22447:5;22444:21;22441:47;;22468:18;;:::i;:::-;22441:47;22515:1;22508:5;22504:13;22497:20;;22348:175;;;:::o;22529:173::-;22669:25;22665:1;22657:6;22653:14;22646:49;22529:173;:::o;22708:402::-;22868:3;22889:85;22971:2;22966:3;22889:85;:::i;:::-;22882:92;;22983:93;23072:3;22983:93;:::i;:::-;23101:2;23096:3;23092:12;23085:19;;22708:402;;;:::o;23116:167::-;23256:19;23252:1;23244:6;23240:14;23233:43;23116:167;:::o;23289:402::-;23449:3;23470:85;23552:2;23547:3;23470:85;:::i;:::-;23463:92;;23564:93;23653:3;23564:93;:::i;:::-;23682:2;23677:3;23673:12;23666:19;;23289:402;;;:::o;23697:967::-;24079:3;24101:148;24245:3;24101:148;:::i;:::-;24094:155;;24266:95;24357:3;24348:6;24266:95;:::i;:::-;24259:102;;24378:148;24522:3;24378:148;:::i;:::-;24371:155;;24543:95;24634:3;24625:6;24543:95;:::i;:::-;24536:102;;24655:3;24648:10;;23697:967;;;;;:::o;24670:180::-;24718:77;24715:1;24708:88;24815:4;24812:1;24805:15;24839:4;24836:1;24829:15;24856:191;24896:3;24915:20;24933:1;24915:20;:::i;:::-;24910:25;;24949:20;24967:1;24949:20;:::i;:::-;24944:25;;24992:1;24989;24985:9;24978:16;;25013:3;25010:1;25007:10;25004:36;;;25020:18;;:::i;:::-;25004:36;24856:191;;;;:::o;25053:171::-;25092:3;25115:24;25133:5;25115:24;:::i;:::-;25106:33;;25161:4;25154:5;25151:15;25148:41;;25169:18;;:::i;:::-;25148:41;25216:1;25209:5;25205:13;25198:20;;25053:171;;;:::o;25230:182::-;25370:34;25366:1;25358:6;25354:14;25347:58;25230:182;:::o;25418:366::-;25560:3;25581:67;25645:2;25640:3;25581:67;:::i;:::-;25574:74;;25657:93;25746:3;25657:93;:::i;:::-;25775:2;25770:3;25766:12;25759:19;;25418:366;;;:::o;25790:419::-;25956:4;25994:2;25983:9;25979:18;25971:26;;26043:9;26037:4;26033:20;26029:1;26018:9;26014:17;26007:47;26071:131;26197:4;26071:131;:::i;:::-;26063:139;;25790:419;;;:::o;26215:180::-;26263:77;26260:1;26253:88;26360:4;26357:1;26350:15;26384:4;26381:1;26374:15
Swarm Source
ipfs://e1f95b236b1f33d20003b0ab5951aa7a6186e428e6dd1c0ff9d5d9be21ad49c8
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.