Contract 0x05f9a290f0c4195fa09dd60c1f2acb4fe612c789 5

 
 
Txn Hash
Method
Block
From
To
Value [Txn Fee]
0x1928bc26f102c7083370ecca8982011a7bbdb518a8f55cdf4213ee0160f5341cMint To431365012023-05-25 16:04:173 days 4 hrs ago0xf20643f2f91f999b3b4475eeec7a72ee838ad199 IN  0x05f9a290f0c4195fa09dd60c1f2acb4fe612c7890 MATIC0.3253005500
0x0051b31936801cc8be53f6b1218839b3b3dd4fac187c26a98f27a23b74fcbb4cMint To430093372023-05-22 9:52:586 days 10 hrs ago0xf20643f2f91f999b3b4475eeec7a72ee838ad199 IN  0x05f9a290f0c4195fa09dd60c1f2acb4fe612c7890 MATIC0.4577055500
0x4554b5f299050484ddf57b4a9206270df76b72f22f08228ce49cb92a444f39ddMint To428167692023-05-17 13:55:2811 days 6 hrs ago0xf20643f2f91f999b3b4475eeec7a72ee838ad199 IN  0x05f9a290f0c4195fa09dd60c1f2acb4fe612c7890 MATIC0.590091500
0x7f590906693b9a6f6f6414c142531a54f215776ad70113e69eed591b4e2b768dMint To425287702023-05-10 9:34:5218 days 11 hrs ago0xf20643f2f91f999b3b4475eeec7a72ee838ad199 IN  0x05f9a290f0c4195fa09dd60c1f2acb4fe612c7890 MATIC0.568197500
0x390a105ad68f1cbae07ead4ea1eefd6d8bcb7ddbd0fa26ea7593ac13822fbf66Mint To424469352023-05-08 8:41:5220 days 12 hrs ago0xf20643f2f91f999b3b4475eeec7a72ee838ad199 IN  0x05f9a290f0c4195fa09dd60c1f2acb4fe612c7890 MATIC1.230208500
0xdb1f131f26d182e437487c73b7f9f2f9781e3adb9349230a14e2f5c378081ff9Reserve For Me423116702023-05-04 22:18:5323 days 22 hrs ago0xb272752c7aadce9992118ed4e595426367e77d39 IN  0x05f9a290f0c4195fa09dd60c1f2acb4fe612c7890.25 MATIC0.007587291556 286.194091376
0xc8c22004b412ebf09f00fb6520b673063738d3241329b377386da158d702b3acMint To420722572023-04-28 21:17:1429 days 23 hrs ago0xf20643f2f91f999b3b4475eeec7a72ee838ad199 IN  0x05f9a290f0c4195fa09dd60c1f2acb4fe612c7890 MATIC0.1929455500
0xa6f25e6659f605ce1b94c55a341ea1580805654bafcb3e5acd4de29d8b353f5fTransfer From419911482023-04-26 19:04:1632 days 1 hr ago0x63d21f24f23d7ed8790857b1f78605efe3653349 IN  0x05f9a290f0c4195fa09dd60c1f2acb4fe612c7890 MATIC0.042730241636 380.09465964
0x029aac00152bd6aef1433d2541f6c58478dab1279e3133e33744fa28ef46a8f3Mint To419751902023-04-26 9:25:1432 days 11 hrs ago0xf20643f2f91f999b3b4475eeec7a72ee838ad199 IN  0x05f9a290f0c4195fa09dd60c1f2acb4fe612c7890 MATIC2.178848500
0x3db24c8c228a2372891c51711820d3f0a968c6a50be38ffa1d2ed7772c610ed7Safe Transfer Fr...418959002023-04-24 8:46:1534 days 11 hrs ago0x9f7784fc7649821f616bb62556ebc378ffd02327 IN  0x05f9a290f0c4195fa09dd60c1f2acb4fe612c7890 MATIC0.066456965656 573.082729606
0x97d403f6eaa39c65eb57086c9cddbcecb81a6ff26f6db6cc310b4a187c4f6bc8Update Tokens417932802023-04-21 16:59:4037 days 3 hrs ago0x83a5e9769c5d08aa7eb258c3b5728fe7c606a040 IN  0x05f9a290f0c4195fa09dd60c1f2acb4fe612c7890 MATIC0.289717373469 300.805672157
0x31d9238acfec741ba5d21452f8f27a5073fdac6b3d9c60bc734a04f772adc3a6Mint To417923512023-04-21 16:26:1737 days 4 hrs ago0xf20643f2f91f999b3b4475eeec7a72ee838ad199 IN  0x05f9a290f0c4195fa09dd60c1f2acb4fe612c7890 MATIC0.0307707300
0xcca46fdc16b158bc20304a230ea923c457b989094d729fd269009d01c80ce8ebMint To417923162023-04-21 16:25:0337 days 4 hrs ago0xf20643f2f91f999b3b4475eeec7a72ee838ad199 IN  0x05f9a290f0c4195fa09dd60c1f2acb4fe612c7890 MATIC1.3073016300
0x26a46d5298e3c602a6e93b0bda332be2efd66a708050cd77a3641d97702ec8beMint To417922432023-04-21 16:22:2937 days 4 hrs ago0xf20643f2f91f999b3b4475eeec7a72ee838ad199 IN  0x05f9a290f0c4195fa09dd60c1f2acb4fe612c7890 MATIC0.8865543300
0x337a2de5ec69cfee505bbabbe6d51e29592da3d651d6533c89a2ff50a1202089Mint To417920482023-04-21 16:15:0337 days 4 hrs ago0xf20643f2f91f999b3b4475eeec7a72ee838ad199 IN  0x05f9a290f0c4195fa09dd60c1f2acb4fe612c7890 MATIC0.0321669300
0x65f684c8a6e7ecdd22de2f75cf1e446b35e44168c04c85ff39b64bbe9123ef7aSet Token Data417130592023-04-19 15:17:2639 days 5 hrs ago0x83a5e9769c5d08aa7eb258c3b5728fe7c606a040 IN  0x05f9a290f0c4195fa09dd60c1f2acb4fe612c7890 MATIC0.095226813101 588.193809035
0x9625ff5fdfa906aad13118f6ed82c1e68fb2298783474f413002301e436e1420Set Token Data417130482023-04-19 15:16:4639 days 5 hrs ago0x83a5e9769c5d08aa7eb258c3b5728fe7c606a040 IN  0x05f9a290f0c4195fa09dd60c1f2acb4fe612c7890 MATIC0.09631266042 594.900834607
0x14816caa254f3ecd8f4f41d4461fc99bd4395e5e6acc61cb471309c720aca039Set Token Data417130372023-04-19 15:16:1839 days 5 hrs ago0x83a5e9769c5d08aa7eb258c3b5728fe7c606a040 IN  0x05f9a290f0c4195fa09dd60c1f2acb4fe612c7890 MATIC0.095125166209 587.565959897
0x27ffd29b0b79f82fd9002bb673321b3ea1860baee77aa883a0286310cbbf655dSet Token Data417116212023-04-19 14:08:2139 days 6 hrs ago0x83a5e9769c5d08aa7eb258c3b5728fe7c606a040 IN  0x05f9a290f0c4195fa09dd60c1f2acb4fe612c7890 MATIC0.052812597003 326.235271972
0x45bb1d93509683e4f5369e9eb008a7de0c68b8d1e28f69d8415e5dffc5d22c19Set Token Data417116092023-04-19 14:07:5539 days 6 hrs ago0x83a5e9769c5d08aa7eb258c3b5728fe7c606a040 IN  0x05f9a290f0c4195fa09dd60c1f2acb4fe612c7890 MATIC0.051719572872 319.459735958
0x73f59482ffe2cd71764b9f66fb95e5176ae782f11204a2a4a0d200889c0dd0e6Set Token Data417115422023-04-19 14:04:2939 days 6 hrs ago0x83a5e9769c5d08aa7eb258c3b5728fe7c606a040 IN  0x05f9a290f0c4195fa09dd60c1f2acb4fe612c7890 MATIC0.055127866911 340.537214141
0x5097e0748e291bb670d604c3f47c8b33037963be92ed360aa01ceee04f310ad2Set Token Data417115262023-04-19 14:03:5539 days 6 hrs ago0x83a5e9769c5d08aa7eb258c3b5728fe7c606a040 IN  0x05f9a290f0c4195fa09dd60c1f2acb4fe612c7890 MATIC0.065291206339 403.348343079
0x9e6c460d402717b97af2b2de0a24afe65ea692371458631bee57a0a1b2e9373dSet Token Data417114842023-04-19 14:02:2539 days 6 hrs ago0x83a5e9769c5d08aa7eb258c3b5728fe7c606a040 IN  0x05f9a290f0c4195fa09dd60c1f2acb4fe612c7890 MATIC0.057208306029 353.362360203
0xadeedb92ea4f7d5ed912727948879808159c9a80f22503d342e51ab8c5e5fe1bSet Token Data417114462023-04-19 14:00:0139 days 6 hrs ago0x83a5e9769c5d08aa7eb258c3b5728fe7c606a040 IN  0x05f9a290f0c4195fa09dd60c1f2acb4fe612c7890 MATIC0.057591009922 355.726232869
0xee996de9dae0bdbe6b318a482b7c649ee1c87000ba6d535683ff8371b35d6071Set Token Data417114372023-04-19 13:59:3739 days 6 hrs ago0x83a5e9769c5d08aa7eb258c3b5728fe7c606a040 IN  0x05f9a290f0c4195fa09dd60c1f2acb4fe612c7890 MATIC0.056820945096 350.969722083
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.

Similar Match Source Code
Note: This contract matches the deployed ByteCode of the Source Code for Contract 0xf951e0d3736bc3e045aff7b526113ce2f6b2d356

Contract Name:
Diamond

Compiler Version
v0.8.1+commit.df193b15

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 14 : Diamond.sol
/*
 * This file is part of the Qomet Technologies contracts (https://github.com/qomet-tech/contracts).
 * Copyright (c) 2022 Qomet Technologies (https://qomet.tech)
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, version 3.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */
// SPDX-License-Identifier: GNU General Public License v3.0

pragma solidity 0.8.1;

import "../facets/task-executor/TaskExecutorLib.sol";
import "./IAppRegistry.sol";
import "./IAuthz.sol";
import "./IDiamond.sol";
import "./IDiamondInitializer.sol";
import "./IDiamondFacet.sol";
import "./FacetManager.sol";

/// @author Kam Amini <[email protected]>
///
/// @notice Use at your own risk
library DiamondInfo {
    string public constant VERSION = "3.1.0";
}

