ETH Price: $3,264.23 (+4.51%)
Gas: 2 Gwei

Token

CryptoDragons Eggs (CDE)
 

Overview

Max Total Supply

10,000 CDE

Holders

1,281

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A

Other Info

Balance
1 CDE
0x7DdD3FbEFB1c2b0c66E6ffE474EE02D60e192F73
Loading...
Loading
Loading...
Loading
Loading...
Loading

OVERVIEW

CryptoDragons is a unique NFT project, where Dragons can breed and battle on Arena

# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
EggToken

Compiler Version
v0.8.0+commit.c7dfd78e

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion
File 1 of 21 : EggToken.sol
// SPDX-License-Identifier: GPL-3.0-only
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "./structs/DragonInfo.sol";
import "./structs/EggInfo.sol";
import "./utils/GenesLib.sol";
import "./utils/Random.sol";
import "./access/BaseAccessControl.sol";
import "./DragonCreator.sol";

contract EggToken is ERC721, BaseAccessControl {

    using SafeMath for uint;
    using Address for address;
    using Counters for Counters.Counter;

    uint constant THRESHOLD_DENOMINATOR = 1e8;

    Counters.Counter private _tokenIds;

    mapping(uint => uint) private _info;
    mapping(uint => string) private _cids;
    mapping(uint => string) private _hatchCids;

    mapping(DragonInfo.Types => uint) private _randomDragonSupply;
    mapping(DragonInfo.Types => uint) private _totalEggSupply;
    mapping(DragonInfo.Types => uint) private _eggCounts;

    uint internal _totalSupply;
    
    uint internal _hatchTime;
    address internal _dragonCreatorAddress;
    address internal _eggMarketAddress;

    string private _defaultMetadataCid;
    
    GenesLib.GenesRange private COMMON_RANGE;
    GenesLib.GenesRange private RARE_RANGE;
    GenesLib.GenesRange private EPIC_RANGE;

    event EggHatched(address indexed operator, uint eggId, uint dragonId);
    
    constructor(
        uint totalEggSply,
        uint totalEpic20EggSply,
        uint totalLegendaryEggSply,
        uint randomLegendaryDragonSply, 
        uint randomEpic20DragonSply, 
        uint randomCommonDragonSply, 
        uint htchTime,
        string memory defaultCid,
        address accessControl,
        address dragonCreator) ERC721("CryptoDragons Eggs", "CDE") BaseAccessControl(accessControl) {
        
        uint totalRandomEggSupply = randomLegendaryDragonSply + randomEpic20DragonSply + randomCommonDragonSply;
        require(totalEggSply == totalEpic20EggSply + totalLegendaryEggSply + totalRandomEggSupply, 
            "EggToken: inconsistent constructor arguments");
        
        _totalSupply = totalEggSply;

        _totalEggSupply[DragonInfo.Types.Unknown] = totalRandomEggSupply;
        _totalEggSupply[DragonInfo.Types.Epic20] = totalEpic20EggSply;
        _totalEggSupply[DragonInfo.Types.Legendary] = totalLegendaryEggSply;
        
        _randomDragonSupply[DragonInfo.Types.Legendary] = randomLegendaryDragonSply;
        _randomDragonSupply[DragonInfo.Types.Epic20] = randomEpic20DragonSply;
        _randomDragonSupply[DragonInfo.Types.Common] = randomCommonDragonSply;
        
        _hatchTime = htchTime; 
        _defaultMetadataCid = defaultCid;

        _dragonCreatorAddress = dragonCreator;

        COMMON_RANGE = GenesLib.GenesRange({from: 0, to: 15});
        RARE_RANGE = GenesLib.GenesRange({from: 15, to: 20});
        EPIC_RANGE = GenesLib.GenesRange({from: 20, to: 25});
    }

    function approveAndCall(address spender, uint256 tokenId, bytes calldata extraData) external returns (bool success) {
        _approve(spender, tokenId);
        (bool _success, ) = 
            spender.call(
                abi.encodeWithSignature("receiveApproval(address,uint256,address,bytes)", 
                _msgSender(), 
                tokenId, 
                address(this), 
                extraData) 
            );
        if(!_success) { 
            revert("EggToken: spender internal error"); 
        }
        return true;
    }

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

    function totalEggSupply(DragonInfo.Types drgType) public view returns(uint) {
        return _totalEggSupply[drgType];
    }

    function randomDragonSupply(DragonInfo.Types drgType) external view returns(uint) {
        return _randomDragonSupply[drgType];
    }

    function currentEggCount(DragonInfo.Types drgType) public view returns(uint) {
        return _eggCounts[drgType];
    }

    function defaultMetadataCid() public view returns (string memory){
        return _defaultMetadataCid;
    }

    function setDefaultMetadataCid(string calldata newDefaultCid) external onlyRole(COO_ROLE) {
        _defaultMetadataCid = newDefaultCid;
    }

    function setMetadataCids(uint tokenId, string calldata cid, string calldata hatchCid) external onlyRole(COO_ROLE) {
        require(bytes(cid).length >= 46 && bytes(hatchCid).length >= 46, "EggToken: bad CID");
        require(!hasMetadataCids(tokenId), "EggToken: CIDs are already set");
        _cids[tokenId] = cid;
        _hatchCids[tokenId] = hatchCid;
    }

    function hasMetadataCids(uint tokenId) public view returns(bool) {
        return bytes(_hatchCids[tokenId]).length > 0;
    }

    function hatchTime() public view returns(uint) {
        return _hatchTime;
    }

    function setHatchTime(uint newValue) external onlyRole(COO_ROLE) {
        uint previousValue = _hatchTime;
        _hatchTime = newValue;
        emit ValueChanged("hatchTime", previousValue, newValue);
    }

    function dragonCreatorAddress() public view returns(address) {
        return _dragonCreatorAddress;
    }

    function setDragonCreatorAddress(address newAddress) external onlyRole(CEO_ROLE) {
        address previousAddress = _dragonCreatorAddress;
        _dragonCreatorAddress = newAddress;
        emit AddressChanged("dragonCreator", previousAddress, newAddress);
    }

    function eggMarketAddress() public view returns(address) {
        return _eggMarketAddress;
    }

    function setEggMarketAddress(address newAddress) external onlyRole(CEO_ROLE) {
        address previousAddress = _eggMarketAddress;
        _eggMarketAddress = newAddress;
        emit AddressChanged("eggMarket", previousAddress, newAddress);
    }

    function canHatch(uint tokenId) external view returns(bool) {
        EggInfo.Details memory info = eggInfo(tokenId);
        return _canHatch(info);
    }

    function isHatched(uint tokenId) external view returns(bool) {
        EggInfo.Details memory info = eggInfo(tokenId);
        return info.hatchedAt > 0;
    }

    function eggInfo(uint tokenId) public view returns(EggInfo.Details memory) {
        require(_exists(tokenId), "EggToken: nonexistent token");
        return EggInfo.getDetails(_info[tokenId]);
    }

    function _canHatch(EggInfo.Details memory info) internal view returns(bool) {
        return info.hatchedAt == 0 && block.timestamp >= hatchTime();
    }

    function tokenURI(uint tokenId) public view virtual override returns (string memory) {
        EggInfo.Details memory info = eggInfo(tokenId);
        return string(abi.encodePacked("ipfs://", (info.hatchedAt > 0) ? _hatchCids[tokenId] : _cids[tokenId]));
    }

    function mint(address to, DragonInfo.Types _dragonType) external returns (uint) {
        require(_tokenIds.current() < totalSupply(), "EggToken: supply is exceeded");
        require(hasRole(CEO_ROLE, _msgSender()) || _msgSender() == eggMarketAddress(), 
            "EggToken: not enough privileges to call the method");
        require(to != address(0), "EggToken: wrong address");

        require(_dragonType == DragonInfo.Types.Epic20 
            || _dragonType == DragonInfo.Types.Legendary 
            || _dragonType == DragonInfo.Types.Unknown, "EggToken: wrong dragon type");
        
        require(currentEggCount(_dragonType) < totalEggSupply(_dragonType), 
            "EggToken: total supply for the given dragon type is exceeded");
        
        _eggCounts[_dragonType]++;
        _tokenIds.increment();
        
        uint newTokenId = _tokenIds.current();
        _mint(to, newTokenId);
        
        _info[newTokenId] = EggInfo.getValue(EggInfo.Details({
            mintedAt: block.timestamp,
            dragonType: _dragonType,
            hatchedAt: 0,
            dragonId: 0
        }));
        _cids[newTokenId] = defaultMetadataCid();

        return newTokenId;
    }

    function hatch(uint tokenId) external {
        EggInfo.Details memory info = eggInfo(tokenId);
        require(ownerOf(tokenId) == _msgSender(), "EggToken: hatch caller is not owner");
        require(_canHatch(info), "EggToken: cannot be hatched");

        (DragonInfo.Types dragonType, uint genes) = _randomGenes(info);
        _randomDragonSupply[dragonType]--;

        uint newDragonId = DragonCreator(dragonCreatorAddress()).giveBirth(tokenId, genes, _msgSender());

        info.hatchedAt = block.timestamp;
        info.dragonId = newDragonId;
        _info[tokenId] = EggInfo.getValue(info);

        emit EggHatched(_msgSender(), tokenId, newDragonId);
    }

    function _randomGenes(EggInfo.Details memory info) internal view returns (DragonInfo.Types, uint) {
        DragonInfo.Types t = (info.dragonType == DragonInfo.Types.Unknown) 
            ? _randomDragonType(info.mintedAt ^ block.difficulty ^ block.timestamp) : info.dragonType;
        
        uint genes = GenesLib.randomSetGenesToPositions(
            0, GenesLib.createOrderedRangeArray(COMMON_RANGE.from, COMMON_RANGE.to), 
            Random.rand(info.mintedAt ^ block.number ^ block.difficulty), true);
        
        if (t == DragonInfo.Types.Epic20) {
            genes = GenesLib.randomSetGenesToPositions(
                genes, GenesLib.createOrderedRangeArray(RARE_RANGE.from, RARE_RANGE.to), 
                Random.rand(block.difficulty ^ info.mintedAt ^ block.timestamp), false);
        }
        else if (t == DragonInfo.Types.Legendary) {
            genes = GenesLib.randomSetGenesToPositions(
                genes, GenesLib.createOrderedRangeArray(RARE_RANGE.from, EPIC_RANGE.to), 
                Random.rand(info.mintedAt ^ block.number ^ block.timestamp ^ block.difficulty), false);
        }

        return (t, genes);
    } 
 

    function _randomDragonType(uint salt) internal view returns (DragonInfo.Types) {
        uint remainingLegendarySupply = _randomDragonSupply[DragonInfo.Types.Legendary];
        uint remainingEpic20Supply = _randomDragonSupply[DragonInfo.Types.Epic20];
        uint remainingCommonSupply = _randomDragonSupply[DragonInfo.Types.Common];

        uint remainingTotalSupply = remainingLegendarySupply.add(remainingEpic20Supply).add(remainingCommonSupply);
        
        uint r = Random.rand(salt).mod(THRESHOLD_DENOMINATOR);
        if (r <= _calcDragonThreshold(remainingLegendarySupply, remainingTotalSupply)) {
            return DragonInfo.Types.Legendary;
        }
        else if (r <= _calcDragonThreshold(remainingEpic20Supply, remainingTotalSupply)) {
            return DragonInfo.Types.Epic20;
        }
        else {
            return DragonInfo.Types.Common;
        }
    }

    function _calcDragonThreshold(uint remainingDragonSupply, uint remainingTotalSupply) pure internal returns (uint) {
        return remainingDragonSupply.mul(THRESHOLD_DENOMINATOR).div(remainingTotalSupply);
    }
}

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

