ETH Price: $3,458.43 (-0.55%)
Gas: 2 Gwei

Contract

0x488C057CF3deE9Ee2E386112e08F2c6d8e58cdFB
 

Overview

ETH Balance

0.3 ETH

Eth Value

$1,037.53 (@ $3,458.43/ETH)

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Set Approval For...202087872024-07-01 2:48:5922 days ago1719802139IN
TwoBitCubs: TBC Token
0 ETH0.000147213.19263101
Transfer From202007192024-06-29 23:47:2323 days ago1719704843IN
TwoBitCubs: TBC Token
0 ETH0.000125791.50326
Wake Cub197216472024-04-24 0:24:1190 days ago1713918251IN
TwoBitCubs: TBC Token
0 ETH0.000467119.6341703
Set Approval For...196259072024-04-10 14:45:11103 days ago1712760311IN
TwoBitCubs: TBC Token
0 ETH0.0007524131.09132311
Set Approval For...193175242024-02-27 7:53:47146 days ago1709020427IN
TwoBitCubs: TBC Token
0 ETH0.0019702242.72704734
Set Approval For...192882292024-02-23 5:32:59151 days ago1708666379IN
TwoBitCubs: TBC Token
0 ETH0.0016029634.69924995
Set Approval For...192430682024-02-16 21:16:35157 days ago1708118195IN
TwoBitCubs: TBC Token
0 ETH0.0014844432.19219622
Set Approval For...192156302024-02-13 0:51:11161 days ago1707785471IN
TwoBitCubs: TBC Token
0 ETH0.0014560431.57624982
Mate Bears191582442024-02-04 23:35:35169 days ago1707089735IN
TwoBitCubs: TBC Token
0 ETH0.0011436315.20483204
Set Approval For...191139632024-01-29 18:26:35175 days ago1706552795IN
TwoBitCubs: TBC Token
0 ETH0.0006762514.66554923
Set Approval For...189363942024-01-04 20:38:47200 days ago1704400727IN
TwoBitCubs: TBC Token
0 ETH0.0011093324.01369693
Set Approval For...189101622024-01-01 4:17:11204 days ago1704082631IN
TwoBitCubs: TBC Token
0 ETH0.000223249.19323909
Set Approval For...189101602024-01-01 4:16:35204 days ago1704082595IN
TwoBitCubs: TBC Token
0 ETH0.000231919.55017763
Set Approval For...189101602024-01-01 4:16:35204 days ago1704082595IN
TwoBitCubs: TBC Token
0 ETH0.000231119.55017763
Safe Transfer Fr...188249382023-12-20 5:07:11216 days ago1703048831IN
TwoBitCubs: TBC Token
0 ETH0.0030272934.92943812
Set Approval For...188102752023-12-18 3:43:11218 days ago1702870991IN
TwoBitCubs: TBC Token
0 ETH0.0012700952.48305803
Set Approval For...186580182023-11-26 19:47:23239 days ago1701028043IN
TwoBitCubs: TBC Token
0 ETH0.0007203129.73563107
Set Approval For...186450132023-11-25 0:03:47241 days ago1700870627IN
TwoBitCubs: TBC Token
0 ETH0.001126524.38541265
Set Approval For...186231172023-11-21 22:27:47244 days ago1700605667IN
TwoBitCubs: TBC Token
0 ETH0.0012019549.49593862
Set Approval For...186231162023-11-21 22:27:35244 days ago1700605655IN
TwoBitCubs: TBC Token
0 ETH0.0011956749.23694841
Set Approval For...186231132023-11-21 22:26:59244 days ago1700605619IN
TwoBitCubs: TBC Token
0 ETH0.0012116550.06834533
Set Approval For...185908572023-11-17 9:58:59248 days ago1700215139IN
TwoBitCubs: TBC Token
0 ETH0.001047522.67524238
Set Approval For...185444842023-11-10 22:19:47255 days ago1699654787IN
TwoBitCubs: TBC Token
0 ETH0.0017522538
Set Approval For...184421532023-10-27 14:30:59269 days ago1698417059IN
TwoBitCubs: TBC Token
0 ETH0.000976921.14694738
Set Approval For...182765982023-10-04 10:35:47292 days ago1696415747IN
TwoBitCubs: TBC Token
0 ETH0.000314436.8189639
View all transactions

Latest 4 internal transactions

Advanced mode:
Parent Transaction Hash Block From To
147699782022-05-13 22:08:28801 days ago1652479708
TwoBitCubs: TBC Token
1.5 ETH
142563082022-02-22 14:08:21881 days ago1645538901
TwoBitCubs: TBC Token
4.8 ETH
141037712022-01-30 0:03:59905 days ago1643501039
TwoBitCubs: TBC Token
31.5 ETH
140131232022-01-15 23:43:05919 days ago1642290185
TwoBitCubs: TBC Token
11.4 ETH
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
TwoBitCubs

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 24 : TwoBitCubs.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "base64-sol/base64.sol";
import "../interfaces/ICubTraitProvider.sol";
import "../utils/CubComposition.sol";
import "../utils/TwoBitCubErrors.sol";
import "./TwoBitHoney.sol";

/// @title TwoBitCubs
contract TwoBitCubs is ERC721Enumerable, ICubTraitProvider, Ownable, ReentrancyGuard {
    /*
                          :=====-     .:------::.    :=====:
                        :**++++++#+=--:.      ..:-==#+++++++*=
                       -#******#=.                  .=*#*****#+
                       +*****#=                        :*#****%
                       -#**#*.                           +#***+
                        -###    .=+***=.       =+**+=:    +##=
                          #.  .=*******+      -*******+:   #.
                         -=  .+**%=+%*+:      .+*#+=%***:  :+
                         +.  +***##%#+  .-::-:  =#%##****.  #
                        :+   *******+   -%%%%+   =*******:  -=
                        *.   =******. :- .*#: .=  +*****+    #
                        #.    -+++-.   +%%%%%%#.   -=++-     *:
                        *-.            .#*++*%-             :#
                     =*###-:.            -==-.           .:-*:
                    -#****#*=-:..                    ..::=+=
                    .#*******#**+=-:::::......:::::-==+*#:
                     :##**********####**********####****#*
                       =##*****#******************#******#:
                         :=*###%*****************#+******%:
                             .=*:--===+++++++++#*+******##
                              -=              -*+*******%:
                           -=+****=           #+******#%*=-.
                         =*---+****#.         *#****###*=--++
                        =*.    +***#+          -*####**.    ++
                        +*     =***#*            =#***+     =*
                        .#=.  :***#%*--::::::::--+%#***-.  -#:
                         .+#**##*+-.:-==++++++==-:.-=*###*#+.
                             .............................
    */
    using Strings for uint256;

    /// @dev Price to adopt one cub
    uint256 public constant ADOPTION_PRICE = 0.15 ether;

    /// @dev The number of blocks until a growing cub becomes an adult (roughly 1 week)
    uint256 public constant ADULT_AGE = 44000;

    /// @dev Maximum cubs that will be minted (adopted and bread)
    uint256 public constant MAX_CUBS = 7500; // We expect ~4914 cubs, but are prepared for 7500 in deference to Honey holders, in case there are somehow lots of twins and triplets

    /// @dev Maximum quantity of cubs that can be adopted at once
    uint256 public constant MAX_ADOPT_QUANTITY = 10;

    /// @dev Maximum quantity of cubs that can be adopted in total
    uint256 public constant TOTAL_ADOPTIONS = 2500;

    /// @dev Reference to the TwoBitHoney contract
    TwoBitHoney internal immutable _twoBitHoney;

    /// @dev Counter for adopted Cubs
    uint256 private _adoptedCubs;

    /// @dev Counter for token Ids
    uint256 private _tokenCounter;

    /// @dev Seed for randomness
    uint256 private _seed;

    /// @dev The block number when adoption and mating are available
    uint256 private _wenMint;

    /// @dev Enables/disables the reveal
    bool private _wenReveal;

    /// @dev Mapping of TokenIds to Cub DNA
    mapping(uint256 => ICubTraits.DNA) private _tokenIdsToCubDNA;

    /// @dev Mapping of TokenIds to Cub growth
    mapping(uint256 => uint256) private _tokenIdsToBirthday;

    constructor(address twoBitHoney) ERC721("TwoBitCubs", "TBC") {
        _seed = uint256(keccak256(abi.encodePacked(msg.sender, blockhash(block.number-1), uint24(block.number))));
        _twoBitHoney = TwoBitHoney(twoBitHoney);
        _wenMint = 0;
        _wenReveal = false;
    }

    /// @dev Celebrate and marvel at the astonishing detail in each TwoBitBear Cub
    function adoptCub(uint256 quantity) public payable nonReentrant {
        if (_wenMint == 0 || block.number < _wenMint) revert NotOpenForMinting();
        if (quantity == 0 || quantity > MAX_ADOPT_QUANTITY) revert InvalidAdoptionQuantity();
        if (quantity > remainingAdoptions()) revert AdoptionLimitReached();
        if (msg.value < ADOPTION_PRICE * quantity) revert InvalidPriceSent();
        _mintCubs(0xFFFF, 0xFFFF, quantity);
        _adoptedCubs += quantity;
    }

    /// @notice For easy import into MetaMask 
    function decimals() public pure returns (uint256) {
        return 0;
    }

    /// @inheritdoc ICubTraitProvider
    function familyForTraits(ICubTraits.TraitsV1 memory traits) public pure override returns (string memory) {
        string[18] memory families = ["Maeda", "Buffett", "Milonakis", "Petty", "VanDough", "Dammrich", "Pleasr", "Farmer", "Evan Dennis", "Hobbs", "Viselner", "Ghxsts", "Greenawalt", "Capacity", "Sheridan", "Ong", "Orrell", "Kong"];
        return families[traits.familyIndex];
    }

    /// Mate some bears
    /// @dev Throws if the parent TwoBitBear token IDs are not valid or not owned by the caller, or if the honey balance is insufficient
    function mateBears(uint256 parentBearOne, uint256 parentBearTwo) public nonReentrant {
        if (_wenMint == 0 || block.number < _wenMint) revert NotOpenForMinting();
        if (parentBearOne == parentBearTwo || _twoBitHoney.bearSpecies(parentBearOne) != _twoBitHoney.bearSpecies(parentBearTwo)) revert InvalidParentCombination();
        if (!_twoBitHoney.ownsBear(msg.sender, parentBearOne)) revert BearNotOwned(parentBearOne);
        if (!_twoBitHoney.ownsBear(msg.sender, parentBearTwo)) revert BearNotOwned(parentBearTwo);
        _twoBitHoney.burnHoneyForAddress(msg.sender); // Errors here will bubble up

        uint8 siblingSeed = uint8(_seed % 256);
        uint256 quantity = 1 + CubComposition.randomIndexFromPercentages(siblingSeed, _cubSiblingPercentages());
        _mintCubs(uint16(parentBearOne), uint16(parentBearTwo), quantity);
    }

    /// Wakes a cub from hibernation so that it will begin growing
    /// @dev Throws if msg sender is not the owner of the cub, or if the cub's aging has already begun
    function wakeCub(uint256 tokenId) public nonReentrant {
        if (msg.sender != ownerOf(tokenId)) revert CubNotOwned(tokenId);
        if (_tokenIdsToBirthday[tokenId] > 0) revert AgingAlreadyStarted();
        _tokenIdsToBirthday[tokenId] = block.number;
    }

    /// @inheritdoc ICubTraitProvider
    function isAdopted(ICubTraits.DNA memory dna) public pure override returns (bool) {
        return dna.firstParentTokenId == 0xFFFF; // || dna.secondParentTokenId == 0xFFFF;
    }

    /// @inheritdoc ICubTraitProvider
    function moodForType(ICubTraits.CubMoodType moodType) public pure override returns (string memory) {
        string[14] memory moods = ["Happy", "Hungry", "Sleepy", "Grumpy", "Cheerful", "Excited", "Snuggly", "Confused", "Ravenous", "Ferocious", "Hangry", "Drowsy", "Cranky", "Furious"];
        return moods[uint256(moodType)];
    }

    /// @inheritdoc ICubTraitProvider
    function moodFromParents(uint256 firstParentTokenId, uint256 secondParentTokenId) public view returns (ICubTraits.CubMoodType) {
        IBearable.BearMoodType moodOne = _twoBitHoney.bearMood(firstParentTokenId);
        IBearable.BearMoodType moodTwo = _twoBitHoney.bearMood(secondParentTokenId);
        (uint8 smaller, uint8 larger) = moodOne < moodTwo ? (uint8(moodOne), uint8(moodTwo)) : (uint8(moodTwo), uint8(moodOne));
        if (smaller == 0) {
            return ICubTraits.CubMoodType(4 + larger - smaller);
        } else if (smaller == 1) {
            return ICubTraits.CubMoodType(8 + larger - smaller);
        } else if (smaller == 2) {
            return ICubTraits.CubMoodType(11 + larger - smaller);
        }
        return ICubTraits.CubMoodType(13 + larger - smaller);
    }

    /// @inheritdoc ICubTraitProvider
    function nameForTraits(ICubTraits.TraitsV1 memory traits) public pure override returns (string memory) {
        string[18] memory names = ["Rhett", "Clon", "2476", "Tank", "Gremplin", "eBoy", "Pablo", "Chuck", "Justin", "MouseDev", "Pranksy", "Rik", "Joshua", "Racecar", "0xInuarashi", "OhhShiny", "Gary", "Kilo"];
        return names[traits.nameIndex];
    }

    /// Returns the remaining number of adoptions available
    function remainingAdoptions() public view returns (uint256) {
        return TOTAL_ADOPTIONS - _adoptedCubs;
    }

    /// @inheritdoc ICubTraitProvider
    function speciesForType(ICubTraits.CubSpeciesType speciesType) public pure override returns (string memory) {
        string[4] memory species = ["Brown", "Black", "Polar", "Panda"];
        return species[uint256(speciesType)];
    }

    /// @inheritdoc ICubTraitProvider
    function traitsV1(uint256 tokenId) public view override returns (ICubTraits.TraitsV1 memory traits) {
        if (!_exists(tokenId)) revert NonexistentCub();
        if (!_wenReveal) revert NotYetRevealed();

        ICubTraits.DNA memory dna = _tokenIdsToCubDNA[tokenId];
        bytes memory genes = abi.encodePacked(dna.genes); // 32 Bytes
        uint256 increment = (tokenId % 20) + 1;
        uint256 birthday = _tokenIdsToBirthday[tokenId];
        if (birthday > 0) {
            traits.age = block.number - birthday;
        }
        if (isAdopted(dna)) {
            traits.species = ICubTraits.CubSpeciesType(CubComposition.randomIndexFromPercentages(uint8(genes[9 + increment]), _adoptedPercentages()));
            traits.topColor = CubComposition.colorTopFromRandom(genes, 6 + increment, 3 + increment, 4 + increment, traits.species);
            traits.bottomColor = CubComposition.colorBottomFromRandom(genes, 5 + increment, 7 + increment, 1 + increment, traits.species);
            traits.mood = ICubTraits.CubMoodType(CubComposition.randomIndexFromPercentages(uint8(genes[increment]), _adoptedPercentages()));
        } else {
            traits.species = ICubTraits.CubSpeciesType(uint8(_twoBitHoney.bearSpecies(dna.firstParentTokenId)));
            traits.topColor = CubComposition.randomColorFromColors(_twoBitHoney.bearTopColor(dna.firstParentTokenId), _twoBitHoney.bearTopColor(dna.secondParentTokenId), genes, 6 + increment, 3 + increment);
            traits.bottomColor = CubComposition.randomColorFromColors(_twoBitHoney.bearBottomColor(dna.firstParentTokenId), _twoBitHoney.bearBottomColor(dna.secondParentTokenId), genes, 5 + increment, 7 + increment);
            traits.mood = moodFromParents(dna.firstParentTokenId, dna.secondParentTokenId);
        }
        traits.nameIndex = uint8(uint8(genes[2 + increment]) % 18);
        traits.familyIndex = uint8(uint8(genes[8 + increment]) % 18);
    }

    /// @dev Wen the world is ready
    function revealCubs() public onlyOwner {
        _wenReveal = true;
    }

    /// @dev Enable adoption
    function setMintingBlock(uint256 wenMint) public onlyOwner {
        _wenMint = wenMint;
    }

    /// @dev Exposes the raw image SVG to the world, for any applications that can take advantage
    function imageSVG(uint256 tokenId) public view returns (string memory) {
        ICubTraits.TraitsV1 memory traits = traitsV1(tokenId);        
        return string(CubComposition.createSvg(traits, ADULT_AGE));
    }

    /// @dev Exposes the image URI to the world, for any applications that can take advantage
    function imageURI(uint256 tokenId) public view returns (string memory) {
        return string(abi.encodePacked(_baseImageURI(), Base64.encode(bytes(imageSVG(tokenId)))));
    }

    /// @dev See {IERC721Metadata-tokenURI}.
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        if (!_exists(tokenId)) revert NonexistentCub();
        return string(abi.encodePacked(_baseURI(), Base64.encode(_metadataForToken(tokenId))));
    }

    /// @notice Send funds from sales to the team
    function withdrawAll() public payable onlyOwner {
        payable(0xDC009bCb27c70A6Da5A083AA8C606dEB26806a01).transfer(address(this).balance);
    }

    function _adoptedPercentages() private pure returns (uint8[] memory percentages) {
        uint8[] memory array = new uint8[](3);
        array[0] = 54; // 54% Brown/Happy
        array[1] = 30; // 30% Black/Hungry
        array[2] = 15; // 15% Polar/Sleepy
        return array; // 1% Panda/Grumpy
    }

    function _attributesFromTraits(ICubTraits.TraitsV1 memory traits) private pure returns (bytes memory) {
        return abi.encodePacked(
            "trait_type\":\"Species\",\"value\":\"", speciesForType(traits.species),
            _attributePair("Mood", moodForType(traits.mood)),
            _attributePair("Name", nameForTraits(traits)),
            _attributePair("Family", familyForTraits(traits)),
            _attributePair("Realistic Head Fur", SVG.svgColorWithType(traits.topColor, ISVG.ColorType.None)),
            _attributePair("Realistic Body Fur", SVG.svgColorWithType(traits.bottomColor, ISVG.ColorType.None))
        );
    }

    function _attributePair(string memory name, string memory value) private pure returns (bytes memory) {
        return abi.encodePacked("\"},{\"trait_type\":\"", name, "\",\"value\":\"", value);
    }

    function _baseImageURI() private pure returns (string memory) {
        return "data:image/svg+xml;base64,";
    }

    function _baseURI() internal pure virtual override returns (string memory) {
        return "data:application/json;base64,";
    }

    // @dev should return roughly 2414 mated cubs
    function _cubSiblingPercentages() private pure returns (uint8[] memory percentages) {
        uint8[] memory array = new uint8[](2);
        array[0] = 70; // 70% single cub
        array[1] = 25; // 25% twin cubs
        return array; // 5% triplet cubs
    }

    function _metadataForToken(uint256 tokenId) private view returns (bytes memory) {
        if (_wenReveal) {
            ICubTraits.DNA memory dna = _tokenIdsToCubDNA[tokenId];
            ICubTraits.TraitsV1 memory traits = traitsV1(tokenId);
            return abi.encodePacked(
                "{\"name\":\"",
                    _nameFromTraits(traits, tokenId),
                "\",\"description\":\"",
                    moodForType(traits.mood), " ", speciesForType(traits.species),
                "\",\"attributes\":[{\"",
                    _attributesFromTraits(traits), _parentAttributesFromDNA(dna),
                "\"}],\"image\":\"",
                    _baseImageURI(), Base64.encode(CubComposition.createSvg(traits, ADULT_AGE)),
                "\"}"
            );
        }
        return abi.encodePacked(
            "{\"name\":\"Rendering Cub #", tokenId.toString(), "...\",\"description\":\"Unrevealed\",\"image\":\"ipfs://Qmc5YVyzKZ6D3wjqLFcfUBPtp9yh7NKxst2M2N3nDFdKDZ\"}"
        );
    }

    function _mintCubs(uint16 parentBearOne, uint16 parentBearTwo, uint256 quantity) private {
        if (_tokenCounter + quantity > MAX_CUBS) revert NoMoreCubs();
        uint256 localSeed = _seed; // Write to _seed only at the end of this function to reduce gas
        uint256 tokenId = _tokenCounter;
        for (uint256 i = 0; i < quantity; i++) {
            _safeMint(msg.sender, tokenId);
            _tokenIdsToCubDNA[tokenId] = ICubTraits.DNA(_seed, parentBearOne, parentBearTwo);
            tokenId += 1;
            if (i + 1 < quantity) {
                // Perform a light-weight seed adjustment to save gas
                localSeed = uint256(keccak256(abi.encodePacked(localSeed >> 1)));
            }
        }
        _tokenCounter = tokenId;
        // The sender's transaction now salts the next cubs' randomness
        _seed = uint256(keccak256(abi.encodePacked(localSeed >> 1, msg.sender, blockhash(block.number-1), uint24(block.number))));
    }

    function _nameFromTraits(ICubTraits.TraitsV1 memory traits, uint256 tokenId) private pure returns (string memory) {
        // TwoBitCubs will have 0-based user-facing numbers, to reduce confusion
        string memory speciesSuffix = traits.age < ADULT_AGE ? " Cub #" : " Bear #"; // Adult cubs no longer say 'Cub'
        return string(abi.encodePacked(nameForTraits(traits), " ", familyForTraits(traits), " the ", moodForType(traits.mood), " ", speciesForType(traits.species), speciesSuffix, tokenId.toString()));
    }

    function _parentAttributesFromDNA(ICubTraits.DNA memory dna) private pure returns (bytes memory) {
        if (dna.firstParentTokenId == 0xFFFF) {
            return "";
        }
        // TwoBitBears was 0-based for id's, but 1-based for user-facing numbers (like many apps). Ensure we display user-facing numbers in the attributes
        (uint256 smaller, uint256 larger) = dna.firstParentTokenId < dna.secondParentTokenId ?
            (dna.firstParentTokenId, dna.secondParentTokenId) :
            (dna.secondParentTokenId, dna.firstParentTokenId);
        string memory parents = string(abi.encodePacked("#", (smaller + 1).toString(), " & #", (larger + 1).toString()));
        return _attributePair("Parents", parents);
    }
}

