Contract 0x72cc6e4de47f673062c41c67505188144a0a3d84 13

 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x215542f90ede9e1357393bea09a76cf0fa220bba55f4de0cf073b84b6c87ea2aCreate543517262023-01-24 15:05:543 days 19 hrs ago0x9b2d37b51a59487b1361bdcb3a4f3ecdb8485193 IN  XDAO: Factory0 FTM0.259948170253
0x1ef9df066911c346b9c68ceadd76f4b1b7b75792e74049271b7a9633ceef9a71Create528012092022-12-24 16:07:5634 days 18 hrs ago0x01fcba42ed7d486cd54148a2dd5de784054ae1c5 IN  XDAO: Factory0 FTM0.116927774296
0xbf2cbc931e2be6428180df7cd24f55e3c053906f9a8e265fbe5b04551d8b03d9Create528008202022-12-24 15:57:0534 days 19 hrs ago0x5fdb39f1b36f89c6cc86247b5f8eb7ffb516a88c IN  XDAO: Factory0 FTM0.116737832948
0x6852797f5e01d8b10fc089cb4591dfdf48553db2341ecd1441cc10b6725e3692Create528003942022-12-24 15:45:0434 days 19 hrs ago0xf57724fc6c9773b84c5575d31a9dc17ca7f87563 IN  XDAO: Factory0 FTM0.116656311282
0x72449bcd263a3ad10425b80734d6a4b8f66bf4a50c32a5c55298632e794629efCreate527999212022-12-24 15:32:3634 days 19 hrs ago0x6ff096cff796129c9174518970f947f0edc36cc2 IN  XDAO: Factory0 FTM0.116615205455
0x8a559af5a48b04e63e09db74d2bdc91ef8b5177f45336ecd789f08fc9ba22410Create527983982022-12-24 14:46:0334 days 20 hrs ago0x373b32f1e754515f8efb642dffd02ba325df7c5f IN  XDAO: Factory0 FTM0.229731737772
0x98895ddee3c73f67b66ebe5dfcbdab45658029404d9851b2c894344e85babed8Create527980582022-12-24 14:34:0034 days 20 hrs ago0x54eafc97e719cb6db0de6af0f789c589dc14edbd IN  XDAO: Factory0 FTM0.139432754842
0xdb876b11a30fd120788512232bad1348b5f94845c86b2b3f89bcb9e640eb9de5Create527973662022-12-24 14:12:0634 days 20 hrs ago0x9931e357afaa299ef96556015e575eb4ab394f17 IN  XDAO: Factory0 FTM0.117068642553
0xc2405be792021207f566dca57885d43dbb69abfba5fb2325dffab05d693f93d1Create527969452022-12-24 13:57:4234 days 21 hrs ago0xb9cf21443760630067318965ebc2494f19277590 IN  XDAO: Factory0 FTM0.115260884
0xef053b18d1c4fcad304d805562007e5669323326a2c851cd72139ea8685126beCreate527965252022-12-24 13:42:4834 days 21 hrs ago0x21d13ab6d8d93de39561fde1231c91fc0f3983dd IN  XDAO: Factory0 FTM0.395156967488
0xc8a3990b256fdeda8c8cb5299c09aacd24a6fcdb02b67f13e221f822d22d3d7fCreate527961832022-12-24 13:25:5834 days 21 hrs ago0x6e42658cb4db91360a355d0ff6cc35f090be786d IN  XDAO: Factory0 FTM0.135704516509
0xd28bbf1a7eb3d411aa0cfd61599f8273410d3fb1a9e82cd317e2ae32d56098b3Create527928442022-12-24 11:33:0634 days 23 hrs ago0xf594fb95c51c58a77c0e4bd4c15c0d96b3c6a999 IN  XDAO: Factory0 FTM0.203125327162
0x2b155c59006047f76287bf0ffe5d70e9d1098141be375184e5d0cc3266898124Create527921882022-12-24 11:11:3834 days 23 hrs ago0x2a61b9a279e839f6286035411be300d41169232b IN  XDAO: Factory0 FTM0.120552154652
0xdb90eb405fee126ef4a0249f26038c1ef8413b9d6b2823ed0c4ae6587902821aCreate527918622022-12-24 11:01:5435 days 3 mins ago0xcb28e64e83b63ecbdbb7d9141ea93c926473f1d4 IN  XDAO: Factory0 FTM0.169941837603
0x525284179ff543e53181a85418dce1f6b40bc4a33a1b35d0ffbda027a15f2e00Create527913992022-12-24 10:47:5335 days 17 mins ago0x57c06853dd4e461e18f6a99ce704253bea49f9ac IN  XDAO: Factory0 FTM0.297097357396
0x1905bbb76b6d7fb973f7b273736612b6649dd86a3e737fe602e1eb58a7d34a5bCreate527910532022-12-24 10:36:1735 days 29 mins ago0x76e3ac86ceacd394bb955575e792cc7de9c7cdf5 IN  XDAO: Factory0 FTM0.169969301249
0x4769578df0394769aa225c14d78958f88f2808c2b7126cd8849c232889d227a1Create527907262022-12-24 10:26:3935 days 38 mins ago0xc1b16eefe9f6f1aab680eb9cd9fee8371dbc3a60 IN  XDAO: Factory0 FTM0.169976873532
0xe68d2dcbed827b40108b376b0e0abdd53c49424828c31154e56c6cb241d1e9e6Create527847102022-12-24 7:21:2335 days 3 hrs ago0x2f4cd01b5e54088de41b81c1fdb0f67252e42246 IN  XDAO: Factory0 FTM0.146238181896
0x1aaef36fadfd690607239a4b512db18a1673e6d7fc4fec155674b7cacb2a7180Create527840382022-12-24 7:02:1535 days 4 hrs ago0x2eba2ea7fc358066839468056b82201e94d4d725 IN  XDAO: Factory0 FTM0.126060057996
0x2757ff5cbe36ad491e6f182b52a2cb6147a809cbc715bc86f5f497f3436bfefeCreate527826382022-12-24 6:21:2235 days 4 hrs ago0x2f4cd01b5e54088de41b81c1fdb0f67252e42246 IN  XDAO: Factory0 FTM0.12162480033
0xa5c3b451c442b23bf14c72df2c4e928957c406bfc63763a07e5ea17be5f38d8fCreate515090522022-11-27 13:44:4061 days 21 hrs ago0x4e6aa9a7d2632b7fa3300a888945219dadcfd4d3 IN  XDAO: Factory0 FTM0.243078765551
0xcb9e9b98d02e8667abd352cc724ea626bf032498822d28096e57fb0bc8cd6fbcCreate513606972022-11-23 23:18:4465 days 11 hrs ago0x869acbf80139c059438a9445f95e98e4531d4b53 IN  XDAO: Factory0 FTM0.37907661401
0x65074ee0fbb074dc90c521d3ee417994e636ff11d0da7f83e5667bdfd47f277fCreate482185262022-10-02 4:52:42118 days 6 hrs ago0xcf8b43e49ceb1036511ad94766d40566f301f929 IN  XDAO: Factory0 FTM0.009751283053
0xf3e099c4f0217da9a50a7d97aa7109c6797b179be7790d7ecf1d934c94e382b5Create461196902022-09-01 7:30:33149 days 3 hrs ago0x293df4ece3971f0acbeaec4f6481230798207c3b IN  XDAO: Factory0 FTM0.011541310692
0xbb6c0414ac8de5f2111fedc8ec53db971ebb62427070195242fe5fa5fd06cf60Create445423412022-08-09 12:09:23171 days 22 hrs ago0x1e777d867c023299bc4af28132c99b345b534ebd IN  XDAO: Factory0 FTM0.020728447543
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x215542f90ede9e1357393bea09a76cf0fa220bba55f4de0cf073b84b6c87ea2a543517262023-01-24 15:05:543 days 19 hrs ago XDAO: Factory  Contract Creation0 FTM
0x1ef9df066911c346b9c68ceadd76f4b1b7b75792e74049271b7a9633ceef9a71528012092022-12-24 16:07:5634 days 18 hrs ago XDAO: Factory  Contract Creation0 FTM
0xbf2cbc931e2be6428180df7cd24f55e3c053906f9a8e265fbe5b04551d8b03d9528008202022-12-24 15:57:0534 days 19 hrs ago XDAO: Factory  Contract Creation0 FTM
0x6852797f5e01d8b10fc089cb4591dfdf48553db2341ecd1441cc10b6725e3692528003942022-12-24 15:45:0434 days 19 hrs ago XDAO: Factory  Contract Creation0 FTM
0x72449bcd263a3ad10425b80734d6a4b8f66bf4a50c32a5c55298632e794629ef527999212022-12-24 15:32:3634 days 19 hrs ago XDAO: Factory  Contract Creation0 FTM
0x8a559af5a48b04e63e09db74d2bdc91ef8b5177f45336ecd789f08fc9ba22410527983982022-12-24 14:46:0334 days 20 hrs ago XDAO: Factory  Contract Creation0 FTM
0x98895ddee3c73f67b66ebe5dfcbdab45658029404d9851b2c894344e85babed8527980582022-12-24 14:34:0034 days 20 hrs ago XDAO: Factory  Contract Creation0 FTM
0xdb876b11a30fd120788512232bad1348b5f94845c86b2b3f89bcb9e640eb9de5527973662022-12-24 14:12:0634 days 20 hrs ago XDAO: Factory  Contract Creation0 FTM
0xc2405be792021207f566dca57885d43dbb69abfba5fb2325dffab05d693f93d1527969452022-12-24 13:57:4234 days 21 hrs ago XDAO: Factory  Contract Creation0 FTM
0xef053b18d1c4fcad304d805562007e5669323326a2c851cd72139ea8685126be527965252022-12-24 13:42:4834 days 21 hrs ago XDAO: Factory  Contract Creation0 FTM
0xc8a3990b256fdeda8c8cb5299c09aacd24a6fcdb02b67f13e221f822d22d3d7f527961832022-12-24 13:25:5834 days 21 hrs ago XDAO: Factory  Contract Creation0 FTM
0xd28bbf1a7eb3d411aa0cfd61599f8273410d3fb1a9e82cd317e2ae32d56098b3527928442022-12-24 11:33:0634 days 23 hrs ago XDAO: Factory  Contract Creation0 FTM
0x2b155c59006047f76287bf0ffe5d70e9d1098141be375184e5d0cc3266898124527921882022-12-24 11:11:3834 days 23 hrs ago XDAO: Factory  Contract Creation0 FTM
0xdb90eb405fee126ef4a0249f26038c1ef8413b9d6b2823ed0c4ae6587902821a527918622022-12-24 11:01:5435 days 3 mins ago XDAO: Factory  Contract Creation0 FTM
0x525284179ff543e53181a85418dce1f6b40bc4a33a1b35d0ffbda027a15f2e00527913992022-12-24 10:47:5335 days 17 mins ago XDAO: Factory  Contract Creation0 FTM
0x1905bbb76b6d7fb973f7b273736612b6649dd86a3e737fe602e1eb58a7d34a5b527910532022-12-24 10:36:1735 days 29 mins ago XDAO: Factory  Contract Creation0 FTM
0x4769578df0394769aa225c14d78958f88f2808c2b7126cd8849c232889d227a1527907262022-12-24 10:26:3935 days 38 mins ago XDAO: Factory  Contract Creation0 FTM
0xe68d2dcbed827b40108b376b0e0abdd53c49424828c31154e56c6cb241d1e9e6527847102022-12-24 7:21:2335 days 3 hrs ago XDAO: Factory  Contract Creation0 FTM
0x1aaef36fadfd690607239a4b512db18a1673e6d7fc4fec155674b7cacb2a7180527840382022-12-24 7:02:1535 days 4 hrs ago XDAO: Factory  Contract Creation0 FTM
0x2757ff5cbe36ad491e6f182b52a2cb6147a809cbc715bc86f5f497f3436bfefe527826382022-12-24 6:21:2235 days 4 hrs ago XDAO: Factory  Contract Creation0 FTM
0xa5c3b451c442b23bf14c72df2c4e928957c406bfc63763a07e5ea17be5f38d8f515090522022-11-27 13:44:4061 days 21 hrs ago XDAO: Factory  Contract Creation0 FTM
0xcb9e9b98d02e8667abd352cc724ea626bf032498822d28096e57fb0bc8cd6fbc513606972022-11-23 23:18:4465 days 11 hrs ago XDAO: Factory  Contract Creation0 FTM
0x65074ee0fbb074dc90c521d3ee417994e636ff11d0da7f83e5667bdfd47f277f482185262022-10-02 4:52:42118 days 6 hrs ago XDAO: Factory  Contract Creation0 FTM
0xf3e099c4f0217da9a50a7d97aa7109c6797b179be7790d7ecf1d934c94e382b5461196902022-09-01 7:30:33149 days 3 hrs ago XDAO: Factory  Contract Creation0 FTM
0xbb6c0414ac8de5f2111fedc8ec53db971ebb62427070195242fe5fa5fd06cf60445423412022-08-09 12:09:23171 days 22 hrs ago XDAO: Factory  Contract Creation0 FTM
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Factory

