ETH Price: $3,503.45 (+4.36%)
Gas: 4 Gwei

Token

Drools & Pixels (DROOLS)
 

Overview

Max Total Supply

223 DROOLS

Holders

142

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Balance
1 DROOLS
0x0c7631385e22d78a04f0f6de877c23cf8a02cd2b
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.

Contract Source Code Verified (Exact Match)

Contract Name:
DroolAndPixels

Compiler Version
v0.8.6+commit.11564f7e

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion
File 1 of 16 : DroolsAndPixels.sol
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;

/*******************************
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 * ░░░░░██░░░░░░░░░░░░░░░░░░░░ *
 * ░░░░░░░████░░░░██░░░░░░░░░░ *
 * ░░░░░░░░░░░░░░░░░████░░░░░░ *
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 * ░░░░░░░░░░░░░░░████░░░░░░░░ *
 * ░░░░░░░░░░░░░░░░░██░░░░░░░░ *
 * ░░░░░░░░░░░░░░░░░██░░░░░░░░ *
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 ******************************/

import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import {Strings} from "@openzeppelin/contracts/utils/Strings.sol";
import {NFTDescriptor} from "./NFTDescriptor.sol";
import {IDroolsAndPixels} from "./interfaces/IDroolsAndPixels.sol";

contract DroolAndPixels is IDroolsAndPixels, ERC721, Ownable {
  using Strings for uint256;
  using SafeMath for uint256;

  mapping(uint256 => string[]) public override palettes;
  mapping(uint256 => bytes) public override seeds;
  mapping(uint256 => string) public override names;
  mapping(uint256 => uint8) public override backgroundIndex;
  mapping(uint256 => uint16[]) public override animatedPixels;
  string[] public override backgrounds;
  uint256 private _totalSupply;

  constructor(string memory name, string memory symbol) ERC721(name, symbol) {}

  /**
   * @dev See {IERC165-supportsInterface}.
   */
  function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, IERC165) returns (bool) {
    return super.supportsInterface(interfaceId);
  }

  function _addColorToPalette(uint256 _paletteIndex, string calldata _color) internal {
    palettes[_paletteIndex].push(_color);
  }

  function addManyBackgrounds(string[] calldata _backgrounds) external override onlyOwner {
    for (uint256 i = 0; i < _backgrounds.length; i++) {
      _addBackground(_backgrounds[i]);
    }
  }

  function _addBackground(string calldata _background) internal {
    backgrounds.push(_background);
  }

  function mintDrool(
    uint256 tokenId,
    string calldata name,
    bytes memory seed,
    uint8 bgColorIndex,
    string[] calldata colors,
    uint16[] calldata animatedPixel,
    address toAddress
  ) public override onlyOwner {
    require(palettes[tokenId].length + colors.length <= 256, "Palettes can only hold 256 colors");
    for (uint256 i = 0; i < colors.length; i++) {
      _addColorToPalette(tokenId, colors[i]);
    }
    names[tokenId] = name;
    seeds[tokenId] = seed;
    animatedPixels[tokenId] = animatedPixel;
    backgroundIndex[tokenId] = bgColorIndex;
    _totalSupply++;
    _safeMint(toAddress, tokenId);
    emit DroolMinted(tokenId, name, seed, bgColorIndex, colors, animatedPixel, toAddress);
  }

  function totalSupply() public view returns (uint256) {
    return _totalSupply;
  }

  function tokenURI(uint256 tokenId) public view override(ERC721, IDroolsAndPixels) returns (string memory) {
    require(_exists(tokenId), "NounsToken: URI query for nonexistent token");
    return dataURI(tokenId);
  }

  /**
   * @notice Given a token ID and seed, construct a base64 encoded data URI for an official Nouns DAO noun.
   */
  function dataURI(uint256 tokenId) public view override returns (string memory) {
    string memory droolId = tokenId.toString();
    string memory name = string(abi.encodePacked("Drool ", names[tokenId], " #", droolId));
    string memory description = string(abi.encodePacked("Drools & Pixels #", droolId));
    return genericDataURI(name, description, tokenId);
  }

  /**
   * @notice Given a name, description, and seed, construct a base64 encoded data URI.
   */
  function genericDataURI(
    string memory name,
    string memory description,
    uint256 tokenId
  ) public view returns (string memory) {
    NFTDescriptor.TokenURIParams memory params = NFTDescriptor.TokenURIParams({
      name: name,
      description: description,
      parts: seeds[tokenId],
      background: backgrounds[backgroundIndex[tokenId]],
      animatedPixels: animatedPixels[tokenId]
    });
    return NFTDescriptor.constructTokenURI(params, palettes[tokenId]);
  }
}

File 2 of 16 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    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 substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    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.
     *
     * _Available since v3.4._
     */
    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.
     *
     * _Available since v3.4._
     */
    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.
     *
     * _Available since v3.4._
     */
    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 addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        return a + b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        return a * b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b <= a, errorMessage);
            return a - b;
        }
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a / b;
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

File 3 of 16 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../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.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _setOwner(_msgSender());
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _setOwner(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _setOwner(newOwner);
    }

    function _setOwner(address newOwner) private {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 4 of 16 : ERC721.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC721.sol";
import "./IERC721Receiver.sol";
import "./extensions/IERC721Metadata.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/Strings.sol";
import "../../utils/introspection/ERC165.sol";

/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata extension, but not including the Enumerable extension, which is available separately as
 * {ERC721Enumerable}.
 */
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
    using Address for address;
    using Strings for uint256;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    // Mapping from token ID to owner address
    mapping(uint256 => address) private _owners;

    // Mapping owner address to token count
    mapping(address => uint256) private _balances;

    // Mapping from token ID to approved address
    mapping(uint256 => address) private _tokenApprovals;

    // Mapping from owner to operator approvals
    mapping(address => mapping(address => bool)) private _operatorApprovals;

    /**
     * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
        return
            interfaceId == type(IERC721).interfaceId ||
            interfaceId == type(IERC721Metadata).interfaceId ||
            super.supportsInterface(interfaceId);
    }

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner) public view virtual override returns (uint256) {
        require(owner != address(0), "ERC721: balance query for the zero address");
        return _balances[owner];
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view virtual override returns (address) {
        address owner = _owners[tokenId];
        require(owner != address(0), "ERC721: owner query for nonexistent token");
        return owner;
    }

    /**
     * @dev See {IERC721Metadata-name}.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev See {IERC721Metadata-symbol}.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");

        string memory baseURI = _baseURI();
        return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : "";
    }

    /**
     * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
     * token will be the concatenation of the `baseURI` and the `tokenId`. Empty
     * by default, can be overriden in child contracts.
     */
    function _baseURI() internal view virtual returns (string memory) {
        return "";
    }

    /**
     * @dev See {IERC721-approve}.
     */
    function approve(address to, uint256 tokenId) public virtual override {
        address owner = ERC721.ownerOf(tokenId);
        require(to != owner, "ERC721: approval to current owner");

        require(
            _msgSender() == owner || isApprovedForAll(owner, _msgSender()),
            "ERC721: approve caller is not owner nor approved for all"
        );

        _approve(to, tokenId);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view virtual override returns (address) {
        require(_exists(tokenId), "ERC721: approved query for nonexistent token");

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        require(operator != _msgSender(), "ERC721: approve to caller");

        _operatorApprovals[_msgSender()][operator] = approved;
        emit ApprovalForAll(_msgSender(), operator, approved);
    }

    /**
     * @dev See {IERC721-isApprovedForAll}.
     */
    function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
        return _operatorApprovals[owner][operator];
    }

    /**
     * @dev See {IERC721-transferFrom}.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");

        _transfer(from, to, tokenId);
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        safeTransferFrom(from, to, tokenId, "");
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) public virtual override {
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
        _safeTransfer(from, to, tokenId, _data);
    }

    /**
     * @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.
     *
     * `_data` is additional data, it has no specified format and it is sent in call to `to`.
     *
     * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
     * implement alternative mechanisms to perform token transfer, such as signature-based.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeTransfer(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) internal virtual {
        _transfer(from, to, tokenId);
        require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
    }

    /**
     * @dev Returns whether `tokenId` exists.
     *
     * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
     *
     * Tokens start existing when they are minted (`_mint`),
     * and stop existing when they are burned (`_burn`).
     */
    function _exists(uint256 tokenId) internal view virtual returns (bool) {
        return _owners[tokenId] != address(0);
    }

    /**
     * @dev Returns whether `spender` is allowed to manage `tokenId`.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
        require(_exists(tokenId), "ERC721: operator query for nonexistent token");
        address owner = ERC721.ownerOf(tokenId);
        return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));
    }

    /**
     * @dev Safely mints `tokenId` and transfers it to `to`.
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeMint(address to, uint256 tokenId) internal virtual {
        _safeMint(to, tokenId, "");
    }

    /**
     * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
     * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
     */
    function _safeMint(
        address to,
        uint256 tokenId,
        bytes memory _data
    ) internal virtual {
        _mint(to, tokenId);
        require(
            _checkOnERC721Received(address(0), to, tokenId, _data),
            "ERC721: transfer to non ERC721Receiver implementer"
        );
    }

    /**
     * @dev Mints `tokenId` and transfers it to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - `to` cannot be the zero address.
     *
     * Emits a {Transfer} event.
     */
    function _mint(address to, uint256 tokenId) internal virtual {
        require(to != address(0), "ERC721: mint to the zero address");
        require(!_exists(tokenId), "ERC721: token already minted");

        _beforeTokenTransfer(address(0), to, tokenId);

        _balances[to] += 1;
        _owners[tokenId] = to;

        emit Transfer(address(0), to, tokenId);
    }

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId) internal virtual {
        address owner = ERC721.ownerOf(tokenId);

        _beforeTokenTransfer(owner, address(0), tokenId);

        // Clear approvals
        _approve(address(0), tokenId);

        _balances[owner] -= 1;
        delete _owners[tokenId];

        emit Transfer(owner, address(0), tokenId);
    }

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *  As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     *
     * Emits a {Transfer} event.
     */
    function _transfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {
        require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own");
        require(to != address(0), "ERC721: transfer to the zero address");

        _beforeTokenTransfer(from, to, tokenId);

        // Clear approvals from the previous owner
        _approve(address(0), tokenId);

        _balances[from] -= 1;
        _balances[to] += 1;
        _owners[tokenId] = to;

        emit Transfer(from, to, tokenId);
    }

    /**
     * @dev Approve `to` to operate on `tokenId`
     *
     * Emits a {Approval} event.
     */
    function _approve(address to, uint256 tokenId) internal virtual {
        _tokenApprovals[tokenId] = to;
        emit Approval(ERC721.ownerOf(tokenId), to, tokenId);
    }

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
     * The call is not executed if the target address is not a contract.
     *
     * @param from address representing the previous owner of the given token ID
     * @param to target address that will receive the tokens
     * @param tokenId uint256 ID of the token to be transferred
     * @param _data bytes optional data to send along with the call
     * @return bool whether the call correctly returned the expected magic value
     */
    function _checkOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) private returns (bool) {
        if (to.isContract()) {
            try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
                return retval == IERC721Receiver.onERC721Received.selector;
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    revert("ERC721: transfer to non ERC721Receiver implementer");
                } else {
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        } else {
            return true;
        }
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, ``from``'s `tokenId` will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {}
}