File 2 of 24 : 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 3 of 24 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

File 4 of 24 : ERC721Enumerable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../ERC721.sol";
import "./IERC721Enumerable.sol";

/**
 * @dev This implements an optional extension of {ERC721} defined in the EIP that adds
 * enumerability of all the token ids in the contract as well as all token ids owned by each
 * account.
 */
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
    // Mapping from owner to list of owned token IDs
    mapping(address => mapping(uint256 => uint256)) private _ownedTokens;

    // Mapping from token ID to index of the owner tokens list
    mapping(uint256 => uint256) private _ownedTokensIndex;

    // Array with all token ids, used for enumeration
    uint256[] private _allTokens;

    // Mapping from token id to position in the allTokens array
    mapping(uint256 => uint256) private _allTokensIndex;

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

    /**
     * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds");
        return _ownedTokens[owner][index];
    }

    /**
     * @dev See {IERC721Enumerable-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _allTokens.length;
    }

    /**
     * @dev See {IERC721Enumerable-tokenByIndex}.
     */
    function tokenByIndex(uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds");
        return _allTokens[index];
    }

    /**
     * @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` cannot be the zero address.
     * - `to` cannot be the zero address.
     *
     * 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 override {
        super._beforeTokenTransfer(from, to, tokenId);

        if (from == address(0)) {
            _addTokenToAllTokensEnumeration(tokenId);
        } else if (from != to) {
            _removeTokenFromOwnerEnumeration(from, tokenId);
        }
        if (to == address(0)) {
            _removeTokenFromAllTokensEnumeration(tokenId);
        } else if (to != from) {
            _addTokenToOwnerEnumeration(to, tokenId);
        }
    }

    /**
     * @dev Private function to add a token to this extension's ownership-tracking data structures.
     * @param to address representing the new owner of the given token ID
     * @param tokenId uint256 ID of the token to be added to the tokens list of the given address
     */
    function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
        uint256 length = ERC721.balanceOf(to);
        _ownedTokens[to][length] = tokenId;
        _ownedTokensIndex[tokenId] = length;
    }

    /**
     * @dev Private function to add a token to this extension's token tracking data structures.
     * @param tokenId uint256 ID of the token to be added to the tokens list
     */
    function _addTokenToAllTokensEnumeration(uint256 tokenId) private {
        _allTokensIndex[tokenId] = _allTokens.length;
        _allTokens.push(tokenId);
    }

    /**
     * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that
     * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for
     * gas optimizations e.g. when performing a transfer operation (avoiding double writes).
     * This has O(1) time complexity, but alters the order of the _ownedTokens array.
     * @param from address representing the previous owner of the given token ID
     * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address
     */
    function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {
        // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = ERC721.balanceOf(from) - 1;
        uint256 tokenIndex = _ownedTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary
        if (tokenIndex != lastTokenIndex) {
            uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];

            _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
            _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index
        }

        // This also deletes the contents at the last position of the array
        delete _ownedTokensIndex[tokenId];
        delete _ownedTokens[from][lastTokenIndex];
    }

    /**
     * @dev Private function to remove a token from this extension's token tracking data structures.
     * This has O(1) time complexity, but alters the order of the _allTokens array.
     * @param tokenId uint256 ID of the token to be removed from the tokens list
     */
    function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {
        // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = _allTokens.length - 1;
        uint256 tokenIndex = _allTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so
        // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding
        // an 'if' statement (like in _removeTokenFromOwnerEnumeration)
        uint256 lastTokenId = _allTokens[lastTokenIndex];

        _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
        _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index

        // This also deletes the contents at the last position of the array
        delete _allTokensIndex[tokenId];
        _allTokens.pop();
    }
}

File 5 of 24 : 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 24 : base64.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0;

