From c5a753d6e25f274cb953d19b9f228e07662237d0 Mon Sep 17 00:00:00 2001 From: Tak Wai Wong <64229756+tak-hntlabs@users.noreply.github.com> Date: Fri, 14 Oct 2022 19:52:13 -0700 Subject: [PATCH] Updated generated GO types for Zion Space Manager contracts (#41) * Refresh generated types * Added Permission enum --- authorization/authorization.go | 2 +- authorization/permissions.go | 59 ++ clientapi/routing/routing.go | 2 +- .../zion_goerli}/zion_space_manager_goerli.go | 508 ++++++++++------- .../localhost/addresses/council.json | 2 +- .../localhost/addresses/space-manager.json | 2 +- .../zion_space_manager_localhost.go | 514 +++++++++++------- zion/zion_authorization.go | 47 +- zion/zion_data_types.go | 38 -- 9 files changed, 690 insertions(+), 484 deletions(-) create mode 100644 authorization/permissions.go rename zion/{ => contracts/goerli/zion_goerli}/zion_space_manager_goerli.go (54%) rename zion/{ => contracts/localhost/zion_localhost}/zion_space_manager_localhost.go (54%) delete mode 100644 zion/zion_data_types.go diff --git a/authorization/authorization.go b/authorization/authorization.go index deb6469c1..f2c671819 100644 --- a/authorization/authorization.go +++ b/authorization/authorization.go @@ -17,7 +17,7 @@ package authorization type AuthorizationArgs struct { RoomId string UserId string - Permission string + Permission Permission } type Authorization interface { diff --git a/authorization/permissions.go b/authorization/permissions.go new file mode 100644 index 000000000..33c478b84 --- /dev/null +++ b/authorization/permissions.go @@ -0,0 +1,59 @@ +package authorization + +type Permission int64 + +const ( + // since iota starts with 0, the first value + // defined here will be the default + PermissionUndefined Permission = iota + PermissionRead + PermissionWrite + PermissionPing + PermissionInvite + PermissionRedact + PermissionBan + PermissionModifyChannelProfile + PermissionModifyChannelPermissions + PermissionPinMessages + PermissionAddRemoveChannels + PermissionModifySpacePermissions + PermissionModifyChannelDefaults + PermissionModifySpaceProfile + PermissionOwner +) + +func (p Permission) String() string { + switch p { + case PermissionUndefined: + return "Undefined" + case PermissionRead: + return "Read" + case PermissionWrite: + return "Write" + case PermissionPing: + return "Ping" + case PermissionInvite: + return "Invite" + case PermissionRedact: + return "Redact" + case PermissionBan: + return "Ban" + case PermissionModifyChannelProfile: + return "ModifyChannelProfile" + case PermissionModifyChannelPermissions: + return "ModifyChannelPermissions" + case PermissionPinMessages: + return "PinMessages" + case PermissionAddRemoveChannels: + return "AddRemoveChannels" + case PermissionModifySpacePermissions: + return "ModifySpacePermissions" + case PermissionModifyChannelDefaults: + return "ModifyChannelDefaults" + case PermissionModifySpaceProfile: + return "ModifySpaceProfile" + case PermissionOwner: + return "Owner" + } + return "Unknown" +} diff --git a/clientapi/routing/routing.go b/clientapi/routing/routing.go index 34f8d28cf..79033fa48 100644 --- a/clientapi/routing/routing.go +++ b/clientapi/routing/routing.go @@ -259,7 +259,7 @@ func Setup( isAllowed, _ := authorization.IsAllowed(authz.AuthorizationArgs{ RoomId: vars["roomIDOrAlias"], UserId: device.UserID, - Permission: "Zion-Join", + Permission: authz.PermissionRead, }) logrus.Debugf("/join/%s isAllowed = %t", vars["roomIDOrAlias"], isAllowed) diff --git a/zion/zion_space_manager_goerli.go b/zion/contracts/goerli/zion_goerli/zion_space_manager_goerli.go similarity index 54% rename from zion/zion_space_manager_goerli.go rename to zion/contracts/goerli/zion_goerli/zion_space_manager_goerli.go index 88946a1b5..6af012c83 100644 --- a/zion/zion_space_manager_goerli.go +++ b/zion/contracts/goerli/zion_goerli/zion_space_manager_goerli.go @@ -1,7 +1,7 @@ // Code generated - DO NOT EDIT. // This file is a generated binding and any manual changes will be lost. -package zion +package zion_goerli import ( "errors" @@ -28,6 +28,42 @@ var ( _ = event.NewSubscription ) +// DataTypesCreateChannelData is an auto generated low-level Go binding around an user-defined struct. +type DataTypesCreateChannelData struct { + ChannelName string + NetworkId string + SpaceId string + Roles []DataTypesCreateRoleData +} + +// DataTypesCreateRoleData is an auto generated low-level Go binding around an user-defined struct. +type DataTypesCreateRoleData struct { + Name string + Metadata string + Permissions []DataTypesPermission +} + +// DataTypesCreateSpaceData is an auto generated low-level Go binding around an user-defined struct. +type DataTypesCreateSpaceData struct { + SpaceName string + NetworkId string +} + +// DataTypesCreateSpaceTokenEntitlementData is an auto generated low-level Go binding around an user-defined struct. +type DataTypesCreateSpaceTokenEntitlementData struct { + EntitlementModuleAddress common.Address + TokenAddress common.Address + Quantity *big.Int + Description string + Permissions []string +} + +// DataTypesEntitlementModuleInfo is an auto generated low-level Go binding around an user-defined struct. +type DataTypesEntitlementModuleInfo struct { + EntitlementAddress common.Address + EntitlementName string + EntitlementDescription string +} // DataTypesPermission is an auto generated low-level Go binding around an user-defined struct. type DataTypesPermission struct { @@ -38,13 +74,21 @@ type DataTypesPermission struct { type DataTypesRole struct { RoleId *big.Int Name string - Color [8]byte IsTransitive bool } +// DataTypesSpaceInfo is an auto generated low-level Go binding around an user-defined struct. +type DataTypesSpaceInfo struct { + SpaceId *big.Int + CreatedAt *big.Int + Name string + Creator common.Address + Owner common.Address +} + // ZionSpaceManagerGoerliMetaData contains all meta data concerning the ZionSpaceManagerGoerli contract. var ZionSpaceManagerGoerliMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"DefaultEntitlementModuleNotSet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"EntitlementAlreadyWhitelisted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"EntitlementModuleNotSupported\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"EntitlementNotWhitelisted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotSpaceOwner\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"spaceId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"roleId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structDataTypes.Permission\",\"name\":\"permission\",\"type\":\"tuple\"}],\"name\":\"addPermissionToRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"spaceId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"entitlementModuleAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"roleId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"entitlementData\",\"type\":\"bytes\"}],\"name\":\"addRoleToEntitlementModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"spaceId\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"bytes8\",\"name\":\"color\",\"type\":\"bytes8\"}],\"name\":\"createRole\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"spaceName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"networkId\",\"type\":\"string\"}],\"internalType\":\"structDataTypes.CreateSpaceData\",\"name\":\"info\",\"type\":\"tuple\"}],\"name\":\"createSpace\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"spaceName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"networkId\",\"type\":\"string\"}],\"internalType\":\"structDataTypes.CreateSpaceData\",\"name\":\"info\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"entitlementModuleAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"description\",\"type\":\"string\"},{\"internalType\":\"string[]\",\"name\":\"permissions\",\"type\":\"string[]\"}],\"internalType\":\"structDataTypes.CreateSpaceTokenEntitlementData\",\"name\":\"entitlement\",\"type\":\"tuple\"}],\"name\":\"createSpaceWithTokenEntitlement\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"spaceId\",\"type\":\"uint256\"}],\"name\":\"getEntitlementModulesBySpaceId\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"entitlementModules\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"spaceId\",\"type\":\"uint256\"}],\"name\":\"getEntitlementsInfoBySpaceId\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"entitlementAddress\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"entitlementName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"entitlementDescription\",\"type\":\"string\"}],\"internalType\":\"structDataTypes.EntitlementModuleInfo[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enumISpaceManager.ZionPermission\",\"name\":\"zionPermission\",\"type\":\"uint8\"}],\"name\":\"getPermissionFromMap\",\"outputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structDataTypes.Permission\",\"name\":\"permission\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"spaceId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"roleId\",\"type\":\"uint256\"}],\"name\":\"getPermissionsBySpaceIdByRoleId\",\"outputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structDataTypes.Permission[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"spaceId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"roleId\",\"type\":\"uint256\"}],\"name\":\"getRoleBySpaceIdByRoleId\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"roleId\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"bytes8\",\"name\":\"color\",\"type\":\"bytes8\"},{\"internalType\":\"bool\",\"name\":\"isTransitive\",\"type\":\"bool\"}],\"internalType\":\"structDataTypes.Role\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"spaceId\",\"type\":\"uint256\"}],\"name\":\"getRolesBySpaceId\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"roleId\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"bytes8\",\"name\":\"color\",\"type\":\"bytes8\"},{\"internalType\":\"bool\",\"name\":\"isTransitive\",\"type\":\"bool\"}],\"internalType\":\"structDataTypes.Role[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"networkId\",\"type\":\"string\"}],\"name\":\"getSpaceIdByNetworkId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_spaceId\",\"type\":\"uint256\"}],\"name\":\"getSpaceInfoBySpaceId\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"spaceId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"createdAt\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"creator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"internalType\":\"structDataTypes.SpaceInfo\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_spaceId\",\"type\":\"uint256\"}],\"name\":\"getSpaceOwnerBySpaceId\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"ownerAddress\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSpaces\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"spaceId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"createdAt\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"creator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"internalType\":\"structDataTypes.SpaceInfo[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"spaceId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"roomId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structDataTypes.Permission\",\"name\":\"permission\",\"type\":\"tuple\"}],\"name\":\"isEntitled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"spaceId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"entitlementModuleAddress\",\"type\":\"address\"}],\"name\":\"isEntitlementModuleWhitelisted\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"entitlementModule\",\"type\":\"address\"}],\"name\":\"registerDefaultEntitlementModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"spaceId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"entitlementModuleAddress\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"roleIds\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"removeEntitlement\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"spaceId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"entitlementAddress\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"whitelist\",\"type\":\"bool\"}],\"name\":\"whitelistEntitlementModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enumISpaceManager.ZionPermission\",\"name\":\"\",\"type\":\"uint8\"}],\"name\":\"zionPermissionsMap\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"defaultPermissionsManagerAddress_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"DefaultEntitlementModuleNotSet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DefaultPermissionsManagerNotSet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"EntitlementAlreadyWhitelisted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"EntitlementModuleNotSupported\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"EntitlementNotWhitelisted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotAllowed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotSpaceOwner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SpaceAlreadyRegistered\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"spaceId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"roleId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structDataTypes.Permission\",\"name\":\"permission\",\"type\":\"tuple\"}],\"name\":\"addPermissionToRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"spaceId\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"channelId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"entitlementModuleAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"roleId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"entitlementData\",\"type\":\"bytes\"}],\"name\":\"addRoleToEntitlementModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"channelName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"networkId\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"spaceId\",\"type\":\"string\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"metadata\",\"type\":\"string\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structDataTypes.Permission[]\",\"name\":\"permissions\",\"type\":\"tuple[]\"}],\"internalType\":\"structDataTypes.CreateRoleData[]\",\"name\":\"roles\",\"type\":\"tuple[]\"}],\"internalType\":\"structDataTypes.CreateChannelData\",\"name\":\"data\",\"type\":\"tuple\"}],\"name\":\"createChannel\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"spaceId\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"name\":\"createRole\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"spaceName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"networkId\",\"type\":\"string\"}],\"internalType\":\"structDataTypes.CreateSpaceData\",\"name\":\"info\",\"type\":\"tuple\"}],\"name\":\"createSpace\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"spaceName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"networkId\",\"type\":\"string\"}],\"internalType\":\"structDataTypes.CreateSpaceData\",\"name\":\"info\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"entitlementModuleAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"description\",\"type\":\"string\"},{\"internalType\":\"string[]\",\"name\":\"permissions\",\"type\":\"string[]\"}],\"internalType\":\"structDataTypes.CreateSpaceTokenEntitlementData\",\"name\":\"entitlement\",\"type\":\"tuple\"}],\"name\":\"createSpaceWithTokenEntitlement\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"spaceId\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"channelId\",\"type\":\"string\"}],\"name\":\"getChannelIdByNetworkId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"spaceId\",\"type\":\"string\"}],\"name\":\"getEntitlementModulesBySpaceId\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"entitlementModules\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"spaceId\",\"type\":\"string\"}],\"name\":\"getEntitlementsInfoBySpaceId\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"entitlementAddress\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"entitlementName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"entitlementDescription\",\"type\":\"string\"}],\"internalType\":\"structDataTypes.EntitlementModuleInfo[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"permissionType\",\"type\":\"bytes32\"}],\"name\":\"getPermissionFromMap\",\"outputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structDataTypes.Permission\",\"name\":\"permission\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"spaceId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"roleId\",\"type\":\"uint256\"}],\"name\":\"getPermissionsBySpaceIdByRoleId\",\"outputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structDataTypes.Permission[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"spaceId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"roleId\",\"type\":\"uint256\"}],\"name\":\"getRoleBySpaceIdByRoleId\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"roleId\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"bool\",\"name\":\"isTransitive\",\"type\":\"bool\"}],\"internalType\":\"structDataTypes.Role\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"spaceId\",\"type\":\"string\"}],\"name\":\"getRolesBySpaceId\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"roleId\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"bool\",\"name\":\"isTransitive\",\"type\":\"bool\"}],\"internalType\":\"structDataTypes.Role[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"networkId\",\"type\":\"string\"}],\"name\":\"getSpaceIdByNetworkId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"spaceId\",\"type\":\"string\"}],\"name\":\"getSpaceInfoBySpaceId\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"spaceId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"createdAt\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"creator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"internalType\":\"structDataTypes.SpaceInfo\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"spaceId\",\"type\":\"string\"}],\"name\":\"getSpaceOwnerBySpaceId\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"ownerAddress\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSpaces\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"spaceId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"createdAt\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"creator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"internalType\":\"structDataTypes.SpaceInfo[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"spaceId\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"channelId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structDataTypes.Permission\",\"name\":\"permission\",\"type\":\"tuple\"}],\"name\":\"isEntitled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"spaceId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"entitlementModuleAddress\",\"type\":\"address\"}],\"name\":\"isEntitlementModuleWhitelisted\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"spaceId\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"channelId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"entitlementModuleAddress\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"roleIds\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"removeEntitlement\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"entitlementModule\",\"type\":\"address\"}],\"name\":\"setDefaultEntitlementModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"permissionsManager\",\"type\":\"address\"}],\"name\":\"setDefaultPermissionsManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"spaceId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"entitlementAddress\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"whitelist\",\"type\":\"bool\"}],\"name\":\"whitelistEntitlementModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", } // ZionSpaceManagerGoerliABI is the input ABI used to generate the binding from. @@ -193,10 +237,41 @@ func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliTransactorRaw) Transact(opt return _ZionSpaceManagerGoerli.Contract.contract.Transact(opts, method, params...) } -// GetEntitlementModulesBySpaceId is a free data retrieval call binding the contract method 0x41ab8a9a. +// GetChannelIdByNetworkId is a free data retrieval call binding the contract method 0x3e66eae3. // -// Solidity: function getEntitlementModulesBySpaceId(uint256 spaceId) view returns(address[] entitlementModules) -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCaller) GetEntitlementModulesBySpaceId(opts *bind.CallOpts, spaceId *big.Int) ([]common.Address, error) { +// Solidity: function getChannelIdByNetworkId(string spaceId, string channelId) view returns(uint256) +func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCaller) GetChannelIdByNetworkId(opts *bind.CallOpts, spaceId string, channelId string) (*big.Int, error) { + var out []interface{} + err := _ZionSpaceManagerGoerli.contract.Call(opts, &out, "getChannelIdByNetworkId", spaceId, channelId) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetChannelIdByNetworkId is a free data retrieval call binding the contract method 0x3e66eae3. +// +// Solidity: function getChannelIdByNetworkId(string spaceId, string channelId) view returns(uint256) +func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliSession) GetChannelIdByNetworkId(spaceId string, channelId string) (*big.Int, error) { + return _ZionSpaceManagerGoerli.Contract.GetChannelIdByNetworkId(&_ZionSpaceManagerGoerli.CallOpts, spaceId, channelId) +} + +// GetChannelIdByNetworkId is a free data retrieval call binding the contract method 0x3e66eae3. +// +// Solidity: function getChannelIdByNetworkId(string spaceId, string channelId) view returns(uint256) +func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCallerSession) GetChannelIdByNetworkId(spaceId string, channelId string) (*big.Int, error) { + return _ZionSpaceManagerGoerli.Contract.GetChannelIdByNetworkId(&_ZionSpaceManagerGoerli.CallOpts, spaceId, channelId) +} + +// GetEntitlementModulesBySpaceId is a free data retrieval call binding the contract method 0x141b6498. +// +// Solidity: function getEntitlementModulesBySpaceId(string spaceId) view returns(address[] entitlementModules) +func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCaller) GetEntitlementModulesBySpaceId(opts *bind.CallOpts, spaceId string) ([]common.Address, error) { var out []interface{} err := _ZionSpaceManagerGoerli.contract.Call(opts, &out, "getEntitlementModulesBySpaceId", spaceId) @@ -210,24 +285,24 @@ func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCaller) GetEntitlementModul } -// GetEntitlementModulesBySpaceId is a free data retrieval call binding the contract method 0x41ab8a9a. +// GetEntitlementModulesBySpaceId is a free data retrieval call binding the contract method 0x141b6498. // -// Solidity: function getEntitlementModulesBySpaceId(uint256 spaceId) view returns(address[] entitlementModules) -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliSession) GetEntitlementModulesBySpaceId(spaceId *big.Int) ([]common.Address, error) { +// Solidity: function getEntitlementModulesBySpaceId(string spaceId) view returns(address[] entitlementModules) +func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliSession) GetEntitlementModulesBySpaceId(spaceId string) ([]common.Address, error) { return _ZionSpaceManagerGoerli.Contract.GetEntitlementModulesBySpaceId(&_ZionSpaceManagerGoerli.CallOpts, spaceId) } -// GetEntitlementModulesBySpaceId is a free data retrieval call binding the contract method 0x41ab8a9a. +// GetEntitlementModulesBySpaceId is a free data retrieval call binding the contract method 0x141b6498. // -// Solidity: function getEntitlementModulesBySpaceId(uint256 spaceId) view returns(address[] entitlementModules) -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCallerSession) GetEntitlementModulesBySpaceId(spaceId *big.Int) ([]common.Address, error) { +// Solidity: function getEntitlementModulesBySpaceId(string spaceId) view returns(address[] entitlementModules) +func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCallerSession) GetEntitlementModulesBySpaceId(spaceId string) ([]common.Address, error) { return _ZionSpaceManagerGoerli.Contract.GetEntitlementModulesBySpaceId(&_ZionSpaceManagerGoerli.CallOpts, spaceId) } -// GetEntitlementsInfoBySpaceId is a free data retrieval call binding the contract method 0x8a99bd88. +// GetEntitlementsInfoBySpaceId is a free data retrieval call binding the contract method 0x3519167c. // -// Solidity: function getEntitlementsInfoBySpaceId(uint256 spaceId) view returns((address,string,string)[]) -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCaller) GetEntitlementsInfoBySpaceId(opts *bind.CallOpts, spaceId *big.Int) ([]DataTypesEntitlementModuleInfo, error) { +// Solidity: function getEntitlementsInfoBySpaceId(string spaceId) view returns((address,string,string)[]) +func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCaller) GetEntitlementsInfoBySpaceId(opts *bind.CallOpts, spaceId string) ([]DataTypesEntitlementModuleInfo, error) { var out []interface{} err := _ZionSpaceManagerGoerli.contract.Call(opts, &out, "getEntitlementsInfoBySpaceId", spaceId) @@ -241,26 +316,26 @@ func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCaller) GetEntitlementsInfo } -// GetEntitlementsInfoBySpaceId is a free data retrieval call binding the contract method 0x8a99bd88. +// GetEntitlementsInfoBySpaceId is a free data retrieval call binding the contract method 0x3519167c. // -// Solidity: function getEntitlementsInfoBySpaceId(uint256 spaceId) view returns((address,string,string)[]) -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliSession) GetEntitlementsInfoBySpaceId(spaceId *big.Int) ([]DataTypesEntitlementModuleInfo, error) { +// Solidity: function getEntitlementsInfoBySpaceId(string spaceId) view returns((address,string,string)[]) +func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliSession) GetEntitlementsInfoBySpaceId(spaceId string) ([]DataTypesEntitlementModuleInfo, error) { return _ZionSpaceManagerGoerli.Contract.GetEntitlementsInfoBySpaceId(&_ZionSpaceManagerGoerli.CallOpts, spaceId) } -// GetEntitlementsInfoBySpaceId is a free data retrieval call binding the contract method 0x8a99bd88. +// GetEntitlementsInfoBySpaceId is a free data retrieval call binding the contract method 0x3519167c. // -// Solidity: function getEntitlementsInfoBySpaceId(uint256 spaceId) view returns((address,string,string)[]) -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCallerSession) GetEntitlementsInfoBySpaceId(spaceId *big.Int) ([]DataTypesEntitlementModuleInfo, error) { +// Solidity: function getEntitlementsInfoBySpaceId(string spaceId) view returns((address,string,string)[]) +func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCallerSession) GetEntitlementsInfoBySpaceId(spaceId string) ([]DataTypesEntitlementModuleInfo, error) { return _ZionSpaceManagerGoerli.Contract.GetEntitlementsInfoBySpaceId(&_ZionSpaceManagerGoerli.CallOpts, spaceId) } -// GetPermissionFromMap is a free data retrieval call binding the contract method 0x9152efda. +// GetPermissionFromMap is a free data retrieval call binding the contract method 0x9ea4d532. // -// Solidity: function getPermissionFromMap(uint8 zionPermission) view returns((string) permission) -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCaller) GetPermissionFromMap(opts *bind.CallOpts, zionPermission uint8) (DataTypesPermission, error) { +// Solidity: function getPermissionFromMap(bytes32 permissionType) view returns((string) permission) +func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCaller) GetPermissionFromMap(opts *bind.CallOpts, permissionType [32]byte) (DataTypesPermission, error) { var out []interface{} - err := _ZionSpaceManagerGoerli.contract.Call(opts, &out, "getPermissionFromMap", zionPermission) + err := _ZionSpaceManagerGoerli.contract.Call(opts, &out, "getPermissionFromMap", permissionType) if err != nil { return *new(DataTypesPermission), err @@ -272,24 +347,24 @@ func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCaller) GetPermissionFromMa } -// GetPermissionFromMap is a free data retrieval call binding the contract method 0x9152efda. +// GetPermissionFromMap is a free data retrieval call binding the contract method 0x9ea4d532. // -// Solidity: function getPermissionFromMap(uint8 zionPermission) view returns((string) permission) -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliSession) GetPermissionFromMap(zionPermission uint8) (DataTypesPermission, error) { - return _ZionSpaceManagerGoerli.Contract.GetPermissionFromMap(&_ZionSpaceManagerGoerli.CallOpts, zionPermission) +// Solidity: function getPermissionFromMap(bytes32 permissionType) view returns((string) permission) +func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliSession) GetPermissionFromMap(permissionType [32]byte) (DataTypesPermission, error) { + return _ZionSpaceManagerGoerli.Contract.GetPermissionFromMap(&_ZionSpaceManagerGoerli.CallOpts, permissionType) } -// GetPermissionFromMap is a free data retrieval call binding the contract method 0x9152efda. +// GetPermissionFromMap is a free data retrieval call binding the contract method 0x9ea4d532. // -// Solidity: function getPermissionFromMap(uint8 zionPermission) view returns((string) permission) -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCallerSession) GetPermissionFromMap(zionPermission uint8) (DataTypesPermission, error) { - return _ZionSpaceManagerGoerli.Contract.GetPermissionFromMap(&_ZionSpaceManagerGoerli.CallOpts, zionPermission) +// Solidity: function getPermissionFromMap(bytes32 permissionType) view returns((string) permission) +func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCallerSession) GetPermissionFromMap(permissionType [32]byte) (DataTypesPermission, error) { + return _ZionSpaceManagerGoerli.Contract.GetPermissionFromMap(&_ZionSpaceManagerGoerli.CallOpts, permissionType) } -// GetPermissionsBySpaceIdByRoleId is a free data retrieval call binding the contract method 0xa7d325fc. +// GetPermissionsBySpaceIdByRoleId is a free data retrieval call binding the contract method 0x7074047c. // -// Solidity: function getPermissionsBySpaceIdByRoleId(uint256 spaceId, uint256 roleId) view returns((string)[]) -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCaller) GetPermissionsBySpaceIdByRoleId(opts *bind.CallOpts, spaceId *big.Int, roleId *big.Int) ([]DataTypesPermission, error) { +// Solidity: function getPermissionsBySpaceIdByRoleId(string spaceId, uint256 roleId) view returns((string)[]) +func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCaller) GetPermissionsBySpaceIdByRoleId(opts *bind.CallOpts, spaceId string, roleId *big.Int) ([]DataTypesPermission, error) { var out []interface{} err := _ZionSpaceManagerGoerli.contract.Call(opts, &out, "getPermissionsBySpaceIdByRoleId", spaceId, roleId) @@ -303,24 +378,24 @@ func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCaller) GetPermissionsBySpa } -// GetPermissionsBySpaceIdByRoleId is a free data retrieval call binding the contract method 0xa7d325fc. +// GetPermissionsBySpaceIdByRoleId is a free data retrieval call binding the contract method 0x7074047c. // -// Solidity: function getPermissionsBySpaceIdByRoleId(uint256 spaceId, uint256 roleId) view returns((string)[]) -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliSession) GetPermissionsBySpaceIdByRoleId(spaceId *big.Int, roleId *big.Int) ([]DataTypesPermission, error) { +// Solidity: function getPermissionsBySpaceIdByRoleId(string spaceId, uint256 roleId) view returns((string)[]) +func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliSession) GetPermissionsBySpaceIdByRoleId(spaceId string, roleId *big.Int) ([]DataTypesPermission, error) { return _ZionSpaceManagerGoerli.Contract.GetPermissionsBySpaceIdByRoleId(&_ZionSpaceManagerGoerli.CallOpts, spaceId, roleId) } -// GetPermissionsBySpaceIdByRoleId is a free data retrieval call binding the contract method 0xa7d325fc. +// GetPermissionsBySpaceIdByRoleId is a free data retrieval call binding the contract method 0x7074047c. // -// Solidity: function getPermissionsBySpaceIdByRoleId(uint256 spaceId, uint256 roleId) view returns((string)[]) -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCallerSession) GetPermissionsBySpaceIdByRoleId(spaceId *big.Int, roleId *big.Int) ([]DataTypesPermission, error) { +// Solidity: function getPermissionsBySpaceIdByRoleId(string spaceId, uint256 roleId) view returns((string)[]) +func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCallerSession) GetPermissionsBySpaceIdByRoleId(spaceId string, roleId *big.Int) ([]DataTypesPermission, error) { return _ZionSpaceManagerGoerli.Contract.GetPermissionsBySpaceIdByRoleId(&_ZionSpaceManagerGoerli.CallOpts, spaceId, roleId) } -// GetRoleBySpaceIdByRoleId is a free data retrieval call binding the contract method 0xd9af4ecf. +// GetRoleBySpaceIdByRoleId is a free data retrieval call binding the contract method 0xb3ff31b2. // -// Solidity: function getRoleBySpaceIdByRoleId(uint256 spaceId, uint256 roleId) view returns((uint256,string,bytes8,bool)) -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCaller) GetRoleBySpaceIdByRoleId(opts *bind.CallOpts, spaceId *big.Int, roleId *big.Int) (DataTypesRole, error) { +// Solidity: function getRoleBySpaceIdByRoleId(string spaceId, uint256 roleId) view returns((uint256,string,bool)) +func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCaller) GetRoleBySpaceIdByRoleId(opts *bind.CallOpts, spaceId string, roleId *big.Int) (DataTypesRole, error) { var out []interface{} err := _ZionSpaceManagerGoerli.contract.Call(opts, &out, "getRoleBySpaceIdByRoleId", spaceId, roleId) @@ -334,24 +409,24 @@ func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCaller) GetRoleBySpaceIdByR } -// GetRoleBySpaceIdByRoleId is a free data retrieval call binding the contract method 0xd9af4ecf. +// GetRoleBySpaceIdByRoleId is a free data retrieval call binding the contract method 0xb3ff31b2. // -// Solidity: function getRoleBySpaceIdByRoleId(uint256 spaceId, uint256 roleId) view returns((uint256,string,bytes8,bool)) -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliSession) GetRoleBySpaceIdByRoleId(spaceId *big.Int, roleId *big.Int) (DataTypesRole, error) { +// Solidity: function getRoleBySpaceIdByRoleId(string spaceId, uint256 roleId) view returns((uint256,string,bool)) +func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliSession) GetRoleBySpaceIdByRoleId(spaceId string, roleId *big.Int) (DataTypesRole, error) { return _ZionSpaceManagerGoerli.Contract.GetRoleBySpaceIdByRoleId(&_ZionSpaceManagerGoerli.CallOpts, spaceId, roleId) } -// GetRoleBySpaceIdByRoleId is a free data retrieval call binding the contract method 0xd9af4ecf. +// GetRoleBySpaceIdByRoleId is a free data retrieval call binding the contract method 0xb3ff31b2. // -// Solidity: function getRoleBySpaceIdByRoleId(uint256 spaceId, uint256 roleId) view returns((uint256,string,bytes8,bool)) -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCallerSession) GetRoleBySpaceIdByRoleId(spaceId *big.Int, roleId *big.Int) (DataTypesRole, error) { +// Solidity: function getRoleBySpaceIdByRoleId(string spaceId, uint256 roleId) view returns((uint256,string,bool)) +func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCallerSession) GetRoleBySpaceIdByRoleId(spaceId string, roleId *big.Int) (DataTypesRole, error) { return _ZionSpaceManagerGoerli.Contract.GetRoleBySpaceIdByRoleId(&_ZionSpaceManagerGoerli.CallOpts, spaceId, roleId) } -// GetRolesBySpaceId is a free data retrieval call binding the contract method 0x52f1bea2. +// GetRolesBySpaceId is a free data retrieval call binding the contract method 0x4bf2abb2. // -// Solidity: function getRolesBySpaceId(uint256 spaceId) view returns((uint256,string,bytes8,bool)[]) -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCaller) GetRolesBySpaceId(opts *bind.CallOpts, spaceId *big.Int) ([]DataTypesRole, error) { +// Solidity: function getRolesBySpaceId(string spaceId) view returns((uint256,string,bool)[]) +func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCaller) GetRolesBySpaceId(opts *bind.CallOpts, spaceId string) ([]DataTypesRole, error) { var out []interface{} err := _ZionSpaceManagerGoerli.contract.Call(opts, &out, "getRolesBySpaceId", spaceId) @@ -365,17 +440,17 @@ func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCaller) GetRolesBySpaceId(o } -// GetRolesBySpaceId is a free data retrieval call binding the contract method 0x52f1bea2. +// GetRolesBySpaceId is a free data retrieval call binding the contract method 0x4bf2abb2. // -// Solidity: function getRolesBySpaceId(uint256 spaceId) view returns((uint256,string,bytes8,bool)[]) -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliSession) GetRolesBySpaceId(spaceId *big.Int) ([]DataTypesRole, error) { +// Solidity: function getRolesBySpaceId(string spaceId) view returns((uint256,string,bool)[]) +func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliSession) GetRolesBySpaceId(spaceId string) ([]DataTypesRole, error) { return _ZionSpaceManagerGoerli.Contract.GetRolesBySpaceId(&_ZionSpaceManagerGoerli.CallOpts, spaceId) } -// GetRolesBySpaceId is a free data retrieval call binding the contract method 0x52f1bea2. +// GetRolesBySpaceId is a free data retrieval call binding the contract method 0x4bf2abb2. // -// Solidity: function getRolesBySpaceId(uint256 spaceId) view returns((uint256,string,bytes8,bool)[]) -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCallerSession) GetRolesBySpaceId(spaceId *big.Int) ([]DataTypesRole, error) { +// Solidity: function getRolesBySpaceId(string spaceId) view returns((uint256,string,bool)[]) +func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCallerSession) GetRolesBySpaceId(spaceId string) ([]DataTypesRole, error) { return _ZionSpaceManagerGoerli.Contract.GetRolesBySpaceId(&_ZionSpaceManagerGoerli.CallOpts, spaceId) } @@ -410,12 +485,12 @@ func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCallerSession) GetSpaceIdBy return _ZionSpaceManagerGoerli.Contract.GetSpaceIdByNetworkId(&_ZionSpaceManagerGoerli.CallOpts, networkId) } -// GetSpaceInfoBySpaceId is a free data retrieval call binding the contract method 0x3439f03b. +// GetSpaceInfoBySpaceId is a free data retrieval call binding the contract method 0x2bb59212. // -// Solidity: function getSpaceInfoBySpaceId(uint256 _spaceId) view returns((uint256,uint256,string,address,address)) -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCaller) GetSpaceInfoBySpaceId(opts *bind.CallOpts, _spaceId *big.Int) (DataTypesSpaceInfo, error) { +// Solidity: function getSpaceInfoBySpaceId(string spaceId) view returns((uint256,uint256,string,address,address)) +func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCaller) GetSpaceInfoBySpaceId(opts *bind.CallOpts, spaceId string) (DataTypesSpaceInfo, error) { var out []interface{} - err := _ZionSpaceManagerGoerli.contract.Call(opts, &out, "getSpaceInfoBySpaceId", _spaceId) + err := _ZionSpaceManagerGoerli.contract.Call(opts, &out, "getSpaceInfoBySpaceId", spaceId) if err != nil { return *new(DataTypesSpaceInfo), err @@ -427,26 +502,26 @@ func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCaller) GetSpaceInfoBySpace } -// GetSpaceInfoBySpaceId is a free data retrieval call binding the contract method 0x3439f03b. +// GetSpaceInfoBySpaceId is a free data retrieval call binding the contract method 0x2bb59212. // -// Solidity: function getSpaceInfoBySpaceId(uint256 _spaceId) view returns((uint256,uint256,string,address,address)) -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliSession) GetSpaceInfoBySpaceId(_spaceId *big.Int) (DataTypesSpaceInfo, error) { - return _ZionSpaceManagerGoerli.Contract.GetSpaceInfoBySpaceId(&_ZionSpaceManagerGoerli.CallOpts, _spaceId) +// Solidity: function getSpaceInfoBySpaceId(string spaceId) view returns((uint256,uint256,string,address,address)) +func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliSession) GetSpaceInfoBySpaceId(spaceId string) (DataTypesSpaceInfo, error) { + return _ZionSpaceManagerGoerli.Contract.GetSpaceInfoBySpaceId(&_ZionSpaceManagerGoerli.CallOpts, spaceId) } -// GetSpaceInfoBySpaceId is a free data retrieval call binding the contract method 0x3439f03b. +// GetSpaceInfoBySpaceId is a free data retrieval call binding the contract method 0x2bb59212. // -// Solidity: function getSpaceInfoBySpaceId(uint256 _spaceId) view returns((uint256,uint256,string,address,address)) -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCallerSession) GetSpaceInfoBySpaceId(_spaceId *big.Int) (DataTypesSpaceInfo, error) { - return _ZionSpaceManagerGoerli.Contract.GetSpaceInfoBySpaceId(&_ZionSpaceManagerGoerli.CallOpts, _spaceId) +// Solidity: function getSpaceInfoBySpaceId(string spaceId) view returns((uint256,uint256,string,address,address)) +func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCallerSession) GetSpaceInfoBySpaceId(spaceId string) (DataTypesSpaceInfo, error) { + return _ZionSpaceManagerGoerli.Contract.GetSpaceInfoBySpaceId(&_ZionSpaceManagerGoerli.CallOpts, spaceId) } -// GetSpaceOwnerBySpaceId is a free data retrieval call binding the contract method 0x7dde72d8. +// GetSpaceOwnerBySpaceId is a free data retrieval call binding the contract method 0x2a4bdf25. // -// Solidity: function getSpaceOwnerBySpaceId(uint256 _spaceId) view returns(address ownerAddress) -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCaller) GetSpaceOwnerBySpaceId(opts *bind.CallOpts, _spaceId *big.Int) (common.Address, error) { +// Solidity: function getSpaceOwnerBySpaceId(string spaceId) view returns(address ownerAddress) +func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCaller) GetSpaceOwnerBySpaceId(opts *bind.CallOpts, spaceId string) (common.Address, error) { var out []interface{} - err := _ZionSpaceManagerGoerli.contract.Call(opts, &out, "getSpaceOwnerBySpaceId", _spaceId) + err := _ZionSpaceManagerGoerli.contract.Call(opts, &out, "getSpaceOwnerBySpaceId", spaceId) if err != nil { return *new(common.Address), err @@ -458,18 +533,18 @@ func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCaller) GetSpaceOwnerBySpac } -// GetSpaceOwnerBySpaceId is a free data retrieval call binding the contract method 0x7dde72d8. +// GetSpaceOwnerBySpaceId is a free data retrieval call binding the contract method 0x2a4bdf25. // -// Solidity: function getSpaceOwnerBySpaceId(uint256 _spaceId) view returns(address ownerAddress) -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliSession) GetSpaceOwnerBySpaceId(_spaceId *big.Int) (common.Address, error) { - return _ZionSpaceManagerGoerli.Contract.GetSpaceOwnerBySpaceId(&_ZionSpaceManagerGoerli.CallOpts, _spaceId) +// Solidity: function getSpaceOwnerBySpaceId(string spaceId) view returns(address ownerAddress) +func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliSession) GetSpaceOwnerBySpaceId(spaceId string) (common.Address, error) { + return _ZionSpaceManagerGoerli.Contract.GetSpaceOwnerBySpaceId(&_ZionSpaceManagerGoerli.CallOpts, spaceId) } -// GetSpaceOwnerBySpaceId is a free data retrieval call binding the contract method 0x7dde72d8. +// GetSpaceOwnerBySpaceId is a free data retrieval call binding the contract method 0x2a4bdf25. // -// Solidity: function getSpaceOwnerBySpaceId(uint256 _spaceId) view returns(address ownerAddress) -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCallerSession) GetSpaceOwnerBySpaceId(_spaceId *big.Int) (common.Address, error) { - return _ZionSpaceManagerGoerli.Contract.GetSpaceOwnerBySpaceId(&_ZionSpaceManagerGoerli.CallOpts, _spaceId) +// Solidity: function getSpaceOwnerBySpaceId(string spaceId) view returns(address ownerAddress) +func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCallerSession) GetSpaceOwnerBySpaceId(spaceId string) (common.Address, error) { + return _ZionSpaceManagerGoerli.Contract.GetSpaceOwnerBySpaceId(&_ZionSpaceManagerGoerli.CallOpts, spaceId) } // GetSpaces is a free data retrieval call binding the contract method 0x15478ca9. @@ -503,12 +578,12 @@ func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCallerSession) GetSpaces() return _ZionSpaceManagerGoerli.Contract.GetSpaces(&_ZionSpaceManagerGoerli.CallOpts) } -// IsEntitled is a free data retrieval call binding the contract method 0x66218999. +// IsEntitled is a free data retrieval call binding the contract method 0xbf77b663. // -// Solidity: function isEntitled(uint256 spaceId, uint256 roomId, address user, (string) permission) view returns(bool) -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCaller) IsEntitled(opts *bind.CallOpts, spaceId *big.Int, roomId *big.Int, user common.Address, permission DataTypesPermission) (bool, error) { +// Solidity: function isEntitled(string spaceId, string channelId, address user, (string) permission) view returns(bool) +func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCaller) IsEntitled(opts *bind.CallOpts, spaceId string, channelId string, user common.Address, permission DataTypesPermission) (bool, error) { var out []interface{} - err := _ZionSpaceManagerGoerli.contract.Call(opts, &out, "isEntitled", spaceId, roomId, user, permission) + err := _ZionSpaceManagerGoerli.contract.Call(opts, &out, "isEntitled", spaceId, channelId, user, permission) if err != nil { return *new(bool), err @@ -520,24 +595,24 @@ func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCaller) IsEntitled(opts *bi } -// IsEntitled is a free data retrieval call binding the contract method 0x66218999. +// IsEntitled is a free data retrieval call binding the contract method 0xbf77b663. // -// Solidity: function isEntitled(uint256 spaceId, uint256 roomId, address user, (string) permission) view returns(bool) -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliSession) IsEntitled(spaceId *big.Int, roomId *big.Int, user common.Address, permission DataTypesPermission) (bool, error) { - return _ZionSpaceManagerGoerli.Contract.IsEntitled(&_ZionSpaceManagerGoerli.CallOpts, spaceId, roomId, user, permission) +// Solidity: function isEntitled(string spaceId, string channelId, address user, (string) permission) view returns(bool) +func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliSession) IsEntitled(spaceId string, channelId string, user common.Address, permission DataTypesPermission) (bool, error) { + return _ZionSpaceManagerGoerli.Contract.IsEntitled(&_ZionSpaceManagerGoerli.CallOpts, spaceId, channelId, user, permission) } -// IsEntitled is a free data retrieval call binding the contract method 0x66218999. +// IsEntitled is a free data retrieval call binding the contract method 0xbf77b663. // -// Solidity: function isEntitled(uint256 spaceId, uint256 roomId, address user, (string) permission) view returns(bool) -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCallerSession) IsEntitled(spaceId *big.Int, roomId *big.Int, user common.Address, permission DataTypesPermission) (bool, error) { - return _ZionSpaceManagerGoerli.Contract.IsEntitled(&_ZionSpaceManagerGoerli.CallOpts, spaceId, roomId, user, permission) +// Solidity: function isEntitled(string spaceId, string channelId, address user, (string) permission) view returns(bool) +func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCallerSession) IsEntitled(spaceId string, channelId string, user common.Address, permission DataTypesPermission) (bool, error) { + return _ZionSpaceManagerGoerli.Contract.IsEntitled(&_ZionSpaceManagerGoerli.CallOpts, spaceId, channelId, user, permission) } -// IsEntitlementModuleWhitelisted is a free data retrieval call binding the contract method 0xb010ac47. +// IsEntitlementModuleWhitelisted is a free data retrieval call binding the contract method 0x4196d1ff. // -// Solidity: function isEntitlementModuleWhitelisted(uint256 spaceId, address entitlementModuleAddress) view returns(bool) -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCaller) IsEntitlementModuleWhitelisted(opts *bind.CallOpts, spaceId *big.Int, entitlementModuleAddress common.Address) (bool, error) { +// Solidity: function isEntitlementModuleWhitelisted(string spaceId, address entitlementModuleAddress) view returns(bool) +func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCaller) IsEntitlementModuleWhitelisted(opts *bind.CallOpts, spaceId string, entitlementModuleAddress common.Address) (bool, error) { var out []interface{} err := _ZionSpaceManagerGoerli.contract.Call(opts, &out, "isEntitlementModuleWhitelisted", spaceId, entitlementModuleAddress) @@ -551,17 +626,17 @@ func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCaller) IsEntitlementModule } -// IsEntitlementModuleWhitelisted is a free data retrieval call binding the contract method 0xb010ac47. +// IsEntitlementModuleWhitelisted is a free data retrieval call binding the contract method 0x4196d1ff. // -// Solidity: function isEntitlementModuleWhitelisted(uint256 spaceId, address entitlementModuleAddress) view returns(bool) -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliSession) IsEntitlementModuleWhitelisted(spaceId *big.Int, entitlementModuleAddress common.Address) (bool, error) { +// Solidity: function isEntitlementModuleWhitelisted(string spaceId, address entitlementModuleAddress) view returns(bool) +func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliSession) IsEntitlementModuleWhitelisted(spaceId string, entitlementModuleAddress common.Address) (bool, error) { return _ZionSpaceManagerGoerli.Contract.IsEntitlementModuleWhitelisted(&_ZionSpaceManagerGoerli.CallOpts, spaceId, entitlementModuleAddress) } -// IsEntitlementModuleWhitelisted is a free data retrieval call binding the contract method 0xb010ac47. +// IsEntitlementModuleWhitelisted is a free data retrieval call binding the contract method 0x4196d1ff. // -// Solidity: function isEntitlementModuleWhitelisted(uint256 spaceId, address entitlementModuleAddress) view returns(bool) -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCallerSession) IsEntitlementModuleWhitelisted(spaceId *big.Int, entitlementModuleAddress common.Address) (bool, error) { +// Solidity: function isEntitlementModuleWhitelisted(string spaceId, address entitlementModuleAddress) view returns(bool) +func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCallerSession) IsEntitlementModuleWhitelisted(spaceId string, entitlementModuleAddress common.Address) (bool, error) { return _ZionSpaceManagerGoerli.Contract.IsEntitlementModuleWhitelisted(&_ZionSpaceManagerGoerli.CallOpts, spaceId, entitlementModuleAddress) } @@ -596,98 +671,88 @@ func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCallerSession) Owner() (com return _ZionSpaceManagerGoerli.Contract.Owner(&_ZionSpaceManagerGoerli.CallOpts) } -// ZionPermissionsMap is a free data retrieval call binding the contract method 0xc870e04c. +// AddPermissionToRole is a paid mutator transaction binding the contract method 0x7d9a0230. // -// Solidity: function zionPermissionsMap(uint8 ) view returns(string name) -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCaller) ZionPermissionsMap(opts *bind.CallOpts, arg0 uint8) (string, error) { - var out []interface{} - err := _ZionSpaceManagerGoerli.contract.Call(opts, &out, "zionPermissionsMap", arg0) - - if err != nil { - return *new(string), err - } - - out0 := *abi.ConvertType(out[0], new(string)).(*string) - - return out0, err - -} - -// ZionPermissionsMap is a free data retrieval call binding the contract method 0xc870e04c. -// -// Solidity: function zionPermissionsMap(uint8 ) view returns(string name) -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliSession) ZionPermissionsMap(arg0 uint8) (string, error) { - return _ZionSpaceManagerGoerli.Contract.ZionPermissionsMap(&_ZionSpaceManagerGoerli.CallOpts, arg0) -} - -// ZionPermissionsMap is a free data retrieval call binding the contract method 0xc870e04c. -// -// Solidity: function zionPermissionsMap(uint8 ) view returns(string name) -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCallerSession) ZionPermissionsMap(arg0 uint8) (string, error) { - return _ZionSpaceManagerGoerli.Contract.ZionPermissionsMap(&_ZionSpaceManagerGoerli.CallOpts, arg0) -} - -// AddPermissionToRole is a paid mutator transaction binding the contract method 0x3368c918. -// -// Solidity: function addPermissionToRole(uint256 spaceId, uint256 roleId, (string) permission) returns() -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliTransactor) AddPermissionToRole(opts *bind.TransactOpts, spaceId *big.Int, roleId *big.Int, permission DataTypesPermission) (*types.Transaction, error) { +// Solidity: function addPermissionToRole(string spaceId, uint256 roleId, (string) permission) returns() +func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliTransactor) AddPermissionToRole(opts *bind.TransactOpts, spaceId string, roleId *big.Int, permission DataTypesPermission) (*types.Transaction, error) { return _ZionSpaceManagerGoerli.contract.Transact(opts, "addPermissionToRole", spaceId, roleId, permission) } -// AddPermissionToRole is a paid mutator transaction binding the contract method 0x3368c918. +// AddPermissionToRole is a paid mutator transaction binding the contract method 0x7d9a0230. // -// Solidity: function addPermissionToRole(uint256 spaceId, uint256 roleId, (string) permission) returns() -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliSession) AddPermissionToRole(spaceId *big.Int, roleId *big.Int, permission DataTypesPermission) (*types.Transaction, error) { +// Solidity: function addPermissionToRole(string spaceId, uint256 roleId, (string) permission) returns() +func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliSession) AddPermissionToRole(spaceId string, roleId *big.Int, permission DataTypesPermission) (*types.Transaction, error) { return _ZionSpaceManagerGoerli.Contract.AddPermissionToRole(&_ZionSpaceManagerGoerli.TransactOpts, spaceId, roleId, permission) } -// AddPermissionToRole is a paid mutator transaction binding the contract method 0x3368c918. +// AddPermissionToRole is a paid mutator transaction binding the contract method 0x7d9a0230. // -// Solidity: function addPermissionToRole(uint256 spaceId, uint256 roleId, (string) permission) returns() -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliTransactorSession) AddPermissionToRole(spaceId *big.Int, roleId *big.Int, permission DataTypesPermission) (*types.Transaction, error) { +// Solidity: function addPermissionToRole(string spaceId, uint256 roleId, (string) permission) returns() +func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliTransactorSession) AddPermissionToRole(spaceId string, roleId *big.Int, permission DataTypesPermission) (*types.Transaction, error) { return _ZionSpaceManagerGoerli.Contract.AddPermissionToRole(&_ZionSpaceManagerGoerli.TransactOpts, spaceId, roleId, permission) } -// AddRoleToEntitlementModule is a paid mutator transaction binding the contract method 0xa7972473. +// AddRoleToEntitlementModule is a paid mutator transaction binding the contract method 0xbbd7358a. // -// Solidity: function addRoleToEntitlementModule(uint256 spaceId, address entitlementModuleAddress, uint256 roleId, bytes entitlementData) returns() -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliTransactor) AddRoleToEntitlementModule(opts *bind.TransactOpts, spaceId *big.Int, entitlementModuleAddress common.Address, roleId *big.Int, entitlementData []byte) (*types.Transaction, error) { - return _ZionSpaceManagerGoerli.contract.Transact(opts, "addRoleToEntitlementModule", spaceId, entitlementModuleAddress, roleId, entitlementData) +// Solidity: function addRoleToEntitlementModule(string spaceId, string channelId, address entitlementModuleAddress, uint256 roleId, bytes entitlementData) returns() +func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliTransactor) AddRoleToEntitlementModule(opts *bind.TransactOpts, spaceId string, channelId string, entitlementModuleAddress common.Address, roleId *big.Int, entitlementData []byte) (*types.Transaction, error) { + return _ZionSpaceManagerGoerli.contract.Transact(opts, "addRoleToEntitlementModule", spaceId, channelId, entitlementModuleAddress, roleId, entitlementData) } -// AddRoleToEntitlementModule is a paid mutator transaction binding the contract method 0xa7972473. +// AddRoleToEntitlementModule is a paid mutator transaction binding the contract method 0xbbd7358a. // -// Solidity: function addRoleToEntitlementModule(uint256 spaceId, address entitlementModuleAddress, uint256 roleId, bytes entitlementData) returns() -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliSession) AddRoleToEntitlementModule(spaceId *big.Int, entitlementModuleAddress common.Address, roleId *big.Int, entitlementData []byte) (*types.Transaction, error) { - return _ZionSpaceManagerGoerli.Contract.AddRoleToEntitlementModule(&_ZionSpaceManagerGoerli.TransactOpts, spaceId, entitlementModuleAddress, roleId, entitlementData) +// Solidity: function addRoleToEntitlementModule(string spaceId, string channelId, address entitlementModuleAddress, uint256 roleId, bytes entitlementData) returns() +func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliSession) AddRoleToEntitlementModule(spaceId string, channelId string, entitlementModuleAddress common.Address, roleId *big.Int, entitlementData []byte) (*types.Transaction, error) { + return _ZionSpaceManagerGoerli.Contract.AddRoleToEntitlementModule(&_ZionSpaceManagerGoerli.TransactOpts, spaceId, channelId, entitlementModuleAddress, roleId, entitlementData) } -// AddRoleToEntitlementModule is a paid mutator transaction binding the contract method 0xa7972473. +// AddRoleToEntitlementModule is a paid mutator transaction binding the contract method 0xbbd7358a. // -// Solidity: function addRoleToEntitlementModule(uint256 spaceId, address entitlementModuleAddress, uint256 roleId, bytes entitlementData) returns() -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliTransactorSession) AddRoleToEntitlementModule(spaceId *big.Int, entitlementModuleAddress common.Address, roleId *big.Int, entitlementData []byte) (*types.Transaction, error) { - return _ZionSpaceManagerGoerli.Contract.AddRoleToEntitlementModule(&_ZionSpaceManagerGoerli.TransactOpts, spaceId, entitlementModuleAddress, roleId, entitlementData) +// Solidity: function addRoleToEntitlementModule(string spaceId, string channelId, address entitlementModuleAddress, uint256 roleId, bytes entitlementData) returns() +func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliTransactorSession) AddRoleToEntitlementModule(spaceId string, channelId string, entitlementModuleAddress common.Address, roleId *big.Int, entitlementData []byte) (*types.Transaction, error) { + return _ZionSpaceManagerGoerli.Contract.AddRoleToEntitlementModule(&_ZionSpaceManagerGoerli.TransactOpts, spaceId, channelId, entitlementModuleAddress, roleId, entitlementData) } -// CreateRole is a paid mutator transaction binding the contract method 0xa3f13435. +// CreateChannel is a paid mutator transaction binding the contract method 0x06d1ea5d. // -// Solidity: function createRole(uint256 spaceId, string name, bytes8 color) returns(uint256) -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliTransactor) CreateRole(opts *bind.TransactOpts, spaceId *big.Int, name string, color [8]byte) (*types.Transaction, error) { - return _ZionSpaceManagerGoerli.contract.Transact(opts, "createRole", spaceId, name, color) +// Solidity: function createChannel((string,string,string,(string,string,(string)[])[]) data) returns() +func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliTransactor) CreateChannel(opts *bind.TransactOpts, data DataTypesCreateChannelData) (*types.Transaction, error) { + return _ZionSpaceManagerGoerli.contract.Transact(opts, "createChannel", data) } -// CreateRole is a paid mutator transaction binding the contract method 0xa3f13435. +// CreateChannel is a paid mutator transaction binding the contract method 0x06d1ea5d. // -// Solidity: function createRole(uint256 spaceId, string name, bytes8 color) returns(uint256) -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliSession) CreateRole(spaceId *big.Int, name string, color [8]byte) (*types.Transaction, error) { - return _ZionSpaceManagerGoerli.Contract.CreateRole(&_ZionSpaceManagerGoerli.TransactOpts, spaceId, name, color) +// Solidity: function createChannel((string,string,string,(string,string,(string)[])[]) data) returns() +func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliSession) CreateChannel(data DataTypesCreateChannelData) (*types.Transaction, error) { + return _ZionSpaceManagerGoerli.Contract.CreateChannel(&_ZionSpaceManagerGoerli.TransactOpts, data) } -// CreateRole is a paid mutator transaction binding the contract method 0xa3f13435. +// CreateChannel is a paid mutator transaction binding the contract method 0x06d1ea5d. // -// Solidity: function createRole(uint256 spaceId, string name, bytes8 color) returns(uint256) -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliTransactorSession) CreateRole(spaceId *big.Int, name string, color [8]byte) (*types.Transaction, error) { - return _ZionSpaceManagerGoerli.Contract.CreateRole(&_ZionSpaceManagerGoerli.TransactOpts, spaceId, name, color) +// Solidity: function createChannel((string,string,string,(string,string,(string)[])[]) data) returns() +func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliTransactorSession) CreateChannel(data DataTypesCreateChannelData) (*types.Transaction, error) { + return _ZionSpaceManagerGoerli.Contract.CreateChannel(&_ZionSpaceManagerGoerli.TransactOpts, data) +} + +// CreateRole is a paid mutator transaction binding the contract method 0xd2192dbf. +// +// Solidity: function createRole(string spaceId, string name) returns(uint256) +func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliTransactor) CreateRole(opts *bind.TransactOpts, spaceId string, name string) (*types.Transaction, error) { + return _ZionSpaceManagerGoerli.contract.Transact(opts, "createRole", spaceId, name) +} + +// CreateRole is a paid mutator transaction binding the contract method 0xd2192dbf. +// +// Solidity: function createRole(string spaceId, string name) returns(uint256) +func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliSession) CreateRole(spaceId string, name string) (*types.Transaction, error) { + return _ZionSpaceManagerGoerli.Contract.CreateRole(&_ZionSpaceManagerGoerli.TransactOpts, spaceId, name) +} + +// CreateRole is a paid mutator transaction binding the contract method 0xd2192dbf. +// +// Solidity: function createRole(string spaceId, string name) returns(uint256) +func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliTransactorSession) CreateRole(spaceId string, name string) (*types.Transaction, error) { + return _ZionSpaceManagerGoerli.Contract.CreateRole(&_ZionSpaceManagerGoerli.TransactOpts, spaceId, name) } // CreateSpace is a paid mutator transaction binding the contract method 0x50b88cf7. @@ -732,46 +797,25 @@ func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliTransactorSession) CreateSp return _ZionSpaceManagerGoerli.Contract.CreateSpaceWithTokenEntitlement(&_ZionSpaceManagerGoerli.TransactOpts, info, entitlement) } -// RegisterDefaultEntitlementModule is a paid mutator transaction binding the contract method 0xdbe83cbf. +// RemoveEntitlement is a paid mutator transaction binding the contract method 0xa3a39cb9. // -// Solidity: function registerDefaultEntitlementModule(address entitlementModule) returns() -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliTransactor) RegisterDefaultEntitlementModule(opts *bind.TransactOpts, entitlementModule common.Address) (*types.Transaction, error) { - return _ZionSpaceManagerGoerli.contract.Transact(opts, "registerDefaultEntitlementModule", entitlementModule) +// Solidity: function removeEntitlement(string spaceId, string channelId, address entitlementModuleAddress, uint256[] roleIds, bytes data) returns() +func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliTransactor) RemoveEntitlement(opts *bind.TransactOpts, spaceId string, channelId string, entitlementModuleAddress common.Address, roleIds []*big.Int, data []byte) (*types.Transaction, error) { + return _ZionSpaceManagerGoerli.contract.Transact(opts, "removeEntitlement", spaceId, channelId, entitlementModuleAddress, roleIds, data) } -// RegisterDefaultEntitlementModule is a paid mutator transaction binding the contract method 0xdbe83cbf. +// RemoveEntitlement is a paid mutator transaction binding the contract method 0xa3a39cb9. // -// Solidity: function registerDefaultEntitlementModule(address entitlementModule) returns() -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliSession) RegisterDefaultEntitlementModule(entitlementModule common.Address) (*types.Transaction, error) { - return _ZionSpaceManagerGoerli.Contract.RegisterDefaultEntitlementModule(&_ZionSpaceManagerGoerli.TransactOpts, entitlementModule) +// Solidity: function removeEntitlement(string spaceId, string channelId, address entitlementModuleAddress, uint256[] roleIds, bytes data) returns() +func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliSession) RemoveEntitlement(spaceId string, channelId string, entitlementModuleAddress common.Address, roleIds []*big.Int, data []byte) (*types.Transaction, error) { + return _ZionSpaceManagerGoerli.Contract.RemoveEntitlement(&_ZionSpaceManagerGoerli.TransactOpts, spaceId, channelId, entitlementModuleAddress, roleIds, data) } -// RegisterDefaultEntitlementModule is a paid mutator transaction binding the contract method 0xdbe83cbf. +// RemoveEntitlement is a paid mutator transaction binding the contract method 0xa3a39cb9. // -// Solidity: function registerDefaultEntitlementModule(address entitlementModule) returns() -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliTransactorSession) RegisterDefaultEntitlementModule(entitlementModule common.Address) (*types.Transaction, error) { - return _ZionSpaceManagerGoerli.Contract.RegisterDefaultEntitlementModule(&_ZionSpaceManagerGoerli.TransactOpts, entitlementModule) -} - -// RemoveEntitlement is a paid mutator transaction binding the contract method 0x1e984060. -// -// Solidity: function removeEntitlement(uint256 spaceId, address entitlementModuleAddress, uint256[] roleIds, bytes data) returns() -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliTransactor) RemoveEntitlement(opts *bind.TransactOpts, spaceId *big.Int, entitlementModuleAddress common.Address, roleIds []*big.Int, data []byte) (*types.Transaction, error) { - return _ZionSpaceManagerGoerli.contract.Transact(opts, "removeEntitlement", spaceId, entitlementModuleAddress, roleIds, data) -} - -// RemoveEntitlement is a paid mutator transaction binding the contract method 0x1e984060. -// -// Solidity: function removeEntitlement(uint256 spaceId, address entitlementModuleAddress, uint256[] roleIds, bytes data) returns() -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliSession) RemoveEntitlement(spaceId *big.Int, entitlementModuleAddress common.Address, roleIds []*big.Int, data []byte) (*types.Transaction, error) { - return _ZionSpaceManagerGoerli.Contract.RemoveEntitlement(&_ZionSpaceManagerGoerli.TransactOpts, spaceId, entitlementModuleAddress, roleIds, data) -} - -// RemoveEntitlement is a paid mutator transaction binding the contract method 0x1e984060. -// -// Solidity: function removeEntitlement(uint256 spaceId, address entitlementModuleAddress, uint256[] roleIds, bytes data) returns() -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliTransactorSession) RemoveEntitlement(spaceId *big.Int, entitlementModuleAddress common.Address, roleIds []*big.Int, data []byte) (*types.Transaction, error) { - return _ZionSpaceManagerGoerli.Contract.RemoveEntitlement(&_ZionSpaceManagerGoerli.TransactOpts, spaceId, entitlementModuleAddress, roleIds, data) +// Solidity: function removeEntitlement(string spaceId, string channelId, address entitlementModuleAddress, uint256[] roleIds, bytes data) returns() +func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliTransactorSession) RemoveEntitlement(spaceId string, channelId string, entitlementModuleAddress common.Address, roleIds []*big.Int, data []byte) (*types.Transaction, error) { + return _ZionSpaceManagerGoerli.Contract.RemoveEntitlement(&_ZionSpaceManagerGoerli.TransactOpts, spaceId, channelId, entitlementModuleAddress, roleIds, data) } // RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. @@ -795,6 +839,48 @@ func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliTransactorSession) Renounce return _ZionSpaceManagerGoerli.Contract.RenounceOwnership(&_ZionSpaceManagerGoerli.TransactOpts) } +// SetDefaultEntitlementModule is a paid mutator transaction binding the contract method 0xccaf0a2b. +// +// Solidity: function setDefaultEntitlementModule(address entitlementModule) returns() +func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliTransactor) SetDefaultEntitlementModule(opts *bind.TransactOpts, entitlementModule common.Address) (*types.Transaction, error) { + return _ZionSpaceManagerGoerli.contract.Transact(opts, "setDefaultEntitlementModule", entitlementModule) +} + +// SetDefaultEntitlementModule is a paid mutator transaction binding the contract method 0xccaf0a2b. +// +// Solidity: function setDefaultEntitlementModule(address entitlementModule) returns() +func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliSession) SetDefaultEntitlementModule(entitlementModule common.Address) (*types.Transaction, error) { + return _ZionSpaceManagerGoerli.Contract.SetDefaultEntitlementModule(&_ZionSpaceManagerGoerli.TransactOpts, entitlementModule) +} + +// SetDefaultEntitlementModule is a paid mutator transaction binding the contract method 0xccaf0a2b. +// +// Solidity: function setDefaultEntitlementModule(address entitlementModule) returns() +func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliTransactorSession) SetDefaultEntitlementModule(entitlementModule common.Address) (*types.Transaction, error) { + return _ZionSpaceManagerGoerli.Contract.SetDefaultEntitlementModule(&_ZionSpaceManagerGoerli.TransactOpts, entitlementModule) +} + +// SetDefaultPermissionsManager is a paid mutator transaction binding the contract method 0x2d478e6b. +// +// Solidity: function setDefaultPermissionsManager(address permissionsManager) returns() +func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliTransactor) SetDefaultPermissionsManager(opts *bind.TransactOpts, permissionsManager common.Address) (*types.Transaction, error) { + return _ZionSpaceManagerGoerli.contract.Transact(opts, "setDefaultPermissionsManager", permissionsManager) +} + +// SetDefaultPermissionsManager is a paid mutator transaction binding the contract method 0x2d478e6b. +// +// Solidity: function setDefaultPermissionsManager(address permissionsManager) returns() +func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliSession) SetDefaultPermissionsManager(permissionsManager common.Address) (*types.Transaction, error) { + return _ZionSpaceManagerGoerli.Contract.SetDefaultPermissionsManager(&_ZionSpaceManagerGoerli.TransactOpts, permissionsManager) +} + +// SetDefaultPermissionsManager is a paid mutator transaction binding the contract method 0x2d478e6b. +// +// Solidity: function setDefaultPermissionsManager(address permissionsManager) returns() +func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliTransactorSession) SetDefaultPermissionsManager(permissionsManager common.Address) (*types.Transaction, error) { + return _ZionSpaceManagerGoerli.Contract.SetDefaultPermissionsManager(&_ZionSpaceManagerGoerli.TransactOpts, permissionsManager) +} + // TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. // // Solidity: function transferOwnership(address newOwner) returns() @@ -816,24 +902,24 @@ func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliTransactorSession) Transfer return _ZionSpaceManagerGoerli.Contract.TransferOwnership(&_ZionSpaceManagerGoerli.TransactOpts, newOwner) } -// WhitelistEntitlementModule is a paid mutator transaction binding the contract method 0x28dcb202. +// WhitelistEntitlementModule is a paid mutator transaction binding the contract method 0xe798ff3f. // -// Solidity: function whitelistEntitlementModule(uint256 spaceId, address entitlementAddress, bool whitelist) returns() -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliTransactor) WhitelistEntitlementModule(opts *bind.TransactOpts, spaceId *big.Int, entitlementAddress common.Address, whitelist bool) (*types.Transaction, error) { +// Solidity: function whitelistEntitlementModule(string spaceId, address entitlementAddress, bool whitelist) returns() +func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliTransactor) WhitelistEntitlementModule(opts *bind.TransactOpts, spaceId string, entitlementAddress common.Address, whitelist bool) (*types.Transaction, error) { return _ZionSpaceManagerGoerli.contract.Transact(opts, "whitelistEntitlementModule", spaceId, entitlementAddress, whitelist) } -// WhitelistEntitlementModule is a paid mutator transaction binding the contract method 0x28dcb202. +// WhitelistEntitlementModule is a paid mutator transaction binding the contract method 0xe798ff3f. // -// Solidity: function whitelistEntitlementModule(uint256 spaceId, address entitlementAddress, bool whitelist) returns() -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliSession) WhitelistEntitlementModule(spaceId *big.Int, entitlementAddress common.Address, whitelist bool) (*types.Transaction, error) { +// Solidity: function whitelistEntitlementModule(string spaceId, address entitlementAddress, bool whitelist) returns() +func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliSession) WhitelistEntitlementModule(spaceId string, entitlementAddress common.Address, whitelist bool) (*types.Transaction, error) { return _ZionSpaceManagerGoerli.Contract.WhitelistEntitlementModule(&_ZionSpaceManagerGoerli.TransactOpts, spaceId, entitlementAddress, whitelist) } -// WhitelistEntitlementModule is a paid mutator transaction binding the contract method 0x28dcb202. +// WhitelistEntitlementModule is a paid mutator transaction binding the contract method 0xe798ff3f. // -// Solidity: function whitelistEntitlementModule(uint256 spaceId, address entitlementAddress, bool whitelist) returns() -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliTransactorSession) WhitelistEntitlementModule(spaceId *big.Int, entitlementAddress common.Address, whitelist bool) (*types.Transaction, error) { +// Solidity: function whitelistEntitlementModule(string spaceId, address entitlementAddress, bool whitelist) returns() +func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliTransactorSession) WhitelistEntitlementModule(spaceId string, entitlementAddress common.Address, whitelist bool) (*types.Transaction, error) { return _ZionSpaceManagerGoerli.Contract.WhitelistEntitlementModule(&_ZionSpaceManagerGoerli.TransactOpts, spaceId, entitlementAddress, whitelist) } diff --git a/zion/contracts/localhost/addresses/council.json b/zion/contracts/localhost/addresses/council.json index f77cb6279..7ab138d4e 100644 --- a/zion/contracts/localhost/addresses/council.json +++ b/zion/contracts/localhost/addresses/council.json @@ -1 +1 @@ -{"councilnft": "0x2279b7a0a67db372996a5fab50d91eaa73d2ebe6"} \ No newline at end of file +{"councilnft": "0x8a791620dd6260079bf849dc5567adc3f2fdc318"} \ No newline at end of file diff --git a/zion/contracts/localhost/addresses/space-manager.json b/zion/contracts/localhost/addresses/space-manager.json index fc5164f9f..9a76b9758 100644 --- a/zion/contracts/localhost/addresses/space-manager.json +++ b/zion/contracts/localhost/addresses/space-manager.json @@ -1 +1 @@ -{"spacemanager": "0x9fe46736679d2d9a65f0992f2272de9f3c7fa6e0","usergranted": "0xcf7ed3acca5a467e9e704c703e8d87f634fb0fc9","tokengranted": "0xdc64a140aa3e981100a9beca4e685f962f0cf6c9"} \ No newline at end of file +{"spacemanager": "0xcf7ed3acca5a467e9e704c703e8d87f634fb0fc9","usergranted": "0xdc64a140aa3e981100a9beca4e685f962f0cf6c9","tokengranted": "0x5fc8d32690cc91d4c39d9d3abcbd16989f875707"} \ No newline at end of file diff --git a/zion/zion_space_manager_localhost.go b/zion/contracts/localhost/zion_localhost/zion_space_manager_localhost.go similarity index 54% rename from zion/zion_space_manager_localhost.go rename to zion/contracts/localhost/zion_localhost/zion_space_manager_localhost.go index 1a138a392..2d3d7f385 100644 --- a/zion/zion_space_manager_localhost.go +++ b/zion/contracts/localhost/zion_localhost/zion_space_manager_localhost.go @@ -1,7 +1,7 @@ // Code generated - DO NOT EDIT. // This file is a generated binding and any manual changes will be lost. -package zion +package zion_localhost import ( "errors" @@ -28,9 +28,67 @@ var ( _ = event.NewSubscription ) +// DataTypesCreateChannelData is an auto generated low-level Go binding around an user-defined struct. +type DataTypesCreateChannelData struct { + ChannelName string + NetworkId string + SpaceId string + Roles []DataTypesCreateRoleData +} + +// DataTypesCreateRoleData is an auto generated low-level Go binding around an user-defined struct. +type DataTypesCreateRoleData struct { + Name string + Metadata string + Permissions []DataTypesPermission +} + +// DataTypesCreateSpaceData is an auto generated low-level Go binding around an user-defined struct. +type DataTypesCreateSpaceData struct { + SpaceName string + NetworkId string +} + +// DataTypesCreateSpaceTokenEntitlementData is an auto generated low-level Go binding around an user-defined struct. +type DataTypesCreateSpaceTokenEntitlementData struct { + EntitlementModuleAddress common.Address + TokenAddress common.Address + Quantity *big.Int + Description string + Permissions []string +} + +// DataTypesEntitlementModuleInfo is an auto generated low-level Go binding around an user-defined struct. +type DataTypesEntitlementModuleInfo struct { + EntitlementAddress common.Address + EntitlementName string + EntitlementDescription string +} + +// DataTypesPermission is an auto generated low-level Go binding around an user-defined struct. +type DataTypesPermission struct { + Name string +} + +// DataTypesRole is an auto generated low-level Go binding around an user-defined struct. +type DataTypesRole struct { + RoleId *big.Int + Name string + IsTransitive bool +} + +// DataTypesSpaceInfo is an auto generated low-level Go binding around an user-defined struct. +type DataTypesSpaceInfo struct { + SpaceId *big.Int + CreatedAt *big.Int + Name string + Creator common.Address + Owner common.Address +} + // ZionSpaceManagerLocalhostMetaData contains all meta data concerning the ZionSpaceManagerLocalhost contract. var ZionSpaceManagerLocalhostMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"DefaultEntitlementModuleNotSet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"EntitlementAlreadyWhitelisted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"EntitlementModuleNotSupported\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"EntitlementNotWhitelisted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotSpaceOwner\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"spaceId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"roleId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structDataTypes.Permission\",\"name\":\"permission\",\"type\":\"tuple\"}],\"name\":\"addPermissionToRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"spaceId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"entitlementModuleAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"roleId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"entitlementData\",\"type\":\"bytes\"}],\"name\":\"addRoleToEntitlementModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"spaceId\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"bytes8\",\"name\":\"color\",\"type\":\"bytes8\"}],\"name\":\"createRole\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"spaceName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"networkId\",\"type\":\"string\"}],\"internalType\":\"structDataTypes.CreateSpaceData\",\"name\":\"info\",\"type\":\"tuple\"}],\"name\":\"createSpace\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"spaceName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"networkId\",\"type\":\"string\"}],\"internalType\":\"structDataTypes.CreateSpaceData\",\"name\":\"info\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"entitlementModuleAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"description\",\"type\":\"string\"},{\"internalType\":\"string[]\",\"name\":\"permissions\",\"type\":\"string[]\"}],\"internalType\":\"structDataTypes.CreateSpaceTokenEntitlementData\",\"name\":\"entitlement\",\"type\":\"tuple\"}],\"name\":\"createSpaceWithTokenEntitlement\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"spaceId\",\"type\":\"uint256\"}],\"name\":\"getEntitlementModulesBySpaceId\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"entitlementModules\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"spaceId\",\"type\":\"uint256\"}],\"name\":\"getEntitlementsInfoBySpaceId\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"entitlementAddress\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"entitlementName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"entitlementDescription\",\"type\":\"string\"}],\"internalType\":\"structDataTypes.EntitlementModuleInfo[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enumISpaceManager.ZionPermission\",\"name\":\"zionPermission\",\"type\":\"uint8\"}],\"name\":\"getPermissionFromMap\",\"outputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structDataTypes.Permission\",\"name\":\"permission\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"spaceId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"roleId\",\"type\":\"uint256\"}],\"name\":\"getPermissionsBySpaceIdByRoleId\",\"outputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structDataTypes.Permission[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"spaceId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"roleId\",\"type\":\"uint256\"}],\"name\":\"getRoleBySpaceIdByRoleId\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"roleId\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"bytes8\",\"name\":\"color\",\"type\":\"bytes8\"},{\"internalType\":\"bool\",\"name\":\"isTransitive\",\"type\":\"bool\"}],\"internalType\":\"structDataTypes.Role\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"spaceId\",\"type\":\"uint256\"}],\"name\":\"getRolesBySpaceId\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"roleId\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"bytes8\",\"name\":\"color\",\"type\":\"bytes8\"},{\"internalType\":\"bool\",\"name\":\"isTransitive\",\"type\":\"bool\"}],\"internalType\":\"structDataTypes.Role[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"networkId\",\"type\":\"string\"}],\"name\":\"getSpaceIdByNetworkId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_spaceId\",\"type\":\"uint256\"}],\"name\":\"getSpaceInfoBySpaceId\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"spaceId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"createdAt\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"creator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"internalType\":\"structDataTypes.SpaceInfo\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_spaceId\",\"type\":\"uint256\"}],\"name\":\"getSpaceOwnerBySpaceId\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"ownerAddress\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSpaces\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"spaceId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"createdAt\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"creator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"internalType\":\"structDataTypes.SpaceInfo[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"spaceId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"roomId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structDataTypes.Permission\",\"name\":\"permission\",\"type\":\"tuple\"}],\"name\":\"isEntitled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"spaceId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"entitlementModuleAddress\",\"type\":\"address\"}],\"name\":\"isEntitlementModuleWhitelisted\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"entitlementModule\",\"type\":\"address\"}],\"name\":\"registerDefaultEntitlementModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"spaceId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"entitlementModuleAddress\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"roleIds\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"removeEntitlement\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"spaceId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"entitlementAddress\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"whitelist\",\"type\":\"bool\"}],\"name\":\"whitelistEntitlementModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enumISpaceManager.ZionPermission\",\"name\":\"\",\"type\":\"uint8\"}],\"name\":\"zionPermissionsMap\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"defaultPermissionsManagerAddress_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"DefaultEntitlementModuleNotSet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DefaultPermissionsManagerNotSet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"EntitlementAlreadyWhitelisted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"EntitlementModuleNotSupported\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"EntitlementNotWhitelisted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotAllowed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotSpaceOwner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SpaceAlreadyRegistered\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"spaceId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"roleId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structDataTypes.Permission\",\"name\":\"permission\",\"type\":\"tuple\"}],\"name\":\"addPermissionToRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"spaceId\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"channelId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"entitlementModuleAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"roleId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"entitlementData\",\"type\":\"bytes\"}],\"name\":\"addRoleToEntitlementModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"channelName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"networkId\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"spaceId\",\"type\":\"string\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"metadata\",\"type\":\"string\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structDataTypes.Permission[]\",\"name\":\"permissions\",\"type\":\"tuple[]\"}],\"internalType\":\"structDataTypes.CreateRoleData[]\",\"name\":\"roles\",\"type\":\"tuple[]\"}],\"internalType\":\"structDataTypes.CreateChannelData\",\"name\":\"data\",\"type\":\"tuple\"}],\"name\":\"createChannel\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"spaceId\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"name\":\"createRole\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"spaceName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"networkId\",\"type\":\"string\"}],\"internalType\":\"structDataTypes.CreateSpaceData\",\"name\":\"info\",\"type\":\"tuple\"}],\"name\":\"createSpace\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"spaceName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"networkId\",\"type\":\"string\"}],\"internalType\":\"structDataTypes.CreateSpaceData\",\"name\":\"info\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"entitlementModuleAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"description\",\"type\":\"string\"},{\"internalType\":\"string[]\",\"name\":\"permissions\",\"type\":\"string[]\"}],\"internalType\":\"structDataTypes.CreateSpaceTokenEntitlementData\",\"name\":\"entitlement\",\"type\":\"tuple\"}],\"name\":\"createSpaceWithTokenEntitlement\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"spaceId\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"channelId\",\"type\":\"string\"}],\"name\":\"getChannelIdByNetworkId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"spaceId\",\"type\":\"string\"}],\"name\":\"getEntitlementModulesBySpaceId\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"entitlementModules\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"spaceId\",\"type\":\"string\"}],\"name\":\"getEntitlementsInfoBySpaceId\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"entitlementAddress\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"entitlementName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"entitlementDescription\",\"type\":\"string\"}],\"internalType\":\"structDataTypes.EntitlementModuleInfo[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"permissionType\",\"type\":\"bytes32\"}],\"name\":\"getPermissionFromMap\",\"outputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structDataTypes.Permission\",\"name\":\"permission\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"spaceId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"roleId\",\"type\":\"uint256\"}],\"name\":\"getPermissionsBySpaceIdByRoleId\",\"outputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structDataTypes.Permission[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"spaceId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"roleId\",\"type\":\"uint256\"}],\"name\":\"getRoleBySpaceIdByRoleId\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"roleId\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"bool\",\"name\":\"isTransitive\",\"type\":\"bool\"}],\"internalType\":\"structDataTypes.Role\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"spaceId\",\"type\":\"string\"}],\"name\":\"getRolesBySpaceId\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"roleId\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"bool\",\"name\":\"isTransitive\",\"type\":\"bool\"}],\"internalType\":\"structDataTypes.Role[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"networkId\",\"type\":\"string\"}],\"name\":\"getSpaceIdByNetworkId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"spaceId\",\"type\":\"string\"}],\"name\":\"getSpaceInfoBySpaceId\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"spaceId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"createdAt\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"creator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"internalType\":\"structDataTypes.SpaceInfo\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_spaceId\",\"type\":\"string\"}],\"name\":\"getSpaceOwnerBySpaceId\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"ownerAddress\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSpaces\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"spaceId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"createdAt\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"creator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"internalType\":\"structDataTypes.SpaceInfo[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"spaceId\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"channelId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structDataTypes.Permission\",\"name\":\"permission\",\"type\":\"tuple\"}],\"name\":\"isEntitled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"spaceId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"entitlementModuleAddress\",\"type\":\"address\"}],\"name\":\"isEntitlementModuleWhitelisted\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"spaceId\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"channelId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"entitlementModuleAddress\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"roleIds\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"removeEntitlement\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"entitlementModule\",\"type\":\"address\"}],\"name\":\"setDefaultEntitlementModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"permissionsManager\",\"type\":\"address\"}],\"name\":\"setDefaultPermissionsManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"spaceId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"entitlementAddress\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"whitelist\",\"type\":\"bool\"}],\"name\":\"whitelistEntitlementModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", } // ZionSpaceManagerLocalhostABI is the input ABI used to generate the binding from. @@ -179,10 +237,41 @@ func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostTransactorRaw) Transa return _ZionSpaceManagerLocalhost.Contract.contract.Transact(opts, method, params...) } -// GetEntitlementModulesBySpaceId is a free data retrieval call binding the contract method 0x41ab8a9a. +// GetChannelIdByNetworkId is a free data retrieval call binding the contract method 0x3e66eae3. // -// Solidity: function getEntitlementModulesBySpaceId(uint256 spaceId) view returns(address[] entitlementModules) -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCaller) GetEntitlementModulesBySpaceId(opts *bind.CallOpts, spaceId *big.Int) ([]common.Address, error) { +// Solidity: function getChannelIdByNetworkId(string spaceId, string channelId) view returns(uint256) +func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCaller) GetChannelIdByNetworkId(opts *bind.CallOpts, spaceId string, channelId string) (*big.Int, error) { + var out []interface{} + err := _ZionSpaceManagerLocalhost.contract.Call(opts, &out, "getChannelIdByNetworkId", spaceId, channelId) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetChannelIdByNetworkId is a free data retrieval call binding the contract method 0x3e66eae3. +// +// Solidity: function getChannelIdByNetworkId(string spaceId, string channelId) view returns(uint256) +func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostSession) GetChannelIdByNetworkId(spaceId string, channelId string) (*big.Int, error) { + return _ZionSpaceManagerLocalhost.Contract.GetChannelIdByNetworkId(&_ZionSpaceManagerLocalhost.CallOpts, spaceId, channelId) +} + +// GetChannelIdByNetworkId is a free data retrieval call binding the contract method 0x3e66eae3. +// +// Solidity: function getChannelIdByNetworkId(string spaceId, string channelId) view returns(uint256) +func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCallerSession) GetChannelIdByNetworkId(spaceId string, channelId string) (*big.Int, error) { + return _ZionSpaceManagerLocalhost.Contract.GetChannelIdByNetworkId(&_ZionSpaceManagerLocalhost.CallOpts, spaceId, channelId) +} + +// GetEntitlementModulesBySpaceId is a free data retrieval call binding the contract method 0x141b6498. +// +// Solidity: function getEntitlementModulesBySpaceId(string spaceId) view returns(address[] entitlementModules) +func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCaller) GetEntitlementModulesBySpaceId(opts *bind.CallOpts, spaceId string) ([]common.Address, error) { var out []interface{} err := _ZionSpaceManagerLocalhost.contract.Call(opts, &out, "getEntitlementModulesBySpaceId", spaceId) @@ -196,24 +285,24 @@ func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCaller) GetEntitlemen } -// GetEntitlementModulesBySpaceId is a free data retrieval call binding the contract method 0x41ab8a9a. +// GetEntitlementModulesBySpaceId is a free data retrieval call binding the contract method 0x141b6498. // -// Solidity: function getEntitlementModulesBySpaceId(uint256 spaceId) view returns(address[] entitlementModules) -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostSession) GetEntitlementModulesBySpaceId(spaceId *big.Int) ([]common.Address, error) { +// Solidity: function getEntitlementModulesBySpaceId(string spaceId) view returns(address[] entitlementModules) +func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostSession) GetEntitlementModulesBySpaceId(spaceId string) ([]common.Address, error) { return _ZionSpaceManagerLocalhost.Contract.GetEntitlementModulesBySpaceId(&_ZionSpaceManagerLocalhost.CallOpts, spaceId) } -// GetEntitlementModulesBySpaceId is a free data retrieval call binding the contract method 0x41ab8a9a. +// GetEntitlementModulesBySpaceId is a free data retrieval call binding the contract method 0x141b6498. // -// Solidity: function getEntitlementModulesBySpaceId(uint256 spaceId) view returns(address[] entitlementModules) -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCallerSession) GetEntitlementModulesBySpaceId(spaceId *big.Int) ([]common.Address, error) { +// Solidity: function getEntitlementModulesBySpaceId(string spaceId) view returns(address[] entitlementModules) +func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCallerSession) GetEntitlementModulesBySpaceId(spaceId string) ([]common.Address, error) { return _ZionSpaceManagerLocalhost.Contract.GetEntitlementModulesBySpaceId(&_ZionSpaceManagerLocalhost.CallOpts, spaceId) } -// GetEntitlementsInfoBySpaceId is a free data retrieval call binding the contract method 0x8a99bd88. +// GetEntitlementsInfoBySpaceId is a free data retrieval call binding the contract method 0x3519167c. // -// Solidity: function getEntitlementsInfoBySpaceId(uint256 spaceId) view returns((address,string,string)[]) -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCaller) GetEntitlementsInfoBySpaceId(opts *bind.CallOpts, spaceId *big.Int) ([]DataTypesEntitlementModuleInfo, error) { +// Solidity: function getEntitlementsInfoBySpaceId(string spaceId) view returns((address,string,string)[]) +func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCaller) GetEntitlementsInfoBySpaceId(opts *bind.CallOpts, spaceId string) ([]DataTypesEntitlementModuleInfo, error) { var out []interface{} err := _ZionSpaceManagerLocalhost.contract.Call(opts, &out, "getEntitlementsInfoBySpaceId", spaceId) @@ -227,26 +316,26 @@ func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCaller) GetEntitlemen } -// GetEntitlementsInfoBySpaceId is a free data retrieval call binding the contract method 0x8a99bd88. +// GetEntitlementsInfoBySpaceId is a free data retrieval call binding the contract method 0x3519167c. // -// Solidity: function getEntitlementsInfoBySpaceId(uint256 spaceId) view returns((address,string,string)[]) -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostSession) GetEntitlementsInfoBySpaceId(spaceId *big.Int) ([]DataTypesEntitlementModuleInfo, error) { +// Solidity: function getEntitlementsInfoBySpaceId(string spaceId) view returns((address,string,string)[]) +func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostSession) GetEntitlementsInfoBySpaceId(spaceId string) ([]DataTypesEntitlementModuleInfo, error) { return _ZionSpaceManagerLocalhost.Contract.GetEntitlementsInfoBySpaceId(&_ZionSpaceManagerLocalhost.CallOpts, spaceId) } -// GetEntitlementsInfoBySpaceId is a free data retrieval call binding the contract method 0x8a99bd88. +// GetEntitlementsInfoBySpaceId is a free data retrieval call binding the contract method 0x3519167c. // -// Solidity: function getEntitlementsInfoBySpaceId(uint256 spaceId) view returns((address,string,string)[]) -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCallerSession) GetEntitlementsInfoBySpaceId(spaceId *big.Int) ([]DataTypesEntitlementModuleInfo, error) { +// Solidity: function getEntitlementsInfoBySpaceId(string spaceId) view returns((address,string,string)[]) +func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCallerSession) GetEntitlementsInfoBySpaceId(spaceId string) ([]DataTypesEntitlementModuleInfo, error) { return _ZionSpaceManagerLocalhost.Contract.GetEntitlementsInfoBySpaceId(&_ZionSpaceManagerLocalhost.CallOpts, spaceId) } -// GetPermissionFromMap is a free data retrieval call binding the contract method 0x9152efda. +// GetPermissionFromMap is a free data retrieval call binding the contract method 0x9ea4d532. // -// Solidity: function getPermissionFromMap(uint8 zionPermission) view returns((string) permission) -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCaller) GetPermissionFromMap(opts *bind.CallOpts, zionPermission uint8) (DataTypesPermission, error) { +// Solidity: function getPermissionFromMap(bytes32 permissionType) view returns((string) permission) +func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCaller) GetPermissionFromMap(opts *bind.CallOpts, permissionType [32]byte) (DataTypesPermission, error) { var out []interface{} - err := _ZionSpaceManagerLocalhost.contract.Call(opts, &out, "getPermissionFromMap", zionPermission) + err := _ZionSpaceManagerLocalhost.contract.Call(opts, &out, "getPermissionFromMap", permissionType) if err != nil { return *new(DataTypesPermission), err @@ -258,24 +347,24 @@ func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCaller) GetPermission } -// GetPermissionFromMap is a free data retrieval call binding the contract method 0x9152efda. +// GetPermissionFromMap is a free data retrieval call binding the contract method 0x9ea4d532. // -// Solidity: function getPermissionFromMap(uint8 zionPermission) view returns((string) permission) -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostSession) GetPermissionFromMap(zionPermission uint8) (DataTypesPermission, error) { - return _ZionSpaceManagerLocalhost.Contract.GetPermissionFromMap(&_ZionSpaceManagerLocalhost.CallOpts, zionPermission) +// Solidity: function getPermissionFromMap(bytes32 permissionType) view returns((string) permission) +func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostSession) GetPermissionFromMap(permissionType [32]byte) (DataTypesPermission, error) { + return _ZionSpaceManagerLocalhost.Contract.GetPermissionFromMap(&_ZionSpaceManagerLocalhost.CallOpts, permissionType) } -// GetPermissionFromMap is a free data retrieval call binding the contract method 0x9152efda. +// GetPermissionFromMap is a free data retrieval call binding the contract method 0x9ea4d532. // -// Solidity: function getPermissionFromMap(uint8 zionPermission) view returns((string) permission) -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCallerSession) GetPermissionFromMap(zionPermission uint8) (DataTypesPermission, error) { - return _ZionSpaceManagerLocalhost.Contract.GetPermissionFromMap(&_ZionSpaceManagerLocalhost.CallOpts, zionPermission) +// Solidity: function getPermissionFromMap(bytes32 permissionType) view returns((string) permission) +func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCallerSession) GetPermissionFromMap(permissionType [32]byte) (DataTypesPermission, error) { + return _ZionSpaceManagerLocalhost.Contract.GetPermissionFromMap(&_ZionSpaceManagerLocalhost.CallOpts, permissionType) } -// GetPermissionsBySpaceIdByRoleId is a free data retrieval call binding the contract method 0xa7d325fc. +// GetPermissionsBySpaceIdByRoleId is a free data retrieval call binding the contract method 0x7074047c. // -// Solidity: function getPermissionsBySpaceIdByRoleId(uint256 spaceId, uint256 roleId) view returns((string)[]) -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCaller) GetPermissionsBySpaceIdByRoleId(opts *bind.CallOpts, spaceId *big.Int, roleId *big.Int) ([]DataTypesPermission, error) { +// Solidity: function getPermissionsBySpaceIdByRoleId(string spaceId, uint256 roleId) view returns((string)[]) +func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCaller) GetPermissionsBySpaceIdByRoleId(opts *bind.CallOpts, spaceId string, roleId *big.Int) ([]DataTypesPermission, error) { var out []interface{} err := _ZionSpaceManagerLocalhost.contract.Call(opts, &out, "getPermissionsBySpaceIdByRoleId", spaceId, roleId) @@ -289,24 +378,24 @@ func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCaller) GetPermission } -// GetPermissionsBySpaceIdByRoleId is a free data retrieval call binding the contract method 0xa7d325fc. +// GetPermissionsBySpaceIdByRoleId is a free data retrieval call binding the contract method 0x7074047c. // -// Solidity: function getPermissionsBySpaceIdByRoleId(uint256 spaceId, uint256 roleId) view returns((string)[]) -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostSession) GetPermissionsBySpaceIdByRoleId(spaceId *big.Int, roleId *big.Int) ([]DataTypesPermission, error) { +// Solidity: function getPermissionsBySpaceIdByRoleId(string spaceId, uint256 roleId) view returns((string)[]) +func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostSession) GetPermissionsBySpaceIdByRoleId(spaceId string, roleId *big.Int) ([]DataTypesPermission, error) { return _ZionSpaceManagerLocalhost.Contract.GetPermissionsBySpaceIdByRoleId(&_ZionSpaceManagerLocalhost.CallOpts, spaceId, roleId) } -// GetPermissionsBySpaceIdByRoleId is a free data retrieval call binding the contract method 0xa7d325fc. +// GetPermissionsBySpaceIdByRoleId is a free data retrieval call binding the contract method 0x7074047c. // -// Solidity: function getPermissionsBySpaceIdByRoleId(uint256 spaceId, uint256 roleId) view returns((string)[]) -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCallerSession) GetPermissionsBySpaceIdByRoleId(spaceId *big.Int, roleId *big.Int) ([]DataTypesPermission, error) { +// Solidity: function getPermissionsBySpaceIdByRoleId(string spaceId, uint256 roleId) view returns((string)[]) +func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCallerSession) GetPermissionsBySpaceIdByRoleId(spaceId string, roleId *big.Int) ([]DataTypesPermission, error) { return _ZionSpaceManagerLocalhost.Contract.GetPermissionsBySpaceIdByRoleId(&_ZionSpaceManagerLocalhost.CallOpts, spaceId, roleId) } -// GetRoleBySpaceIdByRoleId is a free data retrieval call binding the contract method 0xd9af4ecf. +// GetRoleBySpaceIdByRoleId is a free data retrieval call binding the contract method 0xb3ff31b2. // -// Solidity: function getRoleBySpaceIdByRoleId(uint256 spaceId, uint256 roleId) view returns((uint256,string,bytes8,bool)) -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCaller) GetRoleBySpaceIdByRoleId(opts *bind.CallOpts, spaceId *big.Int, roleId *big.Int) (DataTypesRole, error) { +// Solidity: function getRoleBySpaceIdByRoleId(string spaceId, uint256 roleId) view returns((uint256,string,bool)) +func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCaller) GetRoleBySpaceIdByRoleId(opts *bind.CallOpts, spaceId string, roleId *big.Int) (DataTypesRole, error) { var out []interface{} err := _ZionSpaceManagerLocalhost.contract.Call(opts, &out, "getRoleBySpaceIdByRoleId", spaceId, roleId) @@ -320,24 +409,24 @@ func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCaller) GetRoleBySpac } -// GetRoleBySpaceIdByRoleId is a free data retrieval call binding the contract method 0xd9af4ecf. +// GetRoleBySpaceIdByRoleId is a free data retrieval call binding the contract method 0xb3ff31b2. // -// Solidity: function getRoleBySpaceIdByRoleId(uint256 spaceId, uint256 roleId) view returns((uint256,string,bytes8,bool)) -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostSession) GetRoleBySpaceIdByRoleId(spaceId *big.Int, roleId *big.Int) (DataTypesRole, error) { +// Solidity: function getRoleBySpaceIdByRoleId(string spaceId, uint256 roleId) view returns((uint256,string,bool)) +func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostSession) GetRoleBySpaceIdByRoleId(spaceId string, roleId *big.Int) (DataTypesRole, error) { return _ZionSpaceManagerLocalhost.Contract.GetRoleBySpaceIdByRoleId(&_ZionSpaceManagerLocalhost.CallOpts, spaceId, roleId) } -// GetRoleBySpaceIdByRoleId is a free data retrieval call binding the contract method 0xd9af4ecf. +// GetRoleBySpaceIdByRoleId is a free data retrieval call binding the contract method 0xb3ff31b2. // -// Solidity: function getRoleBySpaceIdByRoleId(uint256 spaceId, uint256 roleId) view returns((uint256,string,bytes8,bool)) -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCallerSession) GetRoleBySpaceIdByRoleId(spaceId *big.Int, roleId *big.Int) (DataTypesRole, error) { +// Solidity: function getRoleBySpaceIdByRoleId(string spaceId, uint256 roleId) view returns((uint256,string,bool)) +func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCallerSession) GetRoleBySpaceIdByRoleId(spaceId string, roleId *big.Int) (DataTypesRole, error) { return _ZionSpaceManagerLocalhost.Contract.GetRoleBySpaceIdByRoleId(&_ZionSpaceManagerLocalhost.CallOpts, spaceId, roleId) } -// GetRolesBySpaceId is a free data retrieval call binding the contract method 0x52f1bea2. +// GetRolesBySpaceId is a free data retrieval call binding the contract method 0x4bf2abb2. // -// Solidity: function getRolesBySpaceId(uint256 spaceId) view returns((uint256,string,bytes8,bool)[]) -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCaller) GetRolesBySpaceId(opts *bind.CallOpts, spaceId *big.Int) ([]DataTypesRole, error) { +// Solidity: function getRolesBySpaceId(string spaceId) view returns((uint256,string,bool)[]) +func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCaller) GetRolesBySpaceId(opts *bind.CallOpts, spaceId string) ([]DataTypesRole, error) { var out []interface{} err := _ZionSpaceManagerLocalhost.contract.Call(opts, &out, "getRolesBySpaceId", spaceId) @@ -351,17 +440,17 @@ func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCaller) GetRolesBySpa } -// GetRolesBySpaceId is a free data retrieval call binding the contract method 0x52f1bea2. +// GetRolesBySpaceId is a free data retrieval call binding the contract method 0x4bf2abb2. // -// Solidity: function getRolesBySpaceId(uint256 spaceId) view returns((uint256,string,bytes8,bool)[]) -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostSession) GetRolesBySpaceId(spaceId *big.Int) ([]DataTypesRole, error) { +// Solidity: function getRolesBySpaceId(string spaceId) view returns((uint256,string,bool)[]) +func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostSession) GetRolesBySpaceId(spaceId string) ([]DataTypesRole, error) { return _ZionSpaceManagerLocalhost.Contract.GetRolesBySpaceId(&_ZionSpaceManagerLocalhost.CallOpts, spaceId) } -// GetRolesBySpaceId is a free data retrieval call binding the contract method 0x52f1bea2. +// GetRolesBySpaceId is a free data retrieval call binding the contract method 0x4bf2abb2. // -// Solidity: function getRolesBySpaceId(uint256 spaceId) view returns((uint256,string,bytes8,bool)[]) -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCallerSession) GetRolesBySpaceId(spaceId *big.Int) ([]DataTypesRole, error) { +// Solidity: function getRolesBySpaceId(string spaceId) view returns((uint256,string,bool)[]) +func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCallerSession) GetRolesBySpaceId(spaceId string) ([]DataTypesRole, error) { return _ZionSpaceManagerLocalhost.Contract.GetRolesBySpaceId(&_ZionSpaceManagerLocalhost.CallOpts, spaceId) } @@ -396,12 +485,12 @@ func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCallerSession) GetSpa return _ZionSpaceManagerLocalhost.Contract.GetSpaceIdByNetworkId(&_ZionSpaceManagerLocalhost.CallOpts, networkId) } -// GetSpaceInfoBySpaceId is a free data retrieval call binding the contract method 0x3439f03b. +// GetSpaceInfoBySpaceId is a free data retrieval call binding the contract method 0x2bb59212. // -// Solidity: function getSpaceInfoBySpaceId(uint256 _spaceId) view returns((uint256,uint256,string,address,address)) -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCaller) GetSpaceInfoBySpaceId(opts *bind.CallOpts, _spaceId *big.Int) (DataTypesSpaceInfo, error) { +// Solidity: function getSpaceInfoBySpaceId(string spaceId) view returns((uint256,uint256,string,address,address)) +func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCaller) GetSpaceInfoBySpaceId(opts *bind.CallOpts, spaceId string) (DataTypesSpaceInfo, error) { var out []interface{} - err := _ZionSpaceManagerLocalhost.contract.Call(opts, &out, "getSpaceInfoBySpaceId", _spaceId) + err := _ZionSpaceManagerLocalhost.contract.Call(opts, &out, "getSpaceInfoBySpaceId", spaceId) if err != nil { return *new(DataTypesSpaceInfo), err @@ -413,24 +502,24 @@ func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCaller) GetSpaceInfoB } -// GetSpaceInfoBySpaceId is a free data retrieval call binding the contract method 0x3439f03b. +// GetSpaceInfoBySpaceId is a free data retrieval call binding the contract method 0x2bb59212. // -// Solidity: function getSpaceInfoBySpaceId(uint256 _spaceId) view returns((uint256,uint256,string,address,address)) -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostSession) GetSpaceInfoBySpaceId(_spaceId *big.Int) (DataTypesSpaceInfo, error) { - return _ZionSpaceManagerLocalhost.Contract.GetSpaceInfoBySpaceId(&_ZionSpaceManagerLocalhost.CallOpts, _spaceId) +// Solidity: function getSpaceInfoBySpaceId(string spaceId) view returns((uint256,uint256,string,address,address)) +func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostSession) GetSpaceInfoBySpaceId(spaceId string) (DataTypesSpaceInfo, error) { + return _ZionSpaceManagerLocalhost.Contract.GetSpaceInfoBySpaceId(&_ZionSpaceManagerLocalhost.CallOpts, spaceId) } -// GetSpaceInfoBySpaceId is a free data retrieval call binding the contract method 0x3439f03b. +// GetSpaceInfoBySpaceId is a free data retrieval call binding the contract method 0x2bb59212. // -// Solidity: function getSpaceInfoBySpaceId(uint256 _spaceId) view returns((uint256,uint256,string,address,address)) -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCallerSession) GetSpaceInfoBySpaceId(_spaceId *big.Int) (DataTypesSpaceInfo, error) { - return _ZionSpaceManagerLocalhost.Contract.GetSpaceInfoBySpaceId(&_ZionSpaceManagerLocalhost.CallOpts, _spaceId) +// Solidity: function getSpaceInfoBySpaceId(string spaceId) view returns((uint256,uint256,string,address,address)) +func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCallerSession) GetSpaceInfoBySpaceId(spaceId string) (DataTypesSpaceInfo, error) { + return _ZionSpaceManagerLocalhost.Contract.GetSpaceInfoBySpaceId(&_ZionSpaceManagerLocalhost.CallOpts, spaceId) } -// GetSpaceOwnerBySpaceId is a free data retrieval call binding the contract method 0x7dde72d8. +// GetSpaceOwnerBySpaceId is a free data retrieval call binding the contract method 0x2a4bdf25. // -// Solidity: function getSpaceOwnerBySpaceId(uint256 _spaceId) view returns(address ownerAddress) -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCaller) GetSpaceOwnerBySpaceId(opts *bind.CallOpts, _spaceId *big.Int) (common.Address, error) { +// Solidity: function getSpaceOwnerBySpaceId(string _spaceId) view returns(address ownerAddress) +func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCaller) GetSpaceOwnerBySpaceId(opts *bind.CallOpts, _spaceId string) (common.Address, error) { var out []interface{} err := _ZionSpaceManagerLocalhost.contract.Call(opts, &out, "getSpaceOwnerBySpaceId", _spaceId) @@ -444,17 +533,17 @@ func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCaller) GetSpaceOwner } -// GetSpaceOwnerBySpaceId is a free data retrieval call binding the contract method 0x7dde72d8. +// GetSpaceOwnerBySpaceId is a free data retrieval call binding the contract method 0x2a4bdf25. // -// Solidity: function getSpaceOwnerBySpaceId(uint256 _spaceId) view returns(address ownerAddress) -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostSession) GetSpaceOwnerBySpaceId(_spaceId *big.Int) (common.Address, error) { +// Solidity: function getSpaceOwnerBySpaceId(string _spaceId) view returns(address ownerAddress) +func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostSession) GetSpaceOwnerBySpaceId(_spaceId string) (common.Address, error) { return _ZionSpaceManagerLocalhost.Contract.GetSpaceOwnerBySpaceId(&_ZionSpaceManagerLocalhost.CallOpts, _spaceId) } -// GetSpaceOwnerBySpaceId is a free data retrieval call binding the contract method 0x7dde72d8. +// GetSpaceOwnerBySpaceId is a free data retrieval call binding the contract method 0x2a4bdf25. // -// Solidity: function getSpaceOwnerBySpaceId(uint256 _spaceId) view returns(address ownerAddress) -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCallerSession) GetSpaceOwnerBySpaceId(_spaceId *big.Int) (common.Address, error) { +// Solidity: function getSpaceOwnerBySpaceId(string _spaceId) view returns(address ownerAddress) +func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCallerSession) GetSpaceOwnerBySpaceId(_spaceId string) (common.Address, error) { return _ZionSpaceManagerLocalhost.Contract.GetSpaceOwnerBySpaceId(&_ZionSpaceManagerLocalhost.CallOpts, _spaceId) } @@ -489,12 +578,12 @@ func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCallerSession) GetSpa return _ZionSpaceManagerLocalhost.Contract.GetSpaces(&_ZionSpaceManagerLocalhost.CallOpts) } -// IsEntitled is a free data retrieval call binding the contract method 0x66218999. +// IsEntitled is a free data retrieval call binding the contract method 0xbf77b663. // -// Solidity: function isEntitled(uint256 spaceId, uint256 roomId, address user, (string) permission) view returns(bool) -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCaller) IsEntitled(opts *bind.CallOpts, spaceId *big.Int, roomId *big.Int, user common.Address, permission DataTypesPermission) (bool, error) { +// Solidity: function isEntitled(string spaceId, string channelId, address user, (string) permission) view returns(bool) +func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCaller) IsEntitled(opts *bind.CallOpts, spaceId string, channelId string, user common.Address, permission DataTypesPermission) (bool, error) { var out []interface{} - err := _ZionSpaceManagerLocalhost.contract.Call(opts, &out, "isEntitled", spaceId, roomId, user, permission) + err := _ZionSpaceManagerLocalhost.contract.Call(opts, &out, "isEntitled", spaceId, channelId, user, permission) if err != nil { return *new(bool), err @@ -506,24 +595,24 @@ func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCaller) IsEntitled(op } -// IsEntitled is a free data retrieval call binding the contract method 0x66218999. +// IsEntitled is a free data retrieval call binding the contract method 0xbf77b663. // -// Solidity: function isEntitled(uint256 spaceId, uint256 roomId, address user, (string) permission) view returns(bool) -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostSession) IsEntitled(spaceId *big.Int, roomId *big.Int, user common.Address, permission DataTypesPermission) (bool, error) { - return _ZionSpaceManagerLocalhost.Contract.IsEntitled(&_ZionSpaceManagerLocalhost.CallOpts, spaceId, roomId, user, permission) +// Solidity: function isEntitled(string spaceId, string channelId, address user, (string) permission) view returns(bool) +func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostSession) IsEntitled(spaceId string, channelId string, user common.Address, permission DataTypesPermission) (bool, error) { + return _ZionSpaceManagerLocalhost.Contract.IsEntitled(&_ZionSpaceManagerLocalhost.CallOpts, spaceId, channelId, user, permission) } -// IsEntitled is a free data retrieval call binding the contract method 0x66218999. +// IsEntitled is a free data retrieval call binding the contract method 0xbf77b663. // -// Solidity: function isEntitled(uint256 spaceId, uint256 roomId, address user, (string) permission) view returns(bool) -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCallerSession) IsEntitled(spaceId *big.Int, roomId *big.Int, user common.Address, permission DataTypesPermission) (bool, error) { - return _ZionSpaceManagerLocalhost.Contract.IsEntitled(&_ZionSpaceManagerLocalhost.CallOpts, spaceId, roomId, user, permission) +// Solidity: function isEntitled(string spaceId, string channelId, address user, (string) permission) view returns(bool) +func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCallerSession) IsEntitled(spaceId string, channelId string, user common.Address, permission DataTypesPermission) (bool, error) { + return _ZionSpaceManagerLocalhost.Contract.IsEntitled(&_ZionSpaceManagerLocalhost.CallOpts, spaceId, channelId, user, permission) } -// IsEntitlementModuleWhitelisted is a free data retrieval call binding the contract method 0xb010ac47. +// IsEntitlementModuleWhitelisted is a free data retrieval call binding the contract method 0x4196d1ff. // -// Solidity: function isEntitlementModuleWhitelisted(uint256 spaceId, address entitlementModuleAddress) view returns(bool) -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCaller) IsEntitlementModuleWhitelisted(opts *bind.CallOpts, spaceId *big.Int, entitlementModuleAddress common.Address) (bool, error) { +// Solidity: function isEntitlementModuleWhitelisted(string spaceId, address entitlementModuleAddress) view returns(bool) +func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCaller) IsEntitlementModuleWhitelisted(opts *bind.CallOpts, spaceId string, entitlementModuleAddress common.Address) (bool, error) { var out []interface{} err := _ZionSpaceManagerLocalhost.contract.Call(opts, &out, "isEntitlementModuleWhitelisted", spaceId, entitlementModuleAddress) @@ -537,17 +626,17 @@ func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCaller) IsEntitlement } -// IsEntitlementModuleWhitelisted is a free data retrieval call binding the contract method 0xb010ac47. +// IsEntitlementModuleWhitelisted is a free data retrieval call binding the contract method 0x4196d1ff. // -// Solidity: function isEntitlementModuleWhitelisted(uint256 spaceId, address entitlementModuleAddress) view returns(bool) -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostSession) IsEntitlementModuleWhitelisted(spaceId *big.Int, entitlementModuleAddress common.Address) (bool, error) { +// Solidity: function isEntitlementModuleWhitelisted(string spaceId, address entitlementModuleAddress) view returns(bool) +func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostSession) IsEntitlementModuleWhitelisted(spaceId string, entitlementModuleAddress common.Address) (bool, error) { return _ZionSpaceManagerLocalhost.Contract.IsEntitlementModuleWhitelisted(&_ZionSpaceManagerLocalhost.CallOpts, spaceId, entitlementModuleAddress) } -// IsEntitlementModuleWhitelisted is a free data retrieval call binding the contract method 0xb010ac47. +// IsEntitlementModuleWhitelisted is a free data retrieval call binding the contract method 0x4196d1ff. // -// Solidity: function isEntitlementModuleWhitelisted(uint256 spaceId, address entitlementModuleAddress) view returns(bool) -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCallerSession) IsEntitlementModuleWhitelisted(spaceId *big.Int, entitlementModuleAddress common.Address) (bool, error) { +// Solidity: function isEntitlementModuleWhitelisted(string spaceId, address entitlementModuleAddress) view returns(bool) +func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCallerSession) IsEntitlementModuleWhitelisted(spaceId string, entitlementModuleAddress common.Address) (bool, error) { return _ZionSpaceManagerLocalhost.Contract.IsEntitlementModuleWhitelisted(&_ZionSpaceManagerLocalhost.CallOpts, spaceId, entitlementModuleAddress) } @@ -582,98 +671,88 @@ func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCallerSession) Owner( return _ZionSpaceManagerLocalhost.Contract.Owner(&_ZionSpaceManagerLocalhost.CallOpts) } -// ZionPermissionsMap is a free data retrieval call binding the contract method 0xc870e04c. +// AddPermissionToRole is a paid mutator transaction binding the contract method 0x7d9a0230. // -// Solidity: function zionPermissionsMap(uint8 ) view returns(string name) -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCaller) ZionPermissionsMap(opts *bind.CallOpts, arg0 uint8) (string, error) { - var out []interface{} - err := _ZionSpaceManagerLocalhost.contract.Call(opts, &out, "zionPermissionsMap", arg0) - - if err != nil { - return *new(string), err - } - - out0 := *abi.ConvertType(out[0], new(string)).(*string) - - return out0, err - -} - -// ZionPermissionsMap is a free data retrieval call binding the contract method 0xc870e04c. -// -// Solidity: function zionPermissionsMap(uint8 ) view returns(string name) -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostSession) ZionPermissionsMap(arg0 uint8) (string, error) { - return _ZionSpaceManagerLocalhost.Contract.ZionPermissionsMap(&_ZionSpaceManagerLocalhost.CallOpts, arg0) -} - -// ZionPermissionsMap is a free data retrieval call binding the contract method 0xc870e04c. -// -// Solidity: function zionPermissionsMap(uint8 ) view returns(string name) -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCallerSession) ZionPermissionsMap(arg0 uint8) (string, error) { - return _ZionSpaceManagerLocalhost.Contract.ZionPermissionsMap(&_ZionSpaceManagerLocalhost.CallOpts, arg0) -} - -// AddPermissionToRole is a paid mutator transaction binding the contract method 0x3368c918. -// -// Solidity: function addPermissionToRole(uint256 spaceId, uint256 roleId, (string) permission) returns() -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostTransactor) AddPermissionToRole(opts *bind.TransactOpts, spaceId *big.Int, roleId *big.Int, permission DataTypesPermission) (*types.Transaction, error) { +// Solidity: function addPermissionToRole(string spaceId, uint256 roleId, (string) permission) returns() +func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostTransactor) AddPermissionToRole(opts *bind.TransactOpts, spaceId string, roleId *big.Int, permission DataTypesPermission) (*types.Transaction, error) { return _ZionSpaceManagerLocalhost.contract.Transact(opts, "addPermissionToRole", spaceId, roleId, permission) } -// AddPermissionToRole is a paid mutator transaction binding the contract method 0x3368c918. +// AddPermissionToRole is a paid mutator transaction binding the contract method 0x7d9a0230. // -// Solidity: function addPermissionToRole(uint256 spaceId, uint256 roleId, (string) permission) returns() -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostSession) AddPermissionToRole(spaceId *big.Int, roleId *big.Int, permission DataTypesPermission) (*types.Transaction, error) { +// Solidity: function addPermissionToRole(string spaceId, uint256 roleId, (string) permission) returns() +func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostSession) AddPermissionToRole(spaceId string, roleId *big.Int, permission DataTypesPermission) (*types.Transaction, error) { return _ZionSpaceManagerLocalhost.Contract.AddPermissionToRole(&_ZionSpaceManagerLocalhost.TransactOpts, spaceId, roleId, permission) } -// AddPermissionToRole is a paid mutator transaction binding the contract method 0x3368c918. +// AddPermissionToRole is a paid mutator transaction binding the contract method 0x7d9a0230. // -// Solidity: function addPermissionToRole(uint256 spaceId, uint256 roleId, (string) permission) returns() -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostTransactorSession) AddPermissionToRole(spaceId *big.Int, roleId *big.Int, permission DataTypesPermission) (*types.Transaction, error) { +// Solidity: function addPermissionToRole(string spaceId, uint256 roleId, (string) permission) returns() +func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostTransactorSession) AddPermissionToRole(spaceId string, roleId *big.Int, permission DataTypesPermission) (*types.Transaction, error) { return _ZionSpaceManagerLocalhost.Contract.AddPermissionToRole(&_ZionSpaceManagerLocalhost.TransactOpts, spaceId, roleId, permission) } -// AddRoleToEntitlementModule is a paid mutator transaction binding the contract method 0xa7972473. +// AddRoleToEntitlementModule is a paid mutator transaction binding the contract method 0xbbd7358a. // -// Solidity: function addRoleToEntitlementModule(uint256 spaceId, address entitlementModuleAddress, uint256 roleId, bytes entitlementData) returns() -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostTransactor) AddRoleToEntitlementModule(opts *bind.TransactOpts, spaceId *big.Int, entitlementModuleAddress common.Address, roleId *big.Int, entitlementData []byte) (*types.Transaction, error) { - return _ZionSpaceManagerLocalhost.contract.Transact(opts, "addRoleToEntitlementModule", spaceId, entitlementModuleAddress, roleId, entitlementData) +// Solidity: function addRoleToEntitlementModule(string spaceId, string channelId, address entitlementModuleAddress, uint256 roleId, bytes entitlementData) returns() +func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostTransactor) AddRoleToEntitlementModule(opts *bind.TransactOpts, spaceId string, channelId string, entitlementModuleAddress common.Address, roleId *big.Int, entitlementData []byte) (*types.Transaction, error) { + return _ZionSpaceManagerLocalhost.contract.Transact(opts, "addRoleToEntitlementModule", spaceId, channelId, entitlementModuleAddress, roleId, entitlementData) } -// AddRoleToEntitlementModule is a paid mutator transaction binding the contract method 0xa7972473. +// AddRoleToEntitlementModule is a paid mutator transaction binding the contract method 0xbbd7358a. // -// Solidity: function addRoleToEntitlementModule(uint256 spaceId, address entitlementModuleAddress, uint256 roleId, bytes entitlementData) returns() -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostSession) AddRoleToEntitlementModule(spaceId *big.Int, entitlementModuleAddress common.Address, roleId *big.Int, entitlementData []byte) (*types.Transaction, error) { - return _ZionSpaceManagerLocalhost.Contract.AddRoleToEntitlementModule(&_ZionSpaceManagerLocalhost.TransactOpts, spaceId, entitlementModuleAddress, roleId, entitlementData) +// Solidity: function addRoleToEntitlementModule(string spaceId, string channelId, address entitlementModuleAddress, uint256 roleId, bytes entitlementData) returns() +func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostSession) AddRoleToEntitlementModule(spaceId string, channelId string, entitlementModuleAddress common.Address, roleId *big.Int, entitlementData []byte) (*types.Transaction, error) { + return _ZionSpaceManagerLocalhost.Contract.AddRoleToEntitlementModule(&_ZionSpaceManagerLocalhost.TransactOpts, spaceId, channelId, entitlementModuleAddress, roleId, entitlementData) } -// AddRoleToEntitlementModule is a paid mutator transaction binding the contract method 0xa7972473. +// AddRoleToEntitlementModule is a paid mutator transaction binding the contract method 0xbbd7358a. // -// Solidity: function addRoleToEntitlementModule(uint256 spaceId, address entitlementModuleAddress, uint256 roleId, bytes entitlementData) returns() -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostTransactorSession) AddRoleToEntitlementModule(spaceId *big.Int, entitlementModuleAddress common.Address, roleId *big.Int, entitlementData []byte) (*types.Transaction, error) { - return _ZionSpaceManagerLocalhost.Contract.AddRoleToEntitlementModule(&_ZionSpaceManagerLocalhost.TransactOpts, spaceId, entitlementModuleAddress, roleId, entitlementData) +// Solidity: function addRoleToEntitlementModule(string spaceId, string channelId, address entitlementModuleAddress, uint256 roleId, bytes entitlementData) returns() +func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostTransactorSession) AddRoleToEntitlementModule(spaceId string, channelId string, entitlementModuleAddress common.Address, roleId *big.Int, entitlementData []byte) (*types.Transaction, error) { + return _ZionSpaceManagerLocalhost.Contract.AddRoleToEntitlementModule(&_ZionSpaceManagerLocalhost.TransactOpts, spaceId, channelId, entitlementModuleAddress, roleId, entitlementData) } -// CreateRole is a paid mutator transaction binding the contract method 0xa3f13435. +// CreateChannel is a paid mutator transaction binding the contract method 0x06d1ea5d. // -// Solidity: function createRole(uint256 spaceId, string name, bytes8 color) returns(uint256) -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostTransactor) CreateRole(opts *bind.TransactOpts, spaceId *big.Int, name string, color [8]byte) (*types.Transaction, error) { - return _ZionSpaceManagerLocalhost.contract.Transact(opts, "createRole", spaceId, name, color) +// Solidity: function createChannel((string,string,string,(string,string,(string)[])[]) data) returns() +func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostTransactor) CreateChannel(opts *bind.TransactOpts, data DataTypesCreateChannelData) (*types.Transaction, error) { + return _ZionSpaceManagerLocalhost.contract.Transact(opts, "createChannel", data) } -// CreateRole is a paid mutator transaction binding the contract method 0xa3f13435. +// CreateChannel is a paid mutator transaction binding the contract method 0x06d1ea5d. // -// Solidity: function createRole(uint256 spaceId, string name, bytes8 color) returns(uint256) -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostSession) CreateRole(spaceId *big.Int, name string, color [8]byte) (*types.Transaction, error) { - return _ZionSpaceManagerLocalhost.Contract.CreateRole(&_ZionSpaceManagerLocalhost.TransactOpts, spaceId, name, color) +// Solidity: function createChannel((string,string,string,(string,string,(string)[])[]) data) returns() +func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostSession) CreateChannel(data DataTypesCreateChannelData) (*types.Transaction, error) { + return _ZionSpaceManagerLocalhost.Contract.CreateChannel(&_ZionSpaceManagerLocalhost.TransactOpts, data) } -// CreateRole is a paid mutator transaction binding the contract method 0xa3f13435. +// CreateChannel is a paid mutator transaction binding the contract method 0x06d1ea5d. // -// Solidity: function createRole(uint256 spaceId, string name, bytes8 color) returns(uint256) -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostTransactorSession) CreateRole(spaceId *big.Int, name string, color [8]byte) (*types.Transaction, error) { - return _ZionSpaceManagerLocalhost.Contract.CreateRole(&_ZionSpaceManagerLocalhost.TransactOpts, spaceId, name, color) +// Solidity: function createChannel((string,string,string,(string,string,(string)[])[]) data) returns() +func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostTransactorSession) CreateChannel(data DataTypesCreateChannelData) (*types.Transaction, error) { + return _ZionSpaceManagerLocalhost.Contract.CreateChannel(&_ZionSpaceManagerLocalhost.TransactOpts, data) +} + +// CreateRole is a paid mutator transaction binding the contract method 0xd2192dbf. +// +// Solidity: function createRole(string spaceId, string name) returns(uint256) +func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostTransactor) CreateRole(opts *bind.TransactOpts, spaceId string, name string) (*types.Transaction, error) { + return _ZionSpaceManagerLocalhost.contract.Transact(opts, "createRole", spaceId, name) +} + +// CreateRole is a paid mutator transaction binding the contract method 0xd2192dbf. +// +// Solidity: function createRole(string spaceId, string name) returns(uint256) +func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostSession) CreateRole(spaceId string, name string) (*types.Transaction, error) { + return _ZionSpaceManagerLocalhost.Contract.CreateRole(&_ZionSpaceManagerLocalhost.TransactOpts, spaceId, name) +} + +// CreateRole is a paid mutator transaction binding the contract method 0xd2192dbf. +// +// Solidity: function createRole(string spaceId, string name) returns(uint256) +func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostTransactorSession) CreateRole(spaceId string, name string) (*types.Transaction, error) { + return _ZionSpaceManagerLocalhost.Contract.CreateRole(&_ZionSpaceManagerLocalhost.TransactOpts, spaceId, name) } // CreateSpace is a paid mutator transaction binding the contract method 0x50b88cf7. @@ -718,46 +797,25 @@ func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostTransactorSession) Cr return _ZionSpaceManagerLocalhost.Contract.CreateSpaceWithTokenEntitlement(&_ZionSpaceManagerLocalhost.TransactOpts, info, entitlement) } -// RegisterDefaultEntitlementModule is a paid mutator transaction binding the contract method 0xdbe83cbf. +// RemoveEntitlement is a paid mutator transaction binding the contract method 0xa3a39cb9. // -// Solidity: function registerDefaultEntitlementModule(address entitlementModule) returns() -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostTransactor) RegisterDefaultEntitlementModule(opts *bind.TransactOpts, entitlementModule common.Address) (*types.Transaction, error) { - return _ZionSpaceManagerLocalhost.contract.Transact(opts, "registerDefaultEntitlementModule", entitlementModule) +// Solidity: function removeEntitlement(string spaceId, string channelId, address entitlementModuleAddress, uint256[] roleIds, bytes data) returns() +func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostTransactor) RemoveEntitlement(opts *bind.TransactOpts, spaceId string, channelId string, entitlementModuleAddress common.Address, roleIds []*big.Int, data []byte) (*types.Transaction, error) { + return _ZionSpaceManagerLocalhost.contract.Transact(opts, "removeEntitlement", spaceId, channelId, entitlementModuleAddress, roleIds, data) } -// RegisterDefaultEntitlementModule is a paid mutator transaction binding the contract method 0xdbe83cbf. +// RemoveEntitlement is a paid mutator transaction binding the contract method 0xa3a39cb9. // -// Solidity: function registerDefaultEntitlementModule(address entitlementModule) returns() -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostSession) RegisterDefaultEntitlementModule(entitlementModule common.Address) (*types.Transaction, error) { - return _ZionSpaceManagerLocalhost.Contract.RegisterDefaultEntitlementModule(&_ZionSpaceManagerLocalhost.TransactOpts, entitlementModule) +// Solidity: function removeEntitlement(string spaceId, string channelId, address entitlementModuleAddress, uint256[] roleIds, bytes data) returns() +func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostSession) RemoveEntitlement(spaceId string, channelId string, entitlementModuleAddress common.Address, roleIds []*big.Int, data []byte) (*types.Transaction, error) { + return _ZionSpaceManagerLocalhost.Contract.RemoveEntitlement(&_ZionSpaceManagerLocalhost.TransactOpts, spaceId, channelId, entitlementModuleAddress, roleIds, data) } -// RegisterDefaultEntitlementModule is a paid mutator transaction binding the contract method 0xdbe83cbf. +// RemoveEntitlement is a paid mutator transaction binding the contract method 0xa3a39cb9. // -// Solidity: function registerDefaultEntitlementModule(address entitlementModule) returns() -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostTransactorSession) RegisterDefaultEntitlementModule(entitlementModule common.Address) (*types.Transaction, error) { - return _ZionSpaceManagerLocalhost.Contract.RegisterDefaultEntitlementModule(&_ZionSpaceManagerLocalhost.TransactOpts, entitlementModule) -} - -// RemoveEntitlement is a paid mutator transaction binding the contract method 0x1e984060. -// -// Solidity: function removeEntitlement(uint256 spaceId, address entitlementModuleAddress, uint256[] roleIds, bytes data) returns() -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostTransactor) RemoveEntitlement(opts *bind.TransactOpts, spaceId *big.Int, entitlementModuleAddress common.Address, roleIds []*big.Int, data []byte) (*types.Transaction, error) { - return _ZionSpaceManagerLocalhost.contract.Transact(opts, "removeEntitlement", spaceId, entitlementModuleAddress, roleIds, data) -} - -// RemoveEntitlement is a paid mutator transaction binding the contract method 0x1e984060. -// -// Solidity: function removeEntitlement(uint256 spaceId, address entitlementModuleAddress, uint256[] roleIds, bytes data) returns() -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostSession) RemoveEntitlement(spaceId *big.Int, entitlementModuleAddress common.Address, roleIds []*big.Int, data []byte) (*types.Transaction, error) { - return _ZionSpaceManagerLocalhost.Contract.RemoveEntitlement(&_ZionSpaceManagerLocalhost.TransactOpts, spaceId, entitlementModuleAddress, roleIds, data) -} - -// RemoveEntitlement is a paid mutator transaction binding the contract method 0x1e984060. -// -// Solidity: function removeEntitlement(uint256 spaceId, address entitlementModuleAddress, uint256[] roleIds, bytes data) returns() -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostTransactorSession) RemoveEntitlement(spaceId *big.Int, entitlementModuleAddress common.Address, roleIds []*big.Int, data []byte) (*types.Transaction, error) { - return _ZionSpaceManagerLocalhost.Contract.RemoveEntitlement(&_ZionSpaceManagerLocalhost.TransactOpts, spaceId, entitlementModuleAddress, roleIds, data) +// Solidity: function removeEntitlement(string spaceId, string channelId, address entitlementModuleAddress, uint256[] roleIds, bytes data) returns() +func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostTransactorSession) RemoveEntitlement(spaceId string, channelId string, entitlementModuleAddress common.Address, roleIds []*big.Int, data []byte) (*types.Transaction, error) { + return _ZionSpaceManagerLocalhost.Contract.RemoveEntitlement(&_ZionSpaceManagerLocalhost.TransactOpts, spaceId, channelId, entitlementModuleAddress, roleIds, data) } // RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. @@ -781,6 +839,48 @@ func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostTransactorSession) Re return _ZionSpaceManagerLocalhost.Contract.RenounceOwnership(&_ZionSpaceManagerLocalhost.TransactOpts) } +// SetDefaultEntitlementModule is a paid mutator transaction binding the contract method 0xccaf0a2b. +// +// Solidity: function setDefaultEntitlementModule(address entitlementModule) returns() +func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostTransactor) SetDefaultEntitlementModule(opts *bind.TransactOpts, entitlementModule common.Address) (*types.Transaction, error) { + return _ZionSpaceManagerLocalhost.contract.Transact(opts, "setDefaultEntitlementModule", entitlementModule) +} + +// SetDefaultEntitlementModule is a paid mutator transaction binding the contract method 0xccaf0a2b. +// +// Solidity: function setDefaultEntitlementModule(address entitlementModule) returns() +func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostSession) SetDefaultEntitlementModule(entitlementModule common.Address) (*types.Transaction, error) { + return _ZionSpaceManagerLocalhost.Contract.SetDefaultEntitlementModule(&_ZionSpaceManagerLocalhost.TransactOpts, entitlementModule) +} + +// SetDefaultEntitlementModule is a paid mutator transaction binding the contract method 0xccaf0a2b. +// +// Solidity: function setDefaultEntitlementModule(address entitlementModule) returns() +func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostTransactorSession) SetDefaultEntitlementModule(entitlementModule common.Address) (*types.Transaction, error) { + return _ZionSpaceManagerLocalhost.Contract.SetDefaultEntitlementModule(&_ZionSpaceManagerLocalhost.TransactOpts, entitlementModule) +} + +// SetDefaultPermissionsManager is a paid mutator transaction binding the contract method 0x2d478e6b. +// +// Solidity: function setDefaultPermissionsManager(address permissionsManager) returns() +func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostTransactor) SetDefaultPermissionsManager(opts *bind.TransactOpts, permissionsManager common.Address) (*types.Transaction, error) { + return _ZionSpaceManagerLocalhost.contract.Transact(opts, "setDefaultPermissionsManager", permissionsManager) +} + +// SetDefaultPermissionsManager is a paid mutator transaction binding the contract method 0x2d478e6b. +// +// Solidity: function setDefaultPermissionsManager(address permissionsManager) returns() +func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostSession) SetDefaultPermissionsManager(permissionsManager common.Address) (*types.Transaction, error) { + return _ZionSpaceManagerLocalhost.Contract.SetDefaultPermissionsManager(&_ZionSpaceManagerLocalhost.TransactOpts, permissionsManager) +} + +// SetDefaultPermissionsManager is a paid mutator transaction binding the contract method 0x2d478e6b. +// +// Solidity: function setDefaultPermissionsManager(address permissionsManager) returns() +func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostTransactorSession) SetDefaultPermissionsManager(permissionsManager common.Address) (*types.Transaction, error) { + return _ZionSpaceManagerLocalhost.Contract.SetDefaultPermissionsManager(&_ZionSpaceManagerLocalhost.TransactOpts, permissionsManager) +} + // TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. // // Solidity: function transferOwnership(address newOwner) returns() @@ -802,24 +902,24 @@ func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostTransactorSession) Tr return _ZionSpaceManagerLocalhost.Contract.TransferOwnership(&_ZionSpaceManagerLocalhost.TransactOpts, newOwner) } -// WhitelistEntitlementModule is a paid mutator transaction binding the contract method 0x28dcb202. +// WhitelistEntitlementModule is a paid mutator transaction binding the contract method 0xe798ff3f. // -// Solidity: function whitelistEntitlementModule(uint256 spaceId, address entitlementAddress, bool whitelist) returns() -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostTransactor) WhitelistEntitlementModule(opts *bind.TransactOpts, spaceId *big.Int, entitlementAddress common.Address, whitelist bool) (*types.Transaction, error) { +// Solidity: function whitelistEntitlementModule(string spaceId, address entitlementAddress, bool whitelist) returns() +func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostTransactor) WhitelistEntitlementModule(opts *bind.TransactOpts, spaceId string, entitlementAddress common.Address, whitelist bool) (*types.Transaction, error) { return _ZionSpaceManagerLocalhost.contract.Transact(opts, "whitelistEntitlementModule", spaceId, entitlementAddress, whitelist) } -// WhitelistEntitlementModule is a paid mutator transaction binding the contract method 0x28dcb202. +// WhitelistEntitlementModule is a paid mutator transaction binding the contract method 0xe798ff3f. // -// Solidity: function whitelistEntitlementModule(uint256 spaceId, address entitlementAddress, bool whitelist) returns() -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostSession) WhitelistEntitlementModule(spaceId *big.Int, entitlementAddress common.Address, whitelist bool) (*types.Transaction, error) { +// Solidity: function whitelistEntitlementModule(string spaceId, address entitlementAddress, bool whitelist) returns() +func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostSession) WhitelistEntitlementModule(spaceId string, entitlementAddress common.Address, whitelist bool) (*types.Transaction, error) { return _ZionSpaceManagerLocalhost.Contract.WhitelistEntitlementModule(&_ZionSpaceManagerLocalhost.TransactOpts, spaceId, entitlementAddress, whitelist) } -// WhitelistEntitlementModule is a paid mutator transaction binding the contract method 0x28dcb202. +// WhitelistEntitlementModule is a paid mutator transaction binding the contract method 0xe798ff3f. // -// Solidity: function whitelistEntitlementModule(uint256 spaceId, address entitlementAddress, bool whitelist) returns() -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostTransactorSession) WhitelistEntitlementModule(spaceId *big.Int, entitlementAddress common.Address, whitelist bool) (*types.Transaction, error) { +// Solidity: function whitelistEntitlementModule(string spaceId, address entitlementAddress, bool whitelist) returns() +func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostTransactorSession) WhitelistEntitlementModule(spaceId string, entitlementAddress common.Address, whitelist bool) (*types.Transaction, error) { return _ZionSpaceManagerLocalhost.Contract.WhitelistEntitlementModule(&_ZionSpaceManagerLocalhost.TransactOpts, spaceId, entitlementAddress, whitelist) } diff --git a/zion/zion_authorization.go b/zion/zion_authorization.go index 0e50c46dc..c363759c8 100644 --- a/zion/zion_authorization.go +++ b/zion/zion_authorization.go @@ -2,12 +2,13 @@ package zion import ( _ "embed" - "math/big" "os" "github.com/ethereum/go-ethereum/common" "github.com/joho/godotenv" "github.com/matrix-org/dendrite/authorization" + zion_goerli "github.com/matrix-org/dendrite/zion/contracts/goerli/zion_goerli" + zion_localhost "github.com/matrix-org/dendrite/zion/contracts/localhost/zion_localhost" log "github.com/sirupsen/logrus" ) @@ -23,8 +24,8 @@ var localhostJson []byte var goerliJson []byte type ZionAuthorization struct { - spaceManagerLocalhost *ZionSpaceManagerLocalhost - spaceManagerGoerli *ZionSpaceManagerGoerli + spaceManagerLocalhost *zion_localhost.ZionSpaceManagerLocalhost + spaceManagerGoerli *zion_goerli.ZionSpaceManagerGoerli } func NewZionAuthorization() (authorization.Authorization, error) { @@ -52,15 +53,12 @@ func NewZionAuthorization() (authorization.Authorization, error) { func (za *ZionAuthorization) IsAllowed(args authorization.AuthorizationArgs) (bool, error) { userIdentifier := CreateUserIdentifier(args.UserId) - permission := DataTypesPermission{ - Name: args.Permission, - } switch userIdentifier.chainId { case 1337, 31337: - return za.IsAllowedLocalhost(args.RoomId, userIdentifier.accountAddress, permission) + return za.IsAllowedLocalhost(args.RoomId, userIdentifier.accountAddress, args.Permission) case 5: - return za.IsAllowedGoerli(args.RoomId, userIdentifier.accountAddress, permission) + return za.IsAllowedGoerli(args.RoomId, userIdentifier.accountAddress, args.Permission) default: log.Errorf("Unsupported chain id: %d\n", userIdentifier.chainId) } @@ -68,17 +66,19 @@ func (za *ZionAuthorization) IsAllowed(args authorization.AuthorizationArgs) (bo return false, nil } -func (za *ZionAuthorization) IsAllowedLocalhost(roomId string, user common.Address, permission DataTypesPermission) (bool, error) { +func (za *ZionAuthorization) IsAllowedLocalhost(roomId string, user common.Address, permission authorization.Permission) (bool, error) { if za.spaceManagerLocalhost != nil { - spaceId, err := za.spaceManagerLocalhost.GetSpaceIdByNetworkId(nil, roomId) - if err != nil { - return false, err + permission := zion_localhost.DataTypesPermission{ + Name: permission.String(), } + addr := user.Hex() + _ = addr + isEntitled, err := za.spaceManagerLocalhost.IsEntitled( nil, - spaceId, - big.NewInt(0), + roomId, + "", // todo: Support channelId user, permission, ) @@ -93,17 +93,16 @@ func (za *ZionAuthorization) IsAllowedLocalhost(roomId string, user common.Addre return false, nil } -func (za *ZionAuthorization) IsAllowedGoerli(roomId string, user common.Address, permission DataTypesPermission) (bool, error) { +func (za *ZionAuthorization) IsAllowedGoerli(roomId string, user common.Address, permission authorization.Permission) (bool, error) { if za.spaceManagerGoerli != nil { - spaceId, err := za.spaceManagerGoerli.GetSpaceIdByNetworkId(nil, roomId) - if err != nil { - return false, err + permission := zion_goerli.DataTypesPermission{ + Name: permission.String(), } isEntitled, err := za.spaceManagerGoerli.IsEntitled( nil, - spaceId, - big.NewInt(0), + roomId, + "", // todo: support channelId user, permission, ) @@ -118,7 +117,7 @@ func (za *ZionAuthorization) IsAllowedGoerli(roomId string, user common.Address, return false, nil } -func newZionSpaceManagerLocalhost(endpointUrl string) (*ZionSpaceManagerLocalhost, error) { +func newZionSpaceManagerLocalhost(endpointUrl string) (*zion_localhost.ZionSpaceManagerLocalhost, error) { addresses, err := loadSpaceManagerAddresses(localhostJson) if err != nil { return nil, err @@ -131,7 +130,7 @@ func newZionSpaceManagerLocalhost(endpointUrl string) (*ZionSpaceManagerLocalhos return nil, err } - spaceManager, err := NewZionSpaceManagerLocalhost(address, client) + spaceManager, err := zion_localhost.NewZionSpaceManagerLocalhost(address, client) if err != nil { return nil, err } @@ -139,7 +138,7 @@ func newZionSpaceManagerLocalhost(endpointUrl string) (*ZionSpaceManagerLocalhos return spaceManager, nil } -func newZionSpaceManagerGoerli(endpointUrl string) (*ZionSpaceManagerGoerli, error) { +func newZionSpaceManagerGoerli(endpointUrl string) (*zion_goerli.ZionSpaceManagerGoerli, error) { addresses, err := loadSpaceManagerAddresses(goerliJson) if err != nil { return nil, err @@ -152,7 +151,7 @@ func newZionSpaceManagerGoerli(endpointUrl string) (*ZionSpaceManagerGoerli, err return nil, err } - spaceManager, err := NewZionSpaceManagerGoerli(address, client) + spaceManager, err := zion_goerli.NewZionSpaceManagerGoerli(address, client) if err != nil { return nil, err } diff --git a/zion/zion_data_types.go b/zion/zion_data_types.go deleted file mode 100644 index d01a163d1..000000000 --- a/zion/zion_data_types.go +++ /dev/null @@ -1,38 +0,0 @@ -package zion - -import ( - "math/big" - - "github.com/ethereum/go-ethereum/common" -) - -// DataTypesCreateSpaceData is an auto generated low-level Go binding around an user-defined struct. -type DataTypesCreateSpaceData struct { - SpaceName string - NetworkId string -} - -// DataTypesCreateSpaceTokenEntitlementData is an auto generated low-level Go binding around an user-defined struct. -type DataTypesCreateSpaceTokenEntitlementData struct { - EntitlementModuleAddress common.Address - TokenAddress common.Address - Quantity *big.Int - Description string - EntitlementTypes []uint8 -} - -// DataTypesEntitlementModuleInfo is an auto generated low-level Go binding around an user-defined struct. -type DataTypesEntitlementModuleInfo struct { - EntitlementAddress common.Address - EntitlementName string - EntitlementDescription string -} - -// DataTypesSpaceInfo is an auto generated low-level Go binding around an user-defined struct. -type DataTypesSpaceInfo struct { - SpaceId *big.Int - CreatedAt *big.Int - Name string - Creator common.Address - Owner common.Address -}