ETH Price: $3,129.03 (+0.90%)

Contract

0x8A6f6a9DFA66004464BBf727ACC9C44Cd71025f7
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
0x60806040137371962021-12-04 2:14:581078 days ago1638584098IN
 Create: MetadataManager
0 ETH0.2698354983.38764397

Advanced mode:
Parent Transaction Hash Block From To
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
MetadataManager

Compiler Version
v0.8.7+commit.e28d00a7

Optimization Enabled:
Yes with 1000 runs

Other Settings:
default evmVersion
File 1 of 4 : MetadataManager.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;

import "@openzeppelin/contracts/access/Ownable.sol";
import "./MetadataStruct.sol";

contract metadataAddonContract {

    function getImage(uint _collectionId, uint _tokenId) external view returns (string memory) {}

    function getMetadata(uint _collectionId, uint _tokenId) external view returns (string memory) {}

}

contract verifiableRandomNumberContract {
    function getRandomNumber() external returns(uint) {}
}

contract MetadataManager is Ownable {

    /**
     @notice Credits goes out to Ether Orcs
    */

    struct Phoenix {
        uint128 hash;
        uint8 level;
        string name;
    }

    struct TraitRarity {
        uint16 rarityRange;
        uint16 index;
    }

    struct MythicInfo {
        string image;
        string name;
    }

    mapping(uint => mapping(uint => address)) propertyAddresses;

    mapping(uint => mapping (uint => uint)) mythicTokens;

    mapping(uint => mapping(uint => uint16[])) PropertyRarityRanges;

    mapping(uint => mapping(uint => TraitRarity[])) PropertyRarities;

    mapping(uint => bool) collectionRevealed;

    mapping(uint => mapping(uint => MythicInfo)) mythicInfoMap;

    mapping(uint => uint) mythicsAdded;

    mapping(uint => uint) totalMythics;

    address[] addonAddresses;

    mapping(address => bool) acceptedAddresses;

    mapping(uint => uint[]) mythicRewardPool;

    verifiableRandomNumberContract randomNumberContract;

    string public constant header = '<svg id="phoenix" width="100%" height="100%" version="1.1" viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">';
    string public constant footer = '<style>#phoenix{image-rendering: pixelated;}</style></svg>';

    /**

         __    __     ______     ______   ______     _____     ______     ______   ______    
        /\ "-./  \   /\  ___\   /\__  _\ /\  __ \   /\  __-.  /\  __ \   /\__  _\ /\  __ \   
        \ \ \-./\ \  \ \  __\   \/_/\ \/ \ \  __ \  \ \ \/\ \ \ \  __ \  \/_/\ \/ \ \  __ \  
         \ \_\ \ \_\  \ \_____\    \ \_\  \ \_\ \_\  \ \____-  \ \_\ \_\    \ \_\  \ \_\ \_\ 
          \/_/  \/_/   \/_____/     \/_/   \/_/\/_/   \/____/   \/_/\/_/     \/_/   \/_/\/_/ 
                                                                                             

    */

    function generateImage(uint[] memory _traits, uint _tokenId, uint _collectionId, uint _numTraits) internal view returns(string memory) {

        uint mythicId = mythicTokens[_collectionId][_tokenId];
        string memory image;

        if (mythicId > 0) {

            MythicInfo memory mythicInfo = mythicInfoMap[_collectionId][mythicId];
            

            if(bytes(mythicInfo.name).length > 0) {
                image = wrapTag(mythicInfo.image);
            } else {
                image = getImage(_numTraits, mythicId - 1, _collectionId);
            }

            return string(abi.encodePacked(header, image, getAdditionalImage(_collectionId, _tokenId), footer));

        } 

        image = header;

        for(uint i = 0; i < _numTraits; i++) {
            image = string(abi.encodePacked(image, getImage(i, _traits[i], _collectionId)));
        }


        return string(abi.encodePacked(image, getAdditionalImage(_collectionId, _tokenId), footer));
    }


    function tokenURI(Phoenix memory _phoenix, MetadataStruct memory _metadataStruct) public view returns (string memory) {

        if(bytes(_phoenix.name).length == 0) {
            _phoenix.name = string(abi.encodePacked('Phoenix #', ImageHelper.toString(_metadataStruct.tokenId)));
        }

        if(collectionRevealed[_metadataStruct.collectionId] == false) {
            //Collection is yet to be revealed
            return
            string(
                abi.encodePacked(
                    'data:application/json;base64,',
                    ImageHelper.encode(
                        bytes(
                            abi.encodePacked(
                                '{"name": "', _phoenix.name,'", "description": "', _metadataStruct.description, '", "image": "',
                                'data:image/svg+xml;base64,',
                                ImageHelper.encode((abi.encodePacked(header, wrapTag(_metadataStruct.unRevealedImage), footer))),
                                '","attributes": [{"trait_type": "Level", "value": "', ImageHelper.toString(_phoenix.level), '"}]}'
                            )
                        )
                    )
                )
            );
        }

        uint[] memory traits = getTraitsFromHash(_phoenix.hash, _metadataStruct.collectionId, _metadataStruct.numTraits);

        string memory image = ImageHelper.encode(bytes(generateImage(traits, _metadataStruct.tokenId, _metadataStruct.collectionId, _metadataStruct.numTraits)));

        return

            string(
                abi.encodePacked(
                    'data:application/json;base64,',
                    ImageHelper.encode(
                        bytes(
                            abi.encodePacked(
                                '{"name": "', _phoenix.name,'", "description": "', _metadataStruct.description, '", "image": "',
                                'data:image/svg+xml;base64,',
                                image,
                                '",',

                                getAttributes(traits, _metadataStruct.collectionId, _metadataStruct.numTraits, _phoenix.level, _metadataStruct.tokenId),
                                getAdditionalMetadata(_metadataStruct.collectionId, _metadataStruct.tokenId),
                                
                                ']',
                                '}'
                            )
                        )
                    )
                )
            );
    }
    
    function call(address _source, bytes memory _sig) internal view returns (string memory) {
        (bool succ, bytes memory ret)  = _source.staticcall(_sig);
        require(succ, "failed to get data");
        return abi.decode(ret, (string));
    }

    function getImage(uint _propertyIndex, uint _id, uint _collectionId) internal view returns (string memory) {
        address source = propertyAddresses[_collectionId][uint(_propertyIndex)];

        string memory image = call(source, abi.encodeWithSignature(string(abi.encodePacked("trait", ImageHelper.toString(_id), "()")), ""));

        if(bytes(image).length > 0) {
             return wrapTag(image);
        } else {
            return "";
        }

       
    }

    function getTraitName(uint _propertyIndex, uint _id, uint _collectionId) internal view returns (string memory) {
        address source = propertyAddresses[_collectionId][uint(_propertyIndex)];

        return call(source, abi.encodeWithSignature(string(abi.encodePacked("name", ImageHelper.toString(_id), "()")), ""));
    }

    function getPropertyName(uint _propertyIndex,  uint _collectionId) internal view returns (string memory) {
        address source = propertyAddresses[_collectionId][_propertyIndex];

        return call(source, abi.encodeWithSignature("propertyName()", ""));
    }
    
    function wrapTag(string memory uri) internal pure returns (string memory) {
    
        return string(abi.encodePacked('<image x="0" y="0" width="48" height="48" xlink:href="data:image/png;base64,', uri, '"/>'));
    
    }

    function getAttributes(uint[] memory _traits, uint _collectionId, uint _numTraits, uint8 _level, uint _tokenId) internal view returns (string memory) {
       
        string memory attributeString;

        uint mythicId = mythicTokens[_collectionId][_tokenId];

        if (mythicId > 0) {

            MythicInfo memory mythicInfo = mythicInfoMap[_collectionId][mythicId];
            

            if(bytes(mythicInfo.name).length > 0) {
                attributeString = string(abi.encodePacked('{"trait_type": "', getPropertyName(_numTraits, _collectionId), '","value": "', mythicInfo.name,'"}', ",")) ;
            } else {
                attributeString = string(abi.encodePacked(getTraitAttributes(mythicId - 1, _numTraits, _collectionId)));
            }

        } else {
            for(uint i = 0; i < _numTraits; i++) {
                attributeString = string(abi.encodePacked(attributeString, getTraitAttributes(_traits[i], i, _collectionId)));
            }
        }

        return string(abi.encodePacked(
            '"attributes": [',
            attributeString, 
            '{"trait_type": "Level", "value": "', ImageHelper.toString(_level), '"}'));
    }

    function getTraitAttributes(uint _traitId, uint _propertyIndex, uint _collectionId) internal view returns(string memory) {

        string memory traitName = getTraitName(_propertyIndex, _traitId, _collectionId);
        if(bytes(traitName).length == 0) {
            return "";
        }
        return string(abi.encodePacked('{"trait_type": "', getPropertyName(_propertyIndex, _collectionId), '","value": "', traitName,'"}', ","));
    }

    function traitPicker(uint16 _randinput, TraitRarity[] memory _traitRarities) internal pure returns (uint)
    {

        uint minIndex = 0;
        uint maxIndex = _traitRarities.length -1;
        uint midIndex;

        //Do a binary search so we can limit the number of attempts to find the proper trait
        while(minIndex < maxIndex) {

            midIndex = (minIndex + maxIndex) / 2;

            if(minIndex == midIndex) {
                if(_randinput <= _traitRarities[minIndex].rarityRange) {
                    return _traitRarities[minIndex].index;
                }

                return _traitRarities[maxIndex].index;
            }

            if(_randinput <= _traitRarities[midIndex].rarityRange) {
                maxIndex = midIndex;

            } else {
                minIndex = midIndex;
                
            }

        }

        return _traitRarities[midIndex].index;
        
    }

    
    function getTraitsFromHash(uint128 _hash, uint _collectionId, uint _numTraits) public view returns(uint[] memory) {

        uint[] memory traits = new uint[](_numTraits);
        uint16 randomInput;

        for(uint i = 0; i < _numTraits; i++) {

            randomInput = uint16((_hash / 10000**i % 10000));

            traits[i] = traitPicker(randomInput, PropertyRarities[_collectionId][i]);

        }

        return traits;

    }


    function getAdditionalImage(uint _collectionId, uint _tokenId) internal view returns(string memory) {

        string memory images;

        for(uint i = 0; i < addonAddresses.length; i++) {

            abi.encodePacked(images, metadataAddonContract(addonAddresses[i]).getImage(_collectionId, _tokenId));

        }

        return images;

    }

    function getAdditionalMetadata(uint _collectionId, uint _tokenId) internal view returns(string memory) {

        string memory metaData;

        for(uint i = 0; i < addonAddresses.length; i++) {

            if(addonAddresses[i] != address(0)) {

                metaData = string(abi.encodePacked(metaData, metadataAddonContract(addonAddresses[i]).getMetadata(_collectionId, _tokenId)));

            }

        }

        if(bytes(metaData).length > 0) {
            //metadat isnt empty, so lets add a comma in front
            metaData = string(abi.encodePacked(",", metaData));
        }

        return metaData;
    }

    function getRarityIndex(uint _collectionId, uint index) external view returns(uint16[] memory) {
        return PropertyRarityRanges[_collectionId][index];
    }

    function getSpecialToken(uint _collectionId, uint _tokenId) public view returns(uint) {
        return mythicTokens[_collectionId][_tokenId];
    }


   /**
         ______     __     __     __   __     ______     ______    
        /\  __ \   /\ \  _ \ \   /\ "-.\ \   /\  ___\   /\  == \   
        \ \ \/\ \  \ \ \/ ".\ \  \ \ \-.  \  \ \  __\   \ \  __<   
         \ \_____\  \ \__/".~\_\  \ \_\\"\_\  \ \_____\  \ \_\ \_\ 
          \/_____/   \/_/   \/_/   \/_/ \/_/   \/_____/   \/_/ /_/ 
                                                                   
   */

    function setProperty(uint8 _propertyIndex, uint8 _collectionId, address _addr) external onlyOwner {

        propertyAddresses[_collectionId][_propertyIndex] = _addr;     
    }

    function setPropertyRarities(uint16[] calldata rarities, uint collectionId, uint propertyId) external onlyOwner {
  
        PropertyRarityRanges[collectionId][propertyId] = rarities; 
    }

    
    function revealCollection(uint _collectionId, uint _totalSupply, uint _numMythic, uint _numProperties) external onlyOwner {

        require(collectionRevealed[_collectionId] == false, "Collection already revealed");

        collectionRevealed[_collectionId] = true;

        revealMythics(_numMythic, _collectionId, _totalSupply);

        for(uint i = 0; i < _numProperties; i++) {

            mixUpTraits(_collectionId, i);

        }

    }

    function revealMythics(uint _numMythic, uint _collectionId, uint _totalSupply) internal onlyOwner {

        uint hash =  uint256(
                        keccak256(
                            abi.encodePacked(
                                block.timestamp,
                                block.difficulty, _collectionId, _totalSupply, _numMythic)
                        )    
                    );

        uint i = 0;
        uint uniqueChosen = 0;
    
        while(uniqueChosen < _numMythic) {

            uint randomInput = (hash / _totalSupply**i % _totalSupply) ;
            
            if(mythicTokens[_collectionId][randomInput] == 0) {
                uniqueChosen += 1;
                mythicTokens[_collectionId][randomInput] = uniqueChosen; 
            }

            i++; 

        }

        totalMythics[_collectionId] = _numMythic;
        mythicsAdded[_collectionId] = _numMythic;

    }

    function mixUpTraits(uint _collectionId, uint _propertyIndex) internal onlyOwner {

        uint hash =  uint256(
                    keccak256(
                        abi.encodePacked(
                            block.timestamp,
                            block.difficulty, _collectionId, _propertyIndex)
                    )    
                );

        uint total = 0;

        uint16[] memory traitRarities = PropertyRarityRanges[_collectionId][_propertyIndex];

        uint tempLength = traitRarities.length;

        uint index = 0;

        require(tempLength > 0, "temp length should be more than zero");

        for(uint j = 0; j < traitRarities.length; j++) {

            index = (hash / ((j + 1) * 100000))  % tempLength;

            total += traitRarities[index];

            PropertyRarities[_collectionId][_propertyIndex].push(TraitRarity(
                uint16(total),
                uint16(index)
            ));

            uint16 last = traitRarities[tempLength - 1];

            traitRarities[index] = last;

            tempLength -= 1;
  
        }

    }

    function setAcceptedAddress(address _acceptedAddress, bool _value) external onlyOwner {

        acceptedAddresses[_acceptedAddress] = _value;

    }

    function setAddonContractAddress(address _addr, uint _index) external onlyOwner {

        require(_index <= addonAddresses.length, "index out of range");

        if(_index == addonAddresses.length) {
            addonAddresses.push(_addr);

        } else {
            addonAddresses[_index] = _addr;
        }

    }

    function setRandomNumberContract(address _addr) external onlyOwner {

        randomNumberContract = verifiableRandomNumberContract(_addr);

    }

    function addMythicToPool(MythicInfo calldata _mythicInfo, uint _collectionId) external onlyOwner {

        uint total =  totalMythics[_collectionId];

        mythicInfoMap[_collectionId][total] = _mythicInfo;

        totalMythics[_collectionId] += 1;

    }

    
    function resurrect(uint _collectionId, uint _tokenId) external {

        require(acceptedAddresses[msg.sender] == true, "Address cannot call this function");

        require(mythicTokens[_collectionId][_tokenId] == 0, "Mythic tokens refuse to be resurected");

        mythicRewardPool[_collectionId].push(_tokenId);

    }

    function rewardMythics(uint _collectionId, uint _numMythics) external {

        require(address(randomNumberContract) != address(0), "random number contract not set");

        require(acceptedAddresses[msg.sender] == true, "Address cannot call this function");

        uint lastMythic = mythicsAdded[_collectionId];

        uint numInPool = totalMythics[_collectionId] - lastMythic;

        require(numInPool <= _numMythics, "Trying to give away more mythics than exist");

        uint[] memory rewardPool = mythicRewardPool[_collectionId];

        //uint verifiablyRandomNumber = randomNumberContract.getRandomNumber();

        uint verifiablyRandomNumber = uint(keccak256(abi.encodePacked(msg.sender, _numMythics)));

        uint tempLength = rewardPool.length;

        require(tempLength >= _numMythics, "More mythics to add than there are tokens in pool to give");

        uint totalMythicsGiven = 0;

        while(totalMythicsGiven < _numMythics) {

            require(tempLength > 0, "Length of reward pool is zero");

            uint randindex = (verifiablyRandomNumber / ((totalMythicsGiven + 1) * 5000)) % tempLength;

            if(mythicTokens[_collectionId][rewardPool[randindex]] == 0) {
                //this token is not already a 1/1, so is chosen to be
                mythicTokens[_collectionId][rewardPool[randindex]] = lastMythic;
                mythicsAdded[_collectionId] += 1;

                lastMythic += 1;
                totalMythicsGiven += 1;
            }

            rewardPool[randindex] = rewardPool[tempLength - 1];

            tempLength -= 1;

        }

        uint[] memory clearedPool;

        //Clear the mythic reward pool
        mythicRewardPool[_collectionId] = clearedPool;


    }

}

    


