ETH Price: $3,400.12 (+6.43%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

7 Internal Transactions found.

Latest 7 internal transactions

Advanced mode:
Parent Transaction Hash Block
From
To
137157042021-11-30 16:01:141150 days ago1638288074
0x1Ff2364a...c0e82bbAE
 Contract Creation0 ETH
137157042021-11-30 16:01:141150 days ago1638288074
0x1Ff2364a...c0e82bbAE
 Contract Creation0 ETH
137157042021-11-30 16:01:141150 days ago1638288074
0x1Ff2364a...c0e82bbAE
 Contract Creation0 ETH
137157042021-11-30 16:01:141150 days ago1638288074
0x1Ff2364a...c0e82bbAE
 Contract Creation0 ETH
137157042021-11-30 16:01:141150 days ago1638288074
0x1Ff2364a...c0e82bbAE
 Contract Creation0 ETH
137157042021-11-30 16:01:141150 days ago1638288074
0x1Ff2364a...c0e82bbAE
 Contract Creation0 ETH
137152682021-11-30 14:23:451150 days ago1638282225  Contract Creation0 ETH
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
SubDAOFactory

Compiler Version
v0.8.6+commit.11564f7e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 34 : SubDAOFactory.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.7.0;
pragma abicoder v2;

import "../model/ISubDAOFactory.sol";
import "../../../ext/subDAOsManager/model/ISubDAOsManager.sol";
import "./EthereansFactory.sol";
import "../../../base/model/IProposalsManager.sol";
import { ReflectionUtilities, BehaviorUtilities } from "@ethereansos/swissknife/contracts/lib/GeneralUtilities.sol";
import { Grimoire as BaseGrimoire, Getters } from "../../../base/lib/KnowledgeBase.sol";
import { Getters as ExternalGetters } from "../../../ext/lib/KnowledgeBase.sol";
import "../../../ext/subDAO/model/ISubDAO.sol";
import "../../../base/model/IProposalsManager.sol";
import "../../../core/model/IOrganization.sol";
import "../../../base/model/IStateManager.sol";
import { State } from "../../../base/lib/KnowledgeBase.sol";

contract SubDAOFactory is EthereansFactory, ISubDAOFactory {
    using ReflectionUtilities for address;
    using Getters for IOrganization;
    using ExternalGetters for IOrganization;
    using State for IStateManager;

    uint256 public constant MANDATORY_COMPONENTS = 1;
    //ProposalsManager true

    uint256 public constant PROPOSALS_MANAGER_POSITION = 0;
    uint256 public constant TREASURY_MANAGER_POSITION = 1;
    uint256 public constant DELEGATIONS_MANAGER_POSITION = 5;

    address[] private _utilityModels;
    bytes32[] private _utilityModelKeys;
    bool[] private _utilityModelsActive;
    string private _proposalUri;

    uint256 public presetArrayMaxSize;
    uint256 public delegationsMaxSize;

    constructor(bytes memory lazyInitData) EthereansFactory(lazyInitData) {
    }

    function _ethosFactoryLazyInit(bytes memory lazyInitData) internal override returns(bytes memory lazyInitResponse) {
        (_utilityModels, _utilityModelKeys, _utilityModelsActive, _proposalUri, delegationsMaxSize, presetArrayMaxSize) = abi.decode(lazyInitData, (address[], bytes32[], bool[], string, uint256, uint256));
        return "";
    }

    function data() external override view returns(address[] memory utilityModels, bytes32[] memory utilitiyModelKeys, bool[] memory utilitiyModelActive, string memory proposalUri) {
        return (_utilityModels, _utilityModelKeys, _utilityModelsActive, _proposalUri);
    }

    function deploy(bytes calldata deployData) external payable override(Factory, IFactory) virtual returns(address productAddress, bytes memory productInitResponse) {
       (OrganizationDeployData memory organizationDeployData) = abi.decode(deployData, (OrganizationDeployData));

        deployer[productAddress = modelAddress.clone()] = msg.sender;

        uint256 componentsLength = MANDATORY_COMPONENTS + organizationDeployData.specialComponentsData.length;
        for(uint256 i = 0; i < organizationDeployData.additionalComponents.length; i++) {
            uint256 additionalComponentIndex = organizationDeployData.additionalComponents[i];
            require(i == 0 || additionalComponentIndex > organizationDeployData.additionalComponents[i - 1], "DESC");
            require(additionalComponentIndex >= MANDATORY_COMPONENTS && additionalComponentIndex < _utilityModels.length, "index");
            componentsLength++;
        }

        IOrganization.Component[] memory components = new IOrganization.Component[](componentsLength);

        for(uint256 i = 0; i < MANDATORY_COMPONENTS; i++) {
            components[i] = _createOrganizationComponent(i, productAddress, i == PROPOSALS_MANAGER_POSITION ? abi.encode(true, organizationDeployData.mandatoryComponentsDeployData[i]) : organizationDeployData.mandatoryComponentsDeployData[i]);
        }

        uint256 nextIndex = MANDATORY_COMPONENTS;
        if(componentsLength > MANDATORY_COMPONENTS) {
            for(uint256 i = 0; i < organizationDeployData.additionalComponents.length; i++) {
                uint256 additionalComponentIndex = organizationDeployData.additionalComponents[i];
                components[nextIndex++] = additionalComponentIndex == DELEGATIONS_MANAGER_POSITION ? _deployDelegationsManager(productAddress, organizationDeployData.additionalComponentsDeployData[i]) : _createOrganizationComponent(additionalComponentIndex, productAddress, organizationDeployData.additionalComponentsDeployData[i]);
            }
        }

        if(organizationDeployData.specialComponentsData.length > 0) {
            for(uint256 i = 0; i < organizationDeployData.specialComponentsData.length; i++) {
                components[nextIndex++] = _deploySpecialComponent(productAddress, organizationDeployData.specialComponentsData[i]);
            }
        }

        (bool initToBeFinalized, address organizationHost, ISubDAO.SubDAOProposalModel[] memory proposalModels) = abi.decode(organizationDeployData.specificOrganizationData, (bool, address, ISubDAO.SubDAOProposalModel[]));

        productInitResponse = _emitDeploy(productAddress, organizationHost, organizationDeployData.uri, initToBeFinalized, proposalModels, components);

        require(ILazyInitCapableElement(productAddress).initializer() == address(this));
    }

    function setInitialProposalModels(address subDAO, ISubDAO.SubDAOProposalModel[] calldata newValue) external override {
        require(msg.sender == deployer[subDAO], "Unauthorized");
        ISubDAO(subDAO).setInitialProposalModels(newValue);
    }

    function _emitDeploy(address productAddress, address organizationHost, string memory uri, bool initToBeFinalized, ISubDAO.SubDAOProposalModel[] memory proposalModels, IOrganization.Component[] memory components) private returns(bytes memory productInitResponse) {
        emit Deployed(modelAddress, productAddress, msg.sender, productInitResponse = ILazyInitCapableElement(productAddress).lazyInit(abi.encode(organizationHost, abi.encode(uri, dynamicUriResolver, abi.encode(initToBeFinalized, presetArrayMaxSize, abi.encode(proposalModels, abi.encode(components)))))));
    }

    function _deployDelegationsManager(address organizationAddress, bytes memory deployData) private returns(IOrganization.Component memory) {
        return _createOrganizationComponent(DELEGATIONS_MANAGER_POSITION, organizationAddress, abi.encode(delegationsMaxSize, _utilityModels[TREASURY_MANAGER_POSITION], deployData));
    }

    function _createOrganizationComponent(uint256 index, address productAddress, bytes memory lazyInitData) private returns(IOrganization.Component memory organizationComponent) {
        ILazyInitCapableElement((organizationComponent = IOrganization.Component(_utilityModelKeys[index], _utilityModels[index].clone(), _utilityModelsActive[index], true)).location).lazyInit(abi.encode(productAddress, lazyInitData));
        deployer[organizationComponent.location] = msg.sender;
    }

    function _deploySpecialComponent(address productAddress, bytes memory specialComponentData) private returns(IOrganization.Component memory organizationComponent) {
        (bytes32 key, address modelOrLocation, bool active, bytes memory deployData) = abi.decode(specialComponentData, (bytes32, address, bool, bytes));
        if(deployData.length > 0) {
            bool clone;
            (clone, deployData) = abi.decode(deployData, (bool, bytes));
            if(clone) {
                deployer[modelOrLocation = modelOrLocation.clone()] = msg.sender;
            }
            ILazyInitCapableElement(modelOrLocation).lazyInit(abi.encode(productAddress, deployData));
        }
        organizationComponent = IOrganization.Component(key, modelOrLocation, active, true);
    }
}

File 2 of 34 : KnowledgeBase.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.7.0;

import "../../core/model/IOrganization.sol";
import "../model/IMicroservicesManager.sol";
import "../model/IStateManager.sol";
import "../model/IProposalsManager.sol";
import "../model/ITreasuryManager.sol";
import { ReflectionUtilities, BytesUtilities } from "@ethereansos/swissknife/contracts/lib/GeneralUtilities.sol";

library Grimoire {
    bytes32 constant public COMPONENT_KEY_TREASURY_MANAGER = 0xcfe1633df53a0649d88d788961f26058c5e7a0b5644675f19f67bb2975827ba2;
    bytes32 constant public COMPONENT_KEY_STATE_MANAGER = 0xd1d09e8f5708558865b8acd5f13c69781ae600e42dbc7f52b8ef1b9e33dbcd36;
    bytes32 constant public COMPONENT_KEY_MICROSERVICES_MANAGER = 0x0aef4c8f864010d3e1817691f51ade95a646fffafd7f3df9cb8200def342cfd7;
    bytes32 constant public COMPONENT_KEY_PROPOSALS_MANAGER = 0xa504406933af7ca120d20b97dfc79ea9788beb3c4d3ac1ff9a2c292b2c28e0cc;
}

library Getters {

    function treasuryManager(IOrganization organization) internal view returns(ITreasuryManager) {
        return ITreasuryManager(organization.get(Grimoire.COMPONENT_KEY_TREASURY_MANAGER));
    }

    function stateManager(IOrganization organization) internal view returns(IStateManager) {
        return IStateManager(organization.get(Grimoire.COMPONENT_KEY_STATE_MANAGER));
    }

    function microservicesManager(IOrganization organization) internal view returns(IMicroservicesManager) {
        return IMicroservicesManager(organization.get(Grimoire.COMPONENT_KEY_MICROSERVICES_MANAGER));
    }

    function proposalsManager(IOrganization organization) internal view returns(IProposalsManager) {
        return IProposalsManager(organization.get(Grimoire.COMPONENT_KEY_PROPOSALS_MANAGER));
    }
}

library Setters {

    function replaceTreasuryManager(IOrganization organization, address newComponentAddress) internal returns(ITreasuryManager oldComponent) {
        require(newComponentAddress != address(0), "void");
        oldComponent = ITreasuryManager(organization.set(IOrganization.Component(Grimoire.COMPONENT_KEY_TREASURY_MANAGER, newComponentAddress, false, true)));
    }

    function replaceStateManager(IOrganization organization, address newComponentAddress) internal returns(IStateManager oldComponent) {
        require(newComponentAddress != address(0), "void");
        oldComponent = IStateManager(organization.set(IOrganization.Component(Grimoire.COMPONENT_KEY_STATE_MANAGER, newComponentAddress, false ,true)));
    }

    function replaceMicroservicesManager(IOrganization organization, address newComponentAddress) internal returns(IMicroservicesManager oldComponent) {
        require(newComponentAddress != address(0), "void");
        oldComponent = IMicroservicesManager(organization.set(IOrganization.Component(Grimoire.COMPONENT_KEY_MICROSERVICES_MANAGER, newComponentAddress, true, true)));
    }

    function replaceProposalsManager(IOrganization organization, address newComponentAddress) internal returns(IProposalsManager oldComponent) {
        require(newComponentAddress != address(0), "void");
        oldComponent = IProposalsManager(organization.set(IOrganization.Component(Grimoire.COMPONENT_KEY_PROPOSALS_MANAGER, newComponentAddress, true, true)));
    }
}

library Treasury {
    using ReflectionUtilities for address;

    function storeETH(IOrganization organization, uint256 value) internal {
        if(value != 0) {
            organization.get(Grimoire.COMPONENT_KEY_TREASURY_MANAGER).submit(value, "");
        }
    }

    function callTemporaryFunction(ITreasuryManager treasuryManager, bytes4 selector, address subject, uint256 value, bytes memory data) internal returns(bytes memory response) {
        address oldServer = treasuryManager.setAdditionalFunction(selector, subject, false);
        response = address(treasuryManager).submit(value, abi.encodePacked(selector, data));
        treasuryManager.setAdditionalFunction(selector, oldServer, false);
    }
}

library State {
    using BytesUtilities for bytes;

    bytes32 constant public ENTRY_TYPE_ADDRESS = 0x421683f821a0574472445355be6d2b769119e8515f8376a1d7878523dfdecf7b;
    bytes32 constant public ENTRY_TYPE_ADDRESS_ARRAY = 0x23d8ff3dc5aed4a634bcf123581c95e70c60ac0e5246916790aef6d4451ff4c1;
    bytes32 constant public ENTRY_TYPE_BOOL = 0xc1053bdab4a5cf55238b667c39826bbb11a58be126010e7db397c1b67c24271b;
    bytes32 constant public ENTRY_TYPE_BOOL_ARRAY = 0x8761250c4d2c463ce51f91f5d2c2508fa9142f8a42aa9f30b965213bf3e6c2ac;
    bytes32 constant public ENTRY_TYPE_BYTES = 0xb963e9b45d014edd60cff22ec9ad383335bbc3f827be2aee8e291972b0fadcf2;
    bytes32 constant public ENTRY_TYPE_BYTES_ARRAY = 0x084b42f8a8730b98eb0305d92103d9107363192bb66162064a34dc5716ebe1a0;
    bytes32 constant public ENTRY_TYPE_STRING = 0x97fc46276c172633607a331542609db1e3da793fca183d594ed5a61803a10792;
    bytes32 constant public ENTRY_TYPE_STRING_ARRAY = 0xa227fd7a847724343a7dda3598ee0fb2d551b151b73e4a741067596daa6f5658;
    bytes32 constant public ENTRY_TYPE_UINT256 = 0xec13d6d12b88433319b64e1065a96ea19cd330ef6603f5f6fb685dde3959a320;
    bytes32 constant public ENTRY_TYPE_UINT256_ARRAY = 0xc1b76e99a35aa41ed28bbbd9e6c7228760c87b410ebac94fa6431da9b592411f;

    function getAddress(IStateManager stateManager, string memory name) internal view returns(address) {
        return stateManager.get(name).value.asAddress();
    }

    function setAddress(IStateManager stateManager, string memory name, address val) internal returns(address oldValue) {
        return stateManager.set(IStateManager.StateEntry(name, ENTRY_TYPE_ADDRESS, abi.encodePacked(val))).asAddress();
    }

    function getAddressArray(IStateManager stateManager, string memory name) internal view returns(address[] memory) {
        return stateManager.get(name).value.asAddressArray();
    }

    function setAddressArray(IStateManager stateManager, string memory name, address[] memory val) internal returns(address[] memory oldValue) {
        return stateManager.set(IStateManager.StateEntry(name, ENTRY_TYPE_ADDRESS_ARRAY, abi.encode(val))).asAddressArray();
    }

    function getBool(IStateManager stateManager, string memory name) internal view returns(bool) {
        return stateManager.get(name).value.asBool();
    }

    function setBool(IStateManager stateManager, string memory name, bool val) internal returns(bool oldValue) {
        return stateManager.set(IStateManager.StateEntry(name, ENTRY_TYPE_BOOL, abi.encode(val ? 1 : 0))).asBool();
    }

    function getBoolArray(IStateManager stateManager, string memory name) internal view returns(bool[] memory) {
        return stateManager.get(name).value.asBoolArray();
    }

    function setBoolArray(IStateManager stateManager, string memory name, bool[] memory val) internal returns(bool[] memory oldValue) {
        return stateManager.set(IStateManager.StateEntry(name, ENTRY_TYPE_BOOL_ARRAY, abi.encode(val))).asBoolArray();
    }

    function getBytes(IStateManager stateManager, string memory name) internal view returns(bytes memory) {
        return stateManager.get(name).value;
    }

    function setBytes(IStateManager stateManager, string memory name, bytes memory val) internal returns(bytes memory oldValue) {
        return stateManager.set(IStateManager.StateEntry(name, ENTRY_TYPE_BYTES, val));
    }

    function getBytesArray(IStateManager stateManager, string memory name) internal view returns(bytes[] memory) {
        return stateManager.get(name).value.asBytesArray();
    }

    function setBytesArray(IStateManager stateManager, string memory name, bytes[] memory val) internal returns(bytes[] memory oldValue) {
        return stateManager.set(IStateManager.StateEntry(name, ENTRY_TYPE_BYTES_ARRAY, abi.encode(val))).asBytesArray();
    }

    function getString(IStateManager stateManager, string memory name) internal view returns(string memory) {
        return string(stateManager.get(name).value);
    }

    function setString(IStateManager stateManager, string memory name, string memory val) internal returns(string memory oldValue) {
        return string(stateManager.set(IStateManager.StateEntry(name, ENTRY_TYPE_STRING, bytes(val))));
    }

    function getStringArray(IStateManager stateManager, string memory name) internal view returns(string[] memory) {
        return stateManager.get(name).value.asStringArray();
    }

    function setStringArray(IStateManager stateManager, string memory name, string[] memory val) internal returns(string[] memory oldValue) {
        return stateManager.set(IStateManager.StateEntry(name, ENTRY_TYPE_STRING_ARRAY, abi.encode(val))).asStringArray();
    }

    function getUint256(IStateManager stateManager, string memory name) internal view returns(uint256) {
        return stateManager.get(name).value.asUint256();
    }

    function setUint256(IStateManager stateManager, string memory name, uint256 val) internal returns(uint256 oldValue) {
        return stateManager.set(IStateManager.StateEntry(name, ENTRY_TYPE_UINT256, abi.encode(val))).asUint256();
    }

    function getUint256Array(IStateManager stateManager, string memory name) internal view returns(uint256[] memory) {
        return stateManager.get(name).value.asUint256Array();
    }

    function setUint256Array(IStateManager stateManager, string memory name, uint256[] memory val) internal returns(uint256[] memory oldValue) {
        return stateManager.set(IStateManager.StateEntry(name, ENTRY_TYPE_UINT256_ARRAY, abi.encode(val))).asUint256Array();
    }
}

File 3 of 34 : IStateManager.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.7.0;

import "@ethereansos/swissknife/contracts/generic/model/ILazyInitCapableElement.sol";

interface IStateManager is ILazyInitCapableElement {

    struct StateEntry {
        string key;
        bytes32 entryType;
        bytes value;
    }

    function size() external view returns (uint256);
    function all() external view returns (StateEntry[] memory);
    function partialList(uint256 start, uint256 offset) external view returns (StateEntry[] memory);
    function list(string[] calldata keys) external view returns (StateEntry[] memory);
    function listByIndices(uint256[] calldata indices) external view returns (StateEntry[] memory);

    function exists(string calldata key) external view returns(bool result, uint256 index);

    function get(string calldata key) external view returns(StateEntry memory);
    function getByIndex(uint256 index) external view returns(StateEntry memory);

    function set(StateEntry calldata newValue) external returns(bytes memory replacedValue);
    function batchSet(StateEntry[] calldata newValues) external returns(bytes[] memory replacedValues);

    function remove(string calldata key) external returns(bytes32 removedType, bytes memory removedValue);
    function batchRemove(string[] calldata keys) external returns(bytes32[] memory removedTypes, bytes[] memory removedValues);
    function removeByIndices(uint256[] calldata indices) external returns(bytes32[] memory removedTypes, bytes[] memory removedValues);
}

File 4 of 34 : IOrganization.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.7.0;

import "@ethereansos/swissknife/contracts/dynamicMetadata/model/IDynamicMetadataCapableElement.sol";

interface IOrganization is IDynamicMetadataCapableElement {

    struct Component {
        bytes32 key;
        address location;
        bool active;
        bool log;
    }

    function keyOf(address componentAddress) external view returns(bytes32);
    function history(bytes32 key) external view returns(address[] memory componentsAddresses);
    function batchHistory(bytes32[] calldata keys) external view returns(address[][] memory componentsAddresses);

    function get(bytes32 key) external view returns(address componentAddress);
    function list(bytes32[] calldata keys) external view returns(address[] memory componentsAddresses);
    function isActive(address subject) external view returns(bool);
    function keyIsActive(bytes32 key) external view returns(bool);

    function set(Component calldata) external returns(address replacedComponentAddress);
    function batchSet(Component[] calldata) external returns (address[] memory replacedComponentAddresses);

    event ComponentSet(bytes32 indexed key, address indexed from, address indexed to, bool active);

    function submit(address location, bytes calldata payload, address restReceiver) external payable returns(bytes memory response);
}

File 5 of 34 : IProposalsManager.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.7.0;

import "@ethereansos/swissknife/contracts/generic/model/ILazyInitCapableElement.sol";
import "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol";

interface IProposalsManager is IERC1155Receiver, ILazyInitCapableElement {

    struct ProposalCode {
        address location;
        bytes bytecode;
    }

    struct ProposalCodes {
        ProposalCode[] codes;
        bool alsoTerminate;
    }

    struct Proposal {
        address proposer;
        address[] codeSequence;
        uint256 creationBlock;
        uint256 accept;
        uint256 refuse;
        address triggeringRules;
        address[] canTerminateAddresses;
        address[] validatorsAddresses;
        bool validationPassed;
        uint256 terminationBlock;
        bytes votingTokens;
    }

    struct ProposalConfiguration {
        address[] collections;
        uint256[] objectIds;
        uint256[] weights;
        address creationRules;
        address triggeringRules;
        address[] canTerminateAddresses;
        address[] validatorsAddresses;
    }

    function batchCreate(ProposalCodes[] calldata codeSequences) external returns(bytes32[] memory createdProposalIds);

    function list(bytes32[] calldata proposalIds) external view returns(Proposal[] memory);

    function votes(bytes32[] calldata proposalIds, address[] calldata voters, bytes32[][] calldata items) external view returns(uint256[][] memory accepts, uint256[][] memory refuses, uint256[][] memory toWithdraw);
    function weight(bytes32 code) external view returns(uint256);

    function vote(address erc20TokenAddress, bytes memory permitSignature, bytes32 proposalId, uint256 accept, uint256 refuse, address voter, bool alsoTerminate) external payable;
    function batchVote(bytes[] calldata data) external payable;

    function withdrawAll(bytes32[] memory proposalIds, address voterOrReceiver, bool afterTermination) external;

    function terminate(bytes32[] calldata proposalIds) external;

    function configuration() external view returns(ProposalConfiguration memory);
    function setConfiguration(ProposalConfiguration calldata newValue) external returns(ProposalConfiguration memory oldValue);

    function lastProposalId() external view returns(bytes32);

    function lastVoteBlock(address voter) external view returns (uint256);

    event ProposalCreated(address indexed proposer, address indexed code, bytes32 indexed proposalId);
    event ProposalWeight(bytes32 indexed proposalId, address indexed collection, uint256 indexed id, bytes32 key, uint256 weight);
    event ProposalTerminated(bytes32 indexed proposalId, bool result, bytes errorData);

    event Accept(bytes32 indexed proposalId, address indexed voter, bytes32 indexed item, uint256 amount);
    event MoveToAccept(bytes32 indexed proposalId, address indexed voter, bytes32 indexed item, uint256 amount);
    event RetireAccept(bytes32 indexed proposalId, address indexed voter, bytes32 indexed item, uint256 amount);

    event Refuse(bytes32 indexed proposalId, address indexed voter, bytes32 indexed item, uint256 amount);
    event MoveToRefuse(bytes32 indexed proposalId, address indexed voter, bytes32 indexed item, uint256 amount);
    event RetireRefuse(bytes32 indexed proposalId, address indexed voter, bytes32 indexed item, uint256 amount);
}

interface IProposalChecker {
    function check(address proposalsManagerAddress, bytes32 id, bytes calldata data, address from, address voter) external view returns(bool);
}

interface IExternalProposalsManagerCommands {
    function createProposalCodeSequence(bytes32 proposalId, IProposalsManager.ProposalCode[] memory codeSequenceInput, address sender) external returns (address[] memory codeSequence, IProposalsManager.ProposalConfiguration memory localConfiguration);
    function proposalCanBeFinalized(bytes32 proposalId, IProposalsManager.Proposal memory proposal, bool validationPassed, bool result) external view returns (bool);
    function isVotable(bytes32 proposalId, IProposalsManager.Proposal memory proposal, address from, address voter, bool voteOrWithtraw) external view returns (bytes memory response);
}

File 6 of 34 : ISubDAO.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.7.0;

import "../../../core/model/IOrganization.sol";
import "../../../base/model/IProposalsManager.sol";

interface ISubDAO is IOrganization, IExternalProposalsManagerCommands {

    event Proposed(uint256 indexed modelIndex, uint256 indexed presetIndex, bytes32 indexed proposalId);

    struct SubDAOProposalModel {
        address source;
        string uri;
        bool isPreset;
        bytes[] presetValues;
        bytes32[] presetProposals;
        address creationRules;
        address triggeringRules;
        uint256 votingRulesIndex;
        address[][] canTerminateAddresses;
        address[][] validatorsAddresses;
    }

    function presetArrayMaxSize() external view returns(uint256);

    function proposalModels() external view returns(SubDAOProposalModel[] memory);
    function setProposalModels(SubDAOProposalModel[] calldata newValue) external returns(SubDAOProposalModel[] memory oldValue);

    function setInitialProposalModels(SubDAOProposalModel[] calldata newValue) external;

    function setVotingRules(uint256 modelIndex, uint256 votingRulesIndex) external returns(address[] memory oldCanTerminateAddresses, address[] memory oldValidatorsAddresses);
    function setCreationAndTriggeringRules(uint256 modelIndex, address newCreationRules, address newTriggeringRules) external returns(address oldCreationRules, address oldTriggeringRules);
    function setPresetValues(uint256 modelIndex, bytes[] calldata newPresetValues) external returns(bytes[] memory oldPresetValues, bytes32[] memory deprecatedProposalIds);

    function finalizeInit(address firstHost) external;

    function isPersistent(bytes32 proposalId) external view returns(bool result, bool isDeprecated);
}

File 7 of 34 : KnowledgeBase.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.7.0;

import "../../core/model/IOrganization.sol";
import "../subDAOsManager/model/ISubDAOsManager.sol";
import "../delegationsManager/model/IDelegationsManager.sol";
import "../treasurySplitterManager/model/ITreasurySplitterManager.sol";
import "../investmentsManager/model/IInvestmentsManager.sol";
import "../delegation/model/IDelegationTokensManager.sol";

library Grimoire {
    bytes32 constant public COMPONENT_KEY_TREASURY_SPLITTER_MANAGER = 0x87a92f6bd20613c184485be8eadb46851dd4294a8359f902606085b8be6e7ae6;
    bytes32 constant public COMPONENT_KEY_SUBDAOS_MANAGER = 0x5b87d6e94145c2e242653a71b7d439a3638a93c3f0d32e1ea876f9fb1feb53e2;
    bytes32 constant public COMPONENT_KEY_DELEGATIONS_MANAGER = 0x49b87f4ee20613c184485be8eadb46851dd4294a8359f902606085b8be6e7ae6;
    bytes32 constant public COMPONENT_KEY_INVESTMENTS_MANAGER = 0x4f3ad97a91794a00945c0ead3983f793d34044c6300048d8b4ef95636edd234b;
}

library DelegationGrimoire {
    bytes32 constant public COMPONENT_KEY_TOKENS_MANAGER = 0x62b56c3ab20613c184485be8eadb46851dd4294a8359f902606085b8be9f7dc5;
}

library Getters {
    function treasurySplitterManager(IOrganization organization) internal view returns(ITreasurySplitterManager) {
        return ITreasurySplitterManager(organization.get(Grimoire.COMPONENT_KEY_TREASURY_SPLITTER_MANAGER));
    }

    function subDAOsManager(IOrganization organization) internal view returns(ISubDAOsManager) {
        return ISubDAOsManager(organization.get(Grimoire.COMPONENT_KEY_SUBDAOS_MANAGER));
    }

    function delegationsManager(IOrganization organization) internal view returns(IDelegationsManager) {
        return IDelegationsManager(organization.get(Grimoire.COMPONENT_KEY_DELEGATIONS_MANAGER));
    }

    function investmentsManager(IOrganization organization) internal view returns(IInvestmentsManager) {
        return IInvestmentsManager(organization.get(Grimoire.COMPONENT_KEY_INVESTMENTS_MANAGER));
    }
}

library Setters {
    function replaceTreasurySplitterManager(IOrganization organization, address newComponentAddress) internal returns(ITreasurySplitterManager oldComponent) {
        require(newComponentAddress != address(0), "void");
        oldComponent = ITreasurySplitterManager(organization.set(IOrganization.Component(Grimoire.COMPONENT_KEY_TREASURY_SPLITTER_MANAGER, newComponentAddress, false, true)));
    }

    function replaceSubDAOsManager(IOrganization organization, address newComponentAddress) internal returns(ISubDAOsManager oldComponent) {
        require(newComponentAddress != address(0), "void");
        oldComponent = ISubDAOsManager(organization.set(IOrganization.Component(Grimoire.COMPONENT_KEY_SUBDAOS_MANAGER, newComponentAddress, true, true)));
    }

    function replaceDelegationsManager(IOrganization organization, address newComponentAddress) internal returns(IDelegationsManager oldComponent) {
        require(newComponentAddress != address(0), "void");
        oldComponent = IDelegationsManager(organization.set(IOrganization.Component(Grimoire.COMPONENT_KEY_DELEGATIONS_MANAGER, newComponentAddress, false, true)));
    }

    function replaceInvestmentsManager(IOrganization organization, address newComponentAddress) internal returns(IInvestmentsManager oldComponent) {
        require(newComponentAddress != address(0), "void");
        oldComponent = IInvestmentsManager(organization.set(IOrganization.Component(Grimoire.COMPONENT_KEY_INVESTMENTS_MANAGER, newComponentAddress, false, true)));
    }
}

library DelegationGetters {
    function tokensManager(IOrganization organization) internal view returns(IDelegationTokensManager) {
        return IDelegationTokensManager(organization.get(DelegationGrimoire.COMPONENT_KEY_TOKENS_MANAGER));
    }
}

library DelegationUtilities {
    using DelegationGetters for IOrganization;

    function extractVotingTokens(address delegationsManagerAddress, address delegationAddress) internal view returns (bytes memory) {
        IDelegationsManager delegationsManager = IDelegationsManager(delegationsManagerAddress);
        (bool exists,,) = delegationsManager.exists(delegationAddress);
        require(exists, "wrong address");
        (address collection, uint256 tokenId) = delegationsManager.supportedToken();
        (collection, tokenId) = IOrganization(delegationAddress).tokensManager().wrapped(collection, tokenId, delegationsManagerAddress);
        require(tokenId != 0, "Wrap tokens first");
        address[] memory collections = new address[](1);
        uint256[] memory tokenIds = new uint256[](1);
        uint256[] memory weights = new uint256[](1);
        collections[0] = collection;
        tokenIds[0] = tokenId;
        weights[0] = 1;
        return abi.encode(collections, tokenIds, weights);
    }
}

File 8 of 34 : GeneralUtilities.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.7.0;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

library BehaviorUtilities {

    function randomKey(uint256 i) internal view returns (bytes32) {
        return keccak256(abi.encode(i, block.timestamp, block.number, tx.origin, tx.gasprice, block.coinbase, block.difficulty, msg.sender, blockhash(block.number - 5)));
    }

    function calculateProjectedArraySizeAndLoopUpperBound(uint256 arraySize, uint256 start, uint256 offset) internal pure returns(uint256 projectedArraySize, uint256 projectedArrayLoopUpperBound) {
        if(arraySize != 0 && start < arraySize && offset != 0) {
            uint256 length = start + offset;
            if(start < (length = length > arraySize ? arraySize : length)) {
                projectedArraySize = (projectedArrayLoopUpperBound = length) - start;
            }
        }
    }
}

library ReflectionUtilities {

    function read(address subject, bytes memory inputData) internal view returns(bytes memory returnData) {
        bool result;
        (result, returnData) = subject.staticcall(inputData);
        if(!result) {
            assembly {
                revert(add(returnData, 0x20), mload(returnData))
            }
        }
    }

    function submit(address subject, uint256 value, bytes memory inputData) internal returns(bytes memory returnData) {
        bool result;
        (result, returnData) = subject.call{value : value}(inputData);
        if(!result) {
            assembly {
                revert(add(returnData, 0x20), mload(returnData))
            }
        }
    }

    function isContract(address subject) internal view returns (bool) {
        if(subject == address(0)) {
            return false;
        }
        uint256 codeLength;
        assembly {
            codeLength := extcodesize(subject)
        }
        return codeLength > 0;
    }

    function clone(address originalContract) internal returns(address copyContract) {
        assembly {
            mstore(
                0,
                or(
                    0x5880730000000000000000000000000000000000000000803b80938091923cF3,
                    mul(originalContract, 0x1000000000000000000)
                )
            )
            copyContract := create(0, 0, 32)
            switch extcodesize(copyContract)
                case 0 {
                    invalid()
                }
        }
    }
}

library BytesUtilities {

    bytes private constant ALPHABET = "0123456789abcdef";
    string internal constant BASE64_ENCODER_DATA = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';

    function asAddress(bytes memory b) internal pure returns(address) {
        if(b.length == 0) {
            return address(0);
        }
        if(b.length == 20) {
            address addr;
            assembly {
                addr := mload(add(b, 20))
            }
            return addr;
        }
        return abi.decode(b, (address));
    }

    function asAddressArray(bytes memory b) internal pure returns(address[] memory callResult) {
        if(b.length > 0) {
            return abi.decode(b, (address[]));
        }
    }

    function asBool(bytes memory bs) internal pure returns(bool) {
        return asUint256(bs) != 0;
    }

    function asBoolArray(bytes memory b) internal pure returns(bool[] memory callResult) {
        if(b.length > 0) {
            return abi.decode(b, (bool[]));
        }
    }

    function asBytesArray(bytes memory b) internal pure returns(bytes[] memory callResult) {
        if(b.length > 0) {
            return abi.decode(b, (bytes[]));
        }
    }

    function asString(bytes memory b) internal pure returns(string memory callResult) {
        if(b.length > 0) {
            return abi.decode(b, (string));
        }
    }

    function asStringArray(bytes memory b) internal pure returns(string[] memory callResult) {
        if(b.length > 0) {
            return abi.decode(b, (string[]));
        }
    }

    function asUint256(bytes memory bs) internal pure returns(uint256 x) {
        if (bs.length >= 32) {
            assembly {
                x := mload(add(bs, add(0x20, 0)))
            }
        }
    }

    function asUint256Array(bytes memory b) internal pure returns(uint256[] memory callResult) {
        if(b.length > 0) {
            return abi.decode(b, (uint256[]));
        }
    }

    function toString(bytes memory data) internal pure returns(string memory) {
        bytes memory str = new bytes(2 + data.length * 2);
        str[0] = "0";
        str[1] = "x";
        for (uint256 i = 0; i < data.length; i++) {
            str[2+i*2] = ALPHABET[uint256(uint8(data[i] >> 4))];
            str[3+i*2] = ALPHABET[uint256(uint8(data[i] & 0x0f))];
        }
        return string(str);
    }

    function asSingletonArray(bytes memory a) internal pure returns(bytes[] memory array) {
        array = new bytes[](1);
        array[0] = a;
    }

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

        string memory table = BASE64_ENCODER_DATA;

        uint256 encodedLen = 4 * ((data.length + 2) / 3);

        string memory result = new string(encodedLen + 32);

        assembly {
            mstore(result, encodedLen)

            let tablePtr := add(table, 1)

            let dataPtr := data
            let endPtr := add(dataPtr, mload(data))

            let resultPtr := add(result, 32)

            for {} lt(dataPtr, endPtr) {}
            {
                dataPtr := add(dataPtr, 3)
                let input := mload(dataPtr)

                mstore8(resultPtr, mload(add(tablePtr, and(shr(18, input), 0x3F))))
                resultPtr := add(resultPtr, 1)
                mstore8(resultPtr, mload(add(tablePtr, and(shr(12, input), 0x3F))))
                resultPtr := add(resultPtr, 1)
                mstore8(resultPtr, mload(add(tablePtr, and(shr( 6, input), 0x3F))))
                resultPtr := add(resultPtr, 1)
                mstore8(resultPtr, mload(add(tablePtr, and(        input,  0x3F))))
                resultPtr := add(resultPtr, 1)
            }

            switch mod(mload(data), 3)
            case 1 { mstore(sub(resultPtr, 2), shl(240, 0x3d3d)) }
            case 2 { mstore(sub(resultPtr, 1), shl(248, 0x3d)) }
        }

        return result;
    }
}