Compiler Version
v0.8.6+commit.11564f7e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 15 : Factory.sol
/*
██   ██ ██████   █████   ██████      ███████  █████   ██████ ████████  ██████  ██████  ██    ██ 
 ██ ██  ██   ██ ██   ██ ██    ██     ██      ██   ██ ██         ██    ██    ██ ██   ██  ██  ██  
  ███   ██   ██ ███████ ██    ██     █████   ███████ ██         ██    ██    ██ ██████    ████   
 ██ ██  ██   ██ ██   ██ ██    ██     ██      ██   ██ ██         ██    ██    ██ ██   ██    ██    
██   ██ ██████  ██   ██  ██████      ██      ██   ██  ██████    ██     ██████  ██   ██    ██    
*/
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity ^0.8.6;

import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";

import "./Dao.sol";

contract Factory is Ownable {
    using EnumerableSet for EnumerableSet.AddressSet;
    using SafeERC20 for IERC20;

    address public immutable shop;

    address public immutable xdao;

    mapping(address => uint256) public subscriptions;

    uint256 public monthlyCost;

    uint256 public freeTrial;

    function subscribe(address _dao) external returns (bool) {
        require(daos.contains(_dao));

        if (subscriptions[_dao] < block.timestamp) {
            subscriptions[_dao] = block.timestamp + 30 days;
        } else {
            subscriptions[_dao] += 30 days;
        }

        IERC20(xdao).safeTransferFrom(msg.sender, owner(), monthlyCost);

        return true;
    }

    function changeMonthlyCost(uint256 _m) external onlyOwner returns (bool) {
        monthlyCost = _m;

        return true;
    }

    function changeFreeTrial(uint256 _freeTrial)
        external
        onlyOwner
        returns (bool)
    {
        freeTrial = _freeTrial;

        return true;
    }

    event DaoCreated(address indexed dao);

    constructor(address _shop, address _xdao) {
        shop = _shop;
        xdao = _xdao;
    }

    EnumerableSet.AddressSet private daos;

    function create(
        string memory _daoName,
        string memory _daoSymbol,
        uint8 _quorum,
        address[] memory _partners,
        uint256[] memory _shares
    ) external returns (bool) {
        Dao dao = new Dao(_daoName, _daoSymbol, _quorum, _partners, _shares);

        subscriptions[address(dao)] = block.timestamp + freeTrial;

        require(daos.add(address(dao)));

        emit DaoCreated(address(dao));

        return true;
    }

    /*----VIEW FUNCTIONS---------------------------------*/

    function daoAt(uint256 _i) external view returns (address) {
        return daos.at(_i);
    }

    function containsDao(address _dao) external view returns (bool) {
        return daos.contains(_dao);
    }

    function numberOfDaos() external view returns (uint256) {
        return daos.length();
    }

    function getDaos() external view returns (address[] memory) {
        uint256 daosLength = daos.length();

        if (daosLength == 0) {
            return new address[](0);
        } else {
            address[] memory daosArray = new address[](daosLength);

            for (uint256 i = 0; i < daosLength; i++) {
                daosArray[i] = daos.at(i);
            }

            return daosArray;
        }
    }
}