pragma solidity ^0.8.0;

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

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
            // benefit is lost if 'b' is also tested.
            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
            if (a == 0) return (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

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

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

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

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

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

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

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

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

File 4 of 21 : Counters.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @title Counters
 * @author Matt Condon (@shrugs)
 * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number
 * of elements in a mapping, issuing ERC721 ids, or counting request ids.
 *
 * Include with `using Counters for Counters.Counter;`
 */
library Counters {
    struct Counter {
        // This variable should never be directly accessed by users of the library: interactions must be restricted to
        // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
        // this feature: see https://github.com/ethereum/solidity/issues/4637
        uint256 _value; // default: 0
    }

    function current(Counter storage counter) internal view returns (uint256) {
        return counter._value;
    }

    function increment(Counter storage counter) internal {
        unchecked {
            counter._value += 1;
        }
    }

    function decrement(Counter storage counter) internal {
        uint256 value = counter._value;
        require(value > 0, "Counter: decrement overflow");
        unchecked {
            counter._value = value - 1;
        }
    }

    function reset(Counter storage counter) internal {
        counter._value = 0;
    }
}

File 5 of 21 : 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 6 of 21 : DragonInfo.sol
// SPDX-License-Identifier: GPL-3.0-only
pragma solidity ^0.8.0;

library DragonInfo {
    
    uint constant MASK = 0xF000000000000000000000000;

    enum Types { 
        Unknown,
        Common, 
        Rare16, 
        Rare17, 
        Rare18, 
        Rare19,
        Epic20, 
        Epic21,
        Epic22,
        Epic23,
        Epic24, 
        Legendary
    }

    struct Details { 
        uint genes;
        uint eggId;
        uint parent1Id;
        uint parent2Id;
        uint generation;
        uint strength;
        Types dragonType;
    }

    function getDetails(uint value) internal pure returns (Details memory) {
        return Details (
            {
                genes: uint256(uint104(value)),
                parent1Id: uint256(uint32(value >> 104)),
                parent2Id: uint256(uint32(value >> 136)),
                generation: uint256(uint16(value >> 168)),
                strength: uint256(uint16(value >> 184)),
                dragonType: Types(uint16(value >> 200)),
                eggId: uint256(uint32(value >> 216))
            }
        );
    }

    function getValue(Details memory details) internal pure returns (uint) {
        uint result = uint(details.genes);
        result |= details.parent1Id << 104;
        result |= details.parent2Id << 136;
        result |= details.generation << 168;
        result |= details.strength << 184;
        result |= uint(details.dragonType) << 200;
        result |= details.eggId << 216;
        return result;
    }

    function calcType(uint genes) internal pure returns (Types) {
        uint mask = MASK;
        uint numRare = 0;
        uint numEpic = 0;
        for (uint i = 0; i < 10; i++) { //just Rare and Epic genes are important to check
            if (genes & mask > 0) {
                if (i < 5) { //Epic-range
                    numEpic++;
                }
                else { //Rare-range
                    numRare++;
                }
            }
            mask = mask >> 4;
        }
        Types result = Types.Unknown;
        if (numEpic == 5 && numRare == 5) {
            result = Types.Legendary;
        }
        else if (numEpic < 5 && numRare == 5) {
            result = Types(6 + numEpic);
        }
        else if (numEpic == 0 && numRare < 5) {
            result = Types(1 + numRare);
        }
        else if (numEpic == 0 && numRare == 0) {
            result = Types.Common;
        }

        return result;
    }

    function calcStrength(uint genes) internal pure returns (uint) {
        uint mask = MASK;
        uint strength = 0;
        for (uint i = 0; i < 25; i++) { 
            uint gLevel = (genes & mask) >> ((24 - i) * 4);
            if (i < 6) { //Epic
                strength += 3 * (25 - i) * gLevel;
            } 
            else if (i < 10) { //Rare 
                strength += 2 * (25 - i) * gLevel;
            }
            else { //Common-range
                if (gLevel > 0) {
                    strength += (25 - i) * gLevel;
                }
                else {
                    strength += (25 - i);
                }
            }
            mask = mask >> 4;
        }
        return strength;
    }

    function calcGeneration(uint g1, uint g2) internal pure returns (uint) {
        return (g1 >= g2 ? g1 : g2) + 1;
    }
}

File 7 of 21 : EggInfo.sol
// SPDX-License-Identifier: GPL-3.0-only
pragma solidity ^0.8.0;
import "./DragonInfo.sol";

library EggInfo {

    struct Details { 
        uint mintedAt;
        DragonInfo.Types dragonType;
        uint hatchedAt;
        uint dragonId;
    }

    function getDetails(uint value) internal pure returns (Details memory) {
        return Details (
            {
                mintedAt: uint256(uint64(value)),
                dragonType: DragonInfo.Types(uint16(value >> 64)),
                hatchedAt: uint256(uint64(value >> 80)),
                dragonId: uint256(uint32(value >> 144))
            }
        );
    }

    function getValue(Details memory details) internal pure returns (uint) {
        uint result = uint(details.mintedAt);
        result |= uint(details.dragonType) << 64;
        result |= uint(details.hatchedAt) << 80;
        result |= uint(details.dragonId) << 144;
        return result;
    }
}

File 8 of 21 : GenesLib.sol
// SPDX-License-Identifier: GPL-3.0-only
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "./Random.sol";

library GenesLib {
    using SafeMath for uint;
    uint private constant MAGIC_NUM = 0x123456789ABCDEF;

    struct GenesRange {
        uint from;
        uint to;
    }

    function setGeneLevelTo(uint genes, uint level, uint position) internal pure returns (uint) {
        return genes | uint(level << (position * 4));
    }

    function geneLevelAt(uint genes, uint position) internal pure returns (uint) {
        return (genes >> (position * 4)) & 0xF;
    }

    function zeroGenePositionsInRange(uint genes, GenesRange memory range) 
    internal pure returns (uint, uint[] memory) {
        uint[] memory zeroPositions = new uint[](range.to - range.from);
        uint count = 0;
        for (uint pos = range.from; pos < range.to; pos++) {
            uint level = geneLevelAt(genes, pos);
            if (level == 0) {
                zeroPositions[count] = pos;
                count++;
            }
        }
        return (count, zeroPositions);
    }

    function randomGeneLevel(uint randomValue, bool includeZero) internal pure returns (uint) {
        if (includeZero) {
            return randomValue.mod(16);
        }
        else {
            return 1 + randomValue.mod(15);
        }
    }

    function randomInheritGenesInRange(uint genes, uint parent1Genes, uint parent2Genes,
        GenesRange memory range, uint randomValue, bool includeZero) internal pure returns (uint) {
        
        for (uint pos = range.from; pos < range.to; pos++) {
            uint geneLevel1 = geneLevelAt(parent1Genes, pos);
            uint geneLevel2 = geneLevelAt(parent2Genes, pos);

            if (includeZero || (geneLevel1 > 0 && geneLevel2 > 0)) {
                uint d = (pos % 2 == 0) ? ((randomValue >> pos) + (MAGIC_NUM >> pos)) : ~(randomValue >> pos);
                uint r = d.mod(100);
                
                if (r < 45) { //45%
                    genes = setGeneLevelTo(genes, geneLevel1, pos);
                }
                else if (r >= 45 && r < 90) { //45%
                    genes = setGeneLevelTo(genes, geneLevel2, pos);
                }
                else { //10%
                    uint level = randomGeneLevel(d, includeZero);
                    genes = setGeneLevelTo(genes, level, pos);
                }
            }
        }
        return genes;
    }

    function randomSetGenesToPositions(uint genes, uint[] memory positions, uint randomValue, bool includeZero) 
    internal pure returns (uint) {
        for (uint i = 0; i < positions.length; i++) {
            genes = setGeneLevelTo(genes, randomGeneLevel(
                (i % 2 > 0) ? ((randomValue >> i) + (MAGIC_NUM >> i)) : ~(randomValue >> i), 
                includeZero), positions[i]);
        }
        return genes;
    }

    function randomGenePositions(GenesRange memory range, uint count, uint randomValue) 
    internal pure returns (uint[] memory) {
        if (count > 0) {
            uint[] memory shuffledRangeArray = 
                Random.shuffle(createOrderedRangeArray(range.from, range.to), randomValue);
            uint[] memory positions = new uint[](count);
            for (uint i = 0; i < count; i++) {
                positions[i] = shuffledRangeArray[i];
            }
            return positions;
        }
        return new uint[](0);
    }

    function createOrderedRangeArray(uint from, uint to) internal pure returns (uint[] memory) {
        uint[] memory rangeArray = new uint[](to - from) ;
        for (uint i = 0; i < rangeArray.length; i++) {
            rangeArray[i] = from + i;
        }
        return rangeArray;
    }

}

File 9 of 21 : Random.sol
// SPDX-License-Identifier: GPL-3.0-only
pragma solidity ^0.8.0;

library Random {
    function rand(uint salt) internal view returns (uint) {
        return uint(keccak256(abi.encodePacked(block.difficulty, block.timestamp, salt)));
    }

    function randFrom(uint[] memory array, uint from, uint to, uint randomValue)
    internal pure returns (uint) {
        uint count = to - from;
        return array[from + randomValue % count];
    }

    function shuffle(uint[] memory array, uint randomValue) internal pure returns (uint[] memory) {
        for (uint i = 0; i < array.length; i++) {
            uint n = i + randomValue % (array.length - i);
            uint temp = array[n];
            array[n] = array[i];
            array[i] = temp;
        }
        return array;
    }
}

File 10 of 21 : BaseAccessControl.sol
// SPDX-License-Identifier: GPL-3.0-only
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/access/IAccessControl.sol";
import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "../interfaces/IChangeableVariables.sol";

abstract contract BaseAccessControl is Context, IChangeableVariables {

    bytes32 public constant CEO_ROLE = keccak256("CEO");
    bytes32 public constant CFO_ROLE = keccak256("CFO");
    bytes32 public constant COO_ROLE = keccak256("COO");

    address private _accessControl;

    modifier onlyRole(bytes32 role) {
        _checkRole(role, _msgSender());
        _;
    }

    constructor (address accessControl) Context() {
        _accessControl = accessControl;
    }

    function accessControlAddress() public view returns (address) {
        return _accessControl;
    }

    function setAccessControlAddress(address newAddress) external onlyRole(CEO_ROLE) {
        address previousAddress = _accessControl;
        _accessControl = newAddress;
        emit AddressChanged("accessControl", previousAddress, newAddress);
    }

    function hasRole(bytes32 role, address account) public view returns (bool) {
        return IAccessControl(accessControlAddress()).hasRole(role, account);
    }

    function _checkRole(bytes32 role, address account) internal view {
        if (!hasRole(role, account)) {
            revert(
                string(
                    abi.encodePacked(
                        "AccessControl: account ",
                        Strings.toHexString(uint160(account), 20),
                        " is missing role ",
                        Strings.toHexString(uint256(role), 32)
                    )
                )
            );
        }
    }
}

File 11 of 21 : DragonCreator.sol
// SPDX-License-Identifier: GPL-3.0-only
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/utils/Address.sol";
import "./structs/DragonInfo.sol";
import "./access/BaseAccessControl.sol";
import "./DragonToken.sol";

contract DragonCreator is BaseAccessControl {
    
    using Address for address;

    address private _tokenContractAddress;

    mapping(DragonInfo.Types => uint) private _zeroDragonsIssueLimits;
    mapping(address => bool) private _giveBirthCallers;

    bool private _isChangeOfIssueLimitsAllowed;

    event DragonCreated(
        uint dragonId, 
        uint eggId,
        uint parent1Id,
        uint parent2Id,
        uint generation,
        DragonInfo.Types t,
        uint genes,
        address indexed creator,
        address indexed to);

    constructor(address accessControl, address tknContract) BaseAccessControl(accessControl) {
        _tokenContractAddress = tknContract;
        _isChangeOfIssueLimitsAllowed = true;
    }

    function tokenContract() public view returns (address) {
        return _tokenContractAddress;
    }

    function setTokenContract(address newAddress) external onlyRole(CEO_ROLE) {
        address previousAddress = _tokenContractAddress;
        _tokenContractAddress = newAddress;
        emit AddressChanged("tokenContract", previousAddress, newAddress);
    }

    function isChangeOfIssueLimitsAllowed() public view returns (bool) {
        return _isChangeOfIssueLimitsAllowed;
    }

    function currentIssueLimitFor(DragonInfo.Types _dragonType) external view returns (uint) {
        return _zeroDragonsIssueLimits[_dragonType];
    }

    function updateIssueLimitFor(DragonInfo.Types _dragonType, uint newValue) external onlyRole(CEO_ROLE) {
        require(isChangeOfIssueLimitsAllowed(), 
            "DragonCreator: updating the issue limits is not allowed anymore");
        _zeroDragonsIssueLimits[_dragonType] = newValue;
    }

    function blockUpdatingIssueLimitsForever() external onlyRole(CEO_ROLE) {
        _isChangeOfIssueLimitsAllowed = false;
    }
    
    function setGiveBirthCallers(address[] calldata callers, bool value) external onlyRole(CEO_ROLE) {
        for (uint i = 0; i < callers.length; i++) {
            bool previousValue = _giveBirthCallers[callers[i]];
            _giveBirthCallers[callers[i]] = value;
            emit BoolValueChanged(string(abi.encodePacked("giveBirthCallers.", callers[i])), previousValue, value);
        }
    }

    function issue(uint genes, address to) external onlyRole(CEO_ROLE) returns (uint) {
        DragonInfo.Types dragonType = DragonInfo.calcType(genes);
        uint currentLimit = _zeroDragonsIssueLimits[dragonType];
        require(dragonType != DragonInfo.Types.Unknown, "DragonCreator: unable to identify a type of the given dragon");
        require(currentLimit > 0, "DragonCreator: the issue limit has exceeded");
        _zeroDragonsIssueLimits[dragonType] = currentLimit - 1;

        return _createDragon(0, 0, 0, genes, dragonType, to);
    }

    function giveBirth(uint eggId, uint genes, address to) external returns (uint) {
        require(_giveBirthCallers[_msgSender()], "DragonCreator: not enough privileges to call the method");    
        return _createDragon(eggId, 0, 0, genes, DragonInfo.Types.Unknown, to);
    }

    function giveBirth(uint parent1Id, uint parent2Id, uint genes, address to) external returns (uint) {
        require(_giveBirthCallers[_msgSender()], "DragonCreator: not enough privileges to call the method");
        return _createDragon(0, parent1Id, parent2Id, genes, DragonInfo.Types.Unknown, to);
    }

    function _createDragon(uint _eggId, uint _parent1Id, uint _parent2Id, uint _genes, DragonInfo.Types _dragonType, address to)
    internal returns (uint) {
        DragonToken dragonToken = DragonToken(tokenContract());
        DragonInfo.Details memory parent1Details = dragonToken.dragonInfo(_parent1Id);
        DragonInfo.Details memory parent2Details = dragonToken.dragonInfo(_parent2Id);

        if (_parent1Id > 0 && _parent2Id > 0) { //if not 1st-generation dragons
            require(_parent1Id != _parent2Id, "DragonCreator: parent dragons must be different");
            require(
                parent1Details.dragonType != DragonInfo.Types.Legendary 
                && parent2Details.dragonType != DragonInfo.Types.Legendary, 
                "DragonCreator: neither of the parent dragons can be of Legendary-type"
            );
            require(!dragonToken.isSiblings(_parent1Id, _parent2Id), "DragonCreator: the parent dragons must not be siblings");
            require(
                !dragonToken.isParent(_parent1Id, _parent2Id) && !dragonToken.isParent(_parent2Id, _parent1Id), 
                "DragonCreator: neither of the parent dragons must be a parent or child of another"
            );
        }

        DragonInfo.Details memory info = DragonInfo.Details({ 
            eggId: _eggId,
            parent1Id: _parent1Id,
            parent2Id: _parent2Id,
            generation: DragonInfo.calcGeneration(parent1Details.generation, parent2Details.generation),
            dragonType: (_dragonType == DragonInfo.Types.Unknown) ? DragonInfo.calcType(_genes) : _dragonType,
            strength: 0, //DragonInfo.calcStrength(_genes),
            genes: _genes
        });

        uint newDragonId = dragonToken.mint(to, info);
        
        emit DragonCreated(
            newDragonId, info.eggId,
            info.parent1Id, info.parent2Id, 
            info.generation, info.dragonType, 
            info.genes, _msgSender(), to);

        return newDragonId; 
    }
}

File 12 of 21 : 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 13 of 21 : 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 14 of 21 : 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 15 of 21 : 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 16 of 21 : 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 17 of 21 : 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 18 of 21 : 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 19 of 21 : IAccessControl.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {AccessControl-_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) external;
}