contract Diamond is IDiamond, IDiamondInitializer {

    string private _name;
    string private _detailsURI;

    event FreezeAuthz();
    event AppInstall(address appRegistry, string name, string version);
    event AppRegistrySet(address appRegistry);

    struct Authz {
        bool frozen;
        address source;
        string domain;
        uint256[] acceptedResults;
        string hashSalt;
    }
    Authz private _authz;

    bytes4[] private _defaultSupportingInterfceIds;

    address private _appRegistry;

    address private _initializer;
    bool private _initialized;

    modifier mustBeInitialized {
        require(_initialized, "DMND:NI");
        _;
    }

    modifier notFrozenAuthz {
        require(!_authz.frozen, "DMND:AFRZN");
        _;
    }

    modifier mutatorAuthz {
        _authorizeCall(msg.sender, address(this), msg.sig, true);
        _;
    }

    modifier getterAuthz {
        _authorizeCall(msg.sender, address(this), msg.sig, false);
        _;
    }

    constructor(
        bytes4[] memory defaultSupportingInterfceIds,
        address initializer
    ) {
        _initialized = false;
        _authz.hashSalt = "Dwt2wb1d976h";
        _authz.acceptedResults.push(AuthzLib.ACCEPT_ACTION);
        _defaultSupportingInterfceIds = defaultSupportingInterfceIds;
        _initializer = initializer;
    }

    function initialize(
        string memory name,
        address taskManager,
        address appRegistry,
        address authzSource,
        string memory authzDomain,
        string[][2] memory defaultApps, // [0] > names, [1] > versions
        address[] memory defaultFacets,
        string[][2] memory defaultFuncSigsToProtectOrUnprotect, // [0] > protect, [1] > unprotect
        address[] memory defaultFacetsToFreeze,
        bool[3] memory instantLockAndFreezes // [0] > lock, [1] > freeze-authz, [2] > freeze-diamond
    ) external override {
        require(!_initialized, "DMND:AI");
        require(msg.sender == _initializer, "DMND:WI");
        _name = name;
        TaskExecutorLib._initialize(taskManager);
        __setAppRegistry(appRegistry);
        __setAuthzSource(authzSource);
        _authz.domain = authzDomain;
        require(defaultApps[0].length == defaultApps[1].length, "DMND:WL");
        for (uint256 i = 0; i < defaultApps[0].length; i++) {
            __installApp(
                defaultApps[0][i], // name
                defaultApps[1][i], // version
                false // don't delete current facets
            );
        }
        // install default facets
        for (uint256 i = 0; i < defaultFacets.length; i++) {
            FacetManagerLib._addFacet(defaultFacets[i]);
        }
        // protect default functions
        for (uint256 i = 0; i < defaultFuncSigsToProtectOrUnprotect[0].length; i++) {
            FacetManagerLib._protectFuncSig(
                defaultFuncSigsToProtectOrUnprotect[0][i],
                true // protect
            );
        }
        // unprotect default functions
        for (uint256 i = 0; i < defaultFuncSigsToProtectOrUnprotect[1].length; i++) {
            FacetManagerLib._protectFuncSig(
                defaultFuncSigsToProtectOrUnprotect[1][i],
                false // unprotect
            );
        }
        // lock the diamond if asked for
        if (instantLockAndFreezes[0]) {
            FacetManagerLib._setLocked(true);
        }
        // freeze facets
        for (uint256 i = 0; i < defaultFacetsToFreeze.length; i++) {
            FacetManagerLib._freezeFacet(defaultFacetsToFreeze[i]);
        }
        // freeze the authz settings if asked for
        if (instantLockAndFreezes[1]) {
            _authz.frozen = true;
        }
        // freeze the diamond if asked for
        if (instantLockAndFreezes[2]) {
            FacetManagerLib._freezeDiamond();
        }
        _initialized = true;
    }


    function supportsInterface(bytes4 interfaceId)
      public view override getterAuthz virtual returns (bool) {
        // Querying for IDiamond must always return true
        if (
            interfaceId == 0xd4bbd4bb ||
            interfaceId == type(IDiamond).interfaceId
        ) {
            return true;
        }
        // Querying for IDiamondFacet must always return false
        if (interfaceId == type(IDiamondFacet).interfaceId) {
            return false;
        }
        // Always return true
        if (interfaceId == type(IERC165).interfaceId) {
            return true;
        }
        address[] memory facets = FacetManagerLib._getFacets();
        for (uint256 i = 0; i < facets.length; i++) {
            address facet = facets[i];
            if (!FacetManagerLib._isFacetDeleted(facet) &&
                IDiamondFacet(facet).supportsInterface(interfaceId)) {
                return true;
            }
        }
        for (uint256 i = 0; i < _defaultSupportingInterfceIds.length; i++) {
            if (interfaceId == _defaultSupportingInterfceIds[i]) {
                return true;
            }
        }
        return false;
    }

    function isInitialized() external view returns (bool) {
        return _initialized;
    }

    function getDiamondName()
    external view virtual override mustBeInitialized getterAuthz returns (string memory) {
        return _name;
    }

    function getDiamondVersion()
    external view virtual override mustBeInitialized getterAuthz  returns (string memory) {
        return DiamondInfo.VERSION;
    }

    function setDiamondName(string memory name) external mustBeInitialized mutatorAuthz {
        _name = name;
    }

    function getDetailsURI()
    external view mustBeInitialized getterAuthz returns (string memory) {
        return _detailsURI;
    }

    function setDetailsURI(string memory detailsURI) external mustBeInitialized mutatorAuthz {
        _detailsURI = detailsURI;
    }

    function getTaskManager() external view mustBeInitialized getterAuthz returns (address) {
        return TaskExecutorLib._getTaskManager("DEFAULT");
    }

    function getAuthzSource() external view mustBeInitialized getterAuthz returns (address) {
        return _authz.source;
    }

    function setAuthzSource(
        address authzSource
    ) external mustBeInitialized notFrozenAuthz mutatorAuthz {
        __setAuthzSource(authzSource);
    }

    function getAuthzDomain() external view mustBeInitialized getterAuthz returns (string memory) {
        return _authz.domain;
    }

    function setAuthzDomain(
        string memory authzDomain
    ) external mustBeInitialized notFrozenAuthz mutatorAuthz {
        require(bytes(authzDomain).length > 0, "DMND:ED");
        _authz.domain = authzDomain;
    }

    function getAcceptedAuthzResults()
    external view mustBeInitialized getterAuthz returns (uint256[] memory) {
        return _authz.acceptedResults;
    }

    function setAcceptedAuthzResults(
        uint256[] memory acceptedAuthzResults
    ) external mustBeInitialized notFrozenAuthz mutatorAuthz {
        require(acceptedAuthzResults.length > 0, "DMND:EA");
        _authz.acceptedResults = acceptedAuthzResults;
    }

    function getAppRegistry() external view mustBeInitialized getterAuthz returns (address) {
        return _appRegistry;
    }

    function setAppRegistry(address appRegistry) external mustBeInitialized mutatorAuthz {
        __setAppRegistry(appRegistry);
    }

    function isDiamondFrozen() external view mustBeInitialized getterAuthz returns (bool) {
        return FacetManagerLib._isDiamondFrozen();
    }

    function freezeDiamond(
        string memory taskManagerKey,
        uint256 adminTaskId
    ) external mustBeInitialized mutatorAuthz {
        FacetManagerLib._freezeDiamond();
        TaskExecutorLib._executeAdminTask(taskManagerKey, adminTaskId);
    }

    function isFacetFrozen(address facet)
    external view mustBeInitialized getterAuthz returns (bool) {
        return FacetManagerLib._isFacetFrozen(facet);
    }

    function freezeFacet(
        string memory taskManagerKey,
        uint256 adminTaskId,
        address facet
    ) external mustBeInitialized mutatorAuthz {
        FacetManagerLib._freezeFacet(facet);
        TaskExecutorLib._executeAdminTask(taskManagerKey, adminTaskId);
    }

    function isAuthzFrozen() external view mustBeInitialized getterAuthz returns (bool) {
        return _authz.frozen;
    }

    function freezeAuthz(
        string memory taskManagerKey,
        uint256 adminTaskId
    ) external mustBeInitialized notFrozenAuthz mutatorAuthz {
        _authz.frozen = true;
        emit FreezeAuthz();
        TaskExecutorLib._executeAdminTask(taskManagerKey, adminTaskId);
    }

    function isDiamondLocked() external view mustBeInitialized getterAuthz returns (bool) {
        return FacetManagerLib._isDiamondLocked();
    }

    function setLocked(
        string memory taskManagerKey,
        uint256 taskId,
        bool locked
    ) external mustBeInitialized mutatorAuthz {
        FacetManagerLib._setLocked(locked);
        TaskExecutorLib._executeTask(taskManagerKey, taskId);
    }

    function getFacets()
    external view override mustBeInitialized getterAuthz returns (address[] memory) {
        return FacetManagerLib._getFacets();
    }

    function resolve(string[] memory funcSigs)
    external view mustBeInitialized getterAuthz returns (address[] memory) {
        return FacetManagerLib._resolve(funcSigs);
    }

    function areFuncSigsProtected(
        string[] memory funcSigs
    ) external view mustBeInitialized getterAuthz returns (bool[] memory) {
        return FacetManagerLib._areFuncSigsProtected(funcSigs);
    }

    function protectFuncSig(string memory funcSig, bool protect)
    external mustBeInitialized notFrozenAuthz mutatorAuthz {
        FacetManagerLib._protectFuncSig(funcSig, protect);
    }

    function addFacets(address[] memory facets) external mustBeInitialized mutatorAuthz {
        FacetManagerLib._addFacets(facets);
    }

    function deleteFacets(address[] memory facets) external mustBeInitialized mutatorAuthz {
        FacetManagerLib._deleteFacets(facets);
    }

    function replaceFacets(
        address[] memory toBeDeletedFacets,
        address[] memory toBeAddedFacets
    ) external mustBeInitialized mutatorAuthz {
        FacetManagerLib._replaceFacets(toBeDeletedFacets, toBeAddedFacets);
    }

    function deleteAllFacets() external mustBeInitialized mutatorAuthz {
        FacetManagerLib._deleteAllFacets();
    }

    function installApp(
        string memory appName,
        string memory appVersion,
        bool deleteCurrentFacets
    ) external mustBeInitialized mutatorAuthz {
        __installApp(appName, appVersion, deleteCurrentFacets);
    }

    function overrideFuncSigs(
        string[] memory funcSigs,
        address[] memory facets
    ) external mustBeInitialized mutatorAuthz {
        FacetManagerLib._overrideFuncSigs(funcSigs, facets);
    }

    function getOverridenFuncSigs()
    external view mustBeInitialized getterAuthz returns (string[] memory) {
        return FacetManagerLib._getOverridenFuncSigs();
    }

    function tryAuthorizeCall(
        address caller,
        string memory funcSig
    ) external view mustBeInitialized getterAuthz {
        address facet = FacetManagerLib._findFacet(msg.sig);
        bytes4 funcSelector = FacetManagerLib._getSelector(funcSig);
        _authorizeCall(caller, facet, funcSelector, false);
    }

    function _authorizeCall(
        address caller,
        address facet,
        bytes4 funcSelector,
        bool treatAsProtected
    ) internal view {
        if (!treatAsProtected && !FacetManagerLib._isSelectorProtected(funcSelector)) {
            return;
        }
        require(_authz.source != address(0), "DMND:ZA");
        bytes32 domainHash = keccak256(abi.encodePacked(_authz.hashSalt, _authz.domain));
        bytes32 callerHash = keccak256(abi.encodePacked(_authz.hashSalt, caller));
        bytes32[] memory targets = new bytes32[](3);
        targets[0] = keccak256(abi.encodePacked(_authz.hashSalt, address(this)));
        targets[1] = keccak256(abi.encodePacked(_authz.hashSalt, facet));
        targets[2] = keccak256(abi.encodePacked(_authz.hashSalt, funcSelector));
        uint256[] memory ops = new uint256[](1);
        ops[0] = AuthzLib.CALL_OP;
        uint256[] memory results = IAuthz(_authz.source)
            .authorize(
                domainHash,
                callerHash,
                targets,
                ops
            );
        for (uint256 i = 0; i < _authz.acceptedResults.length; i++) {
            for (uint256 j = 0; j < results.length; j++) {
                if (_authz.acceptedResults[i] == results[j]) {
                    return;
                }
            }
        }
        revert("DMND:NAUTH");
    }

    function __setAuthzSource(address authzSource) private {
        require(authzSource != address(0), "DMND:ZA");
        require(
            IERC165(authzSource).supportsInterface(type(IAuthz).interfaceId),
            "DMND:IAS"
        );
        _authz.source = authzSource;
    }

    function __setAppRegistry(address appRegistry) private {
        if (appRegistry != address(0)) {
            require(
                IERC165(appRegistry).supportsInterface(type(IAppRegistry).interfaceId),
                "DMND:IAR"
            );
        }
        _appRegistry = appRegistry;
        emit AppRegistrySet(_appRegistry);
    }

    function __installApp(
        string memory appName,
        string memory appVersion,
        bool deleteCurrentFacets
    ) private {
        require(_appRegistry != address(0), "DMND:ZAR");
        if (deleteCurrentFacets) {
            FacetManagerLib._deleteAllFacets();
        }
        address[] memory appFacets =
            IAppRegistry(_appRegistry).getAppFacets(appName, appVersion);
        for (uint256 i = 0; i < appFacets.length; i++) {
            FacetManagerLib._addFacet(appFacets[i]);
        }
        if (appFacets.length > 0) {
            emit AppInstall(_appRegistry, appName, appVersion);
        }
    }

    /* solhint-disable no-complex-fallback */
    fallback() external payable {
        require(_initialized, "DMND:NI");
        address facet = FacetManagerLib._findFacet(msg.sig);
        _authorizeCall(msg.sender, facet, msg.sig, false);
        /* solhint-disable no-inline-assembly */
        assembly {
            calldatacopy(0, 0, calldatasize())
            let result := delegatecall(gas(), facet, 0, calldatasize(), 0, 0)
            returndatacopy(0, 0, returndatasize())
            switch result
                case 0 {
                    revert(0, returndatasize())
                }
                default {
                    return(0, returndatasize())
                }
        }
        /* solhint-enable no-inline-assembly */
    }

    /* solhint-disable no-empty-blocks */
    receive() external payable {}
    /* solhint-enable no-empty-blocks */
}