File 2 of 15 : EnumerableSet.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;
        // Position of the value in the `values` array, plus 1 because index 0
        // means a value is not in the set.
        mapping(bytes32 => uint256) _indexes;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function _add(Set storage set, bytes32 value) private returns (bool) {
        if (!_contains(set, value)) {
            set._values.push(value);
            // The value is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            set._indexes[value] = set._values.length;
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function _remove(Set storage set, bytes32 value) private returns (bool) {
        // We read and store the value's index to prevent multiple reads from the same storage slot
        uint256 valueIndex = set._indexes[value];

        if (valueIndex != 0) {
            // Equivalent to contains(set, value)
            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in
            // the array, and then remove the last element (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 toDeleteIndex = valueIndex - 1;
            uint256 lastIndex = set._values.length - 1;

            if (lastIndex != toDeleteIndex) {
                bytes32 lastvalue = set._values[lastIndex];

                // Move the last value to the index where the value to delete is
                set._values[toDeleteIndex] = lastvalue;
                // Update the index for the moved value
                set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex
            }

            // Delete the slot where the moved value was stored
            set._values.pop();

            // Delete the index for the deleted slot
            delete set._indexes[value];

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function _contains(Set storage set, bytes32 value) private view returns (bool) {
        return set._indexes[value] != 0;
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function _length(Set storage set) private view returns (uint256) {
        return set._values.length;
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function _at(Set storage set, uint256 index) private view returns (bytes32) {
        return set._values[index];
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _add(set._inner, value);
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _remove(set._inner, value);
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
        return _contains(set._inner, value);
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(Bytes32Set storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
        return _at(set._inner, index);
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(AddressSet storage set, address value) internal returns (bool) {
        return _add(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(AddressSet storage set, address value) internal returns (bool) {
        return _remove(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(AddressSet storage set, address value) internal view returns (bool) {
        return _contains(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(AddressSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(AddressSet storage set, uint256 index) internal view returns (address) {
        return address(uint160(uint256(_at(set._inner, index))));
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(UintSet storage set, uint256 value) internal returns (bool) {
        return _add(set._inner, bytes32(value));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(UintSet storage set, uint256 value) internal returns (bool) {
        return _remove(set._inner, bytes32(value));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(UintSet storage set, uint256 value) internal view returns (bool) {
        return _contains(set._inner, bytes32(value));
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(UintSet storage set, uint256 index) internal view returns (uint256) {
        return uint256(_at(set._inner, index));
    }
}

File 3 of 15 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

File 4 of 15 : 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 5 of 15 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 6 of 15 : Dao.sol
/*
██   ██ ██████   █████   ██████      ██████   █████   ██████  
 ██ ██  ██   ██ ██   ██ ██    ██     ██   ██ ██   ██ ██    ██ 
  ███   ██   ██ ███████ ██    ██     ██   ██ ███████ ██    ██ 
 ██ ██  ██   ██ ██   ██ ██    ██     ██   ██ ██   ██ ██    ██ 
██   ██ ██████  ██   ██  ██████      ██████  ██   ██  ██████  
*/
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity ^0.8.6;

import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";

import "../interfaces/ILP.sol";
import "../interfaces/IAdapter.sol";
import "../interfaces/IFactory.sol";

contract Dao is ReentrancyGuard, ERC20 {
    using EnumerableSet for EnumerableSet.AddressSet;
    using SafeERC20 for IERC20;
    using Address for address;
    using Address for address payable;
    using ECDSA for bytes32;

    uint32 public constant VOTING_DURATION = 3 days;

    /*----STATE------------------------------------------*/

    // These addresses can rule without voting
    EnumerableSet.AddressSet private permitted;

    // These contracts help burn LP's
    EnumerableSet.AddressSet private adapters;

    // Factory Address
    address public immutable factory;

    // Shop Address
    address public immutable shop;

    // LP Token Address
    address public lp = address(0);

    // Quorum >=1 <=100
    uint8 public quorum;

    // Executed Voting
    struct ExecutedVoting {
        address target;
        bytes data;
        uint256 value;
        uint256 nonce;
        uint256 timestamp;
        uint256 executionTimestamp;
        bytes32 txHash;
        bytes[] sigs;
    }

    ExecutedVoting[] internal executedVoting;

    mapping(bytes32 => bool) public executedTx;

    struct ExecutedPermitted {
        address target;
        bytes data;
        uint256 value;
        uint256 executionTimestamp;
        address executor;
    }

    ExecutedPermitted[] public executedPermitted;

    // GT
    bool public mintable = true;
    bool public burnable = true;

    /*----EVENTS-----------------------------------------*/

    event Executed(
        address indexed target,
        bytes data,
        uint256 value,
        uint256 indexed nonce,
        uint256 timestamp,
        uint256 executionTimestamp,
        bytes32 txHash,
        bytes[] sigs
    );

    event ExecutedP(
        address indexed target,
        bytes data,
        uint256 value,
        address indexed executor
    );

    /*----MODIFIERS--------------------------------------*/

    modifier onlyDao() {
        require(
            msg.sender == address(this),
            "DAO: this function is only for DAO"
        );
        _;
    }

    /*----CONSTRUCTOR------------------------------------*/

    constructor(
        string memory _name,
        string memory _symbol,
        uint8 _quorum,
        address[] memory _partners,
        uint256[] memory _shares
    ) ERC20(_name, _symbol) {
        factory = msg.sender;

        shop = IFactory(msg.sender).shop();

        require(
            _quorum >= 1 && _quorum <= 100,
            "DAO: quorum should be 1 <= q <= 100"
        );

        quorum = _quorum;

        require(
            _partners.length > 0 && _partners.length == _shares.length,
            "DAO: shares distribution is invalid"
        );

        for (uint256 i = 0; i < _partners.length; i++) {
            _mint(_partners[i], _shares[i]);
        }
    }

    /*----MAIN FUNCTIONS TO RULE--------------------------*/

    function executePermitted(
        address _target,
        bytes calldata _data,
        uint256 _value
    ) external nonReentrant returns (bool) {
        require(checkSubscription(), "DAO: subscription not paid");

        require(permitted.contains(msg.sender), "DAO: only for permitted");

        executedPermitted.push(
            ExecutedPermitted({
                target: _target,
                data: _data,
                value: _value,
                executionTimestamp: block.timestamp,
                executor: msg.sender
            })
        );

        emit ExecutedP(_target, _data, _value, msg.sender);

        if (_data.length == 0) {
            payable(_target).sendValue(_value);
        } else {
            if (_value == 0) {
                _target.functionCall(_data);
            } else {
                _target.functionCallWithValue(_data, _value);
            }
        }

        return true;
    }

    function execute(
        address _target,
        bytes calldata _data,
        uint256 _value,
        uint256 _nonce,
        uint256 _timestamp,
        bytes[] memory _sigs
    ) external nonReentrant returns (bool) {
        require(checkSubscription(), "DAO: subscription not paid");

        require(balanceOf(msg.sender) > 0, "DAO: only for members");

        require(
            _timestamp + VOTING_DURATION >= block.timestamp,
            "DAO: voting is over"
        );

        bytes32 txHash = getTxHash(_target, _data, _value, _nonce, _timestamp);

        require(!executedTx[txHash], "DAO: voting already executed");

        require(_checkSigs(_sigs, txHash), "DAO: quorum is not reached");

        executedTx[txHash] = true;

        executedVoting.push(
            ExecutedVoting({
                target: _target,
                data: _data,
                value: _value,
                nonce: _nonce,
                timestamp: _timestamp,
                executionTimestamp: block.timestamp,
                txHash: txHash,
                sigs: _sigs
            })
        );

        emit Executed(
            _target,
            _data,
            _value,
            _nonce,
            _timestamp,
            block.timestamp,
            txHash,
            _sigs
        );

        if (_data.length == 0) {
            payable(_target).sendValue(_value);
        } else {
            if (_value == 0) {
                _target.functionCall(_data);
            } else {
                _target.functionCallWithValue(_data, _value);
            }
        }

        return true;
    }

    function getTxHash(
        address _target,
        bytes calldata _data,
        uint256 _value,
        uint256 _nonce,
        uint256 _timestamp
    ) public view returns (bytes32) {
        return
            keccak256(
                abi.encode(
                    address(this),
                    _target,
                    _data,
                    _value,
                    _nonce,
                    _timestamp,
                    block.chainid
                )
            );
    }

    function _checkSigs(bytes[] memory _sigs, bytes32 _txHash)
        internal
        view
        returns (bool)
    {
        bytes32 ethSignedHash = _txHash.toEthSignedMessageHash();

        uint256 share = 0;

        address[] memory signers = new address[](_sigs.length);

        for (uint256 i = 0; i < _sigs.length; i++) {
            address signer = ethSignedHash.recover(_sigs[i]);

            signers[i] = signer;
        }

        require(!_hasDuplicate(signers), "DAO: signatures are not unique");

        for (uint256 i = 0; i < signers.length; i++) {
            share += balanceOf(signers[i]);
        }

        if (share * 100 < totalSupply() * quorum) {
            return false;
        }

        return true;
    }

    function checkSubscription() public view returns (bool) {
        if (
            IFactory(factory).monthlyCost() > 0 &&
            IFactory(factory).subscriptions(address(this)) < block.timestamp
        ) {
            return false;
        }

        return true;
    }

    /*----BURN LP TOKENS---------------------------------*/

    function burnLp(
        address _recipient,
        uint256 _share,
        address[] memory _tokens,
        address[] memory _adapters,
        address[] memory _pools
    ) external nonReentrant returns (bool) {
        require(lp != address(0), "DAO: LP not set yet");

        require(msg.sender == lp, "DAO: only for LP");

        require(
            !_hasDuplicate(_tokens),
            "DAO: duplicates are prohibited (tokens)"
        );

        for (uint256 i = 0; i < _tokens.length; i++) {
            require(
                _tokens[i] != lp && _tokens[i] != address(this),
                "DAO: LP and GT cannot be part of a share"
            );
        }

        require(_adapters.length == _pools.length, "DAO: adapters error");

        if (_adapters.length > 0) {
            uint256 length = _adapters.length;

            if (length > 1) {
                for (uint256 i = 0; i < length - 1; i++) {
                    for (uint256 j = i + 1; j < length; j++) {
                        require(
                            !(_adapters[i] == _adapters[j] &&
                                _pools[i] == _pools[j]),
                            "DAO: duplicates are prohibited (adapters)"
                        );
                    }
                }
            }
        }

        // ETH

        payable(_recipient).sendValue((address(this).balance * _share) / 1e18);

        // Tokens

        if (_tokens.length > 0) {
            uint256[] memory _tokenShares = new uint256[](_tokens.length);

            for (uint256 i = 0; i < _tokens.length; i++) {
                _tokenShares[i] = ((IERC20(_tokens[i]).balanceOf(
                    address(this)
                ) * _share) / 1e18);
            }

            for (uint256 i = 0; i < _tokens.length; i++) {
                IERC20(_tokens[i]).safeTransfer(_recipient, _tokenShares[i]);
            }
        }

        // Adapters

        if (_adapters.length > 0) {
            uint256 length = _adapters.length;

            for (uint256 i = 0; i < length; i++) {
                require(
                    adapters.contains(_adapters[i]),
                    "DAO: this is not an adapter"
                );

                require(
                    permitted.contains(_adapters[i]),
                    "DAO: this adapter is not permitted"
                );

                bool b = IAdapter(_adapters[i]).withdraw(
                    _recipient,
                    _pools[i],
                    _share
                );

                require(b, "DAO: withdrawal error");
            }
        }

        return true;
    }

    /*----GT MANAGEMENT----------------------------------*/

    function mint(address _to, uint256 _amount)
        external
        onlyDao
        returns (bool)
    {
        require(mintable, "DAO: GT minting is disabled");
        _mint(_to, _amount);
        return true;
    }

    function burn(address _to, uint256 _amount)
        external
        onlyDao
        returns (bool)
    {
        require(burnable, "DAO: GT burning is disabled");
        _burn(_to, _amount);
        return true;
    }

    function move(
        address _sender,
        address _recipient,
        uint256 _amount
    ) external onlyDao returns (bool) {
        _transfer(_sender, _recipient, _amount);
        return true;
    }

    function disableMinting() external onlyDao returns (bool) {
        mintable = false;
        return true;
    }

    function disableBurning() external onlyDao returns (bool) {
        burnable = false;
        return true;
    }

    /*----ADAPTERS & PERMITTED---------------------------*/

    function addAdapter(address a) external onlyDao returns (bool) {
        require(adapters.add(a), "DAO: already an adapter");

        permitted.add(a);

        return true;
    }

    function removeAdapter(address a) external onlyDao returns (bool) {
        require(adapters.remove(a), "DAO: not an adapter");

        permitted.remove(a);

        return true;
    }

    function addPermitted(address p) external onlyDao returns (bool) {
        require(permitted.add(p), "DAO: already permitted");

        return true;
    }

    function removePermitted(address p) external onlyDao returns (bool) {
        require(permitted.remove(p), "DAO: not a permitted");

        return true;
    }

    /*----LP---------------------------------------------*/

    function setLp(address _lp) external returns (bool) {
        require(lp == address(0), "DAO: LP address has already been set");

        require(msg.sender == shop, "DAO: only Shop can set LP");

        lp = _lp;

        return true;
    }

    /*----QUORUM-----------------------------------------*/

    function changeQuorum(uint8 _q) external onlyDao returns (bool) {
        require(_q >= 1 && _q <= 100, "DAO: quorum should be 1 <= q <= 100");

        quorum = _q;

        return true;
    }

    /*----VIEW FUNCTIONS---------------------------------*/

    function executedVotingByIndex(uint256 _index)
        external
        view
        returns (ExecutedVoting memory)
    {
        return executedVoting[_index];
    }

    function getExecutedVoting()
        external
        view
        returns (ExecutedVoting[] memory)
    {
        return executedVoting;
    }

    function getExecutedPermitted()
        external
        view
        returns (ExecutedPermitted[] memory)
    {
        return executedPermitted;
    }

    function numberOfAdapters() external view returns (uint256) {
        return adapters.length();
    }

    function containsAdapter(address a) external view returns (bool) {
        return adapters.contains(a);
    }

    function getAdapters() external view returns (address[] memory) {
        uint256 adaptersLength = adapters.length();

        if (adaptersLength == 0) {
            return new address[](0);
        } else {
            address[] memory adaptersArray = new address[](adaptersLength);

            for (uint256 i = 0; i < adaptersLength; i++) {
                adaptersArray[i] = adapters.at(i);
            }

            return adaptersArray;
        }
    }

    function numberOfPermitted() external view returns (uint256) {
        return permitted.length();
    }

    function containsPermitted(address p) external view returns (bool) {
        return permitted.contains(p);
    }

    function getPermitted() external view returns (address[] memory) {
        uint256 permittedLength = permitted.length();

        if (permittedLength == 0) {
            return new address[](0);
        } else {
            address[] memory permittedArray = new address[](permittedLength);

            for (uint256 i = 0; i < permittedLength; i++) {
                permittedArray[i] = permitted.at(i);
            }

            return permittedArray;
        }
    }

    /*----PURE FUNCTIONS---------------------------------*/

    function _hasDuplicate(address[] memory A) internal pure returns (bool) {
        if (A.length <= 1) {
            return false;
        } else {
            for (uint256 i = 0; i < A.length - 1; i++) {
                address current = A[i];
                for (uint256 j = i + 1; j < A.length; j++) {
                    if (current == A[j]) {
                        return true;
                    }
                }
            }
        }

        return false;
    }

    function transfer(address, uint256) public pure override returns (bool) {
        revert("GT: transfer is prohibited");
    }

    function transferFrom(
        address,
        address,
        uint256
    ) public pure override returns (bool) {
        revert("GT: transferFrom is prohibited");
    }

    /*----RECEIVE ETH------------------------------------*/

    event Received(address indexed, uint256);

    receive() external payable {
        emit Received(msg.sender, msg.value);
    }
}

File 7 of 15 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/*
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

File 8 of 15 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) private pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 9 of 15 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

File 10 of 15 : ECDSA.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
 *
 * These functions can be used to verify that a message was signed by the holder
 * of the private keys of a given address.
 */
library ECDSA {
    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature`. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     *
     * Documentation for signature generation:
     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        // Check the signature length
        // - case 65: r,s,v signature (standard)
        // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._
        if (signature.length == 65) {
            bytes32 r;
            bytes32 s;
            uint8 v;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            assembly {
                r := mload(add(signature, 0x20))
                s := mload(add(signature, 0x40))
                v := byte(0, mload(add(signature, 0x60)))
            }
            return recover(hash, v, r, s);
        } else if (signature.length == 64) {
            bytes32 r;
            bytes32 vs;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            assembly {
                r := mload(add(signature, 0x20))
                vs := mload(add(signature, 0x40))
            }
            return recover(hash, r, vs);
        } else {
            revert("ECDSA: invalid signature length");
        }
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `r` and `vs` short-signature fields separately.
     *
     * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
     *
     * _Available since v4.2._
     */
    function recover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address) {
        bytes32 s;
        uint8 v;
        assembly {
            s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)
            v := add(shr(255, vs), 27)
        }
        return recover(hash, v, r, s);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `v`, `r` and `s` signature fields separately.
     */
    function recover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address) {
        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
        // the valid range for s in (281): 0 < s < secp256k1n ÷ 2 + 1, and for v in (282): v ∈ {27, 28}. Most
        // signatures from current libraries generate a unique signature with an s-value in the lower half order.
        //
        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
        // these malleable signatures as well.
        require(
            uint256(s) <= 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0,
            "ECDSA: invalid signature 's' value"
        );
        require(v == 27 || v == 28, "ECDSA: invalid signature 'v' value");

        // If the signature is valid (and not malleable), return the signer address
        address signer = ecrecover(hash, v, r, s);
        require(signer != address(0), "ECDSA: invalid signature");

        return signer;
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from a `hash`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
        // 32 is the length in bytes of hash,
        // enforced by the type signature above
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
    }

    /**
     * @dev Returns an Ethereum Signed Typed Data, created from a
     * `domainSeparator` and a `structHash`. This produces hash corresponding
     * to the one signed with the
     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
     * JSON-RPC method as part of EIP-712.
     *
     * See {recover}.
     */
    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
    }
}

File 11 of 15 : ERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC20.sol";
import "./extensions/IERC20Metadata.sol";
import "../../utils/Context.sol";

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin guidelines: functions revert instead
 * of returning `false` on failure. This behavior is nonetheless conventional
 * and does not conflict with the expectations of ERC20 applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20 is Context, IERC20, IERC20Metadata {
    mapping(address => uint256) private _balances;

    mapping(address => mapping(address => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * The default value of {decimals} is 18. To select a different value for
     * {decimals} you should overload it.
     *
     * All two of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5,05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless this function is
     * overridden;
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual override returns (uint8) {
        return 18;
    }

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual override returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `recipient` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        _approve(_msgSender(), spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * Requirements:
     *
     * - `sender` and `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     * - the caller must have allowance for ``sender``'s tokens of at least
     * `amount`.
     */
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) public virtual override returns (bool) {
        _transfer(sender, recipient, amount);

        uint256 currentAllowance = _allowances[sender][_msgSender()];
        require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance");
        unchecked {
            _approve(sender, _msgSender(), currentAllowance - amount);
        }

        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        uint256 currentAllowance = _allowances[_msgSender()][spender];
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(_msgSender(), spender, currentAllowance - subtractedValue);
        }

        return true;
    }

    /**
     * @dev Moves `amount` of tokens from `sender` to `recipient`.
     *
     * This internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `sender` cannot be the zero address.
     * - `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     */
    function _transfer(
        address sender,
        address recipient,
        uint256 amount
    ) internal virtual {
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(sender, recipient, amount);

        uint256 senderBalance = _balances[sender];
        require(senderBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[sender] = senderBalance - amount;
        }
        _balances[recipient] += amount;

        emit Transfer(sender, recipient, amount);

        _afterTokenTransfer(sender, recipient, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply += amount;
        _balances[account] += amount;
        emit Transfer(address(0), account, amount);

        _afterTokenTransfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        uint256 accountBalance = _balances[account];
        require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
        unchecked {
            _balances[account] = accountBalance - amount;
        }
        _totalSupply -= amount;

        emit Transfer(account, address(0), amount);

        _afterTokenTransfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * has been transferred to `to`.
     * - when `from` is zero, `amount` tokens have been minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens have been burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}
}

File 12 of 15 : ILP.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.6;

interface ILP {
    function name() external view returns (string memory);

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

    function burn(address _to, uint256 _amount) external returns (bool);

    function mint(address _to, uint256 _amount) external returns (bool);

    function mintable() external view returns (bool);

    function burnable() external view returns (bool);

    function mintableStatusFrozen() external view returns (bool);

    function burnableStatusFrozen() external view returns (bool);
}

File 13 of 15 : IAdapter.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.6;

interface IAdapter {
    function withdraw(
        address _recipient,
        address _pool,
        uint256 _share // multiplied by 1e18, for example 20% = 2e17
    ) external returns (bool);
}

File 14 of 15 : IFactory.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.6;

interface IFactory {
    function getDaos() external view returns (address[] memory);

    function shop() external view returns (address);

    function monthlyCost() external view returns (uint256);

    function subscriptions(address _dao) external view returns (uint256);

    function containsDao(address _dao) external view returns (bool);
}

File 15 of 15 : IERC20Metadata.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC20.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the symbol of the token.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_shop","type":"address"},{"internalType":"address","name":"_xdao","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"dao","type":"address"}],"name":"DaoCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"uint256","name":"_freeTrial","type":"uint256"}],"name":"changeFreeTrial","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_m","type":"uint256"}],"name":"changeMonthlyCost","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_dao","type":"address"}],"name":"containsDao","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_daoName","type":"string"},{"internalType":"string","name":"_daoSymbol","type":"string"},{"internalType":"uint8","name":"_quorum","type":"uint8"},{"internalType":"address[]","name":"_partners","type":"address[]"},{"internalType":"uint256[]","name":"_shares","type":"uint256[]"}],"name":"create","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_i","type":"uint256"}],"name":"daoAt","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"freeTrial","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDaos","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"monthlyCost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"numberOfDaos","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"shop","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_dao","type":"address"}],"name":"subscribe","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"subscriptions","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"xdao","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

60c060405234801561001057600080fd5b5060405162005f3638038062005f36833981016040819052610031916100c4565b61003a33610058565b6001600160601b0319606092831b8116608052911b1660a0526100f7565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b03811681146100bf57600080fd5b919050565b600080604083850312156100d757600080fd5b6100e0836100a8565b91506100ee602084016100a8565b90509250929050565b60805160601c60a05160601c615e0c6200012a600039600081816101f40152610393015260006101200152615e0c6000f3fe60806040523480156200001157600080fd5b5060043610620001155760003560e01c8063862bb2bd11620000a3578063b2dabed4116200006e578063b2dabed41462000258578063df4f1410146200026f578063f046395a1462000286578063f2fde38b14620002a957600080fd5b8063862bb2bd14620001ee5780638da5cb5b146200021657806396d054e51462000228578063a1d36ce7146200023f57600080fd5b806355a569d711620000e457806355a569d714620001b75780635bb4d1a114620001ce5780636d61d1f514620001d8578063715018a614620001e257600080fd5b80630881fa0d146200011a57806324f2ff16146200015f57806341a7726a14620001785780634349de9014620001a0575b600080fd5b620001427f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b62000169620002c0565b60405190815260200162000156565b6200018f6200018936600462000c55565b620002d3565b604051901515815260200162000156565b6200018f620001b136600462000d6d565b620003c4565b6200018f620001c836600462000c97565b62000409565b6200016960035481565b6200016960025481565b620001ec620004d0565b005b620001427f000000000000000000000000000000000000000000000000000000000000000081565b6000546001600160a01b031662000142565b6200018f6200023936600462000c55565b6200050b565b6200024962000520565b60405162000156919062000e19565b620001426200026936600462000d6d565b620005f9565b6200018f6200028036600462000d6d565b62000608565b620001696200029736600462000c55565b60016020526000908152604090205481565b620001ec620002ba36600462000c55565b6200063f565b6000620002ce6004620006e1565b905090565b6000620002e2600483620006ec565b620002ec57600080fd5b6001600160a01b0382166000908152600160205260409020544211156200033b576200031c4262278d0062000f63565b6001600160a01b0383166000908152600160205260409020556200036e565b6001600160a01b0382166000908152600160205260408120805462278d0092906200036890849062000f63565b90915550505b620003bc33620003866000546001600160a01b031690565b6002546001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001692919062000711565b506001919050565b600080546001600160a01b03163314620003fb5760405162461bcd60e51b8152600401620003f29062000ed3565b60405180910390fd5b50600381905560015b919050565b60008086868686866040516200041f9062000ace565b6200042f95949392919062000e43565b604051809103906000f0801580156200044c573d6000803e3d6000fd5b509050600354426200045f919062000f63565b6001600160a01b0382166000908152600160205260409020556200048560048262000773565b6200048f57600080fd5b6040516001600160a01b038216907f87fc1796dbc913ab997ce574688bcad88f5eb317373be9ec71de2bde33e5c83090600090a25060019695505050505050565b6000546001600160a01b03163314620004fd5760405162461bcd60e51b8152600401620003f29062000ed3565b6200050960006200078a565b565b60006200051a600483620006ec565b92915050565b60606000620005306004620006e1565b9050806200054c57505060408051600081526020810190915290565b60008167ffffffffffffffff8111156200056a576200056a62000ff7565b60405190808252806020026020018201604052801562000594578160200160208202803683370190505b50905060005b82811015620005f257620005b0600482620007da565b828281518110620005c557620005c562000fe1565b6001600160a01b039092166020928302919091019091015280620005e98162000fad565b9150506200059a565b5092915050565b60006200051a600483620007da565b600080546001600160a01b03163314620006365760405162461bcd60e51b8152600401620003f29062000ed3565b50600255600190565b6000546001600160a01b031633146200066c5760405162461bcd60e51b8152600401620003f29062000ed3565b6001600160a01b038116620006d35760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401620003f2565b620006de816200078a565b50565b60006200051a825490565b6001600160a01b038116600090815260018301602052604081205415155b9392505050565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b1790526200076d908590620007e8565b50505050565b60006200070a836001600160a01b038416620008c6565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006200070a838362000918565b60006200083f826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316620009459092919063ffffffff16565b805190915015620008c1578080602001905181019062000860919062000c73565b620008c15760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401620003f2565b505050565b60008181526001830160205260408120546200090f575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556200051a565b5060006200051a565b600082600001828154811062000932576200093262000fe1565b9060005260206000200154905092915050565b60606200095684846000856200095e565b949350505050565b606082471015620009c15760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401620003f2565b843b62000a115760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401620003f2565b600080866001600160a01b0316858760405162000a2f919062000dfb565b60006040518083038185875af1925050503d806000811462000a6e576040519150601f19603f3d011682016040523d82523d6000602084013e62000a73565b606091505b509150915062000a8582828662000a90565b979650505050505050565b6060831562000aa15750816200070a565b82511562000ab25782518084602001fd5b8160405162461bcd60e51b8152600401620003f2919062000e2e565b614dc9806200100e83390190565b80356001600160a01b03811681146200040457600080fd5b600082601f83011262000b0657600080fd5b8135602062000b1f62000b198362000f3c565b62000f08565b80838252828201915082860187848660051b890101111562000b4057600080fd5b60005b8581101562000b6a5762000b578262000adc565b8452928401929084019060010162000b43565b5090979650505050505050565b600082601f83011262000b8957600080fd5b8135602062000b9c62000b198362000f3c565b80838252828201915082860187848660051b890101111562000bbd57600080fd5b60005b8581101562000b6a5781358452928401929084019060010162000bc0565b600082601f83011262000bf057600080fd5b813567ffffffffffffffff81111562000c0d5762000c0d62000ff7565b62000c22601f8201601f191660200162000f08565b81815284602083860101111562000c3857600080fd5b816020850160208301376000918101602001919091529392505050565b60006020828403121562000c6857600080fd5b6200070a8262000adc565b60006020828403121562000c8657600080fd5b815180151581146200070a57600080fd5b600080600080600060a0868803121562000cb057600080fd5b853567ffffffffffffffff8082111562000cc957600080fd5b62000cd789838a0162000bde565b9650602088013591508082111562000cee57600080fd5b62000cfc89838a0162000bde565b95506040880135915060ff8216821462000d1557600080fd5b9093506060870135908082111562000d2c57600080fd5b62000d3a89838a0162000af4565b9350608088013591508082111562000d5157600080fd5b5062000d608882890162000b77565b9150509295509295909350565b60006020828403121562000d8057600080fd5b5035919050565b600081518084526020808501945080840160005b8381101562000dc25781516001600160a01b03168752958201959082019060010162000d9b565b509495945050505050565b6000815180845262000de781602086016020860162000f7e565b601f01601f19169290920160200192915050565b6000825162000e0f81846020870162000f7e565b9190910192915050565b6020815260006200070a602083018462000d87565b6020815260006200070a602083018462000dcd565b60a08152600062000e5860a083018862000dcd565b60208382038185015262000e6d828962000dcd565b915060ff87166040850152838203606085015262000e8c828762000d87565b8481036080860152855180825282870193509082019060005b8181101562000ec35784518352938301939183019160010162000ea5565b50909a9950505050505050505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b604051601f8201601f1916810167ffffffffffffffff8111828210171562000f345762000f3462000ff7565b604052919050565b600067ffffffffffffffff82111562000f595762000f5962000ff7565b5060051b60200190565b6000821982111562000f795762000f7962000fcb565b500190565b60005b8381101562000f9b57818101518382015260200162000f81565b838111156200076d5750506000910152565b600060001982141562000fc45762000fc462000fcb565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fdfe60c0604052600a80546001600160a01b0319169055600e805461ffff19166101011790553480156200003057600080fd5b5060405162004dc938038062004dc98339810160408190526200005391620005d4565b6001600055845185908590620000719060049060208501906200036d565b508051620000879060059060208401906200036d565b50505033606081901b60805260408051630881fa0d60e01b81529051630881fa0d91600480820192602092909190829003018186803b158015620000ca57600080fd5b505afa158015620000df573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001059190620005af565b60601b6001600160601b03191660a052600160ff8416108015906200012e575060648360ff1611155b6200018c5760405162461bcd60e51b815260206004820152602360248201527f44414f3a2071756f72756d2073686f756c642062652031203c3d2071203c3d2060448201526203130360ec1b60648201526084015b60405180910390fd5b600a805460ff60a01b1916600160a01b60ff861602179055815115801590620001b6575080518251145b620002105760405162461bcd60e51b815260206004820152602360248201527f44414f3a2073686172657320646973747269627574696f6e20697320696e76616044820152621b1a5960ea1b606482015260840162000183565b60005b82518110156200027c57620002678382815181106200023657620002366200078d565b60200260200101518383815181106200025357620002536200078d565b60200260200101516200028860201b60201c565b80620002738162000759565b91505062000213565b505050505050620007b9565b6001600160a01b038216620002e05760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640162000183565b8060036000828254620002f4919062000701565b90915550506001600160a01b038216600090815260016020526040812080548392906200032390849062000701565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b8280546200037b906200071c565b90600052602060002090601f0160209004810192826200039f5760008555620003ea565b82601f10620003ba57805160ff1916838001178555620003ea565b82800160010185558215620003ea579182015b82811115620003ea578251825591602001919060010190620003cd565b50620003f8929150620003fc565b5090565b5b80821115620003f85760008155600101620003fd565b80516001600160a01b03811681146200042b57600080fd5b919050565b600082601f8301126200044257600080fd5b815160206200045b6200045583620006db565b620006a8565b80838252828201915082860187848660051b89010111156200047c57600080fd5b60005b85811015620004a657620004938262000413565b845292840192908401906001016200047f565b5090979650505050505050565b600082601f830112620004c557600080fd5b81516020620004d86200045583620006db565b80838252828201915082860187848660051b8901011115620004f957600080fd5b60005b85811015620004a657815184529284019290840190600101620004fc565b600082601f8301126200052c57600080fd5b81516001600160401b03811115620005485762000548620007a3565b60206200055e601f8301601f19168201620006a8565b82815285828487010111156200057357600080fd5b60005b838110156200059357858101830151828201840152820162000576565b83811115620005a55760008385840101525b5095945050505050565b600060208284031215620005c257600080fd5b620005cd8262000413565b9392505050565b600080600080600060a08688031215620005ed57600080fd5b85516001600160401b03808211156200060557600080fd5b6200061389838a016200051a565b965060208801519150808211156200062a57600080fd5b6200063889838a016200051a565b95506040880151915060ff821682146200065157600080fd5b6060880151919450808211156200066757600080fd5b6200067589838a0162000430565b935060808801519150808211156200068c57600080fd5b506200069b88828901620004b3565b9150509295509295909350565b604051601f8201601f191681016001600160401b0381118282101715620006d357620006d3620007a3565b604052919050565b60006001600160401b03821115620006f757620006f7620007a3565b5060051b60200190565b6000821982111562000717576200071762000777565b500190565b600181811c908216806200073157607f821691505b602082108114156200075357634e487b7160e01b600052602260045260246000fd5b50919050565b600060001982141562000770576200077062000777565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b60805160601c60a05160601c6145cf620007fa6000396000818161032001526120830152600081816107c4015281816112d7015261138501526145cf6000f3fe6080604052600436106102765760003560e01c806360d54d411161014f578063a457c2d7116100c1578063cdb2c0421161007a578063cdb2c042146107e6578063d1e3002514610816578063d293aba414610836578063dd62ed3e14610856578063f4c2baa91461089c578063fba4e62e146108bc57600080fd5b8063a457c2d71461071d578063a9059cbb1461073d578063aafd338b1461075d578063b82e16e31461077d578063bb35783b14610792578063c45a0155146107b257600080fd5b806393435d501161011357806393435d501461066857806395d89b411461068857806398603cca1461069d5780639dc29fac146106b2578063a07c7ce4146106d2578063a438d208146106f157600080fd5b806360d54d41146105c65780636e2e9c18146105e657806370a08231146105fb57806372376b8d146106315780637e5cd5c11461065357600080fd5b8063313c06a0116101e857806340c10f19116101ac57806340c10f19146105205780634a1d18ce146105405780634bf365df146105625780634faa2e7b1461057c57806356d6b2d014610591578063585cd34b146105a657600080fd5b8063313c06a01461048c578063313ce567146104ac5780633372358f146104c057806339509351146104e05780633d4581831461050057600080fd5b806314197ed01161023a57806314197ed01461039a5780631703a018146103c757806318160ddd146103fa5780631854063d1461041957806323b872dd1461043b578063251664d41461045b57600080fd5b806305cf79b9146102b757806306fdde03146102ec5780630881fa0d1461030e578063095ea7b31461035a5780630c9562441461037a57600080fd5b366102b25760405134815233907f88a5966d370b9919b20f3e2c13ff65706f196a4e32cc2c12bf57088f885258749060200160405180910390a2005b600080fd5b3480156102c357600080fd5b506102d76102d2366004613f7c565b6108dc565b60405190151581526020015b60405180910390f35b3480156102f857600080fd5b50610301610997565b6040516102e39190614334565b34801561031a57600080fd5b506103427f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016102e3565b34801561036657600080fd5b506102d7610375366004613e5c565b610a29565b34801561038657600080fd5b506102d7610395366004613b8a565b610a40565b3480156103a657600080fd5b506103ba6103b5366004613f4a565b610a4d565b6040516102e391906143c0565b3480156103d357600080fd5b50600a546103e890600160a01b900460ff1681565b60405160ff90911681526020016102e3565b34801561040657600080fd5b506003545b6040519081526020016102e3565b34801561042557600080fd5b5061042e610c88565b6040516102e3919061416e565b34801561044757600080fd5b506102d7610456366004613bd8565b610d73565b34801561046757600080fd5b5061047b610476366004613f4a565b610dbe565b6040516102e395949392919061412d565b34801561049857600080fd5b50600a54610342906001600160a01b031681565b3480156104b857600080fd5b5060126103e8565b3480156104cc57600080fd5b5061040b6104db366004613c6d565b610e9d565b3480156104ec57600080fd5b506102d76104fb366004613e5c565b610ee0565b34801561050c57600080fd5b506102d761051b366004613b8a565b610f1c565b34801561052c57600080fd5b506102d761053b366004613e5c565b610f29565b34801561054c57600080fd5b50610555610fa6565b6040516102e39190614262565b34801561056e57600080fd5b50600e546102d79060ff1681565b34801561058857600080fd5b5061040b6111b9565b34801561059d57600080fd5b5061040b6111ca565b3480156105b257600080fd5b506102d76105c1366004613b8a565b6111d6565b3480156105d257600080fd5b506102d76105e1366004613b8a565b61124f565b3480156105f257600080fd5b506102d76112d2565b34801561060757600080fd5b5061040b610616366004613b8a565b6001600160a01b031660009081526001602052604090205490565b34801561063d57600080fd5b5061064661141a565b6040516102e391906141bb565b34801561065f57600080fd5b506102d7611545565b34801561067457600080fd5b506102d7610683366004613b8a565b611576565b34801561069457600080fd5b506103016115ed565b3480156106a957600080fd5b506102d76115fc565b3480156106be57600080fd5b506102d76106cd366004613e5c565b61162e565b3480156106de57600080fd5b50600e546102d790610100900460ff1681565b3480156106fd57600080fd5b506107086203f48081565b60405163ffffffff90911681526020016102e3565b34801561072957600080fd5b506102d7610738366004613e5c565b6116b0565b34801561074957600080fd5b506102d7610758366004613e5c565b611749565b34801561076957600080fd5b506102d7610778366004613b8a565b611794565b34801561078957600080fd5b5061042e611805565b34801561079e57600080fd5b506102d76107ad366004613bd8565b6118b9565b3480156107be57600080fd5b506103427f000000000000000000000000000000000000000000000000000000000000000081565b3480156107f257600080fd5b506102d7610801366004613f4a565b600c6020526000908152604090205460ff1681565b34801561082257600080fd5b506102d7610831366004613cd9565b6118ec565b34801561084257600080fd5b506102d7610851366004613c14565b611d35565b34801561086257600080fd5b5061040b610871366004613ba5565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b3480156108a857600080fd5b506102d76108b7366004613b8a565b612010565b3480156108c857600080fd5b506102d76108d7366004613e86565b612116565b60003330146109065760405162461bcd60e51b81526004016108fd90614347565b60405180910390fd5b60018260ff161015801561091e575060648260ff1611155b6109765760405162461bcd60e51b815260206004820152602360248201527f44414f3a2071756f72756d2073686f756c642062652031203c3d2071203c3d2060448201526203130360ec1b60648201526084016108fd565b50600a805460ff60a01b1916600160a01b60ff84160217905560015b919050565b6060600480546109a6906144c2565b80601f01602080910402602001604051908101604052809291908181526020018280546109d2906144c2565b8015610a1f5780601f106109f457610100808354040283529160200191610a1f565b820191906000526020600020905b815481529060010190602001808311610a0257829003601f168201915b5050505050905090565b6000610a363384846128f9565b5060015b92915050565b6000610a3a600683612a1e565b610aa160405180610100016040528060006001600160a01b03168152602001606081526020016000815260200160008152602001600081526020016000815260200160008019168152602001606081525090565b600b8281548110610ab457610ab4614544565b600091825260209182902060408051610100810190915260089092020180546001600160a01b031682526001810180549293919291840191610af5906144c2565b80601f0160208091040260200160405190810160405280929190818152602001828054610b21906144c2565b8015610b6e5780601f10610b4357610100808354040283529160200191610b6e565b820191906000526020600020905b815481529060010190602001808311610b5157829003601f168201915b50505050508152602001600282015481526020016003820154815260200160048201548152602001600582015481526020016006820154815260200160078201805480602002602001604051908101604052809291908181526020016000905b82821015610c7a578382906000526020600020018054610bed906144c2565b80601f0160208091040260200160405190810160405280929190818152602001828054610c19906144c2565b8015610c665780601f10610c3b57610100808354040283529160200191610c66565b820191906000526020600020905b815481529060010190602001808311610c4957829003601f168201915b505050505081526020019060010190610bce565b505050915250909392505050565b60606000610c966006612a40565b905080610cd05760005b604051908082528060200260200182016040528015610cc9578160200160208202803683370190505b5091505090565b6000816001600160401b03811115610cea57610cea61455a565b604051908082528060200260200182016040528015610d13578160200160208202803683370190505b50905060005b82811015610d6857610d2c600682612a4a565b828281518110610d3e57610d3e614544565b6001600160a01b039092166020928302919091019091015280610d60816144fd565b915050610d19565b5092915050565b5090565b60405162461bcd60e51b815260206004820152601e60248201527f47543a207472616e7366657246726f6d2069732070726f68696269746564000060448201526000906064016108fd565b600d8181548110610dce57600080fd5b6000918252602090912060059091020180546001820180546001600160a01b03909216935090610dfd906144c2565b80601f0160208091040260200160405190810160405280929190818152602001828054610e29906144c2565b8015610e765780601f10610e4b57610100808354040283529160200191610e76565b820191906000526020600020905b815481529060010190602001808311610e5957829003601f168201915b5050505060028301546003840154600490940154929390929091506001600160a01b031685565b60003087878787878746604051602001610ebe9897969594939291906140d9565b6040516020818303038152906040528051906020012090509695505050505050565b3360008181526002602090815260408083206001600160a01b03871684529091528120549091610a36918590610f17908690614426565b6128f9565b6000610a3a600883612a1e565b6000333014610f4a5760405162461bcd60e51b81526004016108fd90614347565b600e5460ff16610f9c5760405162461bcd60e51b815260206004820152601b60248201527f44414f3a204754206d696e74696e672069732064697361626c6564000000000060448201526064016108fd565b610a368383612a56565b6060600b805480602002602001604051908101604052809291908181526020016000905b828210156111b05760008481526020908190206040805161010081019091526008850290910180546001600160a01b031682526001810180549293919291840191611014906144c2565b80601f0160208091040260200160405190810160405280929190818152602001828054611040906144c2565b801561108d5780601f106110625761010080835404028352916020019161108d565b820191906000526020600020905b81548152906001019060200180831161107057829003601f168201915b50505050508152602001600282015481526020016003820154815260200160048201548152602001600582015481526020016006820154815260200160078201805480602002602001604051908101604052809291908181526020016000905b8282101561119957838290600052602060002001805461110c906144c2565b80601f0160208091040260200160405190810160405280929190818152602001828054611138906144c2565b80156111855780601f1061115a57610100808354040283529160200191611185565b820191906000526020600020905b81548152906001019060200180831161116857829003601f168201915b5050505050815260200190600101906110ed565b505050508152505081526020019060010190610fca565b50505050905090565b60006111c56008612a40565b905090565b60006111c56006612a40565b60003330146111f75760405162461bcd60e51b81526004016108fd90614347565b611202600883612b35565b6112445760405162461bcd60e51b81526020600482015260136024820152722220a79d103737ba1030b71030b230b83a32b960691b60448201526064016108fd565b610a36600683612b35565b60003330146112705760405162461bcd60e51b81526004016108fd90614347565b61127b600883612b4a565b6112c75760405162461bcd60e51b815260206004820152601760248201527f44414f3a20616c726561647920616e206164617074657200000000000000000060448201526064016108fd565b610a36600683612b4a565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316636d61d1f56040518163ffffffff1660e01b815260040160206040518083038186803b15801561132e57600080fd5b505afa158015611342573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113669190613f63565b11801561140957506040516378231cad60e11b815230600482015242907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063f046395a9060240160206040518083038186803b1580156113cf57600080fd5b505afa1580156113e3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114079190613f63565b105b156114145750600090565b50600190565b6060600d805480602002602001604051908101604052809291908181526020016000905b828210156111b05760008481526020908190206040805160a081019091526005850290910180546001600160a01b031682526001810180549293919291840191611487906144c2565b80601f01602080910402602001604051908101604052809291908181526020018280546114b3906144c2565b80156115005780601f106114d557610100808354040283529160200191611500565b820191906000526020600020905b8154815290600101906020018083116114e357829003601f168201915b50505091835250506002820154602080830191909152600383015460408301526004909201546001600160a01b0316606090910152908252600192909201910161143e565b60003330146115665760405162461bcd60e51b81526004016108fd90614347565b50600e805460ff19169055600190565b60003330146115975760405162461bcd60e51b81526004016108fd90614347565b6115a2600683612b35565b6115e55760405162461bcd60e51b8152602060048201526014602482015273111053ce881b9bdd0818481c195c9b5a5d1d195960621b60448201526064016108fd565b506001919050565b6060600580546109a6906144c2565b600033301461161d5760405162461bcd60e51b81526004016108fd90614347565b50600e805461ff0019169055600190565b600033301461164f5760405162461bcd60e51b81526004016108fd90614347565b600e54610100900460ff166116a65760405162461bcd60e51b815260206004820152601b60248201527f44414f3a204754206275726e696e672069732064697361626c6564000000000060448201526064016108fd565b610a368383612b5f565b3360009081526002602090815260408083206001600160a01b0386168452909152812054828110156117325760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016108fd565b61173f33858584036128f9565b5060019392505050565b60405162461bcd60e51b815260206004820152601a60248201527f47543a207472616e736665722069732070726f6869626974656400000000000060448201526000906064016108fd565b60003330146117b55760405162461bcd60e51b81526004016108fd90614347565b6117c0600683612b4a565b6115e55760405162461bcd60e51b8152602060048201526016602482015275111053ce88185b1c9958591e481c195c9b5a5d1d195960521b60448201526064016108fd565b606060006118136008612a40565b905080611821576000610ca0565b6000816001600160401b0381111561183b5761183b61455a565b604051908082528060200260200182016040528015611864578160200160208202803683370190505b50905060005b82811015610d685761187d600882612a4a565b82828151811061188f5761188f614544565b6001600160a01b0390921660209283029190910190910152806118b1816144fd565b91505061186a565b60003330146118da5760405162461bcd60e51b81526004016108fd90614347565b61173f848484612caa565b9392505050565b6000600260005414156119115760405162461bcd60e51b81526004016108fd90614389565b600260005561191e6112d2565b61196a5760405162461bcd60e51b815260206004820152601a60248201527f44414f3a20737562736372697074696f6e206e6f74207061696400000000000060448201526064016108fd565b33600090815260016020526040812054116119bf5760405162461bcd60e51b815260206004820152601560248201527444414f3a206f6e6c7920666f72206d656d6265727360581b60448201526064016108fd565b426119cd6203f48085614426565b1015611a115760405162461bcd60e51b81526020600482015260136024820152722220a79d103b37ba34b7339034b99037bb32b960691b60448201526064016108fd565b6000611a21898989898989610e9d565b6000818152600c602052604090205490915060ff1615611a835760405162461bcd60e51b815260206004820152601c60248201527f44414f3a20766f74696e6720616c72656164792065786563757465640000000060448201526064016108fd565b611a8d8382612e7a565b611ad95760405162461bcd60e51b815260206004820152601a60248201527f44414f3a2071756f72756d206973206e6f74207265616368656400000000000060448201526064016108fd565b6000818152600c6020908152604091829020805460ff191660011790558151610100810183526001600160a01b038c1681528251601f8b01839004830281018301909352898352600b92909182810191908c908c9081908401838280828437600092018290525093855250505060208083018b9052604083018a90526060830189905242608084015260a0830186905260c090920187905283546001808201865594825290829020835160089092020180546001600160a01b0319166001600160a01b0390921691909117815582820151805193949193611bc29392850192919091019061396a565b5060408201516002820155606082015160038201556080820151600482015560a0820151600582015560c0820151600682015560e08201518051611c109160078401916020909101906139ea565b50505084896001600160a01b03167fbd456668f700390d892b45c86161989dd1c22b58f45c8427d29e45dca046fafc8a8a8a8942888b604051611c5997969594939291906142e8565b60405180910390a386611c7e57611c796001600160a01b038a168761309c565b611d20565b85611cd357611ccd88888080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250506001600160a01b038d16929150506131b5565b50611d20565b611d1e88888080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050506001600160a01b038c16919050886131f7565b505b60019150506001600055979650505050505050565b600060026000541415611d5a5760405162461bcd60e51b81526004016108fd90614389565b6002600055611d676112d2565b611db35760405162461bcd60e51b815260206004820152601a60248201527f44414f3a20737562736372697074696f6e206e6f74207061696400000000000060448201526064016108fd565b611dbe600633612a1e565b611e0a5760405162461bcd60e51b815260206004820152601760248201527f44414f3a206f6e6c7920666f72207065726d697474656400000000000000000060448201526064016108fd565b600d6040518060a00160405280876001600160a01b0316815260200186868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525093855250505060208083018790524260408401523360609093019290925283546001808201865594825290829020835160059092020180546001600160a01b0319166001600160a01b0390921691909117815582820151805193949193611ec79392850192919091019061396a565b50604082810151600283015560608301516003830155608090920151600490910180546001600160a01b0319166001600160a01b03928316179055905133918716907f2fcf7d8fdbdd29355c4dd2538a3202ab25781f676add9a36bcfe961319efbaa790611f3a908890889088906142c4565b60405180910390a382611f5f57611f5a6001600160a01b0386168361309c565b612001565b81611fb457611fae84848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250506001600160a01b038916929150506131b5565b50612001565b611fff84848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050506001600160a01b038816919050846131f7565b505b50600180600055949350505050565b600a546000906001600160a01b0316156120785760405162461bcd60e51b8152602060048201526024808201527f44414f3a204c5020616464726573732068617320616c7265616479206265656e604482015263081cd95d60e21b60648201526084016108fd565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146120f05760405162461bcd60e51b815260206004820152601960248201527f44414f3a206f6e6c792053686f702063616e20736574204c500000000000000060448201526064016108fd565b50600a80546001600160a01b0319166001600160a01b0392909216919091179055600190565b60006002600054141561213b5760405162461bcd60e51b81526004016108fd90614389565b6002600055600a546001600160a01b031661218e5760405162461bcd60e51b8152602060048201526013602482015272111053ce881314081b9bdd081cd95d081e595d606a1b60448201526064016108fd565b600a546001600160a01b031633146121db5760405162461bcd60e51b815260206004820152601060248201526f044414f3a206f6e6c7920666f72204c560841b60448201526064016108fd565b6121e484613225565b156122415760405162461bcd60e51b815260206004820152602760248201527f44414f3a206475706c696361746573206172652070726f686962697465642028604482015266746f6b656e732960c81b60648201526084016108fd565b60005b845181101561232957600a5485516001600160a01b039091169086908390811061227057612270614544565b60200260200101516001600160a01b0316141580156122ba5750306001600160a01b03168582815181106122a6576122a6614544565b60200260200101516001600160a01b031614155b6123175760405162461bcd60e51b815260206004820152602860248201527f44414f3a204c5020616e642047542063616e6e6f742062652070617274206f66604482015267206120736861726560c01b60648201526084016108fd565b80612321816144fd565b915050612244565b5081518351146123715760405162461bcd60e51b81526020600482015260136024820152722220a79d1030b230b83a32b9399032b93937b960691b60448201526064016108fd565b8251156124ce57825160018111156124cc5760005b61239160018361447f565b8110156124ca5760006123a5826001614426565b90505b828110156124b7578581815181106123c2576123c2614544565b60200260200101516001600160a01b03168683815181106123e5576123e5614544565b60200260200101516001600160a01b0316148015612446575084818151811061241057612410614544565b60200260200101516001600160a01b031685838151811061243357612433614544565b60200260200101516001600160a01b0316145b156124a55760405162461bcd60e51b815260206004820152602960248201527f44414f3a206475706c696361746573206172652070726f68696269746564202860448201526861646170746572732960b81b60648201526084016108fd565b806124af816144fd565b9150506123a8565b50806124c2816144fd565b915050612386565b505b505b6124fe670de0b6b3a76400006124e48747614460565b6124ee919061443e565b6001600160a01b0388169061309c565b8351156126ac57600084516001600160401b038111156125205761252061455a565b604051908082528060200260200182016040528015612549578160200160208202803683370190505b50905060005b855181101561263a57670de0b6b3a76400008787838151811061257457612574614544565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b1580156125bf57600080fd5b505afa1580156125d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125f79190613f63565b6126019190614460565b61260b919061443e565b82828151811061261d5761261d614544565b602090810291909101015280612632816144fd565b91505061254f565b5060005b85518110156126a9576126978883838151811061265d5761265d614544565b602002602001015188848151811061267757612677614544565b60200260200101516001600160a01b03166132f79092919063ffffffff16565b806126a1816144fd565b91505061263e565b50505b8251156128e957825160005b818110156128e6576126ed8582815181106126d5576126d5614544565b60200260200101516008612a1e90919063ffffffff16565b6127395760405162461bcd60e51b815260206004820152601b60248201527f44414f3a2074686973206973206e6f7420616e2061646170746572000000000060448201526064016108fd565b61276685828151811061274e5761274e614544565b60200260200101516006612a1e90919063ffffffff16565b6127bd5760405162461bcd60e51b815260206004820152602260248201527f44414f3a20746869732061646170746572206973206e6f74207065726d697474604482015261195960f21b60648201526084016108fd565b60008582815181106127d1576127d1614544565b60200260200101516001600160a01b031663d9caed128a8785815181106127fa576127fa614544565b60209081029190910101516040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604481018b9052606401602060405180830381600087803b15801561285457600080fd5b505af1158015612868573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061288c9190613f28565b9050806128d35760405162461bcd60e51b81526020600482015260156024820152742220a79d103bb4ba34323930bbb0b61032b93937b960591b60448201526064016108fd565b50806128de816144fd565b9150506126b8565b50505b5060018060005595945050505050565b6001600160a01b03831661295b5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016108fd565b6001600160a01b0382166129bc5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016108fd565b6001600160a01b0383811660008181526002602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b038116600090815260018301602052604081205415156118e5565b6000610a3a825490565b60006118e58383613349565b6001600160a01b038216612aac5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016108fd565b8060036000828254612abe9190614426565b90915550506001600160a01b03821660009081526001602052604081208054839290612aeb908490614426565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b60006118e5836001600160a01b038416613373565b60006118e5836001600160a01b038416613466565b6001600160a01b038216612bbf5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016108fd565b6001600160a01b03821660009081526001602052604090205481811015612c335760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016108fd565b6001600160a01b0383166000908152600160205260408120838303905560038054849290612c6290849061447f565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001612a11565b505050565b6001600160a01b038316612d0e5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016108fd565b6001600160a01b038216612d705760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016108fd565b6001600160a01b03831660009081526001602052604090205481811015612de85760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016108fd565b6001600160a01b03808516600090815260016020526040808220858503905591851681529081208054849290612e1f908490614426565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051612e6b91815260200190565b60405180910390a35b50505050565b600080612ed4836040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b905060008085516001600160401b03811115612ef257612ef261455a565b604051908082528060200260200182016040528015612f1b578160200160208202803683370190505b50905060005b8651811015612f98576000612f58888381518110612f4157612f41614544565b6020026020010151866134b590919063ffffffff16565b905080838381518110612f6d57612f6d614544565b6001600160a01b03909216602092830291909101909101525080612f90816144fd565b915050612f21565b50612fa281613225565b15612fef5760405162461bcd60e51b815260206004820152601e60248201527f44414f3a207369676e61747572657320617265206e6f7420756e69717565000060448201526064016108fd565b60005b81518110156130515761303382828151811061301057613010614544565b60200260200101516001600160a01b031660009081526001602052604090205490565b61303d9084614426565b925080613049816144fd565b915050612ff2565b50600a5460ff600160a01b9091041661306960035490565b6130739190614460565b61307e836064614460565b10156130905760009350505050610a3a565b50600195945050505050565b804710156130ec5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016108fd565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114613139576040519150601f19603f3d011682016040523d82523d6000602084013e61313e565b606091505b5050905080612ca55760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016108fd565b60606118e583836040518060400160405280601e81526020017f416464726573733a206c6f772d6c6576656c2063616c6c206661696c65640000815250613559565b606061321d84848460405180606001604052806029815260200161457160299139613564565b949350505050565b6000600182511161323857506000919050565b60005b60018351613249919061447f565b8110156132ee57600083828151811061326457613264614544565b60200260200101519050600082600161327d9190614426565b90505b84518110156132d95784818151811061329b5761329b614544565b60200260200101516001600160a01b0316826001600160a01b031614156132c757506001949350505050565b806132d1816144fd565b915050613280565b505080806132e6906144fd565b91505061323b565b50506000919050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052612ca590849061368c565b600082600001828154811061336057613360614544565b9060005260206000200154905092915050565b6000818152600183016020526040812054801561345c57600061339760018361447f565b85549091506000906133ab9060019061447f565b90508181146134105760008660000182815481106133cb576133cb614544565b90600052602060002001549050808760000184815481106133ee576133ee614544565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806134215761342161452e565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610a3a565b6000915050610a3a565b60008181526001830160205260408120546134ad57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610a3a565b506000610a3a565b60008151604114156134e95760208201516040830151606084015160001a6134df8682858561375e565b9350505050610a3a565b8151604014156135115760208201516040830151613508858383613907565b92505050610a3a565b60405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016108fd565b606061321d84846000855b6060824710156135c55760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016108fd565b843b6136135760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016108fd565b600080866001600160a01b0316858760405161362f91906140bd565b60006040518083038185875af1925050503d806000811461366c576040519150601f19603f3d011682016040523d82523d6000602084013e613671565b606091505b5091509150613681828286613931565b979650505050505050565b60006136e1826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166135599092919063ffffffff16565b805190915015612ca557808060200190518101906136ff9190613f28565b612ca55760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016108fd565b60007f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08211156137db5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016108fd565b8360ff16601b14806137f057508360ff16601c145b6138475760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016108fd565b6040805160008082526020820180845288905260ff871692820192909252606081018590526080810184905260019060a0016020604051602081039080840390855afa15801561389b573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166138fe5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016108fd565b95945050505050565b60006001600160ff1b03821660ff83901c601b016139278682878561375e565b9695505050505050565b606083156139405750816118e5565b8251156139505782518084602001fd5b8160405162461bcd60e51b81526004016108fd9190614334565b828054613976906144c2565b90600052602060002090601f01602090048101928261399857600085556139de565b82601f106139b157805160ff19168380011785556139de565b828001600101855582156139de579182015b828111156139de5782518255916020019190600101906139c3565b50610d6f929150613a43565b828054828255906000526020600020908101928215613a37579160200282015b82811115613a375782518051613a2791849160209091019061396a565b5091602001919060010190613a0a565b50610d6f929150613a58565b5b80821115610d6f5760008155600101613a44565b80821115610d6f576000613a6c8282613a75565b50600101613a58565b508054613a81906144c2565b6000825580601f10613a91575050565b601f016020900490600052602060002090810190613aaf9190613a43565b50565b80356001600160a01b038116811461099257600080fd5b600082601f830112613ada57600080fd5b81356020613aef613aea83614403565b6143d3565b80838252828201915082860187848660051b8901011115613b0f57600080fd5b60005b85811015613b3557613b2382613ab2565b84529284019290840190600101613b12565b5090979650505050505050565b60008083601f840112613b5457600080fd5b5081356001600160401b03811115613b6b57600080fd5b602083019150836020828501011115613b8357600080fd5b9250929050565b600060208284031215613b9c57600080fd5b6118e582613ab2565b60008060408385031215613bb857600080fd5b613bc183613ab2565b9150613bcf60208401613ab2565b90509250929050565b600080600060608486031215613bed57600080fd5b613bf684613ab2565b9250613c0460208501613ab2565b9150604084013590509250925092565b60008060008060608587031215613c2a57600080fd5b613c3385613ab2565b935060208501356001600160401b03811115613c4e57600080fd5b613c5a87828801613b42565b9598909750949560400135949350505050565b60008060008060008060a08789031215613c8657600080fd5b613c8f87613ab2565b955060208701356001600160401b03811115613caa57600080fd5b613cb689828a01613b42565b979a90995096976040810135976060820135975060809091013595509350505050565b600080600080600080600060c0888a031215613cf457600080fd5b613cfd88613ab2565b96506001600160401b0360208901351115613d1757600080fd5b613d278960208a01358a01613b42565b90965094506040880135935060608801359250608088013591506001600160401b0360a08901351115613d5957600080fd5b60a0880135880189601f820112613d6f57600080fd5b613d7c613aea8235614403565b8082358252602082019150602083018c6020853560051b8601011115613da157600080fd5b60005b8435811015613e48576001600160401b0382351115613dc257600080fd5b8d603f833587010112613dd457600080fd5b60208235860101356001600160401b03811115613df357613df361455a565b613e06601f8201601f19166020016143d3565b8181528f60408386358a0101011115613e1e57600080fd5b81604085358901016020830137600060209282018301528552938401939190910190600101613da4565b505080935050505092959891949750929550565b60008060408385031215613e6f57600080fd5b613e7883613ab2565b946020939093013593505050565b600080600080600060a08688031215613e9e57600080fd5b613ea786613ab2565b94506020860135935060408601356001600160401b0380821115613eca57600080fd5b613ed689838a01613ac9565b94506060880135915080821115613eec57600080fd5b613ef889838a01613ac9565b93506080880135915080821115613f0e57600080fd5b50613f1b88828901613ac9565b9150509295509295909350565b600060208284031215613f3a57600080fd5b815180151581146118e557600080fd5b600060208284031215613f5c57600080fd5b5035919050565b600060208284031215613f7557600080fd5b5051919050565b600060208284031215613f8e57600080fd5b813560ff811681146118e557600080fd5b600081518084526020808501808196508360051b8101915082860160005b85811015613fe7578284038952613fd584835161401d565b98850198935090840190600101613fbd565b5091979650505050505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60008151808452614035816020860160208601614496565b601f01601f19169290920160200192915050565b600061010060018060a01b03835116845260208301518160208601526140718286018261401d565b91505060408301516040850152606083015160608501526080830151608085015260a083015160a085015260c083015160c085015260e083015184820360e08601526138fe8282613f9f565b600082516140cf818460208701614496565b9190910192915050565b6001600160a01b0389811682528816602082015260e060408201819052600090614106908301888a613ff4565b90508560608301528460808301528360a08301528260c08301529998505050505050505050565b600060018060a01b03808816835260a0602084015261414f60a084018861401d565b6040840196909652606083019490945250911660809091015292915050565b6020808252825182820181905260009190848201906040850190845b818110156141af5783516001600160a01b03168352928401929184019160010161418a565b50909695505050505050565b60006020808301818452808551808352604092508286019150828160051b87010184880160005b8381101561425457888303603f19018552815180516001600160a01b0390811685528882015160a08a8701819052919061421e8388018261401d565b848b0151888c015260608086015190890152608094850151909216939096019290925250948701949250908601906001016141e2565b509098975050505050505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b828110156142b757603f198886030184526142a5858351614049565b94509285019290850190600101614289565b5092979650505050505050565b6040815260006142d8604083018587613ff4565b9050826020830152949350505050565b60c0815260006142fc60c08301898b613ff4565b87602084015286604084015285606084015284608084015282810360a08401526143268185613f9f565b9a9950505050505050505050565b6020815260006118e5602083018461401d565b60208082526022908201527f44414f3a20746869732066756e6374696f6e206973206f6e6c7920666f722044604082015261414f60f01b606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6020815260006118e56020830184614049565b604051601f8201601f191681016001600160401b03811182821017156143fb576143fb61455a565b604052919050565b60006001600160401b0382111561441c5761441c61455a565b5060051b60200190565b6000821982111561443957614439614518565b500190565b60008261445b57634e487b7160e01b600052601260045260246000fd5b500490565b600081600019048311821515161561447a5761447a614518565b500290565b60008282101561449157614491614518565b500390565b60005b838110156144b1578181015183820152602001614499565b83811115612e745750506000910152565b600181811c908216806144d657607f821691505b602082108114156144f757634e487b7160e01b600052602260045260246000fd5b50919050565b600060001982141561451157614511614518565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fdfe416464726573733a206c6f772d6c6576656c2063616c6c20776974682076616c7565206661696c6564a26469706673582212205703f51bf83703925ba0865978f53932c742c4d824280c9d34868455709efe7964736f6c63430008060033a26469706673582212208be80725c23f610645dc732a2b72a72ffdac36f32592255dc7bb96893ca21ed164736f6c63430008060033000000000000000000000000ca49ecf7e7bb9bbc9d1d295384663f6ba5c0e36600000000000000000000000071eeba415a523f5c952cc2f06361d5443545ad28

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

000000000000000000000000ca49ecf7e7bb9bbc9d1d295384663f6ba5c0e36600000000000000000000000071eeba415a523f5c952cc2f06361d5443545ad28

-----Decoded View---------------
Arg [0] : _shop (address): 0xca49ecf7e7bb9bbc9d1d295384663f6ba5c0e366
Arg [1] : _xdao (address): 0x71eeba415a523f5c952cc2f06361d5443545ad28

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000ca49ecf7e7bb9bbc9d1d295384663f6ba5c0e366
Arg [1] : 00000000000000000000000071eeba415a523f5c952cc2f06361d5443545ad28


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Validator ID :
0 FTM

Amount Staked
0

Amount Delegated
0

Staking Total
0

Staking Start Epoch
0

Staking Start Time
0

Proof of Importance
0

Origination Score
0

Validation Score
0

Active
0

Online
0

Downtime
0 s
Address Amount claimed Rewards Created On Epoch Created On
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.