false
false
0

Contract Address Details

0x3d4B0EAcAA1469e82922F4F4d5CE565dAF30A6Fb

Contract Name
MediaRegistry
Creator
0xebe894–7a24f6 at 0xeeb29b–8e3654
Balance
0 CLO
Tokens
Fetching tokens...
Transactions
22 Transactions
Transfers
0 Transfers
Gas Used
4,861,766
Last Balance Update
16289913
Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
Contract name:
MediaRegistry




Optimization enabled
true
Compiler version
v0.8.16+commit.07a7930e




Optimization runs
200
EVM Version
default




Verified at
2024-10-17T00:57:03.153820Z

Contract source code

// SPDX-License-Identifier: GPL-3.0-only
// author: Upaut (CallistoDAO)

pragma solidity ^0.8.16;

contract MediaRegistry {

    struct Data {
        uint256 timeVoice; // deadline for the second voter. After this period vote will be accepted/declined based on the decision of the first voter.
        uint256 timeEnd; // deadline for this proposal 
        bool governanceDAO; // DAO vote 
        bool callistoNetwork; // Second party(Dexaran) vote
    }

    struct Group{ // структура описывающая группу
        uint64 id; // идентификатор группы
        uint64 elem; // количество медиаресурсов в группе
        uint64 next; // указатель на следующую группу
        uint64 prev; // указатель на предыдущую группу
        string name; // название группы (имена групп и медиаресурсов должны быть уникальны)
        string icon; // ipfs ссылка на иконку группы
    }

    struct Resource{ // структура описывающая медиаресурс
        uint64 id; // идентификатор медиаресурса
        uint64 parent; // ID родительской группы
        uint64 next; // указатель на следующий медиаресурс
        uint64 prev; // указатель на предыдущий медиаресурс
        string name; // название медиаресурса (имена групп и медиаресурсов должны быть уникальны)
        string link; // ссылка на медиаресурс
        string metadata; // описание ресурса
        string icon; // ipfs ссылка на иконку группы
    }    

    uint256 public TimeVoice = 45 days; // time to wait for the second voter. After this period proposal will be accepted/declined based on the decision of the first voter.
    uint256 public TimeEnd = 60 days; // how long each proposal will be active
    uint64 id; // хранит последний порядковый номер ID выделяемый для новых групп и медиаресурсов (увеличивается на 1 каждый раз когда добавляются новые группы и медиаресурсы)

    address public GovernanceDAO = 0xeBE894814554c8382EA6a24CcDdf1527407A24f6; // DAO vote address
    address public CallistoNetwork = 0xfc8f3324B6D71d14BfD625ECdbD18f3bc29A9935; // Second party(Dexaran)  vote address    
    //address public GovernanceDAO = 0x810059e1406dEDAFd1BdCa4E0137CbA306c0Ce36; // DAO vote address
    //address public CallistoNetwork = 0xA9389DB4610175CaC4Fad32670A5189A89f874B5; // Second party(Dexaran)  vote address  

    mapping(bytes32 => Data) public proposals; // temporary storage for active proposals indexed by hashes
    mapping(bytes32 => uint64) private ids; // сопоставление хешей уникальных имен с id
    mapping(bytes32  => bool) private official_links; // для обратной совместимости со старым сайтом проверки официальности
    mapping(uint64 => Group) private groups; // двухсвязный список всех групп
    mapping(uint64 => mapping(uint64 => Resource)) private resources; // двухсвязные списки ресурсов закрепленные за группами

    event Proposal(address indexed owner, bytes32 indexed hash, bool indexed voice); // new proposal event

    modifier onlyDAOorCN() {
        require((msg.sender == CallistoNetwork) || (msg.sender == GovernanceDAO), "Only DAO or CN");
        _;
    }



    // Достижение консенсуса для создания новой группы
    function createGroup(string memory _name, string memory _icon, bool _voice) external onlyDAOorCN {
        require(bytes(_name).length != 0); // Имя новой группы не должно быть пустой строкой
        require(_getID(_name) == 0); // Имя новой группы должно быть свободно
        bytes4 _selector = this.createGroup.selector;
        bytes32 _hash = keccak256(abi.encodePacked(_selector, _name, _icon)); // proposal hash
        if(_consensus(_hash, _voice)){ // proposal accepted
            _createGroup(_name, _icon);
        }
        emit Proposal(msg.sender, _hash, _voice); // proposal event for logging
    }

    // Создание новой группы
    function _createGroup(string memory _name, string memory _icon) private {
        id++; // уникальный идентификатор новой группы
        ids[_getHash(_name)] = id; // сопоставление хеша имени группы с id
        groups[id] = Group(id, 0, 0, groups[0].prev, _name, _icon); // инициализация новой группы с добавлением ее в список групп
        groups[groups[0].prev].next = id; // последний элемент списка ссылается на созданную группу
        groups[0].prev = id; // замыкаем двухсвязный список групп в круг
        groups[0].elem++; // увеличиваем общее количество групп
    }



    // Достижение консенсуса для изменения имени указанной группы + замена иконки группы
    function renameGroup(string memory _name, string memory _new_name, string memory _new_icon, bool _voice) external onlyDAOorCN {
        uint64 _id = _getID(_name);
        require(groups[_id].id > 0); // группа которая подлежит переименованию должна существовать
        require(_getID(_new_name) == 0); // Имя новой группы должно быть свободно
        bytes4 _selector = this.renameGroup.selector;
        bytes32 _hash = keccak256(abi.encodePacked(_selector, _name, _new_name, _new_icon)); // proposal hash
        if(_consensus(_hash, _voice)){ // proposal accepted
            _renameGroup(_id, _name, _new_name, _new_icon);
        }
        emit Proposal(msg.sender, _hash, _voice); // proposal event for logging
    }

    // Изменение имени группы + замена иконки группы
    function _renameGroup(uint64 _id, string memory _name, string memory _new_name, string memory _new_icon) private {
        ids[_getHash(_new_name)] = _id; // сопоставление хеша имени группы с id
        groups[_id].name = _new_name;
        groups[_id].icon = _new_icon;
        delete ids[_getHash(_name)]; // убираем сопоставление хеша старого имени группы с id
    }



    // Достижение консенсуса для перемещения группы в позицию после группы указаной в _after_name
    function moveGroup(string memory _name, string memory _after_name, bool _voice) external onlyDAOorCN {
        uint64 _id = _getID(_name); // id перемещаемой группы
        uint64 _after_id = _getID(_after_name); // id группы, после которой будет расположена перемещаемая группа
        require(_id != _after_id); // группы должны быть разными
        require((groups[_id].id > 0) && (groups[_after_id].id > 0)); // группы должны существовать
        bytes4 _selector = this.moveGroup.selector;
        bytes32 _hash = keccak256(abi.encodePacked(_selector, _name, _after_name)); // proposal hash
        if(_consensus(_hash, _voice)){ // proposal accepted
            _moveGroup(_id, _after_id);
        }
        emit Proposal(msg.sender, _hash, _voice); // proposal event for logging
    }

    // Перемещение группы в новую позицию
    function _moveGroup(uint64 _id, uint64 _after_id) private {
        groups[groups[_id].prev].next = groups[_id].next;
        groups[groups[_id].next].prev = groups[_id].prev;
        groups[_id].next = groups[_after_id].next;
        groups[_id].prev = _after_id;
        groups[_after_id].next = _id;
        groups[groups[_id].next].prev = _id;
    }



    // Достижение консенсуса для удаления указанной группы (группа удаляется со всеми ее медиа ресурсами)
    function deleteGroup(string memory _name, bool _voice) external onlyDAOorCN {
        uint64 _id = _getID(_name);
        require(groups[_id].id > 0); // группа которая подлежит удалению должна существовать
        bytes4 _selector = this.deleteGroup.selector;
        bytes32 _hash = keccak256(abi.encodePacked(_selector, _name)); // proposal hash
        if(_consensus(_hash, _voice)){ // proposal accepted
            ids[_getHash(_name)] = 0; // удаляем сопоставление хеша имени группы с id
            _deleteGroup(_id);
        }
        emit Proposal(msg.sender, _hash, _voice); // proposal event for logging
    }

    // Удаление группы (группа удаляется со всеми ее медиа ресурсами)
    function _deleteGroup(uint64 _id) private {
        // убираем группу из списка групп
        groups[groups[_id].prev].next = groups[_id].next;
        groups[groups[_id].next].prev = groups[_id].prev;
        // удаляем все связанные с группой ресурсы
        uint64 _id_res = resources[_id][0].next; // получаем id первого ресурса группы
        delete resources[_id][0];
        for(uint i; i < groups[_id].elem; i++){
            uint64 _id_next = resources[_id][_id_res].next;
            ids[_getHash(resources[_id][_id_res].name)] = 0; // удаляем сопоставление хеша имени медиаресурса с id
            official_links[_getHash(resources[_id][_id_res].link)] = false;
            delete resources[_id][_id_res];
            _id_res = _id_next;
        }
        groups[0].elem--; // уменьшаем общее количество групп
        delete groups[_id]; // удаляем группу
    }



    // Достижение консенсуса для создания нового медиаресурса
    function createResource(string memory _group, string memory _name, string memory _link, string memory _metadata, string memory _icon, bool _voice) external onlyDAOorCN {
        uint64 _id_group = _getID(_group);
        require(groups[_id_group].id > 0); // группа в которой создается ресурс должна существовать
        require(bytes(_name).length != 0); // Имя нового медиаресурса не должно быть пустой строкой
        require(_getID(_name) == 0); // Имя создаваемого ресурса должно быть свободно
        require(bytes(_link).length != 0); // ссылка на медиаресурс не должна быть пустой строкой
        require(!official_links[_getHash(_link)]); // ссылка на ресурс должна быть свободной
        bytes4 _selector = this.createResource.selector;
        bytes32 _hash = keccak256(abi.encodePacked(_selector, _group, _name, _link, _metadata, _icon)); // proposal hash
        if(_consensus(_hash, _voice)){ // proposal accepted
            _createResource(_id_group, _name, _link, _metadata, _icon);
        }
        emit Proposal(msg.sender, _hash, _voice); // proposal event for logging
    }

    // Создание нового медиаресурса
    function _createResource(uint64 _id_group, string memory _name, string memory _link, string memory _metadata, string memory _icon) private {
        id++; // уникальный идентификатор нового медиаресурса
        ids[_getHash(_name)] = id; // сопоставление хеша имени медиаресурса с id
        resources[_id_group][id] = Resource(id, _id_group, 0, resources[_id_group][0].prev, _name, _link, _metadata, _icon);
        resources[_id_group][resources[_id_group][0].prev].next = id;
        resources[_id_group][0].prev = id;
        groups[_id_group].elem++; // увеличиваем общее количество медиаресурсов входящих в группу
        official_links[_getHash(_link)] = true;
    }



    // Достижение консенсуса для перемещение медиаресурса в указанную группу с указанием позиции вставки.
    // Новая позиция вставки будет после медиаресурса указанного в _after_name
    function moveResource(string memory _from_group, string memory _name, string memory _in_group, string memory _after_name, bool _voice) external onlyDAOorCN {
        uint64 _fromGroupID = _getID(_from_group); // получаем ID группы с перемещаемым медиаресурсом
        uint64 _id = _getID(_name); // id перемещаемого медиаресурса
        uint64 _inGroupID = _getID(_in_group); // получаем ID группы куда будет перемещен медиаресурс
        uint64 _after_id = _getID(_after_name); // id медиаресурса, после которого будет расположен перемещаемаемый медиаресурс
        require(_id != _after_id); // медиаресурсы должны быть разными
        require((resources[_fromGroupID][_id].id > 0) && (resources[_inGroupID][_after_id].id > 0)); // медиаресурсы в указанных группах должны существовать
        bytes4 _selector = this.moveResource.selector;
        bytes32 _hash = keccak256(abi.encodePacked(_selector, _from_group, _name, _in_group, _after_name)); // proposal hash
        if(_consensus(_hash, _voice)){ // proposal accepted
            _moveResource(_fromGroupID, _id, _inGroupID, _after_id);
        }
        emit Proposal(msg.sender, _hash, _voice); // proposal event for logging
    }

    // Перемещение медиаресурса в указанную группу с указанием позиции
    function _moveResource(uint64 _fromGroupID, uint64 _id, uint64 _inGroupID, uint64 _after_id) private {
        // отвязываем медиаресурс в исходной группе
        resources[_fromGroupID][resources[_fromGroupID][_id].prev].next = resources[_fromGroupID][_id].next;
        resources[_fromGroupID][resources[_fromGroupID][_id].next].prev = resources[_fromGroupID][_id].prev;
        resources[_inGroupID][_id] = resources[_fromGroupID][_id]; // копируем медиаресурс в принимающую группу
        resources[_inGroupID][_id].parent = _inGroupID; // меняем ID родительской группы        
        // привязываем медиаресурс в принимающей группе
        resources[_inGroupID][_id].next = resources[_inGroupID][_after_id].next;
        resources[_inGroupID][_id].prev = _after_id;
        resources[_inGroupID][_after_id].next = _id;
        resources[_inGroupID][resources[_inGroupID][_id].next].prev = _id;
        groups[_fromGroupID].elem--; // уменьшаем количество медиаресурсов в исходящей группе
        groups[_inGroupID].elem++; // увеличиваем количество медиаресурсов в принимающей группе
        delete resources[_fromGroupID][_id]; // удаляем медиаресурс из исходящей группы
    }



    // Достижение консенсуса для удаления медиаресурса в группе
    function deleteResource(string memory _from_group, string memory _name, bool _voice) external onlyDAOorCN {
        uint64 _fromGroupID = _getID(_from_group); // получаем ID группы
        uint64 _id = _getID(_name); // id медиаресурса
        require(resources[_fromGroupID][_id].id > 0); // медиаресурс в группе должен существовать
        bytes4 _selector = this.deleteResource.selector;
        bytes32 _hash = keccak256(abi.encodePacked(_selector, _from_group, _name)); // proposal hash
        if(_consensus(_hash, _voice)){ // proposal accepted
            ids[_getHash(_name)] = 0; // удаляем сопоставление хеша имени медиаресурса с id
            _deleteResource(_fromGroupID, _id);
        }
        emit Proposal(msg.sender, _hash, _voice); // proposal event for logging
    }

    // Перемещение медиаресурса в указанную группу с указанием позиции
    function _deleteResource(uint64 _fromGroupID, uint64 _id) private {
        // отвязываем медиаресурс в группе
        resources[_fromGroupID][resources[_fromGroupID][_id].prev].next = resources[_fromGroupID][_id].next;
        resources[_fromGroupID][resources[_fromGroupID][_id].next].prev = resources[_fromGroupID][_id].prev;
        official_links[_getHash(resources[_fromGroupID][_id].link)] = false; // ссылка больше неофициальная
        groups[_fromGroupID].elem--; // уменьшаем количество медиаресурсов в группе
        delete resources[_fromGroupID][_id]; // удаляем медиаресурс из группы
    }



    // Возвращаем количество созданных групп
    function totalGroups() public view returns (uint64){
        return (groups[0].elem);
    }

    // Возвращаем группу по ее имени
    function getGroup(string memory _name) public view returns (Group memory){
        return (groups[_getID(_name)]);
    }

    // Возвращаем медиаресурс по его имени и имени группы где он расположен
    function getResource(string memory _group_name, string memory _resource_name) public view returns (Resource memory){
        return (resources[_getID(_group_name)][_getID(_resource_name)]);
    }

    // Возвращаем массив с запрашиваемым количеством групп, начиная со следующего ID после запрошенного в _id_start
    // Для возврата списка групп с самого начала укажите _id_start = 0
    // Функция создана для удобных порционных запросов из Frontend
    function getGroups(uint64 _id_start, uint64 _amount) public view returns (Group[] memory){
        _id_start = groups[_id_start].next; // получаем ID следующей группы
        if(_id_start == 0) return (new Group[](1)); // если стартовый ID не существует или он последний элемент списка
        Group[] memory result = new Group[](_amount);
        for(uint64 i; i < _amount; i++){
            if(_id_start == 0) break;
            result[i] = groups[_id_start];
            _id_start = groups[_id_start].next;
        }
        return (result); // возвращаем массив с группами
    }


    // Возвращаем массив с запрашиваемым количеством медиаресурсов, начиная с группы указаной в _id_group_start и медиаресорсом указанным после _id_resource_start
    // Для возврата списка медиаресурсов с самого начала укажите _id_group_start = 0 и _id_resource_start = 0
    // Функция создана для удобных порционных запросов из Frontend
    function getResources(uint64 _id_group_start, uint64 _id_resource_start, uint64 _amount) public view returns (Resource[] memory){
        _id_group_start = _id_group_start > 0 ? _id_group_start : groups[_id_group_start].next; // определяем стартовую группу
        _id_resource_start = resources[_id_group_start][_id_resource_start].next;
        if(_id_resource_start == 0){ // если ID медиаресурса не существует или список был закончен
            _id_group_start = groups[_id_group_start].next; // переходим к следующей группе
            _id_resource_start = resources[_id_group_start][0].next; // переходим к первому ресурсу в группе
            if((_id_group_start == 0) && (_id_resource_start == 0)) return (new Resource[](1));
        }
        Resource[] memory result = new Resource[](_amount);
        uint64 _index;
        while((_id_group_start > 0) && (_index < _amount)){ // перебираем все медиаресурсы пока имеются родительские группы и не набрано запрошенное количество медиаресурсов
            if(_id_resource_start == 0){ // если в текущей группе больше нет медиаресурсов
                _id_group_start = groups[_id_group_start].next; // переходим к следующей группе
                _id_resource_start = resources[_id_group_start][0].next; // переходим к первому ресурсу в группе
                continue;
            }
            result[_index++] = resources[_id_group_start][_id_resource_start];
            _id_resource_start = resources[_id_group_start][_id_resource_start].next; // переходим к первому ресурсу в группе
        }
        return (result); // возвращаем массив с медиаресурсами
    }



    // Проверка ссылки на официальность (для обратной совместимости со старым сайтом)
    function is_official(string memory _link) public view returns (bool){
        return official_links[_getHash(_link)];
    }

    // Updates time limits for future proposals
    function setPeriods(uint256 _timeVoice, uint256 _timeEnd, bool _voice) external onlyDAOorCN {
        require((_timeVoice > 0) && (_timeEnd > _timeVoice));
        bytes4 _selector = this.setPeriods.selector;
        bytes32 _hash = keccak256(abi.encodePacked(_selector, _timeVoice, _timeEnd)); // proposal hash
        if(_consensus(_hash, _voice)){ // proposal accepted
            TimeVoice = _timeVoice;
            TimeEnd = _timeEnd;
        }
        emit Proposal(msg.sender, _hash, _voice); // proposal event for logging
    }

    // Updates GovernanceDAO or Second party(Dexaran)  owner address. Sender must be current owner and can change only it's own address
    function setNewOwners(address _newOwner) external onlyDAOorCN {
        require((_newOwner != GovernanceDAO) && (_newOwner != CallistoNetwork));
        (GovernanceDAO, CallistoNetwork) = msg.sender == GovernanceDAO ? (_newOwner, CallistoNetwork) : (GovernanceDAO, _newOwner);
    }

    // Updates GovernanceDAO or Second party(Dexaran)  owner address. Owners can update address of each other if other party did not decline such proposal
    function resetOwner(address _owner, address _newOwner, bool _voice) external onlyDAOorCN {
        require((_owner == GovernanceDAO) || (_owner == CallistoNetwork));
        require((_newOwner != GovernanceDAO) && (_newOwner != CallistoNetwork));

        bytes4 _selector = this.resetOwner.selector;
        bytes32 _hash = keccak256(abi.encodePacked(_selector, _owner, _newOwner)); // proposal hash
        if(_consensus(_hash, _voice)){ // proposal accepted
            (GovernanceDAO, CallistoNetwork) = _owner == GovernanceDAO ? (_newOwner, CallistoNetwork) : (GovernanceDAO, _newOwner);
        }
        emit Proposal(msg.sender, _hash, _voice); // proposal event for logging
    }


    function _getHash(string memory _name) private pure returns (bytes32){ // возвращает хеш уникального имени
        return (keccak256(abi.encodePacked(_name)));
    }

    function _getID(string memory _name) private view returns (uint64){ // возвращает ID присвоенное уникальному имени
        return (ids[_getHash(_name)]);
    }    

    // this function calculates consensus, returns true if proposal accepted
    function _consensus(bytes32 _hash, bool _voice) private returns (bool){
        if (proposals[_hash].timeEnd < block.timestamp){ // proposal expired or never existed before, let's create it
            delete proposals[_hash];
            if (!_voice) return (false); // do nothing if we are declining proposal
            proposals[_hash].timeVoice = block.timestamp + TimeVoice; // time limit for second voter
            proposals[_hash].timeEnd = block.timestamp + TimeEnd; // proposal time limit
            (proposals[_hash].governanceDAO, proposals[_hash].callistoNetwork) = msg.sender == GovernanceDAO ? (true, false) : (false, true);
        } else if (proposals[_hash].timeVoice < block.timestamp) { // time limit for second voter expired, first voter can accept proposal without second party
            delete proposals[_hash];
            return (true);
        } else { // still waiting for second voter
            if (!_voice) { // proposal declined
                delete proposals[_hash];
            } else {
                (proposals[_hash].governanceDAO, proposals[_hash].callistoNetwork) = msg.sender == GovernanceDAO ? (true, proposals[_hash].callistoNetwork) : (proposals[_hash].governanceDAO, true); // votes
                if ((proposals[_hash].governanceDAO) && (proposals[_hash].callistoNetwork)) { // proposal accepted by both parties
                    delete proposals[_hash]; // clean up
                    return (true);
                }
            }
        }

        return (false);
    }
}
        