File 20 of 21 : IChangeableVariables.sol
// SPDX-License-Identifier: GPL-3.0-only
pragma solidity ^0.8.0;

interface IChangeableVariables {
    event AddressChanged(string fieldName, address previousAddress, address newAddress);
    event ValueChanged(string fieldName, uint previousValue, uint newValue);
    event BoolValueChanged(string fieldName, bool previousValue, bool newValue);
}

File 21 of 21 : DragonToken.sol
// SPDX-License-Identifier: GPL-3.0-only
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "./access/BaseAccessControl.sol";
import "./structs/DragonInfo.sol";

contract DragonToken is ERC721, BaseAccessControl {

    using Address for address;
    using Counters for Counters.Counter;
    
    Counters.Counter private _dragonIds;

    // Mapping token id to dragon details
    mapping(uint => uint) private _info;
    // Mapping token id to cid
    mapping(uint => string) private _cids;

    string private _defaultMetadataCid;
    address private _dragonCreator;

    constructor(string memory defaultCid, address accessControl) 
    ERC721("CryptoDragons", "CD")
    BaseAccessControl(accessControl) {        
        _defaultMetadataCid = defaultCid;
    }

    function approveAndCall(address spender, uint256 tokenId, bytes calldata extraData) external returns (bool success) {
        _approve(spender, tokenId);
        (bool _success, ) = 
            spender.call(
                abi.encodeWithSignature("receiveApproval(address,uint256,address,bytes)", 
                _msgSender(), 
                tokenId, 
                address(this), 
                extraData) 
            );
        if(!_success) { 
            revert("DragonToken: spender internal error"); 
        }
        return true;
    }

    function tokenURI(uint tokenId) public view virtual override returns (string memory) {
        string memory cid = _cids[tokenId];
        return string(abi.encodePacked("ipfs://", (bytes(cid).length > 0) ? cid : defaultMetadataCid()));
    }

    function dragonCreatorAddress() public view returns(address) {
        return _dragonCreator;
    }

    function setDragonCreatorAddress(address newAddress) external onlyRole(CEO_ROLE) {
        address previousAddress = _dragonCreator;
        _dragonCreator = newAddress;
        emit AddressChanged("dragonCreator", previousAddress, newAddress);
    }

    function hasMetadataCid(uint tokenId) public view returns(bool) {
        return bytes(_cids[tokenId]).length > 0;
    }

    function setMetadataCid(uint tokenId, string calldata cid) external onlyRole(COO_ROLE) {
        require(bytes(cid).length >= 46, "DragonToken: bad CID");
        require(!hasMetadataCid(tokenId), "DragonToken: CID is already set");
        _cids[tokenId] = cid;
    }

    function defaultMetadataCid() public view returns (string memory){
        return _defaultMetadataCid;
    }

    function setDefaultMetadataCid(string calldata newDefaultCid) external onlyRole(COO_ROLE) {
        _defaultMetadataCid = newDefaultCid;
    }

    function dragonInfo(uint dragonId) public view returns (DragonInfo.Details memory) {
        return DragonInfo.getDetails(_info[dragonId]);
    }

    function strengthOf(uint dragonId) external view returns (uint) {
        DragonInfo.Details memory details = dragonInfo(dragonId);
        return details.strength > 0 ? details.strength : DragonInfo.calcStrength(details.genes);
    }

    function isSiblings(uint dragon1Id, uint dragon2Id) external view returns (bool) {
        DragonInfo.Details memory info1 = dragonInfo(dragon1Id);
        DragonInfo.Details memory info2 = dragonInfo(dragon2Id);
        return 
            (info1.generation > 1 && info2.generation > 1) && //the 1st generation of dragons doesn't have siblings
            (info1.parent1Id == info2.parent1Id || info1.parent1Id == info2.parent2Id || 
            info1.parent2Id == info2.parent1Id || info1.parent2Id == info2.parent2Id);
    }

    function isParent(uint dragon1Id, uint dragon2Id) external view returns (bool) {
        DragonInfo.Details memory info = dragonInfo(dragon1Id);
        return info.parent1Id == dragon2Id || info.parent2Id == dragon2Id;
    }

    function mint(address to, DragonInfo.Details calldata info) external returns (uint) {
        require(_msgSender() == dragonCreatorAddress(), "DragonToken: not enough privileges to call the method");
        
        _dragonIds.increment();
        uint newDragonId = uint(_dragonIds.current());
        
        _info[newDragonId] = DragonInfo.getValue(info);
        _mint(to, newDragonId);

        return newDragonId;
    }

    function setStrength(uint dragonId) external returns (uint) {
        DragonInfo.Details memory details = dragonInfo(dragonId);
        if (details.strength == 0) {
            details.strength = DragonInfo.calcStrength(details.genes);
            _info[dragonId] = DragonInfo.getValue(details);
        }
        return details.strength;
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"uint256","name":"totalEggSply","type":"uint256"},{"internalType":"uint256","name":"totalEpic20EggSply","type":"uint256"},{"internalType":"uint256","name":"totalLegendaryEggSply","type":"uint256"},{"internalType":"uint256","name":"randomLegendaryDragonSply","type":"uint256"},{"internalType":"uint256","name":"randomEpic20DragonSply","type":"uint256"},{"internalType":"uint256","name":"randomCommonDragonSply","type":"uint256"},{"internalType":"uint256","name":"htchTime","type":"uint256"},{"internalType":"string","name":"defaultCid","type":"string"},{"internalType":"address","name":"accessControl","type":"address"},{"internalType":"address","name":"dragonCreator","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"fieldName","type":"string"},{"indexed":false,"internalType":"address","name":"previousAddress","type":"address"},{"indexed":false,"internalType":"address","name":"newAddress","type":"address"}],"name":"AddressChanged","type":"event"},{"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":false,"internalType":"string","name":"fieldName","type":"string"},{"indexed":false,"internalType":"bool","name":"previousValue","type":"bool"},{"indexed":false,"internalType":"bool","name":"newValue","type":"bool"}],"name":"BoolValueChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"uint256","name":"eggId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"dragonId","type":"uint256"}],"name":"EggHatched","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"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"fieldName","type":"string"},{"indexed":false,"internalType":"uint256","name":"previousValue","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newValue","type":"uint256"}],"name":"ValueChanged","type":"event"},{"inputs":[],"name":"CEO_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CFO_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"COO_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"accessControlAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"extraData","type":"bytes"}],"name":"approveAndCall","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"canHatch","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"enum DragonInfo.Types","name":"drgType","type":"uint8"}],"name":"currentEggCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"defaultMetadataCid","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"dragonCreatorAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"eggInfo","outputs":[{"components":[{"internalType":"uint256","name":"mintedAt","type":"uint256"},{"internalType":"enum DragonInfo.Types","name":"dragonType","type":"uint8"},{"internalType":"uint256","name":"hatchedAt","type":"uint256"},{"internalType":"uint256","name":"dragonId","type":"uint256"}],"internalType":"struct EggInfo.Details","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"eggMarketAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"hasMetadataCids","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"hatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"hatchTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"isHatched","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"enum DragonInfo.Types","name":"_dragonType","type":"uint8"}],"name":"mint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"enum DragonInfo.Types","name":"drgType","type":"uint8"}],"name":"randomDragonSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"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":"newAddress","type":"address"}],"name":"setAccessControlAddress","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":"string","name":"newDefaultCid","type":"string"}],"name":"setDefaultMetadataCid","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newAddress","type":"address"}],"name":"setDragonCreatorAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newAddress","type":"address"}],"name":"setEggMarketAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newValue","type":"uint256"}],"name":"setHatchTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"cid","type":"string"},{"internalType":"string","name":"hatchCid","type":"string"}],"name":"setMetadataCids","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"enum DragonInfo.Types","name":"drgType","type":"uint8"}],"name":"totalEggSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b506040516200623e3803806200623e833981810160405281019062000037919062000730565b816040518060400160405280601281526020017f43727970746f447261676f6e73204567677300000000000000000000000000008152506040518060400160405280600381526020017f43444500000000000000000000000000000000000000000000000000000000008152508160009080519060200190620000bc929190620005e0565b508060019080519060200190620000d5929190620005e0565b50505080600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505060008587896200012b91906200093b565b6200013791906200093b565b905080898b6200014891906200093b565b6200015491906200093b565b8b1462000198576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200018f90620008a1565b60405180910390fd5b8a600e8190555080600c600080600b811115620001de577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600b81111562000217577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b81526020019081526020016000208190555089600c60006006600b81111562000269577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600b811115620002a2577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b81526020019081526020016000208190555088600c6000600b80811115620002f3577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600b8111156200032c577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b81526020019081526020016000208190555087600b6000600b808111156200037d577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600b811115620003b6577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b81526020019081526020016000208190555086600b60006006600b81111562000408577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600b81111562000441577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b81526020019081526020016000208190555085600b60006001600b81111562000493577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600b811115620004cc577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b81526020019081526020016000208190555084600f819055508360129080519060200190620004fd929190620005e0565b5081601060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550604051806040016040528060008152602001600f815250601360008201518160000155602082015181600101559050506040518060400160405280600f8152602001601481525060156000820151816000015560208201518160010155905050604051806040016040528060148152602001601981525060176000820151816000015560208201518160010155905050505050505050505050505062000b03565b828054620005ee9062000a0c565b90600052602060002090601f0160209004810192826200061257600085556200065e565b82601f106200062d57805160ff19168380011785556200065e565b828001600101855582156200065e579182015b828111156200065d57825182559160200191906001019062000640565b5b5090506200066d919062000671565b5090565b5b808211156200068c57600081600090555060010162000672565b5090565b6000620006a7620006a184620008f7565b620008c3565b905082815260208101848484011115620006c057600080fd5b620006cd848285620009d6565b509392505050565b600081519050620006e68162000acf565b92915050565b600082601f830112620006fe57600080fd5b81516200071084826020860162000690565b91505092915050565b6000815190506200072a8162000ae9565b92915050565b6000806000806000806000806000806101408b8d0312156200075157600080fd5b6000620007618d828e0162000719565b9a50506020620007748d828e0162000719565b9950506040620007878d828e0162000719565b98505060606200079a8d828e0162000719565b9750506080620007ad8d828e0162000719565b96505060a0620007c08d828e0162000719565b95505060c0620007d38d828e0162000719565b94505060e08b015167ffffffffffffffff811115620007f157600080fd5b620007ff8d828e01620006ec565b935050610100620008138d828e01620006d5565b925050610120620008278d828e01620006d5565b9150509295989b9194979a5092959850565b600062000848602c836200092a565b91507f456767546f6b656e3a20696e636f6e73697374656e7420636f6e73747275637460008301527f6f7220617267756d656e747300000000000000000000000000000000000000006020830152604082019050919050565b60006020820190508181036000830152620008bc8162000839565b9050919050565b6000604051905081810181811067ffffffffffffffff82111715620008ed57620008ec62000aa0565b5b8060405250919050565b600067ffffffffffffffff82111562000915576200091462000aa0565b5b601f19601f8301169050602081019050919050565b600082825260208201905092915050565b60006200094882620009cc565b91506200095583620009cc565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156200098d576200098c62000a42565b5b828201905092915050565b6000620009a582620009ac565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60005b83811015620009f6578082015181840152602081019050620009d9565b8381111562000a06576000848401525b50505050565b6000600282049050600182168062000a2557607f821691505b6020821081141562000a3c5762000a3b62000a71565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b62000ada8162000998565b811462000ae657600080fd5b50565b62000af481620009cc565b811462000b0057600080fd5b50565b61572b8062000b136000396000f3fe608060405234801561001057600080fd5b506004361061023d5760003560e01c8063766650e51161013b578063babcf8fb116100b8578063ced3e3f11161007c578063ced3e3f114610714578063e663654414610744578063e7e7f55014610760578063e8d56b8b14610790578063e985e9c5146107ac5761023d565b8063babcf8fb1461064a578063c71d8bad1461067a578063c87b56dd14610698578063c8c18842146106c8578063cae9ca51146106e45761023d565b8063a22cb465116100ff578063a22cb46514610594578063a7dad011146105b0578063b514be63146105e0578063b540e28e146105fe578063b88d4fde1461062e5761023d565b8063766650e5146104da57806391d14854146104f857806395d89b41146105285780639e98591b146105465780639f6f50ed146105765761023d565b80633acfd44f116101c95780636352211e1161018d5780636352211e146104105780636674137714610440578063691562a01461045e5780636fa9cc291461048e57806370a08231146104aa5761023d565b80633acfd44f1461036c5780633f987ccb1461038a5780633fb1ab6c146103a857806342842e0e146103c45780635149a6cd146103e05761023d565b8063095ea7b311610210578063095ea7b3146102de57806318160ddd146102fa5780631c6b7fbb146103185780631cf586c61461033457806323b872dd146103505761023d565b806301ffc9a71461024257806306fdde0314610272578063081812fc146102905780630837160d146102c0575b600080fd5b61025c60048036038101906102579190613d69565b6107dc565b6040516102699190614c9d565b60405180910390f35b61027a6108be565b6040516102879190614cfc565b60405180910390f35b6102aa60048036038101906102a59190613e29565b610950565b6040516102b79190614be8565b60405180910390f35b6102c86109d5565b6040516102d59190614cfc565b60405180910390f35b6102f860048036038101906102f39190613c5c565b610a67565b005b610302610b7f565b60405161030f9190615149565b60405180910390f35b610332600480360381019061032d9190613ab5565b610b89565b005b61034e60048036038101906103499190613de4565b610c61565b005b61036a60048036038101906103659190613b1a565b610caa565b005b610374610d0a565b6040516103819190614cb8565b60405180910390f35b610392610d2e565b60405161039f9190614be8565b60405180910390f35b6103c260048036038101906103bd9190613e7b565b610d58565b005b6103de60048036038101906103d99190613b1a565b610e78565b005b6103fa60048036038101906103f59190613e29565b610e98565b6040516104079190614c9d565b60405180910390f35b61042a60048036038101906104259190613e29565b610eb7565b6040516104379190614be8565b60405180910390f35b610448610f69565b6040516104559190614be8565b60405180910390f35b61047860048036038101906104739190613c20565b610f93565b6040516104859190615149565b60405180910390f35b6104a860048036038101906104a39190613e29565b611473565b005b6104c460048036038101906104bf9190613ab5565b6114f1565b6040516104d19190615149565b60405180910390f35b6104e26115a9565b6040516104ef9190614be8565b60405180910390f35b610512600480360381019061050d9190613d2d565b6115d3565b60405161051f9190614c9d565b60405180910390f35b61053061166f565b60405161053d9190614cfc565b60405180910390f35b610560600480360381019061055b9190613dbb565b611701565b60405161056d9190615149565b60405180910390f35b61057e61178e565b60405161058b9190614cb8565b60405180910390f35b6105ae60048036038101906105a99190613be4565b6117b2565b005b6105ca60048036038101906105c59190613e29565b611933565b6040516105d7919061512e565b60405180910390f35b6105e86119a6565b6040516105f59190614cb8565b60405180910390f35b61061860048036038101906106139190613dbb565b6119ca565b6040516106259190615149565b60405180910390f35b61064860048036038101906106439190613b69565b611a57565b005b610664600480360381019061065f9190613e29565b611ab9565b6040516106719190614c9d565b60405180910390f35b610682611ae4565b60405161068f9190615149565b60405180910390f35b6106b260048036038101906106ad9190613e29565b611aee565b6040516106bf9190614cfc565b60405180910390f35b6106e260048036038101906106dd9190613e29565b611b5c565b005b6106fe60048036038101906106f99190613c98565b611e0a565b60405161070b9190614c9d565b60405180910390f35b61072e60048036038101906107299190613e29565b611f6c565b60405161073b9190614c9d565b60405180910390f35b61075e60048036038101906107599190613ab5565b611f8a565b005b61077a60048036038101906107759190613dbb565b612062565b6040516107879190615149565b60405180910390f35b6107aa60048036038101906107a59190613ab5565b6120ef565b005b6107c660048036038101906107c19190613ade565b6121c7565b6040516107d39190614c9d565b60405180910390f35b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806108a757507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806108b757506108b68261225b565b5b9050919050565b6060600080546108cd906154ac565b80601f01602080910402602001604051908101604052809291908181526020018280546108f9906154ac565b80156109465780601f1061091b57610100808354040283529160200191610946565b820191906000526020600020905b81548152906001019060200180831161092957829003601f168201915b5050505050905090565b600061095b826122c5565b61099a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109919061500e565b60405180910390fd5b6004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6060601280546109e4906154ac565b80601f0160208091040260200160405190810160405280929190818152602001828054610a10906154ac565b8015610a5d5780601f10610a3257610100808354040283529160200191610a5d565b820191906000526020600020905b815481529060010190602001808311610a4057829003601f168201915b5050505050905090565b6000610a7282610eb7565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610ae3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ada9061508e565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16610b02612331565b73ffffffffffffffffffffffffffffffffffffffff161480610b315750610b3081610b2b612331565b6121c7565b5b610b70576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b6790614f6e565b60405180910390fd5b610b7a8383612339565b505050565b6000600e54905090565b7fdc0d7a095c4e917ecbeb7deda7c942ff9744013d419e37549215a413915e421d610bbb81610bb6612331565b6123f2565b6000601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905082601060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f4ca142703425bec1d507d5581fac3a3e61eadcbeafbd7c0a03e2897d96de1cc58184604051610c54929190614d7a565b60405180910390a1505050565b7fefa080c67ecf4a6bf40c9dc64173420c08f359250ca6562d7c80f7c7b9b13969610c9381610c8e612331565b6123f2565b828260129190610ca4929190613773565b50505050565b610cbb610cb5612331565b8261248f565b610cfa576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cf1906150ce565b60405180910390fd5b610d0583838361256d565b505050565b7fefa080c67ecf4a6bf40c9dc64173420c08f359250ca6562d7c80f7c7b9b1396981565b6000601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b7fefa080c67ecf4a6bf40c9dc64173420c08f359250ca6562d7c80f7c7b9b13969610d8a81610d85612331565b6123f2565b602e8585905010158015610da25750602e8383905010155b610de1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dd8906150ee565b60405180910390fd5b610dea86611ab9565b15610e2a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e2190614fce565b60405180910390fd5b8484600960008981526020019081526020016000209190610e4c929190613773565b508282600a60008981526020019081526020016000209190610e6f929190613773565b50505050505050565b610e9383838360405180602001604052806000815250611a57565b505050565b600080610ea483611933565b9050610eaf816127c9565b915050919050565b6000806002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610f60576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f5790614fae565b60405180910390fd5b80915050919050565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000610f9d610b7f565b610fa760076127ec565b10610fe7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fde90614f2e565b60405180910390fd5b6110187fdc0d7a095c4e917ecbeb7deda7c942ff9744013d419e37549215a413915e421d611013612331565b6115d3565b8061105c5750611026610d2e565b73ffffffffffffffffffffffffffffffffffffffff16611044612331565b73ffffffffffffffffffffffffffffffffffffffff16145b61109b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161109290614f4e565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561110b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161110290614ece565b60405180910390fd5b6006600b811115611145577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b82600b81111561117e577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14806111f95750600b808111156111be577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b82600b8111156111f7577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b145b8061127457506000600b811115611239577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b82600b811115611272577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b145b6112b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112aa9061510e565b60405180910390fd5b6112bc82611701565b6112c583612062565b10611305576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112fc906150ae565b60405180910390fd5b600d600083600b811115611342577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600b81111561137a577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b81526020019081526020016000206000815480929190611399906154de565b91905055506113a860076127fa565b60006113b460076127ec565b90506113c08482612810565b611423604051806080016040528042815260200185600b81111561140d577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b81526020016000815260200160008152506129de565b60086000838152602001908152602001600020819055506114426109d5565b6009600083815260200190815260200160002090805190602001906114689291906137f9565b508091505092915050565b7fefa080c67ecf4a6bf40c9dc64173420c08f359250ca6562d7c80f7c7b9b139696114a5816114a0612331565b6123f2565b6000600f54905082600f819055507fe98e5fcd3d43c7e5dd114bafcc428bc7ff8525b014fe3b51fc721ba5671f98fb81846040516114e4929190614d1e565b60405180910390a1505050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611562576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161155990614f8e565b60405180910390fd5b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60006115dd610f69565b73ffffffffffffffffffffffffffffffffffffffff166391d1485484846040518363ffffffff1660e01b8152600401611617929190614cd3565b60206040518083038186803b15801561162f57600080fd5b505afa158015611643573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116679190613d04565b905092915050565b60606001805461167e906154ac565b80601f01602080910402602001604051908101604052809291908181526020018280546116aa906154ac565b80156116f75780601f106116cc576101008083540402835291602001916116f7565b820191906000526020600020905b8154815290600101906020018083116116da57829003601f168201915b5050505050905090565b6000600c600083600b811115611740577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600b811115611778577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b8152602001908152602001600020549050919050565b7f33fa24d9aab6b79237248a16094d5f78ea83bb51e42c123ce925a264e7d816cc81565b6117ba612331565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611828576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161181f90614e8e565b60405180910390fd5b8060056000611835612331565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff166118e2612331565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516119279190614c9d565b60405180910390a35050565b61193b61387f565b611944826122c5565b611983576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161197a9061502e565b60405180910390fd5b61199f6008600084815260200190815260200160002054612a50565b9050919050565b7fdc0d7a095c4e917ecbeb7deda7c942ff9744013d419e37549215a413915e421d81565b6000600b600083600b811115611a09577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600b811115611a41577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b8152602001908152602001600020549050919050565b611a68611a62612331565b8361248f565b611aa7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a9e906150ce565b60405180910390fd5b611ab384848484612b1a565b50505050565b600080600a60008481526020019081526020016000208054611ada906154ac565b9050119050919050565b6000600f54905090565b60606000611afb83611933565b90506000816040015111611b215760096000848152602001908152602001600020611b35565b600a60008481526020019081526020016000205b604051602001611b459190614b4f565b604051602081830303815290604052915050919050565b6000611b6782611933565b9050611b71612331565b73ffffffffffffffffffffffffffffffffffffffff16611b9083610eb7565b73ffffffffffffffffffffffffffffffffffffffff1614611be6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bdd90614f0e565b60405180910390fd5b611bef816127c9565b611c2e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c2590614eae565b60405180910390fd5b600080611c3a83612b76565b91509150600b600083600b811115611c7b577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600b811115611cb3577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b81526020019081526020016000206000815480929190611cd290615482565b91905055506000611ce16115a9565b73ffffffffffffffffffffffffffffffffffffffff16630f3578a68684611d06612331565b6040518463ffffffff1660e01b8152600401611d249392919061518d565b602060405180830381600087803b158015611d3e57600080fd5b505af1158015611d52573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d769190613e52565b90504284604001818152505080846060018181525050611d95846129de565b6008600087815260200190815260200160002081905550611db4612331565b73ffffffffffffffffffffffffffffffffffffffff167ffb5524208c13c35801d6a771c1506a0a169687ef04692d793cd26722df18e7ce8683604051611dfb929190615164565b60405180910390a25050505050565b6000611e168585612339565b60008573ffffffffffffffffffffffffffffffffffffffff16611e37612331565b86308787604051602401611e4f959493929190614c4f565b6040516020818303038152906040527f8f4ffcb1000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050604051611ed99190614b38565b6000604051808303816000865af19150503d8060008114611f16576040519150601f19603f3d011682016040523d82523d6000602084013e611f1b565b606091505b5050905080611f5f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f569061506e565b60405180910390fd5b6001915050949350505050565b600080611f7883611933565b90506000816040015111915050919050565b7fdc0d7a095c4e917ecbeb7deda7c942ff9744013d419e37549215a413915e421d611fbc81611fb7612331565b6123f2565b6000601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905082601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f4ca142703425bec1d507d5581fac3a3e61eadcbeafbd7c0a03e2897d96de1cc58184604051612055929190614e32565b60405180910390a1505050565b6000600d600083600b8111156120a1577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600b8111156120d9577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b8152602001908152602001600020549050919050565b7fdc0d7a095c4e917ecbeb7deda7c942ff9744013d419e37549215a413915e421d6121218161211c612331565b6123f2565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905082600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f4ca142703425bec1d507d5581fac3a3e61eadcbeafbd7c0a03e2897d96de1cc581846040516121ba929190614dd6565b60405180910390a1505050565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b60008073ffffffffffffffffffffffffffffffffffffffff166002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b600033905090565b816004600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff166123ac83610eb7565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6123fc82826115d3565b61248b576124218173ffffffffffffffffffffffffffffffffffffffff166014612db4565b61242f8360001c6020612db4565b604051602001612440929190614b71565b6040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124829190614cfc565b60405180910390fd5b5050565b600061249a826122c5565b6124d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124d090614eee565b60405180910390fd5b60006124e483610eb7565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16148061255357508373ffffffffffffffffffffffffffffffffffffffff1661253b84610950565b73ffffffffffffffffffffffffffffffffffffffff16145b80612564575061256381856121c7565b5b91505092915050565b8273ffffffffffffffffffffffffffffffffffffffff1661258d82610eb7565b73ffffffffffffffffffffffffffffffffffffffff16146125e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125da9061504e565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612653576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161264a90614e6e565b60405180910390fd5b61265e8383836130ae565b612669600082612339565b6001600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546126b99190615369565b925050819055506001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546127109190615288565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b60008082604001511480156127e557506127e1611ae4565b4210155b9050919050565b600081600001549050919050565b6001816000016000828254019250508190555050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612880576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161287790614fee565b60405180910390fd5b612889816122c5565b156128c9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128c090614e12565b60405180910390fd5b6128d5600083836130ae565b6001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546129259190615288565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45050565b6000808260000151905060408360200151600b811115612a27577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b901b8117905060508360400151901b8117905060908360600151901b8117905080915050919050565b612a5861387f565b60405180608001604052808367ffffffffffffffff168152602001604084901c61ffff16600b811115612ab4577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600b811115612aec577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b8152602001605084901c67ffffffffffffffff168152602001609084901c63ffffffff168152509050919050565b612b2584848461256d565b612b31848484846130b3565b612b70576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b6790614db6565b60405180910390fd5b50505050565b600080600080600b811115612bb4577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b8460200151600b811115612bf1577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14612c00578360200151612c12565b612c1142448660000151181861324a565b5b90506000612c476000612c2f60136000015460136001015461347c565b612c4044438a600001511818613577565b60016135ae565b90506006600b811115612c83577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b82600b811115612cbc577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b1415612cf957612cf281612cda60156000015460156001015461347c565b612ceb428960000151441818613577565b60006135ae565b9050612da7565b600b80811115612d32577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b82600b811115612d6b577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b1415612da657612da381612d8960156000015460176001015461347c565b612d9c4442438b60000151181818613577565b60006135ae565b90505b5b8181935093505050915091565b606060006002836002612dc7919061530f565b612dd19190615288565b67ffffffffffffffff811115612e10577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612e425781602001600182028036833780820191505090505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110612ea0577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110612f2a577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060006001846002612f6a919061530f565b612f749190615288565b90505b6001811115613060577f3031323334353637383961626364656600000000000000000000000000000000600f861660108110612fdc577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b1a60f81b828281518110613019577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600485901c94508061305990615482565b9050612f77565b50600084146130a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161309b90614d5a565b60405180910390fd5b8091505092915050565b505050565b60006130d48473ffffffffffffffffffffffffffffffffffffffff1661366c565b1561323d578373ffffffffffffffffffffffffffffffffffffffff1663150b7a026130fd612331565b8786866040518563ffffffff1660e01b815260040161311f9493929190614c03565b602060405180830381600087803b15801561313957600080fd5b505af192505050801561316a57506040513d601f19601f820116820180604052508101906131679190613d92565b60015b6131ed573d806000811461319a576040519150601f19603f3d011682016040523d82523d6000602084013e61319f565b606091505b506000815114156131e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016131dc90614db6565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050613242565b600190505b949350505050565b600080600b6000600b8081111561328a577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600b8111156132c2577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b81526020019081526020016000205490506000600b60006006600b811115613313577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600b81111561334b577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b81526020019081526020016000205490506000600b60006001600b81111561339c577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600b8111156133d4577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b8152602001908152602001600020549050600061340c826133fe858761367f90919063ffffffff16565b61367f90919063ffffffff16565b9050600061342f6305f5e10061342189613577565b61369590919063ffffffff16565b905061343b85836136ab565b811161344f57600b95505050505050613477565b61345984836136ab565b811161346d57600695505050505050613477565b6001955050505050505b919050565b60606000838361348c9190615369565b67ffffffffffffffff8111156134cb577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280602002602001820160405280156134f95781602001602082028036833780820191505090505b50905060005b815181101561356c5780856135149190615288565b82828151811061354d577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010181815250508080613564906154de565b9150506134ff565b508091505092915050565b600044428360405160200161358e93929190614bab565b6040516020818303038152906040528051906020012060001c9050919050565b600080600090505b84518110156136605761364b8661360560006002856135d59190615531565b116135e4578387901c196135ff565b83670123456789abcdef901c8488901c6135fe9190615288565b5b866136de565b87848151811061363e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015161372a565b95508080613658906154de565b9150506135b6565b50849050949350505050565b600080823b905060008111915050919050565b6000818361368d9190615288565b905092915050565b600081836136a39190615531565b905092915050565b60006136d6826136c86305f5e1008661374790919063ffffffff16565b61375d90919063ffffffff16565b905092915050565b60008115613701576136fa60108461369590919063ffffffff16565b9050613724565b613715600f8461369590919063ffffffff16565b60016137219190615288565b90505b92915050565b6000600482613739919061530f565b83901b841790509392505050565b60008183613755919061530f565b905092915050565b6000818361376b91906152de565b905092915050565b82805461377f906154ac565b90600052602060002090601f0160209004810192826137a157600085556137e8565b82601f106137ba57803560ff19168380011785556137e8565b828001600101855582156137e8579182015b828111156137e75782358255916020019190600101906137cc565b5b5090506137f591906138df565b5090565b828054613805906154ac565b90600052602060002090601f016020900481019282613827576000855561386e565b82601f1061384057805160ff191683800117855561386e565b8280016001018555821561386e579182015b8281111561386d578251825591602001919060010190613852565b5b50905061387b91906138df565b5090565b6040518060800160405280600081526020016000600b8111156138cb577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b815260200160008152602001600081525090565b5b808211156138f85760008160009055506001016138e0565b5090565b600061390f61390a846151f5565b6151c4565b90508281526020810184848401111561392757600080fd5b613932848285615440565b509392505050565b60008135905061394981615672565b92915050565b60008135905061395e81615689565b92915050565b60008151905061397381615689565b92915050565b600081359050613988816156a0565b92915050565b60008135905061399d816156b7565b92915050565b6000815190506139b2816156b7565b92915050565b60008083601f8401126139ca57600080fd5b8235905067ffffffffffffffff8111156139e357600080fd5b6020830191508360018202830111156139fb57600080fd5b9250929050565b600082601f830112613a1357600080fd5b8135613a238482602086016138fc565b91505092915050565b600081359050613a3b816156ce565b92915050565b60008083601f840112613a5357600080fd5b8235905067ffffffffffffffff811115613a6c57600080fd5b602083019150836001820283011115613a8457600080fd5b9250929050565b600081359050613a9a816156de565b92915050565b600081519050613aaf816156de565b92915050565b600060208284031215613ac757600080fd5b6000613ad58482850161393a565b91505092915050565b60008060408385031215613af157600080fd5b6000613aff8582860161393a565b9250506020613b108582860161393a565b9150509250929050565b600080600060608486031215613b2f57600080fd5b6000613b3d8682870161393a565b9350506020613b4e8682870161393a565b9250506040613b5f86828701613a8b565b9150509250925092565b60008060008060808587031215613b7f57600080fd5b6000613b8d8782880161393a565b9450506020613b9e8782880161393a565b9350506040613baf87828801613a8b565b925050606085013567ffffffffffffffff811115613bcc57600080fd5b613bd887828801613a02565b91505092959194509250565b60008060408385031215613bf757600080fd5b6000613c058582860161393a565b9250506020613c168582860161394f565b9150509250929050565b60008060408385031215613c3357600080fd5b6000613c418582860161393a565b9250506020613c5285828601613a2c565b9150509250929050565b60008060408385031215613c6f57600080fd5b6000613c7d8582860161393a565b9250506020613c8e85828601613a8b565b9150509250929050565b60008060008060608587031215613cae57600080fd5b6000613cbc8782880161393a565b9450506020613ccd87828801613a8b565b935050604085013567ffffffffffffffff811115613cea57600080fd5b613cf6878288016139b8565b925092505092959194509250565b600060208284031215613d1657600080fd5b6000613d2484828501613964565b91505092915050565b60008060408385031215613d4057600080fd5b6000613d4e85828601613979565b9250506020613d5f8582860161393a565b9150509250929050565b600060208284031215613d7b57600080fd5b6000613d898482850161398e565b91505092915050565b600060208284031215613da457600080fd5b6000613db2848285016139a3565b91505092915050565b600060208284031215613dcd57600080fd5b6000613ddb84828501613a2c565b91505092915050565b60008060208385031215613df757600080fd5b600083013567ffffffffffffffff811115613e1157600080fd5b613e1d85828601613a41565b92509250509250929050565b600060208284031215613e3b57600080fd5b6000613e4984828501613a8b565b91505092915050565b600060208284031215613e6457600080fd5b6000613e7284828501613aa0565b91505092915050565b600080600080600060608688031215613e9357600080fd5b6000613ea188828901613a8b565b955050602086013567ffffffffffffffff811115613ebe57600080fd5b613eca88828901613a41565b9450945050604086013567ffffffffffffffff811115613ee957600080fd5b613ef588828901613a41565b92509250509295509295909350565b613f0d8161539d565b82525050565b613f1c816153af565b82525050565b613f2b816153bb565b82525050565b6000613f3d8385615250565b9350613f4a838584615440565b613f538361564d565b840190509392505050565b6000613f698261523a565b613f738185615250565b9350613f8381856020860161544f565b613f8c8161564d565b840191505092915050565b6000613fa28261523a565b613fac8185615261565b9350613fbc81856020860161544f565b80840191505092915050565b613fd18161542e565b82525050565b6000613fe282615245565b613fec818561526c565b9350613ffc81856020860161544f565b6140058161564d565b840191505092915050565b600061401b82615245565b614025818561527d565b935061403581856020860161544f565b80840191505092915050565b6000815461404e816154ac565b614058818661527d565b945060018216600081146140735760018114614084576140b7565b60ff198316865281860193506140b7565b61408d85615225565b60005b838110156140af57815481890152600182019150602081019050614090565b838801955050505b50505092915050565b60006140cd60098361526c565b91507f686174636854696d6500000000000000000000000000000000000000000000006000830152602082019050919050565b600061410d60208361526c565b91507f537472696e67733a20686578206c656e67746820696e73756666696369656e746000830152602082019050919050565b600061414d600d8361526c565b91507f647261676f6e43726561746f72000000000000000000000000000000000000006000830152602082019050919050565b600061418d60328361526c565b91507f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560008301527f63656976657220696d706c656d656e74657200000000000000000000000000006020830152604082019050919050565b60006141f3600d8361526c565b91507f616363657373436f6e74726f6c000000000000000000000000000000000000006000830152602082019050919050565b6000614233601c8361526c565b91507f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006000830152602082019050919050565b600061427360098361526c565b91507f6567674d61726b657400000000000000000000000000000000000000000000006000830152602082019050919050565b60006142b360248361526c565b91507f4552433732313a207472616e7366657220746f20746865207a65726f2061646460008301527f72657373000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b600061431960198361526c565b91507f4552433732313a20617070726f766520746f2063616c6c6572000000000000006000830152602082019050919050565b6000614359601b8361526c565b91507f456767546f6b656e3a2063616e6e6f74206265206861746368656400000000006000830152602082019050919050565b600061439960178361526c565b91507f456767546f6b656e3a2077726f6e6720616464726573730000000000000000006000830152602082019050919050565b60006143d9602c8361526c565b91507f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860008301527f697374656e7420746f6b656e00000000000000000000000000000000000000006020830152604082019050919050565b600061443f60238361526c565b91507f456767546f6b656e3a2068617463682063616c6c6572206973206e6f74206f7760008301527f6e657200000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006144a5601c8361526c565b91507f456767546f6b656e3a20737570706c79206973206578636565646564000000006000830152602082019050919050565b60006144e560078361527d565b91507f697066733a2f2f000000000000000000000000000000000000000000000000006000830152600782019050919050565b600061452560328361526c565b91507f456767546f6b656e3a206e6f7420656e6f7567682070726976696c656765732060008301527f746f2063616c6c20746865206d6574686f6400000000000000000000000000006020830152604082019050919050565b600061458b60388361526c565b91507f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760008301527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006020830152604082019050919050565b60006145f1602a8361526c565b91507f4552433732313a2062616c616e636520717565727920666f7220746865207a6560008301527f726f2061646472657373000000000000000000000000000000000000000000006020830152604082019050919050565b600061465760298361526c565b91507f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460008301527f656e7420746f6b656e00000000000000000000000000000000000000000000006020830152604082019050919050565b60006146bd601e8361526c565b91507f456767546f6b656e3a20434944732061726520616c72656164792073657400006000830152602082019050919050565b60006146fd60208361526c565b91507f4552433732313a206d696e7420746f20746865207a65726f20616464726573736000830152602082019050919050565b600061473d602c8361526c565b91507f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860008301527f697374656e7420746f6b656e00000000000000000000000000000000000000006020830152604082019050919050565b60006147a3601b8361526c565b91507f456767546f6b656e3a206e6f6e6578697374656e7420746f6b656e00000000006000830152602082019050919050565b60006147e360298361526c565b91507f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960008301527f73206e6f74206f776e00000000000000000000000000000000000000000000006020830152604082019050919050565b600061484960208361526c565b91507f456767546f6b656e3a207370656e64657220696e7465726e616c206572726f726000830152602082019050919050565b600061488960218361526c565b91507f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560008301527f72000000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006148ef603c8361526c565b91507f456767546f6b656e3a20746f74616c20737570706c7920666f7220746865206760008301527f6976656e20647261676f6e2074797065206973206578636565646564000000006020830152604082019050919050565b600061495560318361526c565b91507f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60008301527f776e6572206e6f7220617070726f7665640000000000000000000000000000006020830152604082019050919050565b60006149bb60178361527d565b91507f416363657373436f6e74726f6c3a206163636f756e74200000000000000000006000830152601782019050919050565b60006149fb60118361526c565b91507f456767546f6b656e3a20626164204349440000000000000000000000000000006000830152602082019050919050565b6000614a3b601b8361526c565b91507f456767546f6b656e3a2077726f6e6720647261676f6e207479706500000000006000830152602082019050919050565b6000614a7b60118361527d565b91507f206973206d697373696e6720726f6c65200000000000000000000000000000006000830152601182019050919050565b608082016000820151614ac46000850182614b03565b506020820151614ad76020850182613fc8565b506040820151614aea6040850182614b03565b506060820151614afd6060850182614b03565b50505050565b614b0c81615424565b82525050565b614b1b81615424565b82525050565b614b32614b2d82615424565b615527565b82525050565b6000614b448284613f97565b915081905092915050565b6000614b5a826144d8565b9150614b668284614041565b915081905092915050565b6000614b7c826149ae565b9150614b888285614010565b9150614b9382614a6e565b9150614b9f8284614010565b91508190509392505050565b6000614bb78286614b21565b602082019150614bc78285614b21565b602082019150614bd78284614b21565b602082019150819050949350505050565b6000602082019050614bfd6000830184613f04565b92915050565b6000608082019050614c186000830187613f04565b614c256020830186613f04565b614c326040830185614b12565b8181036060830152614c448184613f5e565b905095945050505050565b6000608082019050614c646000830188613f04565b614c716020830187614b12565b614c7e6040830186613f04565b8181036060830152614c91818486613f31565b90509695505050505050565b6000602082019050614cb26000830184613f13565b92915050565b6000602082019050614ccd6000830184613f22565b92915050565b6000604082019050614ce86000830185613f22565b614cf56020830184613f04565b9392505050565b60006020820190508181036000830152614d168184613fd7565b905092915050565b60006060820190508181036000830152614d37816140c0565b9050614d466020830185614b12565b614d536040830184614b12565b9392505050565b60006020820190508181036000830152614d7381614100565b9050919050565b60006060820190508181036000830152614d9381614140565b9050614da26020830185613f04565b614daf6040830184613f04565b9392505050565b60006020820190508181036000830152614dcf81614180565b9050919050565b60006060820190508181036000830152614def816141e6565b9050614dfe6020830185613f04565b614e0b6040830184613f04565b9392505050565b60006020820190508181036000830152614e2b81614226565b9050919050565b60006060820190508181036000830152614e4b81614266565b9050614e5a6020830185613f04565b614e676040830184613f04565b9392505050565b60006020820190508181036000830152614e87816142a6565b9050919050565b60006020820190508181036000830152614ea78161430c565b9050919050565b60006020820190508181036000830152614ec78161434c565b9050919050565b60006020820190508181036000830152614ee78161438c565b9050919050565b60006020820190508181036000830152614f07816143cc565b9050919050565b60006020820190508181036000830152614f2781614432565b9050919050565b60006020820190508181036000830152614f4781614498565b9050919050565b60006020820190508181036000830152614f6781614518565b9050919050565b60006020820190508181036000830152614f878161457e565b9050919050565b60006020820190508181036000830152614fa7816145e4565b9050919050565b60006020820190508181036000830152614fc78161464a565b9050919050565b60006020820190508181036000830152614fe7816146b0565b9050919050565b60006020820190508181036000830152615007816146f0565b9050919050565b6000602082019050818103600083015261502781614730565b9050919050565b6000602082019050818103600083015261504781614796565b9050919050565b60006020820190508181036000830152615067816147d6565b9050919050565b600060208201905081810360008301526150878161483c565b9050919050565b600060208201905081810360008301526150a78161487c565b9050919050565b600060208201905081810360008301526150c7816148e2565b9050919050565b600060208201905081810360008301526150e781614948565b9050919050565b60006020820190508181036000830152615107816149ee565b9050919050565b6000602082019050818103600083015261512781614a2e565b9050919050565b60006080820190506151436000830184614aae565b92915050565b600060208201905061515e6000830184614b12565b92915050565b60006040820190506151796000830185614b12565b6151866020830184614b12565b9392505050565b60006060820190506151a26000830186614b12565b6151af6020830185614b12565b6151bc6040830184613f04565b949350505050565b6000604051905081810181811067ffffffffffffffff821117156151eb576151ea61561e565b5b8060405250919050565b600067ffffffffffffffff8211156152105761520f61561e565b5b601f19601f8301169050602081019050919050565b60008190508160005260206000209050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b600061529382615424565b915061529e83615424565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156152d3576152d2615562565b5b828201905092915050565b60006152e982615424565b91506152f483615424565b92508261530457615303615591565b5b828204905092915050565b600061531a82615424565b915061532583615424565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561535e5761535d615562565b5b828202905092915050565b600061537482615424565b915061537f83615424565b92508282101561539257615391615562565b5b828203905092915050565b60006153a882615404565b9050919050565b60008115159050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b60008190506153ff8261565e565b919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6000615439826153f1565b9050919050565b82818337600083830152505050565b60005b8381101561546d578082015181840152602081019050615452565b8381111561547c576000848401525b50505050565b600061548d82615424565b915060008214156154a1576154a0615562565b5b600182039050919050565b600060028204905060018216806154c457607f821691505b602082108114156154d8576154d76155ef565b5b50919050565b60006154e982615424565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561551c5761551b615562565b5b600182019050919050565b6000819050919050565b600061553c82615424565b915061554783615424565b92508261555757615556615591565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b600c811061566f5761566e6155c0565b5b50565b61567b8161539d565b811461568657600080fd5b50565b615692816153af565b811461569d57600080fd5b50565b6156a9816153bb565b81146156b457600080fd5b50565b6156c0816153c5565b81146156cb57600080fd5b50565b600c81106156db57600080fd5b50565b6156e781615424565b81146156f257600080fd5b5056fea2646970667358221220b9e5109f06280f352ba5ffb421aae17d512333a5194694deb654b1f8d47483f064736f6c634300080000330000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000003e800000000000000000000000000000000000000000000000000000000000022b00000000000000000000000000000000000000000000000000000000061c76a300000000000000000000000000000000000000000000000000000000000000140000000000000000000000000c713a40aa9bff56aee0e8ff9542b758d83af9fea0000000000000000000000008e095d160c1056dca391c076107c5df4e184ae0c0000000000000000000000000000000000000000000000000000000000000035697066733a2f2f516d656a3567344358786252774e5a6653796b5571314d374e3636536d554734764b3179725451386b69347659420000000000000000000000

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061023d5760003560e01c8063766650e51161013b578063babcf8fb116100b8578063ced3e3f11161007c578063ced3e3f114610714578063e663654414610744578063e7e7f55014610760578063e8d56b8b14610790578063e985e9c5146107ac5761023d565b8063babcf8fb1461064a578063c71d8bad1461067a578063c87b56dd14610698578063c8c18842146106c8578063cae9ca51146106e45761023d565b8063a22cb465116100ff578063a22cb46514610594578063a7dad011146105b0578063b514be63146105e0578063b540e28e146105fe578063b88d4fde1461062e5761023d565b8063766650e5146104da57806391d14854146104f857806395d89b41146105285780639e98591b146105465780639f6f50ed146105765761023d565b80633acfd44f116101c95780636352211e1161018d5780636352211e146104105780636674137714610440578063691562a01461045e5780636fa9cc291461048e57806370a08231146104aa5761023d565b80633acfd44f1461036c5780633f987ccb1461038a5780633fb1ab6c146103a857806342842e0e146103c45780635149a6cd146103e05761023d565b8063095ea7b311610210578063095ea7b3146102de57806318160ddd146102fa5780631c6b7fbb146103185780631cf586c61461033457806323b872dd146103505761023d565b806301ffc9a71461024257806306fdde0314610272578063081812fc146102905780630837160d146102c0575b600080fd5b61025c60048036038101906102579190613d69565b6107dc565b6040516102699190614c9d565b60405180910390f35b61027a6108be565b6040516102879190614cfc565b60405180910390f35b6102aa60048036038101906102a59190613e29565b610950565b6040516102b79190614be8565b60405180910390f35b6102c86109d5565b6040516102d59190614cfc565b60405180910390f35b6102f860048036038101906102f39190613c5c565b610a67565b005b610302610b7f565b60405161030f9190615149565b60405180910390f35b610332600480360381019061032d9190613ab5565b610b89565b005b61034e60048036038101906103499190613de4565b610c61565b005b61036a60048036038101906103659190613b1a565b610caa565b005b610374610d0a565b6040516103819190614cb8565b60405180910390f35b610392610d2e565b60405161039f9190614be8565b60405180910390f35b6103c260048036038101906103bd9190613e7b565b610d58565b005b6103de60048036038101906103d99190613b1a565b610e78565b005b6103fa60048036038101906103f59190613e29565b610e98565b6040516104079190614c9d565b60405180910390f35b61042a60048036038101906104259190613e29565b610eb7565b6040516104379190614be8565b60405180910390f35b610448610f69565b6040516104559190614be8565b60405180910390f35b61047860048036038101906104739190613c20565b610f93565b6040516104859190615149565b60405180910390f35b6104a860048036038101906104a39190613e29565b611473565b005b6104c460048036038101906104bf9190613ab5565b6114f1565b6040516104d19190615149565b60405180910390f35b6104e26115a9565b6040516104ef9190614be8565b60405180910390f35b610512600480360381019061050d9190613d2d565b6115d3565b60405161051f9190614c9d565b60405180910390f35b61053061166f565b60405161053d9190614cfc565b60405180910390f35b610560600480360381019061055b9190613dbb565b611701565b60405161056d9190615149565b60405180910390f35b61057e61178e565b60405161058b9190614cb8565b60405180910390f35b6105ae60048036038101906105a99190613be4565b6117b2565b005b6105ca60048036038101906105c59190613e29565b611933565b6040516105d7919061512e565b60405180910390f35b6105e86119a6565b6040516105f59190614cb8565b60405180910390f35b61061860048036038101906106139190613dbb565b6119ca565b6040516106259190615149565b60405180910390f35b61064860048036038101906106439190613b69565b611a57565b005b610664600480360381019061065f9190613e29565b611ab9565b6040516106719190614c9d565b60405180910390f35b610682611ae4565b60405161068f9190615149565b60405180910390f35b6106b260048036038101906106ad9190613e29565b611aee565b6040516106bf9190614cfc565b60405180910390f35b6106e260048036038101906106dd9190613e29565b611b5c565b005b6106fe60048036038101906106f99190613c98565b611e0a565b60405161070b9190614c9d565b60405180910390f35b61072e60048036038101906107299190613e29565b611f6c565b60405161073b9190614c9d565b60405180910390f35b61075e60048036038101906107599190613ab5565b611f8a565b005b61077a60048036038101906107759190613dbb565b612062565b6040516107879190615149565b60405180910390f35b6107aa60048036038101906107a59190613ab5565b6120ef565b005b6107c660048036038101906107c19190613ade565b6121c7565b6040516107d39190614c9d565b60405180910390f35b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806108a757507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806108b757506108b68261225b565b5b9050919050565b6060600080546108cd906154ac565b80601f01602080910402602001604051908101604052809291908181526020018280546108f9906154ac565b80156109465780601f1061091b57610100808354040283529160200191610946565b820191906000526020600020905b81548152906001019060200180831161092957829003601f168201915b5050505050905090565b600061095b826122c5565b61099a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109919061500e565b60405180910390fd5b6004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6060601280546109e4906154ac565b80601f0160208091040260200160405190810160405280929190818152602001828054610a10906154ac565b8015610a5d5780601f10610a3257610100808354040283529160200191610a5d565b820191906000526020600020905b815481529060010190602001808311610a4057829003601f168201915b5050505050905090565b6000610a7282610eb7565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610ae3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ada9061508e565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16610b02612331565b73ffffffffffffffffffffffffffffffffffffffff161480610b315750610b3081610b2b612331565b6121c7565b5b610b70576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b6790614f6e565b60405180910390fd5b610b7a8383612339565b505050565b6000600e54905090565b7fdc0d7a095c4e917ecbeb7deda7c942ff9744013d419e37549215a413915e421d610bbb81610bb6612331565b6123f2565b6000601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905082601060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f4ca142703425bec1d507d5581fac3a3e61eadcbeafbd7c0a03e2897d96de1cc58184604051610c54929190614d7a565b60405180910390a1505050565b7fefa080c67ecf4a6bf40c9dc64173420c08f359250ca6562d7c80f7c7b9b13969610c9381610c8e612331565b6123f2565b828260129190610ca4929190613773565b50505050565b610cbb610cb5612331565b8261248f565b610cfa576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cf1906150ce565b60405180910390fd5b610d0583838361256d565b505050565b7fefa080c67ecf4a6bf40c9dc64173420c08f359250ca6562d7c80f7c7b9b1396981565b6000601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b7fefa080c67ecf4a6bf40c9dc64173420c08f359250ca6562d7c80f7c7b9b13969610d8a81610d85612331565b6123f2565b602e8585905010158015610da25750602e8383905010155b610de1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dd8906150ee565b60405180910390fd5b610dea86611ab9565b15610e2a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e2190614fce565b60405180910390fd5b8484600960008981526020019081526020016000209190610e4c929190613773565b508282600a60008981526020019081526020016000209190610e6f929190613773565b50505050505050565b610e9383838360405180602001604052806000815250611a57565b505050565b600080610ea483611933565b9050610eaf816127c9565b915050919050565b6000806002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610f60576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f5790614fae565b60405180910390fd5b80915050919050565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000610f9d610b7f565b610fa760076127ec565b10610fe7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fde90614f2e565b60405180910390fd5b6110187fdc0d7a095c4e917ecbeb7deda7c942ff9744013d419e37549215a413915e421d611013612331565b6115d3565b8061105c5750611026610d2e565b73ffffffffffffffffffffffffffffffffffffffff16611044612331565b73ffffffffffffffffffffffffffffffffffffffff16145b61109b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161109290614f4e565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561110b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161110290614ece565b60405180910390fd5b6006600b811115611145577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b82600b81111561117e577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14806111f95750600b808111156111be577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b82600b8111156111f7577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b145b8061127457506000600b811115611239577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b82600b811115611272577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b145b6112b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112aa9061510e565b60405180910390fd5b6112bc82611701565b6112c583612062565b10611305576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112fc906150ae565b60405180910390fd5b600d600083600b811115611342577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600b81111561137a577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b81526020019081526020016000206000815480929190611399906154de565b91905055506113a860076127fa565b60006113b460076127ec565b90506113c08482612810565b611423604051806080016040528042815260200185600b81111561140d577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b81526020016000815260200160008152506129de565b60086000838152602001908152602001600020819055506114426109d5565b6009600083815260200190815260200160002090805190602001906114689291906137f9565b508091505092915050565b7fefa080c67ecf4a6bf40c9dc64173420c08f359250ca6562d7c80f7c7b9b139696114a5816114a0612331565b6123f2565b6000600f54905082600f819055507fe98e5fcd3d43c7e5dd114bafcc428bc7ff8525b014fe3b51fc721ba5671f98fb81846040516114e4929190614d1e565b60405180910390a1505050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611562576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161155990614f8e565b60405180910390fd5b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60006115dd610f69565b73ffffffffffffffffffffffffffffffffffffffff166391d1485484846040518363ffffffff1660e01b8152600401611617929190614cd3565b60206040518083038186803b15801561162f57600080fd5b505afa158015611643573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116679190613d04565b905092915050565b60606001805461167e906154ac565b80601f01602080910402602001604051908101604052809291908181526020018280546116aa906154ac565b80156116f75780601f106116cc576101008083540402835291602001916116f7565b820191906000526020600020905b8154815290600101906020018083116116da57829003601f168201915b5050505050905090565b6000600c600083600b811115611740577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600b811115611778577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b8152602001908152602001600020549050919050565b7f33fa24d9aab6b79237248a16094d5f78ea83bb51e42c123ce925a264e7d816cc81565b6117ba612331565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611828576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161181f90614e8e565b60405180910390fd5b8060056000611835612331565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff166118e2612331565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516119279190614c9d565b60405180910390a35050565b61193b61387f565b611944826122c5565b611983576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161197a9061502e565b60405180910390fd5b61199f6008600084815260200190815260200160002054612a50565b9050919050565b7fdc0d7a095c4e917ecbeb7deda7c942ff9744013d419e37549215a413915e421d81565b6000600b600083600b811115611a09577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600b811115611a41577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b8152602001908152602001600020549050919050565b611a68611a62612331565b8361248f565b611aa7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a9e906150ce565b60405180910390fd5b611ab384848484612b1a565b50505050565b600080600a60008481526020019081526020016000208054611ada906154ac565b9050119050919050565b6000600f54905090565b60606000611afb83611933565b90506000816040015111611b215760096000848152602001908152602001600020611b35565b600a60008481526020019081526020016000205b604051602001611b459190614b4f565b604051602081830303815290604052915050919050565b6000611b6782611933565b9050611b71612331565b73ffffffffffffffffffffffffffffffffffffffff16611b9083610eb7565b73ffffffffffffffffffffffffffffffffffffffff1614611be6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bdd90614f0e565b60405180910390fd5b611bef816127c9565b611c2e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c2590614eae565b60405180910390fd5b600080611c3a83612b76565b91509150600b600083600b811115611c7b577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600b811115611cb3577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b81526020019081526020016000206000815480929190611cd290615482565b91905055506000611ce16115a9565b73ffffffffffffffffffffffffffffffffffffffff16630f3578a68684611d06612331565b6040518463ffffffff1660e01b8152600401611d249392919061518d565b602060405180830381600087803b158015611d3e57600080fd5b505af1158015611d52573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d769190613e52565b90504284604001818152505080846060018181525050611d95846129de565b6008600087815260200190815260200160002081905550611db4612331565b73ffffffffffffffffffffffffffffffffffffffff167ffb5524208c13c35801d6a771c1506a0a169687ef04692d793cd26722df18e7ce8683604051611dfb929190615164565b60405180910390a25050505050565b6000611e168585612339565b60008573ffffffffffffffffffffffffffffffffffffffff16611e37612331565b86308787604051602401611e4f959493929190614c4f565b6040516020818303038152906040527f8f4ffcb1000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050604051611ed99190614b38565b6000604051808303816000865af19150503d8060008114611f16576040519150601f19603f3d011682016040523d82523d6000602084013e611f1b565b606091505b5050905080611f5f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f569061506e565b60405180910390fd5b6001915050949350505050565b600080611f7883611933565b90506000816040015111915050919050565b7fdc0d7a095c4e917ecbeb7deda7c942ff9744013d419e37549215a413915e421d611fbc81611fb7612331565b6123f2565b6000601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905082601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f4ca142703425bec1d507d5581fac3a3e61eadcbeafbd7c0a03e2897d96de1cc58184604051612055929190614e32565b60405180910390a1505050565b6000600d600083600b8111156120a1577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600b8111156120d9577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b8152602001908152602001600020549050919050565b7fdc0d7a095c4e917ecbeb7deda7c942ff9744013d419e37549215a413915e421d6121218161211c612331565b6123f2565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905082600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f4ca142703425bec1d507d5581fac3a3e61eadcbeafbd7c0a03e2897d96de1cc581846040516121ba929190614dd6565b60405180910390a1505050565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b60008073ffffffffffffffffffffffffffffffffffffffff166002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b600033905090565b816004600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff166123ac83610eb7565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6123fc82826115d3565b61248b576124218173ffffffffffffffffffffffffffffffffffffffff166014612db4565b61242f8360001c6020612db4565b604051602001612440929190614b71565b6040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124829190614cfc565b60405180910390fd5b5050565b600061249a826122c5565b6124d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124d090614eee565b60405180910390fd5b60006124e483610eb7565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16148061255357508373ffffffffffffffffffffffffffffffffffffffff1661253b84610950565b73ffffffffffffffffffffffffffffffffffffffff16145b80612564575061256381856121c7565b5b91505092915050565b8273ffffffffffffffffffffffffffffffffffffffff1661258d82610eb7565b73ffffffffffffffffffffffffffffffffffffffff16146125e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125da9061504e565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612653576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161264a90614e6e565b60405180910390fd5b61265e8383836130ae565b612669600082612339565b6001600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546126b99190615369565b925050819055506001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546127109190615288565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b60008082604001511480156127e557506127e1611ae4565b4210155b9050919050565b600081600001549050919050565b6001816000016000828254019250508190555050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612880576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161287790614fee565b60405180910390fd5b612889816122c5565b156128c9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128c090614e12565b60405180910390fd5b6128d5600083836130ae565b6001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546129259190615288565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45050565b6000808260000151905060408360200151600b811115612a27577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b901b8117905060508360400151901b8117905060908360600151901b8117905080915050919050565b612a5861387f565b60405180608001604052808367ffffffffffffffff168152602001604084901c61ffff16600b811115612ab4577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600b811115612aec577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b8152602001605084901c67ffffffffffffffff168152602001609084901c63ffffffff168152509050919050565b612b2584848461256d565b612b31848484846130b3565b612b70576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b6790614db6565b60405180910390fd5b50505050565b600080600080600b811115612bb4577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b8460200151600b811115612bf1577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14612c00578360200151612c12565b612c1142448660000151181861324a565b5b90506000612c476000612c2f60136000015460136001015461347c565b612c4044438a600001511818613577565b60016135ae565b90506006600b811115612c83577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b82600b811115612cbc577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b1415612cf957612cf281612cda60156000015460156001015461347c565b612ceb428960000151441818613577565b60006135ae565b9050612da7565b600b80811115612d32577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b82600b811115612d6b577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b1415612da657612da381612d8960156000015460176001015461347c565b612d9c4442438b60000151181818613577565b60006135ae565b90505b5b8181935093505050915091565b606060006002836002612dc7919061530f565b612dd19190615288565b67ffffffffffffffff811115612e10577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612e425781602001600182028036833780820191505090505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110612ea0577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110612f2a577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060006001846002612f6a919061530f565b612f749190615288565b90505b6001811115613060577f3031323334353637383961626364656600000000000000000000000000000000600f861660108110612fdc577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b1a60f81b828281518110613019577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600485901c94508061305990615482565b9050612f77565b50600084146130a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161309b90614d5a565b60405180910390fd5b8091505092915050565b505050565b60006130d48473ffffffffffffffffffffffffffffffffffffffff1661366c565b1561323d578373ffffffffffffffffffffffffffffffffffffffff1663150b7a026130fd612331565b8786866040518563ffffffff1660e01b815260040161311f9493929190614c03565b602060405180830381600087803b15801561313957600080fd5b505af192505050801561316a57506040513d601f19601f820116820180604052508101906131679190613d92565b60015b6131ed573d806000811461319a576040519150601f19603f3d011682016040523d82523d6000602084013e61319f565b606091505b506000815114156131e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016131dc90614db6565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050613242565b600190505b949350505050565b600080600b6000600b8081111561328a577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600b8111156132c2577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b81526020019081526020016000205490506000600b60006006600b811115613313577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600b81111561334b577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b81526020019081526020016000205490506000600b60006001600b81111561339c577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600b8111156133d4577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b8152602001908152602001600020549050600061340c826133fe858761367f90919063ffffffff16565b61367f90919063ffffffff16565b9050600061342f6305f5e10061342189613577565b61369590919063ffffffff16565b905061343b85836136ab565b811161344f57600b95505050505050613477565b61345984836136ab565b811161346d57600695505050505050613477565b6001955050505050505b919050565b60606000838361348c9190615369565b67ffffffffffffffff8111156134cb577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280602002602001820160405280156134f95781602001602082028036833780820191505090505b50905060005b815181101561356c5780856135149190615288565b82828151811061354d577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010181815250508080613564906154de565b9150506134ff565b508091505092915050565b600044428360405160200161358e93929190614bab565b6040516020818303038152906040528051906020012060001c9050919050565b600080600090505b84518110156136605761364b8661360560006002856135d59190615531565b116135e4578387901c196135ff565b83670123456789abcdef901c8488901c6135fe9190615288565b5b866136de565b87848151811061363e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015161372a565b95508080613658906154de565b9150506135b6565b50849050949350505050565b600080823b905060008111915050919050565b6000818361368d9190615288565b905092915050565b600081836136a39190615531565b905092915050565b60006136d6826136c86305f5e1008661374790919063ffffffff16565b61375d90919063ffffffff16565b905092915050565b60008115613701576136fa60108461369590919063ffffffff16565b9050613724565b613715600f8461369590919063ffffffff16565b60016137219190615288565b90505b92915050565b6000600482613739919061530f565b83901b841790509392505050565b60008183613755919061530f565b905092915050565b6000818361376b91906152de565b905092915050565b82805461377f906154ac565b90600052602060002090601f0160209004810192826137a157600085556137e8565b82601f106137ba57803560ff19168380011785556137e8565b828001600101855582156137e8579182015b828111156137e75782358255916020019190600101906137cc565b5b5090506137f591906138df565b5090565b828054613805906154ac565b90600052602060002090601f016020900481019282613827576000855561386e565b82601f1061384057805160ff191683800117855561386e565b8280016001018555821561386e579182015b8281111561386d578251825591602001919060010190613852565b5b50905061387b91906138df565b5090565b6040518060800160405280600081526020016000600b8111156138cb577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b815260200160008152602001600081525090565b5b808211156138f85760008160009055506001016138e0565b5090565b600061390f61390a846151f5565b6151c4565b90508281526020810184848401111561392757600080fd5b613932848285615440565b509392505050565b60008135905061394981615672565b92915050565b60008135905061395e81615689565b92915050565b60008151905061397381615689565b92915050565b600081359050613988816156a0565b92915050565b60008135905061399d816156b7565b92915050565b6000815190506139b2816156b7565b92915050565b60008083601f8401126139ca57600080fd5b8235905067ffffffffffffffff8111156139e357600080fd5b6020830191508360018202830111156139fb57600080fd5b9250929050565b600082601f830112613a1357600080fd5b8135613a238482602086016138fc565b91505092915050565b600081359050613a3b816156ce565b92915050565b60008083601f840112613a5357600080fd5b8235905067ffffffffffffffff811115613a6c57600080fd5b602083019150836001820283011115613a8457600080fd5b9250929050565b600081359050613a9a816156de565b92915050565b600081519050613aaf816156de565b92915050565b600060208284031215613ac757600080fd5b6000613ad58482850161393a565b91505092915050565b60008060408385031215613af157600080fd5b6000613aff8582860161393a565b9250506020613b108582860161393a565b9150509250929050565b600080600060608486031215613b2f57600080fd5b6000613b3d8682870161393a565b9350506020613b4e8682870161393a565b9250506040613b5f86828701613a8b565b9150509250925092565b60008060008060808587031215613b7f57600080fd5b6000613b8d8782880161393a565b9450506020613b9e8782880161393a565b9350506040613baf87828801613a8b565b925050606085013567ffffffffffffffff811115613bcc57600080fd5b613bd887828801613a02565b91505092959194509250565b60008060408385031215613bf757600080fd5b6000613c058582860161393a565b9250506020613c168582860161394f565b9150509250929050565b60008060408385031215613c3357600080fd5b6000613c418582860161393a565b9250506020613c5285828601613a2c565b9150509250929050565b60008060408385031215613c6f57600080fd5b6000613c7d8582860161393a565b9250506020613c8e85828601613a8b565b9150509250929050565b60008060008060608587031215613cae57600080fd5b6000613cbc8782880161393a565b9450506020613ccd87828801613a8b565b935050604085013567ffffffffffffffff811115613cea57600080fd5b613cf6878288016139b8565b925092505092959194509250565b600060208284031215613d1657600080fd5b6000613d2484828501613964565b91505092915050565b60008060408385031215613d4057600080fd5b6000613d4e85828601613979565b9250506020613d5f8582860161393a565b9150509250929050565b600060208284031215613d7b57600080fd5b6000613d898482850161398e565b91505092915050565b600060208284031215613da457600080fd5b6000613db2848285016139a3565b91505092915050565b600060208284031215613dcd57600080fd5b6000613ddb84828501613a2c565b91505092915050565b60008060208385031215613df757600080fd5b600083013567ffffffffffffffff811115613e1157600080fd5b613e1d85828601613a41565b92509250509250929050565b600060208284031215613e3b57600080fd5b6000613e4984828501613a8b565b91505092915050565b600060208284031215613e6457600080fd5b6000613e7284828501613aa0565b91505092915050565b600080600080600060608688031215613e9357600080fd5b6000613ea188828901613a8b565b955050602086013567ffffffffffffffff811115613ebe57600080fd5b613eca88828901613a41565b9450945050604086013567ffffffffffffffff811115613ee957600080fd5b613ef588828901613a41565b92509250509295509295909350565b613f0d8161539d565b82525050565b613f1c816153af565b82525050565b613f2b816153bb565b82525050565b6000613f3d8385615250565b9350613f4a838584615440565b613f538361564d565b840190509392505050565b6000613f698261523a565b613f738185615250565b9350613f8381856020860161544f565b613f8c8161564d565b840191505092915050565b6000613fa28261523a565b613fac8185615261565b9350613fbc81856020860161544f565b80840191505092915050565b613fd18161542e565b82525050565b6000613fe282615245565b613fec818561526c565b9350613ffc81856020860161544f565b6140058161564d565b840191505092915050565b600061401b82615245565b614025818561527d565b935061403581856020860161544f565b80840191505092915050565b6000815461404e816154ac565b614058818661527d565b945060018216600081146140735760018114614084576140b7565b60ff198316865281860193506140b7565b61408d85615225565b60005b838110156140af57815481890152600182019150602081019050614090565b838801955050505b50505092915050565b60006140cd60098361526c565b91507f686174636854696d6500000000000000000000000000000000000000000000006000830152602082019050919050565b600061410d60208361526c565b91507f537472696e67733a20686578206c656e67746820696e73756666696369656e746000830152602082019050919050565b600061414d600d8361526c565b91507f647261676f6e43726561746f72000000000000000000000000000000000000006000830152602082019050919050565b600061418d60328361526c565b91507f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560008301527f63656976657220696d706c656d656e74657200000000000000000000000000006020830152604082019050919050565b60006141f3600d8361526c565b91507f616363657373436f6e74726f6c000000000000000000000000000000000000006000830152602082019050919050565b6000614233601c8361526c565b91507f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006000830152602082019050919050565b600061427360098361526c565b91507f6567674d61726b657400000000000000000000000000000000000000000000006000830152602082019050919050565b60006142b360248361526c565b91507f4552433732313a207472616e7366657220746f20746865207a65726f2061646460008301527f72657373000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b600061431960198361526c565b91507f4552433732313a20617070726f766520746f2063616c6c6572000000000000006000830152602082019050919050565b6000614359601b8361526c565b91507f456767546f6b656e3a2063616e6e6f74206265206861746368656400000000006000830152602082019050919050565b600061439960178361526c565b91507f456767546f6b656e3a2077726f6e6720616464726573730000000000000000006000830152602082019050919050565b60006143d9602c8361526c565b91507f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860008301527f697374656e7420746f6b656e00000000000000000000000000000000000000006020830152604082019050919050565b600061443f60238361526c565b91507f456767546f6b656e3a2068617463682063616c6c6572206973206e6f74206f7760008301527f6e657200000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006144a5601c8361526c565b91507f456767546f6b656e3a20737570706c79206973206578636565646564000000006000830152602082019050919050565b60006144e560078361527d565b91507f697066733a2f2f000000000000000000000000000000000000000000000000006000830152600782019050919050565b600061452560328361526c565b91507f456767546f6b656e3a206e6f7420656e6f7567682070726976696c656765732060008301527f746f2063616c6c20746865206d6574686f6400000000000000000000000000006020830152604082019050919050565b600061458b60388361526c565b91507f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760008301527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006020830152604082019050919050565b60006145f1602a8361526c565b91507f4552433732313a2062616c616e636520717565727920666f7220746865207a6560008301527f726f2061646472657373000000000000000000000000000000000000000000006020830152604082019050919050565b600061465760298361526c565b91507f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460008301527f656e7420746f6b656e00000000000000000000000000000000000000000000006020830152604082019050919050565b60006146bd601e8361526c565b91507f456767546f6b656e3a20434944732061726520616c72656164792073657400006000830152602082019050919050565b60006146fd60208361526c565b91507f4552433732313a206d696e7420746f20746865207a65726f20616464726573736000830152602082019050919050565b600061473d602c8361526c565b91507f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860008301527f697374656e7420746f6b656e00000000000000000000000000000000000000006020830152604082019050919050565b60006147a3601b8361526c565b91507f456767546f6b656e3a206e6f6e6578697374656e7420746f6b656e00000000006000830152602082019050919050565b60006147e360298361526c565b91507f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960008301527f73206e6f74206f776e00000000000000000000000000000000000000000000006020830152604082019050919050565b600061484960208361526c565b91507f456767546f6b656e3a207370656e64657220696e7465726e616c206572726f726000830152602082019050919050565b600061488960218361526c565b91507f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560008301527f72000000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006148ef603c8361526c565b91507f456767546f6b656e3a20746f74616c20737570706c7920666f7220746865206760008301527f6976656e20647261676f6e2074797065206973206578636565646564000000006020830152604082019050919050565b600061495560318361526c565b91507f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60008301527f776e6572206e6f7220617070726f7665640000000000000000000000000000006020830152604082019050919050565b60006149bb60178361527d565b91507f416363657373436f6e74726f6c3a206163636f756e74200000000000000000006000830152601782019050919050565b60006149fb60118361526c565b91507f456767546f6b656e3a20626164204349440000000000000000000000000000006000830152602082019050919050565b6000614a3b601b8361526c565b91507f456767546f6b656e3a2077726f6e6720647261676f6e207479706500000000006000830152602082019050919050565b6000614a7b60118361527d565b91507f206973206d697373696e6720726f6c65200000000000000000000000000000006000830152601182019050919050565b608082016000820151614ac46000850182614b03565b506020820151614ad76020850182613fc8565b506040820151614aea6040850182614b03565b506060820151614afd6060850182614b03565b50505050565b614b0c81615424565b82525050565b614b1b81615424565b82525050565b614b32614b2d82615424565b615527565b82525050565b6000614b448284613f97565b915081905092915050565b6000614b5a826144d8565b9150614b668284614041565b915081905092915050565b6000614b7c826149ae565b9150614b888285614010565b9150614b9382614a6e565b9150614b9f8284614010565b91508190509392505050565b6000614bb78286614b21565b602082019150614bc78285614b21565b602082019150614bd78284614b21565b602082019150819050949350505050565b6000602082019050614bfd6000830184613f04565b92915050565b6000608082019050614c186000830187613f04565b614c256020830186613f04565b614c326040830185614b12565b8181036060830152614c448184613f5e565b905095945050505050565b6000608082019050614c646000830188613f04565b614c716020830187614b12565b614c7e6040830186613f04565b8181036060830152614c91818486613f31565b90509695505050505050565b6000602082019050614cb26000830184613f13565b92915050565b6000602082019050614ccd6000830184613f22565b92915050565b6000604082019050614ce86000830185613f22565b614cf56020830184613f04565b9392505050565b60006020820190508181036000830152614d168184613fd7565b905092915050565b60006060820190508181036000830152614d37816140c0565b9050614d466020830185614b12565b614d536040830184614b12565b9392505050565b60006020820190508181036000830152614d7381614100565b9050919050565b60006060820190508181036000830152614d9381614140565b9050614da26020830185613f04565b614daf6040830184613f04565b9392505050565b60006020820190508181036000830152614dcf81614180565b9050919050565b60006060820190508181036000830152614def816141e6565b9050614dfe6020830185613f04565b614e0b6040830184613f04565b9392505050565b60006020820190508181036000830152614e2b81614226565b9050919050565b60006060820190508181036000830152614e4b81614266565b9050614e5a6020830185613f04565b614e676040830184613f04565b9392505050565b60006020820190508181036000830152614e87816142a6565b9050919050565b60006020820190508181036000830152614ea78161430c565b9050919050565b60006020820190508181036000830152614ec78161434c565b9050919050565b60006020820190508181036000830152614ee78161438c565b9050919050565b60006020820190508181036000830152614f07816143cc565b9050919050565b60006020820190508181036000830152614f2781614432565b9050919050565b60006020820190508181036000830152614f4781614498565b9050919050565b60006020820190508181036000830152614f6781614518565b9050919050565b60006020820190508181036000830152614f878161457e565b9050919050565b60006020820190508181036000830152614fa7816145e4565b9050919050565b60006020820190508181036000830152614fc78161464a565b9050919050565b60006020820190508181036000830152614fe7816146b0565b9050919050565b60006020820190508181036000830152615007816146f0565b9050919050565b6000602082019050818103600083015261502781614730565b9050919050565b6000602082019050818103600083015261504781614796565b9050919050565b60006020820190508181036000830152615067816147d6565b9050919050565b600060208201905081810360008301526150878161483c565b9050919050565b600060208201905081810360008301526150a78161487c565b9050919050565b600060208201905081810360008301526150c7816148e2565b9050919050565b600060208201905081810360008301526150e781614948565b9050919050565b60006020820190508181036000830152615107816149ee565b9050919050565b6000602082019050818103600083015261512781614a2e565b9050919050565b60006080820190506151436000830184614aae565b92915050565b600060208201905061515e6000830184614b12565b92915050565b60006040820190506151796000830185614b12565b6151866020830184614b12565b9392505050565b60006060820190506151a26000830186614b12565b6151af6020830185614b12565b6151bc6040830184613f04565b949350505050565b6000604051905081810181811067ffffffffffffffff821117156151eb576151ea61561e565b5b8060405250919050565b600067ffffffffffffffff8211156152105761520f61561e565b5b601f19601f8301169050602081019050919050565b60008190508160005260206000209050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b600061529382615424565b915061529e83615424565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156152d3576152d2615562565b5b828201905092915050565b60006152e982615424565b91506152f483615424565b92508261530457615303615591565b5b828204905092915050565b600061531a82615424565b915061532583615424565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561535e5761535d615562565b5b828202905092915050565b600061537482615424565b915061537f83615424565b92508282101561539257615391615562565b5b828203905092915050565b60006153a882615404565b9050919050565b60008115159050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b60008190506153ff8261565e565b919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6000615439826153f1565b9050919050565b82818337600083830152505050565b60005b8381101561546d578082015181840152602081019050615452565b8381111561547c576000848401525b50505050565b600061548d82615424565b915060008214156154a1576154a0615562565b5b600182039050919050565b600060028204905060018216806154c457607f821691505b602082108114156154d8576154d76155ef565b5b50919050565b60006154e982615424565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561551c5761551b615562565b5b600182019050919050565b6000819050919050565b600061553c82615424565b915061554783615424565b92508261555757615556615591565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b600c811061566f5761566e6155c0565b5b50565b61567b8161539d565b811461568657600080fd5b50565b615692816153af565b811461569d57600080fd5b50565b6156a9816153bb565b81146156b457600080fd5b50565b6156c0816153c5565b81146156cb57600080fd5b50565b600c81106156db57600080fd5b50565b6156e781615424565b81146156f257600080fd5b5056fea2646970667358221220b9e5109f06280f352ba5ffb421aae17d512333a5194694deb654b1f8d47483f064736f6c63430008000033

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