library StringUtilities {

    bytes1 private constant CHAR_0 = bytes1('0');
    bytes1 private constant CHAR_A = bytes1('A');
    bytes1 private constant CHAR_a = bytes1('a');
    bytes1 private constant CHAR_f = bytes1('f');

    bytes  internal constant BASE64_DECODER_DATA = hex"0000000000000000000000000000000000000000000000000000000000000000"
                                                   hex"00000000000000000000003e0000003f3435363738393a3b3c3d000000000000"
                                                   hex"00000102030405060708090a0b0c0d0e0f101112131415161718190000000000"
                                                   hex"001a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132330000000000";

    function isEmpty(string memory test) internal pure returns (bool) {
        return equals(test, "");
    }

    function equals(string memory a, string memory b) internal pure returns(bool) {
        return keccak256(abi.encodePacked(a)) == keccak256(abi.encodePacked(b));
    }

    function toLowerCase(string memory str) internal pure returns(string memory) {
        bytes memory bStr = bytes(str);
        for (uint256 i = 0; i < bStr.length; i++) {
            bStr[i] = bStr[i] >= 0x41 && bStr[i] <= 0x5A ? bytes1(uint8(bStr[i]) + 0x20) : bStr[i];
        }
        return string(bStr);
    }

    function asBytes(string memory str) internal pure returns(bytes memory toDecode) {
        bytes memory data = abi.encodePacked(str);
        if(data.length == 0 || data[0] != "0" || (data[1] != "x" && data[1] != "X")) {
            return "";
        }
        uint256 start = 2;
        toDecode = new bytes((data.length - 2) / 2);

        for(uint256 i = 0; i < toDecode.length; i++) {
            toDecode[i] = bytes1(_fromHexChar(uint8(data[start++])) + _fromHexChar(uint8(data[start++])) * 16);
        }
    }

    function toBase64(string memory input) internal pure returns(string memory) {
        return BytesUtilities.toBase64(abi.encodePacked(input));
    }

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

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

        bytes memory table = BASE64_DECODER_DATA;

        uint256 decodedLen = (data.length / 4) * 3;

        bytes memory result = new bytes(decodedLen + 32);

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

            mstore(result, decodedLen)

            let tablePtr := add(table, 1)

            let dataPtr := data
            let endPtr := add(dataPtr, mload(data))

            let resultPtr := add(result, 32)

            for {} lt(dataPtr, endPtr) {}
            {
               dataPtr := add(dataPtr, 4)
               let input := mload(dataPtr)

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

        return result;
    }

    function _fromHexChar(uint8 c) private pure returns (uint8) {
        bytes1 charc = bytes1(c);
        return charc < CHAR_0 || charc > CHAR_f ? 0 : (charc < CHAR_A ? 0 : 10) + c - uint8(charc < CHAR_A ? CHAR_0 : charc < CHAR_a ? CHAR_A : CHAR_a);
    }
}

