编译器
0.8.25+commit.b61c2a91
文件 1 的 17:AccessControl.sol
pragma solidity ^0.8.0;
import "./IAccessControl.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";
abstract contract AccessControl is Context, IAccessControl, ERC165 {
struct RoleData {
mapping(address => bool) members;
bytes32 adminRole;
}
mapping(bytes32 => RoleData) private _roles;
bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;
modifier onlyRole(bytes32 role) {
_checkRole(role);
_;
}
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);
}
function hasRole(bytes32 role, address account) public view virtual override returns (bool) {
return _roles[role].members[account];
}
function _checkRole(bytes32 role) internal view virtual {
_checkRole(role, _msgSender());
}
function _checkRole(bytes32 role, address account) internal view virtual {
if (!hasRole(role, account)) {
revert(
string(
abi.encodePacked(
"AccessControl: account ",
Strings.toHexString(uint160(account), 20),
" is missing role ",
Strings.toHexString(uint256(role), 32)
)
)
);
}
}
function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {
return _roles[role].adminRole;
}
function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
_grantRole(role, account);
}
function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
_revokeRole(role, account);
}
function renounceRole(bytes32 role, address account) public virtual override {
require(account == _msgSender(), "AccessControl: can only renounce roles for self");
_revokeRole(role, account);
}
function _setupRole(bytes32 role, address account) internal virtual {
_grantRole(role, account);
}
function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
bytes32 previousAdminRole = getRoleAdmin(role);
_roles[role].adminRole = adminRole;
emit RoleAdminChanged(role, previousAdminRole, adminRole);
}
function _grantRole(bytes32 role, address account) internal virtual {
if (!hasRole(role, account)) {
_roles[role].members[account] = true;
emit RoleGranted(role, account, _msgSender());
}
}
function _revokeRole(bytes32 role, address account) internal virtual {
if (hasRole(role, account)) {
_roles[role].members[account] = false;
emit RoleRevoked(role, account, _msgSender());
}
}
}
文件 2 的 17:AccessControlEnumerable.sol
pragma solidity ^0.8.0;
import "./IAccessControlEnumerable.sol";
import "./AccessControl.sol";
import "../utils/structs/EnumerableSet.sol";
abstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl {
using EnumerableSet for EnumerableSet.AddressSet;
mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers;
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId);
}
function getRoleMember(bytes32 role, uint256 index) public view virtual override returns (address) {
return _roleMembers[role].at(index);
}
function getRoleMemberCount(bytes32 role) public view virtual override returns (uint256) {
return _roleMembers[role].length();
}
function _grantRole(bytes32 role, address account) internal virtual override {
super._grantRole(role, account);
_roleMembers[role].add(account);
}
function _revokeRole(bytes32 role, address account) internal virtual override {
super._revokeRole(role, account);
_roleMembers[role].remove(account);
}
}
文件 3 的 17:CommunityList.sol
pragma solidity 0.8.25;
import "@openzeppelin/contracts/access/AccessControlEnumerable.sol";
import "./Versionable/IVersionable.sol";
contract CommunityList is AccessControlEnumerable, IVersionable {
function version() external pure returns (uint256) {
return 2024040301;
}
bytes32 public constant CONTRACT_ADMIN = keccak256("CONTRACT_ADMIN");
uint256 public numberOfEntries;
struct community_entry {
string name;
address registry;
uint32 id;
}
mapping(uint32 => community_entry) public communities;
mapping(uint256 => uint32) public index;
event CommunityAdded(uint256 pos, string community_name, address community_registry, uint32 community_id);
constructor() {
_setupRole(DEFAULT_ADMIN_ROLE, msg.sender);
_setupRole(CONTRACT_ADMIN,msg.sender);
}
function addCommunity(uint32 community_id, string memory community_name, address community_registry) external onlyRole(CONTRACT_ADMIN) {
uint256 pos = numberOfEntries++;
index[pos] = community_id;
communities[community_id] = community_entry(community_name, community_registry, community_id);
emit CommunityAdded(pos, community_name, community_registry, community_id);
}
}
文件 4 的 17:CommunityRegistry.sol
pragma solidity 0.8.25;
import "@openzeppelin/contracts/access/AccessControlEnumerable.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;
if (independant){
return(
hasRole(role,user)
);
} else {
return(roleManager().hasRole(role,user));
}
}
function roleManager() internal view returns (IAccessControlEnumerable) {
address addr = galaxisRegistry.getRegistryAddress("ROLE_MANAGER");
if (addr != address(0)) return IAccessControlEnumerable(addr);
addr = galaxisRegistry.getRegistryAddress("MAINNET_CHAIN_IMPLEMENTER");
if (addr != address(0)) return IAccessControlEnumerable(addr);
addr = galaxisRegistry.getRegistryAddress("L2_RECEIVER");
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);
}
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;
_setupRole(DEFAULT_ADMIN_ROLE, _community_admin);
}
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)];
}
}
文件 5 的 17:Context.sol
pragma solidity ^0.8.0;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}
文件 6 的 17:ERC165.sol
pragma solidity ^0.8.0;
import "./IERC165.sol";
abstract contract ERC165 is IERC165 {
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IERC165).interfaceId;
}
}
文件 7 的 17:EnumerableSet.sol
pragma solidity ^0.8.0;
library EnumerableSet {
struct Set {
bytes32[] _values;
mapping(bytes32 => uint256) _indexes;
}
function _add(Set storage set, bytes32 value) private returns (bool) {
if (!_contains(set, value)) {
set._values.push(value);
set._indexes[value] = set._values.length;
return true;
} else {
return false;
}
}
function _remove(Set storage set, bytes32 value) private returns (bool) {
uint256 valueIndex = set._indexes[value];
if (valueIndex != 0) {
uint256 toDeleteIndex = valueIndex - 1;
uint256 lastIndex = set._values.length - 1;
if (lastIndex != toDeleteIndex) {
bytes32 lastValue = set._values[lastIndex];
set._values[toDeleteIndex] = lastValue;
set._indexes[lastValue] = valueIndex;
}
set._values.pop();
delete set._indexes[value];
return true;
} else {
return false;
}
}
function _contains(Set storage set, bytes32 value) private view returns (bool) {
return set._indexes[value] != 0;
}
function _length(Set storage set) private view returns (uint256) {
return set._values.length;
}
function _at(Set storage set, uint256 index) private view returns (bytes32) {
return set._values[index];
}
function _values(Set storage set) private view returns (bytes32[] memory) {
return set._values;
}
struct Bytes32Set {
Set _inner;
}
function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
return _add(set._inner, value);
}
function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
return _remove(set._inner, value);
}
function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
return _contains(set._inner, value);
}
function length(Bytes32Set storage set) internal view returns (uint256) {
return _length(set._inner);
}
function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
return _at(set._inner, index);
}
function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {
return _values(set._inner);
}
struct AddressSet {
Set _inner;
}
function add(AddressSet storage set, address value) internal returns (bool) {
return _add(set._inner, bytes32(uint256(uint160(value))));
}
function remove(AddressSet storage set, address value) internal returns (bool) {
return _remove(set._inner, bytes32(uint256(uint160(value))));
}
function contains(AddressSet storage set, address value) internal view returns (bool) {
return _contains(set._inner, bytes32(uint256(uint160(value))));
}
function length(AddressSet storage set) internal view returns (uint256) {
return _length(set._inner);
}
function at(AddressSet storage set, uint256 index) internal view returns (address) {
return address(uint160(uint256(_at(set._inner, index))));
}
function values(AddressSet storage set) internal view returns (address[] memory) {
bytes32[] memory store = _values(set._inner);
address[] memory result;
assembly {
result := store
}
return result;
}
struct UintSet {
Set _inner;
}
function add(UintSet storage set, uint256 value) internal returns (bool) {
return _add(set._inner, bytes32(value));
}
function remove(UintSet storage set, uint256 value) internal returns (bool) {
return _remove(set._inner, bytes32(value));
}
function contains(UintSet storage set, uint256 value) internal view returns (bool) {
return _contains(set._inner, bytes32(value));
}
function length(UintSet storage set) internal view returns (uint256) {
return _length(set._inner);
}
function at(UintSet storage set, uint256 index) internal view returns (uint256) {
return uint256(_at(set._inner, index));
}
function values(UintSet storage set) internal view returns (uint256[] memory) {
bytes32[] memory store = _values(set._inner);
uint256[] memory result;
assembly {
result := store
}
return result;
}
}
文件 8 的 17:IAccessControl.sol
pragma solidity ^0.8.0;
interface IAccessControl {
event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);
event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);
event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);
function hasRole(bytes32 role, address account) external view returns (bool);
function getRoleAdmin(bytes32 role) external view returns (bytes32);
function grantRole(bytes32 role, address account) external;
function revokeRole(bytes32 role, address account) external;
function renounceRole(bytes32 role, address account) external;
}
文件 9 的 17:IAccessControlEnumerable.sol
pragma solidity ^0.8.0;
import "./IAccessControl.sol";
interface IAccessControlEnumerable is IAccessControl {
function getRoleMember(bytes32 role, uint256 index) external view returns (address);
function getRoleMemberCount(bytes32 role) external view returns (uint256);
}
文件 10 的 17:IERC165.sol
pragma solidity ^0.8.0;
interface IERC165 {
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}
文件 11 的 17:IRegistry.sol
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);
}
文件 12 的 17:IVersionable.sol
pragma solidity 0.8.25;
interface IVersionable {
function version() external pure returns (uint256);
}
文件 13 的 17:NewProxy.sol
pragma solidity 0.8.25;
import "./UsesGalaxisRegistry.sol";
contract NewProxy is UsesGalaxisRegistry {
error FailedCreateClone();
constructor(address _galaxisRegistry) UsesGalaxisRegistry(_galaxisRegistry) {
}
function newProxy(string memory golden) public payable returns (address result) {
address target = galaxisRegistry.getRegistryAddress(golden);
bytes20 targetBytes = bytes20(target);
assembly {
let clone := mload(0x40)
mstore(clone, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)
mstore(add(clone, 0x14), targetBytes)
mstore(add(clone, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000)
result := create(0, clone, 0x37)
}
if (result == address(0)) {
revert FailedCreateClone();
}
}
}
文件 14 的 17:Ownable.sol
pragma solidity ^0.8.0;
import "../utils/Context.sol";
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor() {
_transferOwnership(_msgSender());
}
modifier onlyOwner() {
_checkOwner();
_;
}
function owner() public view virtual returns (address) {
return _owner;
}
function _checkOwner() internal view virtual {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
}
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}
文件 15 的 17:Strings.sol
pragma solidity ^0.8.0;
library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
uint8 private constant _ADDRESS_LENGTH = 20;
function toString(uint256 value) internal pure returns (string memory) {
if (value == 0) {
return "0";
}
uint256 temp = value;
uint256 digits;
while (temp != 0) {
digits++;
temp /= 10;
}
bytes memory buffer = new bytes(digits);
while (value != 0) {
digits -= 1;
buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
value /= 10;
}
return string(buffer);
}
function toHexString(uint256 value) internal pure returns (string memory) {
if (value == 0) {
return "0x00";
}
uint256 temp = value;
uint256 length = 0;
while (temp != 0) {
length++;
temp >>= 8;
}
return toHexString(value, length);
}
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = _HEX_SYMBOLS[value & 0xf];
value >>= 4;
}
require(value == 0, "Strings: hex length insufficient");
return string(buffer);
}
function toHexString(address addr) internal pure returns (string memory) {
return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
}
}
文件 16 的 17:UsesGalaxisRegistry.sol
pragma solidity 0.8.25;
import "./IRegistry.sol";
contract UsesGalaxisRegistry {
IRegistry immutable public galaxisRegistry;
constructor(address _galaxisRegistry) {
galaxisRegistry = IRegistry(_galaxisRegistry);
}
}
文件 17 的 17:mainnetChainImplementer.sol
pragma solidity 0.8.25;
import "@openzeppelin/contracts/access/AccessControlEnumerable.sol";
import "./NewProxy.sol";
import "./CommunityRegistry.sol";
import "./CommunityList.sol";
import "./Versionable/IVersionable.sol";
interface ISubscriptionManager {
function createSubscription(uint32 community_id) external;
function communitySubscriptions(uint32) external view returns (uint64);
}
contract mainnetChainImplementer is AccessControlEnumerable, NewProxy, IVersionable {
function version() virtual external pure returns(uint256) {
return 2024040401;
}
bytes32 public constant COMMUNITY_REGISTRY_ADMIN = keccak256("COMMUNITY_REGISTRY_ADMIN");
event MainnetCommunityRegistryCreated(uint32 community_id,address community_proxy);
event SubscriptionCreationFailed(uint32 community, string reason);
event SubscriptionCreationFailedBadly(uint32 community, bytes reason);
event SubscriptionCreated(uint32 community_id,uint64 subscription_id);
constructor(address _galaxisRegistry) NewProxy(_galaxisRegistry) {
_setupRole(DEFAULT_ADMIN_ROLE, msg.sender);
_setupRole(COMMUNITY_REGISTRY_ADMIN,address(this));
}
function createCommunity(
uint32 community_id,
address community_admin,
string memory community_name
) external {
address master_reg = galaxisRegistry.getRegistryAddress("MASTER_REGISTRY");
require(master_reg == msg.sender,"mainChainImplementer: Unauthorised access");
address community_proxy = newProxy("GOLDEN_COMMUNITY_REGISTRY");
CommunityRegistry cr = CommunityRegistry(address(community_proxy));
cr.init(community_id,community_admin,community_name);
cr.setRegistryBool("IS_HOME_CHAIN",true);
address cl = galaxisRegistry.getRegistryAddress("COMMUNITY_LIST");
CommunityList(cl).addCommunity(community_id, community_name,address(community_proxy));
ISubscriptionManager subMan = ISubscriptionManager(galaxisRegistry.getRegistryAddress("SUBSCRIPTION_MANAGER"));
if (address(subMan) != address(0)) {
try subMan.createSubscription(community_id) {
uint64 id = subMan.communitySubscriptions(community_id);
emit SubscriptionCreated(community_id,id);
} catch Error(string memory reason) {
emit SubscriptionCreationFailed(community_id,reason);
} catch(bytes memory reason) {
emit SubscriptionCreationFailedBadly(community_id,reason);
}
}
emit MainnetCommunityRegistryCreated(community_id,address(community_proxy));
}
}
{
"compilationTarget": {
"contracts/@galaxis/registries/contracts/mainnetChainImplementer.sol": "mainnetChainImplementer"
},
"evmVersion": "paris",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": true,
"runs": 200
},
"remappings": []
}
[{"inputs":[{"internalType":"address","name":"_galaxisRegistry","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"FailedCreateClone","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint32","name":"community_id","type":"uint32"},{"indexed":false,"internalType":"address","name":"community_proxy","type":"address"}],"name":"MainnetCommunityRegistryCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint32","name":"community_id","type":"uint32"},{"indexed":false,"internalType":"uint64","name":"subscription_id","type":"uint64"}],"name":"SubscriptionCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint32","name":"community","type":"uint32"},{"indexed":false,"internalType":"string","name":"reason","type":"string"}],"name":"SubscriptionCreationFailed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint32","name":"community","type":"uint32"},{"indexed":false,"internalType":"bytes","name":"reason","type":"bytes"}],"name":"SubscriptionCreationFailedBadly","type":"event"},{"inputs":[],"name":"COMMUNITY_REGISTRY_ADMIN","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"community_id","type":"uint32"},{"internalType":"address","name":"community_admin","type":"address"},{"internalType":"string","name":"community_name","type":"string"}],"name":"createCommunity","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"galaxisRegistry","outputs":[{"internalType":"contract IRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"golden","type":"string"}],"name":"newProxy","outputs":[{"internalType":"address","name":"result","type":"address"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"}]