Overview
ETH Balance
0 ETH
ETH Value
$0.00More Info
Private Name Tags
ContractCreator
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Latest 1 internal transaction
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
4973096 | 12 days ago | Contract Creation | 0 ETH |
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Source Code Verified (Exact Match)
Contract Name:
CommunityRegistryLauncher
Compiler Version
v0.8.25+commit.b61c2a91
ZkSolc Version
v1.5.12
Optimization Enabled:
Yes with Mode 3
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.25; import "./CommunityRegistry.sol"; import "./UsesGalaxisRegistry.sol"; contract CommunityRegistryLauncher is UsesGalaxisRegistry { constructor(address _galaxisRegistry) UsesGalaxisRegistry(_galaxisRegistry) { } function clone( address _galaxisRegistry, uint32 _community_id, address _community_admin, string memory _community_name ) external returns (CommunityRegistry) { require( msg.sender == galaxisRegistry.getRegistryAddress("MAINNET_CHAIN_IMPLEMENTER"), "CR Launcher : unauthorised" ); CommunityRegistry cr = new CommunityRegistry( _galaxisRegistry, _community_id, _community_admin, _community_name ); return cr; } }
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.25; import "@openzeppelin/contracts/access/extensions/AccessControlEnumerable.sol"; import "@openzeppelin/contracts/access/IAccessControl.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./Versionable/IVersionable.sol"; import "./UsesGalaxisRegistry.sol"; contract CommunityRegistry is AccessControlEnumerable, UsesGalaxisRegistry, IVersionable { function version() virtual external pure returns(uint256) { return 2024040401; } bytes32 public constant COMMUNITY_REGISTRY_ADMIN = keccak256("COMMUNITY_REGISTRY_ADMIN"); uint32 public community_id; string public community_name; mapping(bytes32 => address) addresses; mapping(bytes32 => uint256) uints; mapping(bytes32 => bool) booleans; mapping(bytes32 => string) strings; mapping (uint => string) public addressEntries; mapping (uint => string) public uintEntries; mapping (uint => string) public boolEntries; mapping (uint => string) public stringEntries; uint public numberOfAddresses; uint public numberOfUINTs; uint public numberOfBooleans; uint public numberOfStrings; bool initialised; bool public independant; event IndependanceDay(bool gain_independance); modifier onlyAdmin() { require( isUserCommunityAdmin(COMMUNITY_REGISTRY_ADMIN,msg.sender) ,"CommunityRegistry : Unauthorised"); _; } modifier onlyPropertyAdmin() { require( isUserCommunityAdmin(COMMUNITY_REGISTRY_ADMIN,msg.sender) || hasRole(COMMUNITY_REGISTRY_ADMIN,msg.sender) ,"CommunityRegistry : Unauthorised"); _; } function isUserCommunityAdmin(bytes32 role, address user) public view returns (bool) { if (hasRole(DEFAULT_ADMIN_ROLE,user) ) return true; // community_admin can do anything if (independant){ return( hasRole(role,user) ); } else { // for Factories return(roleManager().hasRole(role,user)); } } function roleManager() internal view returns (IAccessControlEnumerable) { address addr = galaxisRegistry.getRegistryAddress("ROLE_MANAGER"); // universal if (addr != address(0)) return IAccessControlEnumerable(addr); addr = galaxisRegistry.getRegistryAddress("MAINNET_CHAIN_IMPLEMENTER"); // mainnet if (addr != address(0)) return IAccessControlEnumerable(addr); addr = galaxisRegistry.getRegistryAddress("L2_RECEIVER"); // mainnet require(addr != address(0),"CommunityRegistry : no higher authority found"); return IAccessControlEnumerable(addr); } function grantRole(bytes32 key, address user) public override(AccessControl,IAccessControl) onlyAdmin { _grantRole(key,user); // need to be able to grant it } constructor ( address _galaxisRegistry, uint32 _community_id, address _community_admin, string memory _community_name ) UsesGalaxisRegistry(_galaxisRegistry){ _init(_community_id,_community_admin,_community_name); } function init( uint32 _community_id, address _community_admin, string memory _community_name ) external { _init(_community_id,_community_admin,_community_name); } function _init( uint32 _community_id, address _community_admin, string memory _community_name ) internal { require(!initialised,"This can only be called once"); initialised = true; community_id = _community_id; community_name = _community_name; _grantRole(DEFAULT_ADMIN_ROLE, _community_admin); // default admin = launchpad } event AdminUpdated(address user, bool isAdmin); event AppAdminChanged(address app,address user,bool state); //=== event AddressChanged(string key, address value); event UintChanged(string key, uint256 value); event BooleanChanged(string key, bool value); event StringChanged(string key, string value); function setIndependant(bool gain_independance) external onlyAdmin { if (independant != gain_independance) { independant = gain_independance; emit IndependanceDay(gain_independance); } } function setAdmin(address user,bool status ) external onlyAdmin { if (status) _grantRole(COMMUNITY_REGISTRY_ADMIN,user); else _revokeRole(COMMUNITY_REGISTRY_ADMIN,user); } function hash(string memory field) internal pure returns (bytes32) { return keccak256(abi.encode(field)); } function setRegistryAddress(string memory fn, address value) external onlyPropertyAdmin { bytes32 hf = hash(fn); addresses[hf] = value; addressEntries[numberOfAddresses++] = fn; emit AddressChanged(fn,value); } function setRegistryBool(string memory fn, bool value) external onlyPropertyAdmin { bytes32 hf = hash(fn); booleans[hf] = value; boolEntries[numberOfBooleans++] = fn; emit BooleanChanged(fn,value); } function setRegistryString(string memory fn, string memory value) external onlyPropertyAdmin { bytes32 hf = hash(fn); strings[hf] = value; stringEntries[numberOfStrings++] = fn; emit StringChanged(fn,value); } function setRegistryUINT(string memory fn, uint value) external onlyPropertyAdmin { bytes32 hf = hash(fn); uints[hf] = value; uintEntries[numberOfUINTs++] = fn; emit UintChanged(fn,value); } function getRegistryAddress(string memory key) external view returns (address) { return addresses[hash(key)]; } function getRegistryBool(string memory key) external view returns (bool) { return booleans[hash(key)]; } function getRegistryUINT(string memory key) external view returns (uint256) { return uints[hash(key)]; } function getRegistryString(string memory key) external view returns (string memory) { return strings[hash(key)]; } }
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.25; import "./IRegistry.sol"; contract UsesGalaxisRegistry { IRegistry immutable public galaxisRegistry; constructor(address _galaxisRegistry) { galaxisRegistry = IRegistry(_galaxisRegistry); } }
//SPDX-License-Identifier: Unlicensed pragma solidity 0.8.25; /** * @title IVersionable * @dev Interface for versionable contracts. */ interface IVersionable { /** * @notice Get the current version of the contract. * @return The current version. */ function version() external pure returns (uint256); }
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.25; interface IRegistry { function setRegistryAddress(string memory fn, address value) external ; function setRegistryBool(string memory fn, bool value) external ; function setRegistryUINT(string memory key) external returns (uint256) ; function setRegistryString(string memory fn, string memory value) external ; function setAdmin(address user,bool status ) external; function setAppAdmin(address app, address user, bool state) external; function getRegistryAddress(string memory key) external view returns (address) ; function getRegistryBool(string memory key) external view returns (bool); function getRegistryUINT(string memory key) external view returns (uint256) ; function getRegistryString(string memory key) external view returns (string memory) ; function isAdmin(address user) external view returns (bool) ; function isAppAdmin(address app, address user) external view returns (bool); function numberOfAddresses() external view returns(uint256); function addressEntries(uint256) external view returns(string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (access/IAccessControl.sol) pragma solidity ^0.8.20; /** * @dev External interface of AccessControl declared to support ERC-165 detection. */ interface IAccessControl { /** * @dev The `account` is missing a role. */ error AccessControlUnauthorizedAccount(address account, bytes32 neededRole); /** * @dev The caller of a function is not the expected one. * * NOTE: Don't confuse with {AccessControlUnauthorizedAccount}. */ error AccessControlBadConfirmation(); /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call. This account bears the admin role (for the granted role). * Expected in cases where the role was granted using the internal {AccessControl-_grantRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `callerConfirmation`. */ function renounceRole(bytes32 role, address callerConfirmation) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (access/extensions/AccessControlEnumerable.sol) pragma solidity ^0.8.20; import {IAccessControlEnumerable} from "./IAccessControlEnumerable.sol"; import {AccessControl} from "../AccessControl.sol"; import {EnumerableSet} from "../../utils/structs/EnumerableSet.sol"; /** * @dev Extension of {AccessControl} that allows enumerating the members of each role. */ abstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl { using EnumerableSet for EnumerableSet.AddressSet; mapping(bytes32 role => EnumerableSet.AddressSet) private _roleMembers; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns one of the accounts that have `role`. `index` must be a * value between 0 and {getRoleMemberCount}, non-inclusive. * * Role bearers are not sorted in any particular way, and their ordering may * change at any point. * * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure * you perform all queries on the same block. See the following * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] * for more information. */ function getRoleMember(bytes32 role, uint256 index) public view virtual returns (address) { return _roleMembers[role].at(index); } /** * @dev Returns the number of accounts that have `role`. Can be used * together with {getRoleMember} to enumerate all bearers of a role. */ function getRoleMemberCount(bytes32 role) public view virtual returns (uint256) { return _roleMembers[role].length(); } /** * @dev Return all accounts that have `role` * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function getRoleMembers(bytes32 role) public view virtual returns (address[] memory) { return _roleMembers[role].values(); } /** * @dev Overload {AccessControl-_grantRole} to track enumerable memberships */ function _grantRole(bytes32 role, address account) internal virtual override returns (bool) { bool granted = super._grantRole(role, account); if (granted) { _roleMembers[role].add(account); } return granted; } /** * @dev Overload {AccessControl-_revokeRole} to track enumerable memberships */ function _revokeRole(bytes32 role, address account) internal virtual override returns (bool) { bool revoked = super._revokeRole(role, account); if (revoked) { _roleMembers[role].remove(account); } return revoked; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol) pragma solidity ^0.8.20; import {Context} from "../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. * * The initial owner is set to the address provided by the deployer. 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; /** * @dev The caller account is not authorized to perform an operation. */ error OwnableUnauthorizedAccount(address account); /** * @dev The owner is not a valid owner account. (eg. `address(0)`) */ error OwnableInvalidOwner(address owner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the address provided by the deployer as the initial owner. */ constructor(address initialOwner) { if (initialOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(initialOwner); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { if (owner() != _msgSender()) { revert OwnableUnauthorizedAccount(_msgSender()); } } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(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 { if (newOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/AccessControl.sol) pragma solidity ^0.8.20; import {IAccessControl} from "./IAccessControl.sol"; import {Context} from "../utils/Context.sol"; import {ERC165} from "../utils/introspection/ERC165.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ```solidity * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ```solidity * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules} * to enforce additional security measures for this role. */ abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address account => bool) hasRole; bytes32 adminRole; } mapping(bytes32 role => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with an {AccessControlUnauthorizedAccount} error including the required role. */ modifier onlyRole(bytes32 role) { _checkRole(role); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view virtual returns (bool) { return _roles[role].hasRole[account]; } /** * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `_msgSender()` * is missing `role`. Overriding this function changes the behavior of the {onlyRole} modifier. */ function _checkRole(bytes32 role) internal view virtual { _checkRole(role, _msgSender()); } /** * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `account` * is missing `role`. */ function _checkRole(bytes32 role, address account) internal view virtual { if (!hasRole(role, account)) { revert AccessControlUnauthorizedAccount(account, role); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view virtual returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleGranted} event. */ function grantRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleRevoked} event. */ function revokeRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `callerConfirmation`. * * May emit a {RoleRevoked} event. */ function renounceRole(bytes32 role, address callerConfirmation) public virtual { if (callerConfirmation != _msgSender()) { revert AccessControlBadConfirmation(); } _revokeRole(role, callerConfirmation); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Attempts to grant `role` to `account` and returns a boolean indicating if `role` was granted. * * Internal function without access restriction. * * May emit a {RoleGranted} event. */ function _grantRole(bytes32 role, address account) internal virtual returns (bool) { if (!hasRole(role, account)) { _roles[role].hasRole[account] = true; emit RoleGranted(role, account, _msgSender()); return true; } else { return false; } } /** * @dev Attempts to revoke `role` to `account` and returns a boolean indicating if `role` was revoked. * * Internal function without access restriction. * * May emit a {RoleRevoked} event. */ function _revokeRole(bytes32 role, address account) internal virtual returns (bool) { if (hasRole(role, account)) { _roles[role].hasRole[account] = false; emit RoleRevoked(role, account, _msgSender()); return true; } else { return false; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (utils/structs/EnumerableSet.sol) // This file was procedurally generated from scripts/generate/templates/EnumerableSet.js. pragma solidity ^0.8.20; /** * @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. * * ```solidity * 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. * * [WARNING] * ==== * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure * unusable. * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info. * * 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. * ==== */ 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 is the index of the value in the `values` array plus 1. // Position 0 is used to mean a value is not in the set. mapping(bytes32 value => uint256) _positions; } /** * @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._positions[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 cache the value's position to prevent multiple reads from the same storage slot uint256 position = set._positions[value]; if (position != 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 valueIndex = position - 1; uint256 lastIndex = set._values.length - 1; if (valueIndex != lastIndex) { bytes32 lastValue = set._values[lastIndex]; // Move the lastValue to the index where the value to delete is set._values[valueIndex] = lastValue; // Update the tracked position of the lastValue (that was just moved) set._positions[lastValue] = position; } // Delete the slot where the moved value was stored set._values.pop(); // Delete the tracked position for the deleted slot delete set._positions[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._positions[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]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // 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); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { bytes32[] memory store = _values(set._inner); bytes32[] memory result; assembly ("memory-safe") { result := store } return result; } // 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)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; assembly ("memory-safe") { result := store } return result; } // 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 in 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)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; assembly ("memory-safe") { result := store } return result; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (access/extensions/IAccessControlEnumerable.sol) pragma solidity ^0.8.20; import {IAccessControl} from "../IAccessControl.sol"; /** * @dev External interface of AccessControlEnumerable declared to support ERC-165 detection. */ interface IAccessControlEnumerable is IAccessControl { /** * @dev Returns one of the accounts that have `role`. `index` must be a * value between 0 and {getRoleMemberCount}, non-inclusive. * * Role bearers are not sorted in any particular way, and their ordering may * change at any point. * * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure * you perform all queries on the same block. See the following * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] * for more information. */ function getRoleMember(bytes32 role, uint256 index) external view returns (address); /** * @dev Returns the number of accounts that have `role`. Can be used * together with {getRoleMember} to enumerate all bearers of a role. */ function getRoleMemberCount(bytes32 role) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol) pragma solidity ^0.8.20; /** * @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; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/ERC165.sol) pragma solidity ^0.8.20; import {IERC165} from "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC-165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/IERC165.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC-165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[ERC]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
{ "evmVersion": "paris", "optimizer": { "enabled": true, "mode": "3" }, "outputSelection": { "*": { "*": [ "abi" ] } }, "detectMissingLibraries": false, "forceEVMLA": false, "enableEraVMExtensions": false, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_galaxisRegistry","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"_galaxisRegistry","type":"address"},{"internalType":"uint32","name":"_community_id","type":"uint32"},{"internalType":"address","name":"_community_admin","type":"address"},{"internalType":"string","name":"_community_name","type":"string"}],"name":"clone","outputs":[{"internalType":"contract CommunityRegistry","name":"","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"galaxisRegistry","outputs":[{"internalType":"contract IRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
9c4d535b00000000000000000000000000000000000000000000000000000000000000000100008bf89a77bd390b652f22f5875f0b5071f5acd2f77f1d0515b425c9426000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000020000000000000000000000000f8274c5e5149a6e0fc5190483323a1b399896a8a
Deployed Bytecode
0x00020000000000020006000000000002000100000001035500000060031002700000006f0030019d0000006f033001970000000100200190000000200000c13d0000008002000039000000400020043f000000040030008c0000007c0000413d000000000201043b000000e002200270000000740020009c0000004c0000613d000000750020009c0000007c0000c13d0000000001000416000000000001004b0000007c0000c13d0000000001000412000600000001001d000500000000003d0000000001000415000000060110008a000000050110021001b401970000040f0000007201100197000000800010043f0000008701000041000001b50001042e0000000002000416000000000002004b0000007c0000c13d0000001f023000390000007002200197000000a002200039000000400020043f0000001f0430018f0000007105300198000000a002500039000000310000613d000000a006000039000000000701034f000000007807043c0000000006860436000000000026004b0000002d0000c13d000000000004004b0000003e0000613d000000000151034f0000000304400210000000000502043300000000054501cf000000000545022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000200030008c0000007c0000413d000000a00100043d000000720010009c0000007c0000213d000000800010043f0000014000000443000001600010044300000020010000390000010000100443000000010100003900000120001004430000007301000041000001b50001042e000000840030008c0000007c0000413d0000000002000416000000000002004b0000007c0000c13d0000000402100370000000000802043b000000720080009c0000007c0000213d0000002402100370000000000902043b0000006f0090009c0000007c0000213d0000004402100370000000000a02043b0000007200a0009c0000007c0000213d0000006402100370000000000402043b000000760040009c0000007c0000213d0000002302400039000000000032004b0000007c0000813d0000000405400039000000000251034f000000000202043b000000770020009c0000006f0000813d0000001f0620003900000088066001970000003f066000390000008806600197000000780060009c000000750000a13d0000008501000041000000000010043f0000004101000039000000040010043f0000008601000041000001b6000104300000008006600039000000400060043f000000800020043f00000000042400190000002404400039000000000034004b0000007e0000a13d0000000001000019000001b600010430000300000008001d0000002003500039000000000331034f00000088042001980000001f0520018f000000a0014000390000008b0000613d000000a006000039000000000703034f000000007807043c0000000006860436000000000016004b000000870000c13d00010000000a001d000200000009001d000000000005004b0000009a0000613d000000000343034f0000000304500210000000000501043300000000054501cf000000000545022f000000000303043b0000010004400089000000000343022f00000000034301cf000000000353019f0000000000310435000000a0012000390000000000010435000000400300043d0000004401300039000000790200004100000000002104350000002401300039000000190200003900000000002104350000007a010000410000000000130435000400000003001d0000000401300039000000200200003900000000002104350000007b01000041000000000010044300000000010004120000000400100443000000240000044300000000010004140000006f0010009c0000006f01008041000000c0011002100000007c011001c7000080050200003901b401af0000040f0000000100200190000001460000613d000000000201043b00000004010000290000006f0010009c0000006f01008041000000400110021000000000030004140000006f0030009c0000006f03008041000000c003300210000000000113019f0000007d011001c7000000720220019701b401af0000040f00000060031002700000006f03300197000000200030008c000000200400003900000000040340190000001f0640018f0000002007400190000000040b00002900000000057b0019000000d40000613d000000000801034f00000000090b0019000000008a08043c0000000009a90436000000000059004b000000d00000c13d000000000006004b000000e10000613d000000000771034f0000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f00000000006504350000000100200190000001470000613d0000001f01400039000000600210018f0000000001b20019000000000021004b00000000020000390000000102004039000000760010009c0000006f0000213d00000001002001900000006f0000c13d000000400010043f000000200030008c0000007c0000413d00000000020b04330000007e0020009c0000007c0000813d0000000003000411000000000023004b000001650000c13d000000810010009c00000080060000390000000302000029000000020300002900000001040000290000006f0000213d00000072022001970000006f033001970000007204400197000000e4051000390000000000650435000000c4051000390000000000450435000000a40410003900000000003404350000008403100039000000000023043500000024021000390000006e0300004100000000003204350000010403100039000000800200043d00000000002304350000012403100039000000000002004b000001180000613d00000000040000190000000005340019000000a006400039000000000606043300000000006504350000002004400039000000000024004b000001110000413d000000000332001900000000000304350000001f022000390000008802200197000000a003200039000000640410003900000000050004140000000000340435000000440310003900000060040000390000000000430435000000820300004100000000003104350000000403100039000000000003043500000124022000390000006f0020009c0000006f0200804100000060022002100000006f0010009c0000006f010080410000004001100210000000000112019f0000006f0050009c0000006f05008041000000c002500210000000000112019f00000083011001c7000080060200003901b401aa0000040f0000000100200190000001750000613d00000000020000310000000103200367000000000101043b000000000001004b0000000002000019000001780000613d0000007201100197000000400200043d00000000001204350000006f0020009c0000006f02008041000000400120021000000084011001c7000001b50001042e000000000001042f0000001f0530018f0000007106300198000000400200043d0000000004620019000001520000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000048004b0000014e0000c13d000000000005004b0000015f0000613d000000000161034f0000000305500210000000000604043300000000065601cf000000000656022f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f000000000014043500000060013002100000006f0020009c0000006f020080410000004002200210000000000112019f000001b60001043000000044021000390000007f03000041000000000032043500000024021000390000001a030000390000000000320435000000800200004100000000002104350000000402100039000000200300003900000000003204350000006f0010009c0000006f0100804100000040011002100000007d011001c7000001b60001043000000060021002700000006f02200197000000000301034f0000001f0520018f0000007106200198000000400100043d0000000004610019000001830000613d000000000703034f0000000008010019000000007907043c0000000008980436000000000048004b0000017f0000c13d000000000005004b000001900000613d000000000363034f0000000305500210000000000604043300000000065601cf000000000656022f000000000303043b0000010005500089000000000353022f00000000035301cf000000000363019f000000000034043500000060022002100000006f0010009c0000006f010080410000004001100210000000000121019f000001b600010430000000000001042f0000007b0200004100000000002004430000000501100270000000000201003100000004002004430000000101010031000000240010044300000000010004140000006f0010009c0000006f01008041000000c0011002100000007c011001c7000080050200003901b401af0000040f0000000100200190000001a90000613d000000000101043b000000000001042d000000000001042f000001ad002104210000000102000039000000000001042d0000000002000019000000000001042d000001b2002104230000000102000039000000000001042d0000000002000019000000000001042d000001b400000432000001b50001042e000001b60001043000000000000000000100052d725654905356e150bbfe5c8fc66c4b9dfc96468692c228921fd184f200000000000000000000000000000000000000000000000000000000ffffffff00000000000000000000000000000000000000000000000000000001ffffffe000000000000000000000000000000000000000000000000000000000ffffffe0000000000000000000000000ffffffffffffffffffffffffffffffffffffffff000000020000000000000000000000000000008000000100000000000000000000000000000000000000000000000000000000000000000000000000f5997f0a000000000000000000000000000000000000000000000000000000007671114d000000000000000000000000000000000000000000000000ffffffffffffffff0000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000ffffffffffffff7f4d41494e4e45545f434841494e5f494d504c454d454e5445520000000000000074b9982c00000000000000000000000000000000000000000000000000000000310ab089e4439a4c15d089f94afb7896ff553aecb10793d0ab882de59d99a32e0200000200000000000000000000000000000044000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000100000000000000000000000000000000000000004352204c61756e63686572203a20756e617574686f726973656400000000000008c379a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffff7b9c4d535bdea7cd8a978f128b93471df48c7dbab89d703809115bdc118c235bfd020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000004e487b710000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000240000000000000000000000000000000000000000000000000000000000000020000000800000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe00000000000000000000000000000000000000000000000000000000000000000f7a059a5fa1b26291fb3ed3ae2791278074fce40b982c6d10a520ead454f10ac
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000f8274c5e5149a6e0fc5190483323a1b399896a8a
-----Decoded View---------------
Arg [0] : _galaxisRegistry (address): 0xF8274c5E5149a6e0FC5190483323a1B399896a8A
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000f8274c5e5149a6e0fc5190483323a1b399896a8a
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.