/// @title Base64
/// @author Brecht Devos - <[email protected]>
/// @notice Provides functions for encoding/decoding base64
library Base64 {
    string internal constant TABLE_ENCODE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
    bytes  internal constant TABLE_DECODE = hex"0000000000000000000000000000000000000000000000000000000000000000"
                                            hex"00000000000000000000003e0000003f3435363738393a3b3c3d000000000000"
                                            hex"00000102030405060708090a0b0c0d0e0f101112131415161718190000000000"
                                            hex"001a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132330000000000";

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

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

        // 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) {}
            {
                // read 3 bytes
                dataPtr := add(dataPtr, 3)
                let input := mload(dataPtr)

                // write 4 characters
                mstore8(resultPtr, mload(add(tablePtr, and(shr(18, input), 0x3F))))
                resultPtr := add(resultPtr, 1)
                mstore8(resultPtr, mload(add(tablePtr, and(shr(12, input), 0x3F))))
                resultPtr := add(resultPtr, 1)
                mstore8(resultPtr, mload(add(tablePtr, and(shr( 6, input), 0x3F))))
                resultPtr := add(resultPtr, 1)
                mstore8(resultPtr, 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;
    }

    function decode(string memory _data) internal pure returns (bytes memory) {
        bytes memory data = bytes(_data);

        if (data.length == 0) return new bytes(0);
        require(data.length % 4 == 0, "invalid base64 decoder input");

        // load the table into memory
        bytes memory table = TABLE_DECODE;

        // every 4 characters represent 3 bytes
        uint256 decodedLen = (data.length / 4) * 3;

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

        assembly {
            // padding with '='
            let lastBytes := mload(add(data, mload(data)))
            if eq(and(lastBytes, 0xFF), 0x3d) {
                decodedLen := sub(decodedLen, 1)
                if eq(and(lastBytes, 0xFFFF), 0x3d3d) {
                    decodedLen := sub(decodedLen, 1)
                }
            }

            // set the actual output length
            mstore(result, decodedLen)

            // 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, 4 characters at a time
            for {} lt(dataPtr, endPtr) {}
            {
               // read 4 characters
               dataPtr := add(dataPtr, 4)
               let input := mload(dataPtr)

               // write 3 bytes
               let output := add(
                   add(
                       shl(18, and(mload(add(tablePtr, and(shr(24, input), 0xFF))), 0xFF)),
                       shl(12, and(mload(add(tablePtr, and(shr(16, input), 0xFF))), 0xFF))),
                   add(
                       shl( 6, and(mload(add(tablePtr, and(shr( 8, input), 0xFF))), 0xFF)),
                               and(mload(add(tablePtr, and(        input , 0xFF))), 0xFF)
                    )
                )
                mstore(resultPtr, shl(232, output))
                resultPtr := add(resultPtr, 3)
            }
        }

        return result;
    }
}

File 7 of 24 : ICubTraitProvider.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
pragma abicoder v2;

import "./ICubTraits.sol";

/// @title TwoBitCubs NFT Interface for provided ICubTraits
interface ICubTraitProvider{

    /// Returns the family of a TwoBitCub as a string
    /// @param traits The traits of the Cub
    /// @return The family text
    function familyForTraits(ICubTraits.TraitsV1 memory traits) external pure returns (string memory);

    /// Returns whether the TwoBitCub with the given DNA is adopted
    /// @param dna The DNA of the Cub
    /// @return Whether the cub is adopted
    function isAdopted(ICubTraits.DNA memory dna) external pure returns (bool);

    /// Returns the text of a mood based on the supplied type
    /// @param moodType The CubMoodType
    /// @return The mood text
    function moodForType(ICubTraits.CubMoodType moodType) external pure returns (string memory);

    /// Returns the mood of a TwoBitCub based on its TwoBitBear parents
    /// @param firstParentTokenId The ID of the token that represents the first parent
    /// @param secondParentTokenId The ID of the token that represents the second parent
    /// @return The mood type
    function moodFromParents(uint256 firstParentTokenId, uint256 secondParentTokenId) external view returns (ICubTraits.CubMoodType);

    /// Returns the name of a TwoBitCub as a string
    /// @param traits The traits of the Cub
    /// @return The name text
    function nameForTraits(ICubTraits.TraitsV1 memory traits) external pure returns (string memory);
    
    /// Returns the text of a species based on the supplied type
    /// @param speciesType The CubSpeciesType
    /// @return The species text
    function speciesForType(ICubTraits.CubSpeciesType speciesType) external pure returns (string memory);

    /// Returns the v1 traits associated with a given token ID.
    /// @dev Throws if the token ID is not valid.
    /// @param tokenId The ID of the token that represents the Cub
    /// @return traits memory
    function traitsV1(uint256 tokenId) external view returns (ICubTraits.TraitsV1 memory traits);
}

File 8 of 24 : CubComposition.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "../interfaces/ICubTraits.sol";
import "./SVG.sol";

/// @title CubComposition
library CubComposition {

    using Strings for uint256;

    /// Returns the bottom color of a Two Bit Bear using a random source of bytes and r/g/b indices into the array
    function colorBottomFromRandom(bytes memory source, uint256 indexRed, uint256 indexGreen, uint256 indexBlue, ICubTraits.CubSpeciesType species) internal pure returns (ISVG.Color memory) {
        return SVG.randomizeColors(
            _colorBottomFloorForSpecies(species),
            _colorBottomCeilingForSpecies(species),
            ISVG.Color(uint8(source[indexRed]), uint8(source[indexGreen]), uint8(source[indexBlue]), 0xFF)
        );
    }

    /// Returns the top color of a Two Bit Bear using a random source of bytes and r/g/b indices into the array
    function colorTopFromRandom(bytes memory source, uint256 indexRed, uint256 indexGreen, uint256 indexBlue, ICubTraits.CubSpeciesType species) internal pure returns (ISVG.Color memory) {
        return SVG.randomizeColors(
            _colorTopFloorForSpecies(species),
            _colorTopCeilingForSpecies(species),
            ISVG.Color(uint8(source[indexRed]), uint8(source[indexGreen]), uint8(source[indexBlue]), 0xFF)
        );
    }

    /// Mixes two input colors with random variations based on provided seed data and percentages
    function randomColorFromColors(ISVG.Color memory color1, ISVG.Color memory color2, bytes memory source, uint256 indexRatio, uint256 indexPercentage) internal pure returns (ISVG.Color memory color) {
        // ratioPercentage will range from 0-100 to lean towards color1 or color2 when mixing
        // totalPercentage will range from 97-103 to either undermix or overmix the parent colors
        color = SVG.mixColors(color1, color2, uint8(source[indexRatio]) % 101, 97 + (uint8(source[indexPercentage]) % 7));
        color.alpha = 0xFF; // Force the alpha to fully opaque, regardless of mixing
    }

    /// Creates the SVG for a TwoBitBear Cub based on its ICubDetail.Traits
    function createSvg(ICubTraits.TraitsV1 memory traits, uint256 adultAge) internal pure returns (bytes memory) {
        string memory transform = svgTransform(traits, adultAge);
        return abi.encodePacked(
            SVG.svgOpen(1080, 1080),
            _createPath(SVG.brightenColor(traits.topColor, 7), "Head", "M405 675 L540 675 540 540 405 540 Z", "M370 675 L570 675 570 540 370 560 Z", transform),
            _createPath(traits.topColor, "HeadShadow", "M540 675 L675 675 675 540 540 540 Z", "M570 675 L710 675 710 564 570 540 Z", transform),
            _createPath(SVG.brightenColor(traits.bottomColor, 7), "Torso", "M405 810 L540 810 540 675 405 675 Z", "M370 790 L570 810 570 675 370 675 Z", transform),
            _createPath(traits.bottomColor, "TorsoShadow", "M540 810 L675 810 675 675 540 675 Z", "M570 810 L710 786 710 675 570 675 Z", transform),
            "</svg>"
        );
    }

    function _createPath(ISVG.Color memory color, string memory name, string memory path1, string memory path2, string memory transform) private pure returns (bytes memory) {
        return abi.encodePacked(
            "<path id='", name, "' d='", path1, "'", SVG.svgColorWithType(color, ISVG.ColorType.Fill), transform, "><animate attributeName='d' values='", path1, ";", path2, "' begin='4s' dur='1s' fill='freeze'/></path>"
        );
    }

    /// Returns a value based on the spread of a random seed and provided percentages (last percentage is assumed if the sum of all elements do not add up to 100)
    function randomIndexFromPercentages(uint8 random, uint8[] memory percentages) internal pure returns (uint256) {
        uint256 spread = random % 100;
        uint256 remainingPercent = 100;
        for (uint256 i = 0; i < percentages.length; i++) {
            remainingPercent -= percentages[i];
            if (spread >= remainingPercent) {
                return i;
            }
        }
        return percentages.length;
    }

    /// Creates a `transform` attribute for a `path` element based on the age of the cub
    function svgTransform(ICubTraits.TraitsV1 memory traits, uint256 adultAge) internal pure returns (string memory) {
        (string memory yScale, string memory yTranslate) = _yTransforms(traits, adultAge);
        return string(abi.encodePacked(" transform='translate(0,", yTranslate, "),scale(1,", yScale, ")'"));
    }

    function toSvgColor(uint24 packedColor) internal pure returns (ISVG.Color memory color) {
        color.red = uint8(packedColor >> 16);
        color.green = uint8(packedColor >> 8);
        color.blue = uint8(packedColor);
        color.alpha = 0xFF;
    }

    function _colorBottomFloorForSpecies(ICubTraits.CubSpeciesType species) private pure returns (ISVG.Color memory) {
        if (species == ICubTraits.CubSpeciesType.Brown) {
            return toSvgColor(0x40260E);
        } else if (species == ICubTraits.CubSpeciesType.Black) {
            return toSvgColor(0x222225);
        } else if (species == ICubTraits.CubSpeciesType.Polar) {
            return toSvgColor(0xB1B6B4);
        } else { // Panda
            return toSvgColor(0x000000);
        }
    }

    function _colorBottomCeilingForSpecies(ICubTraits.CubSpeciesType species) private pure returns (ISVG.Color memory) {
        if (species == ICubTraits.CubSpeciesType.Brown) {
            return toSvgColor(0x77512D);
        } else if (species == ICubTraits.CubSpeciesType.Black) {
            return toSvgColor(0x48484D);
        } else if (species == ICubTraits.CubSpeciesType.Polar) {
            return toSvgColor(0xDFE7E6);
        } else { // Panda
            return toSvgColor(0x121213);
        }
    }

    function _colorTopFloorForSpecies(ICubTraits.CubSpeciesType species) private pure returns (ISVG.Color memory) {
        if (species == ICubTraits.CubSpeciesType.Brown) {
            return toSvgColor(0x8D5D33);
        } else if (species == ICubTraits.CubSpeciesType.Black) {
            return toSvgColor(0x383840);
        } else if (species == ICubTraits.CubSpeciesType.Polar) {
            return toSvgColor(0xD0E5E2);
        } else { // Panda
            return toSvgColor(0xDDDDDE);
        }
    }

    function _colorTopCeilingForSpecies(ICubTraits.CubSpeciesType species) private pure returns (ISVG.Color memory) {
        if (species == ICubTraits.CubSpeciesType.Brown) {
            return toSvgColor(0xC1A286);
        } else if (species == ICubTraits.CubSpeciesType.Black) {
            return toSvgColor(0x575C6D);
        } else if (species == ICubTraits.CubSpeciesType.Polar) {
            return toSvgColor(0xEBF0EF);
        } else { // Panda
            return toSvgColor(0xE2E1E8);
        }
    }

    function _yTransforms(ICubTraits.TraitsV1 memory traits, uint256 adultAge) private pure returns (string memory scale, string memory translate) {
        if (traits.age >= adultAge) {
            translate = "-810";
            scale = "2";
        } else if (traits.age > 0) {
            uint256 fraction = traits.age * 810 / adultAge;
            translate = fraction < 1 ? "-1" : string(abi.encodePacked("-", fraction.toString()));
            fraction = traits.age * 100 / adultAge;
            scale = string(abi.encodePacked(fraction < 10 ? "1.0" : "1.", fraction.toString()));
        } else {
            translate = "0";
            scale = "1";
        }
    }
}

File 9 of 24 : TwoBitCubErrors.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

/// @dev When total adoption quantity has been reached
error AdoptionLimitReached();

/// @dev When cub aging has already started
error AgingAlreadyStarted();

/// @dev When the parent bear is not owned by the caller
error BearNotOwned(uint256 tokenId);

/// @dev When the cub is not owned by the caller
error CubNotOwned(uint256 tokenId);

/// @dev When adoption quantity is too high or too low
error InvalidAdoptionQuantity();

/// @dev When the parent identifiers are not unique or not of the same species
error InvalidParentCombination();

/// @dev When the price for adoption is not correct
error InvalidPriceSent();

/// @dev When the maximum number of cubs has been met
error NoMoreCubs();

/// @dev When the cub tokenId does not exist
error NonexistentCub();

/// @dev When minting block hasn't yet been reached
error NotOpenForMinting();

/// @dev When Reveal is false
error NotYetRevealed();

File 10 of 24 : TwoBitHoney.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";
import "../interfaces/IBearable.sol";

/// Represents a deployed TwoBitHoney contract
abstract contract TwoBitHoney is IERC1155, IBearable {

    /// Sets the address of the TwoBitCubs contract, which will have rights to burn honey tokens
    function setCubsContractAddress(address cubsContract) external virtual;

    /// Performs the burn of a single honey token on behalf of the TwoBitCubs contract
    /// @dev Throws if the msg.sender is not the configured TwoBitCubs contract
    function burnHoneyForAddress(address burnTokenAddress) external virtual;
}

File 11 of 24 : 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 12 of 24 : 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 13 of 24 : IERC721Enumerable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Enumerable is IERC721 {
    /**
     * @dev Returns the total amount of tokens stored by the contract.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns a token ID owned by `owner` at a given `index` of its token list.
     * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId);

    /**
     * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
     * Use along with {totalSupply} to enumerate all tokens.
     */
    function tokenByIndex(uint256 index) external view returns (uint256);
}

File 14 of 24 : 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 15 of 24 : 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 16 of 24 : 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 17 of 24 : 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 18 of 24 : 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 19 of 24 : 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 20 of 24 : ICubTraits.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "./ISVG.sol";

/// @title ICubTraits interface
interface ICubTraits {

    /// Represents the species of a TwoBitCub
    enum CubSpeciesType {
        Brown, Black, Polar, Panda
    }

    /// Represents the mood of a TwoBitCub
    enum CubMoodType {
        Happy, Hungry, Sleepy, Grumpy, Cheerful, Excited, Snuggly, Confused, Ravenous, Ferocious, Hangry, Drowsy, Cranky, Furious
    }

    // Represents the DNA for a TwoBitCub
    struct DNA {
        uint256 genes;
        uint16 firstParentTokenId;
        uint16 secondParentTokenId;
    }

    /// Represents the v1 traits of a TwoBitCub
    /// @dev so...there'll be more?
    struct TraitsV1 {
        uint256 age;
        ISVG.Color topColor;
        ISVG.Color bottomColor;
        uint8 nameIndex;
        uint8 familyIndex;
        CubMoodType mood;
        CubSpeciesType species;
    }
}

File 21 of 24 : ISVG.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

/// @title ISVG image library interface
interface ISVG {

    /// Represents a color in RGB format with alpha
    struct Color {
        uint8 red;
        uint8 green;
        uint8 blue;
        uint8 alpha;
    }

    /// Represents a color type in an SVG image file
    enum ColorType {
        Fill, Stroke, None
    }
}

File 22 of 24 : SVG.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "@openzeppelin/contracts/utils/Strings.sol";
import "../interfaces/ISVG.sol";

error RatioInvalid();

/// @title SVG image library
library SVG {

    using Strings for uint256;

    /// Returns a Color that is brightened by the provided percentage
    /// @dev Any color component that is 0 will be treated as if it is 1. Also does not modify alpha
    function brightenColor(ISVG.Color memory source, uint32 percentage) internal pure returns (ISVG.Color memory color) {
        color.red = _brightenComponent(source.red, percentage);
        color.green = _brightenComponent(source.green, percentage);
        color.blue = _brightenComponent(source.blue, percentage);
        color.alpha = source.alpha;
    }

    /// Returns a mixed Color by balancing the ratio of `color1` over `color2`, with a total percentage (for overmixing and undermixing outside the source bounds)
    /// @dev Reverts with `RatioInvalid()` if `ratioPercentage` is > 100
    function mixColors(ISVG.Color memory color1, ISVG.Color memory color2, uint32 ratioPercentage, uint32 totalPercentage) internal pure returns (ISVG.Color memory color) {
        if (ratioPercentage > 100) revert RatioInvalid();
        color.red = _mixComponents(color1.red, color2.red, ratioPercentage, totalPercentage);
        color.green = _mixComponents(color1.green, color2.green, ratioPercentage, totalPercentage);
        color.blue = _mixComponents(color1.blue, color2.blue, ratioPercentage, totalPercentage);
        color.alpha = _mixComponents(color1.alpha, color2.alpha, ratioPercentage, totalPercentage);
    }

    /// Returns a proportionally-randomized Color between the floor and ceiling colors using a random Color seed
    /// @dev This algorithm does not support floor rgb values matching ceiling rgb values (ceiling must be at least +1 higher for each component)
    function randomizeColors(ISVG.Color memory floor, ISVG.Color memory ceiling, ISVG.Color memory random) internal pure returns (ISVG.Color memory color) {
        uint16 percent = (uint16(random.red) + uint16(random.green) + uint16(random.blue)) % 101; // Range is from 0-100
        color.red = _randomizeComponent(floor.red, ceiling.red, random.red, percent);
        color.green = _randomizeComponent(floor.green, ceiling.green, random.green, percent);
        color.blue = _randomizeComponent(floor.blue, ceiling.blue, random.blue, percent);
        color.alpha = 0xFF;
    }

    /// Returns an RGB string suitable for SVG based on the supplied Color and ColorType
    /// @dev includes necessary leading space for all types _except_ None
    function svgColorWithType(ISVG.Color memory color, ISVG.ColorType colorType) internal pure returns (string memory) {
        require(uint(colorType) < 3, "Invalid colorType");
        if (colorType == ISVG.ColorType.Fill) return string(abi.encodePacked(" fill='rgb(", _rawColor(color), ")'"));
        if (colorType == ISVG.ColorType.Stroke) return string(abi.encodePacked(" stroke='rgb(", _rawColor(color), ")'"));
        return string(abi.encodePacked("rgb(", _rawColor(color), ")")); // Fallback to None
    }
    
    /// Returns the opening of an SVG tag based on the supplied width and height
    function svgOpen(uint256 width, uint256 height) internal pure returns (string memory) {
        return string(abi.encodePacked("<svg viewBox='0 0 ", width.toString(), " ", height.toString(), "' xmlns='http://www.w3.org/2000/svg' version='1.1'>"));
    }

    function _brightenComponent(uint8 component, uint32 percentage) private pure returns (uint8 result) {
        uint32 brightenedComponent = (component == 0 ? 1 : component) * (percentage + 100) / 100;
        if (brightenedComponent > 0xFF) {
            result = 0xFF; // Clamp to 8 bits
        } else {
            result = uint8(brightenedComponent);
        }
    }

    function _mixComponents(uint8 component1, uint8 component2, uint32 ratioPercentage, uint32 totalPercentage) private pure returns (uint8 component) {
        uint32 mixedComponent = (uint32(component1) * ratioPercentage + uint32(component2) * (100 - ratioPercentage)) * totalPercentage / 10000;
        if (mixedComponent > 0xFF) {
            component = 0xFF; // Clamp to 8 bits
        } else {
            component = uint8(mixedComponent);
        }
    }

    function _randomizeComponent(uint8 floor, uint8 ceiling, uint8 random, uint16 percent) private pure returns (uint8 component) {
        component = floor + uint8(uint16(ceiling - (random & 0x01) - floor) * percent / uint16(100));
    }

    function _rawColor(ISVG.Color memory color) private pure returns (string memory) {
        return string(abi.encodePacked(uint256(color.red).toString(), ",", uint256(color.green).toString(), ",", uint256(color.blue).toString()));
    }
}

File 23 of 24 : IERC1155.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165.sol";

/**
 * @dev Required interface of an ERC1155 compliant contract, as defined in the
 * https://eips.ethereum.org/EIPS/eip-1155[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155 is IERC165 {
    /**
     * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.
     */
    event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);

    /**
     * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all
     * transfers.
     */
    event TransferBatch(
        address indexed operator,
        address indexed from,
        address indexed to,
        uint256[] ids,
        uint256[] values
    );

    /**
     * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to
     * `approved`.
     */
    event ApprovalForAll(address indexed account, address indexed operator, bool approved);

    /**
     * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.
     *
     * If an {URI} event was emitted for `id`, the standard
     * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value
     * returned by {IERC1155MetadataURI-uri}.
     */
    event URI(string value, uint256 indexed id);

    /**
     * @dev Returns the amount of tokens of token type `id` owned by `account`.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(address account, uint256 id) external view returns (uint256);

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)
        external
        view
        returns (uint256[] memory);

    /**
     * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,
     *
     * Emits an {ApprovalForAll} event.
     *
     * Requirements:
     *
     * - `operator` cannot be the caller.
     */
    function setApprovalForAll(address operator, bool approved) external;

    /**
     * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.
     *
     * See {setApprovalForAll}.
     */
    function isApprovedForAll(address account, address operator) external view returns (bool);

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}.
     * - `from` must have a balance of tokens of type `id` of at least `amount`.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes calldata data
    ) external;

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] calldata ids,
        uint256[] calldata amounts,
        bytes calldata data
    ) external;
}

File 24 of 24 : IBearable.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "./ISVG.sol";

/// @title Interface for accessing official TwoBitBears data
interface IBearable {

    /// Represents the species of a TwoBitBear
    enum BearSpeciesType {
        Brown, Black, Polar, Panda
    }

    /// Represents the mood of a TwoBitBear
    enum BearMoodType {
        Happy, Hungry, Sleepy, Grumpy
    }

    /// Returns whether the TwoBitBear at tokenId currently belongs to the owner
    /// @dev Throws if the token ID is not valid.
    function ownsBear(address possibleOwner, uint256 tokenId) external view returns (bool);

    /// Returns the total tokens in the TwoBitBear contract
    function totalBears() external view returns (uint256);

    /// Returns the realistic body fur color of the TwoBitBear at tokenId
    /// @dev Throws if the token ID is not valid.
    function bearBottomColor(uint256 tokenId) external view returns (ISVG.Color memory color);

    /// Returns the all-important `BearMoodType` of the TwoBitBear at tokenId (be nice)
    /// @dev Throws if the token ID is not valid.
    function bearMood(uint256 tokenId) external view returns (BearMoodType);

    /// Returns the BearSpeciesType of the TwoBitBear at tokenId
    /// @dev Throws if the token ID is not valid.
    function bearSpecies(uint256 tokenId) external view returns (BearSpeciesType);

    /// Returns the realistic head fur color of the TwoBitBear at tokenId
    /// @dev Throws if the token ID is not valid.
    function bearTopColor(uint256 tokenId) external view returns (ISVG.Color memory color);
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "metadata": {
    "useLiteralContent": true
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"twoBitHoney","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AdoptionLimitReached","type":"error"},{"inputs":[],"name":"AgingAlreadyStarted","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"BearNotOwned","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"CubNotOwned","type":"error"},{"inputs":[],"name":"InvalidAdoptionQuantity","type":"error"},{"inputs":[],"name":"InvalidParentCombination","type":"error"},{"inputs":[],"name":"InvalidPriceSent","type":"error"},{"inputs":[],"name":"NoMoreCubs","type":"error"},{"inputs":[],"name":"NonexistentCub","type":"error"},{"inputs":[],"name":"NotOpenForMinting","type":"error"},{"inputs":[],"name":"NotYetRevealed","type":"error"},{"inputs":[],"name":"RatioInvalid","type":"error"},{"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":"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":[],"name":"ADOPTION_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ADULT_AGE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_ADOPT_QUANTITY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_CUBS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TOTAL_ADOPTIONS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"adoptCub","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"age","type":"uint256"},{"components":[{"internalType":"uint8","name":"red","type":"uint8"},{"internalType":"uint8","name":"green","type":"uint8"},{"internalType":"uint8","name":"blue","type":"uint8"},{"internalType":"uint8","name":"alpha","type":"uint8"}],"internalType":"struct ISVG.Color","name":"topColor","type":"tuple"},{"components":[{"internalType":"uint8","name":"red","type":"uint8"},{"internalType":"uint8","name":"green","type":"uint8"},{"internalType":"uint8","name":"blue","type":"uint8"},{"internalType":"uint8","name":"alpha","type":"uint8"}],"internalType":"struct ISVG.Color","name":"bottomColor","type":"tuple"},{"internalType":"uint8","name":"nameIndex","type":"uint8"},{"internalType":"uint8","name":"familyIndex","type":"uint8"},{"internalType":"enum ICubTraits.CubMoodType","name":"mood","type":"uint8"},{"internalType":"enum ICubTraits.CubSpeciesType","name":"species","type":"uint8"}],"internalType":"struct ICubTraits.TraitsV1","name":"traits","type":"tuple"}],"name":"familyForTraits","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"imageSVG","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"imageURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"genes","type":"uint256"},{"internalType":"uint16","name":"firstParentTokenId","type":"uint16"},{"internalType":"uint16","name":"secondParentTokenId","type":"uint16"}],"internalType":"struct ICubTraits.DNA","name":"dna","type":"tuple"}],"name":"isAdopted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","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":"parentBearOne","type":"uint256"},{"internalType":"uint256","name":"parentBearTwo","type":"uint256"}],"name":"mateBears","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"enum ICubTraits.CubMoodType","name":"moodType","type":"uint8"}],"name":"moodForType","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"firstParentTokenId","type":"uint256"},{"internalType":"uint256","name":"secondParentTokenId","type":"uint256"}],"name":"moodFromParents","outputs":[{"internalType":"enum ICubTraits.CubMoodType","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"age","type":"uint256"},{"components":[{"internalType":"uint8","name":"red","type":"uint8"},{"internalType":"uint8","name":"green","type":"uint8"},{"internalType":"uint8","name":"blue","type":"uint8"},{"internalType":"uint8","name":"alpha","type":"uint8"}],"internalType":"struct ISVG.Color","name":"topColor","type":"tuple"},{"components":[{"internalType":"uint8","name":"red","type":"uint8"},{"internalType":"uint8","name":"green","type":"uint8"},{"internalType":"uint8","name":"blue","type":"uint8"},{"internalType":"uint8","name":"alpha","type":"uint8"}],"internalType":"struct ISVG.Color","name":"bottomColor","type":"tuple"},{"internalType":"uint8","name":"nameIndex","type":"uint8"},{"internalType":"uint8","name":"familyIndex","type":"uint8"},{"internalType":"enum ICubTraits.CubMoodType","name":"mood","type":"uint8"},{"internalType":"enum ICubTraits.CubSpeciesType","name":"species","type":"uint8"}],"internalType":"struct ICubTraits.TraitsV1","name":"traits","type":"tuple"}],"name":"nameForTraits","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","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":[],"name":"remainingAdoptions","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"revealCubs","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":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"wenMint","type":"uint256"}],"name":"setMintingBlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"enum ICubTraits.CubSpeciesType","name":"speciesType","type":"uint8"}],"name":"speciesForType","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","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":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"uint256","name":"tokenId","type":"uint256"}],"name":"traitsV1","outputs":[{"components":[{"internalType":"uint256","name":"age","type":"uint256"},{"components":[{"internalType":"uint8","name":"red","type":"uint8"},{"internalType":"uint8","name":"green","type":"uint8"},{"internalType":"uint8","name":"blue","type":"uint8"},{"internalType":"uint8","name":"alpha","type":"uint8"}],"internalType":"struct ISVG.Color","name":"topColor","type":"tuple"},{"components":[{"internalType":"uint8","name":"red","type":"uint8"},{"internalType":"uint8","name":"green","type":"uint8"},{"internalType":"uint8","name":"blue","type":"uint8"},{"internalType":"uint8","name":"alpha","type":"uint8"}],"internalType":"struct ISVG.Color","name":"bottomColor","type":"tuple"},{"internalType":"uint8","name":"nameIndex","type":"uint8"},{"internalType":"uint8","name":"familyIndex","type":"uint8"},{"internalType":"enum ICubTraits.CubMoodType","name":"mood","type":"uint8"},{"internalType":"enum ICubTraits.CubSpeciesType","name":"species","type":"uint8"}],"internalType":"struct ICubTraits.TraitsV1","name":"traits","type":"tuple"}],"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"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"wakeCub","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawAll","outputs":[],"stateMutability":"payable","type":"function"}]