File 5 of 16 : Strings.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _HEX_SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }
}

File 6 of 16 : NFTDescriptor.sol
// SPDX-License-Identifier: GPL-3.0

/// @title A library used to construct ERC721 token URIs and SVG images

pragma solidity ^0.8.6;

import {Base64} from "./Base64.sol";
import {MultiPartRLEToSVG} from "./MultiPartRLEToSVG.sol";

library NFTDescriptor {
  struct TokenURIParams {
    string name;
    string description;
    bytes parts;
    string background;
    uint16[] animatedPixels;
  }

  /**
   * @notice Construct an ERC721 token URI.
   */
  function constructTokenURI(TokenURIParams memory params, string[] storage palette)
    public
    view
    returns (string memory)
  {
    string memory image = generateSVGImage(
      MultiPartRLEToSVG.SVGParams({
        parts: params.parts,
        background: params.background,
        animatedPixels: params.animatedPixels
      }),
      palette
    );

    // prettier-ignore
    return string(
            abi.encodePacked(
                'data:application/json;base64,',
                Base64.encode(
                    bytes(
                        abi.encodePacked('{"name":"', params.name, '", "description":"', params.description, '", "image": "', 'data:image/svg+xml;base64,', image, '"}')
                    )
                )
            )
        );
  }

  /**
   * @notice Generate an SVG image for use in the ERC721 token URI.
   */
  function generateSVGImage(MultiPartRLEToSVG.SVGParams memory params, string[] storage palette)
    public
    view
    returns (string memory svg)
  {
    return Base64.encode(bytes(MultiPartRLEToSVG.generateSVG(params, palette)));
  }
}

File 7 of 16 : IDroolsAndPixels.sol
// SPDX-License-Identifier: GPL-3.0

/// @title Interface for NounsToken

/*******************************
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 * ░░░░░██░░░░░░░░░░░░░░░░░░░░ *
 * ░░░░░░░████░░░░██░░░░░░░░░░ *
 * ░░░░░░░░░░░░░░░░░████░░░░░░ *
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 * ░░░░░░░░░░░░░░░████░░░░░░░░ *
 * ░░░░░░░░░░░░░░░░░██░░░░░░░░ *
 * ░░░░░░░░░░░░░░░░░██░░░░░░░░ *
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 ******************************/

pragma solidity ^0.8.6;

import {IERC721} from "@openzeppelin/contracts/token/ERC721/IERC721.sol";

interface IDroolsAndPixels is IERC721 {
  event DroolMinted(
    uint256 indexed tokenId,
    string name,
    bytes seed,
    uint8 bgColorIndex,
    string[] colors,
    uint16[] animatedPixel,
    address toAddress
  );

  function palettes(uint256 paletteIndex, uint256 colorIndex) external view returns (string memory);

  function backgrounds(uint256 index) external view returns (string memory);

  function seeds(uint256 index) external view returns (bytes memory);

  function names(uint256 index) external view returns (string memory);

  function backgroundIndex(uint256 index) external view returns (uint8);

  function animatedPixels(uint256 tokenId, uint256 index) external view returns (uint16);

  function addManyBackgrounds(string[] calldata _backgrounds) external;

  function mintDrool(
    uint256 tokenId,
    string calldata name,
    bytes memory seed,
    uint8 bgColorIndex,
    string[] calldata colors,
    uint16[] calldata animatedPixel,
    address toAddress
  ) external;

  function tokenURI(uint256 tokenId) external view returns (string memory);

  function dataURI(uint256 tokenId) external returns (string memory);
}

File 8 of 16 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

File 9 of 16 : IERC721.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../../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`, 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 be 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: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * 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 Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @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 caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool _approved) external;

    /**
     * @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);

    /**
     * @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;
}

File 10 of 16 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @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 `IERC721.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

File 11 of 16 : IERC721Metadata.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../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);
}

File 12 of 16 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 13 of 16 : ERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

File 14 of 16 : IERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @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);
}

File 15 of 16 : Base64.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

/// @title Base64
/// @author Brecht Devos - <[email protected]>
/// @notice Provides a function for encoding some bytes in base64
library Base64 {
  string internal constant TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";

  function encode(bytes memory data) internal pure returns (string memory) {
    if (data.length == 0) return "";

    // load the table into memory
    string memory table = TABLE;

    // multiply by 4/3 rounded up
    uint256 encodedLen = 4 * ((data.length + 2) / 3);

    // add some extra buffer at the end required for the writing
    string memory result = new string(encodedLen + 32);

    assembly {
      // set the actual output length
      mstore(result, encodedLen)

      // prepare the lookup table
      let tablePtr := add(table, 1)

      // input ptr
      let dataPtr := data
      let endPtr := add(dataPtr, mload(data))

      // result ptr, jump over length
      let resultPtr := add(result, 32)

      // run over the input, 3 bytes at a time
      for {

      } lt(dataPtr, endPtr) {

      } {
        dataPtr := add(dataPtr, 3)

        // read 3 bytes
        let input := mload(dataPtr)

        // write 4 characters
        mstore(resultPtr, shl(248, mload(add(tablePtr, and(shr(18, input), 0x3F)))))
        resultPtr := add(resultPtr, 1)
        mstore(resultPtr, shl(248, mload(add(tablePtr, and(shr(12, input), 0x3F)))))
        resultPtr := add(resultPtr, 1)
        mstore(resultPtr, shl(248, mload(add(tablePtr, and(shr(6, input), 0x3F)))))
        resultPtr := add(resultPtr, 1)
        mstore(resultPtr, shl(248, mload(add(tablePtr, and(input, 0x3F)))))
        resultPtr := add(resultPtr, 1)
      }

      // padding with '='
      switch mod(mload(data), 3)
      case 1 {
        mstore(sub(resultPtr, 2), shl(240, 0x3d3d))
      }
      case 2 {
        mstore(sub(resultPtr, 1), shl(248, 0x3d))
      }
    }

    return result;
  }
}

File 16 of 16 : MultiPartRLEToSVG.sol
// SPDX-License-Identifier: GPL-3.0

/// @title A library used to convert multi-part RLE compressed images to SVG

pragma solidity ^0.8.6;

import {Strings} from "@openzeppelin/contracts/utils/Strings.sol";

library MultiPartRLEToSVG {
  using Strings for uint256;
  struct SVGParams {
    bytes parts;
    string background;
    uint16[] animatedPixels;
  }

  struct ContentBounds {
    uint8 top;
    uint8 right;
    uint8 bottom;
    uint8 left;
  }

  struct Rect {
    uint8 length;
    uint8 colorIndex;
  }

  struct DecodedImage {
    ContentBounds bounds;
    uint256 width;
    Rect[] rects;
  }

  /**
   * @notice Given RLE image parts and color palettes, merge to generate a single SVG image.
   */
  function generateSVG(SVGParams memory params, string[] storage palette) internal view returns (string memory svg) {
    // prettier-ignore
    return
      string(
        abi.encodePacked(
          '<svg width="320" height="320" viewBox="0 0 320 320" xmlns="http://www.w3.org/2000/svg" shape-rendering="crispEdges">',
          '<rect width="100%" height="100%" fill="#',
          params.background,
          '" />',
          _generateSVGRects(params, palette),
          _generateUseHref(params),
          "</svg>"
        )
      );
  }

  function _generateUseHref(SVGParams memory params) private pure returns (string memory svg) {
    string memory chunk;
    for (uint256 i = 1; i <= params.animatedPixels.length; i++) {
      chunk = string(abi.encodePacked(chunk, '<use href="#animated', i.toString(), '"/>'));
    }
    return chunk;
  }

  /**
   * @notice Given RLE image parts and color palettes, generate SVG rects.
   */
  // prettier-ignore
  function _generateSVGRects(SVGParams memory params, string[] storage palette)
        private
        view
        returns (string memory svg)
    {
        string[33] memory lookup = [
            "0", "10", "20", "30", "40", "50", "60", "70", 
            "80", "90", "100", "110", "120", "130", "140", "150", 
            "160", "170", "180", "190", "200", "210", "220", "230", 
            "240", "250", "260", "270", "280", "290", "300", "310",
            "320" 
        ];
        string memory rects;
        DecodedImage memory image = _decodeRLEImage(params.parts);
        uint256 currentX = image.bounds.left;
        uint256 currentY = image.bounds.top;
        string[4] memory buffer;
        string memory part;
        uint8 blueCount;
        uint16[] memory animatedPixels = params.animatedPixels;

        for (uint256 i = 0; i < image.rects.length; i++) {
            Rect memory rect = image.rects[i];
            if (rect.colorIndex != 0) {
                buffer[0] = lookup[rect.length];      // width
                buffer[1] = lookup[currentX];         // x
                buffer[2] = lookup[currentY];         // y
                buffer[3] = palette[rect.colorIndex - 1]; // color

                bool isDroolRect = false;
                for (uint8 j = 0; j < animatedPixels.length; j++) {
                    if(i == animatedPixels[j]){
                        isDroolRect = true;
                        blueCount++;
                    }
                }  
                part = string(abi.encodePacked(part, _getChunk(buffer, isDroolRect, blueCount)));
            }

            currentX += rect.length;
            if (currentX - image.bounds.left == image.width) {
                currentX = image.bounds.left;
                currentY++;
            }
        }
        rects = string(abi.encodePacked(rects, part));
        return rects;
    }

  /**
   * @notice Return a string that consists of all rects in the provided `buffer`.
   */
  // prettier-ignore
  //TODO pure
  function _getChunk(string[4] memory buffer, bool isDroolRect, uint256 i) private pure returns (string memory) {
        if(isDroolRect){
            return string(
                abi.encodePacked(
                    '<rect id="animated', i.toString(), '" width="', buffer[0], '" height="10" x="', buffer[1], '" y="', buffer[2], '" fill="#', buffer[3], '"><animate calcMode="discrete" attributeName="height" values="10; 10; 10; 20; 30; 20; 10;"  dur="1.5s" repeatCount="indefinite" /></rect>'
                )
            );
        }else{
            return string(
                abi.encodePacked(
                    '<rect width="', buffer[0], '" height="10" x="', buffer[1], '" y="', buffer[2], '" fill="#', buffer[3], '" />'
                )
            );
        }         
    }

  /**
   * @notice Decode a single RLE compressed image into a `DecodedImage`.
   */
  function _decodeRLEImage(bytes memory image) private pure returns (DecodedImage memory) {
    ContentBounds memory bounds = ContentBounds({
      top: uint8(image[1]),
      right: uint8(image[2]),
      bottom: uint8(image[3]),
      left: uint8(image[4])
    });
    uint256 width = bounds.right - bounds.left;

    uint256 cursor;
    Rect[] memory rects = new Rect[]((image.length - 5) / 2);

    for (uint256 i = 5; i < image.length; i += 2) {
      rects[cursor] = Rect({length: uint8(image[i]), colorIndex: uint8(image[i + 1])});

      cursor++;
    }
    return DecodedImage({bounds: bounds, width: width, rects: rects});
  }
}