0000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000003e800000000000000000000000000000000000000000000000000000000000022b00000000000000000000000000000000000000000000000000000000061c76a300000000000000000000000000000000000000000000000000000000000000140000000000000000000000000c713a40aa9bff56aee0e8ff9542b758d83af9fea0000000000000000000000008e095d160c1056dca391c076107c5df4e184ae0c0000000000000000000000000000000000000000000000000000000000000035697066733a2f2f516d656a3567344358786252774e5a6653796b5571314d374e3636536d554734764b3179725451386b69347659420000000000000000000000

-----Decoded View---------------
Arg [0] : totalEggSply (uint256): 10000
Arg [1] : totalEpic20EggSply (uint256): 10
Arg [2] : totalLegendaryEggSply (uint256): 10
Arg [3] : randomLegendaryDragonSply (uint256): 100
Arg [4] : randomEpic20DragonSply (uint256): 1000
Arg [5] : randomCommonDragonSply (uint256): 8880
Arg [6] : htchTime (uint256): 1640458800
Arg [7] : defaultCid (string): ipfs://Qmej5g4CXxbRwNZfSykUq1M7N66SmUG4vK1yrTQ8ki4vYB
Arg [8] : accessControl (address): 0xc713A40AA9bfF56aeE0E8fF9542b758d83af9fEa
Arg [9] : dragonCreator (address): 0x8E095D160C1056Dca391C076107C5df4E184aE0C

-----Encoded View---------------
13 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000002710
Arg [1] : 000000000000000000000000000000000000000000000000000000000000000a
Arg [2] : 000000000000000000000000000000000000000000000000000000000000000a
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000064
Arg [4] : 00000000000000000000000000000000000000000000000000000000000003e8
Arg [5] : 00000000000000000000000000000000000000000000000000000000000022b0
Arg [6] : 0000000000000000000000000000000000000000000000000000000061c76a30
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000140
Arg [8] : 000000000000000000000000c713a40aa9bff56aee0e8ff9542b758d83af9fea
Arg [9] : 0000000000000000000000008e095d160c1056dca391c076107c5df4e184ae0c
Arg [10] : 0000000000000000000000000000000000000000000000000000000000000035
Arg [11] : 697066733a2f2f516d656a3567344358786252774e5a6653796b5571314d374e
Arg [12] : 3636536d554734764b3179725451386b69347659420000000000000000000000


Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.