60a06040523480156200001157600080fd5b5060405162005c5438038062005c54833981016040819052620000349162000235565b604080518082018252600a81526954776f4269744375627360b01b60208083019182528351808501909452600384526254424360e81b90840152815191929162000081916000916200018f565b508051620000979060019060208401906200018f565b505050620000b4620000ae6200013960201b60201c565b6200013d565b6001600b8190553390620000c9904362000267565b60405160609290921b6001600160601b03191660208301524060348201524360e81b6001600160e81b031916605482015260570160408051601f198184030181529190528051602090910120600e556001600160a01b03166080526000600f556010805460ff19169055620002ca565b3390565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8280546200019d906200028d565b90600052602060002090601f016020900481019282620001c157600085556200020c565b82601f10620001dc57805160ff19168380011785556200020c565b828001600101855582156200020c579182015b828111156200020c578251825591602001919060010190620001ef565b506200021a9291506200021e565b5090565b5b808211156200021a57600081556001016200021f565b6000602082840312156200024857600080fd5b81516001600160a01b03811681146200026057600080fd5b9392505050565b6000828210156200028857634e487b7160e01b600052601160045260246000fd5b500390565b600181811c90821680620002a257607f821691505b60208210811415620002c457634e487b7160e01b600052602260045260246000fd5b50919050565b6080516159216200033360003960008181610e6201528181610f0b01528181610fdb0152818161109901528181611150015281816114de015281816115d4015281816116750152818161173d015281816117de015281816119630152611a0101526159216000f3fe6080604052600436106102465760003560e01c80636352211e11610139578063a0fe6d42116100b6578063cf09dead1161007a578063cf09dead14610677578063cf9c526514610697578063d48c7418146106c0578063e985e9c5146106d6578063f2fde38b1461071f578063f9ead7db1461073f57600080fd5b8063a0fe6d42146105ec578063a22cb46514610601578063b88d4fde14610621578063c87b56dd14610641578063cd93f59b1461066157600080fd5b8063853828b6116100fd578063853828b61461057e5780638da5cb5b146105865780638f742d16146105a457806395d89b41146105c45780639674ce01146105d957600080fd5b80636352211e146104f45780636fc43e5e1461051457806370a0823114610534578063715018a6146105545780637a62da681461056957600080fd5b806323b872dd116101c75780634aa5524b1161018b5780634aa5524b1461043a5780634f6ccce71461045a57806351008a901461047a57806352082bfc146104a75780635ad21b2c146104d457600080fd5b806323b872dd146103b05780632f745c59146103d0578063313ce567146103f057806337591d1e1461040457806342842e0e1461041a57600080fd5b80630e165b8c1161020e5780630e165b8c1461031c578063110f92c91461033c578063120c390c1461035c57806318160ddd1461037f5780631ded3d9e1461039457600080fd5b806301ffc9a71461024b578063021bec801461028057806306fdde03146102a2578063081812fc146102c4578063095ea7b3146102fc575b600080fd5b34801561025757600080fd5b5061026b610266366004614493565b61075f565b60405190151581526020015b60405180910390f35b34801561028c57600080fd5b506102a061029b3660046144b0565b61078a565b005b3480156102ae57600080fd5b506102b76107c2565b6040516102779190614521565b3480156102d057600080fd5b506102e46102df3660046144b0565b610854565b6040516001600160a01b039091168152602001610277565b34801561030857600080fd5b506102a061031736600461454b565b6108e9565b34801561032857600080fd5b506102b761033736600461458d565b6109ff565b34801561034857600080fd5b506102b76103573660046146a3565b610ab0565b34801561036857600080fd5b50610371600a81565b604051908152602001610277565b34801561038b57600080fd5b50600854610371565b3480156103a057600080fd5b50610371670214e8348c4f000081565b3480156103bc57600080fd5b506102a06103cb366004614755565b610d0b565b3480156103dc57600080fd5b506103716103eb36600461454b565b610d3c565b3480156103fc57600080fd5b506000610371565b34801561041057600080fd5b506103716109c481565b34801561042657600080fd5b506102a0610435366004614755565b610dd2565b34801561044657600080fd5b506102a0610455366004614791565b610ded565b34801561046657600080fd5b506103716104753660046144b0565b6111fe565b34801561048657600080fd5b5061049a6104953660046144b0565b611291565b60405161027791906147dd565b3480156104b357600080fd5b506104c76104c2366004614791565b611940565b60405161027791906148ba565b3480156104e057600080fd5b506102b76104ef3660046144b0565b611ba0565b34801561050057600080fd5b506102e461050f3660046144b0565b611bc2565b34801561052057600080fd5b506102b761052f3660046148c8565b611c39565b34801561054057600080fd5b5061037161054f3660046148e3565b611e31565b34801561056057600080fd5b506102a0611eb8565b34801561057557600080fd5b50610371611eee565b6102a0611f05565b34801561059257600080fd5b50600a546001600160a01b03166102e4565b3480156105b057600080fd5b506102b76105bf3660046144b0565b611f72565b3480156105d057600080fd5b506102b7611fe6565b6102a06105e73660046144b0565b611ff5565b3480156105f857600080fd5b506102a06120fc565b34801561060d57600080fd5b506102a061061c36600461490c565b612135565b34801561062d57600080fd5b506102a061063c366004614943565b6121fa565b34801561064d57600080fd5b506102b761065c3660046144b0565b612232565b34801561066d57600080fd5b5061037161abe081565b34801561068357600080fd5b506102b76106923660046146a3565b6122aa565b3480156106a357600080fd5b5061026b6106b2366004614a15565b6020015161ffff9081161490565b3480156106cc57600080fd5b50610371611d4c81565b3480156106e257600080fd5b5061026b6106f1366004614a7a565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b34801561072b57600080fd5b506102a061073a3660046148e3565b612517565b34801561074b57600080fd5b506102a061075a3660046144b0565b6125af565b60006001600160e01b0319821663780e9d6360e01b1480610784575061078482612659565b92915050565b600a546001600160a01b031633146107bd5760405162461bcd60e51b81526004016107b490614aad565b60405180910390fd5b600f55565b6060600080546107d190614ae2565b80601f01602080910402602001604051908101604052809291908181526020018280546107fd90614ae2565b801561084a5780601f1061081f5761010080835404028352916020019161084a565b820191906000526020600020905b81548152906001019060200180831161082d57829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b03166108cd5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016107b4565b506000908152600460205260409020546001600160a01b031690565b60006108f482611bc2565b9050806001600160a01b0316836001600160a01b031614156109625760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016107b4565b336001600160a01b038216148061097e575061097e81336106f1565b6109f05760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016107b4565b6109fa83836126a9565b505050565b6040805160c08101825260056080820181815264213937bbb760d91b60a084015282528251808401845281815264426c61636b60d81b6020828101919091528084019190915283518085018552828152642837b630b960d91b818301528385015283518085019094529083526450616e646160d81b9083015260608181019290925280836003811115610a9457610a946147b3565b60048110610aa457610aa4614b1d565b60200201519392505050565b60408051610280810182526005610240820181815264149a195d1d60da1b61026084015282528251808401845260048082526321b637b760e11b602083810191909152808501929092528451808601865281815263191a1b9b60e11b8184015284860152845180860186528181526354616e6b60e01b818401526060858101919091528551808701875260088082526723b932b6b83634b760c11b828601526080870191909152865180880188528381526365426f7960e01b8186015260a087015286518088018852858152645061626c6f60d81b8186015260c08701528651808801885294855264436875636b60d81b8585015260e086019490945285518087018752600680825265253ab9ba34b760d11b82860152610100870191909152865180880188528581526726b7bab9b2a232bb60c11b81860152610120870152865180880188526007808252665072616e6b737960c81b8287015261014088019190915287518089018952600381526252696b60e81b8187015261016088015287518089018952918252654a6f7368756160d01b8286015261018087019190915286518088018852908152662930b1b2b1b0b960c91b818501526101a086015285518087018752600b81526a3078496e7561726173686960a81b818501526101c086015285518087018752938452674f68685368696e7960c01b848401526101e085019390935284518086018652818152634761727960e01b8184015261020085015284518086019095528452634b696c6f60e01b9084015261022082019290925282820151819060ff1660128110610aa457610aa4614b1d565b610d153382612717565b610d315760405162461bcd60e51b81526004016107b490614b33565b6109fa83838361280e565b6000610d4783611e31565b8210610da95760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b60648201526084016107b4565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b6109fa838383604051806020016040528060008152506121fa565b6002600b541415610e105760405162461bcd60e51b81526004016107b490614b84565b6002600b55600f541580610e255750600f5443105b15610e435760405163465b6e2d60e01b815260040160405180910390fd5b80821480610fa15750604051630307176d60e31b8152600481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690631838bb689060240160206040518083038186803b158015610eac57600080fd5b505afa158015610ec0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ee49190614bbb565b6003811115610ef557610ef56147b3565b604051630307176d60e31b8152600481018490527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690631838bb689060240160206040518083038186803b158015610f5557600080fd5b505afa158015610f69573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f8d9190614bbb565b6003811115610f9e57610f9e6147b3565b14155b15610fbf57604051631120139160e31b815260040160405180910390fd5b6040516338a1310360e21b8152336004820152602481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063e284c40c9060440160206040518083038186803b15801561102557600080fd5b505afa158015611039573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061105d9190614bd8565b61107d57604051630f9fee9960e41b8152600481018390526024016107b4565b6040516338a1310360e21b8152336004820152602481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063e284c40c9060440160206040518083038186803b1580156110e357600080fd5b505afa1580156110f7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061111b9190614bd8565b61113b57604051630f9fee9960e41b8152600481018290526024016107b4565b60405163720acc2d60e11b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063e415985a90602401600060405180830381600087803b15801561119c57600080fd5b505af11580156111b0573d6000803e3d6000fd5b505050506000610100600e546111c69190614c0b565b905060006111db826111d66129b9565b612a33565b6111e6906001614c35565b90506111f3848483612aac565b50506001600b555050565b600061120960085490565b821061126c5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b60648201526084016107b4565b6008828154811061127f5761127f614b1d565b90600052602060002001549050919050565b61129961440d565b6000828152600260205260409020546001600160a01b03166112ce57604051633c9af26760e21b815260040160405180910390fd5b60105460ff166112f15760405163def8d36360e01b815260040160405180910390fd5b60008281526011602090815260408083208151606081018352815480825260019092015461ffff808216838701526201000090910416818401528251808501929092528251808303909401845290820190915291611350601486614c0b565b61135b906001614c35565b60008681526012602052604090205490915080156113805761137d8143614c4d565b85525b602084015161ffff90811614156114bf576113c0836113a0846009614c35565b815181106113b0576113b0614b1d565b016020015160f81c6111d6612c33565b60038111156113d1576113d16147b3565b8560c0019060038111156113e7576113e76147b3565b908160038111156113fa576113fa6147b3565b90525061142c8361140c846006614c35565b611417856003614c35565b611422866004614c35565b8960c00151612cc0565b602086015261146083611440846005614c35565b61144b856007614c35565b611456866001614c35565b8960c00151612d60565b856040018190525061147d8383815181106113b0576113b0614b1d565b600d81111561148e5761148e6147b3565b8560a00190600d8111156114a4576114a46147b3565b9081600d8111156114b7576114b76147b3565b9052506118c6565b6020840151604051630307176d60e31b815261ffff90911660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690631838bb689060240160206040518083038186803b15801561152857600080fd5b505afa15801561153c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115609190614bbb565b6003811115611571576115716147b3565b60ff166003811115611585576115856147b3565b8560c00190600381111561159b5761159b6147b3565b908160038111156115ae576115ae6147b3565b9052506020840151604051635d716e0d60e01b815261ffff9091166004820152611713907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690635d716e0d9060240160806040518083038186803b15801561161e57600080fd5b505afa158015611632573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116569190614c64565b6040868101519051635d716e0d60e01b815261ffff90911660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690635d716e0d9060240160806040518083038186803b1580156116bf57600080fd5b505afa1580156116d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116f79190614c64565b85611703866006614c35565b61170e876003614c35565b612d7d565b60208681019190915284015160405163ae54240560e01b815261ffff9091166004820152611877907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063ae5424059060240160806040518083038186803b15801561178757600080fd5b505afa15801561179b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117bf9190614c64565b604086810151905163ae54240560e01b815261ffff90911660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063ae5424059060240160806040518083038186803b15801561182857600080fd5b505afa15801561183c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118609190614c64565b8561186c866005614c35565b61170e876007614c35565b8560400181905250611899846020015161ffff16856040015161ffff16611940565b8560a00190600d8111156118af576118af6147b3565b9081600d8111156118c2576118c26147b3565b9052505b6012836118d4846002614c35565b815181106118e4576118e4614b1d565b01602001516118f6919060f81c614ce9565b60ff16606086015260128361190c846008614c35565b8151811061191c5761191c614b1d565b016020015161192e919060f81c614ce9565b60ff1660808601525092949350505050565b604051638ba3e62560e01b81526004810183905260009081906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690638ba3e6259060240160206040518083038186803b1580156119a557600080fd5b505afa1580156119b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119dd9190614bbb565b604051638ba3e62560e01b8152600481018590529091506000906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690638ba3e6259060240160206040518083038186803b158015611a4357600080fd5b505afa158015611a57573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a7b9190614bbb565b9050600080826003811115611a9257611a926147b3565b846003811115611aa457611aa46147b3565b10611ad257826003811115611abb57611abb6147b3565b846003811115611acd57611acd6147b3565b611af6565b836003811115611ae457611ae46147b3565b836003811115611af657611af66147b3565b915091508160ff1660001415611b3b5781611b12826004614d0b565b611b1c9190614d30565b60ff16600d811115611b3057611b306147b3565b945050505050610784565b8160ff1660011415611b535781611b12826008614d0b565b8160ff1660021415611b6b5781611b1282600b614d0b565b81611b7782600d614d0b565b611b819190614d30565b60ff16600d811115611b9557611b956147b3565b979650505050505050565b60606000611bad83611291565b9050611bbb8161abe0612dfd565b9392505050565b6000818152600260205260408120546001600160a01b0316806107845760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b60648201526084016107b4565b604080516102008101825260056101c0820190815264486170707960d81b6101e083015281528151808301835260068082526548756e67727960d01b602083810191909152808401929092528351808501855281815265536c6565707960d01b818401528385015283518085018552818152654772756d707960d01b818401526060848101919091528451808601865260088082526710da19595c999d5b60c21b82860152608086019190915285518087018752600780825266115e18da5d195960ca1b8287015260a08701919091528651808801885281815266536e7567676c7960c81b8187015260c0870152865180880188528281526710dbdb999d5cd95960c21b8187015260e08701528651808801885291825267526176656e6f757360c01b828601526101008601919091528551808701875260098152684665726f63696f757360b81b81860152610120860152855180870187528381526548616e67727960d01b81860152610140860152855180870187528381526544726f77737960d01b8186015261016086015285518087018752928352654372616e6b7960d01b83850152610180850192909252845180860190955290845266467572696f757360c81b918401919091526101a08201929092528083600d811115611e2157611e216147b3565b600e8110610aa457610aa4614b1d565b60006001600160a01b038216611e9c5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b60648201526084016107b4565b506001600160a01b031660009081526003602052604090205490565b600a546001600160a01b03163314611ee25760405162461bcd60e51b81526004016107b490614aad565b611eec6000612fdb565b565b6000600c546109c4611f009190614c4d565b905090565b600a546001600160a01b03163314611f2f5760405162461bcd60e51b81526004016107b490614aad565b60405173dc009bcb27c70a6da5a083aa8c606deb26806a01904780156108fc02916000818181858888f19350505050158015611f6f573d6000803e3d6000fd5b50565b6060611fae60408051808201909152601a81527f646174613a696d6167652f7376672b786d6c3b6261736536342c000000000000602082015290565b611fbf611fba84611ba0565b61302d565b604051602001611fd0929190614d6f565b6040516020818303038152906040529050919050565b6060600180546107d190614ae2565b6002600b5414156120185760405162461bcd60e51b81526004016107b490614b84565b6002600b55600f54158061202d5750600f5443105b1561204b5760405163465b6e2d60e01b815260040160405180910390fd5b8015806120585750600a81115b156120765760405163070f3fb160e01b815260040160405180910390fd5b61207e611eee565b81111561209e5760405163ad45360560e01b815260040160405180910390fd5b6120b081670214e8348c4f0000614d9e565b3410156120d0576040516322d7374f60e01b815260040160405180910390fd5b6120dd61ffff8083612aac565b80600c60008282546120ef9190614c35565b90915550506001600b5550565b600a546001600160a01b031633146121265760405162461bcd60e51b81526004016107b490614aad565b6010805460ff19166001179055565b6001600160a01b03821633141561218e5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016107b4565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6122043383612717565b6122205760405162461bcd60e51b81526004016107b490614b33565b61222c84848484613193565b50505050565b6000818152600260205260409020546060906001600160a01b031661226a57604051633c9af26760e21b815260040160405180910390fd5b60408051808201909152601d81527f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c0000006020820152611fbf611fba846131c6565b604080516102808101825260056102408201818152644d6165646160d81b6102608401528252825180840184526007815266109d5999995d1d60ca1b602082810191909152808401919091528351808501855260098152684d696c6f6e616b697360b81b81830152838501528351808501855282815264506574747960d81b81830152606084810191909152845180860186526008808252670acc2dc88deeaced60c31b828501526080808701929092528651808801885281815267088c2dadae4d2c6d60c31b8186015260a087015286518088018852600680825265283632b0b9b960d11b8287015260c088019190915287518089018952818152652330b936b2b960d11b8187015260e088015287518089018952600b81526a4576616e2044656e6e697360a81b818701526101008801528751808901895295865264486f62627360d81b8686015261012087019590955286518088018852818152672b34b9b2b63732b960c11b81860152610140870152865180880188528581526547687873747360d01b8186015261016087015286518088018852600a81526911dc99595b985dd85b1d60b21b818601526101808701528651808801885281815267436170616369747960c01b818601526101a0870152865180880188529081526729b432b934b230b760c11b818501526101c08601528551808701875260038152624f6e6760e81b818501526101e0860152855180870187529384526513dc9c995b1b60d21b84840152610200850193909352845180860190955260048552634b6f6e6760e01b91850191909152610220830193909352830151819060ff1660128110610aa457610aa4614b1d565b600a546001600160a01b031633146125415760405162461bcd60e51b81526004016107b490614aad565b6001600160a01b0381166125a65760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016107b4565b611f6f81612fdb565b6002600b5414156125d25760405162461bcd60e51b81526004016107b490614b84565b6002600b556125e081611bc2565b6001600160a01b0316336001600160a01b0316146126145760405163c27899c960e01b8152600481018290526024016107b4565b60008181526012602052604090205415612641576040516384f8bf4b60e01b815260040160405180910390fd5b60009081526012602052604090204390556001600b55565b60006001600160e01b031982166380ac58cd60e01b148061268a57506001600160e01b03198216635b5e139f60e01b145b8061078457506301ffc9a760e01b6001600160e01b0319831614610784565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906126de82611bc2565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b03166127905760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016107b4565b600061279b83611bc2565b9050806001600160a01b0316846001600160a01b031614806127d65750836001600160a01b03166127cb84610854565b6001600160a01b0316145b8061280657506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b031661282182611bc2565b6001600160a01b0316146128895760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b60648201526084016107b4565b6001600160a01b0382166128eb5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016107b4565b6128f68383836132dd565b6129016000826126a9565b6001600160a01b038316600090815260036020526040812080546001929061292a908490614c4d565b90915550506001600160a01b0382166000908152600360205260408120805460019290612958908490614c35565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b604080516002808252606080830184529260009291906020830190803683370190505090506046816000815181106129f3576129f3614b1d565b602002602001019060ff16908160ff1681525050601981600181518110612a1c57612a1c614b1d565b60ff90921660209283029190910190910152919050565b600080612a41606485614ce9565b60ff169050606460005b8451811015612aa157848181518110612a6657612a66614b1d565b602002602001015160ff1682612a7c9190614c4d565b9150818310612a8f579250610784915050565b80612a9981614dbd565b915050612a4b565b505091519392505050565b611d4c81600d54612abd9190614c35565b1115612adc5760405163659d1ec360e01b815260040160405180910390fd5b600e54600d5460005b83811015612baf57612af73383613395565b60408051606081018252600e54815261ffff80891660208084019182528983168486019081526000888152601190925294902092518355516001928301805494518316620100000263ffffffff19909516919092161792909217909155612b5e9083614c35565b915083612b6c826001614c35565b1015612b9d5760408051600185901c6020820152016040516020818303038152906040528051906020012060001c92505b80612ba781614dbd565b915050612ae5565b50600d819055600182811c903390612bc79043614c4d565b4043604051602001612c11949392919093845260609290921b6bffffffffffffffffffffffff19166020840152603483015260e81b6001600160e81b031916605482015260570190565b60408051601f198184030181529190528051602090910120600e555050505050565b6040805160038082526080820190925260609160009190602082018480368337019050509050603681600081518110612c6e57612c6e614b1d565b602002602001019060ff16908160ff1681525050601e81600181518110612c9757612c97614b1d565b602002602001019060ff16908160ff1681525050600f81600281518110612a1c57612a1c614b1d565b612cc8614456565b612d56612cd4836133b3565b612cdd8461343e565b60405180608001604052808a8a81518110612cfa57612cfa614b1d565b0160209081015160f81c82528b519101908b908a908110612d1d57612d1d614b1d565b0160209081015160f81c82528b519101908b9089908110612d4057612d40614b1d565b0160209081015160f81c825260ff9101526134c4565b9695505050505050565b612d68614456565b612d56612d748361356f565b612cdd846135f3565b612d85614456565b612dec86866065878781518110612d9e57612d9e614b1d565b0160200151612db0919060f81c614ce9565b60ff166007888781518110612dc757612dc7614b1d565b0160200151612dd9919060f81c614ce9565b612de4906061614d0b565b60ff16613679565b60ff60608201529695505050505050565b60606000612e0b8484613720565b9050612e196104388061375f565b612e80612e2b8660200151600761379b565b604051806040016040528060048152602001631219585960e21b8152506040518060600160405280602381526020016157946023913960405180606001604052806023815260200161588360239139866137f6565b612ee386602001516040518060400160405280600a81526020016948656164536861646f7760b01b815250604051806060016040528060238152602001615860602391396040518060600160405280602381526020016158a660239139876137f6565b612f4b612ef58860400151600761379b565b60405180604001604052806005815260200164546f72736f60d81b8152506040518060600160405280602381526020016158c96023913960405180606001604052806023815260200161583d60239139886137f6565b612faf88604001516040518060400160405280600b81526020016a546f72736f536861646f7760a81b81525060405180606001604052806023815260200161581a602391396040518060600160405280602381526020016157b760239139896137f6565b604051602001612fc3959493929190614dd8565b60405160208183030381529060405291505092915050565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b606081516000141561304d57505060408051602081019091526000815290565b60006040518060600160405280604081526020016157da604091399050600060038451600261307c9190614c35565b6130869190614e54565b613091906004614d9e565b905060006130a0826020614c35565b67ffffffffffffffff8111156130b8576130b86145aa565b6040519080825280601f01601f1916602001820160405280156130e2576020820181803683370190505b509050818152600183018586518101602084015b8183101561314e576003830192508251603f8160121c168501518253600182019150603f81600c1c168501518253600182019150603f8160061c168501518253600182019150603f81168501518253506001016130f6565b600389510660018114613168576002811461317957613185565b613d3d60f01b600119830152613185565b603d60f81b6000198301525b509398975050505050505050565b61319e84848461280e565b6131aa84848484613837565b61222c5760405162461bcd60e51b81526004016107b490614e68565b60105460609060ff16156132c457600082815260116020908152604080832081516060810183528154815260019091015461ffff80821694830194909452620100009004909216908201529061321b84611291565b90506132278185613944565b6132348260a00151611c39565b6132418360c001516109ff565b61324a846139e7565b61325386613b0b565b60408051808201909152601a81527f646174613a696d6167652f7376672b786d6c3b6261736536342c0000000000006020820152613296611fba8861abe0612dfd565b6040516020016132ac9796959493929190614eba565b60405160208183030381529060405292505050919050565b6132cd82613be2565b604051602001611fd09190614fcf565b6001600160a01b0383166133385761333381600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b61335b565b816001600160a01b0316836001600160a01b03161461335b5761335b8382613ce0565b6001600160a01b038216613372576109fa81613d7d565b826001600160a01b0316826001600160a01b0316146109fa576109fa8282613e2c565b6133af828260405180602001604052806000815250613e70565b5050565b6133bb614456565b60008260038111156133cf576133cf6147b3565b14156133e157610784628d5d33613ea3565b60018260038111156133f5576133f56147b3565b14156134075761078462383840613ea3565b600282600381111561341b5761341b6147b3565b141561342d5761078462d0e5e2613ea3565b61078462ddddde613ea3565b919050565b613446614456565b600082600381111561345a5761345a6147b3565b141561346c5761078462c1a286613ea3565b6001826003811115613480576134806147b3565b14156134925761078462575c6d613ea3565b60028260038111156134a6576134a66147b3565b14156134b85761078462ebf0ef613ea3565b61078462e2e1e8613ea3565b6134cc614456565b60006065836040015160ff16846020015160ff16856000015160ff166134f29190615087565b6134fc9190615087565b61350691906150a4565b8551855185519293506135199284613ed5565b60ff1682526020808601518582015191850151613537929084613ed5565b60ff1660208301526040808601518582015191850151613558929084613ed5565b60ff90811660408401526060830152509392505050565b613577614456565b600082600381111561358b5761358b6147b3565b141561359d576107846240260e613ea3565b60018260038111156135b1576135b16147b3565b14156135c35761078462222225613ea3565b60028260038111156135d7576135d76147b3565b14156135e95761078462b1b6b4613ea3565b6107846000613ea3565b6135fb614456565b600082600381111561360f5761360f6147b3565b1415613621576107846277512d613ea3565b6001826003811115613635576136356147b3565b1415613647576107846248484d613ea3565b600282600381111561365b5761365b6147b3565b141561366d5761078462dfe7e6613ea3565b61078462121213613ea3565b613681614456565b60648363ffffffff1611156136a9576040516349bf8f5360e01b815260040160405180910390fd5b845184516136b991908585613f13565b60ff168152602080860151908501516136d491908585613f13565b60ff166020820152604080860151908501516136f291908585613f13565b60ff1660408201526060808601519085015161371091908585613f13565b60ff166060820152949350505050565b606060008061372f8585613f84565b9150915080826040516020016137469291906150c5565b6040516020818303038152906040529250505092915050565b606061376a83613be2565b61377383613be2565b604051602001613784929190615142565b604051602081830303815290604052905092915050565b6137a3614456565b82516137af908361411d565b60ff16815260208301516137c3908361411d565b60ff16602082015260408301516137da908361411d565b60ff908116604083015260609384015116928101929092525090565b6060848461380588600061417a565b84878760405160200161381d969594939291906151e2565b604051602081830303815290604052905095945050505050565b60006001600160a01b0384163b1561393957604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061387b903390899088908890600401615317565b602060405180830381600087803b15801561389557600080fd5b505af19250505080156138c5575060408051601f3d908101601f191682019092526138c29181019061534a565b60015b61391f573d8080156138f3576040519150601f19603f3d011682016040523d82523d6000602084013e6138f8565b606091505b5080516139175760405162461bcd60e51b81526004016107b490614e68565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612806565b506001949350505050565b6060600061abe084600001511061397a57604051806040016040528060078152602001662042656172202360c81b81525061399a565b6040518060400160405280600681526020016520437562202360d01b8152505b90506139a584610ab0565b6139ae856122aa565b6139bb8660a00151611c39565b6139c88760c001516109ff565b846139d288613be2565b604051602001612fc396959493929190615367565b60606139f68260c001516109ff565b613a2860405180604001604052806004815260200163135bdbd960e21b815250613a238560a00151611c39565b614266565b613a51604051806040016040528060048152602001634e616d6560e01b815250613a2386610ab0565b613a7c6040518060400160405280600681526020016546616d696c7960d01b815250613a23876122aa565b613ab9604051806040016040528060128152602001712932b0b634b9ba34b1902432b0b210233ab960711b815250613a238860200151600261417a565b613af6604051806040016040528060128152602001712932b0b634b9ba34b1902137b23c90233ab960711b815250613a238960400151600261417a565b604051602001611fd096959493929190615416565b6060816020015161ffff1661ffff1415613b3357505060408051602081019091526000815290565b600080836040015161ffff16846020015161ffff1610613b5c5783604001518460200151613b67565b836020015184604001515b61ffff91821693501690506000613b87613b82846001614c35565b613be2565b613b95613b82846001614c35565b604051602001613ba69291906154c9565b60408051601f198184030181528282019091526007825266506172656e747360c81b60208301529150613bd99082614266565b95945050505050565b606081613c065750506040805180820190915260018152600360fc1b602082015290565b8160005b8115613c305780613c1a81614dbd565b9150613c299050600a83614e54565b9150613c0a565b60008167ffffffffffffffff811115613c4b57613c4b6145aa565b6040519080825280601f01601f191660200182016040528015613c75576020820181803683370190505b5090505b841561280657613c8a600183614c4d565b9150613c97600a86614c0b565b613ca2906030614c35565b60f81b818381518110613cb757613cb7614b1d565b60200101906001600160f81b031916908160001a905350613cd9600a86614e54565b9450613c79565b60006001613ced84611e31565b613cf79190614c4d565b600083815260076020526040902054909150808214613d4a576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b600854600090613d8f90600190614c4d565b60008381526009602052604081205460088054939450909284908110613db757613db7614b1d565b906000526020600020015490508060088381548110613dd857613dd8614b1d565b6000918252602080832090910192909255828152600990915260408082208490558582528120556008805480613e1057613e10615515565b6001900381819060005260206000200160009055905550505050565b6000613e3783611e31565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b613e7a838361427b565b613e876000848484613837565b6109fa5760405162461bcd60e51b81526004016107b490614e68565b613eab614456565b60ff601083901c81168252600883901c811660208301529182166040820152606081019190915290565b600060648286613ee86001871688614d30565b613ef29190614d30565b60ff16613eff919061552b565b613f099190615555565b613bd99086614d0b565b60008061271083613f25866064615576565b613f329060ff891661559b565b613f3f8760ff8b1661559b565b613f4991906155be565b613f53919061559b565b613f5d91906155dd565b905060ff8163ffffffff161115613f775760ff9150613f7b565b8091505b50949350505050565b60608082846000015110613fd2576040518060400160405280600481526020016302d3831360e41b8152509050604051806040016040528060018152602001601960f91b8152509150614116565b8351156140dd5783516000908490613fec9061032a614d9e565b613ff69190614e54565b90506001811061402d5761400981613be2565b60405160200161401991906155f4565b604051602081830303815290604052614049565b604051806040016040528060028152602001612d3160f01b8152505b8551909250849061405b906064614d9e565b6140659190614e54565b9050600a811061408f5760405180604001604052806002815260200161189760f11b8152506140ac565b604051806040016040528060038152602001620312e360ec1b8152505b6140b582613be2565b6040516020016140c6929190614d6f565b604051602081830303815290604052925050614116565b604051806040016040528060018152602001600360fc1b8152509050604051806040016040528060018152602001603160f81b81525091505b9250929050565b600080606461412c84826155be565b60ff86161561413b578561413e565b60015b60ff1661414b919061559b565b61415591906155dd565b905060ff8163ffffffff16111561416f5760ff9150614173565b8091505b5092915050565b60606003826002811115614190576141906147b3565b106141d15760405162461bcd60e51b8152602060048201526011602482015270496e76616c696420636f6c6f725479706560781b60448201526064016107b4565b60008260028111156141e5576141e56147b3565b141561421a576141f4836143c9565b604051602001614204919061561d565b6040516020818303038152906040529050610784565b600182600281111561422e5761422e6147b3565b141561424d5761423d836143c9565b604051602001614204919061565c565b614256836143c9565b604051602001613784919061569d565b606082826040516020016137849291906156d4565b6001600160a01b0382166142d15760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016107b4565b6000818152600260205260409020546001600160a01b0316156143365760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016107b4565b614342600083836132dd565b6001600160a01b038216600090815260036020526040812080546001929061436b908490614c35565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60606143db826000015160ff16613be2565b6143eb836020015160ff16613be2565b6143fb846040015160ff16613be2565b604051602001611fd093929190615739565b6040518060e0016040528060008152602001614427614456565b8152602001614434614456565b8152600060208201819052604082018190526060820181905260809091015290565b60408051608081018252600080825260208201819052918101829052606081019190915290565b6001600160e01b031981168114611f6f57600080fd5b6000602082840312156144a557600080fd5b813561416f8161447d565b6000602082840312156144c257600080fd5b5035919050565b60005b838110156144e45781810151838201526020016144cc565b8381111561222c5750506000910152565b6000815180845261450d8160208601602086016144c9565b601f01601f19169290920160200192915050565b602081526000611bbb60208301846144f5565b80356001600160a01b038116811461343957600080fd5b6000806040838503121561455e57600080fd5b61456783614534565b946020939093013593505050565b60048110611f6f57600080fd5b803561343981614575565b60006020828403121561459f57600080fd5b813561416f81614575565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156145e9576145e96145aa565b604052919050565b60ff81168114611f6f57600080fd5b8035613439816145f1565b60006080828403121561461d57600080fd5b6040516080810181811067ffffffffffffffff82111715614640576146406145aa565b6040529050808235614651816145f1565b81526020830135614661816145f1565b60208201526040830135614674816145f1565b60408201526060830135614687816145f1565b6060919091015292915050565b8035600e811061343957600080fd5b60006101a082840312156146b657600080fd5b60405160e0810181811067ffffffffffffffff821117156146d9576146d96145aa565b604052823581526146ed846020850161460b565b60208201526146ff8460a0850161460b565b6040820152610120830135614713816145f1565b60608201526147256101408401614600565b60808201526147376101608401614694565b60a08201526147496101808401614582565b60c08201529392505050565b60008060006060848603121561476a57600080fd5b61477384614534565b925061478160208501614534565b9150604084013590509250925092565b600080604083850312156147a457600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b600e81106147d9576147d96147b3565b9052565b815181526020808301516101a08301916148269084018260ff815116825260ff602082015116602083015260ff604082015116604083015260ff60608201511660608301525050565b50604083015161486660a084018260ff815116825260ff602082015116602083015260ff604082015116604083015260ff60608201511660608301525050565b5060ff60608401511661012083015260ff60808401511661014083015260a08301516148966101608401826147c9565b5060c0830151600481106148ac576148ac6147b3565b806101808401525092915050565b6020810161078482846147c9565b6000602082840312156148da57600080fd5b611bbb82614694565b6000602082840312156148f557600080fd5b611bbb82614534565b8015158114611f6f57600080fd5b6000806040838503121561491f57600080fd5b61492883614534565b91506020830135614938816148fe565b809150509250929050565b6000806000806080858703121561495957600080fd5b61496285614534565b93506020614971818701614534565b935060408601359250606086013567ffffffffffffffff8082111561499557600080fd5b818801915088601f8301126149a957600080fd5b8135818111156149bb576149bb6145aa565b6149cd601f8201601f191685016145c0565b915080825289848285010111156149e357600080fd5b808484018584013760008482840101525080935050505092959194509250565b803561ffff8116811461343957600080fd5b600060608284031215614a2757600080fd5b6040516060810181811067ffffffffffffffff82111715614a4a57614a4a6145aa565b60405282358152614a5d60208401614a03565b6020820152614a6e60408401614a03565b60408201529392505050565b60008060408385031215614a8d57600080fd5b614a9683614534565b9150614aa460208401614534565b90509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600181811c90821680614af657607f821691505b60208210811415614b1757634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b600060208284031215614bcd57600080fd5b815161416f81614575565b600060208284031215614bea57600080fd5b815161416f816148fe565b634e487b7160e01b600052601260045260246000fd5b600082614c1a57614c1a614bf5565b500690565b634e487b7160e01b600052601160045260246000fd5b60008219821115614c4857614c48614c1f565b500190565b600082821015614c5f57614c5f614c1f565b500390565b600060808284031215614c7657600080fd5b6040516080810181811067ffffffffffffffff82111715614c9957614c996145aa565b6040528251614ca7816145f1565b81526020830151614cb7816145f1565b60208201526040830151614cca816145f1565b60408201526060830151614cdd816145f1565b60608201529392505050565b600060ff831680614cfc57614cfc614bf5565b8060ff84160691505092915050565b600060ff821660ff84168060ff03821115614d2857614d28614c1f565b019392505050565b600060ff821660ff841680821015614d4a57614d4a614c1f565b90039392505050565b60008151614d658185602086016144c9565b9290920192915050565b60008351614d818184602088016144c9565b835190830190614d958183602088016144c9565b01949350505050565b6000816000190483118215151615614db857614db8614c1f565b500290565b6000600019821415614dd157614dd1614c1f565b5060010190565b60008651614dea818460208b016144c9565b865190830190614dfe818360208b016144c9565b8651910190614e11818360208a016144c9565b8551910190614e248183602089016144c9565b8451910190614e378183602088016144c9565b651e17b9bb339f60d11b9101908152600601979650505050505050565b600082614e6357614e63614bf5565b500490565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b683d913730b6b2911d1160b91b81528751600090614edf816009850160208d016144c9565b701116113232b9b1b934b83a34b7b7111d1160791b6009918401918201528851614f1081601a840160208d016144c9565b600160fd1b601a92909101918201528751614f3281601b840160208c016144c9565b7111161130ba3a3934b13aba32b9911d2dbd9160711b601b92909101918201528651614f6581602d840160208b016144c9565b8651910190614f7b81602d840160208a016144c9565b614fc0614fb2614fac614fa6602d858701016c113eae961134b6b0b3b2911d1160991b8152600d0190565b89614d53565b87614d53565b61227d60f01b815260020190565b9b9a5050505050505050505050565b7f7b226e616d65223a2252656e646572696e6720437562202300000000000000008152600082516150078160188501602087016144c9565b7f2e2e2e222c226465736372697074696f6e223a22556e72657665616c6564222c60189390910192830152507f22696d616765223a22697066733a2f2f516d63355956797a4b5a364433776a7160388201527f4c4663665542507470397968374e4b787374324d324e336e4446644b445a227d6058820152607801919050565b600061ffff808316818516808303821115614d9557614d95614c1f565b600061ffff808416806150b9576150b9614bf5565b92169190910692915050565b7f207472616e73666f726d3d277472616e736c61746528302c00000000000000008152600083516150fd8160188501602088016144c9565b690a4b1cd8d85b194a0c4b60b21b60189184019182015283516151278160228401602088016144c9565b61292760f01b60229290910191820152602401949350505050565b7101e39bb33903b34b2bba137bc1e93981018160751b81526000835161516f8160128501602088016144c9565b600160fd1b60129184019182015283516151908160138401602088016144c9565b7f2720786d6c6e733d27687474703a2f2f7777772e77332e6f72672f323030302f601392909101918201527239bb3393903b32b939b4b7b71e93989718939f60691b6033820152604601949350505050565b693c706174682069643d2760b01b81526000875161520781600a850160208c016144c9565b642720643d2760d81b600a91840191820152875161522c81600f840160208c016144c9565b602760f81b600f9290910191820152865161524e816010840160208b016144c9565b8651910190615264816010840160208a016144c9565b7f3e3c616e696d617465206174747269627574654e616d653d2764272076616c75601092909101918201526365733d2760e01b603082015284516152af8160348401602089016144c9565b6153096152cb614fac603484860101603b60f81b815260010190565b7f2720626567696e3d27347327206475723d273173272066696c6c3d276672656581526b3d3293979f1e17b830ba341f60a11b6020820152602c0190565b9a9950505050505050505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612d56908301846144f5565b60006020828403121561535c57600080fd5b815161416f8161447d565b60008751602061537a8285838d016144c9565b8184019150600160fd1b80835289516153998160018601858e016144c9565b640103a3432960dd1b6001949091019384015288516153be8160068601858d016144c9565b600693019283015286516153d88160078501848b016144c9565b86519201916153ed8160078501848a016144c9565b855192019161540281600785018489016144c9565b919091016007019998505050505050505050565b7f74726169745f74797065223a2253706563696573222c2276616c7565223a220081526000601f8851602061545082848701838e016144c9565b89519185019161546581858501848e016144c9565b895192019161547981858501848d016144c9565b885192019161548d81858501848c016144c9565b87519201916154a181858501848b016144c9565b86519201916154b581858501848a016144c9565b919091019091019998505050505050505050565b602360f81b8152600083516154e58160018501602088016144c9565b632026202360e01b60019184019182015283516155098160058401602088016144c9565b01600501949350505050565b634e487b7160e01b600052603160045260246000fd5b600061ffff8083168185168183048111821515161561554c5761554c614c1f565b02949350505050565b600061ffff8084168061556a5761556a614bf5565b92169190910492915050565b600063ffffffff8381169083168181101561559357615593614c1f565b039392505050565b600063ffffffff8083168185168183048111821515161561554c5761554c614c1f565b600063ffffffff808316818516808303821115614d9557614d95614c1f565b600063ffffffff8084168061556a5761556a614bf5565b602d60f81b8152600082516156108160018501602087016144c9565b9190910160010192915050565b6a040ccd2d8d87a4ee4cec4560ab1b81526000825161564381600b8501602087016144c9565b61292760f01b600b939091019283015250600d01919050565b6c040e6e8e4ded6ca7a4ee4cec45609b1b81526000825161568481600d8501602087016144c9565b61292760f01b600d939091019283015250600f01919050565b630e4cec4560e31b8152600082516156bc8160048501602087016144c9565b602960f81b6004939091019283015250600501919050565b71113e963d913a3930b4ba2fba3cb832911d1160711b815282516000906157028160128501602088016144c9565b6a1116113b30b63ab2911d1160a91b601291840191820152835161572d81601d8401602088016144c9565b01601d01949350505050565b6000845161574b8184602089016144c9565b8083019050600b60fa1b808252855161576b816001850160208a016144c9565b600192019182015283516157868160028401602088016144c9565b016002019594505050505056fe4d34303520363735204c3534302036373520353430203534302034303520353430205a4d35373020383130204c3731302037383620373130203637352035373020363735205a4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f4d35343020383130204c3637352038313020363735203637352035343020363735205a4d33373020373930204c3537302038313020353730203637352033373020363735205a4d35343020363735204c3637352036373520363735203534302035343020353430205a4d33373020363735204c3537302036373520353730203534302033373020353630205a4d35373020363735204c3731302036373520373130203536342035373020353430205a4d34303520383130204c3534302038313020353430203637352034303520363735205aa2646970667358221220156d4376738404e0a4cf96d2d51e3fb61493d607e98abc7d29aa0dd2d6c485c464736f6c6343000809003300000000000000000000000065b7990ab726ef573c176bb8b9b5464de6ea6c89