File 2 of 14 : TaskExecutorLib.sol
/*
 * This file is part of the Qomet Technologies contracts (https://github.com/qomet-tech/contracts).
 * Copyright (c) 2022 Qomet Technologies (https://qomet.tech)
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, version 3.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */
// SPDX-License-Identifier: GNU General Public License v3.0

pragma solidity 0.8.1;

import "./TaskExecutorInternal.sol";

library TaskExecutorLib {

    function _initialize(
        address newTaskManager
    ) internal {
        TaskExecutorInternal._initialize(newTaskManager);
    }

    function _getTaskManager(
        string memory taskManagerKey
    ) internal view returns (address) {
        return TaskExecutorInternal._getTaskManager(taskManagerKey);
    }

    function _executeTask(
        string memory key,
        uint256 taskId
    ) internal {
        TaskExecutorInternal._executeTask(key, taskId);
    }

    function _executeAdminTask(
        string memory key,
        uint256 adminTaskId
    ) internal {
        TaskExecutorInternal._executeAdminTask(key, adminTaskId);
    }
}

File 3 of 14 : IAppRegistry.sol
/*
 * This file is part of the Qomet Technologies contracts (https://github.com/qomet-tech/contracts).
 * Copyright (c) 2022 Qomet Technologies (https://qomet.tech)
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, version 3.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */
// SPDX-License-Identifier: GNU General Public License v3.0

pragma solidity 0.8.1;

/// @author Kam Amini <[email protected]>
///
/// @notice Use at your own risk
interface IAppRegistry {

    function getAppFacets(
        string memory appName,
        string memory appVersion
    ) external view returns (address[] memory);
}

File 4 of 14 : IAuthz.sol
/*
 * This file is part of the Qomet Technologies contracts (https://github.com/qomet-tech/contracts).
 * Copyright (c) 2022 Qomet Technologies (https://qomet.tech)
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, version 3.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */
// SPDX-License-Identifier: GNU General Public License v3.0

pragma solidity 0.8.1;

library AuthzLib {

    uint256 public constant ROLE_AUTHZ_DIAMOND_ADMIN = uint256(keccak256(bytes("ROLE_AUTHZ_DIAMOND_ADMIN")));
    uint256 public constant ROLE_AUTHZ_ADMIN = uint256(keccak256(bytes("ROLE_AUTHZ_ADMIN")));

    bytes32 constant public GLOBAL_DOMAIN_ID = keccak256(abi.encodePacked("global"));
    bytes32 constant public MATCH_ALL_WILDCARD_HASH = keccak256(abi.encodePacked("*"));

    // operations
    uint256 constant public CALL_OP = 5000;
    uint256 constant public MATCH_ALL_WILDCARD_OP = 9999;

    // actions
    uint256 constant public ACCEPT_ACTION = 1;
    uint256 constant public REJECT_ACTION = 100;
}

/// @author Kam Amini <[email protected]>
///
/// @notice Use at your own risk
interface IAuthz {

    function authorize(
        bytes32 domainHash,
        bytes32 identityHash,
        bytes32[] memory targets,
        uint256[] memory ops
    ) external view returns (uint256[] memory);
}

File 5 of 14 : IDiamond.sol
/*
 * This file is part of the Qomet Technologies contracts (https://github.com/qomet-tech/contracts).
 * Copyright (c) 2022 Qomet Technologies (https://qomet.tech)
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, version 3.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */
// SPDX-License-Identifier: GNU General Public License v3.0

pragma solidity 0.8.1;

import "@openzeppelin/contracts/interfaces/IERC165.sol";

library DiamondLib {
    uint256 public constant ROLE_DIAMOND_ADMIN = uint256(keccak256(bytes("ROLE_DIAMOND_ADMIN")));
}

/// @author Kam Amini <[email protected]>
///
/// @notice Use at your own risk
interface IDiamond is IERC165 {

    function getDiamondName() external view returns (string memory);

    function getDiamondVersion() external view returns (string memory);

    function getFacets() external view returns (address[] memory);
}

File 6 of 14 : IDiamondInitializer.sol
/*
 * This file is part of the Qomet Technologies contracts (https://github.com/qomet-tech/contracts).
 * Copyright (c) 2022 Qomet Technologies (https://qomet.tech)
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, version 3.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */
// SPDX-License-Identifier: GNU General Public License v3.0

pragma solidity 0.8.1;

/// @author Kam Amini <[email protected]>
///
/// @notice Use at your own risk
interface IDiamondInitializer {

    function initialize(
        string memory name,
        address taskManager,
        address appRegistry,
        address authzSource,
        string memory authzDomain,
        string[][2] memory defaultApps, // [0] > names, [1] > versions
        address[] memory defaultFacets,
        string[][2] memory defaultFuncSigsToProtectOrUnprotect, // [0] > protect, [1] > unprotect
        address[] memory defaultFacetsToFreeze,
        bool[3] memory instantLockAndFreezes // [0] > lock, [1] > freeze-authz, [2] > freeze-diamond
    ) external;
}

File 7 of 14 : IDiamondFacet.sol
/*
 * This file is part of the Qomet Technologies contracts (https://github.com/qomet-tech/contracts).
 * Copyright (c) 2022 Qomet Technologies (https://qomet.tech)
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, version 3.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */
// SPDX-License-Identifier: GNU General Public License v3.0

pragma solidity 0.8.1;

import "@openzeppelin/contracts/interfaces/IERC165.sol";

/// @author Kam Amini <[email protected]>
///
/// @notice Use at your own risk
interface IDiamondFacet is IERC165 {

    // NOTE: The override MUST remain 'pure'.
    function getFacetName() external pure returns (string memory);

    // NOTE: The override MUST remain 'pure'.
    function getFacetVersion() external pure returns (string memory);

    // NOTE: The override MUST remain 'pure'.
    function getFacetPI() external pure returns (string[] memory);

    // NOTE: The override MUST remain 'pure'.
    function getFacetProtectedPI() external pure returns (string[] memory);
}

File 8 of 14 : FacetManager.sol
/*
 * This file is part of the Qomet Technologies contracts (https://github.com/qomet-tech/contracts).
 * Copyright (c) 2022 Qomet Technologies (https://qomet.tech)
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, version 3.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */
// SPDX-License-Identifier: GNU General Public License v3.0

pragma solidity 0.8.1;

import "./IDiamondFacet.sol";

/// @author Kam Amini <[email protected]>
///
/// @notice Use at your own risk. Just got the basic
///         idea from: https://github.com/solidstate-network/solidstate-solidity
library FacetManagerStorage {

    struct Layout {
        // true if diamond is frozen meaning it cannot be changed anymore.
        // ATTENTION! once frozen, one WILL NEVER be able to undo that.
        bool diamondFrozen;
        // true if diamond is locked, meaning it cannot be changed anymore.
        // diamonds can be unlocked.
        bool diamondLocked;
        // list of facet addersses
        address[] facets;
        mapping(address => uint256) facetsIndex;
        // facet address > true if marked as deleted
        mapping(address => bool) deletedFacets;
        // function selector > facet address
        mapping(bytes4 => address) selectorToFacetMap;
        // list of overriden function signatures
        string[] overridenFuncSigs;
        mapping(string => uint256) overridenFuncSigsIndex;
        // facet address > true if frozen
        mapping(address => bool) frozenFacets;
        // function signature > true if protected
        mapping(bytes4 => bool) protectedSelectorMap;
        // Extra fields (reserved for future)
        mapping(bytes32 => bytes) extra;
    }

    bytes32 internal constant STORAGE_SLOT =
        keccak256("qomet-tech.contracts.diamond.facet-manager.storage");

    function layout() internal pure returns (Layout storage s) {
        bytes32 slot = STORAGE_SLOT;
        /* solhint-disable no-inline-assembly */
        assembly {
            s.slot := slot
        }
        /* solhint-enable no-inline-assembly */
    }
}