Contract ABI

[{"type":"event","name":"Proposal","inputs":[{"type":"address","name":"owner","internalType":"address","indexed":true},{"type":"bytes32","name":"hash","internalType":"bytes32","indexed":true},{"type":"bool","name":"voice","internalType":"bool","indexed":true}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"CallistoNetwork","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"GovernanceDAO","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"TimeEnd","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"TimeVoice","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"createGroup","inputs":[{"type":"string","name":"_name","internalType":"string"},{"type":"string","name":"_icon","internalType":"string"},{"type":"bool","name":"_voice","internalType":"bool"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"createResource","inputs":[{"type":"string","name":"_group","internalType":"string"},{"type":"string","name":"_name","internalType":"string"},{"type":"string","name":"_link","internalType":"string"},{"type":"string","name":"_metadata","internalType":"string"},{"type":"string","name":"_icon","internalType":"string"},{"type":"bool","name":"_voice","internalType":"bool"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"deleteGroup","inputs":[{"type":"string","name":"_name","internalType":"string"},{"type":"bool","name":"_voice","internalType":"bool"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"deleteResource","inputs":[{"type":"string","name":"_from_group","internalType":"string"},{"type":"string","name":"_name","internalType":"string"},{"type":"bool","name":"_voice","internalType":"bool"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"tuple","name":"","internalType":"struct MediaRegistry.Group","components":[{"type":"uint64","name":"id","internalType":"uint64"},{"type":"uint64","name":"elem","internalType":"uint64"},{"type":"uint64","name":"next","internalType":"uint64"},{"type":"uint64","name":"prev","internalType":"uint64"},{"type":"string","name":"name","internalType":"string"},{"type":"string","name":"icon","internalType":"string"}]}],"name":"getGroup","inputs":[{"type":"string","name":"_name","internalType":"string"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"tuple[]","name":"","internalType":"struct MediaRegistry.Group[]","components":[{"type":"uint64","name":"id","internalType":"uint64"},{"type":"uint64","name":"elem","internalType":"uint64"},{"type":"uint64","name":"next","internalType":"uint64"},{"type":"uint64","name":"prev","internalType":"uint64"},{"type":"string","name":"name","internalType":"string"},{"type":"string","name":"icon","internalType":"string"}]}],"name":"getGroups","inputs":[{"type":"uint64","name":"_id_start","internalType":"uint64"},{"type":"uint64","name":"_amount","internalType":"uint64"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"tuple","name":"","internalType":"struct MediaRegistry.Resource","components":[{"type":"uint64","name":"id","internalType":"uint64"},{"type":"uint64","name":"parent","internalType":"uint64"},{"type":"uint64","name":"next","internalType":"uint64"},{"type":"uint64","name":"prev","internalType":"uint64"},{"type":"string","name":"name","internalType":"string"},{"type":"string","name":"link","internalType":"string"},{"type":"string","name":"metadata","internalType":"string"},{"type":"string","name":"icon","internalType":"string"}]}],"name":"getResource","inputs":[{"type":"string","name":"_group_name","internalType":"string"},{"type":"string","name":"_resource_name","internalType":"string"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"tuple[]","name":"","internalType":"struct MediaRegistry.Resource[]","components":[{"type":"uint64","name":"id","internalType":"uint64"},{"type":"uint64","name":"parent","internalType":"uint64"},{"type":"uint64","name":"next","internalType":"uint64"},{"type":"uint64","name":"prev","internalType":"uint64"},{"type":"string","name":"name","internalType":"string"},{"type":"string","name":"link","internalType":"string"},{"type":"string","name":"metadata","internalType":"string"},{"type":"string","name":"icon","internalType":"string"}]}],"name":"getResources","inputs":[{"type":"uint64","name":"_id_group_start","internalType":"uint64"},{"type":"uint64","name":"_id_resource_start","internalType":"uint64"},{"type":"uint64","name":"_amount","internalType":"uint64"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"is_official","inputs":[{"type":"string","name":"_link","internalType":"string"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"moveGroup","inputs":[{"type":"string","name":"_name","internalType":"string"},{"type":"string","name":"_after_name","internalType":"string"},{"type":"bool","name":"_voice","internalType":"bool"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"moveResource","inputs":[{"type":"string","name":"_from_group","internalType":"string"},{"type":"string","name":"_name","internalType":"string"},{"type":"string","name":"_in_group","internalType":"string"},{"type":"string","name":"_after_name","internalType":"string"},{"type":"bool","name":"_voice","internalType":"bool"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"timeVoice","internalType":"uint256"},{"type":"uint256","name":"timeEnd","internalType":"uint256"},{"type":"bool","name":"governanceDAO","internalType":"bool"},{"type":"bool","name":"callistoNetwork","internalType":"bool"}],"name":"proposals","inputs":[{"type":"bytes32","name":"","internalType":"bytes32"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renameGroup","inputs":[{"type":"string","name":"_name","internalType":"string"},{"type":"string","name":"_new_name","internalType":"string"},{"type":"string","name":"_new_icon","internalType":"string"},{"type":"bool","name":"_voice","internalType":"bool"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"resetOwner","inputs":[{"type":"address","name":"_owner","internalType":"address"},{"type":"address","name":"_newOwner","internalType":"address"},{"type":"bool","name":"_voice","internalType":"bool"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setNewOwners","inputs":[{"type":"address","name":"_newOwner","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setPeriods","inputs":[{"type":"uint256","name":"_timeVoice","internalType":"uint256"},{"type":"uint256","name":"_timeEnd","internalType":"uint256"},{"type":"bool","name":"_voice","internalType":"bool"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint64","name":"","internalType":"uint64"}],"name":"totalGroups","inputs":[]}]
              

Contract Creation Code

Verify & Publish
0x6080604052623b5380600055624f1a00600155600280547bebe894814554c8382ea6a24ccddf1527407a24f60000000000000000600160401b600160e01b0319909116179055600380546001600160a01b03191673fc8f3324b6d71d14bfd625ecdbd18f3bc29a993517905534801561007757600080fd5b50613d55806100876000396000f3fe608060405234801561001057600080fd5b50600436106101375760003560e01c8063919cfef6116100b8578063ad91d5401161007c578063ad91d5401461030b578063b885789f1461031e578063c4e986b214610331578063c75f28931461033a578063e6b0c04614610381578063f201631e146103a457600080fd5b8063919cfef6146102805780639ca85bf014610293578063a30013e1146102c5578063abef281e146102d8578063ad5caa62146102f857600080fd5b80635140dcf3116100ff5780635140dcf31461020357806352bd991414610223578063863a97931461023a57806388eb75351461024d578063894a823d1461026057600080fd5b8063188850811461013c57806332ed5b12146101655780633411f778146101c85780633d3f915f146101dd5780634e849f3c146101f0575b600080fd5b61014f61014a36600461304c565b6103b7565b60405161015c91906131b0565b60405180910390f35b6101a0610173366004613212565b60046020526000908152604090208054600182015460029092015490919060ff8082169161010090041684565b604080519485526020850193909352901515918301919091521515606082015260800161015c565b6101db6101d636600461323b565b6108db565b005b6101db6101eb36600461327e565b6109c1565b6101db6101fe36600461335a565b610b86565b6102166102113660046133c4565b610d87565b60405161015c919061345e565b61022c60015481565b60405190815260200161015c565b6101db6102483660046134b3565b61106b565b6101db61025b36600461335a565b61117d565b61027361026e36600461354b565b6112a2565b60405161015c91906135ae565b6101db61028e3660046135c1565b611596565b6002546102ad90600160401b90046001600160a01b031681565b6040516001600160a01b03909116815260200161015c565b6101db6102d336600461335a565b6116c4565b6102eb6102e6366004613605565b611786565b60405161015c9190613641565b6003546102ad906001600160a01b031681565b6101db610319366004613654565b611929565b6101db61032c36600461366f565b611a2c565b61022c60005481565b610369600080526007602052600080516020613d0083398151915254600160401b90046001600160401b031690565b6040516001600160401b03909116815260200161015c565b61039461038f366004613605565b611bad565b604051901515815260200161015c565b6101db6103b236600461372c565b611bd6565b60606000846001600160401b0316116103f1576001600160401b03808516600090815260076020526040902054600160801b9004166103f3565b835b6001600160401b038082166000908152600860209081526040808320978416835296905294852054919550600160801b90910416928390036104c3576001600160401b03938416600090815260076020908152604080832054600160801b9081900488168085526008845282852085805290935292205490959190041692508315801561048757506001600160401b038316155b156104c35760408051600180825281830190925290816020015b6104a9612f17565b8152602001906001900390816104a15790505090506108d4565b6000826001600160401b03166001600160401b038111156104e6576104e66132b8565b60405190808252806020026020018201604052801561051f57816020015b61050c612f17565b8152602001906001900390816105045790505b50905060005b6000866001600160401b031611801561054f5750836001600160401b0316816001600160401b0316105b156108d057846001600160401b03166000036105ad576001600160401b03958616600090815260076020908152604080832054600160801b908190048a16808552600884528285208580529093529220549097919004169450610525565b6001600160401b038087166000908152600860209081526040808320898516845282529182902082516101008101845281548086168252600160401b8104861693820193909352600160801b8304851693810193909352600160c01b909104909216606082015260018201805491929160808401919061062c9061380c565b80601f01602080910402602001604051908101604052809291908181526020018280546106589061380c565b80156106a55780601f1061067a576101008083540402835291602001916106a5565b820191906000526020600020905b81548152906001019060200180831161068857829003601f168201915b505050505081526020016002820180546106be9061380c565b80601f01602080910402602001604051908101604052809291908181526020018280546106ea9061380c565b80156107375780601f1061070c57610100808354040283529160200191610737565b820191906000526020600020905b81548152906001019060200180831161071a57829003601f168201915b505050505081526020016003820180546107509061380c565b80601f016020809104026020016040519081016040528092919081815260200182805461077c9061380c565b80156107c95780601f1061079e576101008083540402835291602001916107c9565b820191906000526020600020905b8154815290600101906020018083116107ac57829003601f168201915b505050505081526020016004820180546107e29061380c565b80601f016020809104026020016040519081016040528092919081815260200182805461080e9061380c565b801561085b5780601f106108305761010080835404028352916020019161085b565b820191906000526020600020905b81548152906001019060200180831161083e57829003601f168201915b5050505050815250508282806108709061385c565b93506001600160401b03168151811061088b5761088b613882565b6020908102919091018101919091526001600160401b03808816600090815260088352604080822098831682529790925295902054600160801b900490941693610525565b5090505b9392505050565b6003546001600160a01b03163314806109055750600254600160401b90046001600160a01b031633145b61092a5760405162461bcd60e51b815260040161092190613898565b60405180910390fd5b60008311801561093957508282115b61094257600080fd5b6040516306823eef60e31b6020820181905260248201859052604482018490529060009060640160405160208183030381529060405280519060200120905061098b8184611d36565b1561099b57600085905560018490555b6040518315159082903390600080516020613ce083398151915290600090a45050505050565b6003546001600160a01b03163314806109eb5750600254600160401b90046001600160a01b031633145b610a075760405162461bcd60e51b815260040161092190613898565b6002546001600160a01b03848116600160401b909204161480610a3757506003546001600160a01b038481169116145b610a4057600080fd5b6002546001600160a01b03838116600160401b9092041614801590610a7357506003546001600160a01b03838116911614155b610a7c57600080fd5b604051633d3f915f60e01b602082018190526bffffffffffffffffffffffff19606086811b8216602485015285901b16603883015290600090604c01604051602081830303815290604052805190602001209050610ada8184611d36565b1561099b576002546001600160a01b03868116600160401b9092041614610b1457600254600160401b90046001600160a01b031684610b23565b60035484906001600160a01b03165b600380546001600160a01b0319166001600160a01b0392831617905560028054600160401b600160e01b031916600160401b93909216929092021790556040518315159082903390600080516020613ce083398151915290600090a45050505050565b6003546001600160a01b0316331480610bb05750600254600160401b90046001600160a01b031633145b610bcc5760405162461bcd60e51b815260040161092190613898565b6000610bd784611f71565b90506000610be484611f71565b9050806001600160401b0316826001600160401b031603610c0457600080fd5b6001600160401b038083166000908152600760205260409020541615801590610c4657506001600160401b038082166000908152600760205260409020541615155b610c4f57600080fd5b6040516313a127cf60e21b90600090610c70908390899089906020016138c0565b604051602081830303815290604052805190602001209050610c928186611d36565b15610d5f576001600160401b038085166000818152600760205260408082208054600160c01b80820487168552838520805467ffffffffffffffff60801b19908116600160801b948590048a1685021790915583548381048916875285872080546001600160c01b03908116928590048b168502929092179055888c16808852868820805487546001600160801b0316908790048c168702841617918502919091178655805490921684890217909155925491909104909516835291208054909116929091029190911790555b6040518515159082903390600080516020613ce083398151915290600090a450505050505050565b6001600160401b03918216600090815260076020526040812054600160801b900490921691606090839003610ded5760408051600180825281830190925290816020015b610dd3612f80565b815260200190600190039081610dcb579050509050611065565b6000826001600160401b03166001600160401b03811115610e1057610e106132b8565b604051908082528060200260200182016040528015610e4957816020015b610e36612f80565b815260200190600190039081610e2e5790505b50905060005b836001600160401b0316816001600160401b03161015611061576001600160401b03851615611061576001600160401b03808616600090815260076020908152604091829020825160c08101845281548086168252600160401b8104861693820193909352600160801b8304851693810193909352600160c01b9091049092166060820152600182018054919291608084019190610eec9061380c565b80601f0160208091040260200160405190810160405280929190818152602001828054610f189061380c565b8015610f655780601f10610f3a57610100808354040283529160200191610f65565b820191906000526020600020905b815481529060010190602001808311610f4857829003601f168201915b50505050508152602001600282018054610f7e9061380c565b80601f0160208091040260200160405190810160405280929190818152602001828054610faa9061380c565b8015610ff75780601f10610fcc57610100808354040283529160200191610ff7565b820191906000526020600020905b815481529060010190602001808311610fda57829003601f168201915b50505050508152505082826001600160401b03168151811061101b5761101b613882565b6020908102919091018101919091526001600160401b03958616600090815260079091526040902054600160801b900490941693806110598161385c565b915050610e4f565b5090505b92915050565b6003546001600160a01b03163314806110955750600254600160401b90046001600160a01b031633145b6110b15760405162461bcd60e51b815260040161092190613898565b60006110bc85611f71565b6001600160401b03808216600090815260076020526040902054919250166110e357600080fd5b6110ec84611f71565b6001600160401b0316156110ff57600080fd5b60405163863a979360e01b90600090611122908390899089908990602001613907565b6040516020818303038152906040528051906020012090506111448185611d36565b156111555761115583888888611fa0565b6040518415159082903390600080516020613ce083398151915290600090a450505050505050565b6003546001600160a01b03163314806111a75750600254600160401b90046001600160a01b031633145b6111c35760405162461bcd60e51b815260040161092190613898565b60006111ce84611f71565b905060006111db84611f71565b6001600160401b03808416600090815260086020908152604080832084861684529091529020549192501661120f57600080fd5b6040516388eb753560e01b90600090611230908390899089906020016138c0565b6040516020818303038152906040528051906020012090506112528186611d36565b15610d5f5760006005600061126689612050565b815260200190815260200160002060006101000a8154816001600160401b0302191690836001600160401b03160217905550610d5f8484612080565b6112aa612f17565b600860006112b785611f71565b6001600160401b03166001600160401b0316815260200190815260200160002060006112e284611f71565b6001600160401b039081168252602080830193909352604091820160002082516101008101845281548084168252600160401b8104841695820195909552600160801b8504831693810193909352600160c01b9093041660608201526001820180549192916080840191906113569061380c565b80601f01602080910402602001604051908101604052809291908181526020018280546113829061380c565b80156113cf5780601f106113a4576101008083540402835291602001916113cf565b820191906000526020600020905b8154815290600101906020018083116113b257829003601f168201915b505050505081526020016002820180546113e89061380c565b80601f01602080910402602001604051908101604052809291908181526020018280546114149061380c565b80156114615780601f1061143657610100808354040283529160200191611461565b820191906000526020600020905b81548152906001019060200180831161144457829003601f168201915b5050505050815260200160038201805461147a9061380c565b80601f01602080910402602001604051908101604052809291908181526020018280546114a69061380c565b80156114f35780601f106114c8576101008083540402835291602001916114f3565b820191906000526020600020905b8154815290600101906020018083116114d657829003601f168201915b5050505050815260200160048201805461150c9061380c565b80601f01602080910402602001604051908101604052809291908181526020018280546115389061380c565b80156115855780601f1061155a57610100808354040283529160200191611585565b820191906000526020600020905b81548152906001019060200180831161156857829003601f168201915b505050505081525050905092915050565b6003546001600160a01b03163314806115c05750600254600160401b90046001600160a01b031633145b6115dc5760405162461bcd60e51b815260040161092190613898565b60006115e783611f71565b6001600160401b038082166000908152600760205260409020549192501661160e57600080fd5b6040516348ce7f7b60e11b9060009061162d9083908790602001613965565b60405160208183030381529060405280519060200120905061164f8185611d36565b1561169e5760006005600061166388612050565b815260200190815260200160002060006101000a8154816001600160401b0302191690836001600160401b0316021790555061169e83612272565b6040518415159082903390600080516020613ce083398151915290600090a45050505050565b6003546001600160a01b03163314806116ee5750600254600160401b90046001600160a01b031633145b61170a5760405162461bcd60e51b815260040161092190613898565b825160000361171857600080fd5b61172183611f71565b6001600160401b03161561173457600080fd5b60405163a30013e160e01b90600090611755908390879087906020016138c0565b6040516020818303038152906040528051906020012090506117778184611d36565b1561099b5761099b8585612530565b61178e612f80565b6007600061179b84611f71565b6001600160401b0390811682526020808301939093526040918201600020825160c08101845281548084168252600160401b8104841695820195909552600160801b8504831693810193909352600160c01b90930416606082015260018201805491929160808401919061180e9061380c565b80601f016020809104026020016040519081016040528092919081815260200182805461183a9061380c565b80156118875780601f1061185c57610100808354040283529160200191611887565b820191906000526020600020905b81548152906001019060200180831161186a57829003601f168201915b505050505081526020016002820180546118a09061380c565b80601f01602080910402602001604051908101604052809291908181526020018280546118cc9061380c565b80156119195780601f106118ee57610100808354040283529160200191611919565b820191906000526020600020905b8154815290600101906020018083116118fc57829003601f168201915b5050505050815250509050919050565b6003546001600160a01b03163314806119535750600254600160401b90046001600160a01b031633145b61196f5760405162461bcd60e51b815260040161092190613898565b6002546001600160a01b03828116600160401b90920416148015906119a257506003546001600160a01b03828116911614155b6119ab57600080fd5b600254600160401b90046001600160a01b031633146119dd57600254600160401b90046001600160a01b0316816119ec565b60035481906001600160a01b03165b600380546001600160a01b0319166001600160a01b0392831617905560028054600160401b600160e01b031916600160401b939092169290920217905550565b6003546001600160a01b0316331480611a565750600254600160401b90046001600160a01b031633145b611a725760405162461bcd60e51b815260040161092190613898565b6000611a7d86611f71565b90506000611a8a86611f71565b90506000611a9786611f71565b90506000611aa486611f71565b9050806001600160401b0316836001600160401b031603611ac457600080fd5b6001600160401b03808516600090815260086020908152604080832087851684529091529020541615801590611b2057506001600160401b03808316600090815260086020908152604080832085851684529091529020541615155b611b2957600080fd5b60405163b885789f60e01b90600090611b4e9083908d908d908d908d90602001613996565b604051602081830303815290604052805190602001209050611b708188611d36565b15611b8157611b8186868686612737565b6040518715159082903390600080516020613ce083398151915290600090a45050505050505050505050565b600060066000611bbc84612050565b815260208101919091526040016000205460ff1692915050565b6003546001600160a01b0316331480611c005750600254600160401b90046001600160a01b031633145b611c1c5760405162461bcd60e51b815260040161092190613898565b6000611c2787611f71565b6001600160401b0380821660009081526007602052604090205491925016611c4e57600080fd5b8551600003611c5c57600080fd5b611c6586611f71565b6001600160401b031615611c7857600080fd5b8451600003611c8657600080fd5b60066000611c9387612050565b815260208101919091526040016000205460ff1615611cb157600080fd5b604051637900b18f60e11b90600090611cd89083908b908b908b908b908b90602001613a0b565b604051602081830303815290604052805190602001209050611cfa8185611d36565b15611d0c57611d0c8389898989612c8f565b6040518415159082903390600080516020613ce083398151915290600090a4505050505050505050565b600082815260046020526040812060010154421115611e1a5760008381526004602052604081208181556001810191909155600201805461ffff1916905581611d8157506000611065565b600054611d8e9042613a90565b600084815260046020526040902055600154611daa9042613a90565b600084815260046020526040902060010155600254600160401b90046001600160a01b03163314611dde5760006001611de3565b600160005b6000858152600460205260409020600201805492151560ff19921515610100029290921661ffff1990931692909217179055611f68565b600083815260046020526040902054421115611e5c57506000828152600460205260408120818155600180820192909255600201805461ffff19169055611065565b81611e8b5760008381526004602052604081208181556001810191909155600201805461ffff19169055611f68565b600254600160401b90046001600160a01b03163314611ec05760008381526004602052604090206002015460ff166001611ede565b600083815260046020526040902060020154600190610100900460ff165b6000858152600460205260409020600201805492151560ff19921515610100029290921661ffff1990931692909217179081905560ff168015611f375750600083815260046020526040902060020154610100900460ff165b15611f6857506000828152600460205260408120818155600180820192909255600201805461ffff19169055611065565b50600092915050565b600060056000611f8084612050565b81526020810191909152604001600020546001600160401b031692915050565b8360056000611fae85612050565b815260208082019290925260409081016000908120805467ffffffffffffffff19166001600160401b03958616179055928716835260079091529020600101611ff78382613aee565b506001600160401b038416600090815260076020526040902060020161201d8282613aee565b506005600061202b85612050565b81526020810191909152604001600020805467ffffffffffffffff1916905550505050565b6000816040516020016120639190613bad565b604051602081830303815290604052805190602001209050919050565b6001600160401b03828116600090815260086020908152604080832085851680855292528083208054600160c01b80820487168652838620805467ffffffffffffffff60801b1916600160801b938490048916840217905582549182048716865292852080546001600160c01b03169184900490961690920291909117909355815260029091018054600691839161219f919061211c9061380c565b80601f01602080910402602001604051908101604052809291908181526020018280546121489061380c565b80156121955780601f1061216a57610100808354040283529160200191612195565b820191906000526020600020905b81548152906001019060200180831161217857829003601f168201915b5050505050612050565b815260208082019290925260409081016000908120805460ff1916941515949094179093556001600160401b03858116845260079092529091208054600160401b90049091169060086121f183613bc9565b82546101009290920a6001600160401b038181021990931691831602179091558381166000908152600860209081526040808320938616835292905290812081815591506122426001830182612fda565b612250600283016000612fda565b61225e600383016000612fda565b61226c600483016000612fda565b50505050565b6001600160401b0381811660008181526007602090815260408083208054600160c01b80820488168652838620805467ffffffffffffffff60801b1916600160801b938490048a16840217905591548181048816865283862080546001600160c01b0316918490048916909302179091559383526008825280832083805290915281208054828255929092049092169161230f6001830182612fda565b61231d600283016000612fda565b61232b600383016000612fda565b612339600483016000612fda565b505060005b6001600160401b03808416600090815260076020526040902054600160401b9004168110156124a9576001600160401b03838116600090815260086020908152604080832086851684529091528120805460019091018054600160801b9092049093169260059183916123b49161211c9061380c565b815260208082019290925260409081016000908120805467ffffffffffffffff19166001600160401b03958616179055878416815260088352818120938716815292909152812060020180546006918391612413919061211c9061380c565b815260208082019290925260409081016000908120805460ff1916941515949094179093556001600160401b0387811684526008835281842090871684529091528120818155906124676001830182612fda565b612475600283016000612fda565b612483600383016000612fda565b612491600483016000612fda565b509092508190506124a181613bec565b91505061233e565b50600080526007602052600080516020613d008339815191528054600160401b90046001600160401b03169060086124e083613bc9565b82546101009290920a6001600160401b038181021990931691831602179091558316600090815260076020526040812081815591506125226001830182612fda565b61226c600283016000612fda565b600280546001600160401b03169060006125498361385c565b82546101009290920a6001600160401b038181021990931691831602179091556002541690506005600061257c85612050565b81526020808201929092526040908101600090812080546001600160401b0395861667ffffffffffffffff19909116179055815160c0810183526002548516808252818501838152828501848152600080516020613d0083398151915254600160c01b90819004891660608601908152608086018c815260a087018c90529487526007909852959094208351815492519551975189169096026001600160c01b03978916600160801b02979097166001600160801b03958916600160401b026001600160801b031990931696909816959095171792909216949094179290921781559051600182019061266f9082613aee565b5060a082015160028201906126849082613aee565b5050600280546007602052600080516020613d0083398151915280546001600160401b03600160c01b918290048116600090815260408120805467ffffffffffffffff60801b1916958316600160801b0295909517909455935492805281546001600160c01b03169284160291909117808255600160401b90049091169150600861270e8361385c565b91906101000a8154816001600160401b0302191690836001600160401b03160217905550505050565b6001600160401b0380851660009081526008602081815260408084208886168086528184528286208054838652600160c01b8082048a1689528589208054600160801b938490048c16840267ffffffffffffffff60801b199182161790915583549588528286048b168a52868a208054968390048c1683026001600160c01b039788161790558c8b168a5297875285892093895292909552929095208254815467ffffffffffffffff19811691891691821783558454600160401b908190048a16026001600160801b03199091169091171780825583548590048816909402948416851781558254869004909616909402929093166001600160801b03909116171782559060018181019061284e90840182613c05565b5060028181019061286190840182613c05565b5060038181019061287490840182613c05565b5060048181019061288790840182613c05565b509050508160086000846001600160401b03166001600160401b031681526020019081526020016000206000856001600160401b03166001600160401b0316815260200190815260200160002060000160086101000a8154816001600160401b0302191690836001600160401b0316021790555060086000836001600160401b03166001600160401b031681526020019081526020016000206000826001600160401b03166001600160401b0316815260200190815260200160002060000160109054906101000a90046001600160401b031660086000846001600160401b03166001600160401b031681526020019081526020016000206000856001600160401b03166001600160401b0316815260200190815260200160002060000160106101000a8154816001600160401b0302191690836001600160401b031602179055508060086000846001600160401b03166001600160401b031681526020019081526020016000206000856001600160401b03166001600160401b0316815260200190815260200160002060000160186101000a8154816001600160401b0302191690836001600160401b031602179055508260086000846001600160401b03166001600160401b031681526020019081526020016000206000836001600160401b03166001600160401b0316815260200190815260200160002060000160106101000a8154816001600160401b0302191690836001600160401b031602179055508260086000846001600160401b03166001600160401b03168152602001908152602001600020600060086000866001600160401b03166001600160401b031681526020019081526020016000206000876001600160401b03166001600160401b0316815260200190815260200160002060000160109054906101000a90046001600160401b03166001600160401b03166001600160401b0316815260200190815260200160002060000160186101000a8154816001600160401b0302191690836001600160401b0316021790555060076000856001600160401b03166001600160401b03168152602001908152602001600020600001600881819054906101000a90046001600160401b031680929190612bc290613bc9565b82546101009290920a6001600160401b0381810219909316918316021790915583811660009081526007602052604090208054600160401b900490911691506008612c0c8361385c565b82546101009290920a6001600160401b03818102199093169183160217909155858116600090815260086020908152604080832093881683529290529081208181559150612c5d6001830182612fda565b612c6b600283016000612fda565b612c79600383016000612fda565b612c87600483016000612fda565b505050505050565b600280546001600160401b0316906000612ca88361385c565b82546101009290920a6001600160401b0381810219909316918316021790915560025416905060056000612cdb87612050565b81526020808201929092526040908101600090812080546001600160401b0395861667ffffffffffffffff1990911617905581516101008101835260025485168082528a86168286018181528386018581529185526008875285852085805280885286862054600160c01b908190048a1660608701908152608087018f815260a088018f905260c088018e905260e088018d905295885291909852959094208351815495519251965189169097026001600160c01b03968916600160801b02969096166001600160801b03928916600160401b026001600160801b03199096169790981696909617939093179290921694909417919091178255516001820190612de59082613aee565b5060a08201516002820190612dfa9082613aee565b5060c08201516003820190612e0f9082613aee565b5060e08201516004820190612e249082613aee565b5050600280546001600160401b03888116600081815260086020818152604080842084805282528084208054600160c01b9081900488168652828620805467ffffffffffffffff60801b1916998916600160801b0299909917909855975488546001600160c01b0316908716909702969096179096559181526007909452919092208054600160401b90049092169250612ebd8361385c565b91906101000a8154816001600160401b0302191690836001600160401b0316021790555050600160066000612ef186612050565b81526020810191909152604001600020805460ff19169115159190911790555050505050565b60405180610100016040528060006001600160401b0316815260200160006001600160401b0316815260200160006001600160401b0316815260200160006001600160401b03168152602001606081526020016060815260200160608152602001606081525090565b6040518060c0016040528060006001600160401b0316815260200160006001600160401b0316815260200160006001600160401b0316815260200160006001600160401b0316815260200160608152602001606081525090565b508054612fe69061380c565b6000825580601f10612ff6575050565b601f0160209004906000526020600020908101906130149190613017565b50565b5b8082111561302c5760008155600101613018565b5090565b80356001600160401b038116811461304757600080fd5b919050565b60008060006060848603121561306157600080fd5b61306a84613030565b925061307860208501613030565b915061308660408501613030565b90509250925092565b60005b838110156130aa578181015183820152602001613092565b50506000910152565b600081518084526130cb81602086016020860161308f565b601f01601f19169290920160200192915050565b80516001600160401b031682526000610100602083015161310b60208601826001600160401b03169052565b50604083015161312660408601826001600160401b03169052565b50606083015161314160608601826001600160401b03169052565b506080830151816080860152613159828601826130b3565b91505060a083015184820360a086015261317382826130b3565b91505060c083015184820360c086015261318d82826130b3565b91505060e083015184820360e08601526131a782826130b3565b95945050505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561320557603f198886030184526131f38583516130df565b945092850192908501906001016131d7565b5092979650505050505050565b60006020828403121561322457600080fd5b5035919050565b8035801515811461304757600080fd5b60008060006060848603121561325057600080fd5b83359250602084013591506130866040850161322b565b80356001600160a01b038116811461304757600080fd5b60008060006060848603121561329357600080fd5b61329c84613267565b92506132aa60208501613267565b91506130866040850161322b565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126132df57600080fd5b81356001600160401b03808211156132f9576132f96132b8565b604051601f8301601f19908116603f01168101908282118183101715613321576133216132b8565b8160405283815286602085880101111561333a57600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060006060848603121561336f57600080fd5b83356001600160401b038082111561338657600080fd5b613392878388016132ce565b945060208601359150808211156133a857600080fd5b506133b5868287016132ce565b9250506130866040850161322b565b600080604083850312156133d757600080fd5b6133e083613030565b91506133ee60208401613030565b90509250929050565b60006001600160401b0380835116845280602084015116602085015280604084015116604085015280606084015116606085015250608082015160c0608085015261344560c08501826130b3565b905060a083015184820360a08601526131a782826130b3565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561320557603f198886030184526134a18583516133f7565b94509285019290850190600101613485565b600080600080608085870312156134c957600080fd5b84356001600160401b03808211156134e057600080fd5b6134ec888389016132ce565b9550602087013591508082111561350257600080fd5b61350e888389016132ce565b9450604087013591508082111561352457600080fd5b50613531878288016132ce565b9250506135406060860161322b565b905092959194509250565b6000806040838503121561355e57600080fd5b82356001600160401b038082111561357557600080fd5b613581868387016132ce565b9350602085013591508082111561359757600080fd5b506135a4858286016132ce565b9150509250929050565b6020815260006108d460208301846130df565b600080604083850312156135d457600080fd5b82356001600160401b038111156135ea57600080fd5b6135f6858286016132ce565b9250506133ee6020840161322b565b60006020828403121561361757600080fd5b81356001600160401b0381111561362d57600080fd5b613639848285016132ce565b949350505050565b6020815260006108d460208301846133f7565b60006020828403121561366657600080fd5b6108d482613267565b600080600080600060a0868803121561368757600080fd5b85356001600160401b038082111561369e57600080fd5b6136aa89838a016132ce565b965060208801359150808211156136c057600080fd5b6136cc89838a016132ce565b955060408801359150808211156136e257600080fd5b6136ee89838a016132ce565b9450606088013591508082111561370457600080fd5b50613711888289016132ce565b9250506137206080870161322b565b90509295509295909350565b60008060008060008060c0878903121561374557600080fd5b86356001600160401b038082111561375c57600080fd5b6137688a838b016132ce565b9750602089013591508082111561377e57600080fd5b61378a8a838b016132ce565b965060408901359150808211156137a057600080fd5b6137ac8a838b016132ce565b955060608901359150808211156137c257600080fd5b6137ce8a838b016132ce565b945060808901359150808211156137e457600080fd5b506137f189828a016132ce565b92505061380060a0880161322b565b90509295509295509295565b600181811c9082168061382057607f821691505b60208210810361384057634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b60006001600160401b0380831681810361387857613878613846565b6001019392505050565b634e487b7160e01b600052603260045260246000fd5b6020808252600e908201526d27b7363c902220a79037b91021a760911b604082015260600190565b6001600160e01b03198416815282516000906138e381600485016020880161308f565b8351908301906138fa81600484016020880161308f565b0160040195945050505050565b6001600160e01b031985168152835160009061392a81600485016020890161308f565b84519083019061394181600484016020890161308f565b845191019061395781600484016020880161308f565b016004019695505050505050565b6001600160e01b031983168152815160009061398881600485016020870161308f565b919091016004019392505050565b6001600160e01b03198616815284516000906139b9816004850160208a0161308f565b8551908301906139d0816004840160208a0161308f565b85519101906139e681600484016020890161308f565b84519101906139fc81600484016020880161308f565b01600401979650505050505050565b63ffffffff60e01b87168152600060048751613a2d8183860160208c0161308f565b875190840190613a438184840160208c0161308f565b8751910190613a588184840160208b0161308f565b8651910190613a6d8184840160208a0161308f565b8551910190613a82818484016020890161308f565b010198975050505050505050565b8082018082111561106557611065613846565b601f821115613ae957600081815260208120601f850160051c81016020861015613aca5750805b601f850160051c820191505b81811015612c8757828155600101613ad6565b505050565b81516001600160401b03811115613b0757613b076132b8565b613b1b81613b15845461380c565b84613aa3565b602080601f831160018114613b505760008415613b385750858301515b600019600386901b1c1916600185901b178555612c87565b600085815260208120601f198616915b82811015613b7f57888601518255948401946001909101908401613b60565b5085821015613b9d5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60008251613bbf81846020870161308f565b9190910192915050565b60006001600160401b03821680613be257613be2613846565b6000190192915050565b600060018201613bfe57613bfe613846565b5060010190565b818103613c10575050565b613c1a825461380c565b6001600160401b03811115613c3157613c316132b8565b613c3f81613b15845461380c565b6000601f821160018114613c735760008315613c5b5750848201545b600019600385901b1c1916600184901b178455613cd8565b600085815260209020601f19841690600086815260209020845b83811015613cad5782860154825560019586019590910190602001613c8d565b5085831015613ccb5781850154600019600388901b60f8161c191681555b50505060018360011b0184555b505050505056fe159d2efd57404307b21eeffce76b42a2ac064dc31abfcf5390cb511ef9d0c1b26d5257204ebe7d88fd91ae87941cb2dd9d8062b64ae5a2bd2d28ec40b9fbf6dfa26469706673582212209a85c2e2b41e7a1395f9d3939a7558133da60ebd972026ef8d0dc1e2b5fc3b7e64736f6c63430008100033

Deployed ByteCode

0x608060405234801561001057600080fd5b50600436106101375760003560e01c8063919cfef6116100b8578063ad91d5401161007c578063ad91d5401461030b578063b885789f1461031e578063c4e986b214610331578063c75f28931461033a578063e6b0c04614610381578063f201631e146103a457600080fd5b8063919cfef6146102805780639ca85bf014610293578063a30013e1146102c5578063abef281e146102d8578063ad5caa62146102f857600080fd5b80635140dcf3116100ff5780635140dcf31461020357806352bd991414610223578063863a97931461023a57806388eb75351461024d578063894a823d1461026057600080fd5b8063188850811461013c57806332ed5b12146101655780633411f778146101c85780633d3f915f146101dd5780634e849f3c146101f0575b600080fd5b61014f61014a36600461304c565b6103b7565b60405161015c91906131b0565b60405180910390f35b6101a0610173366004613212565b60046020526000908152604090208054600182015460029092015490919060ff8082169161010090041684565b604080519485526020850193909352901515918301919091521515606082015260800161015c565b6101db6101d636600461323b565b6108db565b005b6101db6101eb36600461327e565b6109c1565b6101db6101fe36600461335a565b610b86565b6102166102113660046133c4565b610d87565b60405161015c919061345e565b61022c60015481565b60405190815260200161015c565b6101db6102483660046134b3565b61106b565b6101db61025b36600461335a565b61117d565b61027361026e36600461354b565b6112a2565b60405161015c91906135ae565b6101db61028e3660046135c1565b611596565b6002546102ad90600160401b90046001600160a01b031681565b6040516001600160a01b03909116815260200161015c565b6101db6102d336600461335a565b6116c4565b6102eb6102e6366004613605565b611786565b60405161015c9190613641565b6003546102ad906001600160a01b031681565b6101db610319366004613654565b611929565b6101db61032c36600461366f565b611a2c565b61022c60005481565b610369600080526007602052600080516020613d0083398151915254600160401b90046001600160401b031690565b6040516001600160401b03909116815260200161015c565b61039461038f366004613605565b611bad565b604051901515815260200161015c565b6101db6103b236600461372c565b611bd6565b60606000846001600160401b0316116103f1576001600160401b03808516600090815260076020526040902054600160801b9004166103f3565b835b6001600160401b038082166000908152600860209081526040808320978416835296905294852054919550600160801b90910416928390036104c3576001600160401b03938416600090815260076020908152604080832054600160801b9081900488168085526008845282852085805290935292205490959190041692508315801561048757506001600160401b038316155b156104c35760408051600180825281830190925290816020015b6104a9612f17565b8152602001906001900390816104a15790505090506108d4565b6000826001600160401b03166001600160401b038111156104e6576104e66132b8565b60405190808252806020026020018201604052801561051f57816020015b61050c612f17565b8152602001906001900390816105045790505b50905060005b6000866001600160401b031611801561054f5750836001600160401b0316816001600160401b0316105b156108d057846001600160401b03166000036105ad576001600160401b03958616600090815260076020908152604080832054600160801b908190048a16808552600884528285208580529093529220549097919004169450610525565b6001600160401b038087166000908152600860209081526040808320898516845282529182902082516101008101845281548086168252600160401b8104861693820193909352600160801b8304851693810193909352600160c01b909104909216606082015260018201805491929160808401919061062c9061380c565b80601f01602080910402602001604051908101604052809291908181526020018280546106589061380c565b80156106a55780601f1061067a576101008083540402835291602001916106a5565b820191906000526020600020905b81548152906001019060200180831161068857829003601f168201915b505050505081526020016002820180546106be9061380c565b80601f01602080910402602001604051908101604052809291908181526020018280546106ea9061380c565b80156107375780601f1061070c57610100808354040283529160200191610737565b820191906000526020600020905b81548152906001019060200180831161071a57829003601f168201915b505050505081526020016003820180546107509061380c565b80601f016020809104026020016040519081016040528092919081815260200182805461077c9061380c565b80156107c95780601f1061079e576101008083540402835291602001916107c9565b820191906000526020600020905b8154815290600101906020018083116107ac57829003601f168201915b505050505081526020016004820180546107e29061380c565b80601f016020809104026020016040519081016040528092919081815260200182805461080e9061380c565b801561085b5780601f106108305761010080835404028352916020019161085b565b820191906000526020600020905b81548152906001019060200180831161083e57829003601f168201915b5050505050815250508282806108709061385c565b93506001600160401b03168151811061088b5761088b613882565b6020908102919091018101919091526001600160401b03808816600090815260088352604080822098831682529790925295902054600160801b900490941693610525565b5090505b9392505050565b6003546001600160a01b03163314806109055750600254600160401b90046001600160a01b031633145b61092a5760405162461bcd60e51b815260040161092190613898565b60405180910390fd5b60008311801561093957508282115b61094257600080fd5b6040516306823eef60e31b6020820181905260248201859052604482018490529060009060640160405160208183030381529060405280519060200120905061098b8184611d36565b1561099b57600085905560018490555b6040518315159082903390600080516020613ce083398151915290600090a45050505050565b6003546001600160a01b03163314806109eb5750600254600160401b90046001600160a01b031633145b610a075760405162461bcd60e51b815260040161092190613898565b6002546001600160a01b03848116600160401b909204161480610a3757506003546001600160a01b038481169116145b610a4057600080fd5b6002546001600160a01b03838116600160401b9092041614801590610a7357506003546001600160a01b03838116911614155b610a7c57600080fd5b604051633d3f915f60e01b602082018190526bffffffffffffffffffffffff19606086811b8216602485015285901b16603883015290600090604c01604051602081830303815290604052805190602001209050610ada8184611d36565b1561099b576002546001600160a01b03868116600160401b9092041614610b1457600254600160401b90046001600160a01b031684610b23565b60035484906001600160a01b03165b600380546001600160a01b0319166001600160a01b0392831617905560028054600160401b600160e01b031916600160401b93909216929092021790556040518315159082903390600080516020613ce083398151915290600090a45050505050565b6003546001600160a01b0316331480610bb05750600254600160401b90046001600160a01b031633145b610bcc5760405162461bcd60e51b815260040161092190613898565b6000610bd784611f71565b90506000610be484611f71565b9050806001600160401b0316826001600160401b031603610c0457600080fd5b6001600160401b038083166000908152600760205260409020541615801590610c4657506001600160401b038082166000908152600760205260409020541615155b610c4f57600080fd5b6040516313a127cf60e21b90600090610c70908390899089906020016138c0565b604051602081830303815290604052805190602001209050610c928186611d36565b15610d5f576001600160401b038085166000818152600760205260408082208054600160c01b80820487168552838520805467ffffffffffffffff60801b19908116600160801b948590048a1685021790915583548381048916875285872080546001600160c01b03908116928590048b168502929092179055888c16808852868820805487546001600160801b0316908790048c168702841617918502919091178655805490921684890217909155925491909104909516835291208054909116929091029190911790555b6040518515159082903390600080516020613ce083398151915290600090a450505050505050565b6001600160401b03918216600090815260076020526040812054600160801b900490921691606090839003610ded5760408051600180825281830190925290816020015b610dd3612f80565b815260200190600190039081610dcb579050509050611065565b6000826001600160401b03166001600160401b03811115610e1057610e106132b8565b604051908082528060200260200182016040528015610e4957816020015b610e36612f80565b815260200190600190039081610e2e5790505b50905060005b836001600160401b0316816001600160401b03161015611061576001600160401b03851615611061576001600160401b03808616600090815260076020908152604091829020825160c08101845281548086168252600160401b8104861693820193909352600160801b8304851693810193909352600160c01b9091049092166060820152600182018054919291608084019190610eec9061380c565b80601f0160208091040260200160405190810160405280929190818152602001828054610f189061380c565b8015610f655780601f10610f3a57610100808354040283529160200191610f65565b820191906000526020600020905b815481529060010190602001808311610f4857829003601f168201915b50505050508152602001600282018054610f7e9061380c565b80601f0160208091040260200160405190810160405280929190818152602001828054610faa9061380c565b8015610ff75780601f10610fcc57610100808354040283529160200191610ff7565b820191906000526020600020905b815481529060010190602001808311610fda57829003601f168201915b50505050508152505082826001600160401b03168151811061101b5761101b613882565b6020908102919091018101919091526001600160401b03958616600090815260079091526040902054600160801b900490941693806110598161385c565b915050610e4f565b5090505b92915050565b6003546001600160a01b03163314806110955750600254600160401b90046001600160a01b031633145b6110b15760405162461bcd60e51b815260040161092190613898565b60006110bc85611f71565b6001600160401b03808216600090815260076020526040902054919250166110e357600080fd5b6110ec84611f71565b6001600160401b0316156110ff57600080fd5b60405163863a979360e01b90600090611122908390899089908990602001613907565b6040516020818303038152906040528051906020012090506111448185611d36565b156111555761115583888888611fa0565b6040518415159082903390600080516020613ce083398151915290600090a450505050505050565b6003546001600160a01b03163314806111a75750600254600160401b90046001600160a01b031633145b6111c35760405162461bcd60e51b815260040161092190613898565b60006111ce84611f71565b905060006111db84611f71565b6001600160401b03808416600090815260086020908152604080832084861684529091529020549192501661120f57600080fd5b6040516388eb753560e01b90600090611230908390899089906020016138c0565b6040516020818303038152906040528051906020012090506112528186611d36565b15610d5f5760006005600061126689612050565b815260200190815260200160002060006101000a8154816001600160401b0302191690836001600160401b03160217905550610d5f8484612080565b6112aa612f17565b600860006112b785611f71565b6001600160401b03166001600160401b0316815260200190815260200160002060006112e284611f71565b6001600160401b039081168252602080830193909352604091820160002082516101008101845281548084168252600160401b8104841695820195909552600160801b8504831693810193909352600160c01b9093041660608201526001820180549192916080840191906113569061380c565b80601f01602080910402602001604051908101604052809291908181526020018280546113829061380c565b80156113cf5780601f106113a4576101008083540402835291602001916113cf565b820191906000526020600020905b8154815290600101906020018083116113b257829003601f168201915b505050505081526020016002820180546113e89061380c565b80601f01602080910402602001604051908101604052809291908181526020018280546114149061380c565b80156114615780601f1061143657610100808354040283529160200191611461565b820191906000526020600020905b81548152906001019060200180831161144457829003601f168201915b5050505050815260200160038201805461147a9061380c565b80601f01602080910402602001604051908101604052809291908181526020018280546114a69061380c565b80156114f35780601f106114c8576101008083540402835291602001916114f3565b820191906000526020600020905b8154815290600101906020018083116114d657829003601f168201915b5050505050815260200160048201805461150c9061380c565b80601f01602080910402602001604051908101604052809291908181526020018280546115389061380c565b80156115855780601f1061155a57610100808354040283529160200191611585565b820191906000526020600020905b81548152906001019060200180831161156857829003601f168201915b505050505081525050905092915050565b6003546001600160a01b03163314806115c05750600254600160401b90046001600160a01b031633145b6115dc5760405162461bcd60e51b815260040161092190613898565b60006115e783611f71565b6001600160401b038082166000908152600760205260409020549192501661160e57600080fd5b6040516348ce7f7b60e11b9060009061162d9083908790602001613965565b60405160208183030381529060405280519060200120905061164f8185611d36565b1561169e5760006005600061166388612050565b815260200190815260200160002060006101000a8154816001600160401b0302191690836001600160401b0316021790555061169e83612272565b6040518415159082903390600080516020613ce083398151915290600090a45050505050565b6003546001600160a01b03163314806116ee5750600254600160401b90046001600160a01b031633145b61170a5760405162461bcd60e51b815260040161092190613898565b825160000361171857600080fd5b61172183611f71565b6001600160401b03161561173457600080fd5b60405163a30013e160e01b90600090611755908390879087906020016138c0565b6040516020818303038152906040528051906020012090506117778184611d36565b1561099b5761099b8585612530565b61178e612f80565b6007600061179b84611f71565b6001600160401b0390811682526020808301939093526040918201600020825160c08101845281548084168252600160401b8104841695820195909552600160801b8504831693810193909352600160c01b90930416606082015260018201805491929160808401919061180e9061380c565b80601f016020809104026020016040519081016040528092919081815260200182805461183a9061380c565b80156118875780601f1061185c57610100808354040283529160200191611887565b820191906000526020600020905b81548152906001019060200180831161186a57829003601f168201915b505050505081526020016002820180546118a09061380c565b80601f01602080910402602001604051908101604052809291908181526020018280546118cc9061380c565b80156119195780601f106118ee57610100808354040283529160200191611919565b820191906000526020600020905b8154815290600101906020018083116118fc57829003601f168201915b5050505050815250509050919050565b6003546001600160a01b03163314806119535750600254600160401b90046001600160a01b031633145b61196f5760405162461bcd60e51b815260040161092190613898565b6002546001600160a01b03828116600160401b90920416148015906119a257506003546001600160a01b03828116911614155b6119ab57600080fd5b600254600160401b90046001600160a01b031633146119dd57600254600160401b90046001600160a01b0316816119ec565b60035481906001600160a01b03165b600380546001600160a01b0319166001600160a01b0392831617905560028054600160401b600160e01b031916600160401b939092169290920217905550565b6003546001600160a01b0316331480611a565750600254600160401b90046001600160a01b031633145b611a725760405162461bcd60e51b815260040161092190613898565b6000611a7d86611f71565b90506000611a8a86611f71565b90506000611a9786611f71565b90506000611aa486611f71565b9050806001600160401b0316836001600160401b031603611ac457600080fd5b6001600160401b03808516600090815260086020908152604080832087851684529091529020541615801590611b2057506001600160401b03808316600090815260086020908152604080832085851684529091529020541615155b611b2957600080fd5b60405163b885789f60e01b90600090611b4e9083908d908d908d908d90602001613996565b604051602081830303815290604052805190602001209050611b708188611d36565b15611b8157611b8186868686612737565b6040518715159082903390600080516020613ce083398151915290600090a45050505050505050505050565b600060066000611bbc84612050565b815260208101919091526040016000205460ff1692915050565b6003546001600160a01b0316331480611c005750600254600160401b90046001600160a01b031633145b611c1c5760405162461bcd60e51b815260040161092190613898565b6000611c2787611f71565b6001600160401b0380821660009081526007602052604090205491925016611c4e57600080fd5b8551600003611c5c57600080fd5b611c6586611f71565b6001600160401b031615611c7857600080fd5b8451600003611c8657600080fd5b60066000611c9387612050565b815260208101919091526040016000205460ff1615611cb157600080fd5b604051637900b18f60e11b90600090611cd89083908b908b908b908b908b90602001613a0b565b604051602081830303815290604052805190602001209050611cfa8185611d36565b15611d0c57611d0c8389898989612c8f565b6040518415159082903390600080516020613ce083398151915290600090a4505050505050505050565b600082815260046020526040812060010154421115611e1a5760008381526004602052604081208181556001810191909155600201805461ffff1916905581611d8157506000611065565b600054611d8e9042613a90565b600084815260046020526040902055600154611daa9042613a90565b600084815260046020526040902060010155600254600160401b90046001600160a01b03163314611dde5760006001611de3565b600160005b6000858152600460205260409020600201805492151560ff19921515610100029290921661ffff1990931692909217179055611f68565b600083815260046020526040902054421115611e5c57506000828152600460205260408120818155600180820192909255600201805461ffff19169055611065565b81611e8b5760008381526004602052604081208181556001810191909155600201805461ffff19169055611f68565b600254600160401b90046001600160a01b03163314611ec05760008381526004602052604090206002015460ff166001611ede565b600083815260046020526040902060020154600190610100900460ff165b6000858152600460205260409020600201805492151560ff19921515610100029290921661ffff1990931692909217179081905560ff168015611f375750600083815260046020526040902060020154610100900460ff165b15611f6857506000828152600460205260408120818155600180820192909255600201805461ffff19169055611065565b50600092915050565b600060056000611f8084612050565b81526020810191909152604001600020546001600160401b031692915050565b8360056000611fae85612050565b815260208082019290925260409081016000908120805467ffffffffffffffff19166001600160401b03958616179055928716835260079091529020600101611ff78382613aee565b506001600160401b038416600090815260076020526040902060020161201d8282613aee565b506005600061202b85612050565b81526020810191909152604001600020805467ffffffffffffffff1916905550505050565b6000816040516020016120639190613bad565b604051602081830303815290604052805190602001209050919050565b6001600160401b03828116600090815260086020908152604080832085851680855292528083208054600160c01b80820487168652838620805467ffffffffffffffff60801b1916600160801b938490048916840217905582549182048716865292852080546001600160c01b03169184900490961690920291909117909355815260029091018054600691839161219f919061211c9061380c565b80601f01602080910402602001604051908101604052809291908181526020018280546121489061380c565b80156121955780601f1061216a57610100808354040283529160200191612195565b820191906000526020600020905b81548152906001019060200180831161217857829003601f168201915b5050505050612050565b815260208082019290925260409081016000908120805460ff1916941515949094179093556001600160401b03858116845260079092529091208054600160401b90049091169060086121f183613bc9565b82546101009290920a6001600160401b038181021990931691831602179091558381166000908152600860209081526040808320938616835292905290812081815591506122426001830182612fda565b612250600283016000612fda565b61225e600383016000612fda565b61226c600483016000612fda565b50505050565b6001600160401b0381811660008181526007602090815260408083208054600160c01b80820488168652838620805467ffffffffffffffff60801b1916600160801b938490048a16840217905591548181048816865283862080546001600160c01b0316918490048916909302179091559383526008825280832083805290915281208054828255929092049092169161230f6001830182612fda565b61231d600283016000612fda565b61232b600383016000612fda565b612339600483016000612fda565b505060005b6001600160401b03808416600090815260076020526040902054600160401b9004168110156124a9576001600160401b03838116600090815260086020908152604080832086851684529091528120805460019091018054600160801b9092049093169260059183916123b49161211c9061380c565b815260208082019290925260409081016000908120805467ffffffffffffffff19166001600160401b03958616179055878416815260088352818120938716815292909152812060020180546006918391612413919061211c9061380c565b815260208082019290925260409081016000908120805460ff1916941515949094179093556001600160401b0387811684526008835281842090871684529091528120818155906124676001830182612fda565b612475600283016000612fda565b612483600383016000612fda565b612491600483016000612fda565b509092508190506124a181613bec565b91505061233e565b50600080526007602052600080516020613d008339815191528054600160401b90046001600160401b03169060086124e083613bc9565b82546101009290920a6001600160401b038181021990931691831602179091558316600090815260076020526040812081815591506125226001830182612fda565b61226c600283016000612fda565b600280546001600160401b03169060006125498361385c565b82546101009290920a6001600160401b038181021990931691831602179091556002541690506005600061257c85612050565b81526020808201929092526040908101600090812080546001600160401b0395861667ffffffffffffffff19909116179055815160c0810183526002548516808252818501838152828501848152600080516020613d0083398151915254600160c01b90819004891660608601908152608086018c815260a087018c90529487526007909852959094208351815492519551975189169096026001600160c01b03978916600160801b02979097166001600160801b03958916600160401b026001600160801b031990931696909816959095171792909216949094179290921781559051600182019061266f9082613aee565b5060a082015160028201906126849082613aee565b5050600280546007602052600080516020613d0083398151915280546001600160401b03600160c01b918290048116600090815260408120805467ffffffffffffffff60801b1916958316600160801b0295909517909455935492805281546001600160c01b03169284160291909117808255600160401b90049091169150600861270e8361385c565b91906101000a8154816001600160401b0302191690836001600160401b03160217905550505050565b6001600160401b0380851660009081526008602081815260408084208886168086528184528286208054838652600160c01b8082048a1689528589208054600160801b938490048c16840267ffffffffffffffff60801b199182161790915583549588528286048b168a52868a208054968390048c1683026001600160c01b039788161790558c8b168a5297875285892093895292909552929095208254815467ffffffffffffffff19811691891691821783558454600160401b908190048a16026001600160801b03199091169091171780825583548590048816909402948416851781558254869004909616909402929093166001600160801b03909116171782559060018181019061284e90840182613c05565b5060028181019061286190840182613c05565b5060038181019061287490840182613c05565b5060048181019061288790840182613c05565b509050508160086000846001600160401b03166001600160401b031681526020019081526020016000206000856001600160401b03166001600160401b0316815260200190815260200160002060000160086101000a8154816001600160401b0302191690836001600160401b0316021790555060086000836001600160401b03166001600160401b031681526020019081526020016000206000826001600160401b03166001600160401b0316815260200190815260200160002060000160109054906101000a90046001600160401b031660086000846001600160401b03166001600160401b031681526020019081526020016000206000856001600160401b03166001600160401b0316815260200190815260200160002060000160106101000a8154816001600160401b0302191690836001600160401b031602179055508060086000846001600160401b03166001600160401b031681526020019081526020016000206000856001600160401b03166001600160401b0316815260200190815260200160002060000160186101000a8154816001600160401b0302191690836001600160401b031602179055508260086000846001600160401b03166001600160401b031681526020019081526020016000206000836001600160401b03166001600160401b0316815260200190815260200160002060000160106101000a8154816001600160401b0302191690836001600160401b031602179055508260086000846001600160401b03166001600160401b03168152602001908152602001600020600060086000866001600160401b03166001600160401b031681526020019081526020016000206000876001600160401b03166001600160401b0316815260200190815260200160002060000160109054906101000a90046001600160401b03166001600160401b03166001600160401b0316815260200190815260200160002060000160186101000a8154816001600160401b0302191690836001600160401b0316021790555060076000856001600160401b03166001600160401b03168152602001908152602001600020600001600881819054906101000a90046001600160401b031680929190612bc290613bc9565b82546101009290920a6001600160401b0381810219909316918316021790915583811660009081526007602052604090208054600160401b900490911691506008612c0c8361385c565b82546101009290920a6001600160401b03818102199093169183160217909155858116600090815260086020908152604080832093881683529290529081208181559150612c5d6001830182612fda565b612c6b600283016000612fda565b612c79600383016000612fda565b612c87600483016000612fda565b505050505050565b600280546001600160401b0316906000612ca88361385c565b82546101009290920a6001600160401b0381810219909316918316021790915560025416905060056000612cdb87612050565b81526020808201929092526040908101600090812080546001600160401b0395861667ffffffffffffffff1990911617905581516101008101835260025485168082528a86168286018181528386018581529185526008875285852085805280885286862054600160c01b908190048a1660608701908152608087018f815260a088018f905260c088018e905260e088018d905295885291909852959094208351815495519251965189169097026001600160c01b03968916600160801b02969096166001600160801b03928916600160401b026001600160801b03199096169790981696909617939093179290921694909417919091178255516001820190612de59082613aee565b5060a08201516002820190612dfa9082613aee565b5060c08201516003820190612e0f9082613aee565b5060e08201516004820190612e249082613aee565b5050600280546001600160401b03888116600081815260086020818152604080842084805282528084208054600160c01b9081900488168652828620805467ffffffffffffffff60801b1916998916600160801b0299909917909855975488546001600160c01b0316908716909702969096179096559181526007909452919092208054600160401b90049092169250612ebd8361385c565b91906101000a8154816001600160401b0302191690836001600160401b0316021790555050600160066000612ef186612050565b81526020810191909152604001600020805460ff19169115159190911790555050505050565b60405180610100016040528060006001600160401b0316815260200160006001600160401b0316815260200160006001600160401b0316815260200160006001600160401b03168152602001606081526020016060815260200160608152602001606081525090565b6040518060c0016040528060006001600160401b0316815260200160006001600160401b0316815260200160006001600160401b0316815260200160006001600160401b0316815260200160608152602001606081525090565b508054612fe69061380c565b6000825580601f10612ff6575050565b601f0160209004906000526020600020908101906130149190613017565b50565b5b8082111561302c5760008155600101613018565b5090565b80356001600160401b038116811461304757600080fd5b919050565b60008060006060848603121561306157600080fd5b61306a84613030565b925061307860208501613030565b915061308660408501613030565b90509250925092565b60005b838110156130aa578181015183820152602001613092565b50506000910152565b600081518084526130cb81602086016020860161308f565b601f01601f19169290920160200192915050565b80516001600160401b031682526000610100602083015161310b60208601826001600160401b03169052565b50604083015161312660408601826001600160401b03169052565b50606083015161314160608601826001600160401b03169052565b506080830151816080860152613159828601826130b3565b91505060a083015184820360a086015261317382826130b3565b91505060c083015184820360c086015261318d82826130b3565b91505060e083015184820360e08601526131a782826130b3565b95945050505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561320557603f198886030184526131f38583516130df565b945092850192908501906001016131d7565b5092979650505050505050565b60006020828403121561322457600080fd5b5035919050565b8035801515811461304757600080fd5b60008060006060848603121561325057600080fd5b83359250602084013591506130866040850161322b565b80356001600160a01b038116811461304757600080fd5b60008060006060848603121561329357600080fd5b61329c84613267565b92506132aa60208501613267565b91506130866040850161322b565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126132df57600080fd5b81356001600160401b03808211156132f9576132f96132b8565b604051601f8301601f19908116603f01168101908282118183101715613321576133216132b8565b8160405283815286602085880101111561333a57600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060006060848603121561336f57600080fd5b83356001600160401b038082111561338657600080fd5b613392878388016132ce565b945060208601359150808211156133a857600080fd5b506133b5868287016132ce565b9250506130866040850161322b565b600080604083850312156133d757600080fd5b6133e083613030565b91506133ee60208401613030565b90509250929050565b60006001600160401b0380835116845280602084015116602085015280604084015116604085015280606084015116606085015250608082015160c0608085015261344560c08501826130b3565b905060a083015184820360a08601526131a782826130b3565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561320557603f198886030184526134a18583516133f7565b94509285019290850190600101613485565b600080600080608085870312156134c957600080fd5b84356001600160401b03808211156134e057600080fd5b6134ec888389016132ce565b9550602087013591508082111561350257600080fd5b61350e888389016132ce565b9450604087013591508082111561352457600080fd5b50613531878288016132ce565b9250506135406060860161322b565b905092959194509250565b6000806040838503121561355e57600080fd5b82356001600160401b038082111561357557600080fd5b613581868387016132ce565b9350602085013591508082111561359757600080fd5b506135a4858286016132ce565b9150509250929050565b6020815260006108d460208301846130df565b600080604083850312156135d457600080fd5b82356001600160401b038111156135ea57600080fd5b6135f6858286016132ce565b9250506133ee6020840161322b565b60006020828403121561361757600080fd5b81356001600160401b0381111561362d57600080fd5b613639848285016132ce565b949350505050565b6020815260006108d460208301846133f7565b60006020828403121561366657600080fd5b6108d482613267565b600080600080600060a0868803121561368757600080fd5b85356001600160401b038082111561369e57600080fd5b6136aa89838a016132ce565b965060208801359150808211156136c057600080fd5b6136cc89838a016132ce565b955060408801359150808211156136e257600080fd5b6136ee89838a016132ce565b9450606088013591508082111561370457600080fd5b50613711888289016132ce565b9250506137206080870161322b565b90509295509295909350565b60008060008060008060c0878903121561374557600080fd5b86356001600160401b038082111561375c57600080fd5b6137688a838b016132ce565b9750602089013591508082111561377e57600080fd5b61378a8a838b016132ce565b965060408901359150808211156137a057600080fd5b6137ac8a838b016132ce565b955060608901359150808211156137c257600080fd5b6137ce8a838b016132ce565b945060808901359150808211156137e457600080fd5b506137f189828a016132ce565b92505061380060a0880161322b565b90509295509295509295565b600181811c9082168061382057607f821691505b60208210810361384057634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b60006001600160401b0380831681810361387857613878613846565b6001019392505050565b634e487b7160e01b600052603260045260246000fd5b6020808252600e908201526d27b7363c902220a79037b91021a760911b604082015260600190565b6001600160e01b03198416815282516000906138e381600485016020880161308f565b8351908301906138fa81600484016020880161308f565b0160040195945050505050565b6001600160e01b031985168152835160009061392a81600485016020890161308f565b84519083019061394181600484016020890161308f565b845191019061395781600484016020880161308f565b016004019695505050505050565b6001600160e01b031983168152815160009061398881600485016020870161308f565b919091016004019392505050565b6001600160e01b03198616815284516000906139b9816004850160208a0161308f565b8551908301906139d0816004840160208a0161308f565b85519101906139e681600484016020890161308f565b84519101906139fc81600484016020880161308f565b01600401979650505050505050565b63ffffffff60e01b87168152600060048751613a2d8183860160208c0161308f565b875190840190613a438184840160208c0161308f565b8751910190613a588184840160208b0161308f565b8651910190613a6d8184840160208a0161308f565b8551910190613a82818484016020890161308f565b010198975050505050505050565b8082018082111561106557611065613846565b601f821115613ae957600081815260208120601f850160051c81016020861015613aca5750805b601f850160051c820191505b81811015612c8757828155600101613ad6565b505050565b81516001600160401b03811115613b0757613b076132b8565b613b1b81613b15845461380c565b84613aa3565b602080601f831160018114613b505760008415613b385750858301515b600019600386901b1c1916600185901b178555612c87565b600085815260208120601f198616915b82811015613b7f57888601518255948401946001909101908401613b60565b5085821015613b9d5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60008251613bbf81846020870161308f565b9190910192915050565b60006001600160401b03821680613be257613be2613846565b6000190192915050565b600060018201613bfe57613bfe613846565b5060010190565b818103613c10575050565b613c1a825461380c565b6001600160401b03811115613c3157613c316132b8565b613c3f81613b15845461380c565b6000601f821160018114613c735760008315613c5b5750848201545b600019600385901b1c1916600184901b178455613cd8565b600085815260209020601f19841690600086815260209020845b83811015613cad5782860154825560019586019590910190602001613c8d565b5085831015613ccb5781850154600019600388901b60f8161c191681555b50505060018360011b0184555b505050505056fe159d2efd57404307b21eeffce76b42a2ac064dc31abfcf5390cb511ef9d0c1b26d5257204ebe7d88fd91ae87941cb2dd9d8062b64ae5a2bd2d28ec40b9fbf6dfa26469706673582212209a85c2e2b41e7a1395f9d3939a7558133da60ebd972026ef8d0dc1e2b5fc3b7e64736f6c63430008100033