creation_sourcecode: {{
    "language": "Solidity",
    "sources": {
      "@openzeppelin/contracts/access/AccessControl.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (access/AccessControl.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IAccessControl.sol\";\nimport \"../utils/Context.sol\";\nimport \"../utils/Strings.sol\";\nimport \"../utils/introspection/ERC165.sol\";\n\n/**\n * @dev Contract module that allows children to implement role-based access\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\n * members except through off-chain means by accessing the contract event logs. Some\n * applications may benefit from on-chain enumerability, for those cases see\n * {AccessControlEnumerable}.\n *\n * Roles are referred to by their `bytes32` identifier. These should be exposed\n * in the external API and be unique. The best way to achieve this is by\n * using `public constant` hash digests:\n *\n * ```\n * bytes32 public constant MY_ROLE = keccak256(\"MY_ROLE\");\n * ```\n *\n * Roles can be used to represent a set of permissions. To restrict access to a\n * function call, use {hasRole}:\n *\n * ```\n * function foo() public {\n *     require(hasRole(MY_ROLE, msg.sender));\n *     ...\n * }\n * ```\n *\n * Roles can be granted and revoked dynamically via the {grantRole} and\n * {revokeRole} functions. Each role has an associated admin role, and only\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\n *\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\n * that only accounts with this role will be able to grant or revoke other\n * roles. More complex role relationships can be created by using\n * {_setRoleAdmin}.\n *\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\n * grant and revoke this role. Extra precautions should be taken to secure\n * accounts that have been granted it.\n */\nabstract contract AccessControl is Context, IAccessControl, ERC165 {\n    struct RoleData {\n        mapping(address => bool) members;\n        bytes32 adminRole;\n    }\n\n    mapping(bytes32 => RoleData) private _roles;\n\n    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\n\n    /**\n     * @dev Modifier that checks that an account has a specific role. Reverts\n     * with a standardized message including the required role.\n     *\n     * The format of the revert reason is given by the following regular expression:\n     *\n     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\n     *\n     * _Available since v4.1._\n     */\n    modifier onlyRole(bytes32 role) {\n        _checkRole(role);\n        _;\n    }\n\n    /**\n     * @dev See {IERC165-supportsInterface}.\n     */\n    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n        return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);\n    }\n\n    /**\n     * @dev Returns `true` if `account` has been granted `role`.\n     */\n    function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\n        return _roles[role].members[account];\n    }\n\n    /**\n     * @dev Revert with a standard message if `_msgSender()` is missing `role`.\n     * Overriding this function changes the behavior of the {onlyRole} modifier.\n     *\n     * Format of the revert message is described in {_checkRole}.\n     *\n     * _Available since v4.6._\n     */\n    function _checkRole(bytes32 role) internal view virtual {\n        _checkRole(role, _msgSender());\n    }\n\n    /**\n     * @dev Revert with a standard message if `account` is missing `role`.\n     *\n     * The format of the revert reason is given by the following regular expression:\n     *\n     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\n     */\n    function _checkRole(bytes32 role, address account) internal view virtual {\n        if (!hasRole(role, account)) {\n            revert(\n                string(\n                    abi.encodePacked(\n                        \"AccessControl: account \",\n                        Strings.toHexString(uint160(account), 20),\n                        \" is missing role \",\n                        Strings.toHexString(uint256(role), 32)\n                    )\n                )\n            );\n        }\n    }\n\n    /**\n     * @dev Returns the admin role that controls `role`. See {grantRole} and\n     * {revokeRole}.\n     *\n     * To change a role's admin, use {_setRoleAdmin}.\n     */\n    function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {\n        return _roles[role].adminRole;\n    }\n\n    /**\n     * @dev Grants `role` to `account`.\n     *\n     * If `account` had not been already granted `role`, emits a {RoleGranted}\n     * event.\n     *\n     * Requirements:\n     *\n     * - the caller must have ``role``'s admin role.\n     *\n     * May emit a {RoleGranted} event.\n     */\n    function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\n        _grantRole(role, account);\n    }\n\n    /**\n     * @dev Revokes `role` from `account`.\n     *\n     * If `account` had been granted `role`, emits a {RoleRevoked} event.\n     *\n     * Requirements:\n     *\n     * - the caller must have ``role``'s admin role.\n     *\n     * May emit a {RoleRevoked} event.\n     */\n    function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\n        _revokeRole(role, account);\n    }\n\n    /**\n     * @dev Revokes `role` from the calling account.\n     *\n     * Roles are often managed via {grantRole} and {revokeRole}: this function's\n     * purpose is to provide a mechanism for accounts to lose their privileges\n     * if they are compromised (such as when a trusted device is misplaced).\n     *\n     * If the calling account had been revoked `role`, emits a {RoleRevoked}\n     * event.\n     *\n     * Requirements:\n     *\n     * - the caller must be `account`.\n     *\n     * May emit a {RoleRevoked} event.\n     */\n    function renounceRole(bytes32 role, address account) public virtual override {\n        require(account == _msgSender(), \"AccessControl: can only renounce roles for self\");\n\n        _revokeRole(role, account);\n    }\n\n    /**\n     * @dev Grants `role` to `account`.\n     *\n     * If `account` had not been already granted `role`, emits a {RoleGranted}\n     * event. Note that unlike {grantRole}, this function doesn't perform any\n     * checks on the calling account.\n     *\n     * May emit a {RoleGranted} event.\n     *\n     * [WARNING]\n     * ====\n     * This function should only be called from the constructor when setting\n     * up the initial roles for the system.\n     *\n     * Using this function in any other way is effectively circumventing the admin\n     * system imposed by {AccessControl}.\n     * ====\n     *\n     * NOTE: This function is deprecated in favor of {_grantRole}.\n     */\n    function _setupRole(bytes32 role, address account) internal virtual {\n        _grantRole(role, account);\n    }\n\n    /**\n     * @dev Sets `adminRole` as ``role``'s admin role.\n     *\n     * Emits a {RoleAdminChanged} event.\n     */\n    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\n        bytes32 previousAdminRole = getRoleAdmin(role);\n        _roles[role].adminRole = adminRole;\n        emit RoleAdminChanged(role, previousAdminRole, adminRole);\n    }\n\n    /**\n     * @dev Grants `role` to `account`.\n     *\n     * Internal function without access restriction.\n     *\n     * May emit a {RoleGranted} event.\n     */\n    function _grantRole(bytes32 role, address account) internal virtual {\n        if (!hasRole(role, account)) {\n            _roles[role].members[account] = true;\n            emit RoleGranted(role, account, _msgSender());\n        }\n    }\n\n    /**\n     * @dev Revokes `role` from `account`.\n     *\n     * Internal function without access restriction.\n     *\n     * May emit a {RoleRevoked} event.\n     */\n    function _revokeRole(bytes32 role, address account) internal virtual {\n        if (hasRole(role, account)) {\n            _roles[role].members[account] = false;\n            emit RoleRevoked(role, account, _msgSender());\n        }\n    }\n}\n"
      },
      "@openzeppelin/contracts/access/AccessControlEnumerable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IAccessControlEnumerable.sol\";\nimport \"./AccessControl.sol\";\nimport \"../utils/structs/EnumerableSet.sol\";\n\n/**\n * @dev Extension of {AccessControl} that allows enumerating the members of each role.\n */\nabstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl {\n    using EnumerableSet for EnumerableSet.AddressSet;\n\n    mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers;\n\n    /**\n     * @dev See {IERC165-supportsInterface}.\n     */\n    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n        return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId);\n    }\n\n    /**\n     * @dev Returns one of the accounts that have `role`. `index` must be a\n     * value between 0 and {getRoleMemberCount}, non-inclusive.\n     *\n     * Role bearers are not sorted in any particular way, and their ordering may\n     * change at any point.\n     *\n     * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\n     * you perform all queries on the same block. See the following\n     * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\n     * for more information.\n     */\n    function getRoleMember(bytes32 role, uint256 index) public view virtual override returns (address) {\n        return _roleMembers[role].at(index);\n    }\n\n    /**\n     * @dev Returns the number of accounts that have `role`. Can be used\n     * together with {getRoleMember} to enumerate all bearers of a role.\n     */\n    function getRoleMemberCount(bytes32 role) public view virtual override returns (uint256) {\n        return _roleMembers[role].length();\n    }\n\n    /**\n     * @dev Overload {_grantRole} to track enumerable memberships\n     */\n    function _grantRole(bytes32 role, address account) internal virtual override {\n        super._grantRole(role, account);\n        _roleMembers[role].add(account);\n    }\n\n    /**\n     * @dev Overload {_revokeRole} to track enumerable memberships\n     */\n    function _revokeRole(bytes32 role, address account) internal virtual override {\n        super._revokeRole(role, account);\n        _roleMembers[role].remove(account);\n    }\n}\n"
      },
      "@openzeppelin/contracts/access/IAccessControl.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev External interface of AccessControl declared to support ERC165 detection.\n */\ninterface IAccessControl {\n    /**\n     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\n     *\n     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\n     * {RoleAdminChanged} not being emitted signaling this.\n     *\n     * _Available since v3.1._\n     */\n    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\n\n    /**\n     * @dev Emitted when `account` is granted `role`.\n     *\n     * `sender` is the account that originated the contract call, an admin role\n     * bearer except when using {AccessControl-_setupRole}.\n     */\n    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\n\n    /**\n     * @dev Emitted when `account` is revoked `role`.\n     *\n     * `sender` is the account that originated the contract call:\n     *   - if using `revokeRole`, it is the admin role bearer\n     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)\n     */\n    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\n\n    /**\n     * @dev Returns `true` if `account` has been granted `role`.\n     */\n    function hasRole(bytes32 role, address account) external view returns (bool);\n\n    /**\n     * @dev Returns the admin role that controls `role`. See {grantRole} and\n     * {revokeRole}.\n     *\n     * To change a role's admin, use {AccessControl-_setRoleAdmin}.\n     */\n    function getRoleAdmin(bytes32 role) external view returns (bytes32);\n\n    /**\n     * @dev Grants `role` to `account`.\n     *\n     * If `account` had not been already granted `role`, emits a {RoleGranted}\n     * event.\n     *\n     * Requirements:\n     *\n     * - the caller must have ``role``'s admin role.\n     */\n    function grantRole(bytes32 role, address account) external;\n\n    /**\n     * @dev Revokes `role` from `account`.\n     *\n     * If `account` had been granted `role`, emits a {RoleRevoked} event.\n     *\n     * Requirements:\n     *\n     * - the caller must have ``role``'s admin role.\n     */\n    function revokeRole(bytes32 role, address account) external;\n\n    /**\n     * @dev Revokes `role` from the calling account.\n     *\n     * Roles are often managed via {grantRole} and {revokeRole}: this function's\n     * purpose is to provide a mechanism for accounts to lose their privileges\n     * if they are compromised (such as when a trusted device is misplaced).\n     *\n     * If the calling account had been granted `role`, emits a {RoleRevoked}\n     * event.\n     *\n     * Requirements:\n     *\n     * - the caller must be `account`.\n     */\n    function renounceRole(bytes32 role, address account) external;\n}\n"
      },
      "@openzeppelin/contracts/access/IAccessControlEnumerable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IAccessControl.sol\";\n\n/**\n * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.\n */\ninterface IAccessControlEnumerable is IAccessControl {\n    /**\n     * @dev Returns one of the accounts that have `role`. `index` must be a\n     * value between 0 and {getRoleMemberCount}, non-inclusive.\n     *\n     * Role bearers are not sorted in any particular way, and their ordering may\n     * change at any point.\n     *\n     * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\n     * you perform all queries on the same block. See the following\n     * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\n     * for more information.\n     */\n    function getRoleMember(bytes32 role, uint256 index) external view returns (address);\n\n    /**\n     * @dev Returns the number of accounts that have `role`. Can be used\n     * together with {getRoleMember} to enumerate all bearers of a role.\n     */\n    function getRoleMemberCount(bytes32 role) external view returns (uint256);\n}\n"
      },
      "@openzeppelin/contracts/access/Ownable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n    address private _owner;\n\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n    /**\n     * @dev Initializes the contract setting the deployer as the initial owner.\n     */\n    constructor() {\n        _transferOwnership(_msgSender());\n    }\n\n    /**\n     * @dev Throws if called by any account other than the owner.\n     */\n    modifier onlyOwner() {\n        _checkOwner();\n        _;\n    }\n\n    /**\n     * @dev Returns the address of the current owner.\n     */\n    function owner() public view virtual returns (address) {\n        return _owner;\n    }\n\n    /**\n     * @dev Throws if the sender is not the owner.\n     */\n    function _checkOwner() internal view virtual {\n        require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n    }\n\n    /**\n     * @dev Leaves the contract without owner. It will not be possible to call\n     * `onlyOwner` functions anymore. Can only be called by the current owner.\n     *\n     * NOTE: Renouncing ownership will leave the contract without an owner,\n     * thereby removing any functionality that is only available to the owner.\n     */\n    function renounceOwnership() public virtual onlyOwner {\n        _transferOwnership(address(0));\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\n     * Can only be called by the current owner.\n     */\n    function transferOwnership(address newOwner) public virtual onlyOwner {\n        require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n        _transferOwnership(newOwner);\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\n     * Internal function without access restriction.\n     */\n    function _transferOwnership(address newOwner) internal virtual {\n        address oldOwner = _owner;\n        _owner = newOwner;\n        emit OwnershipTransferred(oldOwner, newOwner);\n    }\n}\n"
      },
      "@openzeppelin/contracts/token/ERC20/IERC20.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n    /**\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\n     * another (`to`).\n     *\n     * Note that `value` may be zero.\n     */\n    event Transfer(address indexed from, address indexed to, uint256 value);\n\n    /**\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n     * a call to {approve}. `value` is the new allowance.\n     */\n    event Approval(address indexed owner, address indexed spender, uint256 value);\n\n    /**\n     * @dev Returns the amount of tokens in existence.\n     */\n    function totalSupply() external view returns (uint256);\n\n    /**\n     * @dev Returns the amount of tokens owned by `account`.\n     */\n    function balanceOf(address account) external view returns (uint256);\n\n    /**\n     * @dev Moves `amount` tokens from the caller's account to `to`.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transfer(address to, uint256 amount) external returns (bool);\n\n    /**\n     * @dev Returns the remaining number of tokens that `spender` will be\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\n     * zero by default.\n     *\n     * This value changes when {approve} or {transferFrom} are called.\n     */\n    function allowance(address owner, address spender) external view returns (uint256);\n\n    /**\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\n     * that someone may use both the old and the new allowance by unfortunate\n     * transaction ordering. One possible solution to mitigate this race\n     * condition is to first reduce the spender's allowance to 0 and set the\n     * desired value afterwards:\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n     *\n     * Emits an {Approval} event.\n     */\n    function approve(address spender, uint256 amount) external returns (bool);\n\n    /**\n     * @dev Moves `amount` tokens from `from` to `to` using the\n     * allowance mechanism. `amount` is then deducted from the caller's\n     * allowance.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transferFrom(\n        address from,\n        address to,\n        uint256 amount\n    ) external returns (bool);\n}\n"
      },
      "@openzeppelin/contracts/token/ERC721/IERC721.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165.sol\";\n\n/**\n * @dev Required interface of an ERC721 compliant contract.\n */\ninterface IERC721 is IERC165 {\n    /**\n     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\n     */\n    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\n\n    /**\n     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\n     */\n    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\n\n    /**\n     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\n     */\n    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\n\n    /**\n     * @dev Returns the number of tokens in ``owner``'s account.\n     */\n    function balanceOf(address owner) external view returns (uint256 balance);\n\n    /**\n     * @dev Returns the owner of the `tokenId` token.\n     *\n     * Requirements:\n     *\n     * - `tokenId` must exist.\n     */\n    function ownerOf(uint256 tokenId) external view returns (address owner);\n\n    /**\n     * @dev Safely transfers `tokenId` token from `from` to `to`.\n     *\n     * Requirements:\n     *\n     * - `from` cannot be the zero address.\n     * - `to` cannot be the zero address.\n     * - `tokenId` token must exist and be owned by `from`.\n     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\n     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n     *\n     * Emits a {Transfer} event.\n     */\n    function safeTransferFrom(\n        address from,\n        address to,\n        uint256 tokenId,\n        bytes calldata data\n    ) external;\n\n    /**\n     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\n     * are aware of the ERC721 protocol to prevent tokens from being forever locked.\n     *\n     * Requirements:\n     *\n     * - `from` cannot be the zero address.\n     * - `to` cannot be the zero address.\n     * - `tokenId` token must exist and be owned by `from`.\n     * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\n     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n     *\n     * Emits a {Transfer} event.\n     */\n    function safeTransferFrom(\n        address from,\n        address to,\n        uint256 tokenId\n    ) external;\n\n    /**\n     * @dev Transfers `tokenId` token from `from` to `to`.\n     *\n     * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\n     *\n     * Requirements:\n     *\n     * - `from` cannot be the zero address.\n     * - `to` cannot be the zero address.\n     * - `tokenId` token must be owned by `from`.\n     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transferFrom(\n        address from,\n        address to,\n        uint256 tokenId\n    ) external;\n\n    /**\n     * @dev Gives permission to `to` to transfer `tokenId` token to another account.\n     * The approval is cleared when the token is transferred.\n     *\n     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\n     *\n     * Requirements:\n     *\n     * - The caller must own the token or be an approved operator.\n     * - `tokenId` must exist.\n     *\n     * Emits an {Approval} event.\n     */\n    function approve(address to, uint256 tokenId) external;\n\n    /**\n     * @dev Approve or remove `operator` as an operator for the caller.\n     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\n     *\n     * Requirements:\n     *\n     * - The `operator` cannot be the caller.\n     *\n     * Emits an {ApprovalForAll} event.\n     */\n    function setApprovalForAll(address operator, bool _approved) external;\n\n    /**\n     * @dev Returns the account approved for `tokenId` token.\n     *\n     * Requirements:\n     *\n     * - `tokenId` must exist.\n     */\n    function getApproved(uint256 tokenId) external view returns (address operator);\n\n    /**\n     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\n     *\n     * See {setApprovalForAll}\n     */\n    function isApprovedForAll(address owner, address operator) external view returns (bool);\n}\n"
      },
      "@openzeppelin/contracts/utils/Context.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n    function _msgSender() internal view virtual returns (address) {\n        return msg.sender;\n    }\n\n    function _msgData() internal view virtual returns (bytes calldata) {\n        return msg.data;\n    }\n}\n"
      },
      "@openzeppelin/contracts/utils/introspection/ERC165.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n *\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\n */\nabstract contract ERC165 is IERC165 {\n    /**\n     * @dev See {IERC165-supportsInterface}.\n     */\n    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n        return interfaceId == type(IERC165).interfaceId;\n    }\n}\n"
      },
      "@openzeppelin/contracts/utils/introspection/IERC165.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n    /**\n     * @dev Returns true if this contract implements the interface defined by\n     * `interfaceId`. See the corresponding\n     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n     * to learn more about how these ids are created.\n     *\n     * This function call must use less than 30 000 gas.\n     */\n    function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n"
      },
      "@openzeppelin/contracts/utils/Strings.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n    bytes16 private constant _HEX_SYMBOLS = \"0123456789abcdef\";\n    uint8 private constant _ADDRESS_LENGTH = 20;\n\n    /**\n     * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n     */\n    function toString(uint256 value) internal pure returns (string memory) {\n        // Inspired by OraclizeAPI's implementation - MIT licence\n        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\n\n        if (value == 0) {\n            return \"0\";\n        }\n        uint256 temp = value;\n        uint256 digits;\n        while (temp != 0) {\n            digits++;\n            temp /= 10;\n        }\n        bytes memory buffer = new bytes(digits);\n        while (value != 0) {\n            digits -= 1;\n            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\n            value /= 10;\n        }\n        return string(buffer);\n    }\n\n    /**\n     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n     */\n    function toHexString(uint256 value) internal pure returns (string memory) {\n        if (value == 0) {\n            return \"0x00\";\n        }\n        uint256 temp = value;\n        uint256 length = 0;\n        while (temp != 0) {\n            length++;\n            temp >>= 8;\n        }\n        return toHexString(value, length);\n    }\n\n    /**\n     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n     */\n    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n        bytes memory buffer = new bytes(2 * length + 2);\n        buffer[0] = \"0\";\n        buffer[1] = \"x\";\n        for (uint256 i = 2 * length + 1; i > 1; --i) {\n            buffer[i] = _HEX_SYMBOLS[value & 0xf];\n            value >>= 4;\n        }\n        require(value == 0, \"Strings: hex length insufficient\");\n        return string(buffer);\n    }\n\n    /**\n     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\n     */\n    function toHexString(address addr) internal pure returns (string memory) {\n        return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\n    }\n}\n"
      },
      "@openzeppelin/contracts/utils/structs/EnumerableSet.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableSet.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Library for managing\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\n * types.\n *\n * Sets have the following properties:\n *\n * - Elements are added, removed, and checked for existence in constant time\n * (O(1)).\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\n *\n * ```\n * contract Example {\n *     // Add the library methods\n *     using EnumerableSet for EnumerableSet.AddressSet;\n *\n *     // Declare a set state variable\n *     EnumerableSet.AddressSet private mySet;\n * }\n * ```\n *\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\n * and `uint256` (`UintSet`) are supported.\n *\n * [WARNING]\n * ====\n *  Trying to delete such a structure from storage will likely result in data corruption, rendering the structure unusable.\n *  See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\n *\n *  In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an array of EnumerableSet.\n * ====\n */\nlibrary EnumerableSet {\n    // To implement this library for multiple types with as little code\n    // repetition as possible, we write it in terms of a generic Set type with\n    // bytes32 values.\n    // The Set implementation uses private functions, and user-facing\n    // implementations (such as AddressSet) are just wrappers around the\n    // underlying Set.\n    // This means that we can only create new EnumerableSets for types that fit\n    // in bytes32.\n\n    struct Set {\n        // Storage of set values\n        bytes32[] _values;\n        // Position of the value in the `values` array, plus 1 because index 0\n        // means a value is not in the set.\n        mapping(bytes32 => uint256) _indexes;\n    }\n\n    /**\n     * @dev Add a value to a set. O(1).\n     *\n     * Returns true if the value was added to the set, that is if it was not\n     * already present.\n     */\n    function _add(Set storage set, bytes32 value) private returns (bool) {\n        if (!_contains(set, value)) {\n            set._values.push(value);\n            // The value is stored at length-1, but we add 1 to all indexes\n            // and use 0 as a sentinel value\n            set._indexes[value] = set._values.length;\n            return true;\n        } else {\n            return false;\n        }\n    }\n\n    /**\n     * @dev Removes a value from a set. O(1).\n     *\n     * Returns true if the value was removed from the set, that is if it was\n     * present.\n     */\n    function _remove(Set storage set, bytes32 value) private returns (bool) {\n        // We read and store the value's index to prevent multiple reads from the same storage slot\n        uint256 valueIndex = set._indexes[value];\n\n        if (valueIndex != 0) {\n            // Equivalent to contains(set, value)\n            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\n            // the array, and then remove the last element (sometimes called as 'swap and pop').\n            // This modifies the order of the array, as noted in {at}.\n\n            uint256 toDeleteIndex = valueIndex - 1;\n            uint256 lastIndex = set._values.length - 1;\n\n            if (lastIndex != toDeleteIndex) {\n                bytes32 lastValue = set._values[lastIndex];\n\n                // Move the last value to the index where the value to delete is\n                set._values[toDeleteIndex] = lastValue;\n                // Update the index for the moved value\n                set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\n            }\n\n            // Delete the slot where the moved value was stored\n            set._values.pop();\n\n            // Delete the index for the deleted slot\n            delete set._indexes[value];\n\n            return true;\n        } else {\n            return false;\n        }\n    }\n\n    /**\n     * @dev Returns true if the value is in the set. O(1).\n     */\n    function _contains(Set storage set, bytes32 value) private view returns (bool) {\n        return set._indexes[value] != 0;\n    }\n\n    /**\n     * @dev Returns the number of values on the set. O(1).\n     */\n    function _length(Set storage set) private view returns (uint256) {\n        return set._values.length;\n    }\n\n    /**\n     * @dev Returns the value stored at position `index` in the set. O(1).\n     *\n     * Note that there are no guarantees on the ordering of values inside the\n     * array, and it may change when more values are added or removed.\n     *\n     * Requirements:\n     *\n     * - `index` must be strictly less than {length}.\n     */\n    function _at(Set storage set, uint256 index) private view returns (bytes32) {\n        return set._values[index];\n    }\n\n    /**\n     * @dev Return the entire set in an array\n     *\n     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n     * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n     */\n    function _values(Set storage set) private view returns (bytes32[] memory) {\n        return set._values;\n    }\n\n    // Bytes32Set\n\n    struct Bytes32Set {\n        Set _inner;\n    }\n\n    /**\n     * @dev Add a value to a set. O(1).\n     *\n     * Returns true if the value was added to the set, that is if it was not\n     * already present.\n     */\n    function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\n        return _add(set._inner, value);\n    }\n\n    /**\n     * @dev Removes a value from a set. O(1).\n     *\n     * Returns true if the value was removed from the set, that is if it was\n     * present.\n     */\n    function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\n        return _remove(set._inner, value);\n    }\n\n    /**\n     * @dev Returns true if the value is in the set. O(1).\n     */\n    function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\n        return _contains(set._inner, value);\n    }\n\n    /**\n     * @dev Returns the number of values in the set. O(1).\n     */\n    function length(Bytes32Set storage set) internal view returns (uint256) {\n        return _length(set._inner);\n    }\n\n    /**\n     * @dev Returns the value stored at position `index` in the set. O(1).\n     *\n     * Note that there are no guarantees on the ordering of values inside the\n     * array, and it may change when more values are added or removed.\n     *\n     * Requirements:\n     *\n     * - `index` must be strictly less than {length}.\n     */\n    function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\n        return _at(set._inner, index);\n    }\n\n    /**\n     * @dev Return the entire set in an array\n     *\n     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n     * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n     */\n    function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\n        return _values(set._inner);\n    }\n\n    // AddressSet\n\n    struct AddressSet {\n        Set _inner;\n    }\n\n    /**\n     * @dev Add a value to a set. O(1).\n     *\n     * Returns true if the value was added to the set, that is if it was not\n     * already present.\n     */\n    function add(AddressSet storage set, address value) internal returns (bool) {\n        return _add(set._inner, bytes32(uint256(uint160(value))));\n    }\n\n    /**\n     * @dev Removes a value from a set. O(1).\n     *\n     * Returns true if the value was removed from the set, that is if it was\n     * present.\n     */\n    function remove(AddressSet storage set, address value) internal returns (bool) {\n        return _remove(set._inner, bytes32(uint256(uint160(value))));\n    }\n\n    /**\n     * @dev Returns true if the value is in the set. O(1).\n     */\n    function contains(AddressSet storage set, address value) internal view returns (bool) {\n        return _contains(set._inner, bytes32(uint256(uint160(value))));\n    }\n\n    /**\n     * @dev Returns the number of values in the set. O(1).\n     */\n    function length(AddressSet storage set) internal view returns (uint256) {\n        return _length(set._inner);\n    }\n\n    /**\n     * @dev Returns the value stored at position `index` in the set. O(1).\n     *\n     * Note that there are no guarantees on the ordering of values inside the\n     * array, and it may change when more values are added or removed.\n     *\n     * Requirements:\n     *\n     * - `index` must be strictly less than {length}.\n     */\n    function at(AddressSet storage set, uint256 index) internal view returns (address) {\n        return address(uint160(uint256(_at(set._inner, index))));\n    }\n\n    /**\n     * @dev Return the entire set in an array\n     *\n     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n     * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n     */\n    function values(AddressSet storage set) internal view returns (address[] memory) {\n        bytes32[] memory store = _values(set._inner);\n        address[] memory result;\n\n        /// @solidity memory-safe-assembly\n        assembly {\n            result := store\n        }\n\n        return result;\n    }\n\n    // UintSet\n\n    struct UintSet {\n        Set _inner;\n    }\n\n    /**\n     * @dev Add a value to a set. O(1).\n     *\n     * Returns true if the value was added to the set, that is if it was not\n     * already present.\n     */\n    function add(UintSet storage set, uint256 value) internal returns (bool) {\n        return _add(set._inner, bytes32(value));\n    }\n\n    /**\n     * @dev Removes a value from a set. O(1).\n     *\n     * Returns true if the value was removed from the set, that is if it was\n     * present.\n     */\n    function remove(UintSet storage set, uint256 value) internal returns (bool) {\n        return _remove(set._inner, bytes32(value));\n    }\n\n    /**\n     * @dev Returns true if the value is in the set. O(1).\n     */\n    function contains(UintSet storage set, uint256 value) internal view returns (bool) {\n        return _contains(set._inner, bytes32(value));\n    }\n\n    /**\n     * @dev Returns the number of values on the set. O(1).\n     */\n    function length(UintSet storage set) internal view returns (uint256) {\n        return _length(set._inner);\n    }\n\n    /**\n     * @dev Returns the value stored at position `index` in the set. O(1).\n     *\n     * Note that there are no guarantees on the ordering of values inside the\n     * array, and it may change when more values are added or removed.\n     *\n     * Requirements:\n     *\n     * - `index` must be strictly less than {length}.\n     */\n    function at(UintSet storage set, uint256 index) internal view returns (uint256) {\n        return uint256(_at(set._inner, index));\n    }\n\n    /**\n     * @dev Return the entire set in an array\n     *\n     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n     * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n     */\n    function values(UintSet storage set) internal view returns (uint256[] memory) {\n        bytes32[] memory store = _values(set._inner);\n        uint256[] memory result;\n\n        /// @solidity memory-safe-assembly\n        assembly {\n            result := store\n        }\n\n        return result;\n    }\n}\n"
      },
      "contracts/@galaxis/registries/contracts/CommunityList.sol": {
        "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity 0.8.25;\n\nimport \"@openzeppelin/contracts/access/AccessControlEnumerable.sol\";\nimport \"./Versionable/IVersionable.sol\";\n\ncontract CommunityList is AccessControlEnumerable, IVersionable { \n\n    function version() external pure returns (uint256) {\n        return 2024040301;\n    }\n\n    bytes32 public constant CONTRACT_ADMIN = keccak256(\"CONTRACT_ADMIN\");\n\n\n    uint256                              public numberOfEntries;\n\n    struct community_entry {\n        string      name;\n        address     registry;\n        uint32      id;\n    }\n    \n    mapping(uint32 => community_entry)  public communities;   // community_id => record\n    mapping(uint256 => uint32)           public index;         // entryNumber => community_id for enumeration\n\n    event CommunityAdded(uint256 pos, string community_name, address community_registry, uint32 community_id);\n\n    constructor() {\n        _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\n        _setupRole(CONTRACT_ADMIN,msg.sender);\n    }\n\n    function addCommunity(uint32 community_id, string memory community_name, address community_registry) external onlyRole(CONTRACT_ADMIN) {\n        uint256 pos = numberOfEntries++;\n        index[pos]  = community_id;\n        communities[community_id] = community_entry(community_name, community_registry, community_id);\n        emit CommunityAdded(pos, community_name, community_registry, community_id);\n    }\n\n}"
      },
      "contracts/@galaxis/registries/contracts/CommunityRegistry.sol": {
        "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity 0.8.25;\n\nimport \"@openzeppelin/contracts/access/AccessControlEnumerable.sol\";\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\nimport \"./Versionable/IVersionable.sol\";\nimport \"./UsesGalaxisRegistry.sol\";\n\ncontract CommunityRegistry is AccessControlEnumerable, UsesGalaxisRegistry, IVersionable  {\n\n    function version() virtual external pure returns(uint256) {\n        return 2024040401;\n    }\n\n    bytes32 public constant COMMUNITY_REGISTRY_ADMIN = keccak256(\"COMMUNITY_REGISTRY_ADMIN\");\n\n    uint32                      public  community_id;\n    string                      public  community_name;\n    \n\n    mapping(bytes32 => address)         addresses;\n    mapping(bytes32 => uint256)         uints;\n    mapping(bytes32 => bool)            booleans;\n    mapping(bytes32 => string)          strings;\n\n    mapping (uint => string)    public  addressEntries;\n    mapping (uint => string)    public  uintEntries;\n    mapping (uint => string)    public  boolEntries;\n    mapping (uint => string)    public  stringEntries;\n    uint                        public  numberOfAddresses;\n    uint                        public  numberOfUINTs;\n    uint                        public  numberOfBooleans;\n    uint                        public  numberOfStrings;\n\n    bool                                initialised;\n\n    bool                        public  independant;\n\n    event IndependanceDay(bool gain_independance);\n\n    modifier onlyAdmin() {\n        require(\n            isUserCommunityAdmin(COMMUNITY_REGISTRY_ADMIN,msg.sender)\n            ,\"CommunityRegistry : Unauthorised\");\n        _;\n    }\n\n    modifier onlyPropertyAdmin() {\n        require(\n            isUserCommunityAdmin(COMMUNITY_REGISTRY_ADMIN,msg.sender) ||\n            hasRole(COMMUNITY_REGISTRY_ADMIN,msg.sender)\n            ,\"CommunityRegistry : Unauthorised\");\n        _;\n    }\n\n\n\n    function isUserCommunityAdmin(bytes32 role, address user) public view returns (bool) {\n        if (hasRole(DEFAULT_ADMIN_ROLE,user) ) return true; // community_admin can do anything\n        if (independant){        \n            return(\n                hasRole(role,user)\n            );\n        } else { // for Factories\n           return(roleManager().hasRole(role,user));\n        }\n    }\n\n    function roleManager() internal view returns (IAccessControlEnumerable) {\n        address addr = galaxisRegistry.getRegistryAddress(\"ROLE_MANAGER\"); // universal\n        if (addr != address(0)) return IAccessControlEnumerable(addr);\n        addr = galaxisRegistry.getRegistryAddress(\"MAINNET_CHAIN_IMPLEMENTER\"); // mainnet\n        if (addr != address(0)) return IAccessControlEnumerable(addr);\n        addr = galaxisRegistry.getRegistryAddress(\"L2_RECEIVER\"); // mainnet\n        require(addr != address(0),\"CommunityRegistry : no higher authority found\");\n        return IAccessControlEnumerable(addr);\n    }\n\n    function grantRole(bytes32 key, address user) public override(AccessControl,IAccessControl) onlyAdmin {\n        _grantRole(key,user); // need to be able to grant it\n    }\n\n\n \n    constructor (\n        address _galaxisRegistry,\n        uint32  _community_id, \n        address _community_admin, \n        string memory _community_name\n    ) UsesGalaxisRegistry(_galaxisRegistry){\n        _init(_community_id,_community_admin,_community_name);\n    }\n\n    \n    function init(\n        uint32  _community_id, \n        address _community_admin, \n        string memory _community_name\n    ) external {\n        _init(_community_id,_community_admin,_community_name);\n    }\n\n    function _init(\n        uint32  _community_id, \n        address _community_admin, \n        string memory _community_name\n    ) internal {\n        require(!initialised,\"This can only be called once\");\n        initialised = true;\n        community_id = _community_id;\n        community_name  = _community_name;\n        _setupRole(DEFAULT_ADMIN_ROLE, _community_admin); // default admin = launchpad\n    }\n\n\n\n    event AdminUpdated(address user, bool isAdmin);\n    event AppAdminChanged(address app,address user,bool state);\n    //===\n    event AddressChanged(string key, address value);\n    event UintChanged(string key, uint256 value);\n    event BooleanChanged(string key, bool value);\n    event StringChanged(string key, string value);\n\n    function setIndependant(bool gain_independance) external onlyAdmin {\n        if (independant != gain_independance) {\n                independant = gain_independance;\n                emit IndependanceDay(gain_independance);\n        }\n    }\n\n\n    function setAdmin(address user,bool status ) external onlyAdmin {\n        if (status)\n            _grantRole(COMMUNITY_REGISTRY_ADMIN,user);\n        else\n            _revokeRole(COMMUNITY_REGISTRY_ADMIN,user);\n    }\n\n    function hash(string memory field) internal pure returns (bytes32) {\n        return keccak256(abi.encode(field));\n    }\n\n    function setRegistryAddress(string memory fn, address value) external onlyPropertyAdmin {\n        bytes32 hf = hash(fn);\n        addresses[hf] = value;\n        addressEntries[numberOfAddresses++] = fn;\n        emit AddressChanged(fn,value);\n    }\n\n    function setRegistryBool(string memory fn, bool value) external onlyPropertyAdmin {\n        bytes32 hf = hash(fn);\n        booleans[hf] = value;\n        boolEntries[numberOfBooleans++] = fn;\n        emit BooleanChanged(fn,value);\n    }\n\n    function setRegistryString(string memory fn, string memory value) external onlyPropertyAdmin {\n        bytes32 hf = hash(fn);\n        strings[hf] = value;\n        stringEntries[numberOfStrings++] = fn;\n        emit StringChanged(fn,value);\n    }\n\n    function setRegistryUINT(string memory fn, uint value) external onlyPropertyAdmin {\n        bytes32 hf = hash(fn);\n        uints[hf] = value;\n        uintEntries[numberOfUINTs++] = fn;\n        emit UintChanged(fn,value);\n    }\n\n    function getRegistryAddress(string memory key) external view returns (address) {\n        return addresses[hash(key)];\n    }\n\n    function getRegistryBool(string memory key) external view returns (bool) {\n        return booleans[hash(key)];\n    }\n\n    function getRegistryUINT(string memory key) external view returns (uint256) {\n        return uints[hash(key)];\n    }\n\n    function getRegistryString(string memory key) external view returns (string memory) {\n        return strings[hash(key)];\n    }\n\n}"
      },
      "contracts/@galaxis/registries/contracts/IRegistry.sol": {
        "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity 0.8.25;\n\ninterface IRegistry {\n    function setRegistryAddress(string memory fn, address value) external ;\n    function setRegistryBool(string memory fn, bool value) external ;\n    function setRegistryUINT(string memory key) external returns (uint256) ;\n    function setRegistryString(string memory fn, string memory value) external ;\n    function setAdmin(address user,bool status ) external;\n    function setAppAdmin(address app, address user, bool state) external;\n\n    function getRegistryAddress(string memory key) external view returns (address) ;\n    function getRegistryBool(string memory key) external view returns (bool);\n    function getRegistryUINT(string memory key) external view returns (uint256) ;\n    function getRegistryString(string memory key) external view returns (string memory) ;\n    function isAdmin(address user) external view returns (bool) ;\n    function isAppAdmin(address app, address user) external view returns (bool);\n}"
      },
      "contracts/@galaxis/registries/contracts/NewProxy.sol": {
        "content": "// SPDX-License-Identifier: CC0-1.0\npragma solidity 0.8.25;\n\nimport \"./UsesGalaxisRegistry.sol\";\n\n// EIP 1167 MinimalProxy Contract\ncontract NewProxy  is UsesGalaxisRegistry {\n    error FailedCreateClone();\n\n    constructor(address _galaxisRegistry) UsesGalaxisRegistry(_galaxisRegistry) {\n    }\n\n    function newProxy(string memory golden) public payable returns (address result) {\n        address target = galaxisRegistry.getRegistryAddress(golden);\n        bytes20 targetBytes = bytes20(target);\n        assembly {\n            let clone := mload(0x40)\n            mstore(clone, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)\n            mstore(add(clone, 0x14), targetBytes)\n            mstore(add(clone, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000)\n            result := create(0, clone, 0x37)\n        }\n        if (result == address(0)) {\n            revert FailedCreateClone();\n        }\n    }\n\n\n}\n\n\n\n"
      },
      "contracts/@galaxis/registries/contracts/UsesGalaxisRegistry.sol": {
        "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity 0.8.25;\n\nimport \"./IRegistry.sol\";\n\ncontract UsesGalaxisRegistry {\n\n    IRegistry   immutable   public   galaxisRegistry;\n\n    constructor(address _galaxisRegistry) {\n        galaxisRegistry = IRegistry(_galaxisRegistry);\n    }\n\n}"
      },
      "contracts/@galaxis/registries/contracts/Versionable/IVersionable.sol": {
        "content": "//SPDX-License-Identifier: Unlicensed\npragma solidity 0.8.25;\n\n/**\n * @title IVersionable\n * @dev Interface for versionable contracts.\n */\ninterface IVersionable {\n    /**\n     * @notice Get the current version of the contract.\n     * @return The current version.\n     */\n    function version() external pure returns (uint256);\n}\n"
      },
      "contracts/CCIP/Client.sol": {
        "content": "// SPDX-License-Identifier: UNLICENCED\npragma solidity 0.8.25;\n\nlibrary Client {\n  struct EVMTokenAmount {\n    address token; // token address on the local chain\n    uint256 amount;\n  }  \n\n  struct Any2EVMMessage {\n    bytes32 messageId; // MessageId corresponding to ccipSend on source\n    uint64 sourceChainSelector;\n    bytes sender; // abi.decode(sender) if coming from an EVM chain\n    bytes data; // payload sent in original message\n    EVMTokenAmount[] tokenAmounts;\n  }\n\n  // If extraArgs is empty bytes, the default is \n  // 200k gas limit and strict = false. \n  struct EVM2AnyMessage {\n    bytes receiver; // abi.encode(receiver address) for dest EVM chains\n    bytes data; // Data payload \n    EVMTokenAmount[] tokenAmounts; // Token transfers\n    address feeToken; // Address of feeToken. address(0) means you will send msg.value.\n    bytes extraArgs; // Populate this with _argsToBytes(EVMExtraArgsV1)\n  }\n\n  // extraArgs will evolve to support new features\n  // bytes4(keccak256(\"CCIP EVMExtraArgsV1\"));\n  bytes4 public constant EVM_EXTRA_ARGS_V1_TAG = 0x97a657c9;\n  struct EVMExtraArgsV1 {\n    uint256 gasLimit; // ATTENTION!!! MAX GAS LIMIT 4M FOR ALPHA TESTING\n    bool strict; // See strict sequencing details below. \n  }\n  function _argsToBytes(EVMExtraArgsV1 memory extraArgs) internal pure returns (bytes memory bts) {\n    return abi.encodeWithSelector(EVM_EXTRA_ARGS_V1_TAG, extraArgs);\n  }\n}"
      },
      "contracts/CCIP/IOmniSender.sol": {
        "content": "// SPDX-License-Identifier: UNLICENCED\npragma solidity 0.8.25;\n\n\ninterface IOmniSender {\n        function sendDataPayFeeToken(\n        uint64 destinationChainSelector,\n        bytes memory receiver,\n        bytes memory data\n    ) external returns (bytes32);\n\n    function sendDataPayFeeTokenWithGas(\n        uint64 destinationChainSelector,\n        bytes memory receiver,\n        bytes memory data,\n        uint256 gasLimit\n    ) external returns (bytes32);\n\n}"
      },
      "contracts/CCIP/IRouterClient.sol": {
        "content": "// SPDX-License-Identifier: UNLICENCED\npragma solidity 0.8.25;\n\n// Client library above\nimport {Client} from \"./Client.sol\";\n\ninterface IRouterClient {\n  error UnsupportedDestinationChain(uint64 destinationChainSelector);\n  /// @dev Sender is not whitelisted\n  error SenderNotAllowed(address sender);\n  error InsufficientFeeTokenAmount();\n  /// @dev Sent msg.value with a non-empty feeToken\n  error InvalidMsgValue();\n\n  /// @notice Checks if the given chain selector is supported for sending/receiving.\n  /// @param chainSelector The chain to check\n  /// @return supported is true if it is supported, false if not\n  function isChainSupported(uint64 chainSelector) external view returns (bool supported);\n\n  /// @notice Gets a list of all supported tokens which can be sent or received\n  /// to/from a given chain selector.\n  /// @param chainSelector The chainSelector.\n  /// @return tokens The addresses of all tokens that are supported.\n  function getSupportedTokens(uint64 chainSelector) external view returns (address[] memory tokens);\n\n  /// @param destinationChainSelector The destination chain selector\n  /// @param message The cross-chain CCIP message including data and/or tokens\n  /// @return fee returns execution fee for the specified message\n  /// delivery to destination chain\n  /// @dev returns 0 fee on invalid message.\n  function getFee(uint64 destinationChainSelector, Client.EVM2AnyMessage memory message)\n  external\n  view\n  returns (uint256 fee);\n\n  /// @notice Request a message to be sent to the destination chain\n  /// @param destinationChainSelector The destination chain selector\n  /// @param message The cross-chain CCIP message including data and/or tokens\n  /// @return messageId The message ID\n  /// @dev Note if msg.value is larger than the required fee (from getFee) we accept\n  /// the overpayment with no refund.\n  function ccipSend(uint64 destinationChainSelector, Client.EVM2AnyMessage calldata message)\n  external\n  payable\n  returns (bytes32 messageId);\n}"
      },
      "contracts/CCIP/L2ChainImplementerBase.sol": {
        "content": "// SPDX-License-Identifier: UNLICENCED\npragma solidity 0.8.25;\n\nimport \"@openzeppelin/contracts/access/AccessControlEnumerable.sol\";\n\nimport \"../@galaxis/registries/contracts//CommunityRegistry.sol\";\nimport \"../@galaxis/registries/contracts/CommunityList.sol\";\nimport \"../@galaxis/registries/contracts/NewProxy.sol\";\n\nabstract contract L2ChainImplementerBase is AccessControlEnumerable, NewProxy {\n\n    bytes32 public constant COMMUNITY_REGISTRY_ADMIN = keccak256(\"COMMUNITY_REGISTRY_ADMIN\");\n\n    event MainnetCommunityRegistryCreated(uint32 community_id,address community_proxy);\n    event MainnetCommunityAlreadyExists(uint32 community_id);\n\n    constructor (address _galaxisRegistry) NewProxy(_galaxisRegistry) {\n\n    }\n\n    function createCommunity(\n        uint32 community_id,\n        address community_admin,\n        string memory community_name\n    ) external virtual;\n\n    // @dev the implemented `createCommunity` must call createMainnetCommunity to ensure\n    //      that the community also gets created on L1 to allow hybrid communities\n    //\n    //      ensure that the L2implementer contract has been allowed access by the community list\n    //      with role CONTRACT_ADMIN or the addCommunity call will fail\n    function createMainnetCommunity(\n        uint32 community_id,\n        address community_admin,\n        string memory community_name\n    ) internal {\n        address master_reg = galaxisRegistry.getRegistryAddress(\"MASTER_REGISTRY\");\n        \n        require(master_reg == msg.sender,\"L2ChainImplementer: Unauthorised access\");\n\n        // check that the community entry is not already there...\n        address cl = galaxisRegistry.getRegistryAddress(\"COMMUNITY_LIST\"); // one list so from galaxis registry\n        (,address community_registry,uint32 id) = CommunityList(cl).communities(community_id);\n        if ((id == community_id) && (community_registry == address(0))) { // second to ensure that Eth Classic can be handled\n            // community already deployed on mainnet\n            emit MainnetCommunityAlreadyExists(community_id);\n            return;\n        }\n\n        address community_proxy = newProxy(\"GOLDEN_COMMUNITY_REGISTRY\"); // all golden contracts should start with `GOLDEN_`\n        CommunityRegistry cr = CommunityRegistry(address(community_proxy));\n        cr.init(community_id,community_admin,community_name);\n        \n        CommunityList(cl).addCommunity(community_id, community_name,address(community_proxy)); // now the community list holds the registry address\n\n        emit MainnetCommunityRegistryCreated(community_id,address(community_proxy));\n    }\n\n\n}"
      },
      "contracts/CCIP/OmniChainImplementer.sol": {
        "content": "// SPDX-License-Identifier: UNLICENCED\npragma solidity 0.8.25;\n\nimport \"./Client.sol\";\nimport \"./IRouterClient.sol\";\nimport \"./IOmniSender.sol\";\nimport \"../Traits/extras/recovery/BlackHolePrevention.sol\";\nimport \"./L2ChainImplementerBase.sol\";\n\ncontract OmniChainImplementer is AccessControlEnumerable, L2ChainImplementerBase, BlackHolePrevention {\n\n    bytes32 public constant CONTRACT_ADMIN = keccak256(\"CONTRACT_ADMIN\");\n\n    function version() virtual external view returns(uint256) {\n        return 2024040401;\n    }\n\n    string                    destinationChain;\n    uint64   immutable        destinationChainSelector;\n\n    mapping  (uint32 => bytes32) public ccip_txns;\n\n\n    event L2RecipientUpdated(address _fxChildTunnel);\n    event L2communityRegistryCreationRequest(uint32 community_id,address community_admin,string community_name);\n\n\n    // state sender contract\n    address                     public l2Recipient;\n    bytes                              recipient;\n    uint256                     public gasLimit;\n\n\n    constructor(\n        address _galaxisRegistry,\n        uint64 _destinationChainSelector,\n        string memory _destinationChain\n    ) L2ChainImplementerBase(_galaxisRegistry) {\n        destinationChainSelector = _destinationChainSelector;\n        destinationChain = _destinationChain;\n        _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\n        _setupRole(CONTRACT_ADMIN,msg.sender);\n    }\n\n    function setL2Recipient(address _l2Recipient) external onlyRole(CONTRACT_ADMIN) {\n        require(l2Recipient == address(0x0), \"OmniChainImplementer: DESTINATION_ALREADY_SET\");\n        _updateL2Recipient(_l2Recipient);\n    }\n\n    function updateL2Recipient(address _l2Recipient) external onlyRole(CONTRACT_ADMIN) {\n        _updateL2Recipient(_l2Recipient);\n    }\n\n    function updateGasLimit(uint256 _gasLimit) external onlyRole(CONTRACT_ADMIN) {\n        gasLimit = _gasLimit;\n    }\n\n\n    function _updateL2Recipient(address _l2Recipient) internal  {\n        l2Recipient = _l2Recipient;\n        recipient   = abi.encode(_l2Recipient);\n        emit L2RecipientUpdated(_l2Recipient);\n    }\n\n    function createCommunity(\n        uint32 community_id,\n        address community_admin,\n        string memory community_name\n    ) external override {\n        address master_reg = galaxisRegistry.getRegistryAddress(\"MASTER_REGISTRY\");\n        \n        require(master_reg == msg.sender,\"Unauthorised access\");\n        require(l2Recipient != address(0),\"L2 Recipient not set\");\n\n        // -----\n        bytes memory message = abi.encodePacked(community_id,community_admin,community_name);\n        if (gasLimit == 0) {\n            ccip_txns[community_id] = IOmniSender(galaxisRegistry.getRegistryAddress(\"OMNI_SENDER\")).\n                sendDataPayFeeToken(destinationChainSelector,recipient,message);\n        } else {\n            ccip_txns[community_id] = IOmniSender(galaxisRegistry.getRegistryAddress(\"OMNI_SENDER\")).\n                sendDataPayFeeTokenWithGas(destinationChainSelector,recipient,message,gasLimit);\n        }\n        \n        // -----\n        createMainnetCommunity(community_id,community_admin,community_name);\n\n        emit L2communityRegistryCreationRequest(\n            community_id,\n            community_admin,\n            community_name\n        );\n    }\n\n\n\n\n}"
      },
      "contracts/Traits/extras/recovery/BlackHolePrevention.sol": {
        "content": "// SPDX-License-Identifier: UNLICENCED\npragma solidity 0.8.25;\n\nimport \"@openzeppelin/contracts/token/ERC721/IERC721.sol\";\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\n\ncontract BlackHolePrevention is Ownable {\n    // blackhole prevention methods\n    function retrieveETH() external onlyOwner {\n        payable(msg.sender).transfer(address(this).balance);\n    }\n    \n    function retrieveERC20(address _tracker, uint256 amount) external onlyOwner {\n        IERC20(_tracker).transfer(msg.sender, amount);\n    }\n\n    function retrieve721(address _tracker, uint256 id) external onlyOwner {\n        IERC721(_tracker).transferFrom(address(this), msg.sender, id);\n    }\n}"
      }
    },
    "settings": {
      "optimizer": {
        "enabled": true,
        "runs": 200
      },
      "evmVersion": "paris",
      "outputSelection": {
        "*": {
          "*": [
            "evm.bytecode",
            "evm.deployedBytecode",
            "devdoc",
            "userdoc",
            "metadata",
            "abi"
          ]
        }
      },
      "libraries": {}
    }
  }}