ERC-721
NFT
Overview
Max Total Supply
8,888 WTF
Holders
433
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
0.476637219761329635 WTFLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|---|---|---|---|---|
1 | Uniswap V3 (Ethereum) | 0X730BCBE5CDC1A3061DFE700774B7B8DD1D4173DB-0XC02AAA39B223FE8D0A0E5C4F27EAD9083C756CC2 | $26.40 0.0071588 Eth | $44.21 1.674 0X730BCBE5CDC1A3061DFE700774B7B8DD1D4173DB | 100.0000% |
Contract Source Code Verified (Exact Match)
Contract Name:
DaVinci
Compiler Version
v0.8.24+commit.e11b9ed9
Optimization Enabled:
Yes with 88888 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
//SPDX-License-Identifier: MIT /** DaVinci is a revolutionary web3 collaborative generative AI art experiment comprised of 8,888 liquidity-backed NFT artworks, created by the community of holders in collaboration with AI. https://davinci.wtf https://t.me/DaVinci404 https://x.com/DaVinci_WTF ████████▄ ▄████████ ▄█ █▄ ▄█ ███▄▄▄▄ ▄████████ ▄█ ███ ▀███ ███ ███ ███ ███ ███ ███▀▀▀██▄ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███▌ ███ ███ ███ █▀ ███▌ ███ ███ ███ ███ ███ ███ ███▌ ███ ███ ███ ███▌ ███ ███ ▀███████████ ███ ███ ███▌ ███ ███ ███ ███▌ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ █▄ ███ ███ ▄███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ████████▀ ███ █▀ ▀██████▀ █▀ ▀█ █▀ ████████▀ █▀ */ pragma solidity 0.8.24; import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import {IERC721} from "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; import {Strings} from "@openzeppelin/contracts/utils/Strings.sol"; import {ERC404} from "./ERC404.sol"; import {ERC404UniswapV3Exempt} from "./ERC404UniswapV3Exempt.sol"; import {LibDaVinci} from "./LibDaVinci.sol"; import {SafeTransferLib} from "https://github.com/Vectorized/solady/blob/main/src/utils/SafeTransferLib.sol"; /** * @title DaVinci * @notice An ERC404 token * @author */ contract DaVinci is Ownable, ERC404, ERC404UniswapV3Exempt { // @dev The maximum total of ERC20 tokens that can exist. // @dev Each ERC721 is an underlying definition of 10 ** 18 ERC20 tokens. uint256 public constant MAX_TOTAL_SUPPLY = 8888 * 10 ** 18; // @dev Once trading begins, trading cannot be stopped. bool public tradingLive; address public constant MARKETING_ADDRESS = 0x7f6F2a5DDa81783b936dE8c33498c44d160b3503; string public baseTokenURI; address public constant uniswapSwapRouter_ = 0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45; address public constant uniswapV3NonfungiblePositionManager_ = 0xC36442b4a4522E871399CD717aBDD847Ab11FE88; // CONSTRUCTOR constructor() ERC404("DaVinci", "WTF", 18) Ownable(msg.sender) ERC404UniswapV3Exempt( uniswapSwapRouter_, uniswapV3NonfungiblePositionManager_ ) { _setERC721TransferExempt(address(this), true); _setERC721TransferExempt(msg.sender, true); _setERC721TransferExempt(MARKETING_ADDRESS, true); _mintERC20(msg.sender, MAX_TOTAL_SUPPLY); } /** * @dev Modifier to check if trading is ready. * @param _from The address to transfer from. */ modifier onlyTrading(address _from) { // @dev Check if trading has been enabled yet. if (tradingLive == false) { // @dev Exempt mints as well as transfers from the owner. if (_from != address(0) && _from != owner()) { revert LibDaVinci.TokenLoading(); } } _; } function setTokenURI(string memory _tokenURI) external onlyOwner { baseTokenURI = _tokenURI; } /** * @notice Allow the owner to set the trading status */ function setDavinciPainting() external onlyOwner { tradingLive = true; } /** * @notice Allow the owner to withdraw the contract balance. */ function withdraw() external onlyOwner { SafeTransferLib.safeTransferETH(owner(), address(this).balance); } /** * @dev Recovers a `tokenAmount` of the ERC20 `tokenAddress` locked into this contract * and sends them to the `tokenReceiver` address. * * @param tokenAddress The contract address of the token to recover. * @param tokenReceiver The address that will receive the recovered tokens. * @param tokenAmount Number of tokens to be recovered. */ function recoverERC20( address tokenAddress, address tokenReceiver, uint256 tokenAmount ) external onlyOwner { IERC20(tokenAddress).transfer(tokenReceiver, tokenAmount); } /** * @dev Recovers the `tokenId` of the ERC721 `tokenAddress` locked into this contract * and sends it to the `tokenReceiver` address. * * @param tokenAddress The contract address of the token to recover. * @param tokenReceiver The address that will receive the recovered token. * @param tokenId The identifier for the NFT to be recovered. * @param data Additional data with no specified format. */ function recoverERC721( address tokenAddress, address tokenReceiver, uint256 tokenId, bytes memory data ) external onlyOwner { IERC721(tokenAddress).safeTransferFrom( address(this), tokenReceiver, tokenId, data ); } function tokenURI(uint256 _tokenId) public view override returns (string memory) { if (_getOwnerOf(_tokenId) == address(0)) { revert LibDaVinci.TokenInvalid(); } if (_tokenId > ID_ENCODING_PREFIX) { // if greater than the ID, get the unencoded ID _tokenId -= ID_ENCODING_PREFIX; } string memory currentId = Strings.toString(_tokenId); if (bytes(baseTokenURI).length > 0) { return string.concat(baseTokenURI, currentId); } return string.concat( "data:application/json;utf8,", '{"name": "DaVinci #', currentId, '",', '"description": "A collection of 8,888 enabled by ERC404, an experimental token standard.",', '"image": "https://davinci.wtf/nft/unrevealed.webp"}' ); } /** * @notice ERC20 trading prevention until the time is ready. * @param _from The address to transfer from. * @param _to The address to transfer to. * @param _value The amount to transfer. */ function _transferERC20( address _from, address _to, uint256 _value ) internal override onlyTrading(_from) { super._transferERC20(_from, _to, _value); } /** * @notice ERC721 trading prevention until the time is ready. * @dev Realistically this should never be hit, but it is here just * to handle edge-cases where the ERC721 is being transferred * before the ERC20 is ready to be traded. * @param _from The address to transfer from. * @param _to The address to transfer to. * @param _id The id to transfer. */ function _transferERC721( address _from, address _to, uint256 _id ) internal override onlyTrading(_from) { super._transferERC721(_from, _to, _id); } function setERC721TransferExempt(address account_, bool value_) external onlyOwner { _setERC721TransferExempt(account_, value_); } }
// SPDX-License-Identifier: MIT 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) ) ) } } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.24; library LibDaVinci { // @dev The token does not exist. error TokenInvalid(); // @dev The token is not ready to be traded. error TokenLoading(); }
//SPDX-License-Identifier: MIT pragma solidity 0.8.24; import {ERC404} from "./ERC404.sol"; import {IPeripheryImmutableState} from "@uniswap/v3-periphery/contracts/interfaces/IPeripheryImmutableState.sol"; abstract contract ERC404UniswapV3Exempt is ERC404 { error ERC404UniswapV3ExemptFactoryMismatch(); error ERC404UniswapV3ExemptWETH9Mismatch(); constructor( address uniswapV3Router_, address uniswapV3NonfungiblePositionManager_ ) { IPeripheryImmutableState uniswapV3Router = IPeripheryImmutableState( uniswapV3Router_ ); // Set the Uniswap v3 swap router as exempt. _setERC721TransferExempt(uniswapV3Router_, true); IPeripheryImmutableState uniswapV3NonfungiblePositionManager = IPeripheryImmutableState( uniswapV3NonfungiblePositionManager_ ); // Set the Uniswap v3 nonfungible position manager as exempt. _setERC721TransferExempt(uniswapV3NonfungiblePositionManager_, true); // Require the Uniswap v3 factory from the position manager and the swap router to be the same. if (uniswapV3Router.factory() != uniswapV3NonfungiblePositionManager.factory()) { revert ERC404UniswapV3ExemptFactoryMismatch(); } // Require the Uniswap v3 WETH9 from the position manager and the swap router to be the same. if (uniswapV3Router.WETH9() != uniswapV3NonfungiblePositionManager.WETH9()) { revert ERC404UniswapV3ExemptWETH9Mismatch(); } uint24[4] memory feeTiers = [ uint24(100), uint24(500), uint24(3_000), uint24(10_000) ]; // Determine the Uniswap v3 pair address for this token. for (uint256 i = 0; i < feeTiers.length; ) { address uniswapV3Pair = _getUniswapV3Pair( uniswapV3Router.factory(), uniswapV3Router.WETH9(), feeTiers[i] ); // Set the Uniswap v3 pair as exempt. _setERC721TransferExempt(uniswapV3Pair, true); unchecked { ++i; } } } function _getUniswapV3Pair( address uniswapV3Factory_, address weth_, uint24 fee_ ) private view returns (address) { address thisAddress = address(this); (address token0, address token1) = thisAddress < weth_ ? (thisAddress, weth_) : (weth_, thisAddress); return address( uint160( uint256( keccak256( abi.encodePacked( hex"ff", uniswapV3Factory_, keccak256(abi.encode(token0, token1, fee_)), hex"e34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b54" ) ) ) ) ); } }
//SPDX-License-Identifier: MIT pragma solidity 0.8.24; import {IERC721Receiver} from "@openzeppelin/contracts/interfaces/IERC721Receiver.sol"; import {IERC721} from "@openzeppelin/contracts/interfaces/IERC721.sol"; import {IERC721Metadata} from "@openzeppelin/contracts/interfaces/IERC721Metadata.sol"; import {IERC165} from "@openzeppelin/contracts/interfaces/IERC165.sol"; import {IERC404} from "./interfaces/IERC404.sol"; import {PackedDoubleEndedQueue} from "./PackedDoubleEndedQueue.sol"; import {ERC721Events} from "./lib/ERC721Events.sol"; import {ERC20Events} from "./lib/ERC20Events.sol"; abstract contract ERC404 is IERC404 { event ERC721Exempt(address indexed exemptedAddress); event ERC721Unexempt(address indexed unexemptedAddress); using PackedDoubleEndedQueue for PackedDoubleEndedQueue.Uint16Deque; /// @dev The queue of ERC-721 tokens stored in the contract. PackedDoubleEndedQueue.Uint16Deque private _storedERC721Ids; /// @dev Token name string public name; /// @dev Token symbol string public symbol; /// @dev Decimals for ERC-20 representation uint8 public immutable decimals; /// @dev Units for ERC-20 representation uint256 public immutable units; /// @dev Total supply in ERC-20 representation uint256 public totalSupply; /// @dev Current mint counter which also represents the highest /// minted id, monotonically increasing to ensure accurate ownership uint256 public minted; /// @dev Initial chain id for EIP-2612 support uint256 internal immutable _INITIAL_CHAIN_ID; /// @dev Initial domain separator for EIP-2612 support bytes32 internal immutable _INITIAL_DOMAIN_SEPARATOR; /// @dev Balance of user in ERC-20 representation mapping(address => uint256) public balanceOf; /// @dev Allowance of user in ERC-20 representation mapping(address => mapping(address => uint256)) public allowance; /// @dev Approval in ERC-721 representaion mapping(uint256 => address) public getApproved; /// @dev Approval for all in ERC-721 representation mapping(address => mapping(address => bool)) public isApprovedForAll; /// @dev Packed representation of ownerOf and owned indices mapping(uint256 => uint256) internal _ownedData; /// @dev Array of owned ids in ERC-721 representation mapping(address => uint16[]) internal _owned; /// @dev Addresses that are exempt from ERC-721 transfer, typically for gas savings (pairs, routers, etc) mapping(address => bool) internal _erc721TransferExempt; /// @dev EIP-2612 nonces mapping(address => uint256) public nonces; /// @dev Address bitmask for packed ownership data uint256 private constant _BITMASK_ADDRESS = (1 << 160) - 1; /// @dev Owned index bitmask for packed ownership data uint256 private constant _BITMASK_OWNED_INDEX = ((1 << 96) - 1) << 160; /// @dev Constant for token id encoding uint256 public constant ID_ENCODING_PREFIX = 1 << 255; constructor(string memory name_, string memory symbol_, uint8 decimals_) { name = name_; symbol = symbol_; if (decimals_ < 18) { revert DecimalsTooLow(); } decimals = decimals_; units = 10 ** decimals; // EIP-2612 initialization _INITIAL_CHAIN_ID = block.chainid; _INITIAL_DOMAIN_SEPARATOR = _computeDomainSeparator(); } /// @notice Function to find owner of a given ERC-721 token function ownerOf( uint256 id_ ) public view virtual returns (address erc721Owner) { erc721Owner = _getOwnerOf(id_); if (!_isValidTokenId(id_)) { revert InvalidTokenId(); } if (erc721Owner == address(0)) { revert NotFound(); } } function owned( address owner_ ) public view virtual returns (uint256[] memory) { uint256[] memory ownedAsU256 = new uint256[](_owned[owner_].length); for (uint256 i = 0; i < _owned[owner_].length; ) { ownedAsU256[i] = ID_ENCODING_PREFIX + _owned[owner_][i]; unchecked { ++i; } } return ownedAsU256; } function erc721BalanceOf( address owner_ ) public view virtual returns (uint256) { return _owned[owner_].length; } function erc20BalanceOf( address owner_ ) public view virtual returns (uint256) { return balanceOf[owner_]; } function erc20TotalSupply() public view virtual returns (uint256) { return totalSupply; } function erc721TotalSupply() public view virtual returns (uint256) { return minted; } function getERC721QueueLength() public view virtual returns (uint256) { return _storedERC721Ids.length(); } function getERC721TokensInQueue( uint256 start_, uint256 count_ ) public view virtual returns (uint256[] memory) { uint256[] memory tokensInQueue = new uint256[](count_); for (uint256 i = start_; i < start_ + count_; ) { tokensInQueue[i - start_] = ID_ENCODING_PREFIX + _storedERC721Ids.at(i); unchecked { ++i; } } return tokensInQueue; } /// @notice tokenURI must be implemented by child contract function tokenURI(uint256 id_) public view virtual returns (string memory); /// @dev This function assumes the operator is attempting to approve /// an ERC-721 if valueOrId_ is a possibly valid ERC-721 token id. /// Unlike setApprovalForAll, spender_ must be allowed to be 0x0 so /// that approval can be revoked. function approve( address spender_, uint256 valueOrId_ ) public virtual returns (bool) { if (_isValidTokenId(valueOrId_)) { erc721Approve(spender_, valueOrId_); } else { return erc20Approve(spender_, valueOrId_); } return true; } function erc721Approve(address spender_, uint256 id_) public virtual { // Intention is to approve as ERC-721 token (id). address erc721Owner = _getOwnerOf(id_); if ( msg.sender != erc721Owner && !isApprovedForAll[erc721Owner][msg.sender] ) { revert Unauthorized(); } getApproved[id_] = spender_; emit ERC721Approval(erc721Owner, spender_, id_); emit ERC721Events.Approval(erc721Owner, spender_, id_); } /// @dev Providing type(uint256).max for approval value results in an /// unlimited approval that is not deducted from on transfers. function erc20Approve( address spender_, uint256 value_ ) public virtual returns (bool) { // Prevent granting 0x0 an ERC-20 allowance. if (spender_ == address(0)) { revert InvalidSpender(); } // Intention is to approve as ERC-20 token (value). allowance[msg.sender][spender_] = value_; emit ERC20Approval(msg.sender, spender_, value_); emit ERC20Events.Approval(msg.sender, spender_, value_); return true; } /// @notice Function for ERC-721 approvals function setApprovalForAll( address operator_, bool approved_ ) public virtual { // Prevent approvals to 0x0. if (operator_ == address(0)) { revert InvalidOperator(); } isApprovedForAll[msg.sender][operator_] = approved_; emit ERC721Events.ApprovalForAll(msg.sender, operator_, approved_); } /// @notice Function for mixed transfers from an operator that may be different than 'from'. /// @dev This function assumes the operator is attempting to transfer an ERC-721 /// if valueOrId is a possible valid token id. function transferFrom( address from_, address to_, uint256 valueOrId_ ) public virtual returns (bool) { if (_isValidTokenId(valueOrId_)) { erc721TransferFrom(from_, to_, valueOrId_); } else { // Intention is to transfer as ERC-20 token (value). return erc20TransferFrom(from_, to_, valueOrId_); } return true; } /// @notice Function for ERC-721 transfers from. /// @dev This function is recommended for ERC721 transfers. function erc721TransferFrom( address from_, address to_, uint256 id_ ) public virtual { // Prevent minting tokens from 0x0. if (from_ == address(0)) { revert InvalidSender(); } // Prevent burning tokens to 0x0. if (to_ == address(0)) { revert InvalidRecipient(); } if (from_ != _getOwnerOf(id_)) { revert Unauthorized(); } // Check that the operator is either the sender or approved for the transfer. if ( msg.sender != from_ && !isApprovedForAll[from_][msg.sender] && msg.sender != getApproved[id_] ) { revert Unauthorized(); } // We only need to check ERC-721 transfer exempt status for the recipient // since the sender being ERC-721 transfer exempt means they have already // had their ERC-721s stripped away during the rebalancing process. if (erc721TransferExempt(to_)) { revert RecipientIsERC721TransferExempt(); } // Transfer 1 * units ERC-20 and 1 ERC-721 token. // ERC-721 transfer exemptions handled above. Can't make it to this point if either is transfer exempt. _transferERC20(from_, to_, units); _transferERC721(from_, to_, id_); } /// @notice Function for ERC-20 transfers from. /// @dev This function is recommended for ERC20 transfers function erc20TransferFrom( address from_, address to_, uint256 value_ ) public virtual returns (bool) { // Prevent minting tokens from 0x0. if (from_ == address(0)) { revert InvalidSender(); } // Prevent burning tokens to 0x0. if (to_ == address(0)) { revert InvalidRecipient(); } // Intention is to transfer as ERC-20 token (value). uint256 allowed = allowance[from_][msg.sender]; // Check that the operator has sufficient allowance. if (allowed != type(uint256).max) { allowance[from_][msg.sender] = allowed - value_; } // Transferring ERC-20s directly requires the _transferERC20WithERC721 function. // Handles ERC-721 exemptions internally. return _transferERC20WithERC721(from_, to_, value_); } /// @notice Function for ERC-20 transfers. /// @dev This function assumes the operator is attempting to transfer as ERC-20 /// given this function is only supported on the ERC-20 interface. /// Treats even small amounts that are valid ERC-721 ids as ERC-20s. function transfer( address to_, uint256 value_ ) public virtual returns (bool) { // Prevent burning tokens to 0x0. if (to_ == address(0)) { revert InvalidRecipient(); } // Transferring ERC-20s directly requires the _transferERC20WithERC721 function. // Handles ERC-721 exemptions internally. return _transferERC20WithERC721(msg.sender, to_, value_); } /// @notice Function for ERC-721 transfers with contract support. /// This function only supports moving valid ERC-721 ids, as it does not exist on the ERC-20 /// spec and will revert otherwise. function safeTransferFrom( address from_, address to_, uint256 id_ ) public virtual { safeTransferFrom(from_, to_, id_, ""); } /// @notice Function for ERC-721 transfers with contract support and callback data. /// This function only supports moving valid ERC-721 ids, as it does not exist on the /// ERC-20 spec and will revert otherwise. function safeTransferFrom( address from_, address to_, uint256 id_, bytes memory data_ ) public virtual { if (!_isValidTokenId(id_)) { revert InvalidTokenId(); } transferFrom(from_, to_, id_); if ( to_.code.length != 0 && IERC721Receiver(to_).onERC721Received( msg.sender, from_, id_, data_ ) != IERC721Receiver.onERC721Received.selector ) { revert UnsafeRecipient(); } } /// @notice Function for EIP-2612 permits (ERC-20 only) /// @dev Providing type(uint256).max for permit value results in an /// unlimited approval that is not deducted from on transfers. function permit( address owner_, address spender_, uint256 value_, uint256 deadline_, uint8 v_, bytes32 r_, bytes32 s_ ) public virtual { if (deadline_ < block.timestamp) { revert PermitDeadlineExpired(); } // permit cannot be used for ERC-721 token approvals, so ensure // the value does not fall within the valid range of ERC-721 token ids. if (_isValidTokenId(value_)) { revert InvalidApproval(); } if (spender_ == address(0)) { revert InvalidSpender(); } unchecked { address recoveredAddress = ecrecover( keccak256( abi.encodePacked( "\x19\x01", DOMAIN_SEPARATOR(), keccak256( abi.encode( keccak256( "Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)" ), owner_, spender_, value_, nonces[owner_]++, deadline_ ) ) ) ), v_, r_, s_ ); if (recoveredAddress == address(0) || recoveredAddress != owner_) { revert InvalidSigner(); } allowance[recoveredAddress][spender_] = value_; } emit ERC20Approval(owner_, spender_, value_); emit ERC20Events.Approval(owner_, spender_, value_); } /// @notice Returns domain initial domain separator, or recomputes if chain id is not equal to initial chain id function DOMAIN_SEPARATOR() public view virtual returns (bytes32) { return block.chainid == _INITIAL_CHAIN_ID ? _INITIAL_DOMAIN_SEPARATOR : _computeDomainSeparator(); } function supportsInterface( bytes4 interfaceId ) public view virtual returns (bool) { return interfaceId == type(IERC404).interfaceId || interfaceId == type(IERC165).interfaceId; } /// @notice Function for self-exemption function setSelfERC721TransferExempt(bool state_) public virtual { _setERC721TransferExempt(msg.sender, state_); } /// @notice Function to check if address is transfer exempt function erc721TransferExempt( address target_ ) public view virtual returns (bool) { return target_ == address(0) || _erc721TransferExempt[target_]; } /// @notice For a token token id to be considered valid, it just needs /// to fall within the range of possible token ids, it does not /// necessarily have to be minted yet. function _isValidTokenId(uint256 id_) internal pure returns (bool) { return id_ > ID_ENCODING_PREFIX && id_ != type(uint256).max; } /// @notice Internal function to compute domain separator for EIP-2612 permits function _computeDomainSeparator() internal view virtual returns (bytes32) { return keccak256( abi.encode( keccak256( "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)" ), keccak256(bytes(name)), keccak256("1"), block.chainid, address(this) ) ); } /// @notice This is the lowest level ERC-20 transfer function, which /// should be used for both normal ERC-20 transfers as well as minting. /// Note that this function allows transfers to and from 0x0. function _transferERC20( address from_, address to_, uint256 value_ ) internal virtual { // Minting is a special case for which we should not check the balance of // the sender, and we should increase the total supply. if (from_ == address(0)) { totalSupply += value_; } else { // Deduct value from sender's balance. balanceOf[from_] -= value_; } // Update the recipient's balance. // Can be unchecked because on mint, adding to totalSupply is checked, and on transfer balance deduction is checked. unchecked { balanceOf[to_] += value_; } emit ERC20Transfer(from_, to_, value_); emit ERC20Events.Transfer(from_, to_, value_); } /// @notice Consolidated record keeping function for transferring ERC-721s. /// @dev Assign the token to the new owner, and remove from the old owner. /// Note that this function allows transfers to and from 0x0. /// Does not handle ERC-721 exemptions. function _transferERC721( address from_, address to_, uint256 id_ ) internal virtual { // If this is not a mint, handle record keeping for transfer from previous owner. if (from_ != address(0)) { // On transfer of an NFT, any previous approval is reset. delete getApproved[id_]; uint256 updatedId = ID_ENCODING_PREFIX + _owned[from_][_owned[from_].length - 1]; if (updatedId != id_) { uint256 updatedIndex = _getOwnedIndex(id_); // update _owned for sender _owned[from_][updatedIndex] = uint16(updatedId); // update index for the moved id _setOwnedIndex(updatedId, updatedIndex); } // pop _owned[from_].pop(); } // Check if this is a burn. if (to_ != address(0)) { // If not a burn, update the owner of the token to the new owner. // Update owner of the token to the new owner. _setOwnerOf(id_, to_); // Push token onto the new owner's stack. _owned[to_].push(uint16(id_)); // Update index for new owner's stack. _setOwnedIndex(id_, _owned[to_].length - 1); } else { // If this is a burn, reset the owner of the token to 0x0 by deleting the token from _ownedData. delete _ownedData[id_]; } emit ERC721Transfer(from_, to_, id_); emit ERC721Events.Transfer(from_, to_, id_); } /// @notice Internal function for ERC-20 transfers. Also handles any ERC-721 transfers that may be required. // Handles ERC-721 exemptions. function _transferERC20WithERC721( address from_, address to_, uint256 value_ ) internal virtual returns (bool) { uint256 erc20BalanceOfSenderBefore = erc20BalanceOf(from_); uint256 erc20BalanceOfReceiverBefore = erc20BalanceOf(to_); _transferERC20(from_, to_, value_); // Preload for gas savings on branches bool isFromERC721TransferExempt = erc721TransferExempt(from_); bool isToERC721TransferExempt = erc721TransferExempt(to_); // Skip _withdrawAndStoreERC721 and/or _retrieveOrMintERC721 for ERC-721 transfer exempt addresses // 1) to save gas // 2) because ERC-721 transfer exempt addresses won't always have/need ERC-721s corresponding to their ERC20s. if (isFromERC721TransferExempt && isToERC721TransferExempt) { // Case 1) Both sender and recipient are ERC-721 transfer exempt. No ERC-721s need to be transferred. // NOOP. } else if (isFromERC721TransferExempt) { // Case 2) The sender is ERC-721 transfer exempt, but the recipient is not. Contract should not attempt // to transfer ERC-721s from the sender, but the recipient should receive ERC-721s // from the bank/minted for any whole number increase in their balance. // Only cares about whole number increments. uint256 tokensToRetrieveOrMint = (balanceOf[to_] / units) - (erc20BalanceOfReceiverBefore / units); for (uint256 i = 0; i < tokensToRetrieveOrMint; ) { _retrieveOrMintERC721(to_); unchecked { ++i; } } } else if (isToERC721TransferExempt) { // Case 3) The sender is not ERC-721 transfer exempt, but the recipient is. Contract should attempt // to withdraw and store ERC-721s from the sender, but the recipient should not // receive ERC-721s from the bank/minted. // Only cares about whole number increments. uint256 tokensToWithdrawAndStore = (erc20BalanceOfSenderBefore / units) - (balanceOf[from_] / units); for (uint256 i = 0; i < tokensToWithdrawAndStore; ) { _withdrawAndStoreERC721(from_); unchecked { ++i; } } } else { // Case 4) Neither the sender nor the recipient are ERC-721 transfer exempt. // Strategy: // 1. First deal with the whole tokens. These are easy and will just be transferred. // 2. Look at the fractional part of the value: // a) If it causes the sender to lose a whole token that was represented by an NFT due to a // fractional part being transferred, withdraw and store an additional NFT from the sender. // b) If it causes the receiver to gain a whole new token that should be represented by an NFT // due to receiving a fractional part that completes a whole token, retrieve or mint an NFT to the recevier. // Whole tokens worth of ERC-20s get transferred as ERC-721s without any burning/minting. uint256 nftsToTransfer = value_ / units; for (uint256 i = 0; i < nftsToTransfer; ) { // Pop from sender's ERC-721 stack and transfer them (LIFO) uint256 indexOfLastToken = _owned[from_].length - 1; uint256 tokenId = ID_ENCODING_PREFIX + _owned[from_][indexOfLastToken]; _transferERC721(from_, to_, tokenId); unchecked { ++i; } } // If the transfer changes either the sender or the recipient's holdings from a fractional to a non-fractional // amount (or vice versa), adjust ERC-721s. // First check if the send causes the sender to lose a whole token that was represented by an ERC-721 // due to a fractional part being transferred. // // Process: // Take the difference between the whole number of tokens before and after the transfer for the sender. // If that difference is greater than the number of ERC-721s transferred (whole units), then there was // an additional ERC-721 lost due to the fractional portion of the transfer. // If this is a self-send and the before and after balances are equal (not always the case but often), // then no ERC-721s will be lost here. if ( erc20BalanceOfSenderBefore / units - erc20BalanceOf(from_) / units > nftsToTransfer ) { _withdrawAndStoreERC721(from_); } // Then, check if the transfer causes the receiver to gain a whole new token which requires gaining // an additional ERC-721. // // Process: // Take the difference between the whole number of tokens before and after the transfer for the recipient. // If that difference is greater than the number of ERC-721s transferred (whole units), then there was // an additional ERC-721 gained due to the fractional portion of the transfer. // Again, for self-sends where the before and after balances are equal, no ERC-721s will be gained here. if ( erc20BalanceOf(to_) / units - erc20BalanceOfReceiverBefore / units > nftsToTransfer ) { _retrieveOrMintERC721(to_); } } return true; } /// @notice Internal function for ERC20 minting /// @dev This function will allow minting of new ERC20s. /// If mintCorrespondingERC721s_ is true, and the recipient is not ERC-721 exempt, it will /// also mint the corresponding ERC721s. /// Handles ERC-721 exemptions. function _mintERC20(address to_, uint256 value_) internal virtual { /// You cannot mint to the zero address (you can't mint and immediately burn in the same transfer). if (to_ == address(0)) { revert InvalidRecipient(); } if (totalSupply + value_ > ID_ENCODING_PREFIX) { revert MintLimitReached(); } _transferERC20WithERC721(address(0), to_, value_); } /// @notice Internal function for ERC-721 minting and retrieval from the bank. /// @dev This function will allow minting of new ERC-721s up to the total fractional supply. It will /// first try to pull from the bank, and if the bank is empty, it will mint a new token. /// Does not handle ERC-721 exemptions. function _retrieveOrMintERC721(address to_) internal virtual { if (to_ == address(0)) { revert InvalidRecipient(); } uint256 id; if (!_storedERC721Ids.empty()) { // If there are any tokens in the bank, use those first. // Pop off the end of the queue (FIFO). id = ID_ENCODING_PREFIX + _storedERC721Ids.popBack(); } else { // Otherwise, mint a new token, should not be able to go over the total fractional supply. ++minted; // Reserve max uint256 for approvals if (minted == type(uint256).max) { revert MintLimitReached(); } id = ID_ENCODING_PREFIX + minted; } address erc721Owner = _getOwnerOf(id); // The token should not already belong to anyone besides 0x0 or this contract. // If it does, something is wrong, as this should never happen. if (erc721Owner != address(0)) { revert AlreadyExists(); } // Transfer the token to the recipient, either transferring from the contract's bank or minting. // Does not handle ERC-721 exemptions. _transferERC721(erc721Owner, to_, id); } /// @notice Internal function for ERC-721 deposits to bank (this contract). /// @dev This function will allow depositing of ERC-721s to the bank, which can be retrieved by future minters. // Does not handle ERC-721 exemptions. function _withdrawAndStoreERC721(address from_) internal virtual { if (from_ == address(0)) { revert InvalidSender(); } // Retrieve the latest token added to the owner's stack (LIFO). uint256 id = ID_ENCODING_PREFIX + _owned[from_][_owned[from_].length - 1]; // Transfer to 0x0. // Does not handle ERC-721 exemptions. _transferERC721(from_, address(0), id); // Record the token in the contract's bank queue. _storedERC721Ids.pushFront(uint16(id)); } /// @notice Initialization function to set pairs / etc, saving gas by avoiding mint / burn on unnecessary targets function _setERC721TransferExempt( address target_, bool state_ ) internal virtual { if (target_ == address(0)) { revert InvalidExemption(); } // Adjust the ERC721 balances of the target to respect exemption rules. // Despite this logic, it is still recommended practice to exempt prior to the target // having an active balance. if (state_) { _clearERC721Balance(target_); } else { _reinstateERC721Balance(target_); } _erc721TransferExempt[target_] = state_; } /// @notice Function to reinstate balance on exemption removal function _reinstateERC721Balance(address target_) private { uint256 expectedERC721Balance = erc20BalanceOf(target_) / units; uint256 actualERC721Balance = erc721BalanceOf(target_); for (uint256 i = 0; i < expectedERC721Balance - actualERC721Balance; ) { // Transfer ERC721 balance in from pool _retrieveOrMintERC721(target_); unchecked { ++i; } } emit ERC721Unexempt(target_); } /// @notice Function to clear balance on exemption inclusion function _clearERC721Balance(address target_) private { uint256 erc721Balance = erc721BalanceOf(target_); for (uint256 i = 0; i < erc721Balance; ) { // Transfer out ERC721 balance _withdrawAndStoreERC721(target_); unchecked { ++i; } } emit ERC721Exempt(target_); } function _getOwnerOf( uint256 id_ ) internal view virtual returns (address ownerOf_) { uint256 data = _ownedData[id_]; assembly { ownerOf_ := and(data, _BITMASK_ADDRESS) } } function _setOwnerOf(uint256 id_, address owner_) internal virtual { uint256 data = _ownedData[id_]; assembly { data := add( and(data, _BITMASK_OWNED_INDEX), and(owner_, _BITMASK_ADDRESS) ) } _ownedData[id_] = data; } function _getOwnedIndex( uint256 id_ ) internal view virtual returns (uint256 ownedIndex_) { uint256 data = _ownedData[id_]; assembly { ownedIndex_ := shr(160, data) } } function _setOwnedIndex(uint256 id_, uint256 index_) internal virtual { uint256 data = _ownedData[id_]; if (index_ > _BITMASK_OWNED_INDEX >> 160) { revert OwnedIndexOverflow(); } assembly { data := add( and(data, _BITMASK_ADDRESS), and(shl(160, index_), _BITMASK_OWNED_INDEX) ) } _ownedData[id_] = data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol) pragma solidity ^0.8.20; import {Math} from "./math/Math.sol"; import {SignedMath} from "./math/SignedMath.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant HEX_DIGITS = "0123456789abcdef"; uint8 private constant ADDRESS_LENGTH = 20; /** * @dev The `value` string doesn't fit in the specified `length`. */ error StringsInsufficientHexLength(uint256 value, uint256 length); /** * @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), HEX_DIGITS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `int256` to its ASCII `string` decimal representation. */ function toStringSigned(int256 value) internal pure returns (string memory) { return string.concat(value < 0 ? "-" : "", toString(SignedMath.abs(value))); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { uint256 localValue = value; 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] = HEX_DIGITS[localValue & 0xf]; localValue >>= 4; } if (localValue != 0) { revert StringsInsufficientHexLength(value, length); } return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal * representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), ADDRESS_LENGTH); } /** * @dev Returns true if the two strings are equal. */ function equal(string memory a, string memory b) internal pure returns (bool) { return bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol) pragma solidity ^0.8.20; import {Context} from "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * The initial owner is set to the address provided by the deployer. This can * later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; /** * @dev The caller account is not authorized to perform an operation. */ error OwnableUnauthorizedAccount(address account); /** * @dev The owner is not a valid owner account. (eg. `address(0)`) */ error OwnableInvalidOwner(address owner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the address provided by the deployer as the initial owner. */ constructor(address initialOwner) { if (initialOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(initialOwner); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { if (owner() != _msgSender()) { revert OwnableUnauthorizedAccount(_msgSender()); } } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { if (newOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.20; import {IERC165} from "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - 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 tokenId, bytes calldata data) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or * {setApprovalForAll}. * - 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 tokenId) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721 * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must * understand this adds an external call which potentially creates a reentrancy vulnerability. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 tokenId) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the address zero. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the value of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the value of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves a `value` amount of tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 value) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets a `value` amount of tokens as the allowance of `spender` over the * caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the * allowance mechanism. `value` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 value) external returns (bool); }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.5.0; /// @title Immutable state /// @notice Functions that return immutable state of the router interface IPeripheryImmutableState { /// @return Returns the address of the Uniswap V3 factory function factory() external view returns (address); /// @return Returns the address of WETH9 function WETH9() external view returns (address); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; library ERC20Events { event Approval( address indexed owner, address indexed spender, uint256 value ); event Transfer( address indexed from, address indexed to, uint256 indexed amount ); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; library ERC721Events { event ApprovalForAll( address indexed owner, address indexed operator, bool approved ); event Approval( address indexed owner, address indexed spender, uint256 indexed tokenId ); event Transfer( address indexed from, address indexed to, uint256 indexed tokenId ); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/structs/DoubleEndedQueue.sol) // Modified by Pandora Labs to support native packed operations pragma solidity 0.8.24; /** * @dev A sequence of items with the ability to efficiently push and pop items (i.e. insert and remove) on both ends of * the sequence (called front and back). Among other access patterns, it can be used to implement efficient LIFO and * FIFO queues. Storage use is optimized, and all operations are O(1) constant time. This includes {clear}, given that * the existing queue contents are left in storage. * * The struct is called `Uint16Deque`. And is designed for packed uint16 values, though this approach can be * extrapolated to different implementations. This data structure can only be used in storage, and not in memory. * * ```solidity * PackedDoubleEndedQueue.Uint16Deque queue; * ``` */ library PackedDoubleEndedQueue { uint128 constant SLOT_MASK = (1 << 64) - 1; uint128 constant INDEX_MASK = SLOT_MASK << 64; uint256 constant SLOT_DATA_MASK = (1 << 16) - 1; /** * @dev An operation (e.g. {front}) couldn't be completed due to the queue being empty. */ error QueueEmpty(); /** * @dev A push operation couldn't be completed due to the queue being full. */ error QueueFull(); /** * @dev An operation (e.g. {at}) couldn't be completed due to an index being out of bounds. */ error QueueOutOfBounds(); /** * @dev Invalid slot. */ error InvalidSlot(); /** * @dev Indices and slots are 64 bits to fit within a single storage slot. * * Struct members have an underscore prefix indicating that they are "private" and should not be read or written to * directly. Use the functions provided below instead. Modifying the struct manually may violate assumptions and * lead to unexpected behavior. * * The first item is at data[begin] and the last item is at data[end - 1]. This range can wrap around. */ struct Uint16Deque { uint64 _beginIndex; uint64 _beginSlot; uint64 _endIndex; uint64 _endSlot; mapping(uint64 index => uint256) _data; } /** * @dev Removes the item at the end of the queue and returns it. * * Reverts with {QueueEmpty} if the queue is empty. */ function popBack( Uint16Deque storage deque ) internal returns (uint16 value) { unchecked { uint64 backIndex = deque._endIndex; uint64 backSlot = deque._endSlot; if (backIndex == deque._beginIndex && backSlot == deque._beginSlot) revert QueueEmpty(); if (backSlot == 0) { --backIndex; backSlot = 15; } else { --backSlot; } uint256 data = deque._data[backIndex]; value = _getEntry(data, backSlot); deque._data[backIndex] = _setData(data, backSlot, 0); deque._endIndex = backIndex; deque._endSlot = backSlot; } } /** * @dev Inserts an item at the beginning of the queue. * * Reverts with {QueueFull} if the queue is full. */ function pushFront(Uint16Deque storage deque, uint16 value_) internal { unchecked { uint64 frontIndex = deque._beginIndex; uint64 frontSlot = deque._beginSlot; if (frontSlot == 0) { --frontIndex; frontSlot = 15; } else { --frontSlot; } if (frontIndex == deque._endIndex && frontSlot == deque._endSlot) revert QueueFull(); deque._data[frontIndex] = _setData( deque._data[frontIndex], frontSlot, value_ ); deque._beginIndex = frontIndex; deque._beginSlot = frontSlot; } } /** * @dev Return the item at a position in the queue given by `index`, with the first item at 0 and last item at * `length(deque) - 1`. * * Reverts with `QueueOutOfBounds` if the index is out of bounds. */ function at( Uint16Deque storage deque, uint256 index_ ) internal view returns (uint16 value) { if (index_ >= length(deque) * 16) revert QueueOutOfBounds(); unchecked { return _getEntry( deque._data[ deque._beginIndex + uint64(deque._beginSlot + (index_ % 16)) / 16 + uint64(index_ / 16) ], uint64(((deque._beginSlot + index_) % 16)) ); } } /** * @dev Returns the number of items in the queue. */ function length(Uint16Deque storage deque) internal view returns (uint256) { unchecked { return (16 - deque._beginSlot) + deque._endSlot + deque._endIndex * 16 - deque._beginIndex * 16 - 16; } } /** * @dev Returns true if the queue is empty. */ function empty(Uint16Deque storage deque) internal view returns (bool) { return deque._endSlot == deque._beginSlot && deque._endIndex == deque._beginIndex; } function _setData( uint256 data_, uint64 slot_, uint16 value ) private pure returns (uint256) { return (data_ & (~_getSlotMask(slot_))) + (uint256(value) << (16 * slot_)); } function _getEntry( uint256 data, uint64 slot_ ) private pure returns (uint16) { return uint16((data & _getSlotMask(slot_)) >> (16 * slot_)); } function _getSlotMask(uint64 slot_) private pure returns (uint256) { return SLOT_DATA_MASK << (slot_ * 16); } }
//SPDX-License-Identifier: MIT pragma solidity 0.8.24; import {IERC165} from "@openzeppelin/contracts/interfaces/IERC165.sol"; import {IERC721} from "@openzeppelin/contracts/interfaces/IERC721.sol"; interface IERC404 is IERC165 { event ERC20Approval( address indexed owner, address indexed spender, uint256 value ); event ERC721Approval( address indexed owner, address indexed spender, uint256 indexed tokenId ); event ERC20Transfer( address indexed from, address indexed to, uint256 indexed amount ); event ERC721Transfer( address indexed from, address indexed to, uint256 indexed tokenId ); error NotFound(); error InvalidTokenId(); error AlreadyExists(); error InvalidRecipient(); error InvalidSender(); error InvalidSpender(); error InvalidOperator(); error UnsafeRecipient(); error RecipientIsERC721TransferExempt(); error Unauthorized(); error InsufficientAllowance(); error DecimalsTooLow(); error PermitDeadlineExpired(); error InvalidSigner(); error InvalidApproval(); error OwnedIndexOverflow(); error MintLimitReached(); error InvalidExemption(); function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); function totalSupply() external view returns (uint256); function erc20TotalSupply() external view returns (uint256); function erc721TotalSupply() external view returns (uint256); function balanceOf(address owner_) external view returns (uint256); function erc721BalanceOf(address owner_) external view returns (uint256); function erc20BalanceOf(address owner_) external view returns (uint256); function erc721TransferExempt(address account_) external view returns (bool); function isApprovedForAll(address owner_, address operator_) external view returns (bool); function allowance(address owner_, address spender_) external view returns (uint256); function owned(address owner_) external view returns (uint256[] memory); function ownerOf(uint256 id_) external view returns (address erc721Owner); function tokenURI(uint256 id_) external view returns (string memory); function approve(address spender_, uint256 valueOrId_) external returns (bool); function erc20Approve(address spender_, uint256 value_) external returns (bool); function erc721Approve(address spender_, uint256 id_) external; function setApprovalForAll(address operator_, bool approved_) external; function transferFrom( address from_, address to_, uint256 valueOrId_ ) external returns (bool); function erc20TransferFrom( address from_, address to_, uint256 value_ ) external returns (bool); function erc721TransferFrom( address from_, address to_, uint256 id_ ) external; function transfer(address to_, uint256 amount_) external returns (bool); function getERC721QueueLength() external view returns (uint256); function getERC721TokensInQueue(uint256 start_, uint256 count_) external view returns (uint256[] memory); function setSelfERC721TransferExempt(bool state_) external; function safeTransferFrom( address from_, address to_, uint256 id_ ) external; function safeTransferFrom( address from_, address to_, uint256 id_, bytes calldata data_ ) external; function DOMAIN_SEPARATOR() external view returns (bytes32); function permit( address owner_, address spender_, uint256 value_, uint256 deadline_, uint8 v_, bytes32 r_, bytes32 s_ ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC165.sol) pragma solidity ^0.8.20; import {IERC165} from "../utils/introspection/IERC165.sol";
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC721Metadata.sol) pragma solidity ^0.8.20; import {IERC721Metadata} from "../token/ERC721/extensions/IERC721Metadata.sol";
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC721.sol) pragma solidity ^0.8.20; import {IERC721} from "../token/ERC721/IERC721.sol";
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC721Receiver.sol) pragma solidity ^0.8.20; import {IERC721Receiver} from "../token/ERC721/IERC721Receiver.sol";
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol) pragma solidity ^0.8.20; /** * @dev Standard signed math utilities missing in the Solidity language. */ library SignedMath { /** * @dev Returns the largest of two signed numbers. */ function max(int256 a, int256 b) internal pure returns (int256) { return a > b ? a : b; } /** * @dev Returns the smallest of two signed numbers. */ function min(int256 a, int256 b) internal pure returns (int256) { return a < b ? a : b; } /** * @dev Returns the average of two signed numbers without overflow. * The result is rounded towards zero. */ function average(int256 a, int256 b) internal pure returns (int256) { // Formula from the book "Hacker's Delight" int256 x = (a & b) + ((a ^ b) >> 1); return x + (int256(uint256(x) >> 255) & (a ^ b)); } /** * @dev Returns the absolute unsigned value of a signed value. */ function abs(int256 n) internal pure returns (uint256) { unchecked { // must be unchecked in order to support `n = type(int256).min` return uint256(n >= 0 ? n : -n); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol) pragma solidity ^0.8.20; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { /** * @dev Muldiv operation overflow. */ error MathOverflowedMulDiv(); enum Rounding { Floor, // Toward negative infinity Ceil, // Toward positive infinity Trunc, // Toward zero Expand // Away from zero } /** * @dev Returns the addition of two unsigned integers, with an overflow flag. */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the subtraction of two unsigned integers, with an overflow flag. */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @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 towards infinity instead * of rounding towards zero. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { if (b == 0) { // Guarantee the same behavior as in a regular Solidity division. return a / b; } // (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 = x * y; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { // Solidity will revert if denominator == 0, unlike the div opcode on its own. // The surrounding unchecked block does not change this fact. // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic. return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. if (denominator <= prod1) { revert MathOverflowedMulDiv(); } /////////////////////////////////////////////// // 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. uint256 twos = denominator & (0 - denominator); 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 (unsignedRoundsUp(rounding) && 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 * towards zero. * * 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 + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2 of a positive value rounded towards zero. * 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 + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10 of a positive value rounded towards zero. * 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 + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0); } } /** * @dev Return the log in base 256 of a positive value rounded towards zero. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 256, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0); } } /** * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers. */ function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) { return uint8(rounding) % 2 == 1; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ 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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol) pragma solidity ^0.8.20; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.20; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be * reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.20; import {IERC721} from "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
{ "optimizer": { "enabled": true, "runs": 88888 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AlreadyExists","type":"error"},{"inputs":[],"name":"DecimalsTooLow","type":"error"},{"inputs":[],"name":"ERC404UniswapV3ExemptFactoryMismatch","type":"error"},{"inputs":[],"name":"ERC404UniswapV3ExemptWETH9Mismatch","type":"error"},{"inputs":[],"name":"InsufficientAllowance","type":"error"},{"inputs":[],"name":"InvalidApproval","type":"error"},{"inputs":[],"name":"InvalidExemption","type":"error"},{"inputs":[],"name":"InvalidOperator","type":"error"},{"inputs":[],"name":"InvalidRecipient","type":"error"},{"inputs":[],"name":"InvalidSender","type":"error"},{"inputs":[],"name":"InvalidSigner","type":"error"},{"inputs":[],"name":"InvalidSpender","type":"error"},{"inputs":[],"name":"InvalidTokenId","type":"error"},{"inputs":[],"name":"MintLimitReached","type":"error"},{"inputs":[],"name":"NotFound","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"OwnedIndexOverflow","type":"error"},{"inputs":[],"name":"PermitDeadlineExpired","type":"error"},{"inputs":[],"name":"QueueEmpty","type":"error"},{"inputs":[],"name":"QueueFull","type":"error"},{"inputs":[],"name":"QueueOutOfBounds","type":"error"},{"inputs":[],"name":"RecipientIsERC721TransferExempt","type":"error"},{"inputs":[],"name":"TokenInvalid","type":"error"},{"inputs":[],"name":"TokenLoading","type":"error"},{"inputs":[],"name":"Unauthorized","type":"error"},{"inputs":[],"name":"UnsafeRecipient","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"ERC20Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ERC20Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ERC721Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"exemptedAddress","type":"address"}],"name":"ERC721Exempt","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ERC721Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"unexemptedAddress","type":"address"}],"name":"ERC721Unexempt","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ID_ENCODING_PREFIX","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MARKETING_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_TOTAL_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender_","type":"address"},{"internalType":"uint256","name":"valueOrId_","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseTokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender_","type":"address"},{"internalType":"uint256","name":"value_","type":"uint256"}],"name":"erc20Approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner_","type":"address"}],"name":"erc20BalanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"erc20TotalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from_","type":"address"},{"internalType":"address","name":"to_","type":"address"},{"internalType":"uint256","name":"value_","type":"uint256"}],"name":"erc20TransferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender_","type":"address"},{"internalType":"uint256","name":"id_","type":"uint256"}],"name":"erc721Approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner_","type":"address"}],"name":"erc721BalanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"erc721TotalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"target_","type":"address"}],"name":"erc721TransferExempt","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from_","type":"address"},{"internalType":"address","name":"to_","type":"address"},{"internalType":"uint256","name":"id_","type":"uint256"}],"name":"erc721TransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getERC721QueueLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"start_","type":"uint256"},{"internalType":"uint256","name":"count_","type":"uint256"}],"name":"getERC721TokensInQueue","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner_","type":"address"}],"name":"owned","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id_","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"erc721Owner","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner_","type":"address"},{"internalType":"address","name":"spender_","type":"address"},{"internalType":"uint256","name":"value_","type":"uint256"},{"internalType":"uint256","name":"deadline_","type":"uint256"},{"internalType":"uint8","name":"v_","type":"uint8"},{"internalType":"bytes32","name":"r_","type":"bytes32"},{"internalType":"bytes32","name":"s_","type":"bytes32"}],"name":"permit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"address","name":"tokenReceiver","type":"address"},{"internalType":"uint256","name":"tokenAmount","type":"uint256"}],"name":"recoverERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"address","name":"tokenReceiver","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"recoverERC721","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from_","type":"address"},{"internalType":"address","name":"to_","type":"address"},{"internalType":"uint256","name":"id_","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from_","type":"address"},{"internalType":"address","name":"to_","type":"address"},{"internalType":"uint256","name":"id_","type":"uint256"},{"internalType":"bytes","name":"data_","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator_","type":"address"},{"internalType":"bool","name":"approved_","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setDavinciPainting","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account_","type":"address"},{"internalType":"bool","name":"value_","type":"bool"}],"name":"setERC721TransferExempt","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"state_","type":"bool"}],"name":"setSelfERC721TransferExempt","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_tokenURI","type":"string"}],"name":"setTokenURI","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":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tradingLive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to_","type":"address"},{"internalType":"uint256","name":"value_","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":"valueOrId_","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":"nonpayable","type":"function"},{"inputs":[],"name":"uniswapSwapRouter_","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"uniswapV3NonfungiblePositionManager_","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"units","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
61010060405234801562000011575f80fd5b506040805180820182526007815266446156696e636960c81b602080830191909152825180840190935260038352622baa2360e91b908301527368b3465833fb72a70ecdf485e0e4c7bd8665fc459173c36442b4a4522e871399cd717abdd847ab11fe889190601233806200009f57604051631e4fbdf760e01b81525f600482015260240160405180910390fd5b620000aa81620004c3565b506003620000b984826200157d565b506004620000c883826200157d565b5060128160ff161015620000ef576040516398790fd560e01b815260040160405180910390fd5b60ff811660808190526200010590600a62001756565b60a0524660c0526200011662000512565b60e052508391506200012c9050816001620005ad565b816200013a816001620005ad565b806001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000177573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906200019d91906200176d565b6001600160a01b0316826001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015620001e3573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906200020991906200176d565b6001600160a01b0316146200023157604051633338041760e01b815260040160405180910390fd5b806001600160a01b0316634aa4a4fc6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200026e573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906200029491906200176d565b6001600160a01b0316826001600160a01b0316634aa4a4fc6040518163ffffffff1660e01b8152600401602060405180830381865afa158015620002da573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906200030091906200176d565b6001600160a01b03161462000328576040516376a731bf60e01b815260040160405180910390fd5b60408051608081018252606481526101f46020820152610bb89181019190915261271060608201525f5b600481101562000460575f62000447856001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200039e573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190620003c491906200176d565b866001600160a01b0316634aa4a4fc6040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000401573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906200042791906200176d565b8585600481106200043c576200043c62001795565b602002015162000622565b905062000456816001620005ad565b5060010162000352565b50505050505062000479306001620005ad60201b60201c565b62000486336001620005ad565b620004a7737f6f2a5dda81783b936de8c33498c44d160b35036001620005ad565b620004bd336901e1d1c72d5b97e0000062000723565b620018cc565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6003604051620005459190620017a9565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b6001600160a01b038216620005d55760405163a41e3d3f60e01b815260040160405180910390fd5b8015620005ed57620005e78262000792565b620005f8565b620005f88262000801565b6001600160a01b03919091165f908152600d60205260409020805460ff1916911515919091179055565b5f3081806001600160a01b03861683106200063f57858362000642565b82865b604080516001600160a01b03808516602083015283169181019190915262ffffff881660608201529193509150879060800160405160208183030381529060405280519060200120604051602001620007009291907fff00000000000000000000000000000000000000000000000000000000000000815260609290921b6001600160601b031916600183015260158201527fe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b54603582015260550190565b60408051601f198184030181529190528051602090910120979650505050505050565b6001600160a01b0382166200074b57604051634e46966960e11b815260040160405180910390fd5b600160ff1b8160055462000760919062001823565b1115620007805760405163303b682f60e01b815260040160405180910390fd5b6200078d5f8383620008b8565b505050565b6001600160a01b0381165f908152600c6020526040812054905b81811015620007c957620007c08362000b77565b600101620007ac565b506040516001600160a01b038316907fc0cf7c2a53728ef310d1a316f083ece390e93768abd482e026306f6465814f2c905f90a25050565b60a0515f9062000825836001600160a01b03165f9081526007602052604090205490565b62000831919062001839565b90505f62000853836001600160a01b03165f908152600c602052604090205490565b90505f5b62000863828462001859565b8110156200087f57620008768462000c28565b60010162000857565b506040516001600160a01b038416907f97947ff5fb57402c17be9c0e96ca79467cc4622a44cbaf7203b916ec1f1c6bf2905f90a2505050565b6001600160a01b038381165f90815260076020526040808220549285168252812054909190620008ea86868662000d1c565b5f620008f68762000d85565b90505f620009048762000d85565b9050818015620009115750805b62000b695781156200098a575f60a051846200092e919062001839565b60a0516001600160a01b038a165f9081526007602052604090205462000955919062001839565b62000961919062001859565b90505f5b818110156200098257620009798962000c28565b60010162000965565b505062000b69565b8015620009f55760a0516001600160a01b0389165f908152600760205260408120549091620009b99162001839565b60a051620009c8908762001839565b620009d4919062001859565b90505f5b818110156200098257620009ec8a62000b77565b600101620009d8565b5f60a0518762000a06919062001839565b90505f5b8181101562000ab3576001600160a01b038a165f908152600c602052604081205462000a399060019062001859565b6001600160a01b038c165f908152600c60205260408120805492935090918390811062000a6a5762000a6a62001795565b5f918252602090912060108204015462000a9991600f166002026101000a900461ffff16600160ff1b62001823565b905062000aa88c8c8362000dba565b505060010162000a0a565b5060a051819062000ad88b6001600160a01b03165f9081526007602052604090205490565b62000ae4919062001839565b60a05162000af3908862001839565b62000aff919062001859565b111562000b115762000b118962000b77565b8060a0518562000b22919062001839565b60a0516001600160a01b038b165f9081526007602052604090205462000b49919062001839565b62000b55919062001859565b111562000b675762000b678862000c28565b505b506001979650505050505050565b6001600160a01b03811662000b9f57604051636edaef2f60e11b815260040160405180910390fd5b6001600160a01b0381165f908152600c60205260408120805462000bc69060019062001859565b8154811062000bd95762000bd962001795565b5f918252602090912060108204015462000c0891600f166002026101000a900461ffff16600160ff1b62001823565b905062000c17825f8362000dba565b62000c2460018262000e1d565b5050565b6001600160a01b03811662000c5057604051634e46966960e11b815260040160405180910390fd5b5f62000c5d600162000f0f565b62000c8a5762000c6e600162000f56565b62000c829061ffff16600160ff1b62001823565b905062000cd8565b60065f815462000c9a906200186f565b9091555060065460010162000cc25760405163303b682f60e01b815260040160405180910390fd5b60065462000cd590600160ff1b62001823565b90505b5f818152600b60205260409020546001600160a01b0316801562000d0f5760405163119b4fd360e11b815260040160405180910390fd5b6200078d81848462000dba565b600f54839060ff1615155f0362000d72576001600160a01b0381161580159062000d5357505f546001600160a01b03828116911614155b1562000d7257604051630fb2141b60e41b815260040160405180910390fd5b62000d7f84848462001067565b50505050565b5f6001600160a01b038216158062000db457506001600160a01b0382165f908152600d602052604090205460ff165b92915050565b600f54839060ff1615155f0362000e10576001600160a01b0381161580159062000df157505f546001600160a01b03828116911614155b1562000e1057604051630fb2141b60e41b815260040160405180910390fd5b62000d7f84848462001140565b81546001600160401b0380821691680100000000000000009004165f81900362000e4d57505f1901600f62000e51565b5f19015b83546001600160401b03838116600160801b9092041614801562000e88575083546001600160401b03828116600160c01b90920416145b1562000ea757604051638acb5f2760e01b815260040160405180910390fd5b6001600160401b0382165f90815260018501602052604090205462000ece908285620013e3565b6001600160401b039283165f81815260018701602052604090209190915584546001600160801b031916176801000000000000000091909216021790915550565b80545f90600160c01b81046001600160401b03908116680100000000000000009092041614801562000db4575050546001600160401b03808216600160801b909204161490565b80545f906001600160401b03600160801b8204811691600160c01b8104821691168214801562000f9e575083546001600160401b038281166801000000000000000090920416145b1562000fbd576040516375e52f4f60e01b815260040160405180910390fd5b806001600160401b03165f0362000fda57505f1901600f62000fde565b5f19015b6001600160401b0382165f90815260018501602052604090205462001004818362001429565b93506200101381835f620013e3565b6001600160401b039384165f81815260018801602052604090209190915585546001600160801b0316600160801b9091026001600160c01b031617600160c01b929093169190910291909117909255919050565b6001600160a01b03831662001095578060055f82825462001089919062001823565b90915550620010c49050565b6001600160a01b0383165f9081526007602052604081208054839290620010be90849062001859565b90915550505b6001600160a01b038083165f818152600760205260408082208054860190555184938716917fe59fdd36d0d223c0c7d996db7ad796880f45e1936cb0bb7ac102e7082e03148791a480826001600160a01b0316846001600160a01b03165f805160206200590983398151915260405160405180910390a4505050565b6001600160a01b03831615620012b5575f81815260096020908152604080832080546001600160a01b03191690556001600160a01b0386168352600c90915281208054620011919060019062001859565b81548110620011a457620011a462001795565b5f9182526020909120601082040154620011d391600f166002026101000a900461ffff16600160ff1b62001823565b905081811462001260575f828152600b602052604081205460a01c6001600160a01b0386165f908152600c6020526040902080549192508391839081106200121f576200121f62001795565b905f5260205f2090601091828204019190066002026101000a81548161ffff021916908361ffff1602179055506200125e82826200145760201b60201c565b505b6001600160a01b0384165f908152600c602052604090208054806200128957620012896200188a565b5f8281526020902060105f1990920191820401805461ffff6002600f8516026101000a02191690559055505b6001600160a01b038216156200135f575f818152600b6020526040902080546001600160a01b0319166001600160a01b0384160190556001600160a01b0382165f818152600c60209081526040822080546001808201835582855292842060108204018054600f9092166002026101000a61ffff81810219909316928816029190911790559290915290546200135991839162001353919062001859565b62001457565b6200136e565b5f818152600b60205260408120555b80826001600160a01b0316846001600160a01b03167fe5f815dc84b8cecdfd4beedfc3f91ab5be7af100eca4e8fb11552b867995394f60405160405180910390a480826001600160a01b0316846001600160a01b03165f805160206200590983398151915260405160405180910390a4505050565b5f620013f18360106200189e565b6001600160401b03168261ffff16901b6200141284620014bd60201b60201c565b19851662001421919062001823565b949350505050565b5f620014378260106200189e565b6001600160401b03166200144b83620014bd565b8416901c905092915050565b5f828152600b60205260409020546001600160601b038211156200148e57604051633f2cd0e360e21b815260040160405180910390fd5b5f928352600b60205260409092206001600160a01b039290921660a09190911b6001600160a01b031916019055565b5f620014cb8260106200189e565b6001600160401b031661ffff901b9050919050565b634e487b7160e01b5f52604160045260245ffd5b600181811c908216806200150957607f821691505b6020821081036200152857634e487b7160e01b5f52602260045260245ffd5b50919050565b601f8211156200078d57805f5260205f20601f840160051c81016020851015620015555750805b601f840160051c820191505b8181101562001576575f815560010162001561565b5050505050565b81516001600160401b03811115620015995762001599620014e0565b620015b181620015aa8454620014f4565b846200152e565b602080601f831160018114620015e7575f8415620015cf5750858301515b5f19600386901b1c1916600185901b17855562001641565b5f85815260208120601f198616915b828110156200161757888601518255948401946001909101908401620015f6565b50858210156200163557878501515f19600388901b60f8161c191681555b505060018460011b0185555b505050505050565b634e487b7160e01b5f52601160045260245ffd5b600181815b808511156200169d57815f190482111562001681576200168162001649565b808516156200168f57918102915b93841c939080029062001662565b509250929050565b5f82620016b55750600162000db4565b81620016c357505f62000db4565b8160018114620016dc5760028114620016e75762001707565b600191505062000db4565b60ff841115620016fb57620016fb62001649565b50506001821b62000db4565b5060208310610133831016604e8410600b84101617156200172c575081810a62000db4565b6200173883836200165d565b805f19048211156200174e576200174e62001649565b029392505050565b5f6200176660ff841683620016a5565b9392505050565b5f602082840312156200177e575f80fd5b81516001600160a01b038116811462001766575f80fd5b634e487b7160e01b5f52603260045260245ffd5b5f808354620017b881620014f4565b60018281168015620017d35760018114620017e95762001817565b60ff198416875282151583028701945062001817565b875f526020805f205f5b858110156200180e5781548a820152908401908201620017f3565b50505082870194505b50929695505050505050565b8082018082111562000db45762000db462001649565b5f826200185457634e487b7160e01b5f52601260045260245ffd5b500490565b8181038181111562000db45762000db462001649565b5f6001820162001883576200188362001649565b5060010190565b634e487b7160e01b5f52603160045260245ffd5b6001600160401b03818116838216028082169190828114620018c457620018c462001649565b505092915050565b60805160a05160c05160e051613fbc6200194d5f395f610b7801525f610b4801525f81816105eb015281816119d601528181612049015281816120990152818161211d01528181612147015281816121990152818161229a015281816122f3015281816123370152818161235e01526127c101525f61047f0152613fbc5ff3fe608060405234801561000f575f80fd5b5060043610610330575f3560e01c806389fb4c66116101b3578063c87b56dd116100f3578063dfabc0331161009e578063e985e9c511610079578063e985e9c514610790578063f2fde38b146107bd578063f780bc1a146107d0578063fc4e51f6146107e3575f80fd5b8063dfabc0331461074f578063e0df5b6f14610762578063e689c47614610775575f80fd5b8063d96ca0b9116100ce578063d96ca0b9146106ff578063dd62ed3e14610712578063dd6376991461073c575f80fd5b8063c87b56dd146106d1578063d505accf146106e4578063d547cfb7146106f7575f80fd5b8063a9059cbb1161015e578063b3f9ea3411610139578063b3f9ea341461066e578063b88d4fde146106a3578063c5ab3ba6146106b6578063c6e672b9146106be575f80fd5b8063a9059cbb14610620578063aca528de14610633578063b1ab93171461064e575f80fd5b806395d89b411161018e57806395d89b41146105de578063976a8435146105e6578063a22cb4651461060d575f80fd5b806389fb4c66146105a65780638a696e50146105ae5780638da5cb5b146105c1575f80fd5b80633201b3041161027e5780634f02c420116102295780636e8f624b116102045780636e8f624b1461053957806370a0823114610560578063715018a61461057f5780637ecebe0014610587575f80fd5b80634f02c42014610502578063525d1d531461050b5780636352211e14610526575f80fd5b80633ccfd60b116102595780633ccfd60b146104d457806342842e0e146104dc5780634d966072146104ef575f80fd5b80633201b304146104b357806333039d3d146104bb5780633644e515146104cc575f80fd5b806309f0ef65116102de57806318160ddd116102b957806318160ddd1461045e57806323b872dd14610467578063313ce5671461047a575f80fd5b806309f0ef651461042957806311704f521461043c5780631171bda914610449575f80fd5b8063081812fc1161030e578063081812fc146103b4578063095ea7b31461040e57806309674eb014610421575f80fd5b806301ffc9a71461033457806302519da31461035c57806306fdde031461039f575b5f80fd5b610347610342366004613595565b6107f6565b60405190151581526020015b60405180910390f35b61039161036a3660046135d3565b73ffffffffffffffffffffffffffffffffffffffff165f9081526007602052604090205490565b604051908152602001610353565b6103a761088e565b6040516103539190613657565b6103e96103c2366004613669565b60096020525f908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610353565b61034761041c366004613680565b61091a565b610391610952565b6103476104373660046135d3565b6109e6565b600f546103479060ff1681565b61045c6104573660046136a8565b610a30565b005b61039160055481565b6103476104753660046136a8565b610ad4565b6104a17f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff9091168152602001610353565b61045c610b10565b6103916901e1d1c72d5b97e0000081565b610391610b45565b61045c610b9a565b61045c6104ea3660046136a8565b610bcb565b6103476104fd366004613680565b610bea565b61039160065481565b6103e973c36442b4a4522e871399cd717abdd847ab11fe8881565b6103e9610534366004613669565b610cf5565b6103917f800000000000000000000000000000000000000000000000000000000000000081565b61039161056e3660046135d3565b60076020525f908152604090205481565b61045c610daa565b6103916105953660046135d3565b600e6020525f908152604090205481565b600554610391565b61045c6105bc3660046136ee565b610dbb565b5f5473ffffffffffffffffffffffffffffffffffffffff166103e9565b6103a7610dc8565b6103917f000000000000000000000000000000000000000000000000000000000000000081565b61045c61061b366004613709565b610dd5565b61034761062e366004613680565b610eb8565b6103e97368b3465833fb72a70ecdf485e0e4c7bd8665fc4581565b61066161065c3660046135d3565b610f11565b604051610353919061373e565b61039161067c3660046135d3565b73ffffffffffffffffffffffffffffffffffffffff165f908152600c602052604090205490565b61045c6106b136600461383f565b611057565b600654610391565b61045c6106cc366004613709565b6111b9565b6103a76106df366004613669565b6111cf565b61045c6106f23660046138b6565b6112df565b6103a761168c565b61034761070d3660046136a8565b611699565b610391610720366004613923565b600860209081525f928352604080842090915290825290205481565b61045c61074a3660046136a8565b6117da565b61045c61075d366004613680565b611a05565b61045c610770366004613954565b611b7b565b6103e9737f6f2a5dda81783b936de8c33498c44d160b350381565b61034761079e366004613923565b600a60209081525f928352604080842090915290825290205460ff1681565b61045c6107cb3660046135d3565b611b8f565b6106616107de366004613999565b611bf4565b61045c6107f136600461383f565b611cbe565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167fcaf91ff500000000000000000000000000000000000000000000000000000000148061088857507fffffffff0000000000000000000000000000000000000000000000000000000082167f01ffc9a700000000000000000000000000000000000000000000000000000000145b92915050565b6003805461089b906139b9565b80601f01602080910402602001604051908101604052809291908181526020018280546108c7906139b9565b80156109125780601f106108e957610100808354040283529160200191610912565b820191905f5260205f20905b8154815290600101906020018083116108f557829003601f168201915b505050505081565b5f61092482611d51565b15610938576109338383611a05565b610949565b6109428383610bea565b9050610888565b50600192915050565b5f6109e16001547ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff067ffffffffffffffff8083166010908102680100000000000000008504831682037801000000000000000000000000000000000000000000000000860484160170010000000000000000000000000000000090950483169091029390930192909203011690565b905090565b5f73ffffffffffffffffffffffffffffffffffffffff8216158061088857505073ffffffffffffffffffffffffffffffffffffffff165f908152600d602052604090205460ff1690565b610a38611da3565b6040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83811660048301526024820183905284169063a9059cbb906044016020604051808303815f875af1158015610aaa573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610ace9190613a0a565b50505050565b5f610ade82611d51565b15610af357610aee8484846117da565b610b05565b610afe848484611699565b9050610b09565b5060015b9392505050565b610b18611da3565b600f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b5f7f00000000000000000000000000000000000000000000000000000000000000004614610b75576109e1611df5565b507f000000000000000000000000000000000000000000000000000000000000000090565b610ba2611da3565b610bc9610bc35f5473ffffffffffffffffffffffffffffffffffffffff1690565b47611e8e565b565b610be583838360405180602001604052805f815250611057565b505050565b5f73ffffffffffffffffffffffffffffffffffffffff8316610c38576040517f5461585f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b335f81815260086020908152604080832073ffffffffffffffffffffffffffffffffffffffff881680855290835292819020869055518581529192917f1f01303a1ce9329d9963e1937c201e23c5543a9e3536e9edead087aec7dc6d83910160405180910390a360405182815273ffffffffffffffffffffffffffffffffffffffff84169033907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259060200160405180910390a350600192915050565b5f818152600b602052604090205473ffffffffffffffffffffffffffffffffffffffff16610d2282611d51565b610d58576040517f3f6cc76800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8116610da5576040517fc5723b5100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b919050565b610db2611da3565b610bc95f611ea7565b610dc53382611f1b565b50565b6004805461089b906139b9565b73ffffffffffffffffffffffffffffffffffffffff8216610e22576040517fccea9e6f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b335f818152600a6020908152604080832073ffffffffffffffffffffffffffffffffffffffff87168085529083529281902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b5f73ffffffffffffffffffffffffffffffffffffffff8316610f06576040517f9c8d2cd200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610b09338484611fda565b73ffffffffffffffffffffffffffffffffffffffff81165f908152600c60205260408120546060919067ffffffffffffffff811115610f5257610f52613781565b604051908082528060200260200182016040528015610f7b578160200160208202803683370190505b5090505f5b73ffffffffffffffffffffffffffffffffffffffff84165f908152600c60205260409020548110156110505773ffffffffffffffffffffffffffffffffffffffff84165f908152600c60205260409020805482908110610fe257610fe2613a25565b5f918252602090912060108204015461102b91600f166002026101000a900461ffff167f8000000000000000000000000000000000000000000000000000000000000000613a7f565b82828151811061103d5761103d613a25565b6020908102919091010152600101610f80565b5092915050565b61106082611d51565b611096576040517f3f6cc76800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6110a1848484610ad4565b5073ffffffffffffffffffffffffffffffffffffffff83163b1580159061118257506040517f150b7a02000000000000000000000000000000000000000000000000000000008082529073ffffffffffffffffffffffffffffffffffffffff85169063150b7a029061111d903390899088908890600401613a92565b6020604051808303815f875af1158015611139573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061115d9190613ada565b7fffffffff000000000000000000000000000000000000000000000000000000001614155b15610ace576040517f3da6393100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6111c1611da3565b6111cb8282611f1b565b5050565b5f818152600b602052604090205460609073ffffffffffffffffffffffffffffffffffffffff1661122c576040517fab9713c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f80000000000000000000000000000000000000000000000000000000000000008211156112815761127e7f800000000000000000000000000000000000000000000000000000000000000083613af5565b91505b5f61128b836123db565b90505f6010805461129b906139b9565b905011156112ce576010816040516020016112b7929190613b95565b604051602081830303815290604052915050919050565b806040516020016112b79190613bb9565b42841015611319576040517f05787bdf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61132285611d51565b15611359576040517f1f3e0de800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff86166113a6576040517f5461585f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f60016113b1610b45565b73ffffffffffffffffffffffffffffffffffffffff8a81165f818152600e602090815260409182902080546001810190915582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98184015280840194909452938d166060840152608083018c905260a083019390935260c08083018b90528151808403909101815260e0830190915280519201919091207f190100000000000000000000000000000000000000000000000000000000000061010083015261010282019290925261012281019190915261014201604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815282825280516020918201205f84529083018083525260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa1580156114ff573d5f803e3d5ffd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff8116158061157957508773ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b156115b0576040517f815e1d6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff9081165f9081526008602090815260408083208a8516808552908352928190208990555188815291928a16917f1f01303a1ce9329d9963e1937c201e23c5543a9e3536e9edead087aec7dc6d83910160405180910390a38573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258760405161167b91815260200190565b60405180910390a350505050505050565b6010805461089b906139b9565b5f73ffffffffffffffffffffffffffffffffffffffff84166116e7576040517fddb5de5e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8316611734576040517f9c8d2cd200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff84165f9081526008602090815260408083203384529091529020547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146117c6576117958382613af5565b73ffffffffffffffffffffffffffffffffffffffff86165f9081526008602090815260408083203384529091529020555b6117d1858585611fda565b95945050505050565b73ffffffffffffffffffffffffffffffffffffffff8316611827576040517fddb5de5e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8216611874576040517f9c8d2cd200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f818152600b602052604090205473ffffffffffffffffffffffffffffffffffffffff8481169116146118d3576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff841614801590611929575073ffffffffffffffffffffffffffffffffffffffff83165f908152600a6020908152604080832033845290915290205460ff16155b801561195857505f8181526009602052604090205473ffffffffffffffffffffffffffffffffffffffff163314155b1561198f576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611998826109e6565b156119cf576040517f5ce7539700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6119fa83837f0000000000000000000000000000000000000000000000000000000000000000612497565b610be5838383612528565b5f818152600b602052604090205473ffffffffffffffffffffffffffffffffffffffff16338114801590611a69575073ffffffffffffffffffffffffffffffffffffffff81165f908152600a6020908152604080832033845290915290205460ff16155b15611aa0576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f8281526009602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff87811691821790925591518593918516917f797365dabb18fa726ccbccbe18c6f24c34e3b0653f2e99ea873bd7b84763dde691a4818373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a4505050565b611b83611da3565b60106111cb8282613d53565b611b97611da3565b73ffffffffffffffffffffffffffffffffffffffff8116611beb576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f60048201526024015b60405180910390fd5b610dc581611ea7565b60605f8267ffffffffffffffff811115611c1057611c10613781565b604051908082528060200260200182016040528015611c39578160200160208202803683370190505b509050835b611c488486613a7f565b811015611cb657611c5a6001826125b9565b611c889061ffff167f8000000000000000000000000000000000000000000000000000000000000000613a7f565b82611c938784613af5565b81518110611ca357611ca3613a25565b6020908102919091010152600101611c3e565b509392505050565b611cc6611da3565b6040517fb88d4fde00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85169063b88d4fde90611d1e903090879087908790600401613a92565b5f604051808303815f87803b158015611d35575f80fd5b505af1158015611d47573d5f803e3d5ffd5b5050505050505050565b5f7f8000000000000000000000000000000000000000000000000000000000000000821180156108885750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff141590565b5f5473ffffffffffffffffffffffffffffffffffffffff163314610bc9576040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152602401611be2565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6003604051611e269190613e6f565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f385f3884865af16111cb5763b12d13eb5f526004601cfd5b5f805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b73ffffffffffffffffffffffffffffffffffffffff8216611f68576040517fa41e3d3f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8015611f7c57611f7782612711565b611f85565b611f8582612796565b73ffffffffffffffffffffffffffffffffffffffff919091165f908152600d6020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055565b73ffffffffffffffffffffffffffffffffffffffff8381165f90815260076020526040808220549285168252812054909190612017868686612497565b5f612021876109e6565b90505f61202d876109e6565b90508180156120395750805b6123cd5781156120ec575f61206e7f000000000000000000000000000000000000000000000000000000000000000085613ea7565b73ffffffffffffffffffffffffffffffffffffffff89165f908152600760205260409020546120be907f000000000000000000000000000000000000000000000000000000000000000090613ea7565b6120c89190613af5565b90505f5b818110156120e5576120dd89612880565b6001016120cc565b50506123cd565b80156121935773ffffffffffffffffffffffffffffffffffffffff88165f90815260076020526040812054612142907f000000000000000000000000000000000000000000000000000000000000000090613ea7565b61216c7f000000000000000000000000000000000000000000000000000000000000000087613ea7565b6121769190613af5565b90505f5b818110156120e55761218b8a612a00565b60010161217a565b5f6121be7f000000000000000000000000000000000000000000000000000000000000000088613ea7565b90505f5b818110156122965773ffffffffffffffffffffffffffffffffffffffff8a165f908152600c60205260408120546121fb90600190613af5565b73ffffffffffffffffffffffffffffffffffffffff8c165f908152600c60205260408120805492935090918390811061223657612236613a25565b5f918252602090912060108204015461227f91600f166002026101000a900461ffff167f8000000000000000000000000000000000000000000000000000000000000000613a7f565b905061228c8c8c83612528565b50506001016121c2565b50807f00000000000000000000000000000000000000000000000000000000000000006122e48b73ffffffffffffffffffffffffffffffffffffffff165f9081526007602052604090205490565b6122ee9190613ea7565b6123187f000000000000000000000000000000000000000000000000000000000000000088613ea7565b6123229190613af5565b11156123315761233189612a00565b8061235c7f000000000000000000000000000000000000000000000000000000000000000086613ea7565b7f00000000000000000000000000000000000000000000000000000000000000006123a88b73ffffffffffffffffffffffffffffffffffffffff165f9081526007602052604090205490565b6123b29190613ea7565b6123bc9190613af5565b11156123cb576123cb88612880565b505b506001979650505050505050565b60605f6123e783612af0565b60010190505f8167ffffffffffffffff81111561240657612406613781565b6040519080825280601f01601f191660200182016040528015612430576020820181803683370190505b5090508181016020015b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a850494508461243a57509392505050565b600f54839060ff1615155f0361251d5773ffffffffffffffffffffffffffffffffffffffff8116158015906124e657505f5473ffffffffffffffffffffffffffffffffffffffff828116911614155b1561251d576040517ffb2141b000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ace848484612bd1565b600f54839060ff1615155f036125ae5773ffffffffffffffffffffffffffffffffffffffff81161580159061257757505f5473ffffffffffffffffffffffffffffffffffffffff828116911614155b156125ae576040517ffb2141b000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ace848484612cf7565b5f61264783547ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff067ffffffffffffffff8083166010908102680100000000000000008504831682037801000000000000000000000000000000000000000000000000860484160170010000000000000000000000000000000090950483169091029390930192909203011690565b612652906010613edf565b821061268a576040517f580821e700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610b09600184015f6010850460108087895467ffffffffffffffff680100000000000000009091048116929091069190910116816126ca576126ca613e7a565b885491900467ffffffffffffffff808316919091019290920182168352602083019390935260409091015f2054916010916801000000000000000090910416850106613089565b73ffffffffffffffffffffffffffffffffffffffff81165f908152600c6020526040812054905b818110156127515761274983612a00565b600101612738565b5060405173ffffffffffffffffffffffffffffffffffffffff8316907fc0cf7c2a53728ef310d1a316f083ece390e93768abd482e026306f6465814f2c905f90a25050565b73ffffffffffffffffffffffffffffffffffffffff81165f908152600760205260408120546127e6907f000000000000000000000000000000000000000000000000000000000000000090613ea7565b90505f6128148373ffffffffffffffffffffffffffffffffffffffff165f908152600c602052604090205490565b90505f5b6128228284613af5565b81101561283a5761283284612880565b600101612818565b5060405173ffffffffffffffffffffffffffffffffffffffff8416907f97947ff5fb57402c17be9c0e96ca79467cc4622a44cbaf7203b916ec1f1c6bf2905f90a2505050565b73ffffffffffffffffffffffffffffffffffffffff81166128cd576040517f9c8d2cd200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f6128d860016130b4565b61291b576128e6600161311e565b6129149061ffff167f8000000000000000000000000000000000000000000000000000000000000000613a7f565b9050612999565b60065f815461292990613ef6565b90915550600654600101612969576040517f303b682f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600654612996907f8000000000000000000000000000000000000000000000000000000000000000613a7f565b90505b5f818152600b602052604090205473ffffffffffffffffffffffffffffffffffffffff1680156129f5576040517f23369fa600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610be5818484612528565b73ffffffffffffffffffffffffffffffffffffffff8116612a4d576040517fddb5de5e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff81165f908152600c602052604081208054612a7f90600190613af5565b81548110612a8f57612a8f613a25565b5f9182526020909120601082040154612ad891600f166002026101000a900461ffff167f8000000000000000000000000000000000000000000000000000000000000000613a7f565b9050612ae5825f83612528565b6111cb6001826132e1565b5f807a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310612b38577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef81000000008310612b64576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310612b8257662386f26fc10000830492506010015b6305f5e1008310612b9a576305f5e100830492506008015b6127108310612bae57612710830492506004015b60648310612bc0576064830492506002015b600a83106108885760010192915050565b73ffffffffffffffffffffffffffffffffffffffff8316612c08578060055f828254612bfd9190613a7f565b90915550612c429050565b73ffffffffffffffffffffffffffffffffffffffff83165f9081526007602052604081208054839290612c3c908490613af5565b90915550505b73ffffffffffffffffffffffffffffffffffffffff8083165f818152600760205260408082208054860190555184938716917fe59fdd36d0d223c0c7d996db7ad796880f45e1936cb0bb7ac102e7082e03148791a4808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b73ffffffffffffffffffffffffffffffffffffffff831615612edc575f81815260096020908152604080832080547fffffffffffffffffffffffff000000000000000000000000000000000000000016905573ffffffffffffffffffffffffffffffffffffffff86168352600c90915281208054612d7790600190613af5565b81548110612d8757612d87613a25565b5f9182526020909120601082040154612dd091600f166002026101000a900461ffff167f8000000000000000000000000000000000000000000000000000000000000000613a7f565b9050818114612e5e575f828152600b602052604081205460a01c73ffffffffffffffffffffffffffffffffffffffff86165f908152600c602052604090208054919250839183908110612e2557612e25613a25565b905f5260205f2090601091828204019190066002026101000a81548161ffff021916908361ffff160217905550612e5c8282613463565b505b73ffffffffffffffffffffffffffffffffffffffff84165f908152600c60205260409020805480612e9157612e91613f2d565b5f8281526020902060107fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90920191820401805461ffff6002600f8516026101000a02191690559055505b73ffffffffffffffffffffffffffffffffffffffff821615612fbf575f818152600b6020526040902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff841601905573ffffffffffffffffffffffffffffffffffffffff82165f818152600c60209081526040822080546001808201835582855292842060108204018054600f9092166002026101000a61ffff8181021990931692881602919091179055929091529054612fba918391612fb59190613af5565b613463565b612fce565b5f818152600b60205260408120555b808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fe5f815dc84b8cecdfd4beedfc3f91ab5be7af100eca4e8fb11552b867995394f60405160405180910390a4808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b5f613095826010613f5a565b67ffffffffffffffff166130a88361350b565b8416901c905092915050565b80545f907801000000000000000000000000000000000000000000000000810467ffffffffffffffff90811668010000000000000000909204161480156108885750505467ffffffffffffffff808216700100000000000000000000000000000000909204161490565b80545f9067ffffffffffffffff70010000000000000000000000000000000082048116917801000000000000000000000000000000000000000000000000810482169116821480156131895750835467ffffffffffffffff8281166801000000000000000090920416145b156131c0576040517f75e52f4f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8067ffffffffffffffff165f036131fb57507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01600f61321e565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff015b67ffffffffffffffff82165f9081526001850160205260409020546132438183613089565b935061325081835f61352d565b67ffffffffffffffff9384165f81815260018801602052604090209190915585546fffffffffffffffffffffffffffffffff1670010000000000000000000000000000000090910277ffffffffffffffffffffffffffffffffffffffffffffffff16177801000000000000000000000000000000000000000000000000929093169190910291909117909255919050565b815467ffffffffffffffff80821691680100000000000000009004165f81900361332f57507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01600f613352565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff015b835467ffffffffffffffff838116700100000000000000000000000000000000909204161480156133ac5750835467ffffffffffffffff828116780100000000000000000000000000000000000000000000000090920416145b156133e3576040517f8acb5f2700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff82165f90815260018501602052604090205461340990828561352d565b67ffffffffffffffff9283165f81815260018701602052604090209190915584547fffffffffffffffffffffffffffffffff0000000000000000000000000000000016176801000000000000000091909216021790915550565b5f828152600b60205260409020546bffffffffffffffffffffffff8211156134b7576040517ffcb3438c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f928352600b602052604090922073ffffffffffffffffffffffffffffffffffffffff9290921660a09190911b7fffffffffffffffffffffffff000000000000000000000000000000000000000016019055565b5f613517826010613f5a565b67ffffffffffffffff1661ffff901b9050919050565b5f613539836010613f5a565b67ffffffffffffffff168261ffff16901b6135538461350b565b1985166135609190613a7f565b949350505050565b7fffffffff0000000000000000000000000000000000000000000000000000000081168114610dc5575f80fd5b5f602082840312156135a5575f80fd5b8135610b0981613568565b803573ffffffffffffffffffffffffffffffffffffffff81168114610da5575f80fd5b5f602082840312156135e3575f80fd5b610b09826135b0565b5f5b838110156136065781810151838201526020016135ee565b50505f910152565b5f81518084526136258160208601602086016135ec565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081525f610b09602083018461360e565b5f60208284031215613679575f80fd5b5035919050565b5f8060408385031215613691575f80fd5b61369a836135b0565b946020939093013593505050565b5f805f606084860312156136ba575f80fd5b6136c3846135b0565b92506136d1602085016135b0565b9150604084013590509250925092565b8015158114610dc5575f80fd5b5f602082840312156136fe575f80fd5b8135610b09816136e1565b5f806040838503121561371a575f80fd5b613723836135b0565b91506020830135613733816136e1565b809150509250929050565b602080825282518282018190525f9190848201906040850190845b8181101561377557835183529284019291840191600101613759565b50909695505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f67ffffffffffffffff808411156137c8576137c8613781565b604051601f85017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190828211818310171561380e5761380e613781565b81604052809350858152868686011115613826575f80fd5b858560208301375f602087830101525050509392505050565b5f805f8060808587031215613852575f80fd5b61385b856135b0565b9350613869602086016135b0565b925060408501359150606085013567ffffffffffffffff81111561388b575f80fd5b8501601f8101871361389b575f80fd5b6138aa878235602084016137ae565b91505092959194509250565b5f805f805f805f60e0888a0312156138cc575f80fd5b6138d5886135b0565b96506138e3602089016135b0565b95506040880135945060608801359350608088013560ff81168114613906575f80fd5b9699959850939692959460a0840135945060c09093013592915050565b5f8060408385031215613934575f80fd5b61393d836135b0565b915061394b602084016135b0565b90509250929050565b5f60208284031215613964575f80fd5b813567ffffffffffffffff81111561397a575f80fd5b8201601f8101841361398a575f80fd5b613560848235602084016137ae565b5f80604083850312156139aa575f80fd5b50508035926020909101359150565b600181811c908216806139cd57607f821691505b602082108103613a04577f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b50919050565b5f60208284031215613a1a575f80fd5b8151610b09816136e1565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b8082018082111561088857610888613a52565b5f73ffffffffffffffffffffffffffffffffffffffff808716835280861660208401525083604083015260806060830152613ad0608083018461360e565b9695505050505050565b5f60208284031215613aea575f80fd5b8151610b0981613568565b8181038181111561088857610888613a52565b5f8154613b14816139b9565b60018281168015613b2c5760018114613b5f57613b8b565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0084168752821515830287019450613b8b565b855f526020805f205f5b85811015613b825781548a820152908401908201613b69565b50505082870194505b5050505092915050565b5f613ba08285613b08565b8351613bb08183602088016135ec565b01949350505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b757466382c000000000081527f7b226e616d65223a2022446156696e6369202300000000000000000000000000601b8201525f8251613c1681602e8501602087016135ec565b7f222c000000000000000000000000000000000000000000000000000000000000602e9390910192830152507f226465736372697074696f6e223a20224120636f6c6c656374696f6e206f662060308201527f382c38383820656e61626c6564206279204552433430342c20616e206578706560508201527f72696d656e74616c20746f6b656e207374616e646172642e222c00000000000060708201527f22696d616765223a202268747470733a2f2f646176696e63692e7774662f6e66608a8201527f742f756e72657665616c65642e77656270227d0000000000000000000000000060aa82015260bd01919050565b601f821115610be557805f5260205f20601f840160051c81016020851015613d2d5750805b601f840160051c820191505b81811015613d4c575f8155600101613d39565b5050505050565b815167ffffffffffffffff811115613d6d57613d6d613781565b613d8181613d7b84546139b9565b84613d08565b602080601f831160018114613dd3575f8415613d9d5750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555613e67565b5f858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b82811015613e1f57888601518255948401946001909101908401613e00565b5085821015613e5b57878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b505060018460011b0185555b505050505050565b5f610b098284613b08565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f82613eda577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b500490565b808202811582820484141761088857610888613a52565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203613f2657613f26613a52565b5060010190565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603160045260245ffd5b67ffffffffffffffff818116838216028082169190828114613f7e57613f7e613a52565b50509291505056fea2646970667358221220a6537c9d95332c59d253ac84787deaca1f96d167406b32db7031f191748fbda764736f6c63430008180033ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef
Deployed Bytecode
0x608060405234801561000f575f80fd5b5060043610610330575f3560e01c806389fb4c66116101b3578063c87b56dd116100f3578063dfabc0331161009e578063e985e9c511610079578063e985e9c514610790578063f2fde38b146107bd578063f780bc1a146107d0578063fc4e51f6146107e3575f80fd5b8063dfabc0331461074f578063e0df5b6f14610762578063e689c47614610775575f80fd5b8063d96ca0b9116100ce578063d96ca0b9146106ff578063dd62ed3e14610712578063dd6376991461073c575f80fd5b8063c87b56dd146106d1578063d505accf146106e4578063d547cfb7146106f7575f80fd5b8063a9059cbb1161015e578063b3f9ea3411610139578063b3f9ea341461066e578063b88d4fde146106a3578063c5ab3ba6146106b6578063c6e672b9146106be575f80fd5b8063a9059cbb14610620578063aca528de14610633578063b1ab93171461064e575f80fd5b806395d89b411161018e57806395d89b41146105de578063976a8435146105e6578063a22cb4651461060d575f80fd5b806389fb4c66146105a65780638a696e50146105ae5780638da5cb5b146105c1575f80fd5b80633201b3041161027e5780634f02c420116102295780636e8f624b116102045780636e8f624b1461053957806370a0823114610560578063715018a61461057f5780637ecebe0014610587575f80fd5b80634f02c42014610502578063525d1d531461050b5780636352211e14610526575f80fd5b80633ccfd60b116102595780633ccfd60b146104d457806342842e0e146104dc5780634d966072146104ef575f80fd5b80633201b304146104b357806333039d3d146104bb5780633644e515146104cc575f80fd5b806309f0ef65116102de57806318160ddd116102b957806318160ddd1461045e57806323b872dd14610467578063313ce5671461047a575f80fd5b806309f0ef651461042957806311704f521461043c5780631171bda914610449575f80fd5b8063081812fc1161030e578063081812fc146103b4578063095ea7b31461040e57806309674eb014610421575f80fd5b806301ffc9a71461033457806302519da31461035c57806306fdde031461039f575b5f80fd5b610347610342366004613595565b6107f6565b60405190151581526020015b60405180910390f35b61039161036a3660046135d3565b73ffffffffffffffffffffffffffffffffffffffff165f9081526007602052604090205490565b604051908152602001610353565b6103a761088e565b6040516103539190613657565b6103e96103c2366004613669565b60096020525f908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610353565b61034761041c366004613680565b61091a565b610391610952565b6103476104373660046135d3565b6109e6565b600f546103479060ff1681565b61045c6104573660046136a8565b610a30565b005b61039160055481565b6103476104753660046136a8565b610ad4565b6104a17f000000000000000000000000000000000000000000000000000000000000001281565b60405160ff9091168152602001610353565b61045c610b10565b6103916901e1d1c72d5b97e0000081565b610391610b45565b61045c610b9a565b61045c6104ea3660046136a8565b610bcb565b6103476104fd366004613680565b610bea565b61039160065481565b6103e973c36442b4a4522e871399cd717abdd847ab11fe8881565b6103e9610534366004613669565b610cf5565b6103917f800000000000000000000000000000000000000000000000000000000000000081565b61039161056e3660046135d3565b60076020525f908152604090205481565b61045c610daa565b6103916105953660046135d3565b600e6020525f908152604090205481565b600554610391565b61045c6105bc3660046136ee565b610dbb565b5f5473ffffffffffffffffffffffffffffffffffffffff166103e9565b6103a7610dc8565b6103917f0000000000000000000000000000000000000000000000000de0b6b3a764000081565b61045c61061b366004613709565b610dd5565b61034761062e366004613680565b610eb8565b6103e97368b3465833fb72a70ecdf485e0e4c7bd8665fc4581565b61066161065c3660046135d3565b610f11565b604051610353919061373e565b61039161067c3660046135d3565b73ffffffffffffffffffffffffffffffffffffffff165f908152600c602052604090205490565b61045c6106b136600461383f565b611057565b600654610391565b61045c6106cc366004613709565b6111b9565b6103a76106df366004613669565b6111cf565b61045c6106f23660046138b6565b6112df565b6103a761168c565b61034761070d3660046136a8565b611699565b610391610720366004613923565b600860209081525f928352604080842090915290825290205481565b61045c61074a3660046136a8565b6117da565b61045c61075d366004613680565b611a05565b61045c610770366004613954565b611b7b565b6103e9737f6f2a5dda81783b936de8c33498c44d160b350381565b61034761079e366004613923565b600a60209081525f928352604080842090915290825290205460ff1681565b61045c6107cb3660046135d3565b611b8f565b6106616107de366004613999565b611bf4565b61045c6107f136600461383f565b611cbe565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167fcaf91ff500000000000000000000000000000000000000000000000000000000148061088857507fffffffff0000000000000000000000000000000000000000000000000000000082167f01ffc9a700000000000000000000000000000000000000000000000000000000145b92915050565b6003805461089b906139b9565b80601f01602080910402602001604051908101604052809291908181526020018280546108c7906139b9565b80156109125780601f106108e957610100808354040283529160200191610912565b820191905f5260205f20905b8154815290600101906020018083116108f557829003601f168201915b505050505081565b5f61092482611d51565b15610938576109338383611a05565b610949565b6109428383610bea565b9050610888565b50600192915050565b5f6109e16001547ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff067ffffffffffffffff8083166010908102680100000000000000008504831682037801000000000000000000000000000000000000000000000000860484160170010000000000000000000000000000000090950483169091029390930192909203011690565b905090565b5f73ffffffffffffffffffffffffffffffffffffffff8216158061088857505073ffffffffffffffffffffffffffffffffffffffff165f908152600d602052604090205460ff1690565b610a38611da3565b6040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83811660048301526024820183905284169063a9059cbb906044016020604051808303815f875af1158015610aaa573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610ace9190613a0a565b50505050565b5f610ade82611d51565b15610af357610aee8484846117da565b610b05565b610afe848484611699565b9050610b09565b5060015b9392505050565b610b18611da3565b600f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b5f7f00000000000000000000000000000000000000000000000000000000000000014614610b75576109e1611df5565b507fa31f9e3b5ab45ef2cf728996e353be5534d5c62e500da5f540ec5e92fe8e267990565b610ba2611da3565b610bc9610bc35f5473ffffffffffffffffffffffffffffffffffffffff1690565b47611e8e565b565b610be583838360405180602001604052805f815250611057565b505050565b5f73ffffffffffffffffffffffffffffffffffffffff8316610c38576040517f5461585f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b335f81815260086020908152604080832073ffffffffffffffffffffffffffffffffffffffff881680855290835292819020869055518581529192917f1f01303a1ce9329d9963e1937c201e23c5543a9e3536e9edead087aec7dc6d83910160405180910390a360405182815273ffffffffffffffffffffffffffffffffffffffff84169033907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259060200160405180910390a350600192915050565b5f818152600b602052604090205473ffffffffffffffffffffffffffffffffffffffff16610d2282611d51565b610d58576040517f3f6cc76800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8116610da5576040517fc5723b5100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b919050565b610db2611da3565b610bc95f611ea7565b610dc53382611f1b565b50565b6004805461089b906139b9565b73ffffffffffffffffffffffffffffffffffffffff8216610e22576040517fccea9e6f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b335f818152600a6020908152604080832073ffffffffffffffffffffffffffffffffffffffff87168085529083529281902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b5f73ffffffffffffffffffffffffffffffffffffffff8316610f06576040517f9c8d2cd200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610b09338484611fda565b73ffffffffffffffffffffffffffffffffffffffff81165f908152600c60205260408120546060919067ffffffffffffffff811115610f5257610f52613781565b604051908082528060200260200182016040528015610f7b578160200160208202803683370190505b5090505f5b73ffffffffffffffffffffffffffffffffffffffff84165f908152600c60205260409020548110156110505773ffffffffffffffffffffffffffffffffffffffff84165f908152600c60205260409020805482908110610fe257610fe2613a25565b5f918252602090912060108204015461102b91600f166002026101000a900461ffff167f8000000000000000000000000000000000000000000000000000000000000000613a7f565b82828151811061103d5761103d613a25565b6020908102919091010152600101610f80565b5092915050565b61106082611d51565b611096576040517f3f6cc76800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6110a1848484610ad4565b5073ffffffffffffffffffffffffffffffffffffffff83163b1580159061118257506040517f150b7a02000000000000000000000000000000000000000000000000000000008082529073ffffffffffffffffffffffffffffffffffffffff85169063150b7a029061111d903390899088908890600401613a92565b6020604051808303815f875af1158015611139573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061115d9190613ada565b7fffffffff000000000000000000000000000000000000000000000000000000001614155b15610ace576040517f3da6393100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6111c1611da3565b6111cb8282611f1b565b5050565b5f818152600b602052604090205460609073ffffffffffffffffffffffffffffffffffffffff1661122c576040517fab9713c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f80000000000000000000000000000000000000000000000000000000000000008211156112815761127e7f800000000000000000000000000000000000000000000000000000000000000083613af5565b91505b5f61128b836123db565b90505f6010805461129b906139b9565b905011156112ce576010816040516020016112b7929190613b95565b604051602081830303815290604052915050919050565b806040516020016112b79190613bb9565b42841015611319576040517f05787bdf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61132285611d51565b15611359576040517f1f3e0de800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff86166113a6576040517f5461585f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f60016113b1610b45565b73ffffffffffffffffffffffffffffffffffffffff8a81165f818152600e602090815260409182902080546001810190915582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98184015280840194909452938d166060840152608083018c905260a083019390935260c08083018b90528151808403909101815260e0830190915280519201919091207f190100000000000000000000000000000000000000000000000000000000000061010083015261010282019290925261012281019190915261014201604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815282825280516020918201205f84529083018083525260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa1580156114ff573d5f803e3d5ffd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff8116158061157957508773ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b156115b0576040517f815e1d6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff9081165f9081526008602090815260408083208a8516808552908352928190208990555188815291928a16917f1f01303a1ce9329d9963e1937c201e23c5543a9e3536e9edead087aec7dc6d83910160405180910390a38573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258760405161167b91815260200190565b60405180910390a350505050505050565b6010805461089b906139b9565b5f73ffffffffffffffffffffffffffffffffffffffff84166116e7576040517fddb5de5e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8316611734576040517f9c8d2cd200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff84165f9081526008602090815260408083203384529091529020547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146117c6576117958382613af5565b73ffffffffffffffffffffffffffffffffffffffff86165f9081526008602090815260408083203384529091529020555b6117d1858585611fda565b95945050505050565b73ffffffffffffffffffffffffffffffffffffffff8316611827576040517fddb5de5e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8216611874576040517f9c8d2cd200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f818152600b602052604090205473ffffffffffffffffffffffffffffffffffffffff8481169116146118d3576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff841614801590611929575073ffffffffffffffffffffffffffffffffffffffff83165f908152600a6020908152604080832033845290915290205460ff16155b801561195857505f8181526009602052604090205473ffffffffffffffffffffffffffffffffffffffff163314155b1561198f576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611998826109e6565b156119cf576040517f5ce7539700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6119fa83837f0000000000000000000000000000000000000000000000000de0b6b3a7640000612497565b610be5838383612528565b5f818152600b602052604090205473ffffffffffffffffffffffffffffffffffffffff16338114801590611a69575073ffffffffffffffffffffffffffffffffffffffff81165f908152600a6020908152604080832033845290915290205460ff16155b15611aa0576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f8281526009602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff87811691821790925591518593918516917f797365dabb18fa726ccbccbe18c6f24c34e3b0653f2e99ea873bd7b84763dde691a4818373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a4505050565b611b83611da3565b60106111cb8282613d53565b611b97611da3565b73ffffffffffffffffffffffffffffffffffffffff8116611beb576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f60048201526024015b60405180910390fd5b610dc581611ea7565b60605f8267ffffffffffffffff811115611c1057611c10613781565b604051908082528060200260200182016040528015611c39578160200160208202803683370190505b509050835b611c488486613a7f565b811015611cb657611c5a6001826125b9565b611c889061ffff167f8000000000000000000000000000000000000000000000000000000000000000613a7f565b82611c938784613af5565b81518110611ca357611ca3613a25565b6020908102919091010152600101611c3e565b509392505050565b611cc6611da3565b6040517fb88d4fde00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85169063b88d4fde90611d1e903090879087908790600401613a92565b5f604051808303815f87803b158015611d35575f80fd5b505af1158015611d47573d5f803e3d5ffd5b5050505050505050565b5f7f8000000000000000000000000000000000000000000000000000000000000000821180156108885750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff141590565b5f5473ffffffffffffffffffffffffffffffffffffffff163314610bc9576040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152602401611be2565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6003604051611e269190613e6f565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f385f3884865af16111cb5763b12d13eb5f526004601cfd5b5f805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b73ffffffffffffffffffffffffffffffffffffffff8216611f68576040517fa41e3d3f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8015611f7c57611f7782612711565b611f85565b611f8582612796565b73ffffffffffffffffffffffffffffffffffffffff919091165f908152600d6020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055565b73ffffffffffffffffffffffffffffffffffffffff8381165f90815260076020526040808220549285168252812054909190612017868686612497565b5f612021876109e6565b90505f61202d876109e6565b90508180156120395750805b6123cd5781156120ec575f61206e7f0000000000000000000000000000000000000000000000000de0b6b3a764000085613ea7565b73ffffffffffffffffffffffffffffffffffffffff89165f908152600760205260409020546120be907f0000000000000000000000000000000000000000000000000de0b6b3a764000090613ea7565b6120c89190613af5565b90505f5b818110156120e5576120dd89612880565b6001016120cc565b50506123cd565b80156121935773ffffffffffffffffffffffffffffffffffffffff88165f90815260076020526040812054612142907f0000000000000000000000000000000000000000000000000de0b6b3a764000090613ea7565b61216c7f0000000000000000000000000000000000000000000000000de0b6b3a764000087613ea7565b6121769190613af5565b90505f5b818110156120e55761218b8a612a00565b60010161217a565b5f6121be7f0000000000000000000000000000000000000000000000000de0b6b3a764000088613ea7565b90505f5b818110156122965773ffffffffffffffffffffffffffffffffffffffff8a165f908152600c60205260408120546121fb90600190613af5565b73ffffffffffffffffffffffffffffffffffffffff8c165f908152600c60205260408120805492935090918390811061223657612236613a25565b5f918252602090912060108204015461227f91600f166002026101000a900461ffff167f8000000000000000000000000000000000000000000000000000000000000000613a7f565b905061228c8c8c83612528565b50506001016121c2565b50807f0000000000000000000000000000000000000000000000000de0b6b3a76400006122e48b73ffffffffffffffffffffffffffffffffffffffff165f9081526007602052604090205490565b6122ee9190613ea7565b6123187f0000000000000000000000000000000000000000000000000de0b6b3a764000088613ea7565b6123229190613af5565b11156123315761233189612a00565b8061235c7f0000000000000000000000000000000000000000000000000de0b6b3a764000086613ea7565b7f0000000000000000000000000000000000000000000000000de0b6b3a76400006123a88b73ffffffffffffffffffffffffffffffffffffffff165f9081526007602052604090205490565b6123b29190613ea7565b6123bc9190613af5565b11156123cb576123cb88612880565b505b506001979650505050505050565b60605f6123e783612af0565b60010190505f8167ffffffffffffffff81111561240657612406613781565b6040519080825280601f01601f191660200182016040528015612430576020820181803683370190505b5090508181016020015b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a850494508461243a57509392505050565b600f54839060ff1615155f0361251d5773ffffffffffffffffffffffffffffffffffffffff8116158015906124e657505f5473ffffffffffffffffffffffffffffffffffffffff828116911614155b1561251d576040517ffb2141b000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ace848484612bd1565b600f54839060ff1615155f036125ae5773ffffffffffffffffffffffffffffffffffffffff81161580159061257757505f5473ffffffffffffffffffffffffffffffffffffffff828116911614155b156125ae576040517ffb2141b000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ace848484612cf7565b5f61264783547ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff067ffffffffffffffff8083166010908102680100000000000000008504831682037801000000000000000000000000000000000000000000000000860484160170010000000000000000000000000000000090950483169091029390930192909203011690565b612652906010613edf565b821061268a576040517f580821e700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610b09600184015f6010850460108087895467ffffffffffffffff680100000000000000009091048116929091069190910116816126ca576126ca613e7a565b885491900467ffffffffffffffff808316919091019290920182168352602083019390935260409091015f2054916010916801000000000000000090910416850106613089565b73ffffffffffffffffffffffffffffffffffffffff81165f908152600c6020526040812054905b818110156127515761274983612a00565b600101612738565b5060405173ffffffffffffffffffffffffffffffffffffffff8316907fc0cf7c2a53728ef310d1a316f083ece390e93768abd482e026306f6465814f2c905f90a25050565b73ffffffffffffffffffffffffffffffffffffffff81165f908152600760205260408120546127e6907f0000000000000000000000000000000000000000000000000de0b6b3a764000090613ea7565b90505f6128148373ffffffffffffffffffffffffffffffffffffffff165f908152600c602052604090205490565b90505f5b6128228284613af5565b81101561283a5761283284612880565b600101612818565b5060405173ffffffffffffffffffffffffffffffffffffffff8416907f97947ff5fb57402c17be9c0e96ca79467cc4622a44cbaf7203b916ec1f1c6bf2905f90a2505050565b73ffffffffffffffffffffffffffffffffffffffff81166128cd576040517f9c8d2cd200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f6128d860016130b4565b61291b576128e6600161311e565b6129149061ffff167f8000000000000000000000000000000000000000000000000000000000000000613a7f565b9050612999565b60065f815461292990613ef6565b90915550600654600101612969576040517f303b682f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600654612996907f8000000000000000000000000000000000000000000000000000000000000000613a7f565b90505b5f818152600b602052604090205473ffffffffffffffffffffffffffffffffffffffff1680156129f5576040517f23369fa600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610be5818484612528565b73ffffffffffffffffffffffffffffffffffffffff8116612a4d576040517fddb5de5e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff81165f908152600c602052604081208054612a7f90600190613af5565b81548110612a8f57612a8f613a25565b5f9182526020909120601082040154612ad891600f166002026101000a900461ffff167f8000000000000000000000000000000000000000000000000000000000000000613a7f565b9050612ae5825f83612528565b6111cb6001826132e1565b5f807a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310612b38577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef81000000008310612b64576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310612b8257662386f26fc10000830492506010015b6305f5e1008310612b9a576305f5e100830492506008015b6127108310612bae57612710830492506004015b60648310612bc0576064830492506002015b600a83106108885760010192915050565b73ffffffffffffffffffffffffffffffffffffffff8316612c08578060055f828254612bfd9190613a7f565b90915550612c429050565b73ffffffffffffffffffffffffffffffffffffffff83165f9081526007602052604081208054839290612c3c908490613af5565b90915550505b73ffffffffffffffffffffffffffffffffffffffff8083165f818152600760205260408082208054860190555184938716917fe59fdd36d0d223c0c7d996db7ad796880f45e1936cb0bb7ac102e7082e03148791a4808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b73ffffffffffffffffffffffffffffffffffffffff831615612edc575f81815260096020908152604080832080547fffffffffffffffffffffffff000000000000000000000000000000000000000016905573ffffffffffffffffffffffffffffffffffffffff86168352600c90915281208054612d7790600190613af5565b81548110612d8757612d87613a25565b5f9182526020909120601082040154612dd091600f166002026101000a900461ffff167f8000000000000000000000000000000000000000000000000000000000000000613a7f565b9050818114612e5e575f828152600b602052604081205460a01c73ffffffffffffffffffffffffffffffffffffffff86165f908152600c602052604090208054919250839183908110612e2557612e25613a25565b905f5260205f2090601091828204019190066002026101000a81548161ffff021916908361ffff160217905550612e5c8282613463565b505b73ffffffffffffffffffffffffffffffffffffffff84165f908152600c60205260409020805480612e9157612e91613f2d565b5f8281526020902060107fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90920191820401805461ffff6002600f8516026101000a02191690559055505b73ffffffffffffffffffffffffffffffffffffffff821615612fbf575f818152600b6020526040902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff841601905573ffffffffffffffffffffffffffffffffffffffff82165f818152600c60209081526040822080546001808201835582855292842060108204018054600f9092166002026101000a61ffff8181021990931692881602919091179055929091529054612fba918391612fb59190613af5565b613463565b612fce565b5f818152600b60205260408120555b808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fe5f815dc84b8cecdfd4beedfc3f91ab5be7af100eca4e8fb11552b867995394f60405160405180910390a4808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b5f613095826010613f5a565b67ffffffffffffffff166130a88361350b565b8416901c905092915050565b80545f907801000000000000000000000000000000000000000000000000810467ffffffffffffffff90811668010000000000000000909204161480156108885750505467ffffffffffffffff808216700100000000000000000000000000000000909204161490565b80545f9067ffffffffffffffff70010000000000000000000000000000000082048116917801000000000000000000000000000000000000000000000000810482169116821480156131895750835467ffffffffffffffff8281166801000000000000000090920416145b156131c0576040517f75e52f4f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8067ffffffffffffffff165f036131fb57507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01600f61321e565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff015b67ffffffffffffffff82165f9081526001850160205260409020546132438183613089565b935061325081835f61352d565b67ffffffffffffffff9384165f81815260018801602052604090209190915585546fffffffffffffffffffffffffffffffff1670010000000000000000000000000000000090910277ffffffffffffffffffffffffffffffffffffffffffffffff16177801000000000000000000000000000000000000000000000000929093169190910291909117909255919050565b815467ffffffffffffffff80821691680100000000000000009004165f81900361332f57507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01600f613352565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff015b835467ffffffffffffffff838116700100000000000000000000000000000000909204161480156133ac5750835467ffffffffffffffff828116780100000000000000000000000000000000000000000000000090920416145b156133e3576040517f8acb5f2700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff82165f90815260018501602052604090205461340990828561352d565b67ffffffffffffffff9283165f81815260018701602052604090209190915584547fffffffffffffffffffffffffffffffff0000000000000000000000000000000016176801000000000000000091909216021790915550565b5f828152600b60205260409020546bffffffffffffffffffffffff8211156134b7576040517ffcb3438c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f928352600b602052604090922073ffffffffffffffffffffffffffffffffffffffff9290921660a09190911b7fffffffffffffffffffffffff000000000000000000000000000000000000000016019055565b5f613517826010613f5a565b67ffffffffffffffff1661ffff901b9050919050565b5f613539836010613f5a565b67ffffffffffffffff168261ffff16901b6135538461350b565b1985166135609190613a7f565b949350505050565b7fffffffff0000000000000000000000000000000000000000000000000000000081168114610dc5575f80fd5b5f602082840312156135a5575f80fd5b8135610b0981613568565b803573ffffffffffffffffffffffffffffffffffffffff81168114610da5575f80fd5b5f602082840312156135e3575f80fd5b610b09826135b0565b5f5b838110156136065781810151838201526020016135ee565b50505f910152565b5f81518084526136258160208601602086016135ec565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081525f610b09602083018461360e565b5f60208284031215613679575f80fd5b5035919050565b5f8060408385031215613691575f80fd5b61369a836135b0565b946020939093013593505050565b5f805f606084860312156136ba575f80fd5b6136c3846135b0565b92506136d1602085016135b0565b9150604084013590509250925092565b8015158114610dc5575f80fd5b5f602082840312156136fe575f80fd5b8135610b09816136e1565b5f806040838503121561371a575f80fd5b613723836135b0565b91506020830135613733816136e1565b809150509250929050565b602080825282518282018190525f9190848201906040850190845b8181101561377557835183529284019291840191600101613759565b50909695505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f67ffffffffffffffff808411156137c8576137c8613781565b604051601f85017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190828211818310171561380e5761380e613781565b81604052809350858152868686011115613826575f80fd5b858560208301375f602087830101525050509392505050565b5f805f8060808587031215613852575f80fd5b61385b856135b0565b9350613869602086016135b0565b925060408501359150606085013567ffffffffffffffff81111561388b575f80fd5b8501601f8101871361389b575f80fd5b6138aa878235602084016137ae565b91505092959194509250565b5f805f805f805f60e0888a0312156138cc575f80fd5b6138d5886135b0565b96506138e3602089016135b0565b95506040880135945060608801359350608088013560ff81168114613906575f80fd5b9699959850939692959460a0840135945060c09093013592915050565b5f8060408385031215613934575f80fd5b61393d836135b0565b915061394b602084016135b0565b90509250929050565b5f60208284031215613964575f80fd5b813567ffffffffffffffff81111561397a575f80fd5b8201601f8101841361398a575f80fd5b613560848235602084016137ae565b5f80604083850312156139aa575f80fd5b50508035926020909101359150565b600181811c908216806139cd57607f821691505b602082108103613a04577f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b50919050565b5f60208284031215613a1a575f80fd5b8151610b09816136e1565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b8082018082111561088857610888613a52565b5f73ffffffffffffffffffffffffffffffffffffffff808716835280861660208401525083604083015260806060830152613ad0608083018461360e565b9695505050505050565b5f60208284031215613aea575f80fd5b8151610b0981613568565b8181038181111561088857610888613a52565b5f8154613b14816139b9565b60018281168015613b2c5760018114613b5f57613b8b565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0084168752821515830287019450613b8b565b855f526020805f205f5b85811015613b825781548a820152908401908201613b69565b50505082870194505b5050505092915050565b5f613ba08285613b08565b8351613bb08183602088016135ec565b01949350505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b757466382c000000000081527f7b226e616d65223a2022446156696e6369202300000000000000000000000000601b8201525f8251613c1681602e8501602087016135ec565b7f222c000000000000000000000000000000000000000000000000000000000000602e9390910192830152507f226465736372697074696f6e223a20224120636f6c6c656374696f6e206f662060308201527f382c38383820656e61626c6564206279204552433430342c20616e206578706560508201527f72696d656e74616c20746f6b656e207374616e646172642e222c00000000000060708201527f22696d616765223a202268747470733a2f2f646176696e63692e7774662f6e66608a8201527f742f756e72657665616c65642e77656270227d0000000000000000000000000060aa82015260bd01919050565b601f821115610be557805f5260205f20601f840160051c81016020851015613d2d5750805b601f840160051c820191505b81811015613d4c575f8155600101613d39565b5050505050565b815167ffffffffffffffff811115613d6d57613d6d613781565b613d8181613d7b84546139b9565b84613d08565b602080601f831160018114613dd3575f8415613d9d5750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555613e67565b5f858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b82811015613e1f57888601518255948401946001909101908401613e00565b5085821015613e5b57878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b505060018460011b0185555b505050505050565b5f610b098284613b08565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f82613eda577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b500490565b808202811582820484141761088857610888613a52565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203613f2657613f26613a52565b5060010190565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603160045260245ffd5b67ffffffffffffffff818116838216028082169190828114613f7e57613f7e613a52565b50509291505056fea2646970667358221220a6537c9d95332c59d253ac84787deaca1f96d167406b32db7031f191748fbda764736f6c63430008180033
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.