library FacetManagerLib {

    event FacetAdd(address facet);
    event FacetDelete(address facet);
    event FreezeDiamond();
    event SetLocked(bool locked);
    event FuncSigOverride(string funcSig, address facet);
    event ProtectFuncSig(string funcSig, bool protect);

    function _isDiamondFrozen() internal view returns (bool) {
        return __s().diamondFrozen;
    }

    function _freezeDiamond() internal {
        require(!__s().diamondFrozen, "FMLIB:DFRZN");
        __s().diamondFrozen = true;
        emit FreezeDiamond();
    }

    function _isFacetFrozen(address facet) internal view returns (bool) {
        return __s().frozenFacets[facet];
    }

    function _freezeFacet(address facet) internal {
        require(!__s().diamondFrozen, "FMLIB:DFRZN");
        require(facet != address(0), "FMLIB:ZF");
        require(!__s().frozenFacets[facet], "FMLIB:FAF");
        __s().frozenFacets[facet] = true;
    }

    function _isDiamondLocked() internal view returns (bool) {
        return __s().diamondLocked;
    }

    function _setLocked(bool locked) internal {
        require(!__s().diamondFrozen, "FMLIB:DFRZN");
        __s().diamondLocked = locked;
        emit SetLocked(locked);
    }

    function _getFacets() internal view returns (address[] memory) {
        uint256 count = 0;
        for (uint256 i = 0; i < __s().facets.length; i++) {
            if (!__s().deletedFacets[__s().facets[i]]) {
                count += 1;
            }
        }
        address[] memory facets = new address[](count);
        uint256 index = 0;
        for (uint256 i = 0; i < __s().facets.length; i++) {
            if (!__s().deletedFacets[__s().facets[i]]) {
                facets[index] = __s().facets[i];
                index += 1;
            }
        }
        return facets;
    }

    function _resolve(string[] memory funcSigs) internal view returns (address[] memory) {
        address[] memory facets = new address[](funcSigs.length);
        for (uint256 i = 0; i < funcSigs.length; i++) {
            string memory funcSig = funcSigs[i];
            bytes4 selector = _getSelector(funcSig);
            facets[i] = __s().selectorToFacetMap[selector];
            if (__s().deletedFacets[facets[i]]) {
                facets[i] = address(0);
            }
        }
        return facets;
    }

    function _areFuncSigsProtected(
        string[] memory funcSigs
    ) internal view returns (bool[] memory) {
        bool[] memory results = new bool[](funcSigs.length);
        for (uint256 i = 0; i < funcSigs.length; i++) {
            string memory funcSig = funcSigs[i];
            bytes4 selector = _getSelector(funcSig);
            results[i] = __s().protectedSelectorMap[selector];
        }
        return results;
    }

    function _protectFuncSig(
        string memory funcSig,
        bool protect
    ) internal {
        require(!__s().diamondLocked, "FMLIB:LCKD");
        __protectFuncSig(funcSig, protect);
    }

    function _isSelectorProtected(bytes4 funcSelector) internal view returns (bool) {
        return __s().protectedSelectorMap[funcSelector];
    }

    function _addFacets(address[] memory facets) internal {
        require(!__s().diamondFrozen, "FMLIB:DFRZN");
        require(!__s().diamondLocked, "FMLIB:LCKD");
        require(facets.length > 0, "FMLIB:ZL");
        for (uint256 i = 0; i < facets.length; i++) {
            _addFacet(facets[i]);
        }
    }

    function _deleteFacets(address[] memory facets) internal {
        require(!__s().diamondFrozen, "FMLIB:DFRZN");
        require(!__s().diamondLocked, "FMLIB:LCKD");
        require(facets.length > 0, "FMLIB:ZL");
        for (uint256 i = 0; i < facets.length; i++) {
            __deleteFacet(facets[i]);
        }
    }

    function _replaceFacets(
        address[] memory toBeDeletedFacets,
        address[] memory toBeAddedFacets
    ) internal {
        _deleteFacets(toBeDeletedFacets);
        _addFacets(toBeAddedFacets);
    }

    function _isFacetDeleted(address facet) internal view returns (bool) {
        return __s().deletedFacets[facet];
    }

    function _deleteAllFacets() internal {
        require(!__s().diamondFrozen, "FMLIB:DFRZN");
        require(!__s().diamondLocked, "FMLIB:LCKD");
        for (uint256 i = 0; i < __s().facets.length; i++) {
            __deleteFacet(__s().facets[i]);
        }
    }

    function _overrideFuncSigs(
        string[] memory funcSigs,
        address[] memory facets
    ) internal {
        require(!__s().diamondFrozen, "FMLIB:DFRZN");
        require(!__s().diamondLocked, "FMLIB:LCKD");
        __overrideFuncSigs(funcSigs, facets);
    }

    function _getOverridenFuncSigs() internal view returns (string[] memory) {
        return __s().overridenFuncSigs;
    }

    function _findFacet(bytes4 selector) internal view returns (address) {
        address facet = __s().selectorToFacetMap[selector];
        require(facet != address(0), "FMLIB:FNF");
        require(!__s().deletedFacets[facet], "FMLIB:FREM");
        return facet;
    }

    function _addFacet(address facet) internal {
        require(!__s().diamondFrozen, "FMLIB:DFRZN");
        require(!__s().diamondLocked, "FMLIB:LCKD");
        require(facet != address(0), "FMLIB:ZF");
        require(
            IDiamondFacet(facet).supportsInterface(type(IDiamondFacet).interfaceId),
            "FMLIB:IF"
        );
        string[] memory funcSigs = IDiamondFacet(facet).getFacetPI();
        for (uint256 i = 0; i < funcSigs.length; i++) {
            string memory funcSig = funcSigs[i];
            bytes4 selector = _getSelector(funcSig);
            address currentFacet = __s().selectorToFacetMap[selector];
            if (currentFacet != address(0)) {
                // current facet must not be frozen
                require(!__s().frozenFacets[currentFacet], "FMLIB:FF");
            }
            __s().selectorToFacetMap[selector] = facet;
            __protectFuncSig(funcSig, false);
        }
        string[] memory protectedFuncSigs = IDiamondFacet(facet).getFacetProtectedPI();
        for (uint256 i = 0; i < protectedFuncSigs.length; i++) {
            string memory protectedFuncSig = protectedFuncSigs[i];
            __protectFuncSig(protectedFuncSig, true);
        }
        __s().deletedFacets[facet] = false;
        // update facets array
        if (__s().facetsIndex[facet] == 0) {
            __s().facets.push(facet);
            __s().facetsIndex[facet] = __s().facets.length;
        }
        emit FacetAdd(facet);
    }

    function _getSelector(string memory funcSig) internal pure returns (bytes4) {
        bytes memory funcSigBytes = bytes(funcSig);
        for (uint256 i = 0; i < funcSigBytes.length; i++) {
            bytes1 b = funcSigBytes[i];
            if (
                !(b >= 0x30 && b <= 0x39) && // [0-9]
                !(b >= 0x41 && b <= 0x5a) && // [A-Z]
                !(b >= 0x61 && b <= 0x7a) && // [a-z]
                 b != 0x24 && // $
                 b != 0x5f && // _
                 b != 0x2c && // ,
                 b != 0x28 && // (
                 b != 0x29 && // )
                 b != 0x5b && // [
                 b != 0x5d    // ]
            ) {
                revert("FMLIB:IFS");
            }
        }
        return bytes4(keccak256(bytes(funcSig)));
    }

    function __deleteFacet(address facet) private {
        require(facet != address(0), "FMLIB:ZF");
        require(!__s().frozenFacets[facet], "FMLIB:FF");
        __s().deletedFacets[facet] = true;
        emit FacetDelete(facet);
    }

    function __overrideFuncSigs(
        string[] memory funcSigs,
        address[] memory facets
    ) private {
        require(funcSigs.length > 0, "FMLIB:ZL");
        require(funcSigs.length == facets.length, "FMLIB:IL");
        for (uint i = 0; i < funcSigs.length; i++) {
            string memory funcSig = funcSigs[i];
            address facet = facets[i];
            bytes4 selector = _getSelector(funcSig);
            address currentFacet = __s().selectorToFacetMap[selector];
            if (currentFacet != address(0)) {
                // current facet must not be frozen
                require(!__s().frozenFacets[currentFacet], "FMLIB:FF");
            }
            __s().selectorToFacetMap[selector] = facet;
            __s().deletedFacets[facet] = false;
            if (__s().overridenFuncSigsIndex[funcSig] == 0) {
                __s().overridenFuncSigs.push(funcSig);
                __s().overridenFuncSigsIndex[funcSig] = __s().overridenFuncSigs.length;
            }
            emit FuncSigOverride(funcSig, facet);
        }
    }

    function __protectFuncSig(string memory funcSig, bool protect) private {
        bytes4 selector = _getSelector(funcSig);
        bool oldValue = __s().protectedSelectorMap[selector];
        __s().protectedSelectorMap[selector] = protect;
        if (oldValue != protect) {
            emit ProtectFuncSig(funcSig, protect);
        }
    }

    function __s() private pure returns (FacetManagerStorage.Layout storage) {
        return FacetManagerStorage.layout();
    }
}

File 9 of 14 : TaskExecutorInternal.sol
/*
 * This file is part of the Qomet Technologies contracts (https://github.com/qomet-tech/contracts).
 * Copyright (c) 2022 Qomet Technologies (https://qomet.tech)
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, version 3.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */
// SPDX-License-Identifier: GNU General Public License v3.0

pragma solidity 0.8.1;

import "@openzeppelin/contracts/interfaces/IERC165.sol";
import "../hasher/HasherLib.sol";
import "./ITaskExecutor.sol";
import "./TaskExecutorStorage.sol";

library TaskExecutorInternal {

    event TaskManagerSet (
        string key,
        address taskManager
    );

    function _initialize(
        address newTaskManager
    ) internal {
        require(!__s().initialized, "TFI:AI");
        __setTaskManager("DEFAULT", newTaskManager);
        __s().initialized = true;
    }

    function _getTaskManagerKeys() internal view returns (string[] memory) {
        return __s().keys;
    }

    function _getTaskManager(string memory key) internal view returns (address) {
        bytes32 keyHash = HasherLib._hashStr(key);
        require(__s().keysIndex[keyHash] > 0, "TFI:KNF");
        return __s().taskManagers[keyHash];
    }

    function _setTaskManager(
        uint256 adminTaskId,
        string memory key,
        address newTaskManager
    ) internal {
        require(__s().initialized, "TFI:NI");
        bytes32 keyHash = HasherLib._hashStr(key);
        address oldTaskManager = __s().taskManagers[keyHash];
        __setTaskManager(key, newTaskManager);
        if (oldTaskManager != address(0)) {
            ITaskExecutor(oldTaskManager).executeAdminTask(msg.sender, adminTaskId);
        } else {
            address defaultTaskManager = _getTaskManager("DEFAULT");
            require(defaultTaskManager != address(0), "TFI:ZDTM");
            ITaskExecutor(defaultTaskManager).executeAdminTask(msg.sender, adminTaskId);
        }
    }

    function _executeTask(
        string memory key,
        uint256 taskId
    ) internal {
        require(__s().initialized, "TFI:NI");
        address taskManager = _getTaskManager(key);
        require(taskManager != address(0), "TFI:ZTM");
        ITaskExecutor(taskManager).executeTask(msg.sender, taskId);
    }

    function _executeAdminTask(
        string memory key,
        uint256 adminTaskId
    ) internal {
        require(__s().initialized, "TFI:NI");
        address taskManager = _getTaskManager(key);
        require(taskManager != address(0), "TFI:ZTM");
        ITaskExecutor(taskManager).executeAdminTask(msg.sender, adminTaskId);
    }

    function __setTaskManager(
        string memory key,
        address newTaskManager
    ) internal {
        require(newTaskManager != address(0), "TFI:ZA");
        require(IERC165(newTaskManager).supportsInterface(type(ITaskExecutor).interfaceId),
            "TFI:IC");
        bytes32 keyHash = HasherLib._hashStr(key);
        if (__s().keysIndex[keyHash] == 0) {
            __s().keys.push(key);
            __s().keysIndex[keyHash] = __s().keys.length;
        }
        __s().taskManagers[keyHash] = newTaskManager;
        emit TaskManagerSet(key, newTaskManager);
    }

    function __s() private pure returns (TaskExecutorStorage.Layout storage) {
        return TaskExecutorStorage.layout();
    }
}

File 10 of 14 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC165.sol)

pragma solidity ^0.8.0;

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

File 11 of 14 : HasherLib.sol
/*
 * This file is part of the Qomet Technologies contracts (https://github.com/qomet-tech/contracts).
 * Copyright (c) 2022 Qomet Technologies (https://qomet.tech)
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, version 3.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */
// SPDX-License-Identifier: GNU General Public License v3.0

pragma solidity 0.8.1;

library HasherLib {

    function _hashAddress(address addr) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked(addr));
    }

    function _hashStr(string memory str) internal pure returns (bytes32) {
        return keccak256(bytes(str));
    }

    function _hashInt(uint256 num) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("INT", num));
    }

    function _hashAccount(address account) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("ACCOUNT", account));
    }

    function _hashVault(address vault) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("VAULT", vault));
    }

    function _hashReserveId(uint256 reserveId) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("RESERVEID", reserveId));
    }

    function _hashContract(address contractAddr) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("CONTRACT", contractAddr));
    }

    function _hashTokenId(uint256 tokenId) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("TOKENID", tokenId));
    }

    function _hashRole(string memory roleName) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("ROLE", roleName));
    }

    function _hashLedgerId(uint256 ledgerId) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("LEDGERID", ledgerId));
    }

    function _mixHash2(
        bytes32 d1,
        bytes32 d2
    ) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("MIX2_", d1, d2));
    }

    function _mixHash3(
        bytes32 d1,
        bytes32 d2,
        bytes32 d3
    ) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("MIX3_", d1, d2, d3));
    }

    function _mixHash4(
        bytes32 d1,
        bytes32 d2,
        bytes32 d3,
        bytes32 d4
    ) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("MIX4_", d1, d2, d3, d4));
    }
}

File 12 of 14 : ITaskExecutor.sol
/*
 * This file is part of the Qomet Technologies contracts (https://github.com/qomet-tech/contracts).
 * Copyright (c) 2022 Qomet Technologies (https://qomet.tech)
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, version 3.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */
// SPDX-License-Identifier: GNU General Public License v3.0

pragma solidity 0.8.1;

/// @author Kam Amini <[email protected]>
///
/// @notice Use at your own risk
interface ITaskExecutor {

    event TaskExecuted(address finalizer, address executor, uint256 taskId);

    function executeTask(address executor, uint256 taskId) external;

    function executeAdminTask(address executor, uint256 taskId) external;
}

File 13 of 14 : TaskExecutorStorage.sol
/*
 * This file is part of the Qomet Technologies contracts (https://github.com/qomet-tech/contracts).
 * Copyright (c) 2022 Qomet Technologies (https://qomet.tech)
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, version 3.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */
// SPDX-License-Identifier: GNU General Public License v3.0

pragma solidity 0.8.1;