library Uint256Utilities {
    function asSingletonArray(uint256 n) internal pure returns(uint256[] memory array) {
        array = new uint256[](1);
        array[0] = n;
    }

    function toHex(uint256 _i) internal pure returns (string memory) {
        return BytesUtilities.toString(abi.encodePacked(_i));
    }

    function toString(uint256 _i) internal pure returns (string memory _uintAsString) {
        if (_i == 0) {
            return "0";
        }
        uint256 j = _i;
        uint256 len;
        while (j != 0) {
            len++;
            j /= 10;
        }
        bytes memory bstr = new bytes(len);
        uint256 k = len;
        while (_i != 0) {
            k = k-1;
            uint8 temp = (48 + uint8(_i - _i / 10 * 10));
            bytes1 b1 = bytes1(temp);
            bstr[k] = b1;
            _i /= 10;
        }
        return string(bstr);
    }

    function sum(uint256[] memory arr) internal pure returns (uint256 result) {
        for(uint256 i = 0; i < arr.length; i++) {
            result += arr[i];
        }
    }
}

library AddressUtilities {
    function asSingletonArray(address a) internal pure returns(address[] memory array) {
        array = new address[](1);
        array[0] = a;
    }

    function toString(address _addr) internal pure returns (string memory) {
        return _addr == address(0) ? "0x0000000000000000000000000000000000000000" : BytesUtilities.toString(abi.encodePacked(_addr));
    }
}

library Bytes32Utilities {

    function asSingletonArray(bytes32 a) internal pure returns(bytes32[] memory array) {
        array = new bytes32[](1);
        array[0] = a;
    }

    function toString(bytes32 bt) internal pure returns (string memory) {
        return bt == bytes32(0) ?  "0x0000000000000000000000000000000000000000000000000000000000000000" : BytesUtilities.toString(abi.encodePacked(bt));
    }
}

library TransferUtilities {
    using ReflectionUtilities for address;

    function balanceOf(address erc20TokenAddress, address account) internal view returns(uint256) {
        if(erc20TokenAddress == address(0)) {
            return account.balance;
        }
        return abi.decode(erc20TokenAddress.read(abi.encodeWithSelector(IERC20(erc20TokenAddress).balanceOf.selector, account)), (uint256));
    }

    function allowance(address erc20TokenAddress, address account, address spender) internal view returns(uint256) {
        if(erc20TokenAddress == address(0)) {
            return 0;
        }
        return abi.decode(erc20TokenAddress.read(abi.encodeWithSelector(IERC20(erc20TokenAddress).allowance.selector, account, spender)), (uint256));
    }

    function safeApprove(address erc20TokenAddress, address spender, uint256 value) internal {
        bytes memory returnData = erc20TokenAddress.submit(0, abi.encodeWithSelector(IERC20(erc20TokenAddress).approve.selector, spender, value));
        require(returnData.length == 0 || abi.decode(returnData, (bool)), 'APPROVE_FAILED');
    }

    function safeTransfer(address erc20TokenAddress, address to, uint256 value) internal {
        if(value == 0) {
            return;
        }
        if(erc20TokenAddress == address(0)) {
            to.submit(value, "");
            return;
        }
        bytes memory returnData = erc20TokenAddress.submit(0, abi.encodeWithSelector(IERC20(erc20TokenAddress).transfer.selector, to, value));
        require(returnData.length == 0 || abi.decode(returnData, (bool)), 'TRANSFER_FAILED');
    }

    function safeTransferFrom(address erc20TokenAddress, address from, address to, uint256 value) internal {
        if(value == 0) {
            return;
        }
        if(erc20TokenAddress == address(0)) {
            to.submit(value, "");
            return;
        }
        bytes memory returnData = erc20TokenAddress.submit(0, abi.encodeWithSelector(IERC20(erc20TokenAddress).transferFrom.selector, from, to, value));
        require(returnData.length == 0 || abi.decode(returnData, (bool)), 'TRANSFERFROM_FAILED');
    }
}

File 9 of 34 : EthereansFactory.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.7.0;

import "../model/IEthereansFactory.sol";
import "@ethereansos/swissknife/contracts/factory/impl/Factory.sol";
import "../../factoryOfFactories/model/IFactoryOfFactories.sol";
import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";
import { TransferUtilities } from "@ethereansos/swissknife/contracts/lib/GeneralUtilities.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol";

abstract contract EthereansFactory is Factory, IEthereansFactory {
    using TransferUtilities for address;

    uint256 internal _feePercentageForTransacted;
    address internal _feeReceiver;
    address internal _tokenToTransferOrBurnAddressInCreation;
    uint256 internal _transferOrBurnAmountInCreation;
    address internal _transferOrBurnReceiverInCreation;
    address internal _tokenToTransferOrBurnAddressInApplication;
    uint256 internal _transferOrBurnAmountInApplication;
    address internal _transferOrBurnReceiverInApplication;

    constructor(bytes memory lazyInitData) Factory(lazyInitData) {
    }

    receive() external payable {
    }

    function _factoryLazyInit(bytes memory initData) internal override virtual returns (bytes memory factoryLazyInitResponse) {
        EthereansFactoryInitializer memory ethereansFactoryInitializer;
        (ethereansFactoryInitializer) = abi.decode(initData, (EthereansFactoryInitializer));
        _feePercentageForTransacted = ethereansFactoryInitializer.feePercentageForTransacted;
        _feeReceiver = ethereansFactoryInitializer.feeReceiver;
        _tokenToTransferOrBurnAddressInCreation = ethereansFactoryInitializer.tokenToTransferOrBurnAddressInCreation;
        _transferOrBurnAmountInCreation = ethereansFactoryInitializer.transferOrBurnAmountInCreation;
        _transferOrBurnReceiverInCreation = ethereansFactoryInitializer.transferOrBurnReceiverInCreation;
        _tokenToTransferOrBurnAddressInApplication = ethereansFactoryInitializer.tokenToTransferOrBurnAddressInApplication;
        _transferOrBurnAmountInApplication = ethereansFactoryInitializer.transferOrBurnAmountInApplication;
        _transferOrBurnReceiverInApplication = ethereansFactoryInitializer.transferOrBurnReceiverInApplication;
        factoryLazyInitResponse = _ethosFactoryLazyInit(ethereansFactoryInitializer.factoryLazyInitData);
    }

    function feeInfo() public override view returns(address operator, uint256 feePercentageForTransacted, address feeReceiver, address tokenToTransferOrBurnAddressInCreation, uint256 transferOrBurnAmountInCreation, address transferOrBurnReceiverInCreation, address tokenToTransferOrBurnAddressInApplication, uint256 transferOrBurnAmountInApplication, address transferOrBurnReceiverInApplication) {
        operator = initializer;
        (feePercentageForTransacted, feeReceiver, tokenToTransferOrBurnAddressInCreation, transferOrBurnAmountInCreation, transferOrBurnReceiverInCreation, tokenToTransferOrBurnAddressInApplication, transferOrBurnAmountInApplication, transferOrBurnReceiverInApplication) = _realFeeInfo();
    }

    function payFee(address sender, address tokenAddress, uint256 value, bytes calldata permitSignature) external override payable returns (uint256 feePaid) {
        (uint256 feePercentageForTransacted, address feeReceiver, , , , , uint256 transferOrBurnAmountInApplication, ) = _realFeeInfo();
        if(feePercentageForTransacted != 0) {
            (uint256 feeSentOrBurnt, uint256 fofFeePaid) = IFactoryOfFactories(initializer).payFee{value : tokenAddress == address(0) ? value : 0}(sender, tokenAddress, value, permitSignature, feePercentageForTransacted, feeReceiver);
            feePaid = feeSentOrBurnt + fofFeePaid;
            _feePaid(sender, tokenAddress, value, feeSentOrBurnt, fofFeePaid, feePercentageForTransacted, feeReceiver);
        } else {
            require(transferOrBurnAmountInApplication == 0, "zero fees");
        }
    }

    function _feePaid(address sender, address tokenAddress, uint256 value, uint256 feeSentOrBurnt, uint256 feePaid, uint256 feePercentageForTransacted, address feeReceiver) internal virtual {
    }

    function burnOrTransferToken(address sender, bytes calldata permitSignature) external payable override returns(uint256 amountTransferedOrBurnt) {
        (uint256 feePercentageForTransacted, , , , , address tokenToTransferOrBurnAddressInApplication, uint256 transferOrBurnAmountInApplication, address transferOrBurnReceiverInApplication) = _realFeeInfo();
        if(transferOrBurnAmountInApplication != 0) {
            (uint256 feeSentOrBurnt, uint256 fofAmountTransferedOrBurnt) = IFactoryOfFactories(initializer).burnOrTransferTokenAmount{value : tokenToTransferOrBurnAddressInApplication == address(0) ? transferOrBurnAmountInApplication : 0}(sender, tokenToTransferOrBurnAddressInApplication, transferOrBurnAmountInApplication, permitSignature, transferOrBurnReceiverInApplication);
            amountTransferedOrBurnt = feeSentOrBurnt + fofAmountTransferedOrBurnt;
            _amountTransferedOrBurnt(sender, feeSentOrBurnt, fofAmountTransferedOrBurnt, tokenToTransferOrBurnAddressInApplication, transferOrBurnAmountInApplication, transferOrBurnReceiverInApplication);
        } else {
            require(feePercentageForTransacted == 0, "zero amount");
        }
    }

    function _amountTransferedOrBurnt(address sender, uint256 feeSentOrBurnt, uint256 amountTransferedOrBurnt, address tokenToTransferOrBurnAddressInApplication, uint256 transferOrBurnAmountInApplication, address transferOrBurnReceiverInApplication) internal virtual {
    }

    function _burnOrTransferTokenAtCreation(address sender, bytes memory permitSignature) internal returns(uint256 amountTransferedOrBurnt) {
        (, , address tokenToTransferOrBurnAddressInCreation, uint256 transferOrBurnAmountInCreation, address transferOrBurnReceiverInCreation, , , ) = _realFeeInfo();
        if(transferOrBurnAmountInCreation != 0) {
            (uint256 feeSentOrBurnt, uint256 fofAmountTransferedOrBurnt) = IFactoryOfFactories(initializer).burnOrTransferTokenAmount{value : tokenToTransferOrBurnAddressInCreation == address(0) ? transferOrBurnAmountInCreation : 0}(sender, tokenToTransferOrBurnAddressInCreation, transferOrBurnAmountInCreation, permitSignature, transferOrBurnReceiverInCreation);
            amountTransferedOrBurnt = feeSentOrBurnt + fofAmountTransferedOrBurnt;
            _amountTransferedOrBurntAtCreation(sender, feeSentOrBurnt, fofAmountTransferedOrBurnt, tokenToTransferOrBurnAddressInCreation, transferOrBurnAmountInCreation, transferOrBurnReceiverInCreation);
        }
    }

    function _amountTransferedOrBurntAtCreation(address sender, uint256 feeSentOrBurnt, uint256 amountTransferedOrBurnt, address tokenToTransferOrBurnAddressInCreation, uint256 transferOrBurnAmountInCreation, address transferOrBurnReceiverInCreation) internal virtual {
    }

    function _subjectIsAuthorizedFor(address, address, bytes4 selector, bytes calldata, uint256) internal override pure returns (bool, bool) {
        if(selector == this.setModelAddress.selector || selector == this.setDynamicUriResolver.selector) {
            return (true, false);
        }
        return (false, false);
    }

    function _realFeeInfo() internal virtual view returns(uint256 feePercentageForTransacted, address feeReceiver, address tokenToTransferOrBurnAddressInCreation, uint256 transferOrBurnAmountInCreation, address transferOrBurnReceiverInCreation, address tokenToTransferOrBurnAddressInApplication, uint256 transferOrBurnAmountInApplication, address transferOrBurnReceiverInApplication) {
        return (_feePercentageForTransacted, _feeReceiver, _tokenToTransferOrBurnAddressInCreation, _transferOrBurnAmountInCreation, _transferOrBurnReceiverInCreation, _tokenToTransferOrBurnAddressInApplication, _transferOrBurnAmountInApplication, _transferOrBurnReceiverInApplication);
    }

    function _ethosFactoryLazyInit(bytes memory lazyInitData) internal virtual returns(bytes memory lazyInitResponse);
}

File 10 of 34 : ISubDAOsManager.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.7.0;

import "@ethereansos/swissknife/contracts/generic/model/ILazyInitCapableElement.sol";

interface ISubDAOsManager is ILazyInitCapableElement {

    struct SubDAOEntry {
        bytes32 key;
        address location;
        address newHost;
    }

    function keyOf(address subdaoAddress) external view returns(bytes32);
    function history(bytes32 key) external view returns(address[] memory subdaosAddresses);
    function batchHistory(bytes32[] calldata keys) external view returns(address[][] memory subdaosAddresses);

    function get(bytes32 key) external view returns(address subdaoAddress);
    function list(bytes32[] calldata keys) external view returns(address[] memory subdaosAddresses);
    function exists(address subject) external view returns(bool);
    function keyExists(bytes32 key) external view returns(bool);

    function set(bytes32 key, address location, address newHost) external returns(address replacedSubdaoAddress);
    function batchSet(SubDAOEntry[] calldata) external returns (address[] memory replacedSubdaoAddresses);

    function submit(bytes32 key, bytes calldata payload, address restReceiver) external payable returns(bytes memory response);

    event SubDAOSet(bytes32 indexed key, address indexed from, address indexed to);
}

File 11 of 34 : ISubDAOFactory.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.7.0;

import "./IOrganizationFactory.sol";
import "../../../ext/subDAO/model/ISubDAO.sol";

interface ISubDAOFactory is IOrganizationFactory {
    function setInitialProposalModels(address subDAO, ISubDAO.SubDAOProposalModel[] calldata newValue) external;
}

File 12 of 34 : ILazyInitCapableElement.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.7.0;

import "@openzeppelin/contracts/utils/introspection/IERC165.sol";

interface ILazyInitCapableElement is IERC165 {

    function lazyInit(bytes calldata lazyInitData) external returns(bytes memory initResponse);
    function initializer() external view returns(address);

    event Host(address indexed from, address indexed to);

    function host() external view returns(address);
    function setHost(address newValue) external returns(address oldValue);

    function subjectIsAuthorizedFor(address subject, address location, bytes4 selector, bytes calldata payload, uint256 value) external view returns(bool);
}

File 13 of 34 : IDelegationTokensManager.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.7.0;

import "@ethereansos/swissknife/contracts/generic/model/ILazyInitCapableElement.sol";
import "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol";

interface IDelegationTokensManager is ILazyInitCapableElement, IERC1155Receiver {

    event Wrapped(address sourceAddress, uint256 sourceObjectId, address indexed sourceDelegationsManagerAddress, uint256 indexed wrappedObjectId);

    function itemMainInterfaceAddress() external view returns(address);
    function projectionAddress() external view returns(address);
    function collectionId() external view returns(bytes32);
    function ticker() external view returns(string memory);

    function wrap(address sourceDelegationsManagerAddress, bytes memory permitSignature, uint256 amount, address receiver) payable external returns(uint256 wrappedObjectId);

    function wrapped(address sourceCollection, uint256 sourceObjectId, address sourceDelegationsManagerAddress) external view returns(address wrappedCollection, uint256 wrappedObjectId);
    function source(uint256 wrappedObjectId) external view returns(address sourceCollectionAddress, uint256 sourceObjectId, address sourceDelegationsManagerAddress);
}

File 14 of 34 : IInvestmentsManager.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.7.0;

import "@ethereansos/swissknife/contracts/generic/model/ILazyInitCapableElement.sol";
import "@ethereansos/covenants/contracts/presto/IPrestoUniV3.sol";

interface IInvestmentsManager is ILazyInitCapableElement {

    function ONE_HUNDRED() external pure returns(uint256);

    function refundETHReceiver() external view returns(bytes32 key, address receiverAddress);

    function executorRewardPercentage() external view returns(uint256);

    function prestoAddress() external view returns(address prestoAddress);

    function tokenFromETHToBurn() external view returns(address addr);

    function tokensFromETH() external view returns(address[] memory addresses);
    function setTokensFromETH(address[] calldata addresses) external returns(address[] memory oldAddresses);

    function swapFromETH(PrestoOperation[] calldata tokensFromETHData, PrestoOperation calldata tokenFromETHToBurnData, address executorRewardReceiver) external returns (uint256[] memory tokenAmounts, uint256 tokenFromETHToBurnAmount, uint256 executorReward);

    function lastSwapToETHBlock() external view returns (uint256);

    function swapToETHInterval() external view returns (uint256);

    function nextSwapToETHBlock() external view returns (uint256);

    function tokensToETH() external view returns(address[] memory addresses, uint256[] memory percentages);
    function setTokensToETH(address[] calldata addresses, uint256[] calldata percentages) external returns(address[] memory oldAddresses, uint256[] memory oldPercentages);

    function swapToETH(PrestoOperation[] calldata tokensToETHData, address executorRewardReceiver) external returns (uint256[] memory executorRewards, uint256[] memory ethAmounts);
}

File 15 of 34 : ITreasurySplitterManager.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.7.0;

import "@ethereansos/swissknife/contracts/generic/model/ILazyInitCapableElement.sol";

interface ITreasurySplitterManager is ILazyInitCapableElement {

    event Splitted(bytes32 indexed subDAO, address indexed receiver, uint256 amount);

    function ONE_HUNDRED() external pure returns(uint256);

    function lastSplitBlock() external view returns (uint256);

    function splitInterval() external view returns (uint256);

    function nextSplitBlock() external view returns (uint256);

    function executorRewardPercentage() external view returns(uint256);

    function flushExecutorRewardPercentage() external view returns(uint256);

    function receiversAndPercentages() external view returns (bytes32[] memory keys, address[] memory addresses, uint256[] memory percentages);

    function flushReceiver() external view returns(bytes32 key, address addr);

    function flushERC20Tokens(address[] calldata tokenAddresses, address executorRewardReceiver) external;

    function splitTreasury(address executorRewardReceiver) external;
}

File 16 of 34 : IDelegationsManager.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.7.0;

import "@ethereansos/swissknife/contracts/generic/model/ILazyInitCapableElement.sol";

interface IDelegationsManager is ILazyInitCapableElement {

    event DelegationSet(address indexed delegationAddress, address indexed treasuryAddress);
    event SupportedToken(address indexed collectionAddress, uint256 indexed objectId);
    event Factory(address indexed factory, bool indexed allowed);

    struct DelegationData {
        address location;
        address treasury;
    }

    function split(address executorRewardReceiver) external;

    function supportedToken() external view returns(address collection, uint256 objectId);
    function setSupportedToken(address collection, uint256 tokenId) external;

    function maxSize() external view returns(uint256);
    function setMaxSize(uint256 newValue) external returns (uint256 oldValue);

    function size() external view returns (uint256);
    function list() external view returns (DelegationData[] memory);
    function partialList(uint256 start, uint256 offset) external view returns (DelegationData[] memory);
    function listByAddresses(address[] calldata delegationAddresses) external view returns (DelegationData[] memory);
    function listByIndices(uint256[] calldata indices) external view returns (DelegationData[] memory);