library ImageHelper {

    
    string internal constant TABLE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';

    /// @notice developed by Brecht Devos - <[email protected]>
    function encode(bytes memory data) internal pure returns (string memory) {
        if (data.length == 0) return '';
        
        // load the table into memory
        string memory table = TABLE;

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

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

        assembly {
            // set the actual output length
            mstore(result, encodedLen)
            
            // prepare the lookup table
            let tablePtr := add(table, 1)
            
            // input ptr
            let dataPtr := data
            let endPtr := add(dataPtr, mload(data))
            
            // result ptr, jump over length
            let resultPtr := add(result, 32)
            
            // run over the input, 3 bytes at a time
            for {} lt(dataPtr, endPtr) {}
            {
               dataPtr := add(dataPtr, 3)
               
               // read 3 bytes
               let input := mload(dataPtr)
               
               // write 4 characters
               mstore(resultPtr, shl(248, mload(add(tablePtr, and(shr(18, input), 0x3F)))))
               resultPtr := add(resultPtr, 1)
               mstore(resultPtr, shl(248, mload(add(tablePtr, and(shr(12, input), 0x3F)))))
               resultPtr := add(resultPtr, 1)
               mstore(resultPtr, shl(248, mload(add(tablePtr, and(shr( 6, input), 0x3F)))))
               resultPtr := add(resultPtr, 1)
               mstore(resultPtr, shl(248, mload(add(tablePtr, and(        input,  0x3F)))))
               resultPtr := add(resultPtr, 1)
            }
            
            // padding with '='
            switch mod(mload(data), 3)
            case 1 { mstore(sub(resultPtr, 2), shl(240, 0x3d3d)) }
            case 2 { mstore(sub(resultPtr, 1), shl(248, 0x3d)) }
        }
        
        return result;
    }

    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);
    }

}

File 2 of 4 : MetadataStruct.sol
struct MetadataStruct {

	uint tokenId;
	uint collectionId;
	uint numTraits;
	string description;
	string unRevealedImage;

}

File 3 of 4 : 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 4 of 4 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

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

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

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

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

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

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

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