Settings
{
  "optimizer": {
    "enabled": false,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "metadata": {
    "useLiteralContent": true
  },
  "libraries": {
    "contracts/NFTDescriptor.sol": {
      "NFTDescriptor": "0x7b7ab682731c5a6ee63ecbcbb226e0b6b167556e"
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","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":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"string","name":"name","type":"string"},{"indexed":false,"internalType":"bytes","name":"seed","type":"bytes"},{"indexed":false,"internalType":"uint8","name":"bgColorIndex","type":"uint8"},{"indexed":false,"internalType":"string[]","name":"colors","type":"string[]"},{"indexed":false,"internalType":"uint16[]","name":"animatedPixel","type":"uint16[]"},{"indexed":false,"internalType":"address","name":"toAddress","type":"address"}],"name":"DroolMinted","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":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"string[]","name":"_backgrounds","type":"string[]"}],"name":"addManyBackgrounds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"animatedPixels","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"backgroundIndex","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"backgrounds","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"dataURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"description","type":"string"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"genericDataURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"name","type":"string"},{"internalType":"bytes","name":"seed","type":"bytes"},{"internalType":"uint8","name":"bgColorIndex","type":"uint8"},{"internalType":"string[]","name":"colors","type":"string[]"},{"internalType":"uint16[]","name":"animatedPixel","type":"uint16[]"},{"internalType":"address","name":"toAddress","type":"address"}],"name":"mintDrool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"names","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"palettes","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","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":"tokenId","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":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"seeds","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","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":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b5060405162004aac38038062004aac833981810160405281019062000037919062000291565b818181600090805190602001906200005192919062000163565b5080600190805190602001906200006a92919062000163565b5050506200008d620000816200009560201b60201c565b6200009d60201b60201c565b50506200049a565b600033905090565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b8280546200017190620003ab565b90600052602060002090601f016020900481019282620001955760008555620001e1565b82601f10620001b057805160ff1916838001178555620001e1565b82800160010185558215620001e1579182015b82811115620001e0578251825591602001919060010190620001c3565b5b509050620001f09190620001f4565b5090565b5b808211156200020f576000816000905550600101620001f5565b5090565b60006200022a62000224846200033f565b62000316565b9050828152602081018484840111156200024957620002486200047a565b5b6200025684828562000375565b509392505050565b600082601f83011262000276576200027562000475565b5b81516200028884826020860162000213565b91505092915050565b60008060408385031215620002ab57620002aa62000484565b5b600083015167ffffffffffffffff811115620002cc57620002cb6200047f565b5b620002da858286016200025e565b925050602083015167ffffffffffffffff811115620002fe57620002fd6200047f565b5b6200030c858286016200025e565b9150509250929050565b60006200032262000335565b9050620003308282620003e1565b919050565b6000604051905090565b600067ffffffffffffffff8211156200035d576200035c62000446565b5b620003688262000489565b9050602081019050919050565b60005b838110156200039557808201518184015260208101905062000378565b83811115620003a5576000848401525b50505050565b60006002820490506001821680620003c457607f821691505b60208210811415620003db57620003da62000417565b5b50919050565b620003ec8262000489565b810181811067ffffffffffffffff821117156200040e576200040d62000446565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b61460280620004aa6000396000f3fe608060405234801561001057600080fd5b50600436106101a95760003560e01c8063715018a6116100f9578063c446b4ec11610097578063e985e9c511610071578063e985e9c514610504578063f0503e8014610534578063f1dc193a14610564578063f2fde38b14610594576101a9565b8063c446b4ec14610488578063c87b56dd146104b8578063e4b4c8bd146104e8576101a9565b806395d89b41116100d357806395d89b4114610402578063a22cb46514610420578063a846c4421461043c578063b88d4fde1461046c576101a9565b8063715018a6146103be5780638da5cb5b146103c857806391b7916a146103e6576101a9565b806319586348116101665780634622ab03116101405780634622ab03146102fe5780635ac1e3bb1461032e5780636352211e1461035e57806370a082311461038e576101a9565b8063195863481461029657806323b872dd146102c657806342842e0e146102e2576101a9565b806301ffc9a7146101ae57806304bde4dd146101de57806306fdde031461020e578063081812fc1461022c578063095ea7b31461025c57806318160ddd14610278575b600080fd5b6101c860048036038101906101c39190612be4565b6105b0565b6040516101d59190613684565b60405180910390f35b6101f860048036038101906101f39190612d12565b6105c2565b6040516102059190613744565b60405180910390f35b61021661066e565b6040516102239190613744565b60405180910390f35b61024660048036038101906102419190612d12565b610700565b604051610253919061361d565b60405180910390f35b61027660048036038101906102719190612b57565b610785565b005b61028061089d565b60405161028d91906139d1565b60405180910390f35b6102b060048036038101906102ab9190612c87565b6108a7565b6040516102bd9190613744565b60405180910390f35b6102e060048036038101906102db9190612a41565b610b6b565b005b6102fc60048036038101906102f79190612a41565b610bcb565b005b61031860048036038101906103139190612d12565b610beb565b6040516103259190613744565b60405180910390f35b61034860048036038101906103439190612d12565b610c8b565b6040516103559190613744565b60405180910390f35b61037860048036038101906103739190612d12565b610d0b565b604051610385919061361d565b60405180910390f35b6103a860048036038101906103a391906129d4565b610dbd565b6040516103b591906139d1565b60405180910390f35b6103c6610e75565b005b6103d0610efd565b6040516103dd919061361d565b60405180910390f35b61040060048036038101906103fb9190612b97565b610f27565b005b61040a610ff6565b6040516104179190613744565b60405180910390f35b61043a60048036038101906104359190612b17565b611088565b005b61045660048036038101906104519190612e5e565b611209565b60405161046391906139b6565b60405180910390f35b61048660048036038101906104819190612a94565b611250565b005b6104a2600480360381019061049d9190612d12565b6112b2565b6040516104af91906139ec565b60405180910390f35b6104d260048036038101906104cd9190612d12565b6112d2565b6040516104df9190613744565b60405180910390f35b61050260048036038101906104fd9190612d3f565b61132c565b005b61051e60048036038101906105199190612a01565b611571565b60405161052b9190613684565b60405180910390f35b61054e60048036038101906105499190612d12565b611605565b60405161055b919061369f565b60405180910390f35b61057e60048036038101906105799190612e5e565b6116a5565b60405161058b9190613744565b60405180910390f35b6105ae60048036038101906105a991906129d4565b61175e565b005b60006105bb82611856565b9050919050565b600c81815481106105d257600080fd5b9060005260206000200160009150905080546105ed90613e0b565b80601f016020809104026020016040519081016040528092919081815260200182805461061990613e0b565b80156106665780601f1061063b57610100808354040283529160200191610666565b820191906000526020600020905b81548152906001019060200180831161064957829003601f168201915b505050505081565b60606000805461067d90613e0b565b80601f01602080910402602001604051908101604052809291908181526020018280546106a990613e0b565b80156106f65780601f106106cb576101008083540402835291602001916106f6565b820191906000526020600020905b8154815290600101906020018083116106d957829003601f168201915b5050505050905090565b600061070b82611938565b61074a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610741906138c6565b60405180910390fd5b6004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b600061079082610d0b565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610801576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107f890613946565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166108206119a4565b73ffffffffffffffffffffffffffffffffffffffff16148061084f575061084e816108496119a4565b611571565b5b61088e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161088590613826565b60405180910390fd5b61089883836119ac565b505050565b6000600d54905090565b606060006040518060a001604052808681526020018581526020016008600086815260200190815260200160002080546108e090613e0b565b80601f016020809104026020016040519081016040528092919081815260200182805461090c90613e0b565b80156109595780601f1061092e57610100808354040283529160200191610959565b820191906000526020600020905b81548152906001019060200180831161093c57829003601f168201915b50505050508152602001600c600a600087815260200190815260200160002060009054906101000a900460ff1660ff168154811061099a57610999613f75565b5b9060005260206000200180546109af90613e0b565b80601f01602080910402602001604051908101604052809291908181526020018280546109db90613e0b565b8015610a285780601f106109fd57610100808354040283529160200191610a28565b820191906000526020600020905b815481529060010190602001808311610a0b57829003601f168201915b50505050508152602001600b6000868152602001908152602001600020805480602002602001604051908101604052809291908181526020018280548015610ab757602002820191906000526020600020906000905b82829054906101000a900461ffff1661ffff1681526020019060020190602082600101049283019260010382029150808411610a7e5790505b50505050508152509050737b7ab682731c5a6ee63ecbcbb226e0b6b167556e636c2a0e3c82600760008781526020019081526020016000206040518363ffffffff1660e01b8152600401610b0c929190613986565b60006040518083038186803b158015610b2457600080fd5b505af4158015610b38573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250810190610b619190612c3e565b9150509392505050565b610b7c610b766119a4565b82611a65565b610bbb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bb290613966565b60405180910390fd5b610bc6838383611b43565b505050565b610be683838360405180602001604052806000815250611250565b505050565b60096020528060005260406000206000915090508054610c0a90613e0b565b80601f0160208091040260200160405190810160405280929190818152602001828054610c3690613e0b565b8015610c835780601f10610c5857610100808354040283529160200191610c83565b820191906000526020600020905b815481529060010190602001808311610c6657829003601f168201915b505050505081565b60606000610c9883611d9f565b905060006009600085815260200190815260200160002082604051602001610cc19291906135c1565b6040516020818303038152906040529050600082604051602001610ce591906135fb565b6040516020818303038152906040529050610d018282876108a7565b9350505050919050565b6000806002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610db4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dab90613866565b60405180910390fd5b80915050919050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610e2e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e2590613846565b60405180910390fd5b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610e7d6119a4565b73ffffffffffffffffffffffffffffffffffffffff16610e9b610efd565b73ffffffffffffffffffffffffffffffffffffffff1614610ef1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ee8906138e6565b60405180910390fd5b610efb6000611f00565b565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610f2f6119a4565b73ffffffffffffffffffffffffffffffffffffffff16610f4d610efd565b73ffffffffffffffffffffffffffffffffffffffff1614610fa3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f9a906138e6565b60405180910390fd5b60005b82829050811015610ff157610fde838383818110610fc757610fc6613f75565b5b9050602002810190610fd99190613a07565b611fc6565b8080610fe990613e6e565b915050610fa6565b505050565b60606001805461100590613e0b565b80601f016020809104026020016040519081016040528092919081815260200182805461103190613e0b565b801561107e5780601f106110535761010080835404028352916020019161107e565b820191906000526020600020905b81548152906001019060200180831161106157829003601f168201915b5050505050905090565b6110906119a4565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156110fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110f5906137e6565b60405180910390fd5b806005600061110b6119a4565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff166111b86119a4565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516111fd9190613684565b60405180910390a35050565b600b602052816000526040600020818154811061122557600080fd5b9060005260206000209060109182820401919006600202915091509054906101000a900461ffff1681565b61126161125b6119a4565b83611a65565b6112a0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161129790613966565b60405180910390fd5b6112ac84848484612008565b50505050565b600a6020528060005260406000206000915054906101000a900460ff1681565b60606112dd82611938565b61131c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161131390613886565b60405180910390fd5b61132582610c8b565b9050919050565b6113346119a4565b73ffffffffffffffffffffffffffffffffffffffff16611352610efd565b73ffffffffffffffffffffffffffffffffffffffff16146113a8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161139f906138e6565b60405180910390fd5b61010085859050600760008d8152602001908152602001600020805490506113d09190613c7f565b1115611411576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161140890613926565b60405180910390fd5b60005b858590508110156114605761144d8b87878481811061143657611435613f75565b5b90506020028101906114489190613a07565b612064565b808061145890613e6e565b915050611414565b508888600960008d81526020019081526020016000209190611483929190612518565b5086600860008c815260200190815260200160002090805190602001906114ab92919061259e565b508282600b60008d815260200190815260200160002091906114ce929190612624565b5085600a60008c815260200190815260200160002060006101000a81548160ff021916908360ff160217905550600d600081548092919061150e90613e6e565b919050555061151d818b6120b8565b897f09e653fedc59c2543c2b5d9335ba7d232290592f595935f7cc3d505a88e98ee18a8a8a8a8a8a8a8a8a60405161155d999897969594939291906136c1565b60405180910390a250505050505050505050565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b6008602052806000526040600020600091509050805461162490613e0b565b80601f016020809104026020016040519081016040528092919081815260200182805461165090613e0b565b801561169d5780601f106116725761010080835404028352916020019161169d565b820191906000526020600020905b81548152906001019060200180831161168057829003601f168201915b505050505081565b600760205281600052604060002081815481106116c157600080fd5b906000526020600020016000915091505080546116dd90613e0b565b80601f016020809104026020016040519081016040528092919081815260200182805461170990613e0b565b80156117565780601f1061172b57610100808354040283529160200191611756565b820191906000526020600020905b81548152906001019060200180831161173957829003601f168201915b505050505081565b6117666119a4565b73ffffffffffffffffffffffffffffffffffffffff16611784610efd565b73ffffffffffffffffffffffffffffffffffffffff16146117da576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117d1906138e6565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561184a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161184190613786565b60405180910390fd5b61185381611f00565b50565b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061192157507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806119315750611930826120d6565b5b9050919050565b60008073ffffffffffffffffffffffffffffffffffffffff166002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b600033905090565b816004600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16611a1f83610d0b565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000611a7082611938565b611aaf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611aa690613806565b60405180910390fd5b6000611aba83610d0b565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480611b2957508373ffffffffffffffffffffffffffffffffffffffff16611b1184610700565b73ffffffffffffffffffffffffffffffffffffffff16145b80611b3a5750611b398185611571565b5b91505092915050565b8273ffffffffffffffffffffffffffffffffffffffff16611b6382610d0b565b73ffffffffffffffffffffffffffffffffffffffff1614611bb9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bb090613906565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611c29576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c20906137c6565b60405180910390fd5b611c34838383612140565b611c3f6000826119ac565b6001600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611c8f9190613d06565b925050819055506001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611ce69190613c7f565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b60606000821415611de7576040518060400160405280600181526020017f30000000000000000000000000000000000000000000000000000000000000008152509050611efb565b600082905060005b60008214611e19578080611e0290613e6e565b915050600a82611e129190613cd5565b9150611def565b60008167ffffffffffffffff811115611e3557611e34613fa4565b5b6040519080825280601f01601f191660200182016040528015611e675781602001600182028036833780820191505090505b5090505b60008514611ef457600182611e809190613d06565b9150600a85611e8f9190613eb7565b6030611e9b9190613c7f565b60f81b818381518110611eb157611eb0613f75565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a85611eed9190613cd5565b9450611e6b565b8093505050505b919050565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600c828290918060018154018082558091505060019003906000526020600020016000909192909192909192909192509190612003929190612518565b505050565b612013848484611b43565b61201f84848484612145565b61205e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161205590613766565b60405180910390fd5b50505050565b600760008481526020019081526020016000208282909180600181540180825580915050600190039060005260206000200160009091929091929091929091925091906120b2929190612518565b50505050565b6120d28282604051806020016040528060008152506122dc565b5050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b505050565b60006121668473ffffffffffffffffffffffffffffffffffffffff16612337565b156122cf578373ffffffffffffffffffffffffffffffffffffffff1663150b7a0261218f6119a4565b8786866040518563ffffffff1660e01b81526004016121b19493929190613638565b602060405180830381600087803b1580156121cb57600080fd5b505af19250505080156121fc57506040513d601f19601f820116820180604052508101906121f99190612c11565b60015b61227f573d806000811461222c576040519150601f19603f3d011682016040523d82523d6000602084013e612231565b606091505b50600081511415612277576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161226e90613766565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149150506122d4565b600190505b949350505050565b6122e6838361234a565b6122f36000848484612145565b612332576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161232990613766565b60405180910390fd5b505050565b600080823b905060008111915050919050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156123ba576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123b1906138a6565b60405180910390fd5b6123c381611938565b15612403576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123fa906137a6565b60405180910390fd5b61240f60008383612140565b6001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461245f9190613c7f565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45050565b82805461252490613e0b565b90600052602060002090601f016020900481019282612546576000855561258d565b82601f1061255f57803560ff191683800117855561258d565b8280016001018555821561258d579182015b8281111561258c578235825591602001919060010190612571565b5b50905061259a91906126d2565b5090565b8280546125aa90613e0b565b90600052602060002090601f0160209004810192826125cc5760008555612613565b82601f106125e557805160ff1916838001178555612613565b82800160010185558215612613579182015b828111156126125782518255916020019190600101906125f7565b5b50905061262091906126d2565b5090565b82805482825590600052602060002090600f016010900481019282156126c15791602002820160005b8382111561269157833561ffff1683826101000a81548161ffff021916908361ffff160217905550926020019260020160208160010104928301926001030261264d565b80156126bf5782816101000a81549061ffff0219169055600201602081600101049283019260010302612691565b505b5090506126ce91906126d2565b5090565b5b808211156126eb5760008160009055506001016126d3565b5090565b60006127026126fd84613a8f565b613a6a565b90508281526020810184848401111561271e5761271d613ffb565b5b612729848285613dc9565b509392505050565b600061274461273f84613ac0565b613a6a565b9050828152602081018484840111156127605761275f613ffb565b5b61276b848285613dc9565b509392505050565b600061278661278184613ac0565b613a6a565b9050828152602081018484840111156127a2576127a1613ffb565b5b6127ad848285613dd8565b509392505050565b6000813590506127c481614542565b92915050565b60008083601f8401126127e0576127df613fdd565b5b8235905067ffffffffffffffff8111156127fd576127fc613fd8565b5b60208301915083602082028301111561281957612818613ff1565b5b9250929050565b60008083601f84011261283657612835613fdd565b5b8235905067ffffffffffffffff81111561285357612852613fd8565b5b60208301915083602082028301111561286f5761286e613ff1565b5b9250929050565b60008135905061288581614559565b92915050565b60008135905061289a81614570565b92915050565b6000815190506128af81614570565b92915050565b600082601f8301126128ca576128c9613fdd565b5b81356128da8482602086016126ef565b91505092915050565b60008083601f8401126128f9576128f8613fdd565b5b8235905067ffffffffffffffff81111561291657612915613fd8565b5b60208301915083600182028301111561293257612931613ff1565b5b9250929050565b600082601f83011261294e5761294d613fdd565b5b813561295e848260208601612731565b91505092915050565b600082601f83011261297c5761297b613fdd565b5b815161298c848260208601612773565b91505092915050565b6000813590506129a481614587565b92915050565b6000813590506129b98161459e565b92915050565b6000813590506129ce816145b5565b92915050565b6000602082840312156129ea576129e961400a565b5b60006129f8848285016127b5565b91505092915050565b60008060408385031215612a1857612a1761400a565b5b6000612a26858286016127b5565b9250506020612a37858286016127b5565b9150509250929050565b600080600060608486031215612a5a57612a5961400a565b5b6000612a68868287016127b5565b9350506020612a79868287016127b5565b9250506040612a8a868287016129aa565b9150509250925092565b60008060008060808587031215612aae57612aad61400a565b5b6000612abc878288016127b5565b9450506020612acd878288016127b5565b9350506040612ade878288016129aa565b925050606085013567ffffffffffffffff811115612aff57612afe614000565b5b612b0b878288016128b5565b91505092959194509250565b60008060408385031215612b2e57612b2d61400a565b5b6000612b3c858286016127b5565b9250506020612b4d85828601612876565b9150509250929050565b60008060408385031215612b6e57612b6d61400a565b5b6000612b7c858286016127b5565b9250506020612b8d858286016129aa565b9150509250929050565b60008060208385031215612bae57612bad61400a565b5b600083013567ffffffffffffffff811115612bcc57612bcb614000565b5b612bd8858286016127ca565b92509250509250929050565b600060208284031215612bfa57612bf961400a565b5b6000612c088482850161288b565b91505092915050565b600060208284031215612c2757612c2661400a565b5b6000612c35848285016128a0565b91505092915050565b600060208284031215612c5457612c5361400a565b5b600082015167ffffffffffffffff811115612c7257612c71614000565b5b612c7e84828501612967565b91505092915050565b600080600060608486031215612ca057612c9f61400a565b5b600084013567ffffffffffffffff811115612cbe57612cbd614000565b5b612cca86828701612939565b935050602084013567ffffffffffffffff811115612ceb57612cea614000565b5b612cf786828701612939565b9250506040612d08868287016129aa565b9150509250925092565b600060208284031215612d2857612d2761400a565b5b6000612d36848285016129aa565b91505092915050565b60008060008060008060008060008060e08b8d031215612d6257612d6161400a565b5b6000612d708d828e016129aa565b9a505060208b013567ffffffffffffffff811115612d9157612d90614000565b5b612d9d8d828e016128e3565b995099505060408b013567ffffffffffffffff811115612dc057612dbf614000565b5b612dcc8d828e016128b5565b9750506060612ddd8d828e016129bf565b96505060808b013567ffffffffffffffff811115612dfe57612dfd614000565b5b612e0a8d828e016127ca565b955095505060a08b013567ffffffffffffffff811115612e2d57612e2c614000565b5b612e398d828e01612820565b935093505060c0612e4c8d828e016127b5565b9150509295989b9194979a5092959850565b60008060408385031215612e7557612e7461400a565b5b6000612e83858286016129aa565b9250506020612e94858286016129aa565b9150509250929050565b6000612eab8484846130ac565b90509392505050565b6000612ec08383613576565b60208301905092915050565b6000612ed88383613594565b60208301905092915050565b612eed81613d3a565b82525050565b6000612eff8385613b72565b935083602084028501612f1184613af1565b8060005b87811015612f57578484038952612f2c8284613c05565b612f37868284612e9e565b9550612f4284613b4b565b935060208b019a505050600181019050612f15565b50829750879450505050509392505050565b8082525050565b6000612f7c8385613b83565b9350612f8782613afb565b8060005b85811015612fc057612f9d8284613c68565b612fa78882612eb4565b9750612fb283613b58565b925050600181019050612f8b565b5085925050509392505050565b6000612fd882613b2a565b612fe28185613b94565b9350612fed83613b05565b8060005b8381101561301e5781516130058882612ecc565b975061301083613b65565b925050600181019050612ff1565b5085935050505092915050565b61303481613d4c565b82525050565b600061304582613b35565b61304f8185613ba5565b935061305f818560208601613dd8565b6130688161400f565b840191505092915050565b600061307e82613b35565b6130888185613bb6565b9350613098818560208601613dd8565b6130a18161400f565b840191505092915050565b60006130b88385613bc7565b93506130c5838584613dc9565b6130ce8361400f565b840190509392505050565b60006130e58385613bd8565b93506130f2838584613dc9565b6130fb8361400f565b840190509392505050565b600061311182613b40565b61311b8185613bd8565b935061312b818560208601613dd8565b6131348161400f565b840191505092915050565b600061314a82613b40565b6131548185613be9565b9350613164818560208601613dd8565b61316d8161400f565b840191505092915050565b600061318382613b40565b61318d8185613bfa565b935061319d818560208601613dd8565b80840191505092915050565b600081546131b681613e0b565b6131c08186613bfa565b945060018216600081146131db57600181146131ec5761321f565b60ff1983168652818601935061321f565b6131f585613b15565b60005b83811015613217578154818901526001820191506020810190506131f8565b838801955050505b50505092915050565b6000613235600683613bfa565b915061324082614020565b600682019050919050565b6000613258601183613bfa565b915061326382614049565b601182019050919050565b600061327b603283613bd8565b915061328682614072565b604082019050919050565b600061329e600283613bfa565b91506132a9826140c1565b600282019050919050565b60006132c1602683613bd8565b91506132cc826140ea565b604082019050919050565b60006132e4601c83613bd8565b91506132ef82614139565b602082019050919050565b6000613307602483613bd8565b915061331282614162565b604082019050919050565b600061332a601983613bd8565b9150613335826141b1565b602082019050919050565b600061334d602c83613bd8565b9150613358826141da565b604082019050919050565b6000613370603883613bd8565b915061337b82614229565b604082019050919050565b6000613393602a83613bd8565b915061339e82614278565b604082019050919050565b60006133b6602983613bd8565b91506133c1826142c7565b604082019050919050565b60006133d9602b83613bd8565b91506133e482614316565b604082019050919050565b60006133fc602083613bd8565b915061340782614365565b602082019050919050565b600061341f602c83613bd8565b915061342a8261438e565b604082019050919050565b6000613442602083613bd8565b915061344d826143dd565b602082019050919050565b6000613465602983613bd8565b915061347082614406565b604082019050919050565b6000613488602183613bd8565b915061349382614455565b604082019050919050565b60006134ab602183613bd8565b91506134b6826144a4565b604082019050919050565b60006134ce603183613bd8565b91506134d9826144f3565b604082019050919050565b600060a0830160008301518482036000860152613501828261313f565b9150506020830151848203602086015261351b828261313f565b915050604083015184820360408601526135358282613073565b9150506060830151848203606086015261354f828261313f565b915050608083015184820360808601526135698282612fcd565b9150508091505092915050565b61357f81613d84565b82525050565b61358e81613d84565b82525050565b61359d81613d84565b82525050565b6135ac81613db2565b82525050565b6135bb81613dbc565b82525050565b60006135cc82613228565b91506135d882856131a9565b91506135e382613291565b91506135ef8284613178565b91508190509392505050565b60006136068261324b565b91506136128284613178565b915081905092915050565b60006020820190506136326000830184612ee4565b92915050565b600060808201905061364d6000830187612ee4565b61365a6020830186612ee4565b61366760408301856135a3565b8181036060830152613679818461303a565b905095945050505050565b6000602082019050613699600083018461302b565b92915050565b600060208201905081810360008301526136b9818461303a565b905092915050565b600060c08201905081810360008301526136dc818b8d6130d9565b905081810360208301526136f0818a61303a565b90506136ff60408301896135b2565b8181036060830152613712818789612ef3565b90508181036080830152613727818587612f70565b905061373660a0830184612ee4565b9a9950505050505050505050565b6000602082019050818103600083015261375e8184613106565b905092915050565b6000602082019050818103600083015261377f8161326e565b9050919050565b6000602082019050818103600083015261379f816132b4565b9050919050565b600060208201905081810360008301526137bf816132d7565b9050919050565b600060208201905081810360008301526137df816132fa565b9050919050565b600060208201905081810360008301526137ff8161331d565b9050919050565b6000602082019050818103600083015261381f81613340565b9050919050565b6000602082019050818103600083015261383f81613363565b9050919050565b6000602082019050818103600083015261385f81613386565b9050919050565b6000602082019050818103600083015261387f816133a9565b9050919050565b6000602082019050818103600083015261389f816133cc565b9050919050565b600060208201905081810360008301526138bf816133ef565b9050919050565b600060208201905081810360008301526138df81613412565b9050919050565b600060208201905081810360008301526138ff81613435565b9050919050565b6000602082019050818103600083015261391f81613458565b9050919050565b6000602082019050818103600083015261393f8161347b565b9050919050565b6000602082019050818103600083015261395f8161349e565b9050919050565b6000602082019050818103600083015261397f816134c1565b9050919050565b600060408201905081810360008301526139a081856134e4565b90506139af6020830184612f69565b9392505050565b60006020820190506139cb6000830184613585565b92915050565b60006020820190506139e660008301846135a3565b92915050565b6000602082019050613a0160008301846135b2565b92915050565b60008083356001602003843603038112613a2457613a23613fe7565b5b80840192508235915067ffffffffffffffff821115613a4657613a45613fe2565b5b602083019250600182023603831315613a6257613a61613ff6565b5b509250929050565b6000613a74613a85565b9050613a808282613e3d565b919050565b6000604051905090565b600067ffffffffffffffff821115613aaa57613aa9613fa4565b5b613ab38261400f565b9050602081019050919050565b600067ffffffffffffffff821115613adb57613ada613fa4565b5b613ae48261400f565b9050602081019050919050565b6000819050919050565b6000819050919050565b6000819050602082019050919050565b60008190508160005260206000209050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b60008083356001602003843603038112613c2257613c21614005565b5b83810192508235915060208301925067ffffffffffffffff821115613c4a57613c49613fd3565b5b600182023603841315613c6057613c5f613fec565b5b509250929050565b6000613c776020840184612995565b905092915050565b6000613c8a82613db2565b9150613c9583613db2565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115613cca57613cc9613ee8565b5b828201905092915050565b6000613ce082613db2565b9150613ceb83613db2565b925082613cfb57613cfa613f17565b5b828204905092915050565b6000613d1182613db2565b9150613d1c83613db2565b925082821015613d2f57613d2e613ee8565b5b828203905092915050565b6000613d4582613d92565b9050919050565b60008115159050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600061ffff82169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b82818337600083830152505050565b60005b83811015613df6578082015181840152602081019050613ddb565b83811115613e05576000848401525b50505050565b60006002820490506001821680613e2357607f821691505b60208210811415613e3757613e36613f46565b5b50919050565b613e468261400f565b810181811067ffffffffffffffff82111715613e6557613e64613fa4565b5b80604052505050565b6000613e7982613db2565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415613eac57613eab613ee8565b5b600182019050919050565b6000613ec282613db2565b9150613ecd83613db2565b925082613edd57613edc613f17565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f44726f6f6c200000000000000000000000000000000000000000000000000000600082015250565b7f44726f6f6c73202620506978656c732023000000000000000000000000000000600082015250565b7f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560008201527f63656976657220696d706c656d656e7465720000000000000000000000000000602082015250565b7f2023000000000000000000000000000000000000000000000000000000000000600082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000600082015250565b7f4552433732313a207472616e7366657220746f20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a20617070726f766520746f2063616c6c657200000000000000600082015250565b7f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b7f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760008201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000602082015250565b7f4552433732313a2062616c616e636520717565727920666f7220746865207a6560008201527f726f206164647265737300000000000000000000000000000000000000000000602082015250565b7f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460008201527f656e7420746f6b656e0000000000000000000000000000000000000000000000602082015250565b7f4e6f756e73546f6b656e3a2055524920717565727920666f72206e6f6e65786960008201527f7374656e7420746f6b656e000000000000000000000000000000000000000000602082015250565b7f4552433732313a206d696e7420746f20746865207a65726f2061646472657373600082015250565b7f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960008201527f73206e6f74206f776e0000000000000000000000000000000000000000000000602082015250565b7f50616c65747465732063616e206f6e6c7920686f6c642032353620636f6c6f7260008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560008201527f7200000000000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60008201527f776e6572206e6f7220617070726f766564000000000000000000000000000000602082015250565b61454b81613d3a565b811461455657600080fd5b50565b61456281613d4c565b811461456d57600080fd5b50565b61457981613d58565b811461458457600080fd5b50565b61459081613d84565b811461459b57600080fd5b50565b6145a781613db2565b81146145b257600080fd5b50565b6145be81613dbc565b81146145c957600080fd5b5056fea26469706673582212201008d249d9b0c34e3d2a16e5fa6c00ce52474732e60d63553db5012c5d1fbb9c64736f6c6343000806003300000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000f44726f6f6c73202620506978656c730000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000644524f4f4c530000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101a95760003560e01c8063715018a6116100f9578063c446b4ec11610097578063e985e9c511610071578063e985e9c514610504578063f0503e8014610534578063f1dc193a14610564578063f2fde38b14610594576101a9565b8063c446b4ec14610488578063c87b56dd146104b8578063e4b4c8bd146104e8576101a9565b806395d89b41116100d357806395d89b4114610402578063a22cb46514610420578063a846c4421461043c578063b88d4fde1461046c576101a9565b8063715018a6146103be5780638da5cb5b146103c857806391b7916a146103e6576101a9565b806319586348116101665780634622ab03116101405780634622ab03146102fe5780635ac1e3bb1461032e5780636352211e1461035e57806370a082311461038e576101a9565b8063195863481461029657806323b872dd146102c657806342842e0e146102e2576101a9565b806301ffc9a7146101ae57806304bde4dd146101de57806306fdde031461020e578063081812fc1461022c578063095ea7b31461025c57806318160ddd14610278575b600080fd5b6101c860048036038101906101c39190612be4565b6105b0565b6040516101d59190613684565b60405180910390f35b6101f860048036038101906101f39190612d12565b6105c2565b6040516102059190613744565b60405180910390f35b61021661066e565b6040516102239190613744565b60405180910390f35b61024660048036038101906102419190612d12565b610700565b604051610253919061361d565b60405180910390f35b61027660048036038101906102719190612b57565b610785565b005b61028061089d565b60405161028d91906139d1565b60405180910390f35b6102b060048036038101906102ab9190612c87565b6108a7565b6040516102bd9190613744565b60405180910390f35b6102e060048036038101906102db9190612a41565b610b6b565b005b6102fc60048036038101906102f79190612a41565b610bcb565b005b61031860048036038101906103139190612d12565b610beb565b6040516103259190613744565b60405180910390f35b61034860048036038101906103439190612d12565b610c8b565b6040516103559190613744565b60405180910390f35b61037860048036038101906103739190612d12565b610d0b565b604051610385919061361d565b60405180910390f35b6103a860048036038101906103a391906129d4565b610dbd565b6040516103b591906139d1565b60405180910390f35b6103c6610e75565b005b6103d0610efd565b6040516103dd919061361d565b60405180910390f35b61040060048036038101906103fb9190612b97565b610f27565b005b61040a610ff6565b6040516104179190613744565b60405180910390f35b61043a60048036038101906104359190612b17565b611088565b005b61045660048036038101906104519190612e5e565b611209565b60405161046391906139b6565b60405180910390f35b61048660048036038101906104819190612a94565b611250565b005b6104a2600480360381019061049d9190612d12565b6112b2565b6040516104af91906139ec565b60405180910390f35b6104d260048036038101906104cd9190612d12565b6112d2565b6040516104df9190613744565b60405180910390f35b61050260048036038101906104fd9190612d3f565b61132c565b005b61051e60048036038101906105199190612a01565b611571565b60405161052b9190613684565b60405180910390f35b61054e60048036038101906105499190612d12565b611605565b60405161055b919061369f565b60405180910390f35b61057e60048036038101906105799190612e5e565b6116a5565b60405161058b9190613744565b60405180910390f35b6105ae60048036038101906105a991906129d4565b61175e565b005b60006105bb82611856565b9050919050565b600c81815481106105d257600080fd5b9060005260206000200160009150905080546105ed90613e0b565b80601f016020809104026020016040519081016040528092919081815260200182805461061990613e0b565b80156106665780601f1061063b57610100808354040283529160200191610666565b820191906000526020600020905b81548152906001019060200180831161064957829003601f168201915b505050505081565b60606000805461067d90613e0b565b80601f01602080910402602001604051908101604052809291908181526020018280546106a990613e0b565b80156106f65780601f106106cb576101008083540402835291602001916106f6565b820191906000526020600020905b8154815290600101906020018083116106d957829003601f168201915b5050505050905090565b600061070b82611938565b61074a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610741906138c6565b60405180910390fd5b6004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b600061079082610d0b565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610801576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107f890613946565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166108206119a4565b73ffffffffffffffffffffffffffffffffffffffff16148061084f575061084e816108496119a4565b611571565b5b61088e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161088590613826565b60405180910390fd5b61089883836119ac565b505050565b6000600d54905090565b606060006040518060a001604052808681526020018581526020016008600086815260200190815260200160002080546108e090613e0b565b80601f016020809104026020016040519081016040528092919081815260200182805461090c90613e0b565b80156109595780601f1061092e57610100808354040283529160200191610959565b820191906000526020600020905b81548152906001019060200180831161093c57829003601f168201915b50505050508152602001600c600a600087815260200190815260200160002060009054906101000a900460ff1660ff168154811061099a57610999613f75565b5b9060005260206000200180546109af90613e0b565b80601f01602080910402602001604051908101604052809291908181526020018280546109db90613e0b565b8015610a285780601f106109fd57610100808354040283529160200191610a28565b820191906000526020600020905b815481529060010190602001808311610a0b57829003601f168201915b50505050508152602001600b6000868152602001908152602001600020805480602002602001604051908101604052809291908181526020018280548015610ab757602002820191906000526020600020906000905b82829054906101000a900461ffff1661ffff1681526020019060020190602082600101049283019260010382029150808411610a7e5790505b50505050508152509050737b7ab682731c5a6ee63ecbcbb226e0b6b167556e636c2a0e3c82600760008781526020019081526020016000206040518363ffffffff1660e01b8152600401610b0c929190613986565b60006040518083038186803b158015610b2457600080fd5b505af4158015610b38573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250810190610b619190612c3e565b9150509392505050565b610b7c610b766119a4565b82611a65565b610bbb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bb290613966565b60405180910390fd5b610bc6838383611b43565b505050565b610be683838360405180602001604052806000815250611250565b505050565b60096020528060005260406000206000915090508054610c0a90613e0b565b80601f0160208091040260200160405190810160405280929190818152602001828054610c3690613e0b565b8015610c835780601f10610c5857610100808354040283529160200191610c83565b820191906000526020600020905b815481529060010190602001808311610c6657829003601f168201915b505050505081565b60606000610c9883611d9f565b905060006009600085815260200190815260200160002082604051602001610cc19291906135c1565b6040516020818303038152906040529050600082604051602001610ce591906135fb565b6040516020818303038152906040529050610d018282876108a7565b9350505050919050565b6000806002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610db4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dab90613866565b60405180910390fd5b80915050919050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610e2e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e2590613846565b60405180910390fd5b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610e7d6119a4565b73ffffffffffffffffffffffffffffffffffffffff16610e9b610efd565b73ffffffffffffffffffffffffffffffffffffffff1614610ef1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ee8906138e6565b60405180910390fd5b610efb6000611f00565b565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610f2f6119a4565b73ffffffffffffffffffffffffffffffffffffffff16610f4d610efd565b73ffffffffffffffffffffffffffffffffffffffff1614610fa3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f9a906138e6565b60405180910390fd5b60005b82829050811015610ff157610fde838383818110610fc757610fc6613f75565b5b9050602002810190610fd99190613a07565b611fc6565b8080610fe990613e6e565b915050610fa6565b505050565b60606001805461100590613e0b565b80601f016020809104026020016040519081016040528092919081815260200182805461103190613e0b565b801561107e5780601f106110535761010080835404028352916020019161107e565b820191906000526020600020905b81548152906001019060200180831161106157829003601f168201915b5050505050905090565b6110906119a4565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156110fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110f5906137e6565b60405180910390fd5b806005600061110b6119a4565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff166111b86119a4565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516111fd9190613684565b60405180910390a35050565b600b602052816000526040600020818154811061122557600080fd5b9060005260206000209060109182820401919006600202915091509054906101000a900461ffff1681565b61126161125b6119a4565b83611a65565b6112a0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161129790613966565b60405180910390fd5b6112ac84848484612008565b50505050565b600a6020528060005260406000206000915054906101000a900460ff1681565b60606112dd82611938565b61131c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161131390613886565b60405180910390fd5b61132582610c8b565b9050919050565b6113346119a4565b73ffffffffffffffffffffffffffffffffffffffff16611352610efd565b73ffffffffffffffffffffffffffffffffffffffff16146113a8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161139f906138e6565b60405180910390fd5b61010085859050600760008d8152602001908152602001600020805490506113d09190613c7f565b1115611411576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161140890613926565b60405180910390fd5b60005b858590508110156114605761144d8b87878481811061143657611435613f75565b5b90506020028101906114489190613a07565b612064565b808061145890613e6e565b915050611414565b508888600960008d81526020019081526020016000209190611483929190612518565b5086600860008c815260200190815260200160002090805190602001906114ab92919061259e565b508282600b60008d815260200190815260200160002091906114ce929190612624565b5085600a60008c815260200190815260200160002060006101000a81548160ff021916908360ff160217905550600d600081548092919061150e90613e6e565b919050555061151d818b6120b8565b897f09e653fedc59c2543c2b5d9335ba7d232290592f595935f7cc3d505a88e98ee18a8a8a8a8a8a8a8a8a60405161155d999897969594939291906136c1565b60405180910390a250505050505050505050565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b6008602052806000526040600020600091509050805461162490613e0b565b80601f016020809104026020016040519081016040528092919081815260200182805461165090613e0b565b801561169d5780601f106116725761010080835404028352916020019161169d565b820191906000526020600020905b81548152906001019060200180831161168057829003601f168201915b505050505081565b600760205281600052604060002081815481106116c157600080fd5b906000526020600020016000915091505080546116dd90613e0b565b80601f016020809104026020016040519081016040528092919081815260200182805461170990613e0b565b80156117565780601f1061172b57610100808354040283529160200191611756565b820191906000526020600020905b81548152906001019060200180831161173957829003601f168201915b505050505081565b6117666119a4565b73ffffffffffffffffffffffffffffffffffffffff16611784610efd565b73ffffffffffffffffffffffffffffffffffffffff16146117da576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117d1906138e6565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561184a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161184190613786565b60405180910390fd5b61185381611f00565b50565b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061192157507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806119315750611930826120d6565b5b9050919050565b60008073ffffffffffffffffffffffffffffffffffffffff166002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b600033905090565b816004600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16611a1f83610d0b565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000611a7082611938565b611aaf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611aa690613806565b60405180910390fd5b6000611aba83610d0b565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480611b2957508373ffffffffffffffffffffffffffffffffffffffff16611b1184610700565b73ffffffffffffffffffffffffffffffffffffffff16145b80611b3a5750611b398185611571565b5b91505092915050565b8273ffffffffffffffffffffffffffffffffffffffff16611b6382610d0b565b73ffffffffffffffffffffffffffffffffffffffff1614611bb9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bb090613906565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611c29576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c20906137c6565b60405180910390fd5b611c34838383612140565b611c3f6000826119ac565b6001600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611c8f9190613d06565b925050819055506001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611ce69190613c7f565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b60606000821415611de7576040518060400160405280600181526020017f30000000000000000000000000000000000000000000000000000000000000008152509050611efb565b600082905060005b60008214611e19578080611e0290613e6e565b915050600a82611e129190613cd5565b9150611def565b60008167ffffffffffffffff811115611e3557611e34613fa4565b5b6040519080825280601f01601f191660200182016040528015611e675781602001600182028036833780820191505090505b5090505b60008514611ef457600182611e809190613d06565b9150600a85611e8f9190613eb7565b6030611e9b9190613c7f565b60f81b818381518110611eb157611eb0613f75565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a85611eed9190613cd5565b9450611e6b565b8093505050505b919050565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600c828290918060018154018082558091505060019003906000526020600020016000909192909192909192909192509190612003929190612518565b505050565b612013848484611b43565b61201f84848484612145565b61205e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161205590613766565b60405180910390fd5b50505050565b600760008481526020019081526020016000208282909180600181540180825580915050600190039060005260206000200160009091929091929091929091925091906120b2929190612518565b50505050565b6120d28282604051806020016040528060008152506122dc565b5050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b505050565b60006121668473ffffffffffffffffffffffffffffffffffffffff16612337565b156122cf578373ffffffffffffffffffffffffffffffffffffffff1663150b7a0261218f6119a4565b8786866040518563ffffffff1660e01b81526004016121b19493929190613638565b602060405180830381600087803b1580156121cb57600080fd5b505af19250505080156121fc57506040513d601f19601f820116820180604052508101906121f99190612c11565b60015b61227f573d806000811461222c576040519150601f19603f3d011682016040523d82523d6000602084013e612231565b606091505b50600081511415612277576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161226e90613766565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149150506122d4565b600190505b949350505050565b6122e6838361234a565b6122f36000848484612145565b612332576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161232990613766565b60405180910390fd5b505050565b600080823b905060008111915050919050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156123ba576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123b1906138a6565b60405180910390fd5b6123c381611938565b15612403576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123fa906137a6565b60405180910390fd5b61240f60008383612140565b6001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461245f9190613c7f565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45050565b82805461252490613e0b565b90600052602060002090601f016020900481019282612546576000855561258d565b82601f1061255f57803560ff191683800117855561258d565b8280016001018555821561258d579182015b8281111561258c578235825591602001919060010190612571565b5b50905061259a91906126d2565b5090565b8280546125aa90613e0b565b90600052602060002090601f0160209004810192826125cc5760008555612613565b82601f106125e557805160ff1916838001178555612613565b82800160010185558215612613579182015b828111156126125782518255916020019190600101906125f7565b5b50905061262091906126d2565b5090565b82805482825590600052602060002090600f016010900481019282156126c15791602002820160005b8382111561269157833561ffff1683826101000a81548161ffff021916908361ffff160217905550926020019260020160208160010104928301926001030261264d565b80156126bf5782816101000a81549061ffff0219169055600201602081600101049283019260010302612691565b505b5090506126ce91906126d2565b5090565b5b808211156126eb5760008160009055506001016126d3565b5090565b60006127026126fd84613a8f565b613a6a565b90508281526020810184848401111561271e5761271d613ffb565b5b612729848285613dc9565b509392505050565b600061274461273f84613ac0565b613a6a565b9050828152602081018484840111156127605761275f613ffb565b5b61276b848285613dc9565b509392505050565b600061278661278184613ac0565b613a6a565b9050828152602081018484840111156127a2576127a1613ffb565b5b6127ad848285613dd8565b509392505050565b6000813590506127c481614542565b92915050565b60008083601f8401126127e0576127df613fdd565b5b8235905067ffffffffffffffff8111156127fd576127fc613fd8565b5b60208301915083602082028301111561281957612818613ff1565b5b9250929050565b60008083601f84011261283657612835613fdd565b5b8235905067ffffffffffffffff81111561285357612852613fd8565b5b60208301915083602082028301111561286f5761286e613ff1565b5b9250929050565b60008135905061288581614559565b92915050565b60008135905061289a81614570565b92915050565b6000815190506128af81614570565b92915050565b600082601f8301126128ca576128c9613fdd565b5b81356128da8482602086016126ef565b91505092915050565b60008083601f8401126128f9576128f8613fdd565b5b8235905067ffffffffffffffff81111561291657612915613fd8565b5b60208301915083600182028301111561293257612931613ff1565b5b9250929050565b600082601f83011261294e5761294d613fdd565b5b813561295e848260208601612731565b91505092915050565b600082601f83011261297c5761297b613fdd565b5b815161298c848260208601612773565b91505092915050565b6000813590506129a481614587565b92915050565b6000813590506129b98161459e565b92915050565b6000813590506129ce816145b5565b92915050565b6000602082840312156129ea576129e961400a565b5b60006129f8848285016127b5565b91505092915050565b60008060408385031215612a1857612a1761400a565b5b6000612a26858286016127b5565b9250506020612a37858286016127b5565b9150509250929050565b600080600060608486031215612a5a57612a5961400a565b5b6000612a68868287016127b5565b9350506020612a79868287016127b5565b9250506040612a8a868287016129aa565b9150509250925092565b60008060008060808587031215612aae57612aad61400a565b5b6000612abc878288016127b5565b9450506020612acd878288016127b5565b9350506040612ade878288016129aa565b925050606085013567ffffffffffffffff811115612aff57612afe614000565b5b612b0b878288016128b5565b91505092959194509250565b60008060408385031215612b2e57612b2d61400a565b5b6000612b3c858286016127b5565b9250506020612b4d85828601612876565b9150509250929050565b60008060408385031215612b6e57612b6d61400a565b5b6000612b7c858286016127b5565b9250506020612b8d858286016129aa565b9150509250929050565b60008060208385031215612bae57612bad61400a565b5b600083013567ffffffffffffffff811115612bcc57612bcb614000565b5b612bd8858286016127ca565b92509250509250929050565b600060208284031215612bfa57612bf961400a565b5b6000612c088482850161288b565b91505092915050565b600060208284031215612c2757612c2661400a565b5b6000612c35848285016128a0565b91505092915050565b600060208284031215612c5457612c5361400a565b5b600082015167ffffffffffffffff811115612c7257612c71614000565b5b612c7e84828501612967565b91505092915050565b600080600060608486031215612ca057612c9f61400a565b5b600084013567ffffffffffffffff811115612cbe57612cbd614000565b5b612cca86828701612939565b935050602084013567ffffffffffffffff811115612ceb57612cea614000565b5b612cf786828701612939565b9250506040612d08868287016129aa565b9150509250925092565b600060208284031215612d2857612d2761400a565b5b6000612d36848285016129aa565b91505092915050565b60008060008060008060008060008060e08b8d031215612d6257612d6161400a565b5b6000612d708d828e016129aa565b9a505060208b013567ffffffffffffffff811115612d9157612d90614000565b5b612d9d8d828e016128e3565b995099505060408b013567ffffffffffffffff811115612dc057612dbf614000565b5b612dcc8d828e016128b5565b9750506060612ddd8d828e016129bf565b96505060808b013567ffffffffffffffff811115612dfe57612dfd614000565b5b612e0a8d828e016127ca565b955095505060a08b013567ffffffffffffffff811115612e2d57612e2c614000565b5b612e398d828e01612820565b935093505060c0612e4c8d828e016127b5565b9150509295989b9194979a5092959850565b60008060408385031215612e7557612e7461400a565b5b6000612e83858286016129aa565b9250506020612e94858286016129aa565b9150509250929050565b6000612eab8484846130ac565b90509392505050565b6000612ec08383613576565b60208301905092915050565b6000612ed88383613594565b60208301905092915050565b612eed81613d3a565b82525050565b6000612eff8385613b72565b935083602084028501612f1184613af1565b8060005b87811015612f57578484038952612f2c8284613c05565b612f37868284612e9e565b9550612f4284613b4b565b935060208b019a505050600181019050612f15565b50829750879450505050509392505050565b8082525050565b6000612f7c8385613b83565b9350612f8782613afb565b8060005b85811015612fc057612f9d8284613c68565b612fa78882612eb4565b9750612fb283613b58565b925050600181019050612f8b565b5085925050509392505050565b6000612fd882613b2a565b612fe28185613b94565b9350612fed83613b05565b8060005b8381101561301e5781516130058882612ecc565b975061301083613b65565b925050600181019050612ff1565b5085935050505092915050565b61303481613d4c565b82525050565b600061304582613b35565b61304f8185613ba5565b935061305f818560208601613dd8565b6130688161400f565b840191505092915050565b600061307e82613b35565b6130888185613bb6565b9350613098818560208601613dd8565b6130a18161400f565b840191505092915050565b60006130b88385613bc7565b93506130c5838584613dc9565b6130ce8361400f565b840190509392505050565b60006130e58385613bd8565b93506130f2838584613dc9565b6130fb8361400f565b840190509392505050565b600061311182613b40565b61311b8185613bd8565b935061312b818560208601613dd8565b6131348161400f565b840191505092915050565b600061314a82613b40565b6131548185613be9565b9350613164818560208601613dd8565b61316d8161400f565b840191505092915050565b600061318382613b40565b61318d8185613bfa565b935061319d818560208601613dd8565b80840191505092915050565b600081546131b681613e0b565b6131c08186613bfa565b945060018216600081146131db57600181146131ec5761321f565b60ff1983168652818601935061321f565b6131f585613b15565b60005b83811015613217578154818901526001820191506020810190506131f8565b838801955050505b50505092915050565b6000613235600683613bfa565b915061324082614020565b600682019050919050565b6000613258601183613bfa565b915061326382614049565b601182019050919050565b600061327b603283613bd8565b915061328682614072565b604082019050919050565b600061329e600283613bfa565b91506132a9826140c1565b600282019050919050565b60006132c1602683613bd8565b91506132cc826140ea565b604082019050919050565b60006132e4601c83613bd8565b91506132ef82614139565b602082019050919050565b6000613307602483613bd8565b915061331282614162565b604082019050919050565b600061332a601983613bd8565b9150613335826141b1565b602082019050919050565b600061334d602c83613bd8565b9150613358826141da565b604082019050919050565b6000613370603883613bd8565b915061337b82614229565b604082019050919050565b6000613393602a83613bd8565b915061339e82614278565b604082019050919050565b60006133b6602983613bd8565b91506133c1826142c7565b604082019050919050565b60006133d9602b83613bd8565b91506133e482614316565b604082019050919050565b60006133fc602083613bd8565b915061340782614365565b602082019050919050565b600061341f602c83613bd8565b915061342a8261438e565b604082019050919050565b6000613442602083613bd8565b915061344d826143dd565b602082019050919050565b6000613465602983613bd8565b915061347082614406565b604082019050919050565b6000613488602183613bd8565b915061349382614455565b604082019050919050565b60006134ab602183613bd8565b91506134b6826144a4565b604082019050919050565b60006134ce603183613bd8565b91506134d9826144f3565b604082019050919050565b600060a0830160008301518482036000860152613501828261313f565b9150506020830151848203602086015261351b828261313f565b915050604083015184820360408601526135358282613073565b9150506060830151848203606086015261354f828261313f565b915050608083015184820360808601526135698282612fcd565b9150508091505092915050565b61357f81613d84565b82525050565b61358e81613d84565b82525050565b61359d81613d84565b82525050565b6135ac81613db2565b82525050565b6135bb81613dbc565b82525050565b60006135cc82613228565b91506135d882856131a9565b91506135e382613291565b91506135ef8284613178565b91508190509392505050565b60006136068261324b565b91506136128284613178565b915081905092915050565b60006020820190506136326000830184612ee4565b92915050565b600060808201905061364d6000830187612ee4565b61365a6020830186612ee4565b61366760408301856135a3565b8181036060830152613679818461303a565b905095945050505050565b6000602082019050613699600083018461302b565b92915050565b600060208201905081810360008301526136b9818461303a565b905092915050565b600060c08201905081810360008301526136dc818b8d6130d9565b905081810360208301526136f0818a61303a565b90506136ff60408301896135b2565b8181036060830152613712818789612ef3565b90508181036080830152613727818587612f70565b905061373660a0830184612ee4565b9a9950505050505050505050565b6000602082019050818103600083015261375e8184613106565b905092915050565b6000602082019050818103600083015261377f8161326e565b9050919050565b6000602082019050818103600083015261379f816132b4565b9050919050565b600060208201905081810360008301526137bf816132d7565b9050919050565b600060208201905081810360008301526137df816132fa565b9050919050565b600060208201905081810360008301526137ff8161331d565b9050919050565b6000602082019050818103600083015261381f81613340565b9050919050565b6000602082019050818103600083015261383f81613363565b9050919050565b6000602082019050818103600083015261385f81613386565b9050919050565b6000602082019050818103600083015261387f816133a9565b9050919050565b6000602082019050818103600083015261389f816133cc565b9050919050565b600060208201905081810360008301526138bf816133ef565b9050919050565b600060208201905081810360008301526138df81613412565b9050919050565b600060208201905081810360008301526138ff81613435565b9050919050565b6000602082019050818103600083015261391f81613458565b9050919050565b6000602082019050818103600083015261393f8161347b565b9050919050565b6000602082019050818103600083015261395f8161349e565b9050919050565b6000602082019050818103600083015261397f816134c1565b9050919050565b600060408201905081810360008301526139a081856134e4565b90506139af6020830184612f69565b9392505050565b60006020820190506139cb6000830184613585565b92915050565b60006020820190506139e660008301846135a3565b92915050565b6000602082019050613a0160008301846135b2565b92915050565b60008083356001602003843603038112613a2457613a23613fe7565b5b80840192508235915067ffffffffffffffff821115613a4657613a45613fe2565b5b602083019250600182023603831315613a6257613a61613ff6565b5b509250929050565b6000613a74613a85565b9050613a808282613e3d565b919050565b6000604051905090565b600067ffffffffffffffff821115613aaa57613aa9613fa4565b5b613ab38261400f565b9050602081019050919050565b600067ffffffffffffffff821115613adb57613ada613fa4565b5b613ae48261400f565b9050602081019050919050565b6000819050919050565b6000819050919050565b6000819050602082019050919050565b60008190508160005260206000209050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b60008083356001602003843603038112613c2257613c21614005565b5b83810192508235915060208301925067ffffffffffffffff821115613c4a57613c49613fd3565b5b600182023603841315613c6057613c5f613fec565b5b509250929050565b6000613c776020840184612995565b905092915050565b6000613c8a82613db2565b9150613c9583613db2565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115613cca57613cc9613ee8565b5b828201905092915050565b6000613ce082613db2565b9150613ceb83613db2565b925082613cfb57613cfa613f17565b5b828204905092915050565b6000613d1182613db2565b9150613d1c83613db2565b925082821015613d2f57613d2e613ee8565b5b828203905092915050565b6000613d4582613d92565b9050919050565b60008115159050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600061ffff82169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b82818337600083830152505050565b60005b83811015613df6578082015181840152602081019050613ddb565b83811115613e05576000848401525b50505050565b60006002820490506001821680613e2357607f821691505b60208210811415613e3757613e36613f46565b5b50919050565b613e468261400f565b810181811067ffffffffffffffff82111715613e6557613e64613fa4565b5b80604052505050565b6000613e7982613db2565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415613eac57613eab613ee8565b5b600182019050919050565b6000613ec282613db2565b9150613ecd83613db2565b925082613edd57613edc613f17565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f44726f6f6c200000000000000000000000000000000000000000000000000000600082015250565b7f44726f6f6c73202620506978656c732023000000000000000000000000000000600082015250565b7f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560008201527f63656976657220696d706c656d656e7465720000000000000000000000000000602082015250565b7f2023000000000000000000000000000000000000000000000000000000000000600082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000600082015250565b7f4552433732313a207472616e7366657220746f20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a20617070726f766520746f2063616c6c657200000000000000600082015250565b7f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b7f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760008201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000602082015250565b7f4552433732313a2062616c616e636520717565727920666f7220746865207a6560008201527f726f206164647265737300000000000000000000000000000000000000000000602082015250565b7f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460008201527f656e7420746f6b656e0000000000000000000000000000000000000000000000602082015250565b7f4e6f756e73546f6b656e3a2055524920717565727920666f72206e6f6e65786960008201527f7374656e7420746f6b656e000000000000000000000000000000000000000000602082015250565b7f4552433732313a206d696e7420746f20746865207a65726f2061646472657373600082015250565b7f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960008201527f73206e6f74206f776e0000000000000000000000000000000000000000000000602082015250565b7f50616c65747465732063616e206f6e6c7920686f6c642032353620636f6c6f7260008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560008201527f7200000000000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60008201527f776e6572206e6f7220617070726f766564000000000000000000000000000000602082015250565b61454b81613d3a565b811461455657600080fd5b50565b61456281613d4c565b811461456d57600080fd5b50565b61457981613d58565b811461458457600080fd5b50565b61459081613d84565b811461459b57600080fd5b50565b6145a781613db2565b81146145b257600080fd5b50565b6145be81613dbc565b81146145c957600080fd5b5056fea26469706673582212201008d249d9b0c34e3d2a16e5fa6c00ce52474732e60d63553db5012c5d1fbb9c64736f6c63430008060033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000f44726f6f6c73202620506978656c730000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000644524f4f4c530000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : name (string): Drools & Pixels
Arg [1] : symbol (string): DROOLS

-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [2] : 000000000000000000000000000000000000000000000000000000000000000f
Arg [3] : 44726f6f6c73202620506978656c730000000000000000000000000000000000
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000006
Arg [5] : 44524f4f4c530000000000000000000000000000000000000000000000000000


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.