    function exists(address delegationAddress) external view returns(bool result, uint256 index, address treasuryOf);
    function treasuryOf(address delegationAddress) external view returns(address treasuryAddress);

    function get(address delegationAddress) external view returns(DelegationData memory);
    function getByIndex(uint256 index) external view returns(DelegationData memory);

    function set() external;

    function remove(address[] calldata delegationAddresses) external returns(DelegationData[] memory removedDelegations);
    function removeAll() external;

    function executorRewardPercentage() external view returns(uint256);

    function getSplit(address executorRewardReceiver) external view returns (address[] memory receivers, uint256[] memory values);
    function getSituation() external view returns(address[] memory treasuries, uint256[] memory treasuryPercentages);

    function factoryIsAllowed(address factoryAddress) external view returns(bool);
    function setFactoriesAllowed(address[] memory factoryAddresses, bool[] memory allowed) external;

    function isBanned(address productAddress) external view returns(bool);
    function ban(address[] memory productAddresses) external;

    function isValid(address delegationAddress) external view returns(bool);

    event PaidFor(address indexed delegationAddress, address indexed from, address indexed retriever, uint256 amount);

    function paidFor(address delegationAddress, address retriever) external view returns(uint256 totalPaid, uint256 retrieverPaid);
    function payFor(address delegationAddress, uint256 amount, bytes memory permitSignature, address retriever) external payable;
    function retirePayment(address delegationAddress, address receiver, bytes memory data) external;
    function attachInsurance() external view returns (uint256);
    function setAttachInsurance(uint256 value) external returns (uint256 oldValue);
}

File 17 of 34 : IOrganizationFactory.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.7.0;

import "./IEthereansFactory.sol";

interface IOrganizationFactory is IEthereansFactory {

    struct OrganizationDeployData {
        string uri;
        bytes[] mandatoryComponentsDeployData;
        uint256[] additionalComponents;
        bytes[] additionalComponentsDeployData;
        bytes[] specialComponentsData;
        bytes specificOrganizationData;
    }

    function data() external view returns(address[] memory utilityModels, bytes32[] memory utilitiyModelKeys, bool[] memory utilitiyModelActive, string memory proposalUri);
}

File 18 of 34 : draft-IERC20Permit.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

File 19 of 34 : IERC1155.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

File 20 of 34 : IFactoryOfFactories.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.7.0;

interface IFactoryOfFactories {

    function size() external view returns (uint256);
    function all() external view returns (address[] memory hosts, address[][] memory factoryLists);
    function partialList(uint256 start, uint256 offset) external view returns (address[] memory hosts, address[][] memory factoryLists);

    function get(uint256 index) external view returns(address host, address[] memory factoryList);

    function create(address[] calldata hosts, bytes[][] calldata factoryBytecodes) external returns (address[][] memory factoryLists, uint256[] memory listPositions);
    function setFactoryListsMetadata(uint256[] calldata listPositions, address[] calldata newHosts) external returns (address[] memory replacedHosts);
    event FactoryList(uint256 indexed listPosition, address indexed fromHost, address indexed toHost);

    function add(uint256[] calldata listPositions, bytes[][] calldata factoryBytecodes) external returns(address[][] memory factoryLists, uint256[][] memory factoryPositions);
    event FactoryAdded(uint256 indexed listPosition, address indexed host, address indexed factoryAddress, uint256 factoryPosition);

    function payFee(address sender, address tokenAddress, uint256 value, bytes calldata permitSignature, uint256 feePercentage, address feeReceiver) external payable returns (uint256 feeSentOrBurnt, uint256 feePaid);
    function burnOrTransferTokenAmount(address sender, address tokenAddress, uint256 value, bytes calldata permitSignature, address receiver) external payable returns(uint256 feeSentOrBurnt, uint256 amountTransferedOrBurnt);
}

File 21 of 34 : Factory.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.7.0;

import "../model/IFactory.sol";
import "../../dynamicMetadata/impl/DynamicMetadataCapableElement.sol";
import { ReflectionUtilities } from "../../lib/GeneralUtilities.sol";

contract Factory is IFactory, DynamicMetadataCapableElement {
    using ReflectionUtilities for address;

    address public override modelAddress;
    mapping(address => address) public override deployer;

    constructor(bytes memory lazyInitData) DynamicMetadataCapableElement(lazyInitData) {
    }

    function _dynamicMetadataElementLazyInit(bytes memory lazyInitData) internal override returns (bytes memory lazyInitResponse) {
        require(modelAddress == address(0), "init");
        (modelAddress, lazyInitResponse) = abi.decode(lazyInitData, (address, bytes));
        lazyInitResponse = _factoryLazyInit(lazyInitResponse);
    }

    function _dynamicMetadataElementSupportsInterface(bytes4 interfaceId) override internal view returns(bool) {
        return
            interfaceId == type(IFactory).interfaceId ||
            interfaceId == this.modelAddress.selector ||
            interfaceId == this.setModelAddress.selector ||
            interfaceId == this.deployer.selector ||
            interfaceId == this.deploy.selector ||
            _factorySupportsInterface(interfaceId);
    }

    function setModelAddress(address newValue) external override authorizedOnly returns(address oldValue) {
        oldValue = modelAddress;
        modelAddress = newValue;
    }

    function deploy(bytes calldata deployData) external payable override virtual returns(address deployedAddress, bytes memory deployedLazyInitResponse) {
        deployer[deployedAddress = modelAddress.clone()] = msg.sender;
        emit Deployed(modelAddress, deployedAddress, msg.sender, deployedLazyInitResponse = ILazyInitCapableElement(deployedAddress).lazyInit(deployData));
        require(ILazyInitCapableElement(deployedAddress).initializer() == address(this));
    }

    function _factoryLazyInit(bytes memory) internal virtual returns (bytes memory) {
        return "";
    }

    function _factorySupportsInterface(bytes4 interfaceId) internal virtual view returns(bool) {
    }
}

File 22 of 34 : IEthereansFactory.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.7.0;

import "@ethereansos/swissknife/contracts/factory/model/IFactory.sol";
import "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol";

interface IEthereansFactory is IFactory {

    struct EthereansFactoryInitializer {
        uint256 feePercentageForTransacted;
        address feeReceiver;
        address tokenToTransferOrBurnAddressInCreation;
        uint256 transferOrBurnAmountInCreation;
        address transferOrBurnReceiverInCreation;
        address tokenToTransferOrBurnAddressInApplication;
        uint256 transferOrBurnAmountInApplication;
        address transferOrBurnReceiverInApplication;
        bytes factoryLazyInitData;
    }

    function feeInfo() external view returns(address operator, uint256 feePercentageForTransacted, address feeReceiver, address tokenToTransferOrBurnAddressInCreation, uint256 transferOrBurnAmountInCreation, address transferOrBurnReceiverInCreation, address tokenToTransferOrBurnAddressInApplication, uint256 transferOrBurnAmountInApplication, address transferOrBurnReceiverInApplication);

    function payFee(address sender, address tokenAddress, uint256 value, bytes calldata permitSignature) external payable returns (uint256 feePaid);
    function burnOrTransferToken(address sender, bytes calldata permitSignature) external payable returns(uint256 amountTransferedOrBurnt);
}

File 23 of 34 : IDynamicMetadataCapableElement.sol
//SPDX-License-Identifier: MIT
pragma solidity >=0.7.0;

import "../../generic/model/ILazyInitCapableElement.sol";

interface IDynamicMetadataCapableElement is ILazyInitCapableElement {

    function uri() external view returns(string memory);
    function plainUri() external view returns(string memory);

    function setUri(string calldata newValue) external returns (string memory oldValue);

    function dynamicUriResolver() external view returns(address);
    function setDynamicUriResolver(address newValue) external returns(address oldValue);
}

File 24 of 34 : IERC1155Receiver.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

/**
 * @dev _Available since v3.1._
 */
interface IERC1155Receiver is IERC165 {
    /**
        @dev Handles the receipt of a single ERC1155 token type. This function is
        called at the end of a `safeTransferFrom` after the balance has been updated.
        To accept the transfer, this must return
        `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`
        (i.e. 0xf23a6e61, or its own function selector).
        @param operator The address which initiated the transfer (i.e. msg.sender)
        @param from The address which previously owned the token
        @param id The ID of the token being transferred
        @param value The amount of tokens being transferred
        @param data Additional data with no specified format
        @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed
    */
    function onERC1155Received(
        address operator,
        address from,
        uint256 id,
        uint256 value,
        bytes calldata data
    ) external returns (bytes4);

    /**
        @dev Handles the receipt of a multiple ERC1155 token types. This function
        is called at the end of a `safeBatchTransferFrom` after the balances have
        been updated. To accept the transfer(s), this must return
        `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))`
        (i.e. 0xbc197c81, or its own function selector).
        @param operator The address which initiated the batch transfer (i.e. msg.sender)
        @param from The address which previously owned the token
        @param ids An array containing ids of each token being transferred (order and length must match values array)
        @param values An array containing amounts of each token being transferred (order and length must match ids array)
        @param data Additional data with no specified format
        @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed
    */
    function onERC1155BatchReceived(
        address operator,
        address from,
        uint256[] calldata ids,
        uint256[] calldata values,
        bytes calldata data
    ) external returns (bytes4);
}

File 25 of 34 : ITreasuryManager.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.7.0;

import "@ethereansos/swissknife/contracts/generic/model/ILazyInitCapableElement.sol";

interface ITreasuryManager is ILazyInitCapableElement {

    struct TransferEntry {
        address token;
        uint256[] objectIds;
        uint256[] values;
        address receiver;
        bool safe;
        bool batch;
        bool withData;
        bytes data;
    }

    function transfer(address token, uint256 value, address receiver, uint256 tokenType, uint256 objectId, bool safe, bool withData, bytes calldata data) external returns(bool result, bytes memory returnData);
    function batchTransfer(TransferEntry[] calldata transferEntries) external returns(bool[] memory results, bytes[] memory returnDatas);

    function submit(address location, bytes calldata payload, address restReceiver) external payable returns(bytes memory response);

    function setAdditionalFunction(bytes4 selector, address newServer, bool log) external returns (address oldServer);
    event AdditionalFunction(address caller, bytes4 indexed selector, address indexed oldServer, address indexed newServer);
}

File 26 of 34 : IMicroservicesManager.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.7.0;

import "@ethereansos/swissknife/contracts/generic/model/ILazyInitCapableElement.sol";

interface IMicroservicesManager is ILazyInitCapableElement {

    struct Microservice {
        string key;
        address location;
        string methodSignature;
        bool submittable;
        string returnAbiParametersArray;
        bool isInternal;
        bool needsSender;
    }

    function size() external view returns (uint256);
    function all() external view returns (Microservice[] memory);
    function partialList(uint256 start, uint256 offset) external view returns (Microservice[] memory);
    function list(string[] calldata keys) external view returns (Microservice[] memory);
    function listByIndices(uint256[] calldata indices) external view returns (Microservice[] memory);

    function exists(string calldata key) external view returns(bool result, uint256 index);

    function get(string calldata key) external view returns(Microservice memory);
    function getByIndex(uint256 index) external view returns(Microservice memory);

    function set(Microservice calldata newValue) external returns(Microservice memory replacedValue);
    function batchSet(Microservice[] calldata newValues) external returns(Microservice[] memory replacedValues);

    event MicroserviceAdded(address indexed sender, bytes32 indexed keyHash, string key, address indexed location, string methodSignature, bool submittable, string returnAbiParametersArray, bool isInternal, bool needsSender);

    function remove(string calldata key) external returns(Microservice memory removedValue);
    function batchRemove(string[] calldata keys) external returns(Microservice[] memory removedValues);
    function removeByIndices(uint256[] calldata indices) external returns(Microservice[] memory removedValues);

    event MicroserviceRemoved(address indexed sender, bytes32 indexed keyHash, string key, address indexed location, string methodSignature, bool submittable, string returnAbiParametersArray, bool isInternal, bool needsSender);

    function read(string calldata key, bytes calldata data) external view returns(bytes memory returnData);
    function submit(string calldata key, bytes calldata data) external payable returns(bytes memory returnData);
}

File 27 of 34 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

File 28 of 34 : IPrestoUniV3.sol
//SPDX-License-Identifier: MIT
pragma solidity >=0.7.0;
pragma abicoder v2;

import "./PrestoDataUniV3.sol";

interface IPrestoUniV3 {

    function ONE_HUNDRED() external view returns (uint256);
    function doubleProxy() external view returns (address);
    function feePercentage() external view returns (uint256);

    function feePercentageInfo() external view returns (uint256, address);

    function setDoubleProxy(address _doubleProxy) external;

    function setFeePercentage(uint256 _feePercentage) external;

    function execute(PrestoOperation[] memory operations) external payable returns(uint256[] memory outputAmounts);
}

File 29 of 34 : IFactory.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.7.0;

import "../../dynamicMetadata/model/IDynamicMetadataCapableElement.sol";

interface IFactory is IDynamicMetadataCapableElement {

    event Deployed(address indexed modelAddress, address indexed deployedAddress, address indexed deployer, bytes deployedLazyInitResponse);

    function modelAddress() external view returns(address);
    function setModelAddress(address newValue) external returns(address oldValue);

    function deployer(address deployedAddress) external view returns(address);

    function deploy(bytes calldata deployData) external payable returns(address deployedAddress, bytes memory deployedLazyInitResponse);
}

File 30 of 34 : IERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

File 31 of 34 : DynamicMetadataCapableElement.sol
//SPDX-License-Identifier: MIT
pragma solidity >=0.7.0;

import "../model/IDynamicMetadataCapableElement.sol";
import "../model/IDynamicUriResolver.sol";
import "../../generic/impl/LazyInitCapableElement.sol";

abstract contract DynamicMetadataCapableElement is IDynamicMetadataCapableElement, LazyInitCapableElement {

    string public override plainUri;
    address public override dynamicUriResolver;

    constructor(bytes memory lazyInitData) LazyInitCapableElement(lazyInitData) {
    }

    function _lazyInit(bytes memory lazyInitData) internal override returns (bytes memory lazyInitResponse) {
        (plainUri, dynamicUriResolver, lazyInitResponse) = abi.decode(lazyInitData, (string, address, bytes));
        lazyInitResponse = _dynamicMetadataElementLazyInit(lazyInitResponse);
    }

    function _supportsInterface(bytes4 interfaceId) internal override view returns(bool) {
        return
            interfaceId == type(IDynamicMetadataCapableElement).interfaceId ||
            interfaceId == this.plainUri.selector ||
            interfaceId == this.uri.selector ||
            interfaceId == this.dynamicUriResolver.selector ||
            interfaceId == this.setUri.selector ||
            interfaceId == this.setDynamicUriResolver.selector ||
            _dynamicMetadataElementSupportsInterface(interfaceId);
    }

    function uri() external override view returns(string memory) {
        return _uri(plainUri, "");
    }

    function setUri(string calldata newValue) external override authorizedOnly returns (string memory oldValue) {
        oldValue = plainUri;
        plainUri = newValue;
    }

    function setDynamicUriResolver(address newValue) external override authorizedOnly returns(address oldValue) {
        oldValue = dynamicUriResolver;
        dynamicUriResolver = newValue;
    }

    function _uri(string memory _plainUri, bytes memory additionalData) internal view returns(string memory) {
        if(dynamicUriResolver == address(0)) {
            return _plainUri;
        }
        return IDynamicUriResolver(dynamicUriResolver).resolve(address(this), _plainUri, additionalData, msg.sender);
    }

    function _dynamicMetadataElementLazyInit(bytes memory lazyInitData) internal virtual returns(bytes memory);

    function _dynamicMetadataElementSupportsInterface(bytes4 interfaceId) internal virtual view returns(bool);
}

File 32 of 34 : LazyInitCapableElement.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.7.0;

import "../model/ILazyInitCapableElement.sol";
import { ReflectionUtilities } from "../../lib/GeneralUtilities.sol";

abstract contract LazyInitCapableElement is ILazyInitCapableElement {
    using ReflectionUtilities for address;

    address public override initializer;
    address public override host;

    constructor(bytes memory lazyInitData) {
        if(lazyInitData.length > 0) {
            _privateLazyInit(lazyInitData);
        }
    }

    function lazyInit(bytes calldata lazyInitData) override external returns (bytes memory lazyInitResponse) {
        return _privateLazyInit(lazyInitData);
    }

    function supportsInterface(bytes4 interfaceId) override external view returns(bool) {
        return
            interfaceId == type(IERC165).interfaceId ||
            interfaceId == this.supportsInterface.selector ||
            interfaceId == type(ILazyInitCapableElement).interfaceId ||
            interfaceId == this.lazyInit.selector ||
            interfaceId == this.initializer.selector ||
            interfaceId == this.subjectIsAuthorizedFor.selector ||
            interfaceId == this.host.selector ||
            interfaceId == this.setHost.selector ||
            _supportsInterface(interfaceId);
    }

    function setHost(address newValue) external override authorizedOnly returns(address oldValue) {
        oldValue = host;
        host = newValue;
        emit Host(oldValue, newValue);
    }

    function subjectIsAuthorizedFor(address subject, address location, bytes4 selector, bytes calldata payload, uint256 value) public override virtual view returns(bool) {
        (bool chidlElementValidationIsConsistent, bool chidlElementValidationResult) = _subjectIsAuthorizedFor(subject, location, selector, payload, value);
        if(chidlElementValidationIsConsistent) {
            return chidlElementValidationResult;
        }
        if(subject == host) {
            return true;
        }
        if(!host.isContract()) {
            return false;
        }
        (bool result, bytes memory resultData) = host.staticcall(abi.encodeWithSelector(ILazyInitCapableElement(host).subjectIsAuthorizedFor.selector, subject, location, selector, payload, value));
        return result && abi.decode(resultData, (bool));
    }

    function _privateLazyInit(bytes memory lazyInitData) private returns (bytes memory lazyInitResponse) {
        require(initializer == address(0), "init");
        initializer = msg.sender;
        (host, lazyInitResponse) = abi.decode(lazyInitData, (address, bytes));
        emit Host(address(0), host);
        lazyInitResponse = _lazyInit(lazyInitResponse);
    }

    function _lazyInit(bytes memory) internal virtual returns (bytes memory) {
        return "";
    }

    function _supportsInterface(bytes4 selector) internal virtual view returns (bool);

    function _subjectIsAuthorizedFor(address, address, bytes4, bytes calldata, uint256) internal virtual view returns(bool, bool) {
    }

    modifier authorizedOnly {
        require(_authorizedOnly(), "unauthorized");
        _;
    }

    function _authorizedOnly() internal returns(bool) {
        return subjectIsAuthorizedFor(msg.sender, address(this), msg.sig, msg.data, msg.value);
    }
}

File 33 of 34 : IDynamicUriResolver.sol
//SPDX-License-Identifier: MIT
pragma solidity >=0.7.0;

interface IDynamicUriResolver {
    function resolve(address subject, string calldata plainUri, bytes calldata inputData, address caller) external view returns(string memory);
}

File 34 of 34 : PrestoDataUniV3.sol
//SPDX-License-Identifier: MIT
pragma solidity >=0.7.0;

struct PrestoOperation {

    address inputTokenAddress;
    uint256 inputTokenAmount;

    address ammPlugin;
    address[] liquidityPoolAddresses;
    address[] swapPath;
    bool enterInETH;
    bool exitInETH;

    uint256[] tokenMins;