Settings
{
  "remappings": [],
  "optimizer": {
    "enabled": true,
    "runs": 1000
  },
  "evmVersion": "london",
  "libraries": {},
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"components":[{"internalType":"string","name":"image","type":"string"},{"internalType":"string","name":"name","type":"string"}],"internalType":"struct MetadataManager.MythicInfo","name":"_mythicInfo","type":"tuple"},{"internalType":"uint256","name":"_collectionId","type":"uint256"}],"name":"addMythicToPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"footer","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_collectionId","type":"uint256"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRarityIndex","outputs":[{"internalType":"uint16[]","name":"","type":"uint16[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_collectionId","type":"uint256"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getSpecialToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint128","name":"_hash","type":"uint128"},{"internalType":"uint256","name":"_collectionId","type":"uint256"},{"internalType":"uint256","name":"_numTraits","type":"uint256"}],"name":"getTraitsFromHash","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"header","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_collectionId","type":"uint256"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"resurrect","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_collectionId","type":"uint256"},{"internalType":"uint256","name":"_totalSupply","type":"uint256"},{"internalType":"uint256","name":"_numMythic","type":"uint256"},{"internalType":"uint256","name":"_numProperties","type":"uint256"}],"name":"revealCollection","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_collectionId","type":"uint256"},{"internalType":"uint256","name":"_numMythics","type":"uint256"}],"name":"rewardMythics","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_acceptedAddress","type":"address"},{"internalType":"bool","name":"_value","type":"bool"}],"name":"setAcceptedAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"},{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"setAddonContractAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_propertyIndex","type":"uint8"},{"internalType":"uint8","name":"_collectionId","type":"uint8"},{"internalType":"address","name":"_addr","type":"address"}],"name":"setProperty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16[]","name":"rarities","type":"uint16[]"},{"internalType":"uint256","name":"collectionId","type":"uint256"},{"internalType":"uint256","name":"propertyId","type":"uint256"}],"name":"setPropertyRarities","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"}],"name":"setRandomNumberContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint128","name":"hash","type":"uint128"},{"internalType":"uint8","name":"level","type":"uint8"},{"internalType":"string","name":"name","type":"string"}],"internalType":"struct MetadataManager.Phoenix","name":"_phoenix","type":"tuple"},{"components":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"collectionId","type":"uint256"},{"internalType":"uint256","name":"numTraits","type":"uint256"},{"internalType":"string","name":"description","type":"string"},{"internalType":"string","name":"unRevealedImage","type":"string"}],"internalType":"struct MetadataStruct","name":"_metadataStruct","type":"tuple"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b506200001d3362000023565b62000073565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b61394380620000836000396000f3fe608060405234801561001057600080fd5b50600436106101355760003560e01c8063a8032bbe116100b2578063de13f44111610081578063e356bdd311610066578063e356bdd31461027e578063ea9a930114610291578063f2fde38b146102a457600080fd5b8063de13f44114610258578063e165562a1461026b57600080fd5b8063a8032bbe146101f1578063aa1eaea114610212578063ba1886c914610225578063bb0963451461024557600080fd5b806345bd4d1f11610109578063764a1bdf116100ee578063764a1bdf146101b05780638ade68a4146101c35780638da5cb5b146101d657600080fd5b806345bd4d1f14610188578063715018a6146101a857600080fd5b80621f62ab1461013a5780630d7163c61461014f5780633b53302c1461016d5780633ce3018514610180575b600080fd5b61014d6101483660046127fb565b6102b7565b005b610157610333565b60405161016491906132cb565b60405180910390f35b61014d61017b366004612af9565b61034f565b6101576103e5565b61019b610196366004612a72565b610401565b6040516101649190613293565b61014d61054d565b61014d6101be366004612aa5565b6105a1565b61014d6101d1366004612852565b6109f9565b6000546040516001600160a01b039091168152602001610164565b6102046101ff366004612aa5565b610b41565b604051908152602001610164565b61014d610220366004612aa5565b610b62565b610238610233366004612aa5565b610c80565b604051610164919061324b565b61014d61025336600461287c565b610d13565b61014d61026636600461296c565b610d86565b61014d610279366004612ac7565b610e27565b61015761028c3660046129a8565b610f19565b61014d61029f366004612816565b6110eb565b61014d6102b23660046127fb565b61115e565b6000546001600160a01b031633146103045760405162461bcd60e51b815260206004820181905260248201526000805160206138b483398151915260448201526064015b60405180910390fd5b600c805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6040518060c00160405280609d81526020016137d7609d913981565b6000546001600160a01b031633146103975760405162461bcd60e51b815260206004820181905260248201526000805160206138b483398151915260448201526064016102fb565b60ff9182166000908152600160209081526040808320959094168252939093529120805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03909216919091179055565b6040518060600160405280603a81526020016138d4603a913981565b606060008267ffffffffffffffff81111561041e5761041e6136dd565b604051908082528060200260200182016040528015610447578160200160208202803683370190505b5090506000805b84811015610540576127106104638282613414565b61047f906fffffffffffffffffffffffffffffffff8a166133bd565b6104899190613687565b60008781526004602090815260408083208584528252808320805482518185028101850190935280835294965061051194879492939192909184015b82821015610508576000848152602090819020604080518082019091529084015461ffff80821683526201000090910416818301528252600190920191016104c5565b5050505061122e565b838281518110610523576105236136c7565b6020908102919091010152806105388161366c565b91505061044e565b50909150505b9392505050565b6000546001600160a01b031633146105955760405162461bcd60e51b815260206004820181905260248201526000805160206138b483398151915260448201526064016102fb565b61059f6000611345565b565b600c546001600160a01b03166105f95760405162461bcd60e51b815260206004820152601e60248201527f72616e646f6d206e756d62657220636f6e7472616374206e6f7420736574000060448201526064016102fb565b336000908152600a602052604090205460ff1615156001146106675760405162461bcd60e51b815260206004820152602160248201527f416464726573732063616e6e6f742063616c6c20746869732066756e6374696f6044820152603760f91b60648201526084016102fb565b600082815260076020908152604080832054600890925282205490919061068f9083906134db565b9050828111156107075760405162461bcd60e51b815260206004820152602b60248201527f547279696e6720746f20676976652061776179206d6f7265206d79746869637360448201527f207468616e20657869737400000000000000000000000000000000000000000060648201526084016102fb565b6000848152600b602090815260408083208054825181850281018501909352808352919290919083018282801561075d57602002820191906000526020600020905b815481526020019060010190808311610749575b50506040516bffffffffffffffffffffffff193360601b166020820152603481018990529394506000936054019250610794915050565b60408051601f1981840301815291905280516020909101208251909150858110156108275760405162461bcd60e51b815260206004820152603960248201527f4d6f7265206d79746869637320746f20616464207468616e207468657265206160448201527f726520746f6b656e7320696e20706f6f6c20746f20676976650000000000000060648201526084016102fb565b60005b868110156109cd57600082116108825760405162461bcd60e51b815260206004820152601d60248201527f4c656e677468206f662072657761726420706f6f6c206973207a65726f00000060448201526064016102fb565b6000826108908360016133a5565b61089c906113886134bc565b6108a690866133bd565b6108b09190613687565b60008a81526002602052604081208751929350918790849081106108d6576108d66136c7565b602002602001015181526020019081526020016000205460001415610979576000898152600260205260408120865189929088908590811061091a5761091a6136c7565b60200260200101518152602001908152602001600020819055506001600760008b8152602001908152602001600020600082825461095891906133a5565b9091555061096990506001886133a5565b96506109766001836133a5565b91505b846109856001856134db565b81518110610995576109956136c7565b60200260200101518582815181106109af576109af6136c7565b60209081029190910101526109c56001846134db565b92505061082a565b6000888152600b602052604090206060805190916109ed916080906125ac565b50505050505050505050565b6000546001600160a01b03163314610a415760405162461bcd60e51b815260206004820181905260248201526000805160206138b483398151915260448201526064016102fb565b600954811115610a935760405162461bcd60e51b815260206004820152601260248201527f696e646578206f7574206f662072616e6765000000000000000000000000000060448201526064016102fb565b600954811415610afb57600980546001810182556000919091527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af0180546001600160a01b03841673ffffffffffffffffffffffffffffffffffffffff199091161790555050565b8160098281548110610b0f57610b0f6136c7565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b031602179055505050565b60008281526002602090815260408083208484529091529020545b92915050565b336000908152600a602052604090205460ff161515600114610bd05760405162461bcd60e51b815260206004820152602160248201527f416464726573732063616e6e6f742063616c6c20746869732066756e6374696f6044820152603760f91b60648201526084016102fb565b600082815260026020908152604080832084845290915290205415610c5d5760405162461bcd60e51b815260206004820152602560248201527f4d797468696320746f6b656e732072656675736520746f20626520726573757260448201527f656374656400000000000000000000000000000000000000000000000000000060648201526084016102fb565b6000918252600b6020908152604083208054600181018255908452922090910155565b6000828152600360209081526040808320848452825291829020805483518184028101840190945280845260609392830182828015610d0657602002820191906000526020600020906000905b82829054906101000a900461ffff1661ffff1681526020019060020190602082600101049283019260010382029150808411610ccd5790505b5050505050905092915050565b6000546001600160a01b03163314610d5b5760405162461bcd60e51b815260206004820181905260248201526000805160206138b483398151915260448201526064016102fb565b60008281526003602090815260408083208484529091529020610d7f9085856125f7565b5050505050565b6000546001600160a01b03163314610dce5760405162461bcd60e51b815260206004820181905260248201526000805160206138b483398151915260448201526064016102fb565b600081815260086020908152604080832054600683528184208185529092529091208390610dfc82826136f3565b50506000828152600860205260408120805460019290610e1d9084906133a5565b9091555050505050565b6000546001600160a01b03163314610e6f5760405162461bcd60e51b815260206004820181905260248201526000805160206138b483398151915260448201526064016102fb565b60008481526005602052604090205460ff1615610ece5760405162461bcd60e51b815260206004820152601b60248201527f436f6c6c656374696f6e20616c72656164792072657665616c6564000000000060448201526064016102fb565b6000848152600560205260409020805460ff19166001179055610ef28285856113a2565b60005b81811015610d7f57610f0785826114d7565b80610f118161366c565b915050610ef5565b606082604001515160001415610f58578151610f34906117a6565b604051602001610f44919061314e565b60408051601f198184030181529181528401525b60208083015160009081526005909152604090205460ff166110325761100c83604001518360600151610fe96040518060c00160405280609d81526020016137d7609d9139610faa87608001516118e0565b6040518060600160405280603a81526020016138d4603a9139604051602001610fd593929190612b87565b604051602081830303815290604052611909565b610ff9876020015160ff166117a6565b604051602001610fd59493929190612efb565b60405160200161101c9190613109565b6040516020818303038152906040529050610b5c565b600061104b846000015184602001518560400151610401565b9050600061106f61106a83866000015187602001518860400151611aa8565b611909565b90506110c2856040015185606001518361109c8689602001518a604001518c602001518c60000151611d86565b6110ae89602001518a60000151612012565b604051602001610fd5959493929190612d86565b6040516020016110d29190613109565b6040516020818303038152906040529250505092915050565b6000546001600160a01b031633146111335760405162461bcd60e51b815260206004820181905260248201526000805160206138b483398151915260448201526064016102fb565b6001600160a01b03919091166000908152600a60205260409020805460ff1916911515919091179055565b6000546001600160a01b031633146111a65760405162461bcd60e51b815260206004820181905260248201526000805160206138b483398151915260448201526064016102fb565b6001600160a01b0381166112225760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016102fb565b61122b81611345565b50565b6000806000905060006001845161124591906134db565b905060005b8183101561131857600261125e83856133a5565b61126891906133bd565b9050808314156112dc57848381518110611284576112846136c7565b60200260200101516000015161ffff168661ffff16116112ca578483815181106112b0576112b06136c7565b60200260200101516020015161ffff169350505050610b5c565b8482815181106112b0576112b06136c7565b8481815181106112ee576112ee6136c7565b60200260200101516000015161ffff168661ffff16116113105780915061124a565b80925061124a565b84818151811061132a5761132a6136c7565b60200260200101516020015161ffff16935050505092915050565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000546001600160a01b031633146113ea5760405162461bcd60e51b815260206004820181905260248201526000805160206138b483398151915260448201526064016102fb565b60408051426020808301919091524482840152606082018590526080820184905260a08083018790528351808403909101815260c090920190925280519101206000805b858110156114b5576000846114438482613414565b61144d90866133bd565b6114579190613687565b60008781526002602090815260408083208484529091529020549091506114a2576114836001836133a5565b6000878152600260209081526040808320858452909152902081905591505b826114ac8161366c565b9350505061142e565b5050506000918252506008602090815260408083208490556007909152902055565b6000546001600160a01b0316331461151f5760405162461bcd60e51b815260206004820181905260248201526000805160206138b483398151915260448201526064016102fb565b604080514260208201524491810191909152606081018390526080810182905260009060a00160408051601f198184030181528282528051602091820120600087815260038352838120878252835283812080548085028701850190955284865291955093849390928301828280156115df57602002820191906000526020600020906000905b82829054906101000a900461ffff1661ffff16815260200190600201906020826001010492830192600103820291508084116115a65790505b505083519394506000925050508161165e5760405162461bcd60e51b8152602060048201526024808201527f74656d70206c656e6774682073686f756c64206265206d6f7265207468616e2060448201527f7a65726f0000000000000000000000000000000000000000000000000000000060648201526084016102fb565b60005b835181101561179c57826116768260016133a5565b61168390620186a06134bc565b61168d90886133bd565b6116979190613687565b91508382815181106116ab576116ab6136c7565b602002602001015161ffff16856116c291906133a5565b60008981526004602090815260408083208b84528252808320815180830190925261ffff8086168352878116838501908152825460018181018555938752948620935193909401805494518216620100000263ffffffff19909516939091169290921792909217905591965090859061173b90866134db565b8151811061174b5761174b6136c7565b6020026020010151905080858481518110611768576117686136c7565b61ffff909216602092830291909101909101526117866001856134db565b93505080806117949061366c565b915050611661565b5050505050505050565b6060816117e657505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b811561181057806117fa8161366c565b91506118099050600a836133bd565b91506117ea565b60008167ffffffffffffffff81111561182b5761182b6136dd565b6040519080825280601f01601f191660200182016040528015611855576020820181803683370190505b5090505b84156118d85761186a6001836134db565b9150611877600a86613687565b6118829060306133a5565b60f81b818381518110611897576118976136c7565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506118d1600a866133bd565b9450611859565b949350505050565b6060816040516020016118f39190613193565b6040516020818303038152906040529050919050565b606081516000141561192957505060408051602081019091526000815290565b6000604051806060016040528060408152602001613874604091399050600060038451600261195891906133a5565b61196291906133bd565b61196d9060046134bc565b9050600061197c8260206133a5565b67ffffffffffffffff811115611994576119946136dd565b6040519080825280601f01601f1916602001820160405280156119be576020820181803683370190505b509050818152600183018586518101602084015b81831015611a2c5760039283018051603f601282901c811687015160f890811b8552600c83901c8216880151811b6001860152600683901c8216880151811b60028601529116860151901b938201939093526004016119d2565b600389510660018114611a465760028114611a7257611a9a565b7f3d3d000000000000000000000000000000000000000000000000000000000000600119830152611a9a565b7f3d000000000000000000000000000000000000000000000000000000000000006000198301525b509398975050505050505050565b6000828152600260209081526040808320868452909152902054606090818115611cb45760008581526006602090815260408083208584529091528082208151808301909252805482908290611afd90613631565b80601f0160208091040260200160405190810160405280929190818152602001828054611b2990613631565b8015611b765780601f10611b4b57610100808354040283529160200191611b76565b820191906000526020600020905b815481529060010190602001808311611b5957829003601f168201915b50505050508152602001600182018054611b8f90613631565b80601f0160208091040260200160405190810160405280929190818152602001828054611bbb90613631565b8015611c085780601f10611bdd57610100808354040283529160200191611c08565b820191906000526020600020905b815481529060010190602001808311611beb57829003601f168201915b505050505081525050905060008160200151511115611c33578051611c2c906118e0565b9150611c4b565b611c4885611c426001866134db565b8861217d565b91505b6040518060c00160405280609d81526020016137d7609d913982611c6f888a612292565b6040518060600160405280603a81526020016138d4603a9139604051602001611c9b9493929190612bca565b60405160208183030381529060405293505050506118d8565b6040518060c00160405280609d81526020016137d7609d9139905060005b84811015611d345781611cff828a8481518110611cf157611cf16136c7565b60200260200101518961217d565b604051602001611d10929190612b58565b60405160208183030381529060405291508080611d2c9061366c565b915050611cd2565b5080611d408688612292565b6040518060600160405280603a81526020016138d4603a9139604051602001611d6b93929190612b87565b60405160208183030381529060405292505050949350505050565b600084815260026020908152604080832084845290915290205460609081908015611f715760008781526006602090815260408083208484529091528082208151808301909252805482908290611ddc90613631565b80601f0160208091040260200160405190810160405280929190818152602001828054611e0890613631565b8015611e555780601f10611e2a57610100808354040283529160200191611e55565b820191906000526020600020905b815481529060010190602001808311611e3857829003601f168201915b50505050508152602001600182018054611e6e90613631565b80601f0160208091040260200160405190810160405280929190818152602001828054611e9a90613631565b8015611ee75780601f10611ebc57610100808354040283529160200191611ee7565b820191906000526020600020905b815481529060010190602001808311611eca57829003601f168201915b505050505081525050905060008160200151511115611f3457611f0a8789612398565b602080830151604051611f1e939201612c21565b6040516020818303038152906040529250611f6b565b611f49611f426001846134db565b888a612437565b604051602001611f599190612b3c565b60405160208183030381529060405292505b50611fd8565b60005b86811015611fd65782611fa18a8381518110611f9257611f926136c7565b6020026020010151838b612437565b604051602001611fb2929190612b58565b60405160208183030381529060405292508080611fce9061366c565b915050611f74565b505b81611fe58660ff166117a6565b604051602001611ff6929190613053565b6040516020818303038152906040529250505095945050505050565b60608060005b60095481101561214c5760006001600160a01b031660098281548110612040576120406136c7565b6000918252602090912001546001600160a01b03161461213a57816009828154811061206e5761206e6136c7565b6000918252602090912001546040517f7477efa400000000000000000000000000000000000000000000000000000000815260048101889052602481018790526001600160a01b0390911690637477efa49060440160006040518083038186803b1580156120db57600080fd5b505afa1580156120ef573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261211791908101906128fe565b604051602001612128929190612b58565b60405160208183030381529060405291505b806121448161366c565b915050612018565b5080511561054657806040516020016121659190612d0c565b60405160208183030381529060405290509392505050565b60008181526001602090815260408083208684529091528120546060916001600160a01b039091169061225d826121b3876117a6565b6040516020016121c39190612d35565b60408051601f198184030181529082905260206024830152600060448301529060640160408051601f19818403018152908290529161220191612b3c565b6040519081900390206020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090921691909117905261249d565b80519091501561227957612270816118e0565b92505050610546565b6040518060200160405280600081525092505050610546565b60608060005b6009548110156123905781600982815481106122b6576122b66136c7565b6000918252602090912001546040517fed6f29ca00000000000000000000000000000000000000000000000000000000815260048101889052602481018790526001600160a01b039091169063ed6f29ca9060440160006040518083038186803b15801561232357600080fd5b505afa158015612337573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261235f91908101906128fe565b604051602001612370929190612b58565b60408051601f1981840301905252806123888161366c565b915050612298565b509392505050565b60008181526001602090815260408083208584528252808320549051602481019290925260448201929092526060916001600160a01b0316906118d890829060640160408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f2c35c08c0000000000000000000000000000000000000000000000000000000017905261249d565b60606000612446848685612569565b9050805160001415612468575050604080516020810190915260008152610546565b6124728484612398565b81604051602001612484929190612c21565b6040516020818303038152906040529150509392505050565b6060600080846001600160a01b0316846040516124ba9190612b3c565b600060405180830381855afa9150503d80600081146124f5576040519150601f19603f3d011682016040523d82523d6000602084013e6124fa565b606091505b50915091508161254c5760405162461bcd60e51b815260206004820152601260248201527f6661696c656420746f206765742064617461000000000000000000000000000060448201526064016102fb565b8080602001905181019061256091906128fe565b95945050505050565b60008181526001602090815260408083208684529091529020546060906001600160a01b03166125608161259c866117a6565b6040516020016121c39190612cbb565b8280548282559060005260206000209081019282156125e7579160200282015b828111156125e75782518255916020019190600101906125cc565b506125f392915061269b565b5090565b82805482825590600052602060002090600f016010900481019282156125e75791602002820160005b8382111561266457833561ffff1683826101000a81548161ffff021916908361ffff1602179055509260200192600201602081600101049283019260010302612620565b80156126925782816101000a81549061ffff0219169055600201602081600101049283019260010302612664565b50506125f39291505b5b808211156125f3576000815560010161269c565b80356001600160a01b03811681146126c757600080fd5b919050565b600082601f8301126126dd57600080fd5b81356126f06126eb8261337d565b61334c565b81815284602083860101111561270557600080fd5b816020850160208301376000918101602001919091529392505050565b600060a0828403121561273457600080fd5b60405160a0810167ffffffffffffffff8282108183111715612758576127586136dd565b81604052829350843583526020850135602084015260408501356040840152606085013591508082111561278b57600080fd5b612797868387016126cc565b606084015260808501359150808211156127b057600080fd5b506127bd858286016126cc565b6080830152505092915050565b80356fffffffffffffffffffffffffffffffff811681146126c757600080fd5b803560ff811681146126c757600080fd5b60006020828403121561280d57600080fd5b610546826126b0565b6000806040838503121561282957600080fd5b612832836126b0565b91506020830135801515811461284757600080fd5b809150509250929050565b6000806040838503121561286557600080fd5b61286e836126b0565b946020939093013593505050565b6000806000806060858703121561289257600080fd5b843567ffffffffffffffff808211156128aa57600080fd5b818701915087601f8301126128be57600080fd5b8135818111156128cd57600080fd5b8860208260051b85010111156128e257600080fd5b6020928301999098509187013596604001359550909350505050565b60006020828403121561291057600080fd5b815167ffffffffffffffff81111561292757600080fd5b8201601f8101841361293857600080fd5b80516129466126eb8261337d565b81815285602083850101111561295b57600080fd5b612560826020830160208601613601565b6000806040838503121561297f57600080fd5b823567ffffffffffffffff81111561299657600080fd5b83016040818603121561286e57600080fd5b600080604083850312156129bb57600080fd5b823567ffffffffffffffff808211156129d357600080fd5b90840190606082870312156129e757600080fd5b604051606081018181108382111715612a0257612a026136dd565b604052612a0e836127ca565b8152612a1c602084016127ea565b6020820152604083013582811115612a3357600080fd5b612a3f888286016126cc565b60408301525093506020850135915080821115612a5b57600080fd5b50612a6885828601612722565b9150509250929050565b600080600060608486031215612a8757600080fd5b612a90846127ca565b95602085013595506040909401359392505050565b60008060408385031215612ab857600080fd5b50508035926020909101359150565b60008060008060808587031215612add57600080fd5b5050823594602084013594506040840135936060013592509050565b600080600060608486031215612b0e57600080fd5b612b17846127ea565b9250612b25602085016127ea565b9150612b33604085016126b0565b90509250925092565b60008251612b4e818460208701613601565b9190910192915050565b60008351612b6a818460208801613601565b835190830190612b7e818360208801613601565b01949350505050565b60008451612b99818460208901613601565b845190830190612bad818360208901613601565b8451910190612bc0818360208801613601565b0195945050505050565b60008551612bdc818460208a01613601565b855190830190612bf0818360208a01613601565b8551910190612c03818360208901613601565b8451910190612c16818360208801613601565b019695505050505050565b7f7b2274726169745f74797065223a202200000000000000000000000000000000815260008351612c59816010850160208801613601565b7f222c2276616c7565223a202200000000000000000000000000000000000000006010918401918201528351612c9681601c840160208801613601565b61227d60f01b601c9290910191820152600b60fa1b601e820152601f01949350505050565b7f6e616d6500000000000000000000000000000000000000000000000000000000815260008251612cf3816004850160208701613601565b61282960f01b6004939091019283015250600601919050565b600b60fa1b815260008251612d28816001850160208701613601565b9190910160010192915050565b7f7472616974000000000000000000000000000000000000000000000000000000815260008251612d6d816005850160208701613601565b61282960f01b6005939091019283015250600701919050565b693d913730b6b2911d101160b11b815260008651612dab81600a850160208b01613601565b7f222c20226465736372697074696f6e223a202200000000000000000000000000600a918401918201528651612de881601d840160208b01613601565b6c1116101134b6b0b3b2911d101160991b601d92909101918201527f646174613a696d6167652f7376672b786d6c3b6261736536342c000000000000602a8201528551612e3c816044840160208a01613601565b7f222c000000000000000000000000000000000000000000000000000000000000604492909101918201528451612e7a816046840160208901613601565b8451910190612e90816046840160208801613601565b612eee612ec56046838501017f5d00000000000000000000000000000000000000000000000000000000000000815260010190565b7f7d00000000000000000000000000000000000000000000000000000000000000815260010190565b9998505050505050505050565b693d913730b6b2911d101160b11b815260008551612f2081600a850160208a01613601565b7f222c20226465736372697074696f6e223a202200000000000000000000000000600a918401918201528551612f5d81601d840160208a01613601565b6c1116101134b6b0b3b2911d101160991b601d92909101918201527f646174613a696d6167652f7376672b786d6c3b6261736536342c000000000000602a8201528451612fb1816044840160208901613601565b7f222c2261747472696275746573223a205b7b2274726169745f74797065223a20604492909101918201527f224c6576656c222c202276616c7565223a20220000000000000000000000000060648201528351613015816077840160208801613601565b6130476077828401017f227d5d7d00000000000000000000000000000000000000000000000000000000815260040190565b98975050505050505050565b7f2261747472696275746573223a205b000000000000000000000000000000000081526000835161308b81600f850160208801613601565b7f7b2274726169745f74797065223a20224c6576656c222c202276616c7565223a600f918401918201527f2022000000000000000000000000000000000000000000000000000000000000602f82015283516130ee816031840160208801613601565b61227d60f01b60319290910191820152603301949350505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c00000081526000825161314181601d850160208701613601565b91909101601d0192915050565b7f50686f656e697820230000000000000000000000000000000000000000000000815260008251613186816009850160208701613601565b9190910160090192915050565b7f3c696d61676520783d22302220793d2230222077696474683d2234382220686581527f696768743d2234382220786c696e6b3a687265663d22646174613a696d61676560208201527f2f706e673b6261736536342c000000000000000000000000000000000000000060408201526000825161321781604c850160208701613601565b7f222f3e0000000000000000000000000000000000000000000000000000000000604c939091019283015250604f01919050565b6020808252825182820181905260009190848201906040850190845b8181101561328757835161ffff1683529284019291840191600101613267565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b81811015613287578351835292840192918401916001016132af565b60208152600082518060208401526132ea816040850160208701613601565b601f01601f19169190910160400192915050565b6000808335601e1984360301811261331557600080fd5b83018035915067ffffffffffffffff82111561333057600080fd5b60200191503681900382131561334557600080fd5b9250929050565b604051601f8201601f1916810167ffffffffffffffff81118282101715613375576133756136dd565b604052919050565b600067ffffffffffffffff821115613397576133976136dd565b50601f01601f191660200190565b600082198211156133b8576133b861369b565b500190565b6000826133cc576133cc6136b1565b500490565b600181815b8085111561340c5781600019048211156133f2576133f261369b565b808516156133ff57918102915b93841c93908002906133d6565b509250929050565b6000610546838360008261342a57506001610b5c565b8161343757506000610b5c565b816001811461344d576002811461345757613473565b6001915050610b5c565b60ff8411156134685761346861369b565b50506001821b610b5c565b5060208310610133831016604e8410600b8410161715613496575081810a610b5c565b6134a083836133d1565b80600019048211156134b4576134b461369b565b029392505050565b60008160001904831182151516156134d6576134d661369b565b500290565b6000828210156134ed576134ed61369b565b500390565b601f82111561353c57600081815260208120601f850160051c810160208610156135195750805b601f850160051c820191505b8181101561353857828155600101613525565b5050505b505050565b67ffffffffffffffff831115613559576135596136dd565b61356d836135678354613631565b836134f2565b6000601f8411600181146135a157600085156135895750838201355b600019600387901b1c1916600186901b178355610d7f565b600083815260209020601f19861690835b828110156135d257868501358255602094850194600190920191016135b2565b50868210156135ef5760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b60005b8381101561361c578181015183820152602001613604565b8381111561362b576000848401525b50505050565b600181811c9082168061364557607f821691505b6020821081141561366657634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156136805761368061369b565b5060010190565b600082613696576136966136b1565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6136fd82836132fe565b67ffffffffffffffff811115613715576137156136dd565b613729816137238554613631565b856134f2565b6000601f82116001811461375d57600083156137455750838201355b600019600385901b1c1916600184901b1785556137b7565b600085815260209020601f19841690835b8281101561378e578685013582556020948501946001909201910161376e565b50848210156137ab5760001960f88660031b161c19848701351681555b505060018360011b0185555b505050506137c860208301836132fe565b61362b81836001860161354156fe3c7376672069643d2270686f656e6978222077696474683d223130302522206865696768743d2231303025222076657273696f6e3d22312e31222076696577426f783d223020302034382034382220786d6c6e733d22687474703a2f2f7777772e77332e6f72672f323030302f7376672220786d6c6e733a786c696e6b3d22687474703a2f2f7777772e77332e6f72672f313939392f786c696e6b223e4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65723c7374796c653e2370686f656e69787b696d6167652d72656e646572696e673a20706978656c617465643b7d3c2f7374796c653e3c2f7376673ea2646970667358221220768ad3e04cba0590b24b3a14dddeccfc59814799081996ffec2e32f7f2df8e7964736f6c63430008070033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101355760003560e01c8063a8032bbe116100b2578063de13f44111610081578063e356bdd311610066578063e356bdd31461027e578063ea9a930114610291578063f2fde38b146102a457600080fd5b8063de13f44114610258578063e165562a1461026b57600080fd5b8063a8032bbe146101f1578063aa1eaea114610212578063ba1886c914610225578063bb0963451461024557600080fd5b806345bd4d1f11610109578063764a1bdf116100ee578063764a1bdf146101b05780638ade68a4146101c35780638da5cb5b146101d657600080fd5b806345bd4d1f14610188578063715018a6146101a857600080fd5b80621f62ab1461013a5780630d7163c61461014f5780633b53302c1461016d5780633ce3018514610180575b600080fd5b61014d6101483660046127fb565b6102b7565b005b610157610333565b60405161016491906132cb565b60405180910390f35b61014d61017b366004612af9565b61034f565b6101576103e5565b61019b610196366004612a72565b610401565b6040516101649190613293565b61014d61054d565b61014d6101be366004612aa5565b6105a1565b61014d6101d1366004612852565b6109f9565b6000546040516001600160a01b039091168152602001610164565b6102046101ff366004612aa5565b610b41565b604051908152602001610164565b61014d610220366004612aa5565b610b62565b610238610233366004612aa5565b610c80565b604051610164919061324b565b61014d61025336600461287c565b610d13565b61014d61026636600461296c565b610d86565b61014d610279366004612ac7565b610e27565b61015761028c3660046129a8565b610f19565b61014d61029f366004612816565b6110eb565b61014d6102b23660046127fb565b61115e565b6000546001600160a01b031633146103045760405162461bcd60e51b815260206004820181905260248201526000805160206138b483398151915260448201526064015b60405180910390fd5b600c805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6040518060c00160405280609d81526020016137d7609d913981565b6000546001600160a01b031633146103975760405162461bcd60e51b815260206004820181905260248201526000805160206138b483398151915260448201526064016102fb565b60ff9182166000908152600160209081526040808320959094168252939093529120805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03909216919091179055565b6040518060600160405280603a81526020016138d4603a913981565b606060008267ffffffffffffffff81111561041e5761041e6136dd565b604051908082528060200260200182016040528015610447578160200160208202803683370190505b5090506000805b84811015610540576127106104638282613414565b61047f906fffffffffffffffffffffffffffffffff8a166133bd565b6104899190613687565b60008781526004602090815260408083208584528252808320805482518185028101850190935280835294965061051194879492939192909184015b82821015610508576000848152602090819020604080518082019091529084015461ffff80821683526201000090910416818301528252600190920191016104c5565b5050505061122e565b838281518110610523576105236136c7565b6020908102919091010152806105388161366c565b91505061044e565b50909150505b9392505050565b6000546001600160a01b031633146105955760405162461bcd60e51b815260206004820181905260248201526000805160206138b483398151915260448201526064016102fb565b61059f6000611345565b565b600c546001600160a01b03166105f95760405162461bcd60e51b815260206004820152601e60248201527f72616e646f6d206e756d62657220636f6e7472616374206e6f7420736574000060448201526064016102fb565b336000908152600a602052604090205460ff1615156001146106675760405162461bcd60e51b815260206004820152602160248201527f416464726573732063616e6e6f742063616c6c20746869732066756e6374696f6044820152603760f91b60648201526084016102fb565b600082815260076020908152604080832054600890925282205490919061068f9083906134db565b9050828111156107075760405162461bcd60e51b815260206004820152602b60248201527f547279696e6720746f20676976652061776179206d6f7265206d79746869637360448201527f207468616e20657869737400000000000000000000000000000000000000000060648201526084016102fb565b6000848152600b602090815260408083208054825181850281018501909352808352919290919083018282801561075d57602002820191906000526020600020905b815481526020019060010190808311610749575b50506040516bffffffffffffffffffffffff193360601b166020820152603481018990529394506000936054019250610794915050565b60408051601f1981840301815291905280516020909101208251909150858110156108275760405162461bcd60e51b815260206004820152603960248201527f4d6f7265206d79746869637320746f20616464207468616e207468657265206160448201527f726520746f6b656e7320696e20706f6f6c20746f20676976650000000000000060648201526084016102fb565b60005b868110156109cd57600082116108825760405162461bcd60e51b815260206004820152601d60248201527f4c656e677468206f662072657761726420706f6f6c206973207a65726f00000060448201526064016102fb565b6000826108908360016133a5565b61089c906113886134bc565b6108a690866133bd565b6108b09190613687565b60008a81526002602052604081208751929350918790849081106108d6576108d66136c7565b602002602001015181526020019081526020016000205460001415610979576000898152600260205260408120865189929088908590811061091a5761091a6136c7565b60200260200101518152602001908152602001600020819055506001600760008b8152602001908152602001600020600082825461095891906133a5565b9091555061096990506001886133a5565b96506109766001836133a5565b91505b846109856001856134db565b81518110610995576109956136c7565b60200260200101518582815181106109af576109af6136c7565b60209081029190910101526109c56001846134db565b92505061082a565b6000888152600b602052604090206060805190916109ed916080906125ac565b50505050505050505050565b6000546001600160a01b03163314610a415760405162461bcd60e51b815260206004820181905260248201526000805160206138b483398151915260448201526064016102fb565b600954811115610a935760405162461bcd60e51b815260206004820152601260248201527f696e646578206f7574206f662072616e6765000000000000000000000000000060448201526064016102fb565b600954811415610afb57600980546001810182556000919091527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af0180546001600160a01b03841673ffffffffffffffffffffffffffffffffffffffff199091161790555050565b8160098281548110610b0f57610b0f6136c7565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b031602179055505050565b60008281526002602090815260408083208484529091529020545b92915050565b336000908152600a602052604090205460ff161515600114610bd05760405162461bcd60e51b815260206004820152602160248201527f416464726573732063616e6e6f742063616c6c20746869732066756e6374696f6044820152603760f91b60648201526084016102fb565b600082815260026020908152604080832084845290915290205415610c5d5760405162461bcd60e51b815260206004820152602560248201527f4d797468696320746f6b656e732072656675736520746f20626520726573757260448201527f656374656400000000000000000000000000000000000000000000000000000060648201526084016102fb565b6000918252600b6020908152604083208054600181018255908452922090910155565b6000828152600360209081526040808320848452825291829020805483518184028101840190945280845260609392830182828015610d0657602002820191906000526020600020906000905b82829054906101000a900461ffff1661ffff1681526020019060020190602082600101049283019260010382029150808411610ccd5790505b5050505050905092915050565b6000546001600160a01b03163314610d5b5760405162461bcd60e51b815260206004820181905260248201526000805160206138b483398151915260448201526064016102fb565b60008281526003602090815260408083208484529091529020610d7f9085856125f7565b5050505050565b6000546001600160a01b03163314610dce5760405162461bcd60e51b815260206004820181905260248201526000805160206138b483398151915260448201526064016102fb565b600081815260086020908152604080832054600683528184208185529092529091208390610dfc82826136f3565b50506000828152600860205260408120805460019290610e1d9084906133a5565b9091555050505050565b6000546001600160a01b03163314610e6f5760405162461bcd60e51b815260206004820181905260248201526000805160206138b483398151915260448201526064016102fb565b60008481526005602052604090205460ff1615610ece5760405162461bcd60e51b815260206004820152601b60248201527f436f6c6c656374696f6e20616c72656164792072657665616c6564000000000060448201526064016102fb565b6000848152600560205260409020805460ff19166001179055610ef28285856113a2565b60005b81811015610d7f57610f0785826114d7565b80610f118161366c565b915050610ef5565b606082604001515160001415610f58578151610f34906117a6565b604051602001610f44919061314e565b60408051601f198184030181529181528401525b60208083015160009081526005909152604090205460ff166110325761100c83604001518360600151610fe96040518060c00160405280609d81526020016137d7609d9139610faa87608001516118e0565b6040518060600160405280603a81526020016138d4603a9139604051602001610fd593929190612b87565b604051602081830303815290604052611909565b610ff9876020015160ff166117a6565b604051602001610fd59493929190612efb565b60405160200161101c9190613109565b6040516020818303038152906040529050610b5c565b600061104b846000015184602001518560400151610401565b9050600061106f61106a83866000015187602001518860400151611aa8565b611909565b90506110c2856040015185606001518361109c8689602001518a604001518c602001518c60000151611d86565b6110ae89602001518a60000151612012565b604051602001610fd5959493929190612d86565b6040516020016110d29190613109565b6040516020818303038152906040529250505092915050565b6000546001600160a01b031633146111335760405162461bcd60e51b815260206004820181905260248201526000805160206138b483398151915260448201526064016102fb565b6001600160a01b03919091166000908152600a60205260409020805460ff1916911515919091179055565b6000546001600160a01b031633146111a65760405162461bcd60e51b815260206004820181905260248201526000805160206138b483398151915260448201526064016102fb565b6001600160a01b0381166112225760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016102fb565b61122b81611345565b50565b6000806000905060006001845161124591906134db565b905060005b8183101561131857600261125e83856133a5565b61126891906133bd565b9050808314156112dc57848381518110611284576112846136c7565b60200260200101516000015161ffff168661ffff16116112ca578483815181106112b0576112b06136c7565b60200260200101516020015161ffff169350505050610b5c565b8482815181106112b0576112b06136c7565b8481815181106112ee576112ee6136c7565b60200260200101516000015161ffff168661ffff16116113105780915061124a565b80925061124a565b84818151811061132a5761132a6136c7565b60200260200101516020015161ffff16935050505092915050565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000546001600160a01b031633146113ea5760405162461bcd60e51b815260206004820181905260248201526000805160206138b483398151915260448201526064016102fb565b60408051426020808301919091524482840152606082018590526080820184905260a08083018790528351808403909101815260c090920190925280519101206000805b858110156114b5576000846114438482613414565b61144d90866133bd565b6114579190613687565b60008781526002602090815260408083208484529091529020549091506114a2576114836001836133a5565b6000878152600260209081526040808320858452909152902081905591505b826114ac8161366c565b9350505061142e565b5050506000918252506008602090815260408083208490556007909152902055565b6000546001600160a01b0316331461151f5760405162461bcd60e51b815260206004820181905260248201526000805160206138b483398151915260448201526064016102fb565b604080514260208201524491810191909152606081018390526080810182905260009060a00160408051601f198184030181528282528051602091820120600087815260038352838120878252835283812080548085028701850190955284865291955093849390928301828280156115df57602002820191906000526020600020906000905b82829054906101000a900461ffff1661ffff16815260200190600201906020826001010492830192600103820291508084116115a65790505b505083519394506000925050508161165e5760405162461bcd60e51b8152602060048201526024808201527f74656d70206c656e6774682073686f756c64206265206d6f7265207468616e2060448201527f7a65726f0000000000000000000000000000000000000000000000000000000060648201526084016102fb565b60005b835181101561179c57826116768260016133a5565b61168390620186a06134bc565b61168d90886133bd565b6116979190613687565b91508382815181106116ab576116ab6136c7565b602002602001015161ffff16856116c291906133a5565b60008981526004602090815260408083208b84528252808320815180830190925261ffff8086168352878116838501908152825460018181018555938752948620935193909401805494518216620100000263ffffffff19909516939091169290921792909217905591965090859061173b90866134db565b8151811061174b5761174b6136c7565b6020026020010151905080858481518110611768576117686136c7565b61ffff909216602092830291909101909101526117866001856134db565b93505080806117949061366c565b915050611661565b5050505050505050565b6060816117e657505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b811561181057806117fa8161366c565b91506118099050600a836133bd565b91506117ea565b60008167ffffffffffffffff81111561182b5761182b6136dd565b6040519080825280601f01601f191660200182016040528015611855576020820181803683370190505b5090505b84156118d85761186a6001836134db565b9150611877600a86613687565b6118829060306133a5565b60f81b818381518110611897576118976136c7565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506118d1600a866133bd565b9450611859565b949350505050565b6060816040516020016118f39190613193565b6040516020818303038152906040529050919050565b606081516000141561192957505060408051602081019091526000815290565b6000604051806060016040528060408152602001613874604091399050600060038451600261195891906133a5565b61196291906133bd565b61196d9060046134bc565b9050600061197c8260206133a5565b67ffffffffffffffff811115611994576119946136dd565b6040519080825280601f01601f1916602001820160405280156119be576020820181803683370190505b509050818152600183018586518101602084015b81831015611a2c5760039283018051603f601282901c811687015160f890811b8552600c83901c8216880151811b6001860152600683901c8216880151811b60028601529116860151901b938201939093526004016119d2565b600389510660018114611a465760028114611a7257611a9a565b7f3d3d000000000000000000000000000000000000000000000000000000000000600119830152611a9a565b7f3d000000000000000000000000000000000000000000000000000000000000006000198301525b509398975050505050505050565b6000828152600260209081526040808320868452909152902054606090818115611cb45760008581526006602090815260408083208584529091528082208151808301909252805482908290611afd90613631565b80601f0160208091040260200160405190810160405280929190818152602001828054611b2990613631565b8015611b765780601f10611b4b57610100808354040283529160200191611b76565b820191906000526020600020905b815481529060010190602001808311611b5957829003601f168201915b50505050508152602001600182018054611b8f90613631565b80601f0160208091040260200160405190810160405280929190818152602001828054611bbb90613631565b8015611c085780601f10611bdd57610100808354040283529160200191611c08565b820191906000526020600020905b815481529060010190602001808311611beb57829003601f168201915b505050505081525050905060008160200151511115611c33578051611c2c906118e0565b9150611c4b565b611c4885611c426001866134db565b8861217d565b91505b6040518060c00160405280609d81526020016137d7609d913982611c6f888a612292565b6040518060600160405280603a81526020016138d4603a9139604051602001611c9b9493929190612bca565b60405160208183030381529060405293505050506118d8565b6040518060c00160405280609d81526020016137d7609d9139905060005b84811015611d345781611cff828a8481518110611cf157611cf16136c7565b60200260200101518961217d565b604051602001611d10929190612b58565b60405160208183030381529060405291508080611d2c9061366c565b915050611cd2565b5080611d408688612292565b6040518060600160405280603a81526020016138d4603a9139604051602001611d6b93929190612b87565b60405160208183030381529060405292505050949350505050565b600084815260026020908152604080832084845290915290205460609081908015611f715760008781526006602090815260408083208484529091528082208151808301909252805482908290611ddc90613631565b80601f0160208091040260200160405190810160405280929190818152602001828054611e0890613631565b8015611e555780601f10611e2a57610100808354040283529160200191611e55565b820191906000526020600020905b815481529060010190602001808311611e3857829003601f168201915b50505050508152602001600182018054611e6e90613631565b80601f0160208091040260200160405190810160405280929190818152602001828054611e9a90613631565b8015611ee75780601f10611ebc57610100808354040283529160200191611ee7565b820191906000526020600020905b815481529060010190602001808311611eca57829003601f168201915b505050505081525050905060008160200151511115611f3457611f0a8789612398565b602080830151604051611f1e939201612c21565b6040516020818303038152906040529250611f6b565b611f49611f426001846134db565b888a612437565b604051602001611f599190612b3c565b60405160208183030381529060405292505b50611fd8565b60005b86811015611fd65782611fa18a8381518110611f9257611f926136c7565b6020026020010151838b612437565b604051602001611fb2929190612b58565b60405160208183030381529060405292508080611fce9061366c565b915050611f74565b505b81611fe58660ff166117a6565b604051602001611ff6929190613053565b6040516020818303038152906040529250505095945050505050565b60608060005b60095481101561214c5760006001600160a01b031660098281548110612040576120406136c7565b6000918252602090912001546001600160a01b03161461213a57816009828154811061206e5761206e6136c7565b6000918252602090912001546040517f7477efa400000000000000000000000000000000000000000000000000000000815260048101889052602481018790526001600160a01b0390911690637477efa49060440160006040518083038186803b1580156120db57600080fd5b505afa1580156120ef573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261211791908101906128fe565b604051602001612128929190612b58565b60405160208183030381529060405291505b806121448161366c565b915050612018565b5080511561054657806040516020016121659190612d0c565b60405160208183030381529060405290509392505050565b60008181526001602090815260408083208684529091528120546060916001600160a01b039091169061225d826121b3876117a6565b6040516020016121c39190612d35565b60408051601f198184030181529082905260206024830152600060448301529060640160408051601f19818403018152908290529161220191612b3c565b6040519081900390206020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090921691909117905261249d565b80519091501561227957612270816118e0565b92505050610546565b6040518060200160405280600081525092505050610546565b60608060005b6009548110156123905781600982815481106122b6576122b66136c7565b6000918252602090912001546040517fed6f29ca00000000000000000000000000000000000000000000000000000000815260048101889052602481018790526001600160a01b039091169063ed6f29ca9060440160006040518083038186803b15801561232357600080fd5b505afa158015612337573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261235f91908101906128fe565b604051602001612370929190612b58565b60408051601f1981840301905252806123888161366c565b915050612298565b509392505050565b60008181526001602090815260408083208584528252808320549051602481019290925260448201929092526060916001600160a01b0316906118d890829060640160408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f2c35c08c0000000000000000000000000000000000000000000000000000000017905261249d565b60606000612446848685612569565b9050805160001415612468575050604080516020810190915260008152610546565b6124728484612398565b81604051602001612484929190612c21565b6040516020818303038152906040529150509392505050565b6060600080846001600160a01b0316846040516124ba9190612b3c565b600060405180830381855afa9150503d80600081146124f5576040519150601f19603f3d011682016040523d82523d6000602084013e6124fa565b606091505b50915091508161254c5760405162461bcd60e51b815260206004820152601260248201527f6661696c656420746f206765742064617461000000000000000000000000000060448201526064016102fb565b8080602001905181019061256091906128fe565b95945050505050565b60008181526001602090815260408083208684529091529020546060906001600160a01b03166125608161259c866117a6565b6040516020016121c39190612cbb565b8280548282559060005260206000209081019282156125e7579160200282015b828111156125e75782518255916020019190600101906125cc565b506125f392915061269b565b5090565b82805482825590600052602060002090600f016010900481019282156125e75791602002820160005b8382111561266457833561ffff1683826101000a81548161ffff021916908361ffff1602179055509260200192600201602081600101049283019260010302612620565b80156126925782816101000a81549061ffff0219169055600201602081600101049283019260010302612664565b50506125f39291505b5b808211156125f3576000815560010161269c565b80356001600160a01b03811681146126c757600080fd5b919050565b600082601f8301126126dd57600080fd5b81356126f06126eb8261337d565b61334c565b81815284602083860101111561270557600080fd5b816020850160208301376000918101602001919091529392505050565b600060a0828403121561273457600080fd5b60405160a0810167ffffffffffffffff8282108183111715612758576127586136dd565b81604052829350843583526020850135602084015260408501356040840152606085013591508082111561278b57600080fd5b612797868387016126cc565b606084015260808501359150808211156127b057600080fd5b506127bd858286016126cc565b6080830152505092915050565b80356fffffffffffffffffffffffffffffffff811681146126c757600080fd5b803560ff811681146126c757600080fd5b60006020828403121561280d57600080fd5b610546826126b0565b6000806040838503121561282957600080fd5b612832836126b0565b91506020830135801515811461284757600080fd5b809150509250929050565b6000806040838503121561286557600080fd5b61286e836126b0565b946020939093013593505050565b6000806000806060858703121561289257600080fd5b843567ffffffffffffffff808211156128aa57600080fd5b818701915087601f8301126128be57600080fd5b8135818111156128cd57600080fd5b8860208260051b85010111156128e257600080fd5b6020928301999098509187013596604001359550909350505050565b60006020828403121561291057600080fd5b815167ffffffffffffffff81111561292757600080fd5b8201601f8101841361293857600080fd5b80516129466126eb8261337d565b81815285602083850101111561295b57600080fd5b612560826020830160208601613601565b6000806040838503121561297f57600080fd5b823567ffffffffffffffff81111561299657600080fd5b83016040818603121561286e57600080fd5b600080604083850312156129bb57600080fd5b823567ffffffffffffffff808211156129d357600080fd5b90840190606082870312156129e757600080fd5b604051606081018181108382111715612a0257612a026136dd565b604052612a0e836127ca565b8152612a1c602084016127ea565b6020820152604083013582811115612a3357600080fd5b612a3f888286016126cc565b60408301525093506020850135915080821115612a5b57600080fd5b50612a6885828601612722565b9150509250929050565b600080600060608486031215612a8757600080fd5b612a90846127ca565b95602085013595506040909401359392505050565b60008060408385031215612ab857600080fd5b50508035926020909101359150565b60008060008060808587031215612add57600080fd5b5050823594602084013594506040840135936060013592509050565b600080600060608486031215612b0e57600080fd5b612b17846127ea565b9250612b25602085016127ea565b9150612b33604085016126b0565b90509250925092565b60008251612b4e818460208701613601565b9190910192915050565b60008351612b6a818460208801613601565b835190830190612b7e818360208801613601565b01949350505050565b60008451612b99818460208901613601565b845190830190612bad818360208901613601565b8451910190612bc0818360208801613601565b0195945050505050565b60008551612bdc818460208a01613601565b855190830190612bf0818360208a01613601565b8551910190612c03818360208901613601565b8451910190612c16818360208801613601565b019695505050505050565b7f7b2274726169745f74797065223a202200000000000000000000000000000000815260008351612c59816010850160208801613601565b7f222c2276616c7565223a202200000000000000000000000000000000000000006010918401918201528351612c9681601c840160208801613601565b61227d60f01b601c9290910191820152600b60fa1b601e820152601f01949350505050565b7f6e616d6500000000000000000000000000000000000000000000000000000000815260008251612cf3816004850160208701613601565b61282960f01b6004939091019283015250600601919050565b600b60fa1b815260008251612d28816001850160208701613601565b9190910160010192915050565b7f7472616974000000000000000000000000000000000000000000000000000000815260008251612d6d816005850160208701613601565b61282960f01b6005939091019283015250600701919050565b693d913730b6b2911d101160b11b815260008651612dab81600a850160208b01613601565b7f222c20226465736372697074696f6e223a202200000000000000000000000000600a918401918201528651612de881601d840160208b01613601565b6c1116101134b6b0b3b2911d101160991b601d92909101918201527f646174613a696d6167652f7376672b786d6c3b6261736536342c000000000000602a8201528551612e3c816044840160208a01613601565b7f222c000000000000000000000000000000000000000000000000000000000000604492909101918201528451612e7a816046840160208901613601565b8451910190612e90816046840160208801613601565b612eee612ec56046838501017f5d00000000000000000000000000000000000000000000000000000000000000815260010190565b7f7d00000000000000000000000000000000000000000000000000000000000000815260010190565b9998505050505050505050565b693d913730b6b2911d101160b11b815260008551612f2081600a850160208a01613601565b7f222c20226465736372697074696f6e223a202200000000000000000000000000600a918401918201528551612f5d81601d840160208a01613601565b6c1116101134b6b0b3b2911d101160991b601d92909101918201527f646174613a696d6167652f7376672b786d6c3b6261736536342c000000000000602a8201528451612fb1816044840160208901613601565b7f222c2261747472696275746573223a205b7b2274726169745f74797065223a20604492909101918201527f224c6576656c222c202276616c7565223a20220000000000000000000000000060648201528351613015816077840160208801613601565b6130476077828401017f227d5d7d00000000000000000000000000000000000000000000000000000000815260040190565b98975050505050505050565b7f2261747472696275746573223a205b000000000000000000000000000000000081526000835161308b81600f850160208801613601565b7f7b2274726169745f74797065223a20224c6576656c222c202276616c7565223a600f918401918201527f2022000000000000000000000000000000000000000000000000000000000000602f82015283516130ee816031840160208801613601565b61227d60f01b60319290910191820152603301949350505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c00000081526000825161314181601d850160208701613601565b91909101601d0192915050565b7f50686f656e697820230000000000000000000000000000000000000000000000815260008251613186816009850160208701613601565b9190910160090192915050565b7f3c696d61676520783d22302220793d2230222077696474683d2234382220686581527f696768743d2234382220786c696e6b3a687265663d22646174613a696d61676560208201527f2f706e673b6261736536342c000000000000000000000000000000000000000060408201526000825161321781604c850160208701613601565b7f222f3e0000000000000000000000000000000000000000000000000000000000604c939091019283015250604f01919050565b6020808252825182820181905260009190848201906040850190845b8181101561328757835161ffff1683529284019291840191600101613267565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b81811015613287578351835292840192918401916001016132af565b60208152600082518060208401526132ea816040850160208701613601565b601f01601f19169190910160400192915050565b6000808335601e1984360301811261331557600080fd5b83018035915067ffffffffffffffff82111561333057600080fd5b60200191503681900382131561334557600080fd5b9250929050565b604051601f8201601f1916810167ffffffffffffffff81118282101715613375576133756136dd565b604052919050565b600067ffffffffffffffff821115613397576133976136dd565b50601f01601f191660200190565b600082198211156133b8576133b861369b565b500190565b6000826133cc576133cc6136b1565b500490565b600181815b8085111561340c5781600019048211156133f2576133f261369b565b808516156133ff57918102915b93841c93908002906133d6565b509250929050565b6000610546838360008261342a57506001610b5c565b8161343757506000610b5c565b816001811461344d576002811461345757613473565b6001915050610b5c565b60ff8411156134685761346861369b565b50506001821b610b5c565b5060208310610133831016604e8410600b8410161715613496575081810a610b5c565b6134a083836133d1565b80600019048211156134b4576134b461369b565b029392505050565b60008160001904831182151516156134d6576134d661369b565b500290565b6000828210156134ed576134ed61369b565b500390565b601f82111561353c57600081815260208120601f850160051c810160208610156135195750805b601f850160051c820191505b8181101561353857828155600101613525565b5050505b505050565b67ffffffffffffffff831115613559576135596136dd565b61356d836135678354613631565b836134f2565b6000601f8411600181146135a157600085156135895750838201355b600019600387901b1c1916600186901b178355610d7f565b600083815260209020601f19861690835b828110156135d257868501358255602094850194600190920191016135b2565b50868210156135ef5760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b60005b8381101561361c578181015183820152602001613604565b8381111561362b576000848401525b50505050565b600181811c9082168061364557607f821691505b6020821081141561366657634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156136805761368061369b565b5060010190565b600082613696576136966136b1565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6136fd82836132fe565b67ffffffffffffffff811115613715576137156136dd565b613729816137238554613631565b856134f2565b6000601f82116001811461375d57600083156137455750838201355b600019600385901b1c1916600184901b1785556137b7565b600085815260209020601f19841690835b8281101561378e578685013582556020948501946001909201910161376e565b50848210156137ab5760001960f88660031b161c19848701351681555b505060018360011b0185555b505050506137c860208301836132fe565b61362b81836001860161354156fe3c7376672069643d2270686f656e6978222077696474683d223130302522206865696768743d2231303025222076657273696f6e3d22312e31222076696577426f783d223020302034382034382220786d6c6e733d22687474703a2f2f7777772e77332e6f72672f323030302f7376672220786d6c6e733a786c696e6b3d22687474703a2f2f7777772e77332e6f72672f313939392f786c696e6b223e4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65723c7374796c653e2370686f656e69787b696d6167652d72656e646572696e673a20706978656c617465643b7d3c2f7374796c653e3c2f7376673ea2646970667358221220768ad3e04cba0590b24b3a14dddeccfc59814799081996ffec2e32f7f2df8e7964736f6c63430008070033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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

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