Deployed Bytecode

0x6080604052600436106102465760003560e01c80636352211e11610139578063a0fe6d42116100b6578063cf09dead1161007a578063cf09dead14610677578063cf9c526514610697578063d48c7418146106c0578063e985e9c5146106d6578063f2fde38b1461071f578063f9ead7db1461073f57600080fd5b8063a0fe6d42146105ec578063a22cb46514610601578063b88d4fde14610621578063c87b56dd14610641578063cd93f59b1461066157600080fd5b8063853828b6116100fd578063853828b61461057e5780638da5cb5b146105865780638f742d16146105a457806395d89b41146105c45780639674ce01146105d957600080fd5b80636352211e146104f45780636fc43e5e1461051457806370a0823114610534578063715018a6146105545780637a62da681461056957600080fd5b806323b872dd116101c75780634aa5524b1161018b5780634aa5524b1461043a5780634f6ccce71461045a57806351008a901461047a57806352082bfc146104a75780635ad21b2c146104d457600080fd5b806323b872dd146103b05780632f745c59146103d0578063313ce567146103f057806337591d1e1461040457806342842e0e1461041a57600080fd5b80630e165b8c1161020e5780630e165b8c1461031c578063110f92c91461033c578063120c390c1461035c57806318160ddd1461037f5780631ded3d9e1461039457600080fd5b806301ffc9a71461024b578063021bec801461028057806306fdde03146102a2578063081812fc146102c4578063095ea7b3146102fc575b600080fd5b34801561025757600080fd5b5061026b610266366004614493565b61075f565b60405190151581526020015b60405180910390f35b34801561028c57600080fd5b506102a061029b3660046144b0565b61078a565b005b3480156102ae57600080fd5b506102b76107c2565b6040516102779190614521565b3480156102d057600080fd5b506102e46102df3660046144b0565b610854565b6040516001600160a01b039091168152602001610277565b34801561030857600080fd5b506102a061031736600461454b565b6108e9565b34801561032857600080fd5b506102b761033736600461458d565b6109ff565b34801561034857600080fd5b506102b76103573660046146a3565b610ab0565b34801561036857600080fd5b50610371600a81565b604051908152602001610277565b34801561038b57600080fd5b50600854610371565b3480156103a057600080fd5b50610371670214e8348c4f000081565b3480156103bc57600080fd5b506102a06103cb366004614755565b610d0b565b3480156103dc57600080fd5b506103716103eb36600461454b565b610d3c565b3480156103fc57600080fd5b506000610371565b34801561041057600080fd5b506103716109c481565b34801561042657600080fd5b506102a0610435366004614755565b610dd2565b34801561044657600080fd5b506102a0610455366004614791565b610ded565b34801561046657600080fd5b506103716104753660046144b0565b6111fe565b34801561048657600080fd5b5061049a6104953660046144b0565b611291565b60405161027791906147dd565b3480156104b357600080fd5b506104c76104c2366004614791565b611940565b60405161027791906148ba565b3480156104e057600080fd5b506102b76104ef3660046144b0565b611ba0565b34801561050057600080fd5b506102e461050f3660046144b0565b611bc2565b34801561052057600080fd5b506102b761052f3660046148c8565b611c39565b34801561054057600080fd5b5061037161054f3660046148e3565b611e31565b34801561056057600080fd5b506102a0611eb8565b34801561057557600080fd5b50610371611eee565b6102a0611f05565b34801561059257600080fd5b50600a546001600160a01b03166102e4565b3480156105b057600080fd5b506102b76105bf3660046144b0565b611f72565b3480156105d057600080fd5b506102b7611fe6565b6102a06105e73660046144b0565b611ff5565b3480156105f857600080fd5b506102a06120fc565b34801561060d57600080fd5b506102a061061c36600461490c565b612135565b34801561062d57600080fd5b506102a061063c366004614943565b6121fa565b34801561064d57600080fd5b506102b761065c3660046144b0565b612232565b34801561066d57600080fd5b5061037161abe081565b34801561068357600080fd5b506102b76106923660046146a3565b6122aa565b3480156106a357600080fd5b5061026b6106b2366004614a15565b6020015161ffff9081161490565b3480156106cc57600080fd5b50610371611d4c81565b3480156106e257600080fd5b5061026b6106f1366004614a7a565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b34801561072b57600080fd5b506102a061073a3660046148e3565b612517565b34801561074b57600080fd5b506102a061075a3660046144b0565b6125af565b60006001600160e01b0319821663780e9d6360e01b1480610784575061078482612659565b92915050565b600a546001600160a01b031633146107bd5760405162461bcd60e51b81526004016107b490614aad565b60405180910390fd5b600f55565b6060600080546107d190614ae2565b80601f01602080910402602001604051908101604052809291908181526020018280546107fd90614ae2565b801561084a5780601f1061081f5761010080835404028352916020019161084a565b820191906000526020600020905b81548152906001019060200180831161082d57829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b03166108cd5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016107b4565b506000908152600460205260409020546001600160a01b031690565b60006108f482611bc2565b9050806001600160a01b0316836001600160a01b031614156109625760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016107b4565b336001600160a01b038216148061097e575061097e81336106f1565b6109f05760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016107b4565b6109fa83836126a9565b505050565b6040805160c08101825260056080820181815264213937bbb760d91b60a084015282528251808401845281815264426c61636b60d81b6020828101919091528084019190915283518085018552828152642837b630b960d91b818301528385015283518085019094529083526450616e646160d81b9083015260608181019290925280836003811115610a9457610a946147b3565b60048110610aa457610aa4614b1d565b60200201519392505050565b60408051610280810182526005610240820181815264149a195d1d60da1b61026084015282528251808401845260048082526321b637b760e11b602083810191909152808501929092528451808601865281815263191a1b9b60e11b8184015284860152845180860186528181526354616e6b60e01b818401526060858101919091528551808701875260088082526723b932b6b83634b760c11b828601526080870191909152865180880188528381526365426f7960e01b8186015260a087015286518088018852858152645061626c6f60d81b8186015260c08701528651808801885294855264436875636b60d81b8585015260e086019490945285518087018752600680825265253ab9ba34b760d11b82860152610100870191909152865180880188528581526726b7bab9b2a232bb60c11b81860152610120870152865180880188526007808252665072616e6b737960c81b8287015261014088019190915287518089018952600381526252696b60e81b8187015261016088015287518089018952918252654a6f7368756160d01b8286015261018087019190915286518088018852908152662930b1b2b1b0b960c91b818501526101a086015285518087018752600b81526a3078496e7561726173686960a81b818501526101c086015285518087018752938452674f68685368696e7960c01b848401526101e085019390935284518086018652818152634761727960e01b8184015261020085015284518086019095528452634b696c6f60e01b9084015261022082019290925282820151819060ff1660128110610aa457610aa4614b1d565b610d153382612717565b610d315760405162461bcd60e51b81526004016107b490614b33565b6109fa83838361280e565b6000610d4783611e31565b8210610da95760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b60648201526084016107b4565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b6109fa838383604051806020016040528060008152506121fa565b6002600b541415610e105760405162461bcd60e51b81526004016107b490614b84565b6002600b55600f541580610e255750600f5443105b15610e435760405163465b6e2d60e01b815260040160405180910390fd5b80821480610fa15750604051630307176d60e31b8152600481018290527f00000000000000000000000065b7990ab726ef573c176bb8b9b5464de6ea6c896001600160a01b031690631838bb689060240160206040518083038186803b158015610eac57600080fd5b505afa158015610ec0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ee49190614bbb565b6003811115610ef557610ef56147b3565b604051630307176d60e31b8152600481018490527f00000000000000000000000065b7990ab726ef573c176bb8b9b5464de6ea6c896001600160a01b031690631838bb689060240160206040518083038186803b158015610f5557600080fd5b505afa158015610f69573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f8d9190614bbb565b6003811115610f9e57610f9e6147b3565b14155b15610fbf57604051631120139160e31b815260040160405180910390fd5b6040516338a1310360e21b8152336004820152602481018390527f00000000000000000000000065b7990ab726ef573c176bb8b9b5464de6ea6c896001600160a01b03169063e284c40c9060440160206040518083038186803b15801561102557600080fd5b505afa158015611039573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061105d9190614bd8565b61107d57604051630f9fee9960e41b8152600481018390526024016107b4565b6040516338a1310360e21b8152336004820152602481018290527f00000000000000000000000065b7990ab726ef573c176bb8b9b5464de6ea6c896001600160a01b03169063e284c40c9060440160206040518083038186803b1580156110e357600080fd5b505afa1580156110f7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061111b9190614bd8565b61113b57604051630f9fee9960e41b8152600481018290526024016107b4565b60405163720acc2d60e11b81523360048201527f00000000000000000000000065b7990ab726ef573c176bb8b9b5464de6ea6c896001600160a01b03169063e415985a90602401600060405180830381600087803b15801561119c57600080fd5b505af11580156111b0573d6000803e3d6000fd5b505050506000610100600e546111c69190614c0b565b905060006111db826111d66129b9565b612a33565b6111e6906001614c35565b90506111f3848483612aac565b50506001600b555050565b600061120960085490565b821061126c5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b60648201526084016107b4565b6008828154811061127f5761127f614b1d565b90600052602060002001549050919050565b61129961440d565b6000828152600260205260409020546001600160a01b03166112ce57604051633c9af26760e21b815260040160405180910390fd5b60105460ff166112f15760405163def8d36360e01b815260040160405180910390fd5b60008281526011602090815260408083208151606081018352815480825260019092015461ffff808216838701526201000090910416818401528251808501929092528251808303909401845290820190915291611350601486614c0b565b61135b906001614c35565b60008681526012602052604090205490915080156113805761137d8143614c4d565b85525b602084015161ffff90811614156114bf576113c0836113a0846009614c35565b815181106113b0576113b0614b1d565b016020015160f81c6111d6612c33565b60038111156113d1576113d16147b3565b8560c0019060038111156113e7576113e76147b3565b908160038111156113fa576113fa6147b3565b90525061142c8361140c846006614c35565b611417856003614c35565b611422866004614c35565b8960c00151612cc0565b602086015261146083611440846005614c35565b61144b856007614c35565b611456866001614c35565b8960c00151612d60565b856040018190525061147d8383815181106113b0576113b0614b1d565b600d81111561148e5761148e6147b3565b8560a00190600d8111156114a4576114a46147b3565b9081600d8111156114b7576114b76147b3565b9052506118c6565b6020840151604051630307176d60e31b815261ffff90911660048201527f00000000000000000000000065b7990ab726ef573c176bb8b9b5464de6ea6c896001600160a01b031690631838bb689060240160206040518083038186803b15801561152857600080fd5b505afa15801561153c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115609190614bbb565b6003811115611571576115716147b3565b60ff166003811115611585576115856147b3565b8560c00190600381111561159b5761159b6147b3565b908160038111156115ae576115ae6147b3565b9052506020840151604051635d716e0d60e01b815261ffff9091166004820152611713907f00000000000000000000000065b7990ab726ef573c176bb8b9b5464de6ea6c896001600160a01b031690635d716e0d9060240160806040518083038186803b15801561161e57600080fd5b505afa158015611632573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116569190614c64565b6040868101519051635d716e0d60e01b815261ffff90911660048201527f00000000000000000000000065b7990ab726ef573c176bb8b9b5464de6ea6c896001600160a01b031690635d716e0d9060240160806040518083038186803b1580156116bf57600080fd5b505afa1580156116d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116f79190614c64565b85611703866006614c35565b61170e876003614c35565b612d7d565b60208681019190915284015160405163ae54240560e01b815261ffff9091166004820152611877907f00000000000000000000000065b7990ab726ef573c176bb8b9b5464de6ea6c896001600160a01b03169063ae5424059060240160806040518083038186803b15801561178757600080fd5b505afa15801561179b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117bf9190614c64565b604086810151905163ae54240560e01b815261ffff90911660048201527f00000000000000000000000065b7990ab726ef573c176bb8b9b5464de6ea6c896001600160a01b03169063ae5424059060240160806040518083038186803b15801561182857600080fd5b505afa15801561183c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118609190614c64565b8561186c866005614c35565b61170e876007614c35565b8560400181905250611899846020015161ffff16856040015161ffff16611940565b8560a00190600d8111156118af576118af6147b3565b9081600d8111156118c2576118c26147b3565b9052505b6012836118d4846002614c35565b815181106118e4576118e4614b1d565b01602001516118f6919060f81c614ce9565b60ff16606086015260128361190c846008614c35565b8151811061191c5761191c614b1d565b016020015161192e919060f81c614ce9565b60ff1660808601525092949350505050565b604051638ba3e62560e01b81526004810183905260009081906001600160a01b037f00000000000000000000000065b7990ab726ef573c176bb8b9b5464de6ea6c891690638ba3e6259060240160206040518083038186803b1580156119a557600080fd5b505afa1580156119b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119dd9190614bbb565b604051638ba3e62560e01b8152600481018590529091506000906001600160a01b037f00000000000000000000000065b7990ab726ef573c176bb8b9b5464de6ea6c891690638ba3e6259060240160206040518083038186803b158015611a4357600080fd5b505afa158015611a57573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a7b9190614bbb565b9050600080826003811115611a9257611a926147b3565b846003811115611aa457611aa46147b3565b10611ad257826003811115611abb57611abb6147b3565b846003811115611acd57611acd6147b3565b611af6565b836003811115611ae457611ae46147b3565b836003811115611af657611af66147b3565b915091508160ff1660001415611b3b5781611b12826004614d0b565b611b1c9190614d30565b60ff16600d811115611b3057611b306147b3565b945050505050610784565b8160ff1660011415611b535781611b12826008614d0b565b8160ff1660021415611b6b5781611b1282600b614d0b565b81611b7782600d614d0b565b611b819190614d30565b60ff16600d811115611b9557611b956147b3565b979650505050505050565b60606000611bad83611291565b9050611bbb8161abe0612dfd565b9392505050565b6000818152600260205260408120546001600160a01b0316806107845760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b60648201526084016107b4565b604080516102008101825260056101c0820190815264486170707960d81b6101e083015281528151808301835260068082526548756e67727960d01b602083810191909152808401929092528351808501855281815265536c6565707960d01b818401528385015283518085018552818152654772756d707960d01b818401526060848101919091528451808601865260088082526710da19595c999d5b60c21b82860152608086019190915285518087018752600780825266115e18da5d195960ca1b8287015260a08701919091528651808801885281815266536e7567676c7960c81b8187015260c0870152865180880188528281526710dbdb999d5cd95960c21b8187015260e08701528651808801885291825267526176656e6f757360c01b828601526101008601919091528551808701875260098152684665726f63696f757360b81b81860152610120860152855180870187528381526548616e67727960d01b81860152610140860152855180870187528381526544726f77737960d01b8186015261016086015285518087018752928352654372616e6b7960d01b83850152610180850192909252845180860190955290845266467572696f757360c81b918401919091526101a08201929092528083600d811115611e2157611e216147b3565b600e8110610aa457610aa4614b1d565b60006001600160a01b038216611e9c5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b60648201526084016107b4565b506001600160a01b031660009081526003602052604090205490565b600a546001600160a01b03163314611ee25760405162461bcd60e51b81526004016107b490614aad565b611eec6000612fdb565b565b6000600c546109c4611f009190614c4d565b905090565b600a546001600160a01b03163314611f2f5760405162461bcd60e51b81526004016107b490614aad565b60405173dc009bcb27c70a6da5a083aa8c606deb26806a01904780156108fc02916000818181858888f19350505050158015611f6f573d6000803e3d6000fd5b50565b6060611fae60408051808201909152601a81527f646174613a696d6167652f7376672b786d6c3b6261736536342c000000000000602082015290565b611fbf611fba84611ba0565b61302d565b604051602001611fd0929190614d6f565b6040516020818303038152906040529050919050565b6060600180546107d190614ae2565b6002600b5414156120185760405162461bcd60e51b81526004016107b490614b84565b6002600b55600f54158061202d5750600f5443105b1561204b5760405163465b6e2d60e01b815260040160405180910390fd5b8015806120585750600a81115b156120765760405163070f3fb160e01b815260040160405180910390fd5b61207e611eee565b81111561209e5760405163ad45360560e01b815260040160405180910390fd5b6120b081670214e8348c4f0000614d9e565b3410156120d0576040516322d7374f60e01b815260040160405180910390fd5b6120dd61ffff8083612aac565b80600c60008282546120ef9190614c35565b90915550506001600b5550565b600a546001600160a01b031633146121265760405162461bcd60e51b81526004016107b490614aad565b6010805460ff19166001179055565b6001600160a01b03821633141561218e5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016107b4565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6122043383612717565b6122205760405162461bcd60e51b81526004016107b490614b33565b61222c84848484613193565b50505050565b6000818152600260205260409020546060906001600160a01b031661226a57604051633c9af26760e21b815260040160405180910390fd5b60408051808201909152601d81527f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c0000006020820152611fbf611fba846131c6565b604080516102808101825260056102408201818152644d6165646160d81b6102608401528252825180840184526007815266109d5999995d1d60ca1b602082810191909152808401919091528351808501855260098152684d696c6f6e616b697360b81b81830152838501528351808501855282815264506574747960d81b81830152606084810191909152845180860186526008808252670acc2dc88deeaced60c31b828501526080808701929092528651808801885281815267088c2dadae4d2c6d60c31b8186015260a087015286518088018852600680825265283632b0b9b960d11b8287015260c088019190915287518089018952818152652330b936b2b960d11b8187015260e088015287518089018952600b81526a4576616e2044656e6e697360a81b818701526101008801528751808901895295865264486f62627360d81b8686015261012087019590955286518088018852818152672b34b9b2b63732b960c11b81860152610140870152865180880188528581526547687873747360d01b8186015261016087015286518088018852600a81526911dc99595b985dd85b1d60b21b818601526101808701528651808801885281815267436170616369747960c01b818601526101a0870152865180880188529081526729b432b934b230b760c11b818501526101c08601528551808701875260038152624f6e6760e81b818501526101e0860152855180870187529384526513dc9c995b1b60d21b84840152610200850193909352845180860190955260048552634b6f6e6760e01b91850191909152610220830193909352830151819060ff1660128110610aa457610aa4614b1d565b600a546001600160a01b031633146125415760405162461bcd60e51b81526004016107b490614aad565b6001600160a01b0381166125a65760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016107b4565b611f6f81612fdb565b6002600b5414156125d25760405162461bcd60e51b81526004016107b490614b84565b6002600b556125e081611bc2565b6001600160a01b0316336001600160a01b0316146126145760405163c27899c960e01b8152600481018290526024016107b4565b60008181526012602052604090205415612641576040516384f8bf4b60e01b815260040160405180910390fd5b60009081526012602052604090204390556001600b55565b60006001600160e01b031982166380ac58cd60e01b148061268a57506001600160e01b03198216635b5e139f60e01b145b8061078457506301ffc9a760e01b6001600160e01b0319831614610784565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906126de82611bc2565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b03166127905760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016107b4565b600061279b83611bc2565b9050806001600160a01b0316846001600160a01b031614806127d65750836001600160a01b03166127cb84610854565b6001600160a01b0316145b8061280657506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b031661282182611bc2565b6001600160a01b0316146128895760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b60648201526084016107b4565b6001600160a01b0382166128eb5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016107b4565b6128f68383836132dd565b6129016000826126a9565b6001600160a01b038316600090815260036020526040812080546001929061292a908490614c4d565b90915550506001600160a01b0382166000908152600360205260408120805460019290612958908490614c35565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b604080516002808252606080830184529260009291906020830190803683370190505090506046816000815181106129f3576129f3614b1d565b602002602001019060ff16908160ff1681525050601981600181518110612a1c57612a1c614b1d565b60ff90921660209283029190910190910152919050565b600080612a41606485614ce9565b60ff169050606460005b8451811015612aa157848181518110612a6657612a66614b1d565b602002602001015160ff1682612a7c9190614c4d565b9150818310612a8f579250610784915050565b80612a9981614dbd565b915050612a4b565b505091519392505050565b611d4c81600d54612abd9190614c35565b1115612adc5760405163659d1ec360e01b815260040160405180910390fd5b600e54600d5460005b83811015612baf57612af73383613395565b60408051606081018252600e54815261ffff80891660208084019182528983168486019081526000888152601190925294902092518355516001928301805494518316620100000263ffffffff19909516919092161792909217909155612b5e9083614c35565b915083612b6c826001614c35565b1015612b9d5760408051600185901c6020820152016040516020818303038152906040528051906020012060001c92505b80612ba781614dbd565b915050612ae5565b50600d819055600182811c903390612bc79043614c4d565b4043604051602001612c11949392919093845260609290921b6bffffffffffffffffffffffff19166020840152603483015260e81b6001600160e81b031916605482015260570190565b60408051601f198184030181529190528051602090910120600e555050505050565b6040805160038082526080820190925260609160009190602082018480368337019050509050603681600081518110612c6e57612c6e614b1d565b602002602001019060ff16908160ff1681525050601e81600181518110612c9757612c97614b1d565b602002602001019060ff16908160ff1681525050600f81600281518110612a1c57612a1c614b1d565b612cc8614456565b612d56612cd4836133b3565b612cdd8461343e565b60405180608001604052808a8a81518110612cfa57612cfa614b1d565b0160209081015160f81c82528b519101908b908a908110612d1d57612d1d614b1d565b0160209081015160f81c82528b519101908b9089908110612d4057612d40614b1d565b0160209081015160f81c825260ff9101526134c4565b9695505050505050565b612d68614456565b612d56612d748361356f565b612cdd846135f3565b612d85614456565b612dec86866065878781518110612d9e57612d9e614b1d565b0160200151612db0919060f81c614ce9565b60ff166007888781518110612dc757612dc7614b1d565b0160200151612dd9919060f81c614ce9565b612de4906061614d0b565b60ff16613679565b60ff60608201529695505050505050565b60606000612e0b8484613720565b9050612e196104388061375f565b612e80612e2b8660200151600761379b565b604051806040016040528060048152602001631219585960e21b8152506040518060600160405280602381526020016157946023913960405180606001604052806023815260200161588360239139866137f6565b612ee386602001516040518060400160405280600a81526020016948656164536861646f7760b01b815250604051806060016040528060238152602001615860602391396040518060600160405280602381526020016158a660239139876137f6565b612f4b612ef58860400151600761379b565b60405180604001604052806005815260200164546f72736f60d81b8152506040518060600160405280602381526020016158c96023913960405180606001604052806023815260200161583d60239139886137f6565b612faf88604001516040518060400160405280600b81526020016a546f72736f536861646f7760a81b81525060405180606001604052806023815260200161581a602391396040518060600160405280602381526020016157b760239139896137f6565b604051602001612fc3959493929190614dd8565b60405160208183030381529060405291505092915050565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b606081516000141561304d57505060408051602081019091526000815290565b60006040518060600160405280604081526020016157da604091399050600060038451600261307c9190614c35565b6130869190614e54565b613091906004614d9e565b905060006130a0826020614c35565b67ffffffffffffffff8111156130b8576130b86145aa565b6040519080825280601f01601f1916602001820160405280156130e2576020820181803683370190505b509050818152600183018586518101602084015b8183101561314e576003830192508251603f8160121c168501518253600182019150603f81600c1c168501518253600182019150603f8160061c168501518253600182019150603f81168501518253506001016130f6565b600389510660018114613168576002811461317957613185565b613d3d60f01b600119830152613185565b603d60f81b6000198301525b509398975050505050505050565b61319e84848461280e565b6131aa84848484613837565b61222c5760405162461bcd60e51b81526004016107b490614e68565b60105460609060ff16156132c457600082815260116020908152604080832081516060810183528154815260019091015461ffff80821694830194909452620100009004909216908201529061321b84611291565b90506132278185613944565b6132348260a00151611c39565b6132418360c001516109ff565b61324a846139e7565b61325386613b0b565b60408051808201909152601a81527f646174613a696d6167652f7376672b786d6c3b6261736536342c0000000000006020820152613296611fba8861abe0612dfd565b6040516020016132ac9796959493929190614eba565b60405160208183030381529060405292505050919050565b6132cd82613be2565b604051602001611fd09190614fcf565b6001600160a01b0383166133385761333381600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b61335b565b816001600160a01b0316836001600160a01b03161461335b5761335b8382613ce0565b6001600160a01b038216613372576109fa81613d7d565b826001600160a01b0316826001600160a01b0316146109fa576109fa8282613e2c565b6133af828260405180602001604052806000815250613e70565b5050565b6133bb614456565b60008260038111156133cf576133cf6147b3565b14156133e157610784628d5d33613ea3565b60018260038111156133f5576133f56147b3565b14156134075761078462383840613ea3565b600282600381111561341b5761341b6147b3565b141561342d5761078462d0e5e2613ea3565b61078462ddddde613ea3565b919050565b613446614456565b600082600381111561345a5761345a6147b3565b141561346c5761078462c1a286613ea3565b6001826003811115613480576134806147b3565b14156134925761078462575c6d613ea3565b60028260038111156134a6576134a66147b3565b14156134b85761078462ebf0ef613ea3565b61078462e2e1e8613ea3565b6134cc614456565b60006065836040015160ff16846020015160ff16856000015160ff166134f29190615087565b6134fc9190615087565b61350691906150a4565b8551855185519293506135199284613ed5565b60ff1682526020808601518582015191850151613537929084613ed5565b60ff1660208301526040808601518582015191850151613558929084613ed5565b60ff90811660408401526060830152509392505050565b613577614456565b600082600381111561358b5761358b6147b3565b141561359d576107846240260e613ea3565b60018260038111156135b1576135b16147b3565b14156135c35761078462222225613ea3565b60028260038111156135d7576135d76147b3565b14156135e95761078462b1b6b4613ea3565b6107846000613ea3565b6135fb614456565b600082600381111561360f5761360f6147b3565b1415613621576107846277512d613ea3565b6001826003811115613635576136356147b3565b1415613647576107846248484d613ea3565b600282600381111561365b5761365b6147b3565b141561366d5761078462dfe7e6613ea3565b61078462121213613ea3565b613681614456565b60648363ffffffff1611156136a9576040516349bf8f5360e01b815260040160405180910390fd5b845184516136b991908585613f13565b60ff168152602080860151908501516136d491908585613f13565b60ff166020820152604080860151908501516136f291908585613f13565b60ff1660408201526060808601519085015161371091908585613f13565b60ff166060820152949350505050565b606060008061372f8585613f84565b9150915080826040516020016137469291906150c5565b6040516020818303038152906040529250505092915050565b606061376a83613be2565b61377383613be2565b604051602001613784929190615142565b604051602081830303815290604052905092915050565b6137a3614456565b82516137af908361411d565b60ff16815260208301516137c3908361411d565b60ff16602082015260408301516137da908361411d565b60ff908116604083015260609384015116928101929092525090565b6060848461380588600061417a565b84878760405160200161381d969594939291906151e2565b604051602081830303815290604052905095945050505050565b60006001600160a01b0384163b1561393957604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061387b903390899088908890600401615317565b602060405180830381600087803b15801561389557600080fd5b505af19250505080156138c5575060408051601f3d908101601f191682019092526138c29181019061534a565b60015b61391f573d8080156138f3576040519150601f19603f3d011682016040523d82523d6000602084013e6138f8565b606091505b5080516139175760405162461bcd60e51b81526004016107b490614e68565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612806565b506001949350505050565b6060600061abe084600001511061397a57604051806040016040528060078152602001662042656172202360c81b81525061399a565b6040518060400160405280600681526020016520437562202360d01b8152505b90506139a584610ab0565b6139ae856122aa565b6139bb8660a00151611c39565b6139c88760c001516109ff565b846139d288613be2565b604051602001612fc396959493929190615367565b60606139f68260c001516109ff565b613a2860405180604001604052806004815260200163135bdbd960e21b815250613a238560a00151611c39565b614266565b613a51604051806040016040528060048152602001634e616d6560e01b815250613a2386610ab0565b613a7c6040518060400160405280600681526020016546616d696c7960d01b815250613a23876122aa565b613ab9604051806040016040528060128152602001712932b0b634b9ba34b1902432b0b210233ab960711b815250613a238860200151600261417a565b613af6604051806040016040528060128152602001712932b0b634b9ba34b1902137b23c90233ab960711b815250613a238960400151600261417a565b604051602001611fd096959493929190615416565b6060816020015161ffff1661ffff1415613b3357505060408051602081019091526000815290565b600080836040015161ffff16846020015161ffff1610613b5c5783604001518460200151613b67565b836020015184604001515b61ffff91821693501690506000613b87613b82846001614c35565b613be2565b613b95613b82846001614c35565b604051602001613ba69291906154c9565b60408051601f198184030181528282019091526007825266506172656e747360c81b60208301529150613bd99082614266565b95945050505050565b606081613c065750506040805180820190915260018152600360fc1b602082015290565b8160005b8115613c305780613c1a81614dbd565b9150613c299050600a83614e54565b9150613c0a565b60008167ffffffffffffffff811115613c4b57613c4b6145aa565b6040519080825280601f01601f191660200182016040528015613c75576020820181803683370190505b5090505b841561280657613c8a600183614c4d565b9150613c97600a86614c0b565b613ca2906030614c35565b60f81b818381518110613cb757613cb7614b1d565b60200101906001600160f81b031916908160001a905350613cd9600a86614e54565b9450613c79565b60006001613ced84611e31565b613cf79190614c4d565b600083815260076020526040902054909150808214613d4a576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b600854600090613d8f90600190614c4d565b60008381526009602052604081205460088054939450909284908110613db757613db7614b1d565b906000526020600020015490508060088381548110613dd857613dd8614b1d565b6000918252602080832090910192909255828152600990915260408082208490558582528120556008805480613e1057613e10615515565b6001900381819060005260206000200160009055905550505050565b6000613e3783611e31565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b613e7a838361427b565b613e876000848484613837565b6109fa5760405162461bcd60e51b81526004016107b490614e68565b613eab614456565b60ff601083901c81168252600883901c811660208301529182166040820152606081019190915290565b600060648286613ee86001871688614d30565b613ef29190614d30565b60ff16613eff919061552b565b613f099190615555565b613bd99086614d0b565b60008061271083613f25866064615576565b613f329060ff891661559b565b613f3f8760ff8b1661559b565b613f4991906155be565b613f53919061559b565b613f5d91906155dd565b905060ff8163ffffffff161115613f775760ff9150613f7b565b8091505b50949350505050565b60608082846000015110613fd2576040518060400160405280600481526020016302d3831360e41b8152509050604051806040016040528060018152602001601960f91b8152509150614116565b8351156140dd5783516000908490613fec9061032a614d9e565b613ff69190614e54565b90506001811061402d5761400981613be2565b60405160200161401991906155f4565b604051602081830303815290604052614049565b604051806040016040528060028152602001612d3160f01b8152505b8551909250849061405b906064614d9e565b6140659190614e54565b9050600a811061408f5760405180604001604052806002815260200161189760f11b8152506140ac565b604051806040016040528060038152602001620312e360ec1b8152505b6140b582613be2565b6040516020016140c6929190614d6f565b604051602081830303815290604052925050614116565b604051806040016040528060018152602001600360fc1b8152509050604051806040016040528060018152602001603160f81b81525091505b9250929050565b600080606461412c84826155be565b60ff86161561413b578561413e565b60015b60ff1661414b919061559b565b61415591906155dd565b905060ff8163ffffffff16111561416f5760ff9150614173565b8091505b5092915050565b60606003826002811115614190576141906147b3565b106141d15760405162461bcd60e51b8152602060048201526011602482015270496e76616c696420636f6c6f725479706560781b60448201526064016107b4565b60008260028111156141e5576141e56147b3565b141561421a576141f4836143c9565b604051602001614204919061561d565b6040516020818303038152906040529050610784565b600182600281111561422e5761422e6147b3565b141561424d5761423d836143c9565b604051602001614204919061565c565b614256836143c9565b604051602001613784919061569d565b606082826040516020016137849291906156d4565b6001600160a01b0382166142d15760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016107b4565b6000818152600260205260409020546001600160a01b0316156143365760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016107b4565b614342600083836132dd565b6001600160a01b038216600090815260036020526040812080546001929061436b908490614c35565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60606143db826000015160ff16613be2565b6143eb836020015160ff16613be2565b6143fb846040015160ff16613be2565b604051602001611fd093929190615739565b6040518060e0016040528060008152602001614427614456565b8152602001614434614456565b8152600060208201819052604082018190526060820181905260809091015290565b60408051608081018252600080825260208201819052918101829052606081019190915290565b6001600160e01b031981168114611f6f57600080fd5b6000602082840312156144a557600080fd5b813561416f8161447d565b6000602082840312156144c257600080fd5b5035919050565b60005b838110156144e45781810151838201526020016144cc565b8381111561222c5750506000910152565b6000815180845261450d8160208601602086016144c9565b601f01601f19169290920160200192915050565b602081526000611bbb60208301846144f5565b80356001600160a01b038116811461343957600080fd5b6000806040838503121561455e57600080fd5b61456783614534565b946020939093013593505050565b60048110611f6f57600080fd5b803561343981614575565b60006020828403121561459f57600080fd5b813561416f81614575565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156145e9576145e96145aa565b604052919050565b60ff81168114611f6f57600080fd5b8035613439816145f1565b60006080828403121561461d57600080fd5b6040516080810181811067ffffffffffffffff82111715614640576146406145aa565b6040529050808235614651816145f1565b81526020830135614661816145f1565b60208201526040830135614674816145f1565b60408201526060830135614687816145f1565b6060919091015292915050565b8035600e811061343957600080fd5b60006101a082840312156146b657600080fd5b60405160e0810181811067ffffffffffffffff821117156146d9576146d96145aa565b604052823581526146ed846020850161460b565b60208201526146ff8460a0850161460b565b6040820152610120830135614713816145f1565b60608201526147256101408401614600565b60808201526147376101608401614694565b60a08201526147496101808401614582565b60c08201529392505050565b60008060006060848603121561476a57600080fd5b61477384614534565b925061478160208501614534565b9150604084013590509250925092565b600080604083850312156147a457600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b600e81106147d9576147d96147b3565b9052565b815181526020808301516101a08301916148269084018260ff815116825260ff602082015116602083015260ff604082015116604083015260ff60608201511660608301525050565b50604083015161486660a084018260ff815116825260ff602082015116602083015260ff604082015116604083015260ff60608201511660608301525050565b5060ff60608401511661012083015260ff60808401511661014083015260a08301516148966101608401826147c9565b5060c0830151600481106148ac576148ac6147b3565b806101808401525092915050565b6020810161078482846147c9565b6000602082840312156148da57600080fd5b611bbb82614694565b6000602082840312156148f557600080fd5b611bbb82614534565b8015158114611f6f57600080fd5b6000806040838503121561491f57600080fd5b61492883614534565b91506020830135614938816148fe565b809150509250929050565b6000806000806080858703121561495957600080fd5b61496285614534565b93506020614971818701614534565b935060408601359250606086013567ffffffffffffffff8082111561499557600080fd5b818801915088601f8301126149a957600080fd5b8135818111156149bb576149bb6145aa565b6149cd601f8201601f191685016145c0565b915080825289848285010111156149e357600080fd5b808484018584013760008482840101525080935050505092959194509250565b803561ffff8116811461343957600080fd5b600060608284031215614a2757600080fd5b6040516060810181811067ffffffffffffffff82111715614a4a57614a4a6145aa565b60405282358152614a5d60208401614a03565b6020820152614a6e60408401614a03565b60408201529392505050565b60008060408385031215614a8d57600080fd5b614a9683614534565b9150614aa460208401614534565b90509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600181811c90821680614af657607f821691505b60208210811415614b1757634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b600060208284031215614bcd57600080fd5b815161416f81614575565b600060208284031215614bea57600080fd5b815161416f816148fe565b634e487b7160e01b600052601260045260246000fd5b600082614c1a57614c1a614bf5565b500690565b634e487b7160e01b600052601160045260246000fd5b60008219821115614c4857614c48614c1f565b500190565b600082821015614c5f57614c5f614c1f565b500390565b600060808284031215614c7657600080fd5b6040516080810181811067ffffffffffffffff82111715614c9957614c996145aa565b6040528251614ca7816145f1565b81526020830151614cb7816145f1565b60208201526040830151614cca816145f1565b60408201526060830151614cdd816145f1565b60608201529392505050565b600060ff831680614cfc57614cfc614bf5565b8060ff84160691505092915050565b600060ff821660ff84168060ff03821115614d2857614d28614c1f565b019392505050565b600060ff821660ff841680821015614d4a57614d4a614c1f565b90039392505050565b60008151614d658185602086016144c9565b9290920192915050565b60008351614d818184602088016144c9565b835190830190614d958183602088016144c9565b01949350505050565b6000816000190483118215151615614db857614db8614c1f565b500290565b6000600019821415614dd157614dd1614c1f565b5060010190565b60008651614dea818460208b016144c9565b865190830190614dfe818360208b016144c9565b8651910190614e11818360208a016144c9565b8551910190614e248183602089016144c9565b8451910190614e378183602088016144c9565b651e17b9bb339f60d11b9101908152600601979650505050505050565b600082614e6357614e63614bf5565b500490565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b683d913730b6b2911d1160b91b81528751600090614edf816009850160208d016144c9565b701116113232b9b1b934b83a34b7b7111d1160791b6009918401918201528851614f1081601a840160208d016144c9565b600160fd1b601a92909101918201528751614f3281601b840160208c016144c9565b7111161130ba3a3934b13aba32b9911d2dbd9160711b601b92909101918201528651614f6581602d840160208b016144c9565b8651910190614f7b81602d840160208a016144c9565b614fc0614fb2614fac614fa6602d858701016c113eae961134b6b0b3b2911d1160991b8152600d0190565b89614d53565b87614d53565b61227d60f01b815260020190565b9b9a5050505050505050505050565b7f7b226e616d65223a2252656e646572696e6720437562202300000000000000008152600082516150078160188501602087016144c9565b7f2e2e2e222c226465736372697074696f6e223a22556e72657665616c6564222c60189390910192830152507f22696d616765223a22697066733a2f2f516d63355956797a4b5a364433776a7160388201527f4c4663665542507470397968374e4b787374324d324e336e4446644b445a227d6058820152607801919050565b600061ffff808316818516808303821115614d9557614d95614c1f565b600061ffff808416806150b9576150b9614bf5565b92169190910692915050565b7f207472616e73666f726d3d277472616e736c61746528302c00000000000000008152600083516150fd8160188501602088016144c9565b690a4b1cd8d85b194a0c4b60b21b60189184019182015283516151278160228401602088016144c9565b61292760f01b60229290910191820152602401949350505050565b7101e39bb33903b34b2bba137bc1e93981018160751b81526000835161516f8160128501602088016144c9565b600160fd1b60129184019182015283516151908160138401602088016144c9565b7f2720786d6c6e733d27687474703a2f2f7777772e77332e6f72672f323030302f601392909101918201527239bb3393903b32b939b4b7b71e93989718939f60691b6033820152604601949350505050565b693c706174682069643d2760b01b81526000875161520781600a850160208c016144c9565b642720643d2760d81b600a91840191820152875161522c81600f840160208c016144c9565b602760f81b600f9290910191820152865161524e816010840160208b016144c9565b8651910190615264816010840160208a016144c9565b7f3e3c616e696d617465206174747269627574654e616d653d2764272076616c75601092909101918201526365733d2760e01b603082015284516152af8160348401602089016144c9565b6153096152cb614fac603484860101603b60f81b815260010190565b7f2720626567696e3d27347327206475723d273173272066696c6c3d276672656581526b3d3293979f1e17b830ba341f60a11b6020820152602c0190565b9a9950505050505050505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612d56908301846144f5565b60006020828403121561535c57600080fd5b815161416f8161447d565b60008751602061537a8285838d016144c9565b8184019150600160fd1b80835289516153998160018601858e016144c9565b640103a3432960dd1b6001949091019384015288516153be8160068601858d016144c9565b600693019283015286516153d88160078501848b016144c9565b86519201916153ed8160078501848a016144c9565b855192019161540281600785018489016144c9565b919091016007019998505050505050505050565b7f74726169745f74797065223a2253706563696573222c2276616c7565223a220081526000601f8851602061545082848701838e016144c9565b89519185019161546581858501848e016144c9565b895192019161547981858501848d016144c9565b885192019161548d81858501848c016144c9565b87519201916154a181858501848b016144c9565b86519201916154b581858501848a016144c9565b919091019091019998505050505050505050565b602360f81b8152600083516154e58160018501602088016144c9565b632026202360e01b60019184019182015283516155098160058401602088016144c9565b01600501949350505050565b634e487b7160e01b600052603160045260246000fd5b600061ffff8083168185168183048111821515161561554c5761554c614c1f565b02949350505050565b600061ffff8084168061556a5761556a614bf5565b92169190910492915050565b600063ffffffff8381169083168181101561559357615593614c1f565b039392505050565b600063ffffffff8083168185168183048111821515161561554c5761554c614c1f565b600063ffffffff808316818516808303821115614d9557614d95614c1f565b600063ffffffff8084168061556a5761556a614bf5565b602d60f81b8152600082516156108160018501602087016144c9565b9190910160010192915050565b6a040ccd2d8d87a4ee4cec4560ab1b81526000825161564381600b8501602087016144c9565b61292760f01b600b939091019283015250600d01919050565b6c040e6e8e4ded6ca7a4ee4cec45609b1b81526000825161568481600d8501602087016144c9565b61292760f01b600d939091019283015250600f01919050565b630e4cec4560e31b8152600082516156bc8160048501602087016144c9565b602960f81b6004939091019283015250600501919050565b71113e963d913a3930b4ba2fba3cb832911d1160711b815282516000906157028160128501602088016144c9565b6a1116113b30b63ab2911d1160a91b601291840191820152835161572d81601d8401602088016144c9565b01601d01949350505050565b6000845161574b8184602089016144c9565b8083019050600b60fa1b808252855161576b816001850160208a016144c9565b600192019182015283516157868160028401602088016144c9565b016002019594505050505056fe4d34303520363735204c3534302036373520353430203534302034303520353430205a4d35373020383130204c3731302037383620373130203637352035373020363735205a4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f4d35343020383130204c3637352038313020363735203637352035343020363735205a4d33373020373930204c3537302038313020353730203637352033373020363735205a4d35343020363735204c3637352036373520363735203534302035343020353430205a4d33373020363735204c3537302036373520353730203534302033373020353630205a4d35373020363735204c3731302036373520373130203536342035373020353430205a4d34303520383130204c3534302038313020353430203637352034303520363735205aa2646970667358221220156d4376738404e0a4cf96d2d51e3fb61493d607e98abc7d29aa0dd2d6c485c464736f6c63430008090033

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

00000000000000000000000065b7990ab726ef573c176bb8b9b5464de6ea6c89

-----Decoded View---------------
Arg [0] : twoBitHoney (address): 0x65B7990aB726Ef573C176bb8b9b5464de6ea6C89

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000065b7990ab726ef573c176bb8b9b5464de6ea6c89


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

OVERVIEW

**The second generation of [Two Bit Bears](https://opensea.io/collection/twobitbears). A Series of Hyper-Realistic Algorithmically Generated Crypto Collectible Bears Minted on the Ethereum Blockchain.**Completely Generative, On Chain ERC 721 with Computationally Randomized A...

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.