    address[] receivers;
    uint256[] receiversPercentages;
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"bytes","name":"lazyInitData","type":"bytes"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"modelAddress","type":"address"},{"indexed":true,"internalType":"address","name":"deployedAddress","type":"address"},{"indexed":true,"internalType":"address","name":"deployer","type":"address"},{"indexed":false,"internalType":"bytes","name":"deployedLazyInitResponse","type":"bytes"}],"name":"Deployed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"Host","type":"event"},{"inputs":[],"name":"DELEGATIONS_MANAGER_POSITION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MANDATORY_COMPONENTS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PROPOSALS_MANAGER_POSITION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TREASURY_MANAGER_POSITION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"bytes","name":"permitSignature","type":"bytes"}],"name":"burnOrTransferToken","outputs":[{"internalType":"uint256","name":"amountTransferedOrBurnt","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"data","outputs":[{"internalType":"address[]","name":"utilityModels","type":"address[]"},{"internalType":"bytes32[]","name":"utilitiyModelKeys","type":"bytes32[]"},{"internalType":"bool[]","name":"utilitiyModelActive","type":"bool[]"},{"internalType":"string","name":"proposalUri","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"delegationsMaxSize","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"deployData","type":"bytes"}],"name":"deploy","outputs":[{"internalType":"address","name":"productAddress","type":"address"},{"internalType":"bytes","name":"productInitResponse","type":"bytes"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"deployer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"dynamicUriResolver","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeInfo","outputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"uint256","name":"feePercentageForTransacted","type":"uint256"},{"internalType":"address","name":"feeReceiver","type":"address"},{"internalType":"address","name":"tokenToTransferOrBurnAddressInCreation","type":"address"},{"internalType":"uint256","name":"transferOrBurnAmountInCreation","type":"uint256"},{"internalType":"address","name":"transferOrBurnReceiverInCreation","type":"address"},{"internalType":"address","name":"tokenToTransferOrBurnAddressInApplication","type":"address"},{"internalType":"uint256","name":"transferOrBurnAmountInApplication","type":"uint256"},{"internalType":"address","name":"transferOrBurnReceiverInApplication","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"host","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"initializer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"lazyInitData","type":"bytes"}],"name":"lazyInit","outputs":[{"internalType":"bytes","name":"lazyInitResponse","type":"bytes"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"modelAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"permitSignature","type":"bytes"}],"name":"payFee","outputs":[{"internalType":"uint256","name":"feePaid","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"plainUri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"presetArrayMaxSize","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newValue","type":"address"}],"name":"setDynamicUriResolver","outputs":[{"internalType":"address","name":"oldValue","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newValue","type":"address"}],"name":"setHost","outputs":[{"internalType":"address","name":"oldValue","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"subDAO","type":"address"},{"components":[{"internalType":"address","name":"source","type":"address"},{"internalType":"string","name":"uri","type":"string"},{"internalType":"bool","name":"isPreset","type":"bool"},{"internalType":"bytes[]","name":"presetValues","type":"bytes[]"},{"internalType":"bytes32[]","name":"presetProposals","type":"bytes32[]"},{"internalType":"address","name":"creationRules","type":"address"},{"internalType":"address","name":"triggeringRules","type":"address"},{"internalType":"uint256","name":"votingRulesIndex","type":"uint256"},{"internalType":"address[][]","name":"canTerminateAddresses","type":"address[][]"},{"internalType":"address[][]","name":"validatorsAddresses","type":"address[][]"}],"internalType":"struct ISubDAO.SubDAOProposalModel[]","name":"newValue","type":"tuple[]"}],"name":"setInitialProposalModels","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newValue","type":"address"}],"name":"setModelAddress","outputs":[{"internalType":"address","name":"oldValue","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newValue","type":"string"}],"name":"setUri","outputs":[{"internalType":"string","name":"oldValue","type":"string"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"subject","type":"address"},{"internalType":"address","name":"location","type":"address"},{"internalType":"bytes4","name":"selector","type":"bytes4"},{"internalType":"bytes","name":"payload","type":"bytes"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"subjectIsAuthorizedFor","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

60806040523480156200001157600080fd5b5060405162004621380380620046218339810160408190526200003491620008d9565b8080808060008151111562000050576200004e816200005b565b505b505050505062000b7f565b6000546060906001600160a01b031615620000ab5760405162461bcd60e51b8152600401620000a2906020808252600490820152631a5b9a5d60e21b604082015260600190565b60405180910390fd5b600080546001600160a01b031916331790558151620000d49083016020908101908401620007b8565b600180546001600160a01b039093166001600160a01b0319909316831790556040519092506000907fe2302c6b581cf0c2edec4248d3a7af323db67692e29b6dc37a7d9736bf5e4369908290a36200012c8162000132565b92915050565b6060818060200190518101906200014a919062000919565b600380546001600160a01b0319166001600160a01b038416179055825190935083906200017f906002906020860190620003bf565b505050506200012c816200019460201b60201c565b6004546060906001600160a01b031615620001db5760405162461bcd60e51b8152600401620000a2906020808252600490820152631a5b9a5d60e21b604082015260600190565b81806020019051810190620001f19190620007b8565b600480546001600160a01b0319166001600160a01b03939093169290921790915590506200012c81604080516101208101825260008082526020820181905291810182905260608181018390526080820183905260a0820183905260c0820183905260e082019290925261010081018290528280602001905181019062000279919062000998565b80516006556020810151600780546001600160a01b03199081166001600160a01b0393841617909155604083015160088054831691841691909117905560608301516009556080830151600a8054831691841691909117905560a0830151600b8054831691841691909117905560c0830151600c5560e0830151600d8054909216921691909117905561010081015190915062000316906200031d565b9392505050565b6060818060200190518101906200033591906200080e565b601281905560138290558251600e90600090600f9082906010908290620003649060119060208c0190620003bf565b5050885162000379919060208b01906200044e565b505087516200038e919060208a0190620004f5565b50508651620003a39190602089019062000532565b5050604080516020810190915260008152979650505050505050565b828054620003cd9062000b13565b90600052602060002090601f016020900481019282620003f157600085556200043c565b82601f106200040c57805160ff19168380011785556200043c565b828001600101855582156200043c579182015b828111156200043c5782518255916020019190600101906200041f565b506200044a9291506200058a565b5090565b82805482825590600052602060002090601f016020900481019282156200043c5791602002820160005b83821115620004b757835183826101000a81548160ff021916908315150217905550926020019260010160208160000104928301926001030262000478565b8015620004e65782816101000a81549060ff0219169055600101602081600001049283019260010302620004b7565b50506200044a9291506200058a565b8280548282559060005260206000209081019282156200043c57916020028201828111156200043c5782518255916020019190600101906200041f565b8280548282559060005260206000209081019282156200043c579160200282015b828111156200043c57825182546001600160a01b0319166001600160a01b0390911617825560209092019160019091019062000553565b5b808211156200044a57600081556001016200058b565b8051620005ae8162000b66565b919050565b600082601f830112620005c557600080fd5b81516020620005de620005d88362000aed565b62000aba565b80838252828201915082860187848660051b8901011115620005ff57600080fd5b60005b858110156200062b578151620006188162000b66565b8452928401929084019060010162000602565b5090979650505050505050565b600082601f8301126200064a57600080fd5b815160206200065d620005d88362000aed565b80838252828201915082860187848660051b89010111156200067e57600080fd5b6000805b86811015620006ae57825180151581146200069b578283fd5b8552938501939185019160010162000682565b509198975050505050505050565b600082601f830112620006ce57600080fd5b81516020620006e1620005d88362000aed565b80838252828201915082860187848660051b89010111156200070257600080fd5b60005b858110156200062b5781518452928401929084019060010162000705565b600082601f8301126200073557600080fd5b81516001600160401b0381111562000751576200075162000b50565b602062000767601f8301601f1916820162000aba565b82815285828487010111156200077c57600080fd5b60005b838110156200079c5785810183015182820184015282016200077f565b83811115620007ae5760008385840101525b5095945050505050565b60008060408385031215620007cc57600080fd5b8251620007d98162000b66565b60208401519092506001600160401b03811115620007f657600080fd5b620008048582860162000723565b9150509250929050565b60008060008060008060c087890312156200082857600080fd5b86516001600160401b03808211156200084057600080fd5b6200084e8a838b01620005b3565b975060208901519150808211156200086557600080fd5b620008738a838b01620006bc565b965060408901519150808211156200088a57600080fd5b620008988a838b0162000638565b95506060890151915080821115620008af57600080fd5b50620008be89828a0162000723565b9350506080870151915060a087015190509295509295509295565b600060208284031215620008ec57600080fd5b81516001600160401b038111156200090357600080fd5b620009118482850162000723565b949350505050565b6000806000606084860312156200092f57600080fd5b83516001600160401b03808211156200094757600080fd5b620009558783880162000723565b945060208601519150620009698262000b66565b6040860151919350808211156200097f57600080fd5b506200098e8682870162000723565b9150509250925092565b600060208284031215620009ab57600080fd5b81516001600160401b0380821115620009c357600080fd5b908301906101208286031215620009d957600080fd5b620009e362000a8e565b82518152620009f560208401620005a1565b602082015262000a0860408401620005a1565b60408201526060830151606082015262000a2560808401620005a1565b608082015262000a3860a08401620005a1565b60a082015260c083015160c082015262000a5560e08401620005a1565b60e0820152610100808401518381111562000a6f57600080fd5b62000a7d8882870162000723565b918301919091525095945050505050565b60405161012081016001600160401b038111828210171562000ab45762000ab462000b50565b60405290565b604051601f8201601f191681016001600160401b038111828210171562000ae55762000ae562000b50565b604052919050565b60006001600160401b0382111562000b095762000b0962000b50565b5060051b60200190565b600181811c9082168062000b2857607f821691505b6020821081141562000b4a57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811462000b7c57600080fd5b50565b613a928062000b8f6000396000f3fe6080604052600436106101845760003560e01c80639ce110d7116100d1578063c71bf12d1161008a578063ccfec2fb11610064578063ccfec2fb1461048d578063cd6e1d7c146104ad578063eac989f8146104cd578063f437bc59146104e257600080fd5b8063c71bf12d14610443578063c85e0be214610458578063c927d9f31461047857600080fd5b80639ce110d71461039c5780639cea9dd3146103bc578063b0db74ab146103d1578063b6914458146103e7578063b9caf9d9146103fa578063c12648f01461043057600080fd5b80636761c4ea1161013e57806395d9ec111161011857806395d9ec11146102cd57806396434f91146102ef578063995b5aae1461030f5780639b642de11461037c57600080fd5b80636761c4ea146102935780636acde1121461029357806373d4a13a146102a857600080fd5b80627743601461019057806301ffc9a7146101ba57806303fbd7fd146101ea5780631cc5440b146102225780632ae60b6b14610246578063457f4bcc1461026657600080fd5b3661018b57005b600080fd5b6101a361019e366004612c4d565b610502565b6040516101b19291906132d7565b60405180910390f35b3480156101c657600080fd5b506101da6101d5366004612c32565b6109d7565b60405190151581526020016101b1565b3480156101f657600080fd5b5061020a61020536600461266e565b610abf565b6040516001600160a01b0390911681526020016101b1565b34801561022e57600080fd5b5061023860135481565b6040519081526020016101b1565b34801561025257600080fd5b5060045461020a906001600160a01b031681565b34801561027257600080fd5b50610286610281366004612c4d565b610b08565b6040516101b19190613739565b34801561029f57600080fd5b50610238600181565b3480156102b457600080fd5b506102bd610b50565b6040516101b19493929190613344565b3480156102d957600080fd5b506102ed6102e83660046127eb565b610d18565b005b3480156102fb57600080fd5b5061020a61030a36600461266e565b610dd5565b34801561031b57600080fd5b50610324610e1e565b604080516001600160a01b039a8b16815260208101999099529689169688019690965293871660608701526080860192909252851660a0850152841660c084015260e0830152909116610100820152610120016101b1565b34801561038857600080fd5b50610286610397366004612c4d565b610e66565b3480156103a857600080fd5b5060005461020a906001600160a01b031681565b3480156103c857600080fd5b50610238600581565b3480156103dd57600080fd5b5061023860125481565b6102386103f5366004612779565b610f31565b34801561040657600080fd5b5061020a61041536600461266e565b6005602052600090815260409020546001600160a01b031681565b61023861043e366004612872565b611052565b34801561044f57600080fd5b50610286611175565b34801561046457600080fd5b5061020a61047336600461266e565b611203565b34801561048457600080fd5b50610238600081565b34801561049957600080fd5b5060035461020a906001600160a01b031681565b3480156104b957600080fd5b506101da6104c83660046126f8565b61127d565b3480156104d957600080fd5b506102866113d0565b3480156104ee57600080fd5b5060015461020a906001600160a01b031681565b600060608161051384860186612e1c565b6004549091503390600590600090610533906001600160a01b031661147a565b9550856001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b031602179055506000816080015151600161058e9190613945565b905060005b82604001515181101561069c576000836040015182815181106105b8576105b8613a0a565b6020026020010151905081600014806105f7575060408401516105dc60018461395d565b815181106105ec576105ec613a0a565b602002602001015181115b6106355760405162461bcd60e51b815260040161062c906020808252600490820152634445534360e01b604082015260600190565b60405180910390fd5b600181101580156106475750600e5481105b61067b5760405162461bcd60e51b81526020600482015260056024820152640d2dcc8caf60db1b604482015260640161062c565b82610685816139d9565b935050508080610694906139d9565b915050610593565b506000816001600160401b038111156106b7576106b7613a20565b60405190808252806020026020018201604052801561070957816020015b6040805160808101825260008082526020808301829052928201819052606082015282526000199092019101816106d55790505b50905060005b60018110156107bb5761078b81878115610746578660200151848151811061073957610739613a0a565b60200260200101516114bc565b60018760200151858151811061075e5761075e613a0a565b60200260200101516040516020016107779291906136f4565b6040516020818303038152906040526114bc565b82828151811061079d5761079d613a0a565b602002602001018190525080806107b3906139d9565b91505061070f565b506001808311156108855760005b846040015151811015610883576000856040015182815181106107ee576107ee613a0a565b60200260200101519050600581146108205761081b81898860600151858151811061073957610739613a0a565b610847565b610847888760600151848151811061083a5761083a613a0a565b602002602001015161166b565b8484610852816139d9565b95508151811061086457610864613a0a565b602002602001018190525050808061087b906139d9565b9150506107c9565b505b608084015151156109045760005b846080015151811015610902576108c787866080015183815181106108ba576108ba613a0a565b60200260200101516116d5565b83836108d2816139d9565b9450815181106108e4576108e4613a0a565b602002602001018190525080806108fa906139d9565b915050610893565b505b60008060008660a0015180602001905181019061092191906129a1565b9250925092506109398983896000015186858a61187c565b9750306001600160a01b0316896001600160a01b0316639ce110d76040518163ffffffff1660e01b815260040160206040518083038186803b15801561097e57600080fd5b505afa158015610992573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109b6919061268b565b6001600160a01b0316146109c957600080fd5b505050505050509250929050565b60006001600160e01b031982166301ffc9a760e01b1480610a0857506001600160e01b031982166301ffc9a760e01b145b80610a2357506001600160e01b03198216630a267c7760e21b145b80610a3e57506001600160e01b0319821663115fd2f360e21b145b80610a5957506001600160e01b03198216639ce110d760e01b145b80610a7457506001600160e01b0319821663335b875f60e21b145b80610a8f57506001600160e01b0319821663f437bc5960e01b145b80610aaa57506001600160e01b0319821663642f05f160e11b145b80610ab95750610ab9826119ff565b92915050565b6000610ac9611aab565b610ae55760405162461bcd60e51b815260040161062c90613780565b50600380546001600160a01b039283166001600160a01b03198216179091551690565b6060610b4983838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611ac892505050565b9392505050565b606080606080600e600f6010601183805480602002602001604051908101604052809291908181526020018280548015610bb357602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610b95575b5050505050935082805480602002602001604051908101604052809291908181526020018280548015610c0557602002820191906000526020600020905b815481526020019060010190808311610bf1575b5050505050925081805480602002602001604051908101604052809291908181526020018280548015610c7757602002820191906000526020600020906000905b825461010083900a900460ff161515815260206001928301818104948501949093039092029101808411610c465790505b50505050509150808054610c8a906139a4565b80601f0160208091040260200160405190810160405280929190818152602001828054610cb6906139a4565b8015610d035780601f10610cd857610100808354040283529160200191610d03565b820191906000526020600020905b815481529060010190602001808311610ce657829003601f168201915b50505050509050935093509350935090919293565b6001600160a01b03838116600090815260056020526040902054163314610d705760405162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b604482015260640161062c565b6040516303c205f960e11b81526001600160a01b038416906307840bf290610d9e9085908590600401613426565b600060405180830381600087803b158015610db857600080fd5b505af1158015610dcc573d6000803e3d6000fd5b50505050505050565b6000610ddf611aab565b610dfb5760405162461bcd60e51b815260040161062c90613780565b50600480546001600160a01b039283166001600160a01b03198216179091551690565b600080546001600160a01b03169080808080808080610e3b611b8a565b809850819950829a50839b50849c50859d50869e50879f505050505050505050909192939495969798565b6060610e70611aab565b610e8c5760405162461bcd60e51b815260040161062c90613780565b60028054610e99906139a4565b80601f0160208091040260200160405190810160405280929190818152602001828054610ec5906139a4565b8015610f125780601f10610ee757610100808354040283529160200191610f12565b820191906000526020600020905b815481529060010190602001808311610ef557829003601f168201915b50505050509050828260029190610f2a929190611fc8565b5092915050565b600080600080610f3f611b8a565b50965050505050925092508260001461100c576000805481906001600160a01b03908116906333ef5a33908c1615610f78576000610f7a565b8a5b8d8d8d8d8d8c8c6040518963ffffffff1660e01b8152600401610fa3979695949392919061328a565b60408051808303818588803b158015610fbb57600080fd5b505af1158015610fcf573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610ff49190612f3c565b90925090506110038183613945565b95505050611046565b80156110465760405162461bcd60e51b81526020600482015260096024820152687a65726f206665657360b81b604482015260640161062c565b50505095945050505050565b6000806000806000611062611b8a565b9750975097505050505093508160001461112e576000805481906001600160a01b039081169063b7eaed3b9087161561109c57600061109e565b855b8c88888e8e8a6040518863ffffffff1660e01b81526004016110c596959493929190613243565b60408051808303818588803b1580156110dd57600080fd5b505af11580156110f1573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906111169190612f3c565b90925090506111258183613945565b9650505061116a565b831561116a5760405162461bcd60e51b815260206004820152600b60248201526a1e995c9bc8185b5bdd5b9d60aa1b604482015260640161062c565b505050509392505050565b60028054611182906139a4565b80601f01602080910402602001604051908101604052809291908181526020018280546111ae906139a4565b80156111fb5780601f106111d0576101008083540402835291602001916111fb565b820191906000526020600020905b8154815290600101906020018083116111de57829003601f168201915b505050505081565b600061120d611aab565b6112295760405162461bcd60e51b815260040161062c90613780565b50600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907fe2302c6b581cf0c2edec4248d3a7af323db67692e29b6dc37a7d9736bf5e436990600090a3919050565b6000806000611290898989898989611bc5565b9150915081156112a35791506113c69050565b6001546001600160a01b038a8116911614156112c4576001925050506113c6565b6001546112d9906001600160a01b0316611c1a565b6112e8576000925050506113c6565b60015460405160009182916001600160a01b039091169063335b875f60e21b90611320908e908e908e908e908e908e906024016131f3565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b031990941693909317909252905161135e91906131d7565b600060405180830381855afa9150503d8060008114611399576040519150601f19603f3d011682016040523d82523d6000602084013e61139e565b606091505b50915091508180156113bf5750808060200190518101906113bf9190612984565b9450505050505b9695505050505050565b6060611475600280546113e2906139a4565b80601f016020809104026020016040519081016040528092919081815260200182805461140e906139a4565b801561145b5780601f106114305761010080835404028352916020019161145b565b820191906000526020600020905b81548152906001019060200180831161143e57829003601f168201915b505050505060405180602001604052806000815250611c39565b905090565b60006901000000000000000000820268803b80938091923cf36258807360e81b01176000526020600080f09050803b80156114b4576114b6565bfe5b50919050565b6040805160808101825260008082526020820181905291810182905260608101919091526040518060800160405280600f86815481106114fe576114fe613a0a565b9060005260206000200154815260200161153e600e878154811061152457611524613a0a565b6000918252602090912001546001600160a01b031661147a565b6001600160a01b031681526020016010868154811061155f5761155f613a0a565b90600052602060002090602091828204019190069054906101000a900460ff161515815260200160011515815250905080602001516001600160a01b031663457f4bcc84846040516020016115b59291906132d7565b6040516020818303038152906040526040518263ffffffff1660e01b81526004016115e09190613739565b600060405180830381600087803b1580156115fa57600080fd5b505af115801561160e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526116369190810190612c8e565b506020808201516001600160a01b0316600090815260059091526040902080546001600160a01b031916331790559392505050565b604080516080810182526000808252602082018190529181018290526060810191909152610b49600584601354600e6001815481106116ac576116ac613a0a565b6000918252602091829020015460405161077793926001600160a01b03909216918991016137a6565b604080516080810182526000808252602082018190529181018290526060810191909152600080600080858060200190518101906117139190612bc5565b935093509350935060008151111561184a5760008180602001905181019061173b9190612ba7565b9250905080156117a457336005600061175c876001600160a01b031661147a565b9650866001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b031602179055505b836001600160a01b031663457f4bcc89846040516020016117c69291906132d7565b6040516020818303038152906040526040518263ffffffff1660e01b81526004016117f19190613739565b600060405180830381600087803b15801561180b57600080fd5b505af115801561181f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526118479190810190612c8e565b50505b50604080516080810182529384526001600160a01b039092166020840152151590820152600160608201529392505050565b60045460035460125460405160609333936001600160a01b038c811694928116937fe0c363f71c2006b5e1500c6e2f7c2e0c418ae6dd653297537b337f7f6d6eeea293869363457f4bcc938f938f9392909116918e918e906118e2908f906020016133c2565b60408051601f198184030181529082905261190092916020016135b4565b60408051601f198184030181529082905261191f93929160200161370f565b60408051601f198184030181529082905261193e93929160200161374c565b60408051601f198184030181529082905261195c92916020016132d7565b6040516020818303038152906040526040518263ffffffff1660e01b81526004016119879190613739565b600060405180830381600087803b1580156119a157600080fd5b505af11580156119b5573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526119dd9190810190612c8e565b9450846040516119ed9190613739565b60405180910390a49695505050505050565b60006001600160e01b03198216633cd9a01960e11b1480611a3057506001600160e01b0319821663c71bf12d60e01b145b80611a4b57506001600160e01b03198216631d59313f60e31b145b80611a6657506001600160e01b0319821663ccfec2fb60e01b145b80611a8157506001600160e01b03198216639b642de160e01b145b80611a9c57506001600160e01b031982166303fbd7fd60e01b145b80610ab95750610ab982611cdd565b600061147533306000356001600160e01b0319166000363461127d565b6000546060906001600160a01b031615611b0d5760405162461bcd60e51b815260040161062c906020808252600490820152631a5b9a5d60e21b604082015260600190565b600080546001600160a01b031916331790558151611b3490830160209081019084016126a8565b600180546001600160a01b039093166001600160a01b0319909316831790556040519092506000907fe2302c6b581cf0c2edec4248d3a7af323db67692e29b6dc37a7d9736bf5e4369908290a3610ab981611d6b565b600654600754600854600954600a54600b54600c54600d546001600160a01b0396871696958616959384169392831692169091929394959697565b6000806001600160e01b031986166396434f9160e01b1480611bf757506001600160e01b031986166303fbd7fd60e01b145b15611c085750600190506000611c0f565b5060009050805b965096945050505050565b60006001600160a01b038216611c3257506000919050565b503b151590565b6003546060906001600160a01b0316611c53575081610ab9565b60035460405163f709c9b760e01b81526001600160a01b039091169063f709c9b790611c899030908790879033906004016132fb565b60006040518083038186803b158015611ca157600080fd5b505afa158015611cb5573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610b499190810190612c8e565b60006001600160e01b03198216630518fe4360e01b1480611d0e57506001600160e01b03198216632ae60b6b60e01b145b80611d2957506001600160e01b031982166396434f9160e01b145b80611d4457506001600160e01b0319821663b9caf9d960e01b145b80611d5e57506001600160e01b031982166203ba1b60e51b145b80610ab957506000610ab9565b606081806020019051810190611d819190612cc2565b600380546001600160a01b0319166001600160a01b03841617905582519093508390611db490600290602086019061204c565b50505050610ab9816004546060906001600160a01b031615611e015760405162461bcd60e51b815260040161062c906020808252600490820152631a5b9a5d60e21b604082015260600190565b81806020019051810190611e1591906126a8565b600480546001600160a01b0319166001600160a01b0393909316929092179091559050610ab981604080516101208101825260008082526020820181905291810182905260608181018390526080820183905260a0820183905260c0820183905260e0820192909252610100810182905282806020019051810190611e9a9190612d38565b80516006556020810151600780546001600160a01b03199081166001600160a01b0393841617909155604083015160088054831691841691909117905560608301516009556080830151600a8054831691841691909117905560a0830151600b8054831691841691909117905560c0830151600c5560e0830151600d80549092169216919091179055610100810151909150610b4990606081806020019051810190611f4691906128c6565b601281905560138290558251600e90600090600f9082906010908290611f739060119060208c019061204c565b50508851611f86919060208b01906120c0565b50508751611f99919060208a0190612160565b50508651611fac9190602089019061219a565b5050604080516020810190915260008152979650505050505050565b828054611fd4906139a4565b90600052602060002090601f016020900481019282611ff6576000855561203c565b82601f1061200f5782800160ff1982351617855561203c565b8280016001018555821561203c579182015b8281111561203c578235825591602001919060010190612021565b506120489291506121ef565b5090565b828054612058906139a4565b90600052602060002090601f01602090048101928261207a576000855561203c565b82601f1061209357805160ff191683800117855561203c565b8280016001018555821561203c579182015b8281111561203c5782518255916020019190600101906120a5565b82805482825590600052602060002090601f0160209004810192821561203c5791602002820160005b8382111561212657835183826101000a81548160ff02191690831515021790555092602001926001016020816000010492830192600103026120e9565b80156121535782816101000a81549060ff0219169055600101602081600001049283019260010302612126565b50506120489291506121ef565b82805482825590600052602060002090810192821561203c579160200282018281111561203c5782518255916020019190600101906120a5565b82805482825590600052602060002090810192821561203c579160200282015b8281111561203c57825182546001600160a01b0319166001600160a01b039091161782556020909201916001909101906121ba565b5b8082111561204857600081556001016121f0565b803561220f81613a36565b919050565b805161220f81613a36565b600082601f83011261223057600080fd5b815160206122456122408361386e565b61383e565b80838252828201915082860187848660051b890101111561226557600080fd5b60005b8581101561228d57815161227b81613a36565b84529284019290840190600101612268565b5090979650505050505050565b600082601f8301126122ab57600080fd5b815160206122bb6122408361386e565b80838252828201915082860187848660051b89010111156122db57600080fd5b6000805b8681101561231d5782516001600160401b038111156122fc578283fd5b61230a8b88838d010161221f565b86525093850193918501916001016122df565b509198975050505050505050565b600082601f83011261233c57600080fd5b8151602061234c6122408361386e565b80838252828201915082860187848660051b890101111561236c57600080fd5b60005b8581101561228d57815161238281613a4e565b8452928401929084019060010161236f565b600082601f8301126123a557600080fd5b815160206123b56122408361386e565b80838252828201915082860187848660051b89010111156123d557600080fd5b60005b8581101561228d578151845292840192908401906001016123d8565b600082601f83011261240557600080fd5b813560206124156122408361386e565b80838252828201915082860187848660051b890101111561243557600080fd5b6000805b8681101561231d5782356001600160401b03811115612456578283fd5b6124648b88838d01016125d0565b8652509385019391850191600101612439565b600082601f83011261248857600080fd5b815160206124986122408361386e565b80838252828201915082860187848660051b89010111156124b857600080fd5b6000805b8681101561231d5782516001600160401b038111156124d9578283fd5b6124e78b88838d0101612621565b86525093850193918501916001016124bc565b600082601f83011261250b57600080fd5b8135602061251b6122408361386e565b80838252828201915082860187848660051b890101111561253b57600080fd5b60005b8581101561228d5781358452928401929084019060010161253e565b803561220f81613a4e565b805161220f81613a4e565b80356001600160e01b03198116811461220f57600080fd5b60008083601f84011261259a57600080fd5b5081356001600160401b038111156125b157600080fd5b6020830191508360208285010111156125c957600080fd5b9250929050565b600082601f8301126125e157600080fd5b81356125ef61224082613891565b81815284602083860101111561260457600080fd5b816020850160208301376000918101602001919091529392505050565b600082601f83011261263257600080fd5b815161264061224082613891565b81815284602083860101111561265557600080fd5b612666826020830160208701613974565b949350505050565b60006020828403121561268057600080fd5b8135610b4981613a36565b60006020828403121561269d57600080fd5b8151610b4981613a36565b600080604083850312156126bb57600080fd5b82516126c681613a36565b60208401519092506001600160401b038111156126e257600080fd5b6126ee85828601612621565b9150509250929050565b60008060008060008060a0878903121561271157600080fd5b863561271c81613a36565b9550602087013561272c81613a36565b945061273a60408801612570565b935060608701356001600160401b0381111561275557600080fd5b61276189828a01612588565b979a9699509497949695608090950135949350505050565b60008060008060006080868803121561279157600080fd5b853561279c81613a36565b945060208601356127ac81613a36565b93506040860135925060608601356001600160401b038111156127ce57600080fd5b6127da88828901612588565b969995985093965092949392505050565b60008060006040848603121561280057600080fd5b833561280b81613a36565b925060208401356001600160401b038082111561282757600080fd5b818601915086601f83011261283b57600080fd5b81358181111561284a57600080fd5b8760208260051b850101111561285f57600080fd5b6020830194508093505050509250925092565b60008060006040848603121561288757600080fd5b833561289281613a36565b925060208401356001600160401b038111156128ad57600080fd5b6128b986828701612588565b9497909650939450505050565b60008060008060008060c087890312156128df57600080fd5b86516001600160401b03808211156128f657600080fd5b6129028a838b0161221f565b9750602089015191508082111561291857600080fd5b6129248a838b01612394565b9650604089015191508082111561293a57600080fd5b6129468a838b0161232b565b9550606089015191508082111561295c57600080fd5b5061296989828a01612621565b9350506080870151915060a087015190509295509295509295565b60006020828403121561299657600080fd5b8151610b4981613a4e565b6000806000606084860312156129b657600080fd5b83516129c181613a4e565b60208501519093506129d281613a36565b60408501519092506001600160401b03808211156129ef57600080fd5b818601915086601f830112612a0357600080fd5b8151612a116122408261386e565b80828252602082019150602085018a60208560051b8801011115612a3457600080fd5b60005b84811015612b9657815186811115612a4e57600080fd5b8701610140818e03601f19011215612a6557600080fd5b612a6d6137d0565b612a7960208301612214565b8152604082015188811115612a8d57600080fd5b612a9c8f602083860101612621565b602083015250612aae60608301612565565b6040820152608082015188811115612ac557600080fd5b612ad48f602083860101612477565b60608301525060a082015188811115612aec57600080fd5b612afb8f602083860101612394565b608083015250612b0d60c08301612214565b60a0820152612b1e60e08301612214565b60c082015261010082015160e082015261012082015188811115612b4157600080fd5b612b508f60208386010161229a565b6101008301525061014082015188811115612b6a57600080fd5b612b798f60208386010161229a565b610120830152508552506020938401939190910190600101612a37565b505080955050505050509250925092565b60008060408385031215612bba57600080fd5b82516126c681613a4e565b60008060008060808587031215612bdb57600080fd5b845193506020850151612bed81613a36565b6040860151909350612bfe81613a4e565b60608601519092506001600160401b03811115612c1a57600080fd5b612c2687828801612621565b91505092959194509250565b600060208284031215612c4457600080fd5b610b4982612570565b60008060208385031215612c6057600080fd5b82356001600160401b03811115612c7657600080fd5b612c8285828601612588565b90969095509350505050565b600060208284031215612ca057600080fd5b81516001600160401b03811115612cb657600080fd5b61266684828501612621565b600080600060608486031215612cd757600080fd5b83516001600160401b0380821115612cee57600080fd5b612cfa87838801612621565b945060208601519150612d0c82613a36565b604086015191935080821115612d2157600080fd5b50612d2e86828701612621565b9150509250925092565b600060208284031215612d4a57600080fd5b81516001600160401b0380821115612d6157600080fd5b908301906101208286031215612d7657600080fd5b612d7e6137f9565b82518152612d8e60208401612214565b6020820152612d9f60408401612214565b604082015260608301516060820152612dba60808401612214565b6080820152612dcb60a08401612214565b60a082015260c083015160c0820152612de660e08401612214565b60e08201526101008084015183811115612dff57600080fd5b612e0b88828701612621565b918301919091525095945050505050565b600060208284031215612e2e57600080fd5b81356001600160401b0380821115612e4557600080fd5b9083019060c08286031215612e5957600080fd5b612e6161381c565b823582811115612e7057600080fd5b612e7c878286016125d0565b825250602083013582811115612e9157600080fd5b612e9d878286016123f4565b602083015250604083013582811115612eb557600080fd5b612ec1878286016124fa565b604083015250606083013582811115612ed957600080fd5b612ee5878286016123f4565b606083015250608083013582811115612efd57600080fd5b612f09878286016123f4565b60808301525060a083013582811115612f2157600080fd5b612f2d878286016125d0565b60a08301525095945050505050565b60008060408385031215612f4f57600080fd5b505080516020909101519092909150565b600081518084526020808501945080840160005b83811015612f995781516001600160a01b031687529582019590820190600101612f74565b509495945050505050565b81835260006020808501808196508560051b81019150846000805b88811015613021578385038a52612fd683896138b8565b808752878701845b8281101561300c578335612ff181613a36565b6001600160a01b031682529289019290890190600101612fde565b509b88019b9650505091850191600101612fbf565b509298975050505050505050565b600081518084526020808501808196508360051b8101915082860160005b85811015613077578284038952613065848351612f60565b9885019893509084019060010161304d565b5091979650505050505050565b81835260006001600160fb1b0383111561309d57600080fd5b8260051b8083602087013760009401602001938452509192915050565b600081518084526020808501945080840160005b83811015612f99578151875295820195908201906001016130ce565b81835260006020808501808196508560051b810191508460005b8781101561307757828403895261311b8288613900565b613126868284613182565b9a87019a9550505090840190600101613104565b600081518084526020808501808196508360051b8101915082860160005b858110156130775782840389526131708483516131ab565b98850198935090840190600101613158565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b600081518084526131c3816020860160208601613974565b601f01601f19169290920160200192915050565b600082516131e9818460208701613974565b9190910192915050565b6001600160a01b038781168252861660208201526001600160e01b03198516604082015260a0606082018190526000906132309083018587613182565b9050826080830152979650505050505050565b600060018060a01b038089168352808816602084015286604084015260a0606084015261327460a084018688613182565b9150808416608084015250979650505050505050565b600060018060a01b03808a168352808916602084015287604084015260c060608401526132bb60c084018789613182565b60808401959095529290921660a0909101525095945050505050565b6001600160a01b0383168152604060208201819052600090612666908301846131ab565b600060018060a01b0380871683526080602084015261331d60808401876131ab565b838103604085015261332f81876131ab565b92505080841660608401525095945050505050565b6080815260006133576080830187612f60565b60208382038185015261336a82886130ba565b8481036040860152865180825282880193509082019060005b818110156133a1578451151583529383019391830191600101613383565b505084810360608601526133b581876131ab565b9998505050505050505050565b602080825282518282018190526000919060409081850190868401855b8281101561307757815180518552868101516001600160a01b03168786015285810151151586860152606090810151151590850152608090930192908501906001016133df565b60208082528181018390526000906040808401600586901b850182018785805b898110156135a557888403603f190185528235368c900361013e1901811261346c578283fd5b8b0161014061348b8661347e84612204565b6001600160a01b03169052565b61349789830183613900565b828b8901526134a98389018284613182565b925050506134b888830161255a565b15158887015260606134cc838201846138b8565b888403838a01526134de8482846130ea565b935050505060806134f1818401846138b8565b888403838a0152613503848284613084565b935050505060a0613515818401612204565b6001600160a01b03169087015260c061352f838201612204565b6001600160a01b03169087015260e08281013590870152610100613555818401846138b8565b888403838a0152613567848284612fa4565b935050505061012061357b818401846138b8565b93508783038289015261358f838583612fa4565b988b019897505050938801935050600101613446565b50919998505050505050505050565b60006040808301818452808651808352606092508286019150828160051b8701016020808a0160005b848110156136e157898403605f19018652815180516001600160a01b03168552610140848201518186880152613615828801826131ab565b915050898201516136298b88018215159052565b50888201518682038a88015261363f828261313a565b9150506080808301518783038289015261365983826130ba565b9250505060a080830151613677828901826001600160a01b03169052565b505060c0828101516001600160a01b03169087015260e0808301519087015261010080830151878303828901526136ae838261302f565b9250505061012080830151925086820381880152506136cd818361302f565b9785019795505050908201906001016135dd565b5050878203908801526133b581896131ab565b821515815260406020820152600061266660408301846131ab565b831515815282602082015260606040820152600061373060608301846131ab565b95945050505050565b602081526000610b4960208301846131ab565b60608152600061375f60608301866131ab565b6001600160a01b038516602084015282810360408401526113c681856131ab565b6020808252600c908201526b1d5b985d5d1a1bdc9a5e995960a21b604082015260600190565b8381526001600160a01b0383166020820152606060408201819052600090613730908301846131ab565b60405161014081016001600160401b03811182821017156137f3576137f3613a20565b60405290565b60405161012081016001600160401b03811182821017156137f3576137f3613a20565b60405160c081016001600160401b03811182821017156137f3576137f3613a20565b604051601f8201601f191681016001600160401b038111828210171561386657613866613a20565b604052919050565b60006001600160401b0382111561388757613887613a20565b5060051b60200190565b60006001600160401b038211156138aa576138aa613a20565b50601f01601f191660200190565b6000808335601e198436030181126138cf57600080fd5b83016020810192503590506001600160401b038111156138ee57600080fd5b8060051b36038313156125c957600080fd5b6000808335601e1984360301811261391757600080fd5b83016020810192503590506001600160401b0381111561393657600080fd5b8036038313156125c957600080fd5b60008219821115613958576139586139f4565b500190565b60008282101561396f5761396f6139f4565b500390565b60005b8381101561398f578181015183820152602001613977565b8381111561399e576000848401525b50505050565b600181811c908216806139b857607f821691505b602082108114156114b657634e487b7160e01b600052602260045260246000fd5b60006000198214156139ed576139ed6139f4565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114613a4b57600080fd5b50565b8015158114613a4b57600080fdfea2646970667358221220a60722edefb7dce7eda3515d9717888afde63acd0d88635bad49afaebc99970f64736f6c63430008060033000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000006c0000000000000000000000000dc0090f8add5db06de0897a54e753af1436686680000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000066000000000000000000000000000000000000000000000000000000000000000600000000000000000000000003ff777884412c7ce8a1da679b4b0cd54f720ab2e00000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000d5245414c5f5552495f484552450000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005a0000000000000000000000000497a9487037d1cf31272ef1e8d251493ae081fbe00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000540000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000003e000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000002c000000000000000000000000000000000000000000000000000000000000003c0000000000000000000000000000000000000000000000000000000000000000f00000000000000000000000000000000000000000000000000000000000000070000000000000000000000000000000000000000000000000000000000000007000000000000000000000000bcce1c1f330825987e2cd0a617bee8242c84ea34000000000000000000000000e5168e2f9e93bca6b7b0d94d6beac02bb81eaf3f000000000000000000000000bdf64ae59bbe95317e25702cfab99a3d092111fc000000000000000000000000b7b98e849f6bd6196ef5900f495f569393373bf600000000000000000000000081134b36d941dfa49c968571f22397e07fdad80b000000000000000000000000138a41e7ae1a4ac664e539f8fabc5290370041fe000000000000000000000000399b717748407e79fea6be30ca5a018ca7a482ef0000000000000000000000000000000000000000000000000000000000000007a504406933af7ca120d20b97dfc79ea9788beb3c4d3ac1ff9a2c292b2c28e0cccfe1633df53a0649d88d788961f26058c5e7a0b5644675f19f67bb2975827ba2d1d09e8f5708558865b8acd5f13c69781ae600e42dbc7f52b8ef1b9e33dbcd3687a92f6bd20613c184485be8eadb46851dd4294a8359f902606085b8be6e7ae65b87d6e94145c2e242653a71b7d439a3638a93c3f0d32e1ea876f9fb1feb53e249b87f4ee20613c184485be8eadb46851dd4294a8359f902606085b8be6e7ae64f3ad97a91794a00945c0ead3983f793d34044c6300048d8b4ef95636edd234b000000000000000000000000000000000000000000000000000000000000000700000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x6080604052600436106101845760003560e01c80639ce110d7116100d1578063c71bf12d1161008a578063ccfec2fb11610064578063ccfec2fb1461048d578063cd6e1d7c146104ad578063eac989f8146104cd578063f437bc59146104e257600080fd5b8063c71bf12d14610443578063c85e0be214610458578063c927d9f31461047857600080fd5b80639ce110d71461039c5780639cea9dd3146103bc578063b0db74ab146103d1578063b6914458146103e7578063b9caf9d9146103fa578063c12648f01461043057600080fd5b80636761c4ea1161013e57806395d9ec111161011857806395d9ec11146102cd57806396434f91146102ef578063995b5aae1461030f5780639b642de11461037c57600080fd5b80636761c4ea146102935780636acde1121461029357806373d4a13a146102a857600080fd5b80627743601461019057806301ffc9a7146101ba57806303fbd7fd146101ea5780631cc5440b146102225780632ae60b6b14610246578063457f4bcc1461026657600080fd5b3661018b57005b600080fd5b6101a361019e366004612c4d565b610502565b6040516101b19291906132d7565b60405180910390f35b3480156101c657600080fd5b506101da6101d5366004612c32565b6109d7565b60405190151581526020016101b1565b3480156101f657600080fd5b5061020a61020536600461266e565b610abf565b6040516001600160a01b0390911681526020016101b1565b34801561022e57600080fd5b5061023860135481565b6040519081526020016101b1565b34801561025257600080fd5b5060045461020a906001600160a01b031681565b34801561027257600080fd5b50610286610281366004612c4d565b610b08565b6040516101b19190613739565b34801561029f57600080fd5b50610238600181565b3480156102b457600080fd5b506102bd610b50565b6040516101b19493929190613344565b3480156102d957600080fd5b506102ed6102e83660046127eb565b610d18565b005b3480156102fb57600080fd5b5061020a61030a36600461266e565b610dd5565b34801561031b57600080fd5b50610324610e1e565b604080516001600160a01b039a8b16815260208101999099529689169688019690965293871660608701526080860192909252851660a0850152841660c084015260e0830152909116610100820152610120016101b1565b34801561038857600080fd5b50610286610397366004612c4d565b610e66565b3480156103a857600080fd5b5060005461020a906001600160a01b031681565b3480156103c857600080fd5b50610238600581565b3480156103dd57600080fd5b5061023860125481565b6102386103f5366004612779565b610f31565b34801561040657600080fd5b5061020a61041536600461266e565b6005602052600090815260409020546001600160a01b031681565b61023861043e366004612872565b611052565b34801561044f57600080fd5b50610286611175565b34801561046457600080fd5b5061020a61047336600461266e565b611203565b34801561048457600080fd5b50610238600081565b34801561049957600080fd5b5060035461020a906001600160a01b031681565b3480156104b957600080fd5b506101da6104c83660046126f8565b61127d565b3480156104d957600080fd5b506102866113d0565b3480156104ee57600080fd5b5060015461020a906001600160a01b031681565b600060608161051384860186612e1c565b6004549091503390600590600090610533906001600160a01b031661147a565b9550856001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b031602179055506000816080015151600161058e9190613945565b905060005b82604001515181101561069c576000836040015182815181106105b8576105b8613a0a565b6020026020010151905081600014806105f7575060408401516105dc60018461395d565b815181106105ec576105ec613a0a565b602002602001015181115b6106355760405162461bcd60e51b815260040161062c906020808252600490820152634445534360e01b604082015260600190565b60405180910390fd5b600181101580156106475750600e5481105b61067b5760405162461bcd60e51b81526020600482015260056024820152640d2dcc8caf60db1b604482015260640161062c565b82610685816139d9565b935050508080610694906139d9565b915050610593565b506000816001600160401b038111156106b7576106b7613a20565b60405190808252806020026020018201604052801561070957816020015b6040805160808101825260008082526020808301829052928201819052606082015282526000199092019101816106d55790505b50905060005b60018110156107bb5761078b81878115610746578660200151848151811061073957610739613a0a565b60200260200101516114bc565b60018760200151858151811061075e5761075e613a0a565b60200260200101516040516020016107779291906136f4565b6040516020818303038152906040526114bc565b82828151811061079d5761079d613a0a565b602002602001018190525080806107b3906139d9565b91505061070f565b506001808311156108855760005b846040015151811015610883576000856040015182815181106107ee576107ee613a0a565b60200260200101519050600581146108205761081b81898860600151858151811061073957610739613a0a565b610847565b610847888760600151848151811061083a5761083a613a0a565b602002602001015161166b565b8484610852816139d9565b95508151811061086457610864613a0a565b602002602001018190525050808061087b906139d9565b9150506107c9565b505b608084015151156109045760005b846080015151811015610902576108c787866080015183815181106108ba576108ba613a0a565b60200260200101516116d5565b83836108d2816139d9565b9450815181106108e4576108e4613a0a565b602002602001018190525080806108fa906139d9565b915050610893565b505b60008060008660a0015180602001905181019061092191906129a1565b9250925092506109398983896000015186858a61187c565b9750306001600160a01b0316896001600160a01b0316639ce110d76040518163ffffffff1660e01b815260040160206040518083038186803b15801561097e57600080fd5b505afa158015610992573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109b6919061268b565b6001600160a01b0316146109c957600080fd5b505050505050509250929050565b60006001600160e01b031982166301ffc9a760e01b1480610a0857506001600160e01b031982166301ffc9a760e01b145b80610a2357506001600160e01b03198216630a267c7760e21b145b80610a3e57506001600160e01b0319821663115fd2f360e21b145b80610a5957506001600160e01b03198216639ce110d760e01b145b80610a7457506001600160e01b0319821663335b875f60e21b145b80610a8f57506001600160e01b0319821663f437bc5960e01b145b80610aaa57506001600160e01b0319821663642f05f160e11b145b80610ab95750610ab9826119ff565b92915050565b6000610ac9611aab565b610ae55760405162461bcd60e51b815260040161062c90613780565b50600380546001600160a01b039283166001600160a01b03198216179091551690565b6060610b4983838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611ac892505050565b9392505050565b606080606080600e600f6010601183805480602002602001604051908101604052809291908181526020018280548015610bb357602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610b95575b5050505050935082805480602002602001604051908101604052809291908181526020018280548015610c0557602002820191906000526020600020905b815481526020019060010190808311610bf1575b5050505050925081805480602002602001604051908101604052809291908181526020018280548015610c7757602002820191906000526020600020906000905b825461010083900a900460ff161515815260206001928301818104948501949093039092029101808411610c465790505b50505050509150808054610c8a906139a4565b80601f0160208091040260200160405190810160405280929190818152602001828054610cb6906139a4565b8015610d035780601f10610cd857610100808354040283529160200191610d03565b820191906000526020600020905b815481529060010190602001808311610ce657829003601f168201915b50505050509050935093509350935090919293565b6001600160a01b03838116600090815260056020526040902054163314610d705760405162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b604482015260640161062c565b6040516303c205f960e11b81526001600160a01b038416906307840bf290610d9e9085908590600401613426565b600060405180830381600087803b158015610db857600080fd5b505af1158015610dcc573d6000803e3d6000fd5b50505050505050565b6000610ddf611aab565b610dfb5760405162461bcd60e51b815260040161062c90613780565b50600480546001600160a01b039283166001600160a01b03198216179091551690565b600080546001600160a01b03169080808080808080610e3b611b8a565b809850819950829a50839b50849c50859d50869e50879f505050505050505050909192939495969798565b6060610e70611aab565b610e8c5760405162461bcd60e51b815260040161062c90613780565b60028054610e99906139a4565b80601f0160208091040260200160405190810160405280929190818152602001828054610ec5906139a4565b8015610f125780601f10610ee757610100808354040283529160200191610f12565b820191906000526020600020905b815481529060010190602001808311610ef557829003601f168201915b50505050509050828260029190610f2a929190611fc8565b5092915050565b600080600080610f3f611b8a565b50965050505050925092508260001461100c576000805481906001600160a01b03908116906333ef5a33908c1615610f78576000610f7a565b8a5b8d8d8d8d8d8c8c6040518963ffffffff1660e01b8152600401610fa3979695949392919061328a565b60408051808303818588803b158015610fbb57600080fd5b505af1158015610fcf573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610ff49190612f3c565b90925090506110038183613945565b95505050611046565b80156110465760405162461bcd60e51b81526020600482015260096024820152687a65726f206665657360b81b604482015260640161062c565b50505095945050505050565b6000806000806000611062611b8a565b9750975097505050505093508160001461112e576000805481906001600160a01b039081169063b7eaed3b9087161561109c57600061109e565b855b8c88888e8e8a6040518863ffffffff1660e01b81526004016110c596959493929190613243565b60408051808303818588803b1580156110dd57600080fd5b505af11580156110f1573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906111169190612f3c565b90925090506111258183613945565b9650505061116a565b831561116a5760405162461bcd60e51b815260206004820152600b60248201526a1e995c9bc8185b5bdd5b9d60aa1b604482015260640161062c565b505050509392505050565b60028054611182906139a4565b80601f01602080910402602001604051908101604052809291908181526020018280546111ae906139a4565b80156111fb5780601f106111d0576101008083540402835291602001916111fb565b820191906000526020600020905b8154815290600101906020018083116111de57829003601f168201915b505050505081565b600061120d611aab565b6112295760405162461bcd60e51b815260040161062c90613780565b50600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907fe2302c6b581cf0c2edec4248d3a7af323db67692e29b6dc37a7d9736bf5e436990600090a3919050565b6000806000611290898989898989611bc5565b9150915081156112a35791506113c69050565b6001546001600160a01b038a8116911614156112c4576001925050506113c6565b6001546112d9906001600160a01b0316611c1a565b6112e8576000925050506113c6565b60015460405160009182916001600160a01b039091169063335b875f60e21b90611320908e908e908e908e908e908e906024016131f3565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b031990941693909317909252905161135e91906131d7565b600060405180830381855afa9150503d8060008114611399576040519150601f19603f3d011682016040523d82523d6000602084013e61139e565b606091505b50915091508180156113bf5750808060200190518101906113bf9190612984565b9450505050505b9695505050505050565b6060611475600280546113e2906139a4565b80601f016020809104026020016040519081016040528092919081815260200182805461140e906139a4565b801561145b5780601f106114305761010080835404028352916020019161145b565b820191906000526020600020905b81548152906001019060200180831161143e57829003601f168201915b505050505060405180602001604052806000815250611c39565b905090565b60006901000000000000000000820268803b80938091923cf36258807360e81b01176000526020600080f09050803b80156114b4576114b6565bfe5b50919050565b6040805160808101825260008082526020820181905291810182905260608101919091526040518060800160405280600f86815481106114fe576114fe613a0a565b9060005260206000200154815260200161153e600e878154811061152457611524613a0a565b6000918252602090912001546001600160a01b031661147a565b6001600160a01b031681526020016010868154811061155f5761155f613a0a565b90600052602060002090602091828204019190069054906101000a900460ff161515815260200160011515815250905080602001516001600160a01b031663457f4bcc84846040516020016115b59291906132d7565b6040516020818303038152906040526040518263ffffffff1660e01b81526004016115e09190613739565b600060405180830381600087803b1580156115fa57600080fd5b505af115801561160e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526116369190810190612c8e565b506020808201516001600160a01b0316600090815260059091526040902080546001600160a01b031916331790559392505050565b604080516080810182526000808252602082018190529181018290526060810191909152610b49600584601354600e6001815481106116ac576116ac613a0a565b6000918252602091829020015460405161077793926001600160a01b03909216918991016137a6565b604080516080810182526000808252602082018190529181018290526060810191909152600080600080858060200190518101906117139190612bc5565b935093509350935060008151111561184a5760008180602001905181019061173b9190612ba7565b9250905080156117a457336005600061175c876001600160a01b031661147a565b9650866001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b031602179055505b836001600160a01b031663457f4bcc89846040516020016117c69291906132d7565b6040516020818303038152906040526040518263ffffffff1660e01b81526004016117f19190613739565b600060405180830381600087803b15801561180b57600080fd5b505af115801561181f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526118479190810190612c8e565b50505b50604080516080810182529384526001600160a01b039092166020840152151590820152600160608201529392505050565b60045460035460125460405160609333936001600160a01b038c811694928116937fe0c363f71c2006b5e1500c6e2f7c2e0c418ae6dd653297537b337f7f6d6eeea293869363457f4bcc938f938f9392909116918e918e906118e2908f906020016133c2565b60408051601f198184030181529082905261190092916020016135b4565b60408051601f198184030181529082905261191f93929160200161370f565b60408051601f198184030181529082905261193e93929160200161374c565b60408051601f198184030181529082905261195c92916020016132d7565b6040516020818303038152906040526040518263ffffffff1660e01b81526004016119879190613739565b600060405180830381600087803b1580156119a157600080fd5b505af11580156119b5573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526119dd9190810190612c8e565b9450846040516119ed9190613739565b60405180910390a49695505050505050565b60006001600160e01b03198216633cd9a01960e11b1480611a3057506001600160e01b0319821663c71bf12d60e01b145b80611a4b57506001600160e01b03198216631d59313f60e31b145b80611a6657506001600160e01b0319821663ccfec2fb60e01b145b80611a8157506001600160e01b03198216639b642de160e01b145b80611a9c57506001600160e01b031982166303fbd7fd60e01b145b80610ab95750610ab982611cdd565b600061147533306000356001600160e01b0319166000363461127d565b6000546060906001600160a01b031615611b0d5760405162461bcd60e51b815260040161062c906020808252600490820152631a5b9a5d60e21b604082015260600190565b600080546001600160a01b031916331790558151611b3490830160209081019084016126a8565b600180546001600160a01b039093166001600160a01b0319909316831790556040519092506000907fe2302c6b581cf0c2edec4248d3a7af323db67692e29b6dc37a7d9736bf5e4369908290a3610ab981611d6b565b600654600754600854600954600a54600b54600c54600d546001600160a01b0396871696958616959384169392831692169091929394959697565b6000806001600160e01b031986166396434f9160e01b1480611bf757506001600160e01b031986166303fbd7fd60e01b145b15611c085750600190506000611c0f565b5060009050805b965096945050505050565b60006001600160a01b038216611c3257506000919050565b503b151590565b6003546060906001600160a01b0316611c53575081610ab9565b60035460405163f709c9b760e01b81526001600160a01b039091169063f709c9b790611c899030908790879033906004016132fb565b60006040518083038186803b158015611ca157600080fd5b505afa158015611cb5573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610b499190810190612c8e565b60006001600160e01b03198216630518fe4360e01b1480611d0e57506001600160e01b03198216632ae60b6b60e01b145b80611d2957506001600160e01b031982166396434f9160e01b145b80611d4457506001600160e01b0319821663b9caf9d960e01b145b80611d5e57506001600160e01b031982166203ba1b60e51b145b80610ab957506000610ab9565b606081806020019051810190611d819190612cc2565b600380546001600160a01b0319166001600160a01b03841617905582519093508390611db490600290602086019061204c565b50505050610ab9816004546060906001600160a01b031615611e015760405162461bcd60e51b815260040161062c906020808252600490820152631a5b9a5d60e21b604082015260600190565b81806020019051810190611e1591906126a8565b600480546001600160a01b0319166001600160a01b0393909316929092179091559050610ab981604080516101208101825260008082526020820181905291810182905260608181018390526080820183905260a0820183905260c0820183905260e0820192909252610100810182905282806020019051810190611e9a9190612d38565b80516006556020810151600780546001600160a01b03199081166001600160a01b0393841617909155604083015160088054831691841691909117905560608301516009556080830151600a8054831691841691909117905560a0830151600b8054831691841691909117905560c0830151600c5560e0830151600d80549092169216919091179055610100810151909150610b4990606081806020019051810190611f4691906128c6565b601281905560138290558251600e90600090600f9082906010908290611f739060119060208c019061204c565b50508851611f86919060208b01906120c0565b50508751611f99919060208a0190612160565b50508651611fac9190602089019061219a565b5050604080516020810190915260008152979650505050505050565b828054611fd4906139a4565b90600052602060002090601f016020900481019282611ff6576000855561203c565b82601f1061200f5782800160ff1982351617855561203c565b8280016001018555821561203c579182015b8281111561203c578235825591602001919060010190612021565b506120489291506121ef565b5090565b828054612058906139a4565b90600052602060002090601f01602090048101928261207a576000855561203c565b82601f1061209357805160ff191683800117855561203c565b8280016001018555821561203c579182015b8281111561203c5782518255916020019190600101906120a5565b82805482825590600052602060002090601f0160209004810192821561203c5791602002820160005b8382111561212657835183826101000a81548160ff02191690831515021790555092602001926001016020816000010492830192600103026120e9565b80156121535782816101000a81549060ff0219169055600101602081600001049283019260010302612126565b50506120489291506121ef565b82805482825590600052602060002090810192821561203c579160200282018281111561203c5782518255916020019190600101906120a5565b82805482825590600052602060002090810192821561203c579160200282015b8281111561203c57825182546001600160a01b0319166001600160a01b039091161782556020909201916001909101906121ba565b5b8082111561204857600081556001016121f0565b803561220f81613a36565b919050565b805161220f81613a36565b600082601f83011261223057600080fd5b815160206122456122408361386e565b61383e565b80838252828201915082860187848660051b890101111561226557600080fd5b60005b8581101561228d57815161227b81613a36565b84529284019290840190600101612268565b5090979650505050505050565b600082601f8301126122ab57600080fd5b815160206122bb6122408361386e565b80838252828201915082860187848660051b89010111156122db57600080fd5b6000805b8681101561231d5782516001600160401b038111156122fc578283fd5b61230a8b88838d010161221f565b86525093850193918501916001016122df565b509198975050505050505050565b600082601f83011261233c57600080fd5b8151602061234c6122408361386e565b80838252828201915082860187848660051b890101111561236c57600080fd5b60005b8581101561228d57815161238281613a4e565b8452928401929084019060010161236f565b600082601f8301126123a557600080fd5b815160206123b56122408361386e565b80838252828201915082860187848660051b89010111156123d557600080fd5b60005b8581101561228d578151845292840192908401906001016123d8565b600082601f83011261240557600080fd5b813560206124156122408361386e565b80838252828201915082860187848660051b890101111561243557600080fd5b6000805b8681101561231d5782356001600160401b03811115612456578283fd5b6124648b88838d01016125d0565b8652509385019391850191600101612439565b600082601f83011261248857600080fd5b815160206124986122408361386e565b80838252828201915082860187848660051b89010111156124b857600080fd5b6000805b8681101561231d5782516001600160401b038111156124d9578283fd5b6124e78b88838d0101612621565b86525093850193918501916001016124bc565b600082601f83011261250b57600080fd5b8135602061251b6122408361386e565b80838252828201915082860187848660051b890101111561253b57600080fd5b60005b8581101561228d5781358452928401929084019060010161253e565b803561220f81613a4e565b805161220f81613a4e565b80356001600160e01b03198116811461220f57600080fd5b60008083601f84011261259a57600080fd5b5081356001600160401b038111156125b157600080fd5b6020830191508360208285010111156125c957600080fd5b9250929050565b600082601f8301126125e157600080fd5b81356125ef61224082613891565b81815284602083860101111561260457600080fd5b816020850160208301376000918101602001919091529392505050565b600082601f83011261263257600080fd5b815161264061224082613891565b81815284602083860101111561265557600080fd5b612666826020830160208701613974565b949350505050565b60006020828403121561268057600080fd5b8135610b4981613a36565b60006020828403121561269d57600080fd5b8151610b4981613a36565b600080604083850312156126bb57600080fd5b82516126c681613a36565b60208401519092506001600160401b038111156126e257600080fd5b6126ee85828601612621565b9150509250929050565b60008060008060008060a0878903121561271157600080fd5b863561271c81613a36565b9550602087013561272c81613a36565b945061273a60408801612570565b935060608701356001600160401b0381111561275557600080fd5b61276189828a01612588565b979a9699509497949695608090950135949350505050565b60008060008060006080868803121561279157600080fd5b853561279c81613a36565b945060208601356127ac81613a36565b93506040860135925060608601356001600160401b038111156127ce57600080fd5b6127da88828901612588565b969995985093965092949392505050565b60008060006040848603121561280057600080fd5b833561280b81613a36565b925060208401356001600160401b038082111561282757600080fd5b818601915086601f83011261283b57600080fd5b81358181111561284a57600080fd5b8760208260051b850101111561285f57600080fd5b6020830194508093505050509250925092565b60008060006040848603121561288757600080fd5b833561289281613a36565b925060208401356001600160401b038111156128ad57600080fd5b6128b986828701612588565b9497909650939450505050565b60008060008060008060c087890312156128df57600080fd5b86516001600160401b03808211156128f657600080fd5b6129028a838b0161221f565b9750602089015191508082111561291857600080fd5b6129248a838b01612394565b9650604089015191508082111561293a57600080fd5b6129468a838b0161232b565b9550606089015191508082111561295c57600080fd5b5061296989828a01612621565b9350506080870151915060a087015190509295509295509295565b60006020828403121561299657600080fd5b8151610b4981613a4e565b6000806000606084860312156129b657600080fd5b83516129c181613a4e565b60208501519093506129d281613a36565b60408501519092506001600160401b03808211156129ef57600080fd5b818601915086601f830112612a0357600080fd5b8151612a116122408261386e565b80828252602082019150602085018a60208560051b8801011115612a3457600080fd5b60005b84811015612b9657815186811115612a4e57600080fd5b8701610140818e03601f19011215612a6557600080fd5b612a6d6137d0565b612a7960208301612214565b8152604082015188811115612a8d57600080fd5b612a9c8f602083860101612621565b602083015250612aae60608301612565565b6040820152608082015188811115612ac557600080fd5b612ad48f602083860101612477565b60608301525060a082015188811115612aec57600080fd5b612afb8f602083860101612394565b608083015250612b0d60c08301612214565b60a0820152612b1e60e08301612214565b60c082015261010082015160e082015261012082015188811115612b4157600080fd5b612b508f60208386010161229a565b6101008301525061014082015188811115612b6a57600080fd5b612b798f60208386010161229a565b610120830152508552506020938401939190910190600101612a37565b505080955050505050509250925092565b60008060408385031215612bba57600080fd5b82516126c681613a4e565b60008060008060808587031215612bdb57600080fd5b845193506020850151612bed81613a36565b6040860151909350612bfe81613a4e565b60608601519092506001600160401b03811115612c1a57600080fd5b612c2687828801612621565b91505092959194509250565b600060208284031215612c4457600080fd5b610b4982612570565b60008060208385031215612c6057600080fd5b82356001600160401b03811115612c7657600080fd5b612c8285828601612588565b90969095509350505050565b600060208284031215612ca057600080fd5b81516001600160401b03811115612cb657600080fd5b61266684828501612621565b600080600060608486031215612cd757600080fd5b83516001600160401b0380821115612cee57600080fd5b612cfa87838801612621565b945060208601519150612d0c82613a36565b604086015191935080821115612d2157600080fd5b50612d2e86828701612621565b9150509250925092565b600060208284031215612d4a57600080fd5b81516001600160401b0380821115612d6157600080fd5b908301906101208286031215612d7657600080fd5b612d7e6137f9565b82518152612d8e60208401612214565b6020820152612d9f60408401612214565b604082015260608301516060820152612dba60808401612214565b6080820152612dcb60a08401612214565b60a082015260c083015160c0820152612de660e08401612214565b60e08201526101008084015183811115612dff57600080fd5b612e0b88828701612621565b918301919091525095945050505050565b600060208284031215612e2e57600080fd5b81356001600160401b0380821115612e4557600080fd5b9083019060c08286031215612e5957600080fd5b612e6161381c565b823582811115612e7057600080fd5b612e7c878286016125d0565b825250602083013582811115612e9157600080fd5b612e9d878286016123f4565b602083015250604083013582811115612eb557600080fd5b612ec1878286016124fa565b604083015250606083013582811115612ed957600080fd5b612ee5878286016123f4565b606083015250608083013582811115612efd57600080fd5b612f09878286016123f4565b60808301525060a083013582811115612f2157600080fd5b612f2d878286016125d0565b60a08301525095945050505050565b60008060408385031215612f4f57600080fd5b505080516020909101519092909150565b600081518084526020808501945080840160005b83811015612f995781516001600160a01b031687529582019590820190600101612f74565b509495945050505050565b81835260006020808501808196508560051b81019150846000805b88811015613021578385038a52612fd683896138b8565b808752878701845b8281101561300c578335612ff181613a36565b6001600160a01b031682529289019290890190600101612fde565b509b88019b9650505091850191600101612fbf565b509298975050505050505050565b600081518084526020808501808196508360051b8101915082860160005b85811015613077578284038952613065848351612f60565b9885019893509084019060010161304d565b5091979650505050505050565b81835260006001600160fb1b0383111561309d57600080fd5b8260051b8083602087013760009401602001938452509192915050565b600081518084526020808501945080840160005b83811015612f99578151875295820195908201906001016130ce565b81835260006020808501808196508560051b810191508460005b8781101561307757828403895261311b8288613900565b613126868284613182565b9a87019a9550505090840190600101613104565b600081518084526020808501808196508360051b8101915082860160005b858110156130775782840389526131708483516131ab565b98850198935090840190600101613158565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b600081518084526131c3816020860160208601613974565b601f01601f19169290920160200192915050565b600082516131e9818460208701613974565b9190910192915050565b6001600160a01b038781168252861660208201526001600160e01b03198516604082015260a0606082018190526000906132309083018587613182565b9050826080830152979650505050505050565b600060018060a01b038089168352808816602084015286604084015260a0606084015261327460a084018688613182565b9150808416608084015250979650505050505050565b600060018060a01b03808a168352808916602084015287604084015260c060608401526132bb60c084018789613182565b60808401959095529290921660a0909101525095945050505050565b6001600160a01b0383168152604060208201819052600090612666908301846131ab565b600060018060a01b0380871683526080602084015261331d60808401876131ab565b838103604085015261332f81876131ab565b92505080841660608401525095945050505050565b6080815260006133576080830187612f60565b60208382038185015261336a82886130ba565b8481036040860152865180825282880193509082019060005b818110156133a1578451151583529383019391830191600101613383565b505084810360608601526133b581876131ab565b9998505050505050505050565b602080825282518282018190526000919060409081850190868401855b8281101561307757815180518552868101516001600160a01b03168786015285810151151586860152606090810151151590850152608090930192908501906001016133df565b60208082528181018390526000906040808401600586901b850182018785805b898110156135a557888403603f190185528235368c900361013e1901811261346c578283fd5b8b0161014061348b8661347e84612204565b6001600160a01b03169052565b61349789830183613900565b828b8901526134a98389018284613182565b925050506134b888830161255a565b15158887015260606134cc838201846138b8565b888403838a01526134de8482846130ea565b935050505060806134f1818401846138b8565b888403838a0152613503848284613084565b935050505060a0613515818401612204565b6001600160a01b03169087015260c061352f838201612204565b6001600160a01b03169087015260e08281013590870152610100613555818401846138b8565b888403838a0152613567848284612fa4565b935050505061012061357b818401846138b8565b93508783038289015261358f838583612fa4565b988b019897505050938801935050600101613446565b50919998505050505050505050565b60006040808301818452808651808352606092508286019150828160051b8701016020808a0160005b848110156136e157898403605f19018652815180516001600160a01b03168552610140848201518186880152613615828801826131ab565b915050898201516136298b88018215159052565b50888201518682038a88015261363f828261313a565b9150506080808301518783038289015261365983826130ba565b9250505060a080830151613677828901826001600160a01b03169052565b505060c0828101516001600160a01b03169087015260e0808301519087015261010080830151878303828901526136ae838261302f565b9250505061012080830151925086820381880152506136cd818361302f565b9785019795505050908201906001016135dd565b5050878203908801526133b581896131ab565b821515815260406020820152600061266660408301846131ab565b831515815282602082015260606040820152600061373060608301846131ab565b95945050505050565b602081526000610b4960208301846131ab565b60608152600061375f60608301866131ab565b6001600160a01b038516602084015282810360408401526113c681856131ab565b6020808252600c908201526b1d5b985d5d1a1bdc9a5e995960a21b604082015260600190565b8381526001600160a01b0383166020820152606060408201819052600090613730908301846131ab565b60405161014081016001600160401b03811182821017156137f3576137f3613a20565b60405290565b60405161012081016001600160401b03811182821017156137f3576137f3613a20565b60405160c081016001600160401b03811182821017156137f3576137f3613a20565b604051601f8201601f191681016001600160401b038111828210171561386657613866613a20565b604052919050565b60006001600160401b0382111561388757613887613a20565b5060051b60200190565b60006001600160401b038211156138aa576138aa613a20565b50601f01601f191660200190565b6000808335601e198436030181126138cf57600080fd5b83016020810192503590506001600160401b038111156138ee57600080fd5b8060051b36038313156125c957600080fd5b6000808335601e1984360301811261391757600080fd5b83016020810192503590506001600160401b0381111561393657600080fd5b8036038313156125c957600080fd5b60008219821115613958576139586139f4565b500190565b60008282101561396f5761396f6139f4565b500390565b60005b8381101561398f578181015183820152602001613977565b8381111561399e576000848401525b50505050565b600181811c908216806139b857607f821691505b602082108114156114b657634e487b7160e01b600052602260045260246000fd5b60006000198214156139ed576139ed6139f4565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114613a4b57600080fd5b50565b8015158114613a4b57600080fdfea2646970667358221220a60722edefb7dce7eda3515d9717888afde63acd0d88635bad49afaebc99970f64736f6c63430008060033

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

000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000006c0000000000000000000000000dc0090f8add5db06de0897a54e753af1436686680000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000066000000000000000000000000000000000000000000000000000000000000000600000000000000000000000003ff777884412c7ce8a1da679b4b0cd54f720ab2e00000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000d5245414c5f5552495f484552450000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005a0000000000000000000000000497a9487037d1cf31272ef1e8d251493ae081fbe00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000540000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000003e000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000002c000000000000000000000000000000000000000000000000000000000000003c0000000000000000000000000000000000000000000000000000000000000000f00000000000000000000000000000000000000000000000000000000000000070000000000000000000000000000000000000000000000000000000000000007000000000000000000000000bcce1c1f330825987e2cd0a617bee8242c84ea34000000000000000000000000e5168e2f9e93bca6b7b0d94d6beac02bb81eaf3f000000000000000000000000bdf64ae59bbe95317e25702cfab99a3d092111fc000000000000000000000000b7b98e849f6bd6196ef5900f495f569393373bf600000000000000000000000081134b36d941dfa49c968571f22397e07fdad80b000000000000000000000000138a41e7ae1a4ac664e539f8fabc5290370041fe000000000000000000000000399b717748407e79fea6be30ca5a018ca7a482ef0000000000000000000000000000000000000000000000000000000000000007a504406933af7ca120d20b97dfc79ea9788beb3c4d3ac1ff9a2c292b2c28e0cccfe1633df53a0649d88d788961f26058c5e7a0b5644675f19f67bb2975827ba2d1d09e8f5708558865b8acd5f13c69781ae600e42dbc7f52b8ef1b9e33dbcd3687a92f6bd20613c184485be8eadb46851dd4294a8359f902606085b8be6e7ae65b87d6e94145c2e242653a71b7d439a3638a93c3f0d32e1ea876f9fb1feb53e249b87f4ee20613c184485be8eadb46851dd4294a8359f902606085b8be6e7ae64f3ad97a91794a00945c0ead3983f793d34044c6300048d8b4ef95636edd234b000000000000000000000000000000000000000000000000000000000000000700000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : lazyInitData (bytes): 0x000000000000000000000000dc0090f8add5db06de0897a54e753af1436686680000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000066000000000000000000000000000000000000000000000000000000000000000600000000000000000000000003ff777884412c7ce8a1da679b4b0cd54f720ab2e00000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000d5245414c5f5552495f484552450000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005a0000000000000000000000000497a9487037d1cf31272ef1e8d251493ae081fbe00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000540000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000003e000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000002c000000000000000000000000000000000000000000000000000000000000003c0000000000000000000000000000000000000000000000000000000000000000f00000000000000000000000000000000000000000000000000000000000000070000000000000000000000000000000000000000000000000000000000000007000000000000000000000000bcce1c1f330825987e2cd0a617bee8242c84ea34000000000000000000000000e5168e2f9e93bca6b7b0d94d6beac02bb81eaf3f000000000000000000000000bdf64ae59bbe95317e25702cfab99a3d092111fc000000000000000000000000b7b98e849f6bd6196ef5900f495f569393373bf600000000000000000000000081134b36d941dfa49c968571f22397e07fdad80b000000000000000000000000138a41e7ae1a4ac664e539f8fabc5290370041fe000000000000000000000000399b717748407e79fea6be30ca5a018ca7a482ef0000000000000000000000000000000000000000000000000000000000000007a504406933af7ca120d20b97dfc79ea9788beb3c4d3ac1ff9a2c292b2c28e0cccfe1633df53a0649d88d788961f26058c5e7a0b5644675f19f67bb2975827ba2d1d09e8f5708558865b8acd5f13c69781ae600e42dbc7f52b8ef1b9e33dbcd3687a92f6bd20613c184485be8eadb46851dd4294a8359f902606085b8be6e7ae65b87d6e94145c2e242653a71b7d439a3638a93c3f0d32e1ea876f9fb1feb53e249b87f4ee20613c184485be8eadb46851dd4294a8359f902606085b8be6e7ae64f3ad97a91794a00945c0ead3983f793d34044c6300048d8b4ef95636edd234b000000000000000000000000000000000000000000000000000000000000000700000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

-----Encoded View---------------
56 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000020
Arg [1] : 00000000000000000000000000000000000000000000000000000000000006c0
Arg [2] : 000000000000000000000000dc0090f8add5db06de0897a54e753af143668668
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000660
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [6] : 0000000000000000000000003ff777884412c7ce8a1da679b4b0cd54f720ab2e
Arg [7] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [8] : 000000000000000000000000000000000000000000000000000000000000000d
Arg [9] : 5245414c5f5552495f4845524500000000000000000000000000000000000000
Arg [10] : 00000000000000000000000000000000000000000000000000000000000005a0
Arg [11] : 000000000000000000000000497a9487037d1cf31272ef1e8d251493ae081fbe
Arg [12] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [13] : 0000000000000000000000000000000000000000000000000000000000000540
Arg [14] : 0000000000000000000000000000000000000000000000000000000000000020
Arg [15] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [16] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [17] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [18] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [19] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [20] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [21] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [22] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [23] : 0000000000000000000000000000000000000000000000000000000000000120
Arg [24] : 00000000000000000000000000000000000000000000000000000000000003e0
Arg [25] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [26] : 00000000000000000000000000000000000000000000000000000000000001c0
Arg [27] : 00000000000000000000000000000000000000000000000000000000000002c0
Arg [28] : 00000000000000000000000000000000000000000000000000000000000003c0
Arg [29] : 000000000000000000000000000000000000000000000000000000000000000f
Arg [30] : 0000000000000000000000000000000000000000000000000000000000000007
Arg [31] : 0000000000000000000000000000000000000000000000000000000000000007
Arg [32] : 000000000000000000000000bcce1c1f330825987e2cd0a617bee8242c84ea34
Arg [33] : 000000000000000000000000e5168e2f9e93bca6b7b0d94d6beac02bb81eaf3f
Arg [34] : 000000000000000000000000bdf64ae59bbe95317e25702cfab99a3d092111fc
Arg [35] : 000000000000000000000000b7b98e849f6bd6196ef5900f495f569393373bf6
Arg [36] : 00000000000000000000000081134b36d941dfa49c968571f22397e07fdad80b
Arg [37] : 000000000000000000000000138a41e7ae1a4ac664e539f8fabc5290370041fe
Arg [38] : 000000000000000000000000399b717748407e79fea6be30ca5a018ca7a482ef
Arg [39] : 0000000000000000000000000000000000000000000000000000000000000007
Arg [40] : a504406933af7ca120d20b97dfc79ea9788beb3c4d3ac1ff9a2c292b2c28e0cc
Arg [41] : cfe1633df53a0649d88d788961f26058c5e7a0b5644675f19f67bb2975827ba2
Arg [42] : d1d09e8f5708558865b8acd5f13c69781ae600e42dbc7f52b8ef1b9e33dbcd36
Arg [43] : 87a92f6bd20613c184485be8eadb46851dd4294a8359f902606085b8be6e7ae6
Arg [44] : 5b87d6e94145c2e242653a71b7d439a3638a93c3f0d32e1ea876f9fb1feb53e2
Arg [45] : 49b87f4ee20613c184485be8eadb46851dd4294a8359f902606085b8be6e7ae6
Arg [46] : 4f3ad97a91794a00945c0ead3983f793d34044c6300048d8b4ef95636edd234b
Arg [47] : 0000000000000000000000000000000000000000000000000000000000000007
Arg [48] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [49] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [50] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [51] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [52] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [53] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [54] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [55] : 0000000000000000000000000000000000000000000000000000000000000000


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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

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