/// @author Kam Amini <[email protected]>
///
/// @notice Use at your own risk. Just got the basic
///         idea from: https://github.com/solidstate-network/solidstate-solidity
library TaskExecutorStorage {

    struct Layout {
        // list of the keys
        string[] keys;
        mapping(bytes32 => uint256) keysIndex;
        // keccak256(key) > task manager address
        mapping(bytes32 => address) taskManagers;
        // true if default task manager has been set
        bool initialized;
        mapping(bytes32 => bytes) extra;
    }

    bytes32 internal constant STORAGE_SLOT =
        keccak256("qomet-tech.contracts.facets.task-finalizer.storage");

    function layout() internal pure returns (Layout storage s) {
        bytes32 slot = STORAGE_SLOT;
        /* solhint-disable no-inline-assembly */
        assembly {
            s.slot := slot
        }
        /* solhint-enable no-inline-assembly */
    }
}

File 14 of 14 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"bytes4[]","name":"defaultSupportingInterfceIds","type":"bytes4[]"},{"internalType":"address","name":"initializer","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"appRegistry","type":"address"},{"indexed":false,"internalType":"string","name":"name","type":"string"},{"indexed":false,"internalType":"string","name":"version","type":"string"}],"name":"AppInstall","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"appRegistry","type":"address"}],"name":"AppRegistrySet","type":"event"},{"anonymous":false,"inputs":[],"name":"FreezeAuthz","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[{"internalType":"address[]","name":"facets","type":"address[]"}],"name":"addFacets","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string[]","name":"funcSigs","type":"string[]"}],"name":"areFuncSigsProtected","outputs":[{"internalType":"bool[]","name":"","type":"bool[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"deleteAllFacets","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"facets","type":"address[]"}],"name":"deleteFacets","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"taskManagerKey","type":"string"},{"internalType":"uint256","name":"adminTaskId","type":"uint256"}],"name":"freezeAuthz","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"taskManagerKey","type":"string"},{"internalType":"uint256","name":"adminTaskId","type":"uint256"}],"name":"freezeDiamond","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"taskManagerKey","type":"string"},{"internalType":"uint256","name":"adminTaskId","type":"uint256"},{"internalType":"address","name":"facet","type":"address"}],"name":"freezeFacet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getAcceptedAuthzResults","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAppRegistry","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAuthzDomain","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAuthzSource","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDetailsURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDiamondName","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDiamondVersion","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getFacets","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getOverridenFuncSigs","outputs":[{"internalType":"string[]","name":"","type":"string[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTaskManager","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"address","name":"taskManager","type":"address"},{"internalType":"address","name":"appRegistry","type":"address"},{"internalType":"address","name":"authzSource","type":"address"},{"internalType":"string","name":"authzDomain","type":"string"},{"internalType":"string[][2]","name":"defaultApps","type":"string[][2]"},{"internalType":"address[]","name":"defaultFacets","type":"address[]"},{"internalType":"string[][2]","name":"defaultFuncSigsToProtectOrUnprotect","type":"string[][2]"},{"internalType":"address[]","name":"defaultFacetsToFreeze","type":"address[]"},{"internalType":"bool[3]","name":"instantLockAndFreezes","type":"bool[3]"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"appName","type":"string"},{"internalType":"string","name":"appVersion","type":"string"},{"internalType":"bool","name":"deleteCurrentFacets","type":"bool"}],"name":"installApp","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"isAuthzFrozen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isDiamondFrozen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isDiamondLocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"facet","type":"address"}],"name":"isFacetFrozen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isInitialized","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string[]","name":"funcSigs","type":"string[]"},{"internalType":"address[]","name":"facets","type":"address[]"}],"name":"overrideFuncSigs","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"funcSig","type":"string"},{"internalType":"bool","name":"protect","type":"bool"}],"name":"protectFuncSig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"toBeDeletedFacets","type":"address[]"},{"internalType":"address[]","name":"toBeAddedFacets","type":"address[]"}],"name":"replaceFacets","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string[]","name":"funcSigs","type":"string[]"}],"name":"resolve","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"acceptedAuthzResults","type":"uint256[]"}],"name":"setAcceptedAuthzResults","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"appRegistry","type":"address"}],"name":"setAppRegistry","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"authzDomain","type":"string"}],"name":"setAuthzDomain","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"authzSource","type":"address"}],"name":"setAuthzSource","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"detailsURI","type":"string"}],"name":"setDetailsURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"}],"name":"setDiamondName","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"taskManagerKey","type":"string"},{"internalType":"uint256","name":"taskId","type":"uint256"},{"internalType":"bool","name":"locked","type":"bool"}],"name":"setLocked","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"caller","type":"address"},{"internalType":"string","name":"funcSig","type":"string"}],"name":"tryAuthorizeCall","outputs":[],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

60806040523480156200001157600080fd5b50604051620051883803806200518883398101604081905262000034916200026d565b6008805460ff60a01b1916905560408051808201909152600c8082526b088eee864eec462c8726e6cd60a31b60209092019182526200007691600591620000e8565b5060048054600181810183556000929092527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b01558151620000c090600690602085019062000177565b50600880546001600160a01b0319166001600160a01b039290921691909117905550620003a7565b828054620000f69062000354565b90600052602060002090601f0160209004810192826200011a576000855562000165565b82601f106200013557805160ff191683800117855562000165565b8280016001018555821562000165579182015b828111156200016557825182559160200191906001019062000148565b506200017392915062000220565b5090565b82805482825590600052602060002090600701600890048101928215620001655791602002820160005b83821115620001e457835183826101000a81548163ffffffff021916908360e01c02179055509260200192600401602081600301049283019260010302620001a1565b8015620002165782816101000a81549063ffffffff0219169055600401602081600301049283019260010302620001e4565b5050620001739291505b5b8082111562000173576000815560010162000221565b80516001600160a01b03811681146200024f57600080fd5b919050565b80516001600160e01b0319811681146200024f57600080fd5b6000806040838503121562000280578182fd5b82516001600160401b038082111562000297578384fd5b818501915085601f830112620002ab578384fd5b8151602082821115620002c257620002c262000391565b808202604051601f19603f83011681018181108682111715620002e957620002e962000391565b604052838152828101945085830182870184018b101562000308578889fd5b8896505b848710156200033557620003208162000254565b8652600196909601959483019483016200030c565b50965062000347905087820162000237565b9450505050509250929050565b6002810460018216806200036957607f821691505b602082108114156200038b57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b614dd180620003b76000396000f3fe60806040526004361061021e5760003560e01c8063866c535a11610123578063b7886c69116100ab578063da591dd21161006f578063da591dd214610682578063e1adb54114610697578063eac4d57e146106b9578063f63b653d146106d9578063f7cf890d146106f957610225565b8063b7886c69146105e2578063b85ba3b714610602578063ba262ec314610622578063c101446214610642578063d9ad72551461066257610225565b8063a48929d1116100f2578063a48929d114610558578063a4f400de14610578578063a60a20c514610598578063b4ff8ff1146105ad578063b57368db146105c257610225565b8063866c535a146104e1578063884a8f00146105015780638f001106146105165780639e0d9df71461054357610225565b806358b54dc5116101a65780637476cf52116101755780637476cf521461044857806374e3d9491461045d5780637dc8ac8c1461047f578063802bfd1b146104a1578063823d7303146104c157610225565b806358b54dc5146103c457806358eebefa146103e4578063662ea47d146104045780636e1c5ac21461042657610225565b806315fe9226116101ed57806315fe92261461033a578063341f50371461035a57806334936af41461037a578063392e53cd1461039a578063575fefb3146103af57610225565b806301ffc9a7146102ad5780631096553d146102e357806310f6f7c514610305578063111106d21461031a57610225565b3661022557005b600854600160a01b900460ff166102575760405162461bcd60e51b815260040161024e90614855565b60405180910390fd5b600061026e6000356001600160e01b03191661070e565b905061028933826000356001600160e01b03191660006107ac565b3660008037600080366000845af43d6000803e8080156102a8573d6000f35b3d6000fd5b3480156102b957600080fd5b506102cd6102c836600461412a565b610b29565b6040516102da919061473f565b60405180910390f35b3480156102ef57600080fd5b506103036102fe366004614008565b610d4b565b005b34801561031157600080fd5b506102cd610de8565b34801561032657600080fd5b5061030361033536600461437b565b610e37565b34801561034657600080fd5b50610303610355366004613d48565b610e8b565b34801561036657600080fd5b50610303610375366004614152565b610efc565b34801561038657600080fd5b50610303610395366004614184565b610f95565b3480156103a657600080fd5b506102cd61129f565b3480156103bb57600080fd5b506103036112af565b3480156103d057600080fd5b506102cd6103df366004613d48565b6112fb565b3480156103f057600080fd5b506103036103ff366004613e8a565b611349565b34801561041057600080fd5b50610419611395565b6040516102da9190614645565b34801561043257600080fd5b5061043b6113e7565b6040516102da91906146cc565b34801561045457600080fd5b506102cd611434565b34801561046957600080fd5b50610472611481565b6040516102da91906145d8565b34801561048b57600080fd5b506104946114ee565b6040516102da91906147c6565b3480156104ad57600080fd5b506103036104bc366004613d48565b6115c3565b3480156104cd57600080fd5b506103036104dc366004613db8565b61160e565b3480156104ed57600080fd5b506103036104fc36600461440a565b611659565b34801561050d57600080fd5b506104946116b3565b34801561052257600080fd5b50610536610531366004613ee0565b611705565b6040516102da9190614692565b34801561054f57600080fd5b50610472611753565b34801561056457600080fd5b50610303610573366004614152565b6117ad565b34801561058457600080fd5b5061030361059336600461437b565b611802565b3480156105a457600080fd5b506102cd6118a7565b3480156105b957600080fd5b506104726118f4565b3480156105ce57600080fd5b506103036105dd366004613db8565b611949565b3480156105ee57600080fd5b506103036105fd366004614307565b611994565b34801561060e57600080fd5b5061030361061d3660046143bd565b6119e1565b34801561062e57600080fd5b5061030361063d366004614152565b611a36565b34801561064e57600080fd5b5061041961065d366004613ee0565b611a8b565b34801561066e57600080fd5b5061030361067d3660046142b8565b611ad9565b34801561068e57600080fd5b50610494611b48565b3480156106a357600080fd5b506106ac611b9a565b6040516102da919061472c565b3480156106c557600080fd5b506103036106d4366004613fd4565b611c31565b3480156106e557600080fd5b506103036106f4366004613d6b565b611c7d565b34801561070557600080fd5b50610494611cf2565b600080610719611d57565b6001600160e01b03198416600090815260049190910160205260409020546001600160a01b031690508061075f5760405162461bcd60e51b815260040161024e90614a0c565b610767611d57565b6001600160a01b0382166000908152600391909101602052604090205460ff16156107a45760405162461bcd60e51b815260040161024e90614b5b565b90505b919050565b801580156107c057506107be82611d61565b155b156107ca57610b23565b60025461010090046001600160a01b03166107f75760405162461bcd60e51b815260040161024e90614876565b60405160009061080f906005906003906020016145c3565b60408051601f19818403018152908290528051602091820120925060009161083c91600591899101614571565b60408051601f198184030181528282528051602091820120600380855260808501909352935060009291908201606080368337505060405191925061088991600591503090602001614571565b60405160208183030381529060405280519060200120816000815181106108c057634e487b7160e01b600052603260045260246000fd5b6020026020010181815250506002600301866040516020016108e3929190614571565b604051602081830303815290604052805190602001208160018151811061091a57634e487b7160e01b600052603260045260246000fd5b60200260200101818152505060026003018560405160200161093d92919061459e565b604051602081830303815290604052805190602001208160028151811061097457634e487b7160e01b600052603260045260246000fd5b6020908102919091010152604080516001808252818301909252600091816020016020820280368337019050509050611388816000815181106109c757634e487b7160e01b600052603260045260246000fd5b6020908102919091010152600254604051631c0d022d60e21b815260009161010090046001600160a01b03169063703408b490610a0e90889088908890889060040161474a565b60006040518083038186803b158015610a2657600080fd5b505afa158015610a3a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610a62919081019061408b565b905060005b600454811015610b0a5760005b8251811015610af757828181518110610a9d57634e487b7160e01b600052603260045260246000fd5b6020026020010151600280018381548110610ac857634e487b7160e01b600052603260045260246000fd5b90600052602060002001541415610ae55750505050505050610b23565b80610aef81614d31565b915050610a74565b5080610b0281614d31565b915050610a67565b5060405162461bcd60e51b815260040161024e90614bc3565b50505050565b6000610b4433306000356001600160e01b03191660006107ac565b63d4bbd4bb60e01b6001600160e01b031983161480610b7357506001600160e01b031982166325dc185160e11b145b15610b80575060016107a7565b6001600160e01b0319821663b2fe033560e01b1415610ba1575060006107a7565b6001600160e01b031982166301ffc9a760e01b1415610bc2575060016107a7565b6000610bcc611d91565b905060005b8151811015610cb7576000828281518110610bfc57634e487b7160e01b600052603260045260246000fd5b60200260200101519050610c0f81611fa5565b158015610c9357506040516301ffc9a760e01b81526001600160a01b038216906301ffc9a790610c439088906004016147b1565b60206040518083038186803b158015610c5b57600080fd5b505afa158015610c6f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c93919061410e565b15610ca457600193505050506107a7565b5080610caf81614d31565b915050610bd1565b5060005b600654811015610d415760068181548110610ce657634e487b7160e01b600052603260045260246000fd5b90600052602060002090600891828204019190066004029054906101000a900460e01b6001600160e01b031916846001600160e01b0319161415610d2f576001925050506107a7565b80610d3981614d31565b915050610cbb565b5060009392505050565b600854600160a01b900460ff16610d745760405162461bcd60e51b815260040161024e90614855565b60025460ff1615610d975760405162461bcd60e51b815260040161024e906148fe565b610db033306000356001600160e01b03191660016107ac565b6000815111610dd15760405162461bcd60e51b815260040161024e90614a2f565b8051610de4906004906020840190613aaa565b5050565b600854600090600160a01b900460ff16610e145760405162461bcd60e51b815260040161024e90614855565b610e2d33306000356001600160e01b03191660006107ac565b5060025460ff1690565b600854600160a01b900460ff16610e605760405162461bcd60e51b815260040161024e90614855565b610e7933306000356001600160e01b03191660016107ac565b610e81611fd4565b610de48282612041565b600854600160a01b900460ff16610eb45760405162461bcd60e51b815260040161024e90614855565b60025460ff1615610ed75760405162461bcd60e51b815260040161024e906148fe565b610ef033306000356001600160e01b03191660016107ac565b610ef98161204b565b50565b600854600160a01b900460ff16610f255760405162461bcd60e51b815260040161024e90614855565b60025460ff1615610f485760405162461bcd60e51b815260040161024e906148fe565b610f6133306000356001600160e01b03191660016107ac565b6000815111610f825760405162461bcd60e51b815260040161024e906149eb565b8051610de4906003906020840190613af5565b600854600160a01b900460ff1615610fbf5760405162461bcd60e51b815260040161024e906149ca565b6008546001600160a01b03163314610fe95760405162461bcd60e51b815260040161024e90614922565b8951610ffc9060009060208d0190613af5565b5061100689612138565b61100f88612141565b6110188761204b565b855161102b906003906020890190613af5565b50602085015151855151146110525760405162461bcd60e51b815260040161024e906148dd565b60005b8551518110156110f457855180516110e291908390811061108657634e487b7160e01b600052603260045260246000fd5b6020026020010151876001600281106110af57634e487b7160e01b600052603260045260246000fd5b602002015183815181106110d357634e487b7160e01b600052603260045260246000fd5b6020026020010151600061224b565b806110ec81614d31565b915050611055565b5060005b84518110156111435761113185828151811061112457634e487b7160e01b600052603260045260246000fd5b60200260200101516123a2565b8061113b81614d31565b9150506110f8565b5060005b835151811015611199578351805161118791908390811061117857634e487b7160e01b600052603260045260246000fd5b60200260200101516001612834565b8061119181614d31565b915050611147565b5060005b6020840151518110156111f5576111e3846001602002015182815181106111d457634e487b7160e01b600052603260045260246000fd5b60200260200101516000612834565b806111ed81614d31565b91505061119d565b5080511561120757611207600161286c565b60005b82518110156112555761124383828151811061123657634e487b7160e01b600052603260045260246000fd5b60200260200101516128e4565b8061124d81614d31565b91505061120a565b5060208101511561126e576002805460ff191660011790555b60408101511561128057611280611fd4565b50506008805460ff60a01b1916600160a01b1790555050505050505050565b600854600160a01b900460ff1690565b600854600160a01b900460ff166112d85760405162461bcd60e51b815260040161024e90614855565b6112f133306000356001600160e01b03191660016107ac565b6112f96129b1565b565b600854600090600160a01b900460ff166113275760405162461bcd60e51b815260040161024e90614855565b61134033306000356001600160e01b03191660006107ac565b6107a482612a77565b600854600160a01b900460ff166113725760405162461bcd60e51b815260040161024e90614855565b61138b33306000356001600160e01b03191660016107ac565b610de48282612aa6565b600854606090600160a01b900460ff166113c15760405162461bcd60e51b815260040161024e90614855565b6113da33306000356001600160e01b03191660006107ac565b6113e2611d91565b905090565b600854606090600160a01b900460ff166114135760405162461bcd60e51b815260040161024e90614855565b61142c33306000356001600160e01b03191660006107ac565b6113e2612ab8565b600854600090600160a01b900460ff166114605760405162461bcd60e51b815260040161024e90614855565b61147933306000356001600160e01b03191660006107ac565b6113e2612b9a565b600854600090600160a01b900460ff166114ad5760405162461bcd60e51b815260040161024e90614855565b6114c633306000356001600160e01b03191660006107ac565b6113e2604051806040016040528060078152602001661111519055531560ca1b815250612bad565b600854606090600160a01b900460ff1661151a5760405162461bcd60e51b815260040161024e90614855565b61153333306000356001600160e01b03191660006107ac565b6003805461154090614cf6565b80601f016020809104026020016040519081016040528092919081815260200182805461156c90614cf6565b80156115b95780601f1061158e576101008083540402835291602001916115b9565b820191906000526020600020905b81548152906001019060200180831161159c57829003601f168201915b5050505050905090565b600854600160a01b900460ff166115ec5760405162461bcd60e51b815260040161024e90614855565b61160533306000356001600160e01b03191660016107ac565b610ef981612141565b600854600160a01b900460ff166116375760405162461bcd60e51b815260040161024e90614855565b61165033306000356001600160e01b03191660016107ac565b610ef981612bb8565b600854600160a01b900460ff166116825760405162461bcd60e51b815260040161024e90614855565b61169b33306000356001600160e01b03191660016107ac565b6116a48161286c565b6116ae8383612c71565b505050565b600854606090600160a01b900460ff166116df5760405162461bcd60e51b815260040161024e90614855565b6116f833306000356001600160e01b03191660006107ac565b6001805461154090614cf6565b600854606090600160a01b900460ff166117315760405162461bcd60e51b815260040161024e90614855565b61174a33306000356001600160e01b03191660006107ac565b6107a482612c7b565b600854600090600160a01b900460ff1661177f5760405162461bcd60e51b815260040161024e90614855565b61179833306000356001600160e01b03191660006107ac565b5060025461010090046001600160a01b031690565b600854600160a01b900460ff166117d65760405162461bcd60e51b815260040161024e90614855565b6117ef33306000356001600160e01b03191660016107ac565b8051610de4906001906020840190613af5565b600854600160a01b900460ff1661182b5760405162461bcd60e51b815260040161024e90614855565b60025460ff161561184e5760405162461bcd60e51b815260040161024e906148fe565b61186733306000356001600160e01b03191660016107ac565b6002805460ff191660011790556040517f0e3932f7da01145f763331680b780b1352f2d7243e48c082aa38cb0750c2316090600090a1610de48282612041565b600854600090600160a01b900460ff166118d35760405162461bcd60e51b815260040161024e90614855565b6118ec33306000356001600160e01b03191660006107ac565b6113e2612d91565b600854600090600160a01b900460ff166119205760405162461bcd60e51b815260040161024e90614855565b61193933306000356001600160e01b03191660006107ac565b506007546001600160a01b031690565b600854600160a01b900460ff166119725760405162461bcd60e51b815260040161024e90614855565b61198b33306000356001600160e01b03191660016107ac565b610ef981612da9565b600854600160a01b900460ff166119bd5760405162461bcd60e51b815260040161024e90614855565b6119d633306000356001600160e01b03191660016107ac565b6116ae83838361224b565b600854600160a01b900460ff16611a0a5760405162461bcd60e51b815260040161024e90614855565b611a2333306000356001600160e01b03191660016107ac565b611a2c816128e4565b6116ae8383612041565b600854600160a01b900460ff16611a5f5760405162461bcd60e51b815260040161024e90614855565b611a7833306000356001600160e01b03191660016107ac565b8051610de4906000906020840190613af5565b600854606090600160a01b900460ff16611ab75760405162461bcd60e51b815260040161024e90614855565b611ad033306000356001600160e01b03191660006107ac565b6107a482612e6f565b600854600160a01b900460ff16611b025760405162461bcd60e51b815260040161024e90614855565b60025460ff1615611b255760405162461bcd60e51b815260040161024e906148fe565b611b3e33306000356001600160e01b03191660016107ac565b610de48282612834565b600854606090600160a01b900460ff16611b745760405162461bcd60e51b815260040161024e90614855565b611b8d33306000356001600160e01b03191660006107ac565b6000805461154090614cf6565b600854606090600160a01b900460ff16611bc65760405162461bcd60e51b815260040161024e90614855565b611bdf33306000356001600160e01b03191660006107ac565b60048054604080516020808402820181019092528281529291908301828280156115b957602002820191906000526020600020905b815481526020019060010190808311611c14575050505050905090565b600854600160a01b900460ff16611c5a5760405162461bcd60e51b815260040161024e90614855565b611c7333306000356001600160e01b03191660016107ac565b610de48282613030565b600854600160a01b900460ff16611ca65760405162461bcd60e51b815260040161024e90614855565b611cbf33306000356001600160e01b03191660006107ac565b6000611cd66000356001600160e01b03191661070e565b90506000611ce383613091565b9050610b2384838360006107ac565b600854606090600160a01b900460ff16611d1e5760405162461bcd60e51b815260040161024e90614855565b611d3733306000356001600160e01b03191660006107ac565b506040805180820190915260058152640332e312e360dc1b602082015290565b60006113e2613255565b6000611d6b611d57565b6001600160e01b0319929092166000908152600890920160205250604090205460ff1690565b60606000805b611d9f611d57565b60010154811015611e2d57611db2611d57565b6003016000611dbf611d57565b6001018381548110611de157634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101546001600160a01b0316835282019290925260400190205460ff16611e1b57611e18600183614cb2565b91505b80611e2581614d31565b915050611d97565b506000816001600160401b03811115611e5657634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611e7f578160200160208202803683370190505b5090506000805b611e8e611d57565b60010154811015611f9c57611ea1611d57565b6003016000611eae611d57565b6001018381548110611ed057634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101546001600160a01b0316835282019290925260400190205460ff16611f8a57611f04611d57565b6001018181548110611f2657634e487b7160e01b600052603260045260246000fd5b9060005260206000200160009054906101000a90046001600160a01b0316838381518110611f6457634e487b7160e01b600052603260045260246000fd5b6001600160a01b0390921660209283029190910190910152611f87600183614cb2565b91505b80611f9481614d31565b915050611e86565b50909250505090565b6000611faf611d57565b6001600160a01b03929092166000908152600390920160205250604090205460ff1690565b611fdc611d57565b5460ff1615611ffd5760405162461bcd60e51b815260040161024e90614be7565b6001612007611d57565b805460ff19169115159190911790556040517f2eb10865de63732f26f9b8475ebe6fb377a5c8eb3b49e8139b8d8d9135cd240490600090a1565b610de48282613279565b6001600160a01b0381166120715760405162461bcd60e51b815260040161024e90614876565b6040516301ffc9a760e01b81526001600160a01b038216906301ffc9a7906120a490631c0d022d60e21b906004016147b1565b60206040518083038186803b1580156120bc57600080fd5b505afa1580156120d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120f4919061410e565b6121105760405162461bcd60e51b815260040161024e906148bb565b600280546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b610ef98161333c565b6001600160a01b038116156121ef576040516301ffc9a760e01b81526001600160a01b038216906301ffc9a79061218390637cb27a4560e11b906004016147b1565b60206040518083038186803b15801561219b57600080fd5b505afa1580156121af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121d3919061410e565b6121ef5760405162461bcd60e51b815260040161024e90614ad6565b600780546001600160a01b0319166001600160a01b0383811691909117918290556040517fcf495d505c54debf2cfce37abde02663348726740343e67e0461e3c5900bee35926122409216906145d8565b60405180910390a150565b6007546001600160a01b03166122735760405162461bcd60e51b815260040161024e90614a91565b8015612281576122816129b1565b600754604051637cb27a4560e11b81526000916001600160a01b03169063f964f48a906122b49087908790600401614827565b60006040518083038186803b1580156122cc57600080fd5b505afa1580156122e0573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526123089190810190613df2565b905060005b815181101561234b5761233982828151811061112457634e487b7160e01b600052603260045260246000fd5b8061234381614d31565b91505061230d565b50805115610b23576007546040517f7cc2a985f8db0a56f86b96b09468939ad35546d78a751f8655660e5e0910cf6d91612394916001600160a01b0390911690879087906145ec565b60405180910390a150505050565b6123aa611d57565b5460ff16156123cb5760405162461bcd60e51b815260040161024e90614be7565b6123d3611d57565b54610100900460ff16156123f95760405162461bcd60e51b815260040161024e90614897565b6001600160a01b03811661241f5760405162461bcd60e51b815260040161024e90614b19565b6040516301ffc9a760e01b81526001600160a01b038216906301ffc9a7906124529063b2fe033560e01b906004016147b1565b60206040518083038186803b15801561246a57600080fd5b505afa15801561247e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124a2919061410e565b6124be5760405162461bcd60e51b815260040161024e90614963565b6000816001600160a01b0316631078fade6040518163ffffffff1660e01b815260040160006040518083038186803b1580156124f957600080fd5b505afa15801561250d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526125359190810190613f12565b905060005b815181101561266057600082828151811061256557634e487b7160e01b600052603260045260246000fd5b60200260200101519050600061257a82613091565b90506000612586611d57565b6001600160e01b03198316600090815260049190910160205260409020546001600160a01b0316905080156125fa576125bd611d57565b6001600160a01b0382166000908152600791909101602052604090205460ff16156125fa5760405162461bcd60e51b815260040161024e90614b7f565b85612603611d57565b6001600160e01b0319841660009081526004919091016020526040812080546001600160a01b0319166001600160a01b03939093169290921790915561264a9084906133b0565b505050808061265890614d31565b91505061253a565b506000826001600160a01b03166368498a336040518163ffffffff1660e01b815260040160006040518083038186803b15801561269c57600080fd5b505afa1580156126b0573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526126d89190810190613f12565b905060005b815181101561273057600082828151811061270857634e487b7160e01b600052603260045260246000fd5b6020026020010151905061271d8160016133b0565b508061272881614d31565b9150506126dd565b50600061273b611d57565b6001600160a01b038516600090815260039190910160205260409020805460ff191691151591909117905561276e611d57565b6001600160a01b038416600090815260029190910160205260409020546127f857612797611d57565b6001908101805491820181556000908152602090200180546001600160a01b0319166001600160a01b0385161790556127ce611d57565b600101546127da611d57565b6001600160a01b038516600090815260029190910160205260409020555b7f43908041a0d1c29893f2c5ad648ccb6799faecac83f7fcc80ef1a5e297d95f4b8360405161282791906145d8565b60405180910390a1505050565b61283c611d57565b54610100900460ff16156128625760405162461bcd60e51b815260040161024e90614897565b610de482826133b0565b612874611d57565b5460ff16156128955760405162461bcd60e51b815260040161024e90614be7565b8061289e611d57565b80549115156101000261ff00199092169190911790556040517f9514871d395e6e24ef28f340cbcdcaa89f790cdf4a4fa6c25cf83a81fb27a86d9061224090839061473f565b6128ec611d57565b5460ff161561290d5760405162461bcd60e51b815260040161024e90614be7565b6001600160a01b0381166129335760405162461bcd60e51b815260040161024e90614b19565b61293b611d57565b6001600160a01b0382166000908152600791909101602052604090205460ff16156129785760405162461bcd60e51b815260040161024e90614985565b6001612982611d57565b6001600160a01b0392909216600090815260079092016020526040909120805460ff1916911515919091179055565b6129b9611d57565b5460ff16156129da5760405162461bcd60e51b815260040161024e90614be7565b6129e2611d57565b54610100900460ff1615612a085760405162461bcd60e51b815260040161024e90614897565b60005b612a13611d57565b60010154811015610ef957612a65612a29611d57565b6001018281548110612a4b57634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b031661345b565b80612a6f81614d31565b915050612a0b565b6000612a81611d57565b6001600160a01b03929092166000908152600790920160205250604090205460ff1690565b612aaf82612da9565b610de481612bb8565b6060612ac2611d57565b600501805480602002602001604051908101604052809291908181526020016000905b82821015612b91578382906000526020600020018054612b0490614cf6565b80601f0160208091040260200160405190810160405280929190818152602001828054612b3090614cf6565b8015612b7d5780601f10612b5257610100808354040283529160200191612b7d565b820191906000526020600020905b815481529060010190602001808311612b6057829003601f168201915b505050505081526020019060010190612ae5565b50505050905090565b6000612ba4611d57565b5460ff16905090565b60006107a48261352c565b612bc0611d57565b5460ff1615612be15760405162461bcd60e51b815260040161024e90614be7565b612be9611d57565b54610100900460ff1615612c0f5760405162461bcd60e51b815260040161024e90614897565b6000815111612c305760405162461bcd60e51b815260040161024e90614ba1565b60005b8151811015610de457612c5f82828151811061112457634e487b7160e01b600052603260045260246000fd5b80612c6981614d31565b915050612c33565b610de4828261359b565b6060600082516001600160401b03811115612ca657634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015612ccf578160200160208202803683370190505b50905060005b8351811015612d8a576000848281518110612d0057634e487b7160e01b600052603260045260246000fd5b602002602001015190506000612d1582613091565b9050612d1f611d57565b6001600160e01b0319821660009081526008919091016020526040902054845160ff90911690859085908110612d6557634e487b7160e01b600052603260045260246000fd5b9115156020928302919091019091015250819050612d8281614d31565b915050612cd5565b5092915050565b6000612d9b611d57565b54610100900460ff16919050565b612db1611d57565b5460ff1615612dd25760405162461bcd60e51b815260040161024e90614be7565b612dda611d57565b54610100900460ff1615612e005760405162461bcd60e51b815260040161024e90614897565b6000815111612e215760405162461bcd60e51b815260040161024e90614ba1565b60005b8151811015610de457612e5d828281518110612e5057634e487b7160e01b600052603260045260246000fd5b602002602001015161345b565b80612e6781614d31565b915050612e24565b6060600082516001600160401b03811115612e9a57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015612ec3578160200160208202803683370190505b50905060005b8351811015612d8a576000848281518110612ef457634e487b7160e01b600052603260045260246000fd5b602002602001015190506000612f0982613091565b9050612f13611d57565b6001600160e01b031982166000908152600491909101602052604090205484516001600160a01b0390911690859085908110612f5f57634e487b7160e01b600052603260045260246000fd5b60200260200101906001600160a01b031690816001600160a01b031681525050612f87611d57565b6003016000858581518110612fac57634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b031682528101919091526040016000205460ff161561301b576000848481518110612ffa57634e487b7160e01b600052603260045260246000fd5b60200260200101906001600160a01b031690816001600160a01b0316815250505b5050808061302890614d31565b915050612ec9565b613038611d57565b5460ff16156130595760405162461bcd60e51b815260040161024e90614be7565b613061611d57565b54610100900460ff16156130875760405162461bcd60e51b815260040161024e90614897565b610de48282613627565b600081815b81518110156132455760008282815181106130c157634e487b7160e01b600052603260045260246000fd5b01602001516001600160f81b0319169050600360fc1b81108015906130f45750603960f81b6001600160f81b0319821611155b15801561312a5750604160f81b6001600160f81b03198216108015906131285750602d60f91b6001600160f81b0319821611155b155b801561315f5750606160f81b6001600160f81b031982161080159061315d5750603d60f91b6001600160f81b0319821611155b155b80156131795750600960fa1b6001600160f81b0319821614155b80156131935750605f60f81b6001600160f81b0319821614155b80156131ad5750600b60fa1b6001600160f81b0319821614155b80156131c75750600560fb1b6001600160f81b0319821614155b80156131e15750602960f81b6001600160f81b0319821614155b80156131fb5750605b60f81b6001600160f81b0319821614155b80156132155750605d60f81b6001600160f81b0319821614155b156132325760405162461bcd60e51b815260040161024e90614ab3565b508061323d81614d31565b915050613096565b5050815160208301209050919050565b7f307d6040706ae53dd496db78a4c0567d8e6a1fdef8784623a8cb324068ce686190565b6132816138b9565b6003015460ff166132a45760405162461bcd60e51b815260040161024e90614a50565b60006132af8361352c565b90506001600160a01b0381166132d75760405162461bcd60e51b815260040161024e90614a70565b604051636a83f10960e01b81526001600160a01b03821690636a83f10990613305903390869060040161462c565b600060405180830381600087803b15801561331f57600080fd5b505af1158015613333573d6000803e3d6000fd5b50505050505050565b6133446138b9565b6003015460ff16156133685760405162461bcd60e51b815260040161024e90614c0c565b613391604051806040016040528060078152602001661111519055531560ca1b815250826138c3565b600161339b6138b9565b600301805460ff191691151591909117905550565b60006133bb83613091565b905060006133c7611d57565b6001600160e01b031983166000908152600891909101602052604090205460ff169050826133f3611d57565b6001600160e01b03198416600090815260089190910160205260409020805460ff191691151591909117905582151581151514610b23577f74bd591bbbcef5b2a9c754f27dbfadb17a6d770c35303964627f6b30974903bc8484604051612394929190614803565b6001600160a01b0381166134815760405162461bcd60e51b815260040161024e90614b19565b613489611d57565b6001600160a01b0382166000908152600791909101602052604090205460ff16156134c65760405162461bcd60e51b815260040161024e90614b7f565b60016134d0611d57565b6001600160a01b0383166000908152600391909101602052604090819020805460ff191692151592909217909155517f98db00c919ca1c9c4e97e5837fb8ed4e4d21380a68ab359ae18c4accd2734401906122409083906145d8565b60008061353883613a7b565b905060006135446138b9565b60008381526001919091016020526040902054116135745760405162461bcd60e51b815260040161024e90614af8565b61357c6138b9565b600091825260020160205260409020546001600160a01b031692915050565b6135a36138b9565b6003015460ff166135c65760405162461bcd60e51b815260040161024e90614a50565b60006135d18361352c565b90506001600160a01b0381166135f95760405162461bcd60e51b815260040161024e90614a70565b60405163f049076960e01b81526001600160a01b0382169063f049076990613305903390869060040161462c565b60008251116136485760405162461bcd60e51b815260040161024e90614ba1565b80518251146136695760405162461bcd60e51b815260040161024e906149a8565b60005b82518110156116ae57600083828151811061369757634e487b7160e01b600052603260045260246000fd5b6020026020010151905060008383815181106136c357634e487b7160e01b600052603260045260246000fd5b6020026020010151905060006136d883613091565b905060006136e4611d57565b6001600160e01b03198316600090815260049190910160205260409020546001600160a01b0316905080156137585761371b611d57565b6001600160a01b0382166000908152600791909101602052604090205460ff16156137585760405162461bcd60e51b815260040161024e90614b7f565b82613761611d57565b6001600160e01b0319841660009081526004919091016020526040812080546001600160a01b0319166001600160a01b0393909316929092179091556137a5611d57565b6001600160a01b038516600090815260039190910160205260409020805460ff19169115159190911790556137d8611d57565b600601846040516137e99190614555565b9081526020016040518091039020546000141561386957613808611d57565b60050180546001810182556000918252602091829020865161383293919092019190870190613af5565b5061383b611d57565b60050154613847611d57565b600601856040516138589190614555565b908152604051908190036020019020555b7f0732f745f0cddd4e67da27633e46e460ea6e59a43cbad685cc5789251277d53c848460405161389a9291906147d9565b60405180910390a15050505080806138b190614d31565b91505061366c565b60006113e2613a86565b6001600160a01b0381166138e95760405162461bcd60e51b815260040161024e90614b3b565b6040516301ffc9a760e01b81526001600160a01b038216906301ffc9a79061391c906304d657b360e51b906004016147b1565b60206040518083038186803b15801561393457600080fd5b505afa158015613948573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061396c919061410e565b6139885760405162461bcd60e51b815260040161024e90614943565b600061399383613a7b565b905061399d6138b9565b60008281526001919091016020526040902054613a09576139bc6138b9565b8054600181018255600091825260209182902085516139e393919092019190860190613af5565b506139ec6138b9565b546139f56138b9565b600083815260019190910160205260409020555b81613a126138b9565b600201600083815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b031602179055507f5a9ace53f01417a984781aac733a7042cc4be9f5a01542fb8e56afa951b0f14c83836040516128279291906147d9565b805160209091012090565b7ffe121c8064cb925856f0b37ec28345f4b16529a3d97f47304c118a97700cd73690565b828054828255906000526020600020908101928215613ae5579160200282015b82811115613ae5578251825591602001919060010190613aca565b50613af1929150613b68565b5090565b828054613b0190614cf6565b90600052602060002090601f016020900481019282613b235760008555613ae5565b82601f10613b3c57805160ff1916838001178555613ae5565b82800160010185558215613ae55791820182811115613ae5578251825591602001919060010190613aca565b5b80821115613af15760008155600101613b69565b80356107a781614d78565b600082601f830112613b98578081fd5b81356020613bad613ba883614c5c565b614c2c565b8281528181019085830183850287018401881015613bc9578586fd5b855b85811015613bf0578135613bde81614d78565b84529284019290840190600101613bcb565b5090979650505050505050565b600082601f830112613c0d578081fd5b613c176040614c2c565b8083835b6002811015613c4657613c318783358801613ca7565b84526020938401939190910190600101613c1b565b509095945050505050565b600082601f830112613c61578081fd5b613c6b6060614c2c565b808385606086011115613c7c578384fd5b835b6003811015613c46578135613c9281614d8d565b84526020938401939190910190600101613c7e565b600082601f830112613cb7578081fd5b81356020613cc7613ba883614c5c565b82815281810190858301855b85811015613bf057613cea898684358b0101613cfc565b84529284019290840190600101613cd3565b600082601f830112613d0c578081fd5b8135613d1a613ba882614c7f565b818152846020838601011115613d2e578283fd5b816020850160208301379081016020019190915292915050565b600060208284031215613d59578081fd5b8135613d6481614d78565b9392505050565b60008060408385031215613d7d578081fd5b8235613d8881614d78565b915060208301356001600160401b03811115613da2578182fd5b613dae85828601613cfc565b9150509250929050565b600060208284031215613dc9578081fd5b81356001600160401b03811115613dde578182fd5b613dea84828501613b88565b949350505050565b60006020808385031215613e04578182fd5b82516001600160401b03811115613e19578283fd5b8301601f81018513613e29578283fd5b8051613e37613ba882614c5c565b8181528381019083850185840285018601891015613e53578687fd5b8694505b83851015613e7e578051613e6a81614d78565b835260019490940193918501918501613e57565b50979650505050505050565b60008060408385031215613e9c578182fd5b82356001600160401b0380821115613eb2578384fd5b613ebe86838701613b88565b93506020850135915080821115613ed3578283fd5b50613dae85828601613b88565b600060208284031215613ef1578081fd5b81356001600160401b03811115613f06578182fd5b613dea84828501613ca7565b60006020808385031215613f24578182fd5b82516001600160401b03811115613f39578283fd5b8301601f81018513613f49578283fd5b8051613f57613ba882614c5c565b81815283810190838501865b84811015613fc657815186018a603f820112613f7d578889fd5b878101516040613f8f613ba883614c7f565b8281528d82848601011115613fa2578b8cfd5b613fb1838c8301848701614cca565b87525050509286019290860190600101613f63565b509098975050505050505050565b60008060408385031215613fe6578182fd5b82356001600160401b0380821115613ffc578384fd5b613ebe86838701613ca7565b6000602080838503121561401a578182fd5b82356001600160401b0381111561402f578283fd5b8301601f8101851361403f578283fd5b803561404d613ba882614c5c565b8181528381019083850185840285018601891015614069578687fd5b8694505b83851015613e7e57803583526001949094019391850191850161406d565b6000602080838503121561409d578182fd5b82516001600160401b038111156140b2578283fd5b8301601f810185136140c2578283fd5b80516140d0613ba882614c5c565b81815283810190838501858402850186018910156140ec578687fd5b8694505b83851015613e7e5780518352600194909401939185019185016140f0565b60006020828403121561411f578081fd5b8151613d6481614d8d565b60006020828403121561413b578081fd5b81356001600160e01b031981168114613d64578182fd5b600060208284031215614163578081fd5b81356001600160401b03811115614178578182fd5b613dea84828501613cfc565b6000806000806000806000806000806101808b8d0312156141a3578586fd5b8a356001600160401b03808211156141b9578788fd5b6141c58e838f01613cfc565b9b506141d360208e01613b7d565b9a506141e160408e01613b7d565b99506141ef60608e01613b7d565b985060808d0135915080821115614204578788fd5b6142108e838f01613cfc565b975060a08d0135915080821115614225578687fd5b6142318e838f01613bfd565b965060c08d0135915080821115614246578586fd5b6142528e838f01613b88565b955060e08d0135915080821115614267578485fd5b6142738e838f01613bfd565b94506101008d0135915080821115614289578384fd5b506142968d828e01613b88565b9250506142a78c6101208d01613c51565b90509295989b9194979a5092959850565b600080604083850312156142ca578182fd5b82356001600160401b038111156142df578283fd5b6142eb85828601613cfc565b92505060208301356142fc81614d8d565b809150509250929050565b60008060006060848603121561431b578081fd5b83356001600160401b0380821115614331578283fd5b61433d87838801613cfc565b94506020860135915080821115614352578283fd5b5061435f86828701613cfc565b925050604084013561437081614d8d565b809150509250925092565b6000806040838503121561438d578182fd5b82356001600160401b038111156143a2578283fd5b6143ae85828601613cfc565b95602094909401359450505050565b6000806000606084860312156143d1578081fd5b83356001600160401b038111156143e6578182fd5b6143f286828701613cfc565b93505060208401359150604084013561437081614d78565b60008060006060848603121561441e578081fd5b83356001600160401b03811115614433578182fd5b61443f86828701613cfc565b93505060208401359150604084013561437081614d8d565b6000815180845260208085019450808401835b838110156144865781518752958201959082019060010161446a565b509495945050505050565b600081518084526144a9816020860160208601614cca565b601f01601f19169290920160200192915050565b8054600090600281046001808316806144d757607f831692505b60208084108214156144f757634e487b7160e01b86526022600452602486fd5b81801561450b576001811461451c57614549565b60ff19861689528489019650614549565b61452588614ca6565b60005b868110156145415781548b820152908501908301614528565b505084890196505b50505050505092915050565b60008251614567818460208701614cca565b9190910192915050565b600061457d82856144bd565b60609390931b6bffffffffffffffffffffffff191683525050601401919050565b60006145aa82856144bd565b6001600160e01b03199390931683525050600401919050565b6000613dea6145d283866144bd565b846144bd565b6001600160a01b0391909116815260200190565b6001600160a01b038416815260606020820181905260009061461090830185614491565b82810360408401526146228185614491565b9695505050505050565b6001600160a01b03929092168252602082015260400190565b6020808252825182820181905260009190848201906040850190845b818110156146865783516001600160a01b031683529284019291840191600101614661565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b818110156146865783511515835292840192918401916001016146ae565b6000602080830181845280855180835260408601915060408482028701019250838701855b8281101561471f57603f1988860301845261470d858351614491565b945092850192908501906001016146f1565b5092979650505050505050565b600060208252613d646020830184614457565b901515815260200190565b600060808201868352602086818501526080604085015281865180845260a0860191508288019350845b8181101561479057845183529383019391830191600101614774565b505084810360608601526147a48187614457565b9998505050505050505050565b6001600160e01b031991909116815260200190565b600060208252613d646020830184614491565b6000604082526147ec6040830185614491565b905060018060a01b03831660208301529392505050565b6000604082526148166040830185614491565b905082151560208301529392505050565b60006040825261483a6040830185614491565b828103602084015261484c8185614491565b95945050505050565b602080825260079082015266444d4e443a4e4960c81b604082015260600190565b602080825260079082015266444d4e443a5a4160c81b604082015260600190565b6020808252600a908201526911935312508e9310d2d160b21b604082015260600190565b602080825260089082015267444d4e443a49415360c01b604082015260600190565b602080825260079082015266111353910e95d360ca1b604082015260600190565b6020808252600a90820152692226a7221d20a3292d2760b11b604082015260600190565b602080825260079082015266444d4e443a574960c81b604082015260600190565b6020808252600690820152655446493a494360d01b604082015260600190565b6020808252600890820152672326a624a11d24a360c11b604082015260600190565b6020808252600990820152682326a624a11d2320a360b91b604082015260600190565b60208082526008908201526711935312508e925360c21b604082015260600190565b602080825260079082015266444d4e443a414960c81b604082015260600190565b602080825260079082015266111353910e915160ca1b604082015260600190565b6020808252600990820152682326a624a11d23272360b91b604082015260600190565b602080825260079082015266444d4e443a454160c81b604082015260600190565b6020808252600690820152655446493a4e4960d01b604082015260600190565b6020808252600790820152665446493a5a544d60c81b604082015260600190565b6020808252600890820152672226a7221d2d20a960c11b604082015260600190565b602080825260099082015268464d4c49423a49465360b81b604082015260600190565b6020808252600890820152672226a7221d24a0a960c11b604082015260600190565b6020808252600790820152662a23249d25a72360c91b604082015260600190565b6020808252600890820152672326a624a11d2d2360c11b604082015260600190565b6020808252600690820152655446493a5a4160d01b604082015260600190565b6020808252600a9082015269464d4c49423a4652454d60b01b604082015260600190565b6020808252600890820152672326a624a11d232360c11b604082015260600190565b60208082526008908201526711935312508e969360c21b604082015260600190565b6020808252600a90820152690889a9c88749c82aaa8960b31b604082015260600190565b6020808252600b908201526a2326a624a11d2223292d2760a91b604082015260600190565b6020808252600690820152655446493a414960d01b604082015260600190565b604051601f8201601f191681016001600160401b0381118282101715614c5457614c54614d62565b604052919050565b60006001600160401b03821115614c7557614c75614d62565b5060209081020190565b60006001600160401b03821115614c9857614c98614d62565b50601f01601f191660200190565b60009081526020902090565b60008219821115614cc557614cc5614d4c565b500190565b60005b83811015614ce5578181015183820152602001614ccd565b83811115610b235750506000910152565b600281046001821680614d0a57607f821691505b60208210811415614d2b57634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415614d4557614d45614d4c565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610ef957600080fd5b8015158114610ef957600080fdfea2646970667358221220c8f0aefd3736a14d94c7f5ad71f2a670f25b031ad5cc3aed22162704d600356564736f6c634300080100330000000000000000000000000000000000000000000000000000000000000040000000000000000000000000393f7974f9a1c63e1d9d5d98c124a0914302faac0000000000000000000000000000000000000000000000000000000000000000

Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.