diff --git a/appservice/inthttp/server.go b/appservice/inthttp/server.go index b70fad673..b0e1c81bf 100644 --- a/appservice/inthttp/server.go +++ b/appservice/inthttp/server.go @@ -33,4 +33,5 @@ func AddRoutes(a api.AppServiceInternalAPI, internalAPIMux *mux.Router, enableMe AppServiceUserPath, httputil.MakeInternalRPCAPI("AppserviceUser", enableMetrics, a.User), ) + } diff --git a/build/docker/Dockerfile.monolith b/build/docker/Dockerfile.monolith index b3415171f..479b2c3c4 100644 --- a/build/docker/Dockerfile.monolith +++ b/build/docker/Dockerfile.monolith @@ -21,6 +21,8 @@ LABEL org.opencontainers.image.licenses="Apache-2.0" COPY --from=base /build/bin/* /usr/bin/ +COPY --from=base /build/dendrite-zion.yaml /usr/config/dendrite-zion.yaml + VOLUME /etc/dendrite WORKDIR /etc/dendrite diff --git a/clientapi/admin_test.go b/clientapi/admin_test.go index c7ca019ff..c9f7c874d 100644 --- a/clientapi/admin_test.go +++ b/clientapi/admin_test.go @@ -17,12 +17,17 @@ import ( "github.com/matrix-org/util" "github.com/tidwall/gjson" + rsapi "github.com/matrix-org/dendrite/roomserver/api" "github.com/matrix-org/dendrite/test" "github.com/matrix-org/dendrite/test/testrig" "github.com/matrix-org/dendrite/userapi" uapi "github.com/matrix-org/dendrite/userapi/api" ) +type clientRoomserverAPI struct { + rsapi.ClientRoomserverAPI +} + func TestAdminResetPassword(t *testing.T) { aliceAdmin := test.NewUser(t, test.WithAccountType(uapi.AccountTypeAdmin)) bob := test.NewUser(t, test.WithAccountType(uapi.AccountTypeUser)) @@ -159,7 +164,7 @@ func TestPurgeRoom(t *testing.T) { userAPI := userapi.NewInternalAPI(base, &base.Cfg.UserAPI, nil, keyAPI, rsAPI, nil) // this starts the JetStream consumers - syncapi.AddPublicRoutes(base, userAPI, rsAPI, keyAPI) + syncapi.AddPublicRoutes(base, userAPI, rsAPI, &clientRoomserverAPI{}, keyAPI) federationapi.NewInternalAPI(base, fedClient, rsAPI, base.Caches, nil, true) rsAPI.SetFederationAPI(nil, nil) keyAPI.SetUserAPI(userAPI) diff --git a/clientapi/authorization/authorization.go b/clientapi/authorization/authorization.go index a520d48b5..700bc7e67 100644 --- a/clientapi/authorization/authorization.go +++ b/clientapi/authorization/authorization.go @@ -1,24 +1,29 @@ package authorization import ( + "flag" + "github.com/matrix-org/dendrite/authorization" + roomserver "github.com/matrix-org/dendrite/roomserver/api" "github.com/matrix-org/dendrite/setup/config" - _ "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/dendrite/zion" log "github.com/sirupsen/logrus" ) -func NewRoomserverAuthorization(cfg *config.ClientAPI, rsAPI zion.RoomserverStoreAPI) authorization.Authorization { +func NewRoomserverAuthorization(cfg *config.ClientAPI, roomQueryAPI roomserver.QueryEventsAPI) authorization.Authorization { // Load authorization manager for Zion - if cfg.PublicKeyAuthentication.Ethereum.GetEnableAuthZ() { - auth, err := zion.NewZionAuthorization(cfg, rsAPI) - + if flag.Lookup("test.v") == nil { + // normal run + // Load authorization manager for Zion + auth, err := zion.NewZionAuthorization(cfg, roomQueryAPI) if err != nil { - log.Errorln("Failed to initialise Zion authorization manager. Using default.", err) - } else { - return auth + // Cannot proceed without an authorization manager + log.Fatalf("failed to initialise Zion authorization manager, using default. Error: %v", err) } - } - return &authorization.DefaultAuthorization{} + return auth + } else { + // run under go test + return &authorization.DefaultAuthorization{} + } } diff --git a/clientapi/jsonerror/jsonerror.go b/clientapi/jsonerror/jsonerror.go index be7d13a96..4dc3d8603 100644 --- a/clientapi/jsonerror/jsonerror.go +++ b/clientapi/jsonerror/jsonerror.go @@ -171,6 +171,15 @@ func LeaveServerNoticeError() *MatrixError { } } +// ServerDisabledNoticeError is an error returned when trying to sync a server +// that is disabled +func ServerDisabledNoticeError() *MatrixError { + return &MatrixError{ + ErrCode: "Z_UNAUTHORISED_SERVER_DISABLED", + Err: "You cannot remain in a disabled server", + } +} + type IncompatibleRoomVersionError struct { RoomVersion string `json:"room_version"` Error string `json:"error"` diff --git a/clientapi/routing/routing.go b/clientapi/routing/routing.go index ef7aac21f..10c054b42 100644 --- a/clientapi/routing/routing.go +++ b/clientapi/routing/routing.go @@ -44,7 +44,6 @@ import ( "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/dendrite/setup/jetstream" userapi "github.com/matrix-org/dendrite/userapi/api" - zion "github.com/matrix-org/dendrite/zion" ) var ReleaseVersion string @@ -86,8 +85,7 @@ func Setup( rateLimits := httputil.NewRateLimits(&cfg.RateLimiting) userInteractiveAuth := auth.NewUserInteractive(userAPI, userAPI, cfg) - clientAuthz := zion.ClientRoomserverStruct{ClientRoomserverAPI: rsAPI} - authorization := clientApiAuthz.NewRoomserverAuthorization(cfg, clientAuthz) + authorization := clientApiAuthz.NewRoomserverAuthorization(cfg, rsAPI) unstableFeatures := map[string]bool{ "org.matrix.e2e_cross_signing": true, diff --git a/cmd/dendrite-polylith-multi/personalities/syncapi.go b/cmd/dendrite-polylith-multi/personalities/syncapi.go index 41637fe1d..1f9cb86e0 100644 --- a/cmd/dendrite-polylith-multi/personalities/syncapi.go +++ b/cmd/dendrite-polylith-multi/personalities/syncapi.go @@ -22,12 +22,13 @@ import ( func SyncAPI(base *basepkg.BaseDendrite, cfg *config.Dendrite) { userAPI := base.UserAPIClient() + base.RoomserverHTTPClient() rsAPI := base.RoomserverHTTPClient() syncapi.AddPublicRoutes( base, - userAPI, rsAPI, + userAPI, rsAPI, rsAPI, base.KeyServerHTTPClient(), ) diff --git a/get-version.sh b/get-version.sh new file mode 100644 index 000000000..e04df4d2e --- /dev/null +++ b/get-version.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +echo $(git log -1 --pretty=%h) \ No newline at end of file diff --git a/roomserver/roomserver_test.go b/roomserver/roomserver_test.go index 3ec2560d6..f3aed4aae 100644 --- a/roomserver/roomserver_test.go +++ b/roomserver/roomserver_test.go @@ -22,12 +22,17 @@ import ( "github.com/matrix-org/dendrite/roomserver" "github.com/matrix-org/dendrite/roomserver/api" + rsapi "github.com/matrix-org/dendrite/roomserver/api" "github.com/matrix-org/dendrite/roomserver/inthttp" "github.com/matrix-org/dendrite/roomserver/storage" "github.com/matrix-org/dendrite/test" "github.com/matrix-org/dendrite/test/testrig" ) +type clientRoomserverAPI struct { + rsapi.ClientRoomserverAPI +} + func mustCreateDatabase(t *testing.T, dbType test.DBType) (*base.BaseDendrite, storage.Database, func()) { t.Helper() base, close := testrig.CreateBaseDendrite(t, dbType) @@ -253,7 +258,7 @@ func TestPurgeRoom(t *testing.T) { userAPI := userapi.NewInternalAPI(base, &base.Cfg.UserAPI, nil, keyAPI, rsAPI, nil) // this starts the JetStream consumers - syncapi.AddPublicRoutes(base, userAPI, rsAPI, keyAPI) + syncapi.AddPublicRoutes(base, userAPI, rsAPI, &clientRoomserverAPI{}, keyAPI) federationapi.NewInternalAPI(base, fedClient, rsAPI, base.Caches, nil, true) rsAPI.SetFederationAPI(nil, nil) diff --git a/setup/config/config.go b/setup/config/config.go index 5e8439298..469720e4b 100644 --- a/setup/config/config.go +++ b/setup/config/config.go @@ -630,14 +630,10 @@ func (config *Dendrite) replaceWithEnvVariables() { config.ClientAPI.PublicKeyAuthentication.Ethereum.NetworkUrl = replaceWithEnvVariables(config.ClientAPI.PublicKeyAuthentication.Ethereum.NetworkUrl) - config.ClientAPI.PublicKeyAuthentication.Ethereum.ConfigEnableAuthz = - replaceWithEnvVariables(config.ClientAPI.PublicKeyAuthentication.Ethereum.ConfigEnableAuthz) - logrus.Infof( - "Supported Ethereum chain_id=%v, network_url=%v, enable_authz=%v", + "Supported Ethereum chain_id=%v, network_url=%v", config.ClientAPI.PublicKeyAuthentication.Ethereum.ConfigChainID, config.ClientAPI.PublicKeyAuthentication.Ethereum.NetworkUrl, - config.ClientAPI.PublicKeyAuthentication.Ethereum.ConfigEnableAuthz, ) } } diff --git a/setup/config/config_publickey.go b/setup/config/config_publickey.go index 6d73717da..a2dfcdea5 100644 --- a/setup/config/config_publickey.go +++ b/setup/config/config_publickey.go @@ -21,13 +21,11 @@ func (p EthereumAuthParams) GetParams() interface{} { } type EthereumAuthConfig struct { - Enabled bool `yaml:"enabled"` - Version uint `yaml:"version"` - NetworkUrl string `yaml:"network_url"` // Blockchain network provider URL - ConfigChainID string `yaml:"chain_id"` // Blockchain chain ID. Env variable can replace this property. - ConfigEnableAuthz string `yaml:"enable_authz"` // Enable / disable authorization during development. Will be removed when feature is done. - chainID int - enableAuthz bool + Enabled bool `yaml:"enabled"` + Version uint `yaml:"version"` + NetworkUrl string `yaml:"network_url"` // Blockchain network provider URL + ConfigChainID string `yaml:"chain_id"` // Blockchain chain ID. Env variable can replace this property. + chainID int } func (c *EthereumAuthConfig) GetChainID() int { @@ -43,19 +41,6 @@ func (c *EthereumAuthConfig) GetChainID() int { return c.chainID } -func (c *EthereumAuthConfig) GetEnableAuthZ() bool { - if c.ConfigEnableAuthz != "" { - v := strings.TrimSpace(c.ConfigEnableAuthz) - boolValue, err := strconv.ParseBool(v) - if err == nil { - c.enableAuthz = boolValue - } - // No need to do this again. - c.ConfigEnableAuthz = "" - } - return c.enableAuthz -} - type PublicKeyAuthentication struct { Ethereum EthereumAuthConfig `yaml:"ethereum"` } diff --git a/setup/monolith.go b/setup/monolith.go index 5bbe4019e..ea0058b23 100644 --- a/setup/monolith.go +++ b/setup/monolith.go @@ -72,7 +72,7 @@ func (m *Monolith) AddAllPublicRoutes(base *base.BaseDendrite) { base, m.UserAPI, m.Client, ) syncapi.AddPublicRoutes( - base, m.UserAPI, m.RoomserverAPI, m.KeyAPI, + base, m.UserAPI, m.RoomserverAPI, m.RoomserverAPI, m.KeyAPI, ) if m.RelayAPI != nil { diff --git a/syncapi/routing/routing.go b/syncapi/routing/routing.go index bb655292c..9b30a5a9d 100644 --- a/syncapi/routing/routing.go +++ b/syncapi/routing/routing.go @@ -22,6 +22,7 @@ import ( "github.com/matrix-org/util" "github.com/matrix-org/dendrite/clientapi/jsonerror" + "github.com/matrix-org/dendrite/clientapi/routing" "github.com/matrix-org/dendrite/internal/caching" "github.com/matrix-org/dendrite/internal/fulltext" "github.com/matrix-org/dendrite/internal/httputil" @@ -45,13 +46,13 @@ func Setup( csMux *mux.Router, srp *sync.RequestPool, syncDB storage.Database, userAPI userapi.SyncUserAPI, rsAPI api.SyncRoomserverAPI, + crsAPI api.ClientRoomserverAPI, cfg *config.SyncAPI, clientCfg *config.ClientAPI, lazyLoadCache caching.LazyLoadCache, fts *fulltext.Search, ) { - syncAuthz := zion.SyncRoomserverStruct{SyncRoomserverAPI: rsAPI} - authorization := clientApiAuthz.NewRoomserverAuthorization(clientCfg, syncAuthz) + authorization := clientApiAuthz.NewRoomserverAuthorization(clientCfg, crsAPI) v1unstablemux := csMux.PathPrefix("/{apiversion:(?:v1|unstable)}/").Subrouter() v3mux := csMux.PathPrefix("/{apiversion:(?:r0|v3)}/").Subrouter() @@ -63,12 +64,36 @@ func Setup( v3mux.Handle("/rooms/{roomID}/messages", httputil.MakeAuthAPI("room_messages", userAPI, func(req *http.Request, device *userapi.Device) util.JSONResponse { vars, err := httputil.URLDecodeMapValues(mux.Vars(req)) - isAllowed, _ := authorization.IsAllowed(authz.AuthorizationArgs{ + if err != nil { + return util.ErrorResponse(err) + } + + isAllowed, err := authorization.IsAllowed(authz.AuthorizationArgs{ RoomId: vars["roomID"], UserId: device.UserID, Permission: authz.PermissionRead, }) + if err != nil { + switch err { + case zion.ErrSpaceDisabled, zion.ErrChannelDisabled: + // leave space / channel if it is disabled + resp := routing.LeaveRoomByID(req, device, crsAPI, vars["roomID"]) + if resp.Code == 200 { + return util.JSONResponse{ + Code: http.StatusUnauthorized, + JSON: jsonerror.ServerDisabledNoticeError(), + } + } + return resp + default: + // error client if something else is awry + return util.JSONResponse{ + Code: http.StatusUnauthorized, + JSON: jsonerror.Forbidden("Unauthorised"), + } + } + } if !isAllowed { return util.JSONResponse{ Code: http.StatusUnauthorized, diff --git a/syncapi/syncapi.go b/syncapi/syncapi.go index 4b07366c5..fb484dcfd 100644 --- a/syncapi/syncapi.go +++ b/syncapi/syncapi.go @@ -42,6 +42,7 @@ func AddPublicRoutes( base *base.BaseDendrite, userAPI userapi.SyncUserAPI, rsAPI api.SyncRoomserverAPI, + crsAPI api.ClientRoomserverAPI, keyAPI keyapi.SyncKeyAPI, ) { cfg := &base.Cfg.SyncAPI @@ -133,6 +134,6 @@ func AddPublicRoutes( routing.Setup( base.PublicClientAPIMux, requestPool, syncDB, userAPI, - rsAPI, cfg, clientCfg, base.Caches, base.Fulltext, + rsAPI, crsAPI, cfg, clientCfg, base.Caches, base.Fulltext, ) } diff --git a/syncapi/syncapi_test.go b/syncapi/syncapi_test.go index 643c30265..875cf6467 100644 --- a/syncapi/syncapi_test.go +++ b/syncapi/syncapi_test.go @@ -33,6 +33,10 @@ type syncRoomserverAPI struct { rooms []*test.Room } +type clientRoomserverAPI struct { + rsapi.ClientRoomserverAPI +} + func (s *syncRoomserverAPI) QueryLatestEventsAndState(ctx context.Context, req *rsapi.QueryLatestEventsAndStateRequest, res *rsapi.QueryLatestEventsAndStateResponse) error { var room *test.Room for _, r := range s.rooms { @@ -121,7 +125,7 @@ func testSyncAccessTokens(t *testing.T, dbType test.DBType) { jsctx, _ := base.NATS.Prepare(base.ProcessContext, &base.Cfg.Global.JetStream) defer jetstream.DeleteAllStreams(jsctx, &base.Cfg.Global.JetStream) msgs := toNATSMsgs(t, base, room.Events()...) - AddPublicRoutes(base, &syncUserAPI{accounts: []userapi.Device{alice}}, &syncRoomserverAPI{rooms: []*test.Room{room}}, &syncKeyAPI{}) + AddPublicRoutes(base, &syncUserAPI{accounts: []userapi.Device{alice}}, &syncRoomserverAPI{rooms: []*test.Room{room}}, &clientRoomserverAPI{}, &syncKeyAPI{}) testrig.MustPublishMsgs(t, jsctx, msgs...) testCases := []struct { @@ -220,7 +224,7 @@ func testSyncAPICreateRoomSyncEarly(t *testing.T, dbType test.DBType) { // m.room.history_visibility msgs := toNATSMsgs(t, base, room.Events()...) sinceTokens := make([]string, len(msgs)) - AddPublicRoutes(base, &syncUserAPI{accounts: []userapi.Device{alice}}, &syncRoomserverAPI{rooms: []*test.Room{room}}, &syncKeyAPI{}) + AddPublicRoutes(base, &syncUserAPI{accounts: []userapi.Device{alice}}, &syncRoomserverAPI{rooms: []*test.Room{room}}, &clientRoomserverAPI{}, &syncKeyAPI{}) for i, msg := range msgs { testrig.MustPublishMsgs(t, jsctx, msg) time.Sleep(100 * time.Millisecond) @@ -304,7 +308,7 @@ func testSyncAPIUpdatePresenceImmediately(t *testing.T, dbType test.DBType) { jsctx, _ := base.NATS.Prepare(base.ProcessContext, &base.Cfg.Global.JetStream) defer jetstream.DeleteAllStreams(jsctx, &base.Cfg.Global.JetStream) - AddPublicRoutes(base, &syncUserAPI{accounts: []userapi.Device{alice}}, &syncRoomserverAPI{}, &syncKeyAPI{}) + AddPublicRoutes(base, &syncUserAPI{accounts: []userapi.Device{alice}}, &syncRoomserverAPI{}, &clientRoomserverAPI{}, &syncKeyAPI{}) w := httptest.NewRecorder() base.PublicClientAPIMux.ServeHTTP(w, test.NewRequest(t, "GET", "/_matrix/client/v3/sync", test.WithQueryParams(map[string]string{ "access_token": alice.AccessToken, @@ -422,7 +426,7 @@ func testHistoryVisibility(t *testing.T, dbType test.DBType) { rsAPI := roomserver.NewInternalAPI(base) rsAPI.SetFederationAPI(nil, nil) - AddPublicRoutes(base, &syncUserAPI{accounts: []userapi.Device{aliceDev, bobDev}}, rsAPI, &syncKeyAPI{}) + AddPublicRoutes(base, &syncUserAPI{accounts: []userapi.Device{aliceDev, bobDev}}, rsAPI, rsAPI, &syncKeyAPI{}) for _, tc := range testCases { testname := fmt.Sprintf("%s - %s", tc.historyVisibility, userType) @@ -722,7 +726,7 @@ func TestGetMembership(t *testing.T) { rsAPI := roomserver.NewInternalAPI(base) rsAPI.SetFederationAPI(nil, nil) - AddPublicRoutes(base, &syncUserAPI{accounts: []userapi.Device{aliceDev, bobDev}}, rsAPI, &syncKeyAPI{}) + AddPublicRoutes(base, &syncUserAPI{accounts: []userapi.Device{aliceDev, bobDev}}, rsAPI, &clientRoomserverAPI{}, &syncKeyAPI{}) for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { @@ -789,7 +793,7 @@ func testSendToDevice(t *testing.T, dbType test.DBType) { jsctx, _ := base.NATS.Prepare(base.ProcessContext, &base.Cfg.Global.JetStream) defer jetstream.DeleteAllStreams(jsctx, &base.Cfg.Global.JetStream) - AddPublicRoutes(base, &syncUserAPI{accounts: []userapi.Device{alice}}, &syncRoomserverAPI{}, &syncKeyAPI{}) + AddPublicRoutes(base, &syncUserAPI{accounts: []userapi.Device{alice}}, &syncRoomserverAPI{}, &clientRoomserverAPI{}, &syncKeyAPI{}) producer := producers.SyncAPIProducer{ TopicSendToDeviceEvent: base.Cfg.Global.JetStream.Prefixed(jetstream.OutputSendToDeviceEvent), @@ -1008,7 +1012,7 @@ func testContext(t *testing.T, dbType test.DBType) { rsAPI := roomserver.NewInternalAPI(base) rsAPI.SetFederationAPI(nil, nil) - AddPublicRoutes(base, &syncUserAPI{accounts: []userapi.Device{alice}}, rsAPI, &syncKeyAPI{}) + AddPublicRoutes(base, &syncUserAPI{accounts: []userapi.Device{alice}}, rsAPI, &clientRoomserverAPI{}, &syncKeyAPI{}) room := test.NewRoom(t, user) diff --git a/test/db.go b/test/db.go index d2f405d49..772cd8a71 100644 --- a/test/db.go +++ b/test/db.go @@ -173,7 +173,7 @@ func WithAllDatabases(t *testing.T, testFn func(t *testing.T, db DBType)) { for dbName, dbType := range dbs { dbt := dbType t.Run(dbName, func(tt *testing.T) { - tt.Parallel() + //tt.Parallel() testFn(tt, dbt) }) } diff --git a/zion/contract_addresses.go b/zion/contract_addresses.go index 4d50a0a2c..99b65b6d2 100644 --- a/zion/contract_addresses.go +++ b/zion/contract_addresses.go @@ -10,13 +10,15 @@ type SpaceManagerContractAddresses struct { Tokengranted string `json:"tokengranted"` } -func loadSpaceManagerAddresses(byteValue []byte) (*SpaceManagerContractAddresses, error) { - var addresses SpaceManagerContractAddresses +type SpaceFactoryContractAddress struct { + SpaceFactory string `json:"spaceFactory"` +} - err := json.Unmarshal(byteValue, &addresses) +func loadSpaceFactoryAddress(byteValue []byte) (*SpaceFactoryContractAddress, error) { + var address SpaceFactoryContractAddress + err := json.Unmarshal(byteValue, &address) if err != nil { return nil, err } - - return &addresses, nil + return &address, nil } diff --git a/zion/contracts/goerli_space/goerli_space.go b/zion/contracts/goerli_space/goerli_space.go new file mode 100644 index 000000000..8dcbb0c77 --- /dev/null +++ b/zion/contracts/goerli_space/goerli_space.go @@ -0,0 +1,2040 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package goerli_space + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription +) + +// DataTypesChannel is an auto generated low-level Go binding around an user-defined struct. +type DataTypesChannel struct { + Name string + ChannelId [32]byte + CreatedAt *big.Int + Disabled bool +} + +// DataTypesEntitlement is an auto generated low-level Go binding around an user-defined struct. +type DataTypesEntitlement struct { + Module common.Address + Data []byte +} + +// DataTypesRole is an auto generated low-level Go binding around an user-defined struct. +type DataTypesRole struct { + RoleId *big.Int + Name string +} + +// GoerliSpaceMetaData contains all meta data concerning the GoerliSpace contract. +var GoerliSpaceMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[],\"name\":\"AddRoleFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ChannelAlreadyRegistered\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ChannelDoesNotExist\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"EntitlementAlreadyExists\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"EntitlementAlreadyWhitelisted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"EntitlementModuleNotSupported\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"EntitlementNotWhitelisted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidParameters\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MissingOwnerPermission\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotAllowed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OwnerPermissionNotAllowed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PermissionAlreadyExists\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RoleDoesNotExist\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RoleIsAssignedToEntitlement\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_roleId\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"_permission\",\"type\":\"string\"}],\"name\":\"addPermissionToRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_channelId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"_entitlement\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_roleId\",\"type\":\"uint256\"}],\"name\":\"addRoleToChannel\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_roleId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"module\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"internalType\":\"structDataTypes.Entitlement\",\"name\":\"_entitlement\",\"type\":\"tuple\"}],\"name\":\"addRoleToEntitlement\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"channels\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"channelsByHash\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"bytes32\",\"name\":\"channelId\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"createdAt\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"disabled\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"channelName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"channelNetworkId\",\"type\":\"string\"},{\"internalType\":\"uint256[]\",\"name\":\"roleIds\",\"type\":\"uint256[]\"}],\"name\":\"createChannel\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_roleName\",\"type\":\"string\"},{\"internalType\":\"string[]\",\"name\":\"_permissions\",\"type\":\"string[]\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"module\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"internalType\":\"structDataTypes.Entitlement[]\",\"name\":\"_entitlements\",\"type\":\"tuple[]\"}],\"name\":\"createRole\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"defaultEntitlements\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"disabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"entitlements\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_channelHash\",\"type\":\"bytes32\"}],\"name\":\"getChannelByHash\",\"outputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"bytes32\",\"name\":\"channelId\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"createdAt\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"disabled\",\"type\":\"bool\"}],\"internalType\":\"structDataTypes.Channel\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_roleId\",\"type\":\"uint256\"}],\"name\":\"getEntitlementIdsByRoleId\",\"outputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"\",\"type\":\"bytes32[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getEntitlements\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_roleId\",\"type\":\"uint256\"}],\"name\":\"getPermissionsByRoleId\",\"outputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"\",\"type\":\"bytes32[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_roleId\",\"type\":\"uint256\"}],\"name\":\"getRoleById\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"roleId\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structDataTypes.Role\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRoles\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"roleId\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structDataTypes.Role[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"hasEntitlement\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_networkId\",\"type\":\"string\"},{\"internalType\":\"address[]\",\"name\":\"_entitlements\",\"type\":\"address[]\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_channelId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"_user\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_permission\",\"type\":\"string\"}],\"name\":\"isEntitledToChannel\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"_entitled\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_user\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_permission\",\"type\":\"string\"}],\"name\":\"isEntitledToSpace\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"_entitled\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes[]\",\"name\":\"data\",\"type\":\"bytes[]\"}],\"name\":\"multicall\",\"outputs\":[{\"internalType\":\"bytes[]\",\"name\":\"results\",\"type\":\"bytes[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"networkId\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ownerRoleId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_roleId\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"_permission\",\"type\":\"string\"}],\"name\":\"removePermissionFromRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_roleId\",\"type\":\"uint256\"}],\"name\":\"removeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_channelId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"_entitlement\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_roleId\",\"type\":\"uint256\"}],\"name\":\"removeRoleFromChannel\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_roleId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"module\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"internalType\":\"structDataTypes.Entitlement\",\"name\":\"_entitlement\",\"type\":\"tuple\"}],\"name\":\"removeRoleFromEntitlement\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"roleCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"rolesById\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"roleId\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_channelId\",\"type\":\"string\"},{\"internalType\":\"bool\",\"name\":\"_disabled\",\"type\":\"bool\"}],\"name\":\"setChannelAccess\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_entitlement\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_whitelist\",\"type\":\"bool\"}],\"name\":\"setEntitlement\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_roleId\",\"type\":\"uint256\"}],\"name\":\"setOwnerRoleId\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"_disabled\",\"type\":\"bool\"}],\"name\":\"setSpaceAccess\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_channelId\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_channelName\",\"type\":\"string\"}],\"name\":\"updateChannel\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_roleId\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"_roleName\",\"type\":\"string\"}],\"name\":\"updateRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}]", +} + +// GoerliSpaceABI is the input ABI used to generate the binding from. +// Deprecated: Use GoerliSpaceMetaData.ABI instead. +var GoerliSpaceABI = GoerliSpaceMetaData.ABI + +// GoerliSpace is an auto generated Go binding around an Ethereum contract. +type GoerliSpace struct { + GoerliSpaceCaller // Read-only binding to the contract + GoerliSpaceTransactor // Write-only binding to the contract + GoerliSpaceFilterer // Log filterer for contract events +} + +// GoerliSpaceCaller is an auto generated read-only Go binding around an Ethereum contract. +type GoerliSpaceCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// GoerliSpaceTransactor is an auto generated write-only Go binding around an Ethereum contract. +type GoerliSpaceTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// GoerliSpaceFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type GoerliSpaceFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// GoerliSpaceSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type GoerliSpaceSession struct { + Contract *GoerliSpace // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// GoerliSpaceCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type GoerliSpaceCallerSession struct { + Contract *GoerliSpaceCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// GoerliSpaceTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type GoerliSpaceTransactorSession struct { + Contract *GoerliSpaceTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// GoerliSpaceRaw is an auto generated low-level Go binding around an Ethereum contract. +type GoerliSpaceRaw struct { + Contract *GoerliSpace // Generic contract binding to access the raw methods on +} + +// GoerliSpaceCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type GoerliSpaceCallerRaw struct { + Contract *GoerliSpaceCaller // Generic read-only contract binding to access the raw methods on +} + +// GoerliSpaceTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type GoerliSpaceTransactorRaw struct { + Contract *GoerliSpaceTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewGoerliSpace creates a new instance of GoerliSpace, bound to a specific deployed contract. +func NewGoerliSpace(address common.Address, backend bind.ContractBackend) (*GoerliSpace, error) { + contract, err := bindGoerliSpace(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &GoerliSpace{GoerliSpaceCaller: GoerliSpaceCaller{contract: contract}, GoerliSpaceTransactor: GoerliSpaceTransactor{contract: contract}, GoerliSpaceFilterer: GoerliSpaceFilterer{contract: contract}}, nil +} + +// NewGoerliSpaceCaller creates a new read-only instance of GoerliSpace, bound to a specific deployed contract. +func NewGoerliSpaceCaller(address common.Address, caller bind.ContractCaller) (*GoerliSpaceCaller, error) { + contract, err := bindGoerliSpace(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &GoerliSpaceCaller{contract: contract}, nil +} + +// NewGoerliSpaceTransactor creates a new write-only instance of GoerliSpace, bound to a specific deployed contract. +func NewGoerliSpaceTransactor(address common.Address, transactor bind.ContractTransactor) (*GoerliSpaceTransactor, error) { + contract, err := bindGoerliSpace(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &GoerliSpaceTransactor{contract: contract}, nil +} + +// NewGoerliSpaceFilterer creates a new log filterer instance of GoerliSpace, bound to a specific deployed contract. +func NewGoerliSpaceFilterer(address common.Address, filterer bind.ContractFilterer) (*GoerliSpaceFilterer, error) { + contract, err := bindGoerliSpace(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &GoerliSpaceFilterer{contract: contract}, nil +} + +// bindGoerliSpace binds a generic wrapper to an already deployed contract. +func bindGoerliSpace(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(GoerliSpaceABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_GoerliSpace *GoerliSpaceRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _GoerliSpace.Contract.GoerliSpaceCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_GoerliSpace *GoerliSpaceRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _GoerliSpace.Contract.GoerliSpaceTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_GoerliSpace *GoerliSpaceRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _GoerliSpace.Contract.GoerliSpaceTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_GoerliSpace *GoerliSpaceCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _GoerliSpace.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_GoerliSpace *GoerliSpaceTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _GoerliSpace.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_GoerliSpace *GoerliSpaceTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _GoerliSpace.Contract.contract.Transact(opts, method, params...) +} + +// Channels is a free data retrieval call binding the contract method 0xe5949b5d. +// +// Solidity: function channels(uint256 ) view returns(bytes32) +func (_GoerliSpace *GoerliSpaceCaller) Channels(opts *bind.CallOpts, arg0 *big.Int) ([32]byte, error) { + var out []interface{} + err := _GoerliSpace.contract.Call(opts, &out, "channels", arg0) + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// Channels is a free data retrieval call binding the contract method 0xe5949b5d. +// +// Solidity: function channels(uint256 ) view returns(bytes32) +func (_GoerliSpace *GoerliSpaceSession) Channels(arg0 *big.Int) ([32]byte, error) { + return _GoerliSpace.Contract.Channels(&_GoerliSpace.CallOpts, arg0) +} + +// Channels is a free data retrieval call binding the contract method 0xe5949b5d. +// +// Solidity: function channels(uint256 ) view returns(bytes32) +func (_GoerliSpace *GoerliSpaceCallerSession) Channels(arg0 *big.Int) ([32]byte, error) { + return _GoerliSpace.Contract.Channels(&_GoerliSpace.CallOpts, arg0) +} + +// ChannelsByHash is a free data retrieval call binding the contract method 0x129ab3c8. +// +// Solidity: function channelsByHash(bytes32 ) view returns(string name, bytes32 channelId, uint256 createdAt, bool disabled) +func (_GoerliSpace *GoerliSpaceCaller) ChannelsByHash(opts *bind.CallOpts, arg0 [32]byte) (struct { + Name string + ChannelId [32]byte + CreatedAt *big.Int + Disabled bool +}, error) { + var out []interface{} + err := _GoerliSpace.contract.Call(opts, &out, "channelsByHash", arg0) + + outstruct := new(struct { + Name string + ChannelId [32]byte + CreatedAt *big.Int + Disabled bool + }) + if err != nil { + return *outstruct, err + } + + outstruct.Name = *abi.ConvertType(out[0], new(string)).(*string) + outstruct.ChannelId = *abi.ConvertType(out[1], new([32]byte)).(*[32]byte) + outstruct.CreatedAt = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) + outstruct.Disabled = *abi.ConvertType(out[3], new(bool)).(*bool) + + return *outstruct, err + +} + +// ChannelsByHash is a free data retrieval call binding the contract method 0x129ab3c8. +// +// Solidity: function channelsByHash(bytes32 ) view returns(string name, bytes32 channelId, uint256 createdAt, bool disabled) +func (_GoerliSpace *GoerliSpaceSession) ChannelsByHash(arg0 [32]byte) (struct { + Name string + ChannelId [32]byte + CreatedAt *big.Int + Disabled bool +}, error) { + return _GoerliSpace.Contract.ChannelsByHash(&_GoerliSpace.CallOpts, arg0) +} + +// ChannelsByHash is a free data retrieval call binding the contract method 0x129ab3c8. +// +// Solidity: function channelsByHash(bytes32 ) view returns(string name, bytes32 channelId, uint256 createdAt, bool disabled) +func (_GoerliSpace *GoerliSpaceCallerSession) ChannelsByHash(arg0 [32]byte) (struct { + Name string + ChannelId [32]byte + CreatedAt *big.Int + Disabled bool +}, error) { + return _GoerliSpace.Contract.ChannelsByHash(&_GoerliSpace.CallOpts, arg0) +} + +// DefaultEntitlements is a free data retrieval call binding the contract method 0xfa6433c5. +// +// Solidity: function defaultEntitlements(address ) view returns(bool) +func (_GoerliSpace *GoerliSpaceCaller) DefaultEntitlements(opts *bind.CallOpts, arg0 common.Address) (bool, error) { + var out []interface{} + err := _GoerliSpace.contract.Call(opts, &out, "defaultEntitlements", arg0) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// DefaultEntitlements is a free data retrieval call binding the contract method 0xfa6433c5. +// +// Solidity: function defaultEntitlements(address ) view returns(bool) +func (_GoerliSpace *GoerliSpaceSession) DefaultEntitlements(arg0 common.Address) (bool, error) { + return _GoerliSpace.Contract.DefaultEntitlements(&_GoerliSpace.CallOpts, arg0) +} + +// DefaultEntitlements is a free data retrieval call binding the contract method 0xfa6433c5. +// +// Solidity: function defaultEntitlements(address ) view returns(bool) +func (_GoerliSpace *GoerliSpaceCallerSession) DefaultEntitlements(arg0 common.Address) (bool, error) { + return _GoerliSpace.Contract.DefaultEntitlements(&_GoerliSpace.CallOpts, arg0) +} + +// Disabled is a free data retrieval call binding the contract method 0xee070805. +// +// Solidity: function disabled() view returns(bool) +func (_GoerliSpace *GoerliSpaceCaller) Disabled(opts *bind.CallOpts) (bool, error) { + var out []interface{} + err := _GoerliSpace.contract.Call(opts, &out, "disabled") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// Disabled is a free data retrieval call binding the contract method 0xee070805. +// +// Solidity: function disabled() view returns(bool) +func (_GoerliSpace *GoerliSpaceSession) Disabled() (bool, error) { + return _GoerliSpace.Contract.Disabled(&_GoerliSpace.CallOpts) +} + +// Disabled is a free data retrieval call binding the contract method 0xee070805. +// +// Solidity: function disabled() view returns(bool) +func (_GoerliSpace *GoerliSpaceCallerSession) Disabled() (bool, error) { + return _GoerliSpace.Contract.Disabled(&_GoerliSpace.CallOpts) +} + +// Entitlements is a free data retrieval call binding the contract method 0xf28f9b56. +// +// Solidity: function entitlements(uint256 ) view returns(address) +func (_GoerliSpace *GoerliSpaceCaller) Entitlements(opts *bind.CallOpts, arg0 *big.Int) (common.Address, error) { + var out []interface{} + err := _GoerliSpace.contract.Call(opts, &out, "entitlements", arg0) + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Entitlements is a free data retrieval call binding the contract method 0xf28f9b56. +// +// Solidity: function entitlements(uint256 ) view returns(address) +func (_GoerliSpace *GoerliSpaceSession) Entitlements(arg0 *big.Int) (common.Address, error) { + return _GoerliSpace.Contract.Entitlements(&_GoerliSpace.CallOpts, arg0) +} + +// Entitlements is a free data retrieval call binding the contract method 0xf28f9b56. +// +// Solidity: function entitlements(uint256 ) view returns(address) +func (_GoerliSpace *GoerliSpaceCallerSession) Entitlements(arg0 *big.Int) (common.Address, error) { + return _GoerliSpace.Contract.Entitlements(&_GoerliSpace.CallOpts, arg0) +} + +// GetChannelByHash is a free data retrieval call binding the contract method 0x703511f8. +// +// Solidity: function getChannelByHash(bytes32 _channelHash) view returns((string,bytes32,uint256,bool)) +func (_GoerliSpace *GoerliSpaceCaller) GetChannelByHash(opts *bind.CallOpts, _channelHash [32]byte) (DataTypesChannel, error) { + var out []interface{} + err := _GoerliSpace.contract.Call(opts, &out, "getChannelByHash", _channelHash) + + if err != nil { + return *new(DataTypesChannel), err + } + + out0 := *abi.ConvertType(out[0], new(DataTypesChannel)).(*DataTypesChannel) + + return out0, err + +} + +// GetChannelByHash is a free data retrieval call binding the contract method 0x703511f8. +// +// Solidity: function getChannelByHash(bytes32 _channelHash) view returns((string,bytes32,uint256,bool)) +func (_GoerliSpace *GoerliSpaceSession) GetChannelByHash(_channelHash [32]byte) (DataTypesChannel, error) { + return _GoerliSpace.Contract.GetChannelByHash(&_GoerliSpace.CallOpts, _channelHash) +} + +// GetChannelByHash is a free data retrieval call binding the contract method 0x703511f8. +// +// Solidity: function getChannelByHash(bytes32 _channelHash) view returns((string,bytes32,uint256,bool)) +func (_GoerliSpace *GoerliSpaceCallerSession) GetChannelByHash(_channelHash [32]byte) (DataTypesChannel, error) { + return _GoerliSpace.Contract.GetChannelByHash(&_GoerliSpace.CallOpts, _channelHash) +} + +// GetEntitlementIdsByRoleId is a free data retrieval call binding the contract method 0x42486e49. +// +// Solidity: function getEntitlementIdsByRoleId(uint256 _roleId) view returns(bytes32[]) +func (_GoerliSpace *GoerliSpaceCaller) GetEntitlementIdsByRoleId(opts *bind.CallOpts, _roleId *big.Int) ([][32]byte, error) { + var out []interface{} + err := _GoerliSpace.contract.Call(opts, &out, "getEntitlementIdsByRoleId", _roleId) + + if err != nil { + return *new([][32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([][32]byte)).(*[][32]byte) + + return out0, err + +} + +// GetEntitlementIdsByRoleId is a free data retrieval call binding the contract method 0x42486e49. +// +// Solidity: function getEntitlementIdsByRoleId(uint256 _roleId) view returns(bytes32[]) +func (_GoerliSpace *GoerliSpaceSession) GetEntitlementIdsByRoleId(_roleId *big.Int) ([][32]byte, error) { + return _GoerliSpace.Contract.GetEntitlementIdsByRoleId(&_GoerliSpace.CallOpts, _roleId) +} + +// GetEntitlementIdsByRoleId is a free data retrieval call binding the contract method 0x42486e49. +// +// Solidity: function getEntitlementIdsByRoleId(uint256 _roleId) view returns(bytes32[]) +func (_GoerliSpace *GoerliSpaceCallerSession) GetEntitlementIdsByRoleId(_roleId *big.Int) ([][32]byte, error) { + return _GoerliSpace.Contract.GetEntitlementIdsByRoleId(&_GoerliSpace.CallOpts, _roleId) +} + +// GetEntitlements is a free data retrieval call binding the contract method 0x487dc38c. +// +// Solidity: function getEntitlements() view returns(address[]) +func (_GoerliSpace *GoerliSpaceCaller) GetEntitlements(opts *bind.CallOpts) ([]common.Address, error) { + var out []interface{} + err := _GoerliSpace.contract.Call(opts, &out, "getEntitlements") + + if err != nil { + return *new([]common.Address), err + } + + out0 := *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address) + + return out0, err + +} + +// GetEntitlements is a free data retrieval call binding the contract method 0x487dc38c. +// +// Solidity: function getEntitlements() view returns(address[]) +func (_GoerliSpace *GoerliSpaceSession) GetEntitlements() ([]common.Address, error) { + return _GoerliSpace.Contract.GetEntitlements(&_GoerliSpace.CallOpts) +} + +// GetEntitlements is a free data retrieval call binding the contract method 0x487dc38c. +// +// Solidity: function getEntitlements() view returns(address[]) +func (_GoerliSpace *GoerliSpaceCallerSession) GetEntitlements() ([]common.Address, error) { + return _GoerliSpace.Contract.GetEntitlements(&_GoerliSpace.CallOpts) +} + +// GetPermissionsByRoleId is a free data retrieval call binding the contract method 0xb4264233. +// +// Solidity: function getPermissionsByRoleId(uint256 _roleId) view returns(bytes32[]) +func (_GoerliSpace *GoerliSpaceCaller) GetPermissionsByRoleId(opts *bind.CallOpts, _roleId *big.Int) ([][32]byte, error) { + var out []interface{} + err := _GoerliSpace.contract.Call(opts, &out, "getPermissionsByRoleId", _roleId) + + if err != nil { + return *new([][32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([][32]byte)).(*[][32]byte) + + return out0, err + +} + +// GetPermissionsByRoleId is a free data retrieval call binding the contract method 0xb4264233. +// +// Solidity: function getPermissionsByRoleId(uint256 _roleId) view returns(bytes32[]) +func (_GoerliSpace *GoerliSpaceSession) GetPermissionsByRoleId(_roleId *big.Int) ([][32]byte, error) { + return _GoerliSpace.Contract.GetPermissionsByRoleId(&_GoerliSpace.CallOpts, _roleId) +} + +// GetPermissionsByRoleId is a free data retrieval call binding the contract method 0xb4264233. +// +// Solidity: function getPermissionsByRoleId(uint256 _roleId) view returns(bytes32[]) +func (_GoerliSpace *GoerliSpaceCallerSession) GetPermissionsByRoleId(_roleId *big.Int) ([][32]byte, error) { + return _GoerliSpace.Contract.GetPermissionsByRoleId(&_GoerliSpace.CallOpts, _roleId) +} + +// GetRoleById is a free data retrieval call binding the contract method 0x784c872b. +// +// Solidity: function getRoleById(uint256 _roleId) view returns((uint256,string)) +func (_GoerliSpace *GoerliSpaceCaller) GetRoleById(opts *bind.CallOpts, _roleId *big.Int) (DataTypesRole, error) { + var out []interface{} + err := _GoerliSpace.contract.Call(opts, &out, "getRoleById", _roleId) + + if err != nil { + return *new(DataTypesRole), err + } + + out0 := *abi.ConvertType(out[0], new(DataTypesRole)).(*DataTypesRole) + + return out0, err + +} + +// GetRoleById is a free data retrieval call binding the contract method 0x784c872b. +// +// Solidity: function getRoleById(uint256 _roleId) view returns((uint256,string)) +func (_GoerliSpace *GoerliSpaceSession) GetRoleById(_roleId *big.Int) (DataTypesRole, error) { + return _GoerliSpace.Contract.GetRoleById(&_GoerliSpace.CallOpts, _roleId) +} + +// GetRoleById is a free data retrieval call binding the contract method 0x784c872b. +// +// Solidity: function getRoleById(uint256 _roleId) view returns((uint256,string)) +func (_GoerliSpace *GoerliSpaceCallerSession) GetRoleById(_roleId *big.Int) (DataTypesRole, error) { + return _GoerliSpace.Contract.GetRoleById(&_GoerliSpace.CallOpts, _roleId) +} + +// GetRoles is a free data retrieval call binding the contract method 0x71061398. +// +// Solidity: function getRoles() view returns((uint256,string)[]) +func (_GoerliSpace *GoerliSpaceCaller) GetRoles(opts *bind.CallOpts) ([]DataTypesRole, error) { + var out []interface{} + err := _GoerliSpace.contract.Call(opts, &out, "getRoles") + + if err != nil { + return *new([]DataTypesRole), err + } + + out0 := *abi.ConvertType(out[0], new([]DataTypesRole)).(*[]DataTypesRole) + + return out0, err + +} + +// GetRoles is a free data retrieval call binding the contract method 0x71061398. +// +// Solidity: function getRoles() view returns((uint256,string)[]) +func (_GoerliSpace *GoerliSpaceSession) GetRoles() ([]DataTypesRole, error) { + return _GoerliSpace.Contract.GetRoles(&_GoerliSpace.CallOpts) +} + +// GetRoles is a free data retrieval call binding the contract method 0x71061398. +// +// Solidity: function getRoles() view returns((uint256,string)[]) +func (_GoerliSpace *GoerliSpaceCallerSession) GetRoles() ([]DataTypesRole, error) { + return _GoerliSpace.Contract.GetRoles(&_GoerliSpace.CallOpts) +} + +// HasEntitlement is a free data retrieval call binding the contract method 0x7f8d06d0. +// +// Solidity: function hasEntitlement(address ) view returns(bool) +func (_GoerliSpace *GoerliSpaceCaller) HasEntitlement(opts *bind.CallOpts, arg0 common.Address) (bool, error) { + var out []interface{} + err := _GoerliSpace.contract.Call(opts, &out, "hasEntitlement", arg0) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// HasEntitlement is a free data retrieval call binding the contract method 0x7f8d06d0. +// +// Solidity: function hasEntitlement(address ) view returns(bool) +func (_GoerliSpace *GoerliSpaceSession) HasEntitlement(arg0 common.Address) (bool, error) { + return _GoerliSpace.Contract.HasEntitlement(&_GoerliSpace.CallOpts, arg0) +} + +// HasEntitlement is a free data retrieval call binding the contract method 0x7f8d06d0. +// +// Solidity: function hasEntitlement(address ) view returns(bool) +func (_GoerliSpace *GoerliSpaceCallerSession) HasEntitlement(arg0 common.Address) (bool, error) { + return _GoerliSpace.Contract.HasEntitlement(&_GoerliSpace.CallOpts, arg0) +} + +// IsEntitledToChannel is a free data retrieval call binding the contract method 0xcea632bc. +// +// Solidity: function isEntitledToChannel(string _channelId, address _user, string _permission) view returns(bool _entitled) +func (_GoerliSpace *GoerliSpaceCaller) IsEntitledToChannel(opts *bind.CallOpts, _channelId string, _user common.Address, _permission string) (bool, error) { + var out []interface{} + err := _GoerliSpace.contract.Call(opts, &out, "isEntitledToChannel", _channelId, _user, _permission) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsEntitledToChannel is a free data retrieval call binding the contract method 0xcea632bc. +// +// Solidity: function isEntitledToChannel(string _channelId, address _user, string _permission) view returns(bool _entitled) +func (_GoerliSpace *GoerliSpaceSession) IsEntitledToChannel(_channelId string, _user common.Address, _permission string) (bool, error) { + return _GoerliSpace.Contract.IsEntitledToChannel(&_GoerliSpace.CallOpts, _channelId, _user, _permission) +} + +// IsEntitledToChannel is a free data retrieval call binding the contract method 0xcea632bc. +// +// Solidity: function isEntitledToChannel(string _channelId, address _user, string _permission) view returns(bool _entitled) +func (_GoerliSpace *GoerliSpaceCallerSession) IsEntitledToChannel(_channelId string, _user common.Address, _permission string) (bool, error) { + return _GoerliSpace.Contract.IsEntitledToChannel(&_GoerliSpace.CallOpts, _channelId, _user, _permission) +} + +// IsEntitledToSpace is a free data retrieval call binding the contract method 0x20759f9e. +// +// Solidity: function isEntitledToSpace(address _user, string _permission) view returns(bool _entitled) +func (_GoerliSpace *GoerliSpaceCaller) IsEntitledToSpace(opts *bind.CallOpts, _user common.Address, _permission string) (bool, error) { + var out []interface{} + err := _GoerliSpace.contract.Call(opts, &out, "isEntitledToSpace", _user, _permission) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsEntitledToSpace is a free data retrieval call binding the contract method 0x20759f9e. +// +// Solidity: function isEntitledToSpace(address _user, string _permission) view returns(bool _entitled) +func (_GoerliSpace *GoerliSpaceSession) IsEntitledToSpace(_user common.Address, _permission string) (bool, error) { + return _GoerliSpace.Contract.IsEntitledToSpace(&_GoerliSpace.CallOpts, _user, _permission) +} + +// IsEntitledToSpace is a free data retrieval call binding the contract method 0x20759f9e. +// +// Solidity: function isEntitledToSpace(address _user, string _permission) view returns(bool _entitled) +func (_GoerliSpace *GoerliSpaceCallerSession) IsEntitledToSpace(_user common.Address, _permission string) (bool, error) { + return _GoerliSpace.Contract.IsEntitledToSpace(&_GoerliSpace.CallOpts, _user, _permission) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_GoerliSpace *GoerliSpaceCaller) Name(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _GoerliSpace.contract.Call(opts, &out, "name") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_GoerliSpace *GoerliSpaceSession) Name() (string, error) { + return _GoerliSpace.Contract.Name(&_GoerliSpace.CallOpts) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_GoerliSpace *GoerliSpaceCallerSession) Name() (string, error) { + return _GoerliSpace.Contract.Name(&_GoerliSpace.CallOpts) +} + +// NetworkId is a free data retrieval call binding the contract method 0x9025e64c. +// +// Solidity: function networkId() view returns(string) +func (_GoerliSpace *GoerliSpaceCaller) NetworkId(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _GoerliSpace.contract.Call(opts, &out, "networkId") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// NetworkId is a free data retrieval call binding the contract method 0x9025e64c. +// +// Solidity: function networkId() view returns(string) +func (_GoerliSpace *GoerliSpaceSession) NetworkId() (string, error) { + return _GoerliSpace.Contract.NetworkId(&_GoerliSpace.CallOpts) +} + +// NetworkId is a free data retrieval call binding the contract method 0x9025e64c. +// +// Solidity: function networkId() view returns(string) +func (_GoerliSpace *GoerliSpaceCallerSession) NetworkId() (string, error) { + return _GoerliSpace.Contract.NetworkId(&_GoerliSpace.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_GoerliSpace *GoerliSpaceCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _GoerliSpace.contract.Call(opts, &out, "owner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_GoerliSpace *GoerliSpaceSession) Owner() (common.Address, error) { + return _GoerliSpace.Contract.Owner(&_GoerliSpace.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_GoerliSpace *GoerliSpaceCallerSession) Owner() (common.Address, error) { + return _GoerliSpace.Contract.Owner(&_GoerliSpace.CallOpts) +} + +// OwnerRoleId is a free data retrieval call binding the contract method 0xd1a6a961. +// +// Solidity: function ownerRoleId() view returns(uint256) +func (_GoerliSpace *GoerliSpaceCaller) OwnerRoleId(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _GoerliSpace.contract.Call(opts, &out, "ownerRoleId") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// OwnerRoleId is a free data retrieval call binding the contract method 0xd1a6a961. +// +// Solidity: function ownerRoleId() view returns(uint256) +func (_GoerliSpace *GoerliSpaceSession) OwnerRoleId() (*big.Int, error) { + return _GoerliSpace.Contract.OwnerRoleId(&_GoerliSpace.CallOpts) +} + +// OwnerRoleId is a free data retrieval call binding the contract method 0xd1a6a961. +// +// Solidity: function ownerRoleId() view returns(uint256) +func (_GoerliSpace *GoerliSpaceCallerSession) OwnerRoleId() (*big.Int, error) { + return _GoerliSpace.Contract.OwnerRoleId(&_GoerliSpace.CallOpts) +} + +// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (_GoerliSpace *GoerliSpaceCaller) ProxiableUUID(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _GoerliSpace.contract.Call(opts, &out, "proxiableUUID") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (_GoerliSpace *GoerliSpaceSession) ProxiableUUID() ([32]byte, error) { + return _GoerliSpace.Contract.ProxiableUUID(&_GoerliSpace.CallOpts) +} + +// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (_GoerliSpace *GoerliSpaceCallerSession) ProxiableUUID() ([32]byte, error) { + return _GoerliSpace.Contract.ProxiableUUID(&_GoerliSpace.CallOpts) +} + +// RoleCount is a free data retrieval call binding the contract method 0xddf96358. +// +// Solidity: function roleCount() view returns(uint256) +func (_GoerliSpace *GoerliSpaceCaller) RoleCount(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _GoerliSpace.contract.Call(opts, &out, "roleCount") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// RoleCount is a free data retrieval call binding the contract method 0xddf96358. +// +// Solidity: function roleCount() view returns(uint256) +func (_GoerliSpace *GoerliSpaceSession) RoleCount() (*big.Int, error) { + return _GoerliSpace.Contract.RoleCount(&_GoerliSpace.CallOpts) +} + +// RoleCount is a free data retrieval call binding the contract method 0xddf96358. +// +// Solidity: function roleCount() view returns(uint256) +func (_GoerliSpace *GoerliSpaceCallerSession) RoleCount() (*big.Int, error) { + return _GoerliSpace.Contract.RoleCount(&_GoerliSpace.CallOpts) +} + +// RolesById is a free data retrieval call binding the contract method 0xe5894ef4. +// +// Solidity: function rolesById(uint256 ) view returns(uint256 roleId, string name) +func (_GoerliSpace *GoerliSpaceCaller) RolesById(opts *bind.CallOpts, arg0 *big.Int) (struct { + RoleId *big.Int + Name string +}, error) { + var out []interface{} + err := _GoerliSpace.contract.Call(opts, &out, "rolesById", arg0) + + outstruct := new(struct { + RoleId *big.Int + Name string + }) + if err != nil { + return *outstruct, err + } + + outstruct.RoleId = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + outstruct.Name = *abi.ConvertType(out[1], new(string)).(*string) + + return *outstruct, err + +} + +// RolesById is a free data retrieval call binding the contract method 0xe5894ef4. +// +// Solidity: function rolesById(uint256 ) view returns(uint256 roleId, string name) +func (_GoerliSpace *GoerliSpaceSession) RolesById(arg0 *big.Int) (struct { + RoleId *big.Int + Name string +}, error) { + return _GoerliSpace.Contract.RolesById(&_GoerliSpace.CallOpts, arg0) +} + +// RolesById is a free data retrieval call binding the contract method 0xe5894ef4. +// +// Solidity: function rolesById(uint256 ) view returns(uint256 roleId, string name) +func (_GoerliSpace *GoerliSpaceCallerSession) RolesById(arg0 *big.Int) (struct { + RoleId *big.Int + Name string +}, error) { + return _GoerliSpace.Contract.RolesById(&_GoerliSpace.CallOpts, arg0) +} + +// AddPermissionToRole is a paid mutator transaction binding the contract method 0x66fb345c. +// +// Solidity: function addPermissionToRole(uint256 _roleId, string _permission) returns() +func (_GoerliSpace *GoerliSpaceTransactor) AddPermissionToRole(opts *bind.TransactOpts, _roleId *big.Int, _permission string) (*types.Transaction, error) { + return _GoerliSpace.contract.Transact(opts, "addPermissionToRole", _roleId, _permission) +} + +// AddPermissionToRole is a paid mutator transaction binding the contract method 0x66fb345c. +// +// Solidity: function addPermissionToRole(uint256 _roleId, string _permission) returns() +func (_GoerliSpace *GoerliSpaceSession) AddPermissionToRole(_roleId *big.Int, _permission string) (*types.Transaction, error) { + return _GoerliSpace.Contract.AddPermissionToRole(&_GoerliSpace.TransactOpts, _roleId, _permission) +} + +// AddPermissionToRole is a paid mutator transaction binding the contract method 0x66fb345c. +// +// Solidity: function addPermissionToRole(uint256 _roleId, string _permission) returns() +func (_GoerliSpace *GoerliSpaceTransactorSession) AddPermissionToRole(_roleId *big.Int, _permission string) (*types.Transaction, error) { + return _GoerliSpace.Contract.AddPermissionToRole(&_GoerliSpace.TransactOpts, _roleId, _permission) +} + +// AddRoleToChannel is a paid mutator transaction binding the contract method 0x1dea616a. +// +// Solidity: function addRoleToChannel(string _channelId, address _entitlement, uint256 _roleId) returns() +func (_GoerliSpace *GoerliSpaceTransactor) AddRoleToChannel(opts *bind.TransactOpts, _channelId string, _entitlement common.Address, _roleId *big.Int) (*types.Transaction, error) { + return _GoerliSpace.contract.Transact(opts, "addRoleToChannel", _channelId, _entitlement, _roleId) +} + +// AddRoleToChannel is a paid mutator transaction binding the contract method 0x1dea616a. +// +// Solidity: function addRoleToChannel(string _channelId, address _entitlement, uint256 _roleId) returns() +func (_GoerliSpace *GoerliSpaceSession) AddRoleToChannel(_channelId string, _entitlement common.Address, _roleId *big.Int) (*types.Transaction, error) { + return _GoerliSpace.Contract.AddRoleToChannel(&_GoerliSpace.TransactOpts, _channelId, _entitlement, _roleId) +} + +// AddRoleToChannel is a paid mutator transaction binding the contract method 0x1dea616a. +// +// Solidity: function addRoleToChannel(string _channelId, address _entitlement, uint256 _roleId) returns() +func (_GoerliSpace *GoerliSpaceTransactorSession) AddRoleToChannel(_channelId string, _entitlement common.Address, _roleId *big.Int) (*types.Transaction, error) { + return _GoerliSpace.Contract.AddRoleToChannel(&_GoerliSpace.TransactOpts, _channelId, _entitlement, _roleId) +} + +// AddRoleToEntitlement is a paid mutator transaction binding the contract method 0xba201ba8. +// +// Solidity: function addRoleToEntitlement(uint256 _roleId, (address,bytes) _entitlement) returns() +func (_GoerliSpace *GoerliSpaceTransactor) AddRoleToEntitlement(opts *bind.TransactOpts, _roleId *big.Int, _entitlement DataTypesEntitlement) (*types.Transaction, error) { + return _GoerliSpace.contract.Transact(opts, "addRoleToEntitlement", _roleId, _entitlement) +} + +// AddRoleToEntitlement is a paid mutator transaction binding the contract method 0xba201ba8. +// +// Solidity: function addRoleToEntitlement(uint256 _roleId, (address,bytes) _entitlement) returns() +func (_GoerliSpace *GoerliSpaceSession) AddRoleToEntitlement(_roleId *big.Int, _entitlement DataTypesEntitlement) (*types.Transaction, error) { + return _GoerliSpace.Contract.AddRoleToEntitlement(&_GoerliSpace.TransactOpts, _roleId, _entitlement) +} + +// AddRoleToEntitlement is a paid mutator transaction binding the contract method 0xba201ba8. +// +// Solidity: function addRoleToEntitlement(uint256 _roleId, (address,bytes) _entitlement) returns() +func (_GoerliSpace *GoerliSpaceTransactorSession) AddRoleToEntitlement(_roleId *big.Int, _entitlement DataTypesEntitlement) (*types.Transaction, error) { + return _GoerliSpace.Contract.AddRoleToEntitlement(&_GoerliSpace.TransactOpts, _roleId, _entitlement) +} + +// CreateChannel is a paid mutator transaction binding the contract method 0x51f83cea. +// +// Solidity: function createChannel(string channelName, string channelNetworkId, uint256[] roleIds) returns(bytes32) +func (_GoerliSpace *GoerliSpaceTransactor) CreateChannel(opts *bind.TransactOpts, channelName string, channelNetworkId string, roleIds []*big.Int) (*types.Transaction, error) { + return _GoerliSpace.contract.Transact(opts, "createChannel", channelName, channelNetworkId, roleIds) +} + +// CreateChannel is a paid mutator transaction binding the contract method 0x51f83cea. +// +// Solidity: function createChannel(string channelName, string channelNetworkId, uint256[] roleIds) returns(bytes32) +func (_GoerliSpace *GoerliSpaceSession) CreateChannel(channelName string, channelNetworkId string, roleIds []*big.Int) (*types.Transaction, error) { + return _GoerliSpace.Contract.CreateChannel(&_GoerliSpace.TransactOpts, channelName, channelNetworkId, roleIds) +} + +// CreateChannel is a paid mutator transaction binding the contract method 0x51f83cea. +// +// Solidity: function createChannel(string channelName, string channelNetworkId, uint256[] roleIds) returns(bytes32) +func (_GoerliSpace *GoerliSpaceTransactorSession) CreateChannel(channelName string, channelNetworkId string, roleIds []*big.Int) (*types.Transaction, error) { + return _GoerliSpace.Contract.CreateChannel(&_GoerliSpace.TransactOpts, channelName, channelNetworkId, roleIds) +} + +// CreateRole is a paid mutator transaction binding the contract method 0x8fcd793d. +// +// Solidity: function createRole(string _roleName, string[] _permissions, (address,bytes)[] _entitlements) returns(uint256) +func (_GoerliSpace *GoerliSpaceTransactor) CreateRole(opts *bind.TransactOpts, _roleName string, _permissions []string, _entitlements []DataTypesEntitlement) (*types.Transaction, error) { + return _GoerliSpace.contract.Transact(opts, "createRole", _roleName, _permissions, _entitlements) +} + +// CreateRole is a paid mutator transaction binding the contract method 0x8fcd793d. +// +// Solidity: function createRole(string _roleName, string[] _permissions, (address,bytes)[] _entitlements) returns(uint256) +func (_GoerliSpace *GoerliSpaceSession) CreateRole(_roleName string, _permissions []string, _entitlements []DataTypesEntitlement) (*types.Transaction, error) { + return _GoerliSpace.Contract.CreateRole(&_GoerliSpace.TransactOpts, _roleName, _permissions, _entitlements) +} + +// CreateRole is a paid mutator transaction binding the contract method 0x8fcd793d. +// +// Solidity: function createRole(string _roleName, string[] _permissions, (address,bytes)[] _entitlements) returns(uint256) +func (_GoerliSpace *GoerliSpaceTransactorSession) CreateRole(_roleName string, _permissions []string, _entitlements []DataTypesEntitlement) (*types.Transaction, error) { + return _GoerliSpace.Contract.CreateRole(&_GoerliSpace.TransactOpts, _roleName, _permissions, _entitlements) +} + +// Initialize is a paid mutator transaction binding the contract method 0xca275931. +// +// Solidity: function initialize(string _name, string _networkId, address[] _entitlements) returns() +func (_GoerliSpace *GoerliSpaceTransactor) Initialize(opts *bind.TransactOpts, _name string, _networkId string, _entitlements []common.Address) (*types.Transaction, error) { + return _GoerliSpace.contract.Transact(opts, "initialize", _name, _networkId, _entitlements) +} + +// Initialize is a paid mutator transaction binding the contract method 0xca275931. +// +// Solidity: function initialize(string _name, string _networkId, address[] _entitlements) returns() +func (_GoerliSpace *GoerliSpaceSession) Initialize(_name string, _networkId string, _entitlements []common.Address) (*types.Transaction, error) { + return _GoerliSpace.Contract.Initialize(&_GoerliSpace.TransactOpts, _name, _networkId, _entitlements) +} + +// Initialize is a paid mutator transaction binding the contract method 0xca275931. +// +// Solidity: function initialize(string _name, string _networkId, address[] _entitlements) returns() +func (_GoerliSpace *GoerliSpaceTransactorSession) Initialize(_name string, _networkId string, _entitlements []common.Address) (*types.Transaction, error) { + return _GoerliSpace.Contract.Initialize(&_GoerliSpace.TransactOpts, _name, _networkId, _entitlements) +} + +// Multicall is a paid mutator transaction binding the contract method 0xac9650d8. +// +// Solidity: function multicall(bytes[] data) returns(bytes[] results) +func (_GoerliSpace *GoerliSpaceTransactor) Multicall(opts *bind.TransactOpts, data [][]byte) (*types.Transaction, error) { + return _GoerliSpace.contract.Transact(opts, "multicall", data) +} + +// Multicall is a paid mutator transaction binding the contract method 0xac9650d8. +// +// Solidity: function multicall(bytes[] data) returns(bytes[] results) +func (_GoerliSpace *GoerliSpaceSession) Multicall(data [][]byte) (*types.Transaction, error) { + return _GoerliSpace.Contract.Multicall(&_GoerliSpace.TransactOpts, data) +} + +// Multicall is a paid mutator transaction binding the contract method 0xac9650d8. +// +// Solidity: function multicall(bytes[] data) returns(bytes[] results) +func (_GoerliSpace *GoerliSpaceTransactorSession) Multicall(data [][]byte) (*types.Transaction, error) { + return _GoerliSpace.Contract.Multicall(&_GoerliSpace.TransactOpts, data) +} + +// RemovePermissionFromRole is a paid mutator transaction binding the contract method 0xf740bb6b. +// +// Solidity: function removePermissionFromRole(uint256 _roleId, string _permission) returns() +func (_GoerliSpace *GoerliSpaceTransactor) RemovePermissionFromRole(opts *bind.TransactOpts, _roleId *big.Int, _permission string) (*types.Transaction, error) { + return _GoerliSpace.contract.Transact(opts, "removePermissionFromRole", _roleId, _permission) +} + +// RemovePermissionFromRole is a paid mutator transaction binding the contract method 0xf740bb6b. +// +// Solidity: function removePermissionFromRole(uint256 _roleId, string _permission) returns() +func (_GoerliSpace *GoerliSpaceSession) RemovePermissionFromRole(_roleId *big.Int, _permission string) (*types.Transaction, error) { + return _GoerliSpace.Contract.RemovePermissionFromRole(&_GoerliSpace.TransactOpts, _roleId, _permission) +} + +// RemovePermissionFromRole is a paid mutator transaction binding the contract method 0xf740bb6b. +// +// Solidity: function removePermissionFromRole(uint256 _roleId, string _permission) returns() +func (_GoerliSpace *GoerliSpaceTransactorSession) RemovePermissionFromRole(_roleId *big.Int, _permission string) (*types.Transaction, error) { + return _GoerliSpace.Contract.RemovePermissionFromRole(&_GoerliSpace.TransactOpts, _roleId, _permission) +} + +// RemoveRole is a paid mutator transaction binding the contract method 0x92691821. +// +// Solidity: function removeRole(uint256 _roleId) returns() +func (_GoerliSpace *GoerliSpaceTransactor) RemoveRole(opts *bind.TransactOpts, _roleId *big.Int) (*types.Transaction, error) { + return _GoerliSpace.contract.Transact(opts, "removeRole", _roleId) +} + +// RemoveRole is a paid mutator transaction binding the contract method 0x92691821. +// +// Solidity: function removeRole(uint256 _roleId) returns() +func (_GoerliSpace *GoerliSpaceSession) RemoveRole(_roleId *big.Int) (*types.Transaction, error) { + return _GoerliSpace.Contract.RemoveRole(&_GoerliSpace.TransactOpts, _roleId) +} + +// RemoveRole is a paid mutator transaction binding the contract method 0x92691821. +// +// Solidity: function removeRole(uint256 _roleId) returns() +func (_GoerliSpace *GoerliSpaceTransactorSession) RemoveRole(_roleId *big.Int) (*types.Transaction, error) { + return _GoerliSpace.Contract.RemoveRole(&_GoerliSpace.TransactOpts, _roleId) +} + +// RemoveRoleFromChannel is a paid mutator transaction binding the contract method 0xbaaf3d57. +// +// Solidity: function removeRoleFromChannel(string _channelId, address _entitlement, uint256 _roleId) returns() +func (_GoerliSpace *GoerliSpaceTransactor) RemoveRoleFromChannel(opts *bind.TransactOpts, _channelId string, _entitlement common.Address, _roleId *big.Int) (*types.Transaction, error) { + return _GoerliSpace.contract.Transact(opts, "removeRoleFromChannel", _channelId, _entitlement, _roleId) +} + +// RemoveRoleFromChannel is a paid mutator transaction binding the contract method 0xbaaf3d57. +// +// Solidity: function removeRoleFromChannel(string _channelId, address _entitlement, uint256 _roleId) returns() +func (_GoerliSpace *GoerliSpaceSession) RemoveRoleFromChannel(_channelId string, _entitlement common.Address, _roleId *big.Int) (*types.Transaction, error) { + return _GoerliSpace.Contract.RemoveRoleFromChannel(&_GoerliSpace.TransactOpts, _channelId, _entitlement, _roleId) +} + +// RemoveRoleFromChannel is a paid mutator transaction binding the contract method 0xbaaf3d57. +// +// Solidity: function removeRoleFromChannel(string _channelId, address _entitlement, uint256 _roleId) returns() +func (_GoerliSpace *GoerliSpaceTransactorSession) RemoveRoleFromChannel(_channelId string, _entitlement common.Address, _roleId *big.Int) (*types.Transaction, error) { + return _GoerliSpace.Contract.RemoveRoleFromChannel(&_GoerliSpace.TransactOpts, _channelId, _entitlement, _roleId) +} + +// RemoveRoleFromEntitlement is a paid mutator transaction binding the contract method 0xdba81864. +// +// Solidity: function removeRoleFromEntitlement(uint256 _roleId, (address,bytes) _entitlement) returns() +func (_GoerliSpace *GoerliSpaceTransactor) RemoveRoleFromEntitlement(opts *bind.TransactOpts, _roleId *big.Int, _entitlement DataTypesEntitlement) (*types.Transaction, error) { + return _GoerliSpace.contract.Transact(opts, "removeRoleFromEntitlement", _roleId, _entitlement) +} + +// RemoveRoleFromEntitlement is a paid mutator transaction binding the contract method 0xdba81864. +// +// Solidity: function removeRoleFromEntitlement(uint256 _roleId, (address,bytes) _entitlement) returns() +func (_GoerliSpace *GoerliSpaceSession) RemoveRoleFromEntitlement(_roleId *big.Int, _entitlement DataTypesEntitlement) (*types.Transaction, error) { + return _GoerliSpace.Contract.RemoveRoleFromEntitlement(&_GoerliSpace.TransactOpts, _roleId, _entitlement) +} + +// RemoveRoleFromEntitlement is a paid mutator transaction binding the contract method 0xdba81864. +// +// Solidity: function removeRoleFromEntitlement(uint256 _roleId, (address,bytes) _entitlement) returns() +func (_GoerliSpace *GoerliSpaceTransactorSession) RemoveRoleFromEntitlement(_roleId *big.Int, _entitlement DataTypesEntitlement) (*types.Transaction, error) { + return _GoerliSpace.Contract.RemoveRoleFromEntitlement(&_GoerliSpace.TransactOpts, _roleId, _entitlement) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_GoerliSpace *GoerliSpaceTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _GoerliSpace.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_GoerliSpace *GoerliSpaceSession) RenounceOwnership() (*types.Transaction, error) { + return _GoerliSpace.Contract.RenounceOwnership(&_GoerliSpace.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_GoerliSpace *GoerliSpaceTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _GoerliSpace.Contract.RenounceOwnership(&_GoerliSpace.TransactOpts) +} + +// SetChannelAccess is a paid mutator transaction binding the contract method 0x5de151b8. +// +// Solidity: function setChannelAccess(string _channelId, bool _disabled) returns() +func (_GoerliSpace *GoerliSpaceTransactor) SetChannelAccess(opts *bind.TransactOpts, _channelId string, _disabled bool) (*types.Transaction, error) { + return _GoerliSpace.contract.Transact(opts, "setChannelAccess", _channelId, _disabled) +} + +// SetChannelAccess is a paid mutator transaction binding the contract method 0x5de151b8. +// +// Solidity: function setChannelAccess(string _channelId, bool _disabled) returns() +func (_GoerliSpace *GoerliSpaceSession) SetChannelAccess(_channelId string, _disabled bool) (*types.Transaction, error) { + return _GoerliSpace.Contract.SetChannelAccess(&_GoerliSpace.TransactOpts, _channelId, _disabled) +} + +// SetChannelAccess is a paid mutator transaction binding the contract method 0x5de151b8. +// +// Solidity: function setChannelAccess(string _channelId, bool _disabled) returns() +func (_GoerliSpace *GoerliSpaceTransactorSession) SetChannelAccess(_channelId string, _disabled bool) (*types.Transaction, error) { + return _GoerliSpace.Contract.SetChannelAccess(&_GoerliSpace.TransactOpts, _channelId, _disabled) +} + +// SetEntitlement is a paid mutator transaction binding the contract method 0xf3b96ab4. +// +// Solidity: function setEntitlement(address _entitlement, bool _whitelist) returns() +func (_GoerliSpace *GoerliSpaceTransactor) SetEntitlement(opts *bind.TransactOpts, _entitlement common.Address, _whitelist bool) (*types.Transaction, error) { + return _GoerliSpace.contract.Transact(opts, "setEntitlement", _entitlement, _whitelist) +} + +// SetEntitlement is a paid mutator transaction binding the contract method 0xf3b96ab4. +// +// Solidity: function setEntitlement(address _entitlement, bool _whitelist) returns() +func (_GoerliSpace *GoerliSpaceSession) SetEntitlement(_entitlement common.Address, _whitelist bool) (*types.Transaction, error) { + return _GoerliSpace.Contract.SetEntitlement(&_GoerliSpace.TransactOpts, _entitlement, _whitelist) +} + +// SetEntitlement is a paid mutator transaction binding the contract method 0xf3b96ab4. +// +// Solidity: function setEntitlement(address _entitlement, bool _whitelist) returns() +func (_GoerliSpace *GoerliSpaceTransactorSession) SetEntitlement(_entitlement common.Address, _whitelist bool) (*types.Transaction, error) { + return _GoerliSpace.Contract.SetEntitlement(&_GoerliSpace.TransactOpts, _entitlement, _whitelist) +} + +// SetOwnerRoleId is a paid mutator transaction binding the contract method 0x4999ab16. +// +// Solidity: function setOwnerRoleId(uint256 _roleId) returns() +func (_GoerliSpace *GoerliSpaceTransactor) SetOwnerRoleId(opts *bind.TransactOpts, _roleId *big.Int) (*types.Transaction, error) { + return _GoerliSpace.contract.Transact(opts, "setOwnerRoleId", _roleId) +} + +// SetOwnerRoleId is a paid mutator transaction binding the contract method 0x4999ab16. +// +// Solidity: function setOwnerRoleId(uint256 _roleId) returns() +func (_GoerliSpace *GoerliSpaceSession) SetOwnerRoleId(_roleId *big.Int) (*types.Transaction, error) { + return _GoerliSpace.Contract.SetOwnerRoleId(&_GoerliSpace.TransactOpts, _roleId) +} + +// SetOwnerRoleId is a paid mutator transaction binding the contract method 0x4999ab16. +// +// Solidity: function setOwnerRoleId(uint256 _roleId) returns() +func (_GoerliSpace *GoerliSpaceTransactorSession) SetOwnerRoleId(_roleId *big.Int) (*types.Transaction, error) { + return _GoerliSpace.Contract.SetOwnerRoleId(&_GoerliSpace.TransactOpts, _roleId) +} + +// SetSpaceAccess is a paid mutator transaction binding the contract method 0x446dc22e. +// +// Solidity: function setSpaceAccess(bool _disabled) returns() +func (_GoerliSpace *GoerliSpaceTransactor) SetSpaceAccess(opts *bind.TransactOpts, _disabled bool) (*types.Transaction, error) { + return _GoerliSpace.contract.Transact(opts, "setSpaceAccess", _disabled) +} + +// SetSpaceAccess is a paid mutator transaction binding the contract method 0x446dc22e. +// +// Solidity: function setSpaceAccess(bool _disabled) returns() +func (_GoerliSpace *GoerliSpaceSession) SetSpaceAccess(_disabled bool) (*types.Transaction, error) { + return _GoerliSpace.Contract.SetSpaceAccess(&_GoerliSpace.TransactOpts, _disabled) +} + +// SetSpaceAccess is a paid mutator transaction binding the contract method 0x446dc22e. +// +// Solidity: function setSpaceAccess(bool _disabled) returns() +func (_GoerliSpace *GoerliSpaceTransactorSession) SetSpaceAccess(_disabled bool) (*types.Transaction, error) { + return _GoerliSpace.Contract.SetSpaceAccess(&_GoerliSpace.TransactOpts, _disabled) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_GoerliSpace *GoerliSpaceTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _GoerliSpace.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_GoerliSpace *GoerliSpaceSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _GoerliSpace.Contract.TransferOwnership(&_GoerliSpace.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_GoerliSpace *GoerliSpaceTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _GoerliSpace.Contract.TransferOwnership(&_GoerliSpace.TransactOpts, newOwner) +} + +// UpdateChannel is a paid mutator transaction binding the contract method 0x34a1dd26. +// +// Solidity: function updateChannel(string _channelId, string _channelName) returns() +func (_GoerliSpace *GoerliSpaceTransactor) UpdateChannel(opts *bind.TransactOpts, _channelId string, _channelName string) (*types.Transaction, error) { + return _GoerliSpace.contract.Transact(opts, "updateChannel", _channelId, _channelName) +} + +// UpdateChannel is a paid mutator transaction binding the contract method 0x34a1dd26. +// +// Solidity: function updateChannel(string _channelId, string _channelName) returns() +func (_GoerliSpace *GoerliSpaceSession) UpdateChannel(_channelId string, _channelName string) (*types.Transaction, error) { + return _GoerliSpace.Contract.UpdateChannel(&_GoerliSpace.TransactOpts, _channelId, _channelName) +} + +// UpdateChannel is a paid mutator transaction binding the contract method 0x34a1dd26. +// +// Solidity: function updateChannel(string _channelId, string _channelName) returns() +func (_GoerliSpace *GoerliSpaceTransactorSession) UpdateChannel(_channelId string, _channelName string) (*types.Transaction, error) { + return _GoerliSpace.Contract.UpdateChannel(&_GoerliSpace.TransactOpts, _channelId, _channelName) +} + +// UpdateRole is a paid mutator transaction binding the contract method 0x32e704cc. +// +// Solidity: function updateRole(uint256 _roleId, string _roleName) returns() +func (_GoerliSpace *GoerliSpaceTransactor) UpdateRole(opts *bind.TransactOpts, _roleId *big.Int, _roleName string) (*types.Transaction, error) { + return _GoerliSpace.contract.Transact(opts, "updateRole", _roleId, _roleName) +} + +// UpdateRole is a paid mutator transaction binding the contract method 0x32e704cc. +// +// Solidity: function updateRole(uint256 _roleId, string _roleName) returns() +func (_GoerliSpace *GoerliSpaceSession) UpdateRole(_roleId *big.Int, _roleName string) (*types.Transaction, error) { + return _GoerliSpace.Contract.UpdateRole(&_GoerliSpace.TransactOpts, _roleId, _roleName) +} + +// UpdateRole is a paid mutator transaction binding the contract method 0x32e704cc. +// +// Solidity: function updateRole(uint256 _roleId, string _roleName) returns() +func (_GoerliSpace *GoerliSpaceTransactorSession) UpdateRole(_roleId *big.Int, _roleName string) (*types.Transaction, error) { + return _GoerliSpace.Contract.UpdateRole(&_GoerliSpace.TransactOpts, _roleId, _roleName) +} + +// UpgradeTo is a paid mutator transaction binding the contract method 0x3659cfe6. +// +// Solidity: function upgradeTo(address newImplementation) returns() +func (_GoerliSpace *GoerliSpaceTransactor) UpgradeTo(opts *bind.TransactOpts, newImplementation common.Address) (*types.Transaction, error) { + return _GoerliSpace.contract.Transact(opts, "upgradeTo", newImplementation) +} + +// UpgradeTo is a paid mutator transaction binding the contract method 0x3659cfe6. +// +// Solidity: function upgradeTo(address newImplementation) returns() +func (_GoerliSpace *GoerliSpaceSession) UpgradeTo(newImplementation common.Address) (*types.Transaction, error) { + return _GoerliSpace.Contract.UpgradeTo(&_GoerliSpace.TransactOpts, newImplementation) +} + +// UpgradeTo is a paid mutator transaction binding the contract method 0x3659cfe6. +// +// Solidity: function upgradeTo(address newImplementation) returns() +func (_GoerliSpace *GoerliSpaceTransactorSession) UpgradeTo(newImplementation common.Address) (*types.Transaction, error) { + return _GoerliSpace.Contract.UpgradeTo(&_GoerliSpace.TransactOpts, newImplementation) +} + +// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286. +// +// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns() +func (_GoerliSpace *GoerliSpaceTransactor) UpgradeToAndCall(opts *bind.TransactOpts, newImplementation common.Address, data []byte) (*types.Transaction, error) { + return _GoerliSpace.contract.Transact(opts, "upgradeToAndCall", newImplementation, data) +} + +// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286. +// +// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns() +func (_GoerliSpace *GoerliSpaceSession) UpgradeToAndCall(newImplementation common.Address, data []byte) (*types.Transaction, error) { + return _GoerliSpace.Contract.UpgradeToAndCall(&_GoerliSpace.TransactOpts, newImplementation, data) +} + +// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286. +// +// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns() +func (_GoerliSpace *GoerliSpaceTransactorSession) UpgradeToAndCall(newImplementation common.Address, data []byte) (*types.Transaction, error) { + return _GoerliSpace.Contract.UpgradeToAndCall(&_GoerliSpace.TransactOpts, newImplementation, data) +} + +// GoerliSpaceAdminChangedIterator is returned from FilterAdminChanged and is used to iterate over the raw logs and unpacked data for AdminChanged events raised by the GoerliSpace contract. +type GoerliSpaceAdminChangedIterator struct { + Event *GoerliSpaceAdminChanged // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *GoerliSpaceAdminChangedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(GoerliSpaceAdminChanged) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(GoerliSpaceAdminChanged) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *GoerliSpaceAdminChangedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *GoerliSpaceAdminChangedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// GoerliSpaceAdminChanged represents a AdminChanged event raised by the GoerliSpace contract. +type GoerliSpaceAdminChanged struct { + PreviousAdmin common.Address + NewAdmin common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterAdminChanged is a free log retrieval operation binding the contract event 0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f. +// +// Solidity: event AdminChanged(address previousAdmin, address newAdmin) +func (_GoerliSpace *GoerliSpaceFilterer) FilterAdminChanged(opts *bind.FilterOpts) (*GoerliSpaceAdminChangedIterator, error) { + + logs, sub, err := _GoerliSpace.contract.FilterLogs(opts, "AdminChanged") + if err != nil { + return nil, err + } + return &GoerliSpaceAdminChangedIterator{contract: _GoerliSpace.contract, event: "AdminChanged", logs: logs, sub: sub}, nil +} + +// WatchAdminChanged is a free log subscription operation binding the contract event 0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f. +// +// Solidity: event AdminChanged(address previousAdmin, address newAdmin) +func (_GoerliSpace *GoerliSpaceFilterer) WatchAdminChanged(opts *bind.WatchOpts, sink chan<- *GoerliSpaceAdminChanged) (event.Subscription, error) { + + logs, sub, err := _GoerliSpace.contract.WatchLogs(opts, "AdminChanged") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(GoerliSpaceAdminChanged) + if err := _GoerliSpace.contract.UnpackLog(event, "AdminChanged", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseAdminChanged is a log parse operation binding the contract event 0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f. +// +// Solidity: event AdminChanged(address previousAdmin, address newAdmin) +func (_GoerliSpace *GoerliSpaceFilterer) ParseAdminChanged(log types.Log) (*GoerliSpaceAdminChanged, error) { + event := new(GoerliSpaceAdminChanged) + if err := _GoerliSpace.contract.UnpackLog(event, "AdminChanged", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// GoerliSpaceBeaconUpgradedIterator is returned from FilterBeaconUpgraded and is used to iterate over the raw logs and unpacked data for BeaconUpgraded events raised by the GoerliSpace contract. +type GoerliSpaceBeaconUpgradedIterator struct { + Event *GoerliSpaceBeaconUpgraded // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *GoerliSpaceBeaconUpgradedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(GoerliSpaceBeaconUpgraded) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(GoerliSpaceBeaconUpgraded) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *GoerliSpaceBeaconUpgradedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *GoerliSpaceBeaconUpgradedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// GoerliSpaceBeaconUpgraded represents a BeaconUpgraded event raised by the GoerliSpace contract. +type GoerliSpaceBeaconUpgraded struct { + Beacon common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterBeaconUpgraded is a free log retrieval operation binding the contract event 0x1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e. +// +// Solidity: event BeaconUpgraded(address indexed beacon) +func (_GoerliSpace *GoerliSpaceFilterer) FilterBeaconUpgraded(opts *bind.FilterOpts, beacon []common.Address) (*GoerliSpaceBeaconUpgradedIterator, error) { + + var beaconRule []interface{} + for _, beaconItem := range beacon { + beaconRule = append(beaconRule, beaconItem) + } + + logs, sub, err := _GoerliSpace.contract.FilterLogs(opts, "BeaconUpgraded", beaconRule) + if err != nil { + return nil, err + } + return &GoerliSpaceBeaconUpgradedIterator{contract: _GoerliSpace.contract, event: "BeaconUpgraded", logs: logs, sub: sub}, nil +} + +// WatchBeaconUpgraded is a free log subscription operation binding the contract event 0x1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e. +// +// Solidity: event BeaconUpgraded(address indexed beacon) +func (_GoerliSpace *GoerliSpaceFilterer) WatchBeaconUpgraded(opts *bind.WatchOpts, sink chan<- *GoerliSpaceBeaconUpgraded, beacon []common.Address) (event.Subscription, error) { + + var beaconRule []interface{} + for _, beaconItem := range beacon { + beaconRule = append(beaconRule, beaconItem) + } + + logs, sub, err := _GoerliSpace.contract.WatchLogs(opts, "BeaconUpgraded", beaconRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(GoerliSpaceBeaconUpgraded) + if err := _GoerliSpace.contract.UnpackLog(event, "BeaconUpgraded", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseBeaconUpgraded is a log parse operation binding the contract event 0x1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e. +// +// Solidity: event BeaconUpgraded(address indexed beacon) +func (_GoerliSpace *GoerliSpaceFilterer) ParseBeaconUpgraded(log types.Log) (*GoerliSpaceBeaconUpgraded, error) { + event := new(GoerliSpaceBeaconUpgraded) + if err := _GoerliSpace.contract.UnpackLog(event, "BeaconUpgraded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// GoerliSpaceInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the GoerliSpace contract. +type GoerliSpaceInitializedIterator struct { + Event *GoerliSpaceInitialized // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *GoerliSpaceInitializedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(GoerliSpaceInitialized) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(GoerliSpaceInitialized) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *GoerliSpaceInitializedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *GoerliSpaceInitializedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// GoerliSpaceInitialized represents a Initialized event raised by the GoerliSpace contract. +type GoerliSpaceInitialized struct { + Version uint8 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterInitialized is a free log retrieval operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_GoerliSpace *GoerliSpaceFilterer) FilterInitialized(opts *bind.FilterOpts) (*GoerliSpaceInitializedIterator, error) { + + logs, sub, err := _GoerliSpace.contract.FilterLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return &GoerliSpaceInitializedIterator{contract: _GoerliSpace.contract, event: "Initialized", logs: logs, sub: sub}, nil +} + +// WatchInitialized is a free log subscription operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_GoerliSpace *GoerliSpaceFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *GoerliSpaceInitialized) (event.Subscription, error) { + + logs, sub, err := _GoerliSpace.contract.WatchLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(GoerliSpaceInitialized) + if err := _GoerliSpace.contract.UnpackLog(event, "Initialized", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseInitialized is a log parse operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_GoerliSpace *GoerliSpaceFilterer) ParseInitialized(log types.Log) (*GoerliSpaceInitialized, error) { + event := new(GoerliSpaceInitialized) + if err := _GoerliSpace.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// GoerliSpaceOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the GoerliSpace contract. +type GoerliSpaceOwnershipTransferredIterator struct { + Event *GoerliSpaceOwnershipTransferred // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *GoerliSpaceOwnershipTransferredIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(GoerliSpaceOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(GoerliSpaceOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *GoerliSpaceOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *GoerliSpaceOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// GoerliSpaceOwnershipTransferred represents a OwnershipTransferred event raised by the GoerliSpace contract. +type GoerliSpaceOwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_GoerliSpace *GoerliSpaceFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*GoerliSpaceOwnershipTransferredIterator, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _GoerliSpace.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &GoerliSpaceOwnershipTransferredIterator{contract: _GoerliSpace.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_GoerliSpace *GoerliSpaceFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *GoerliSpaceOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _GoerliSpace.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(GoerliSpaceOwnershipTransferred) + if err := _GoerliSpace.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_GoerliSpace *GoerliSpaceFilterer) ParseOwnershipTransferred(log types.Log) (*GoerliSpaceOwnershipTransferred, error) { + event := new(GoerliSpaceOwnershipTransferred) + if err := _GoerliSpace.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// GoerliSpaceUpgradedIterator is returned from FilterUpgraded and is used to iterate over the raw logs and unpacked data for Upgraded events raised by the GoerliSpace contract. +type GoerliSpaceUpgradedIterator struct { + Event *GoerliSpaceUpgraded // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *GoerliSpaceUpgradedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(GoerliSpaceUpgraded) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(GoerliSpaceUpgraded) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *GoerliSpaceUpgradedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *GoerliSpaceUpgradedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// GoerliSpaceUpgraded represents a Upgraded event raised by the GoerliSpace contract. +type GoerliSpaceUpgraded struct { + Implementation common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUpgraded is a free log retrieval operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b. +// +// Solidity: event Upgraded(address indexed implementation) +func (_GoerliSpace *GoerliSpaceFilterer) FilterUpgraded(opts *bind.FilterOpts, implementation []common.Address) (*GoerliSpaceUpgradedIterator, error) { + + var implementationRule []interface{} + for _, implementationItem := range implementation { + implementationRule = append(implementationRule, implementationItem) + } + + logs, sub, err := _GoerliSpace.contract.FilterLogs(opts, "Upgraded", implementationRule) + if err != nil { + return nil, err + } + return &GoerliSpaceUpgradedIterator{contract: _GoerliSpace.contract, event: "Upgraded", logs: logs, sub: sub}, nil +} + +// WatchUpgraded is a free log subscription operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b. +// +// Solidity: event Upgraded(address indexed implementation) +func (_GoerliSpace *GoerliSpaceFilterer) WatchUpgraded(opts *bind.WatchOpts, sink chan<- *GoerliSpaceUpgraded, implementation []common.Address) (event.Subscription, error) { + + var implementationRule []interface{} + for _, implementationItem := range implementation { + implementationRule = append(implementationRule, implementationItem) + } + + logs, sub, err := _GoerliSpace.contract.WatchLogs(opts, "Upgraded", implementationRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(GoerliSpaceUpgraded) + if err := _GoerliSpace.contract.UnpackLog(event, "Upgraded", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseUpgraded is a log parse operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b. +// +// Solidity: event Upgraded(address indexed implementation) +func (_GoerliSpace *GoerliSpaceFilterer) ParseUpgraded(log types.Log) (*GoerliSpaceUpgraded, error) { + event := new(GoerliSpaceUpgraded) + if err := _GoerliSpace.contract.UnpackLog(event, "Upgraded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/zion/contracts/goerli_space_factory/goerli_space_factory.go b/zion/contracts/goerli_space_factory/goerli_space_factory.go new file mode 100644 index 000000000..0ecc55aa0 --- /dev/null +++ b/zion/contracts/goerli_space_factory/goerli_space_factory.go @@ -0,0 +1,1446 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package goerli_space_factory + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription +) + +// DataTypesCreateSpaceExtraEntitlements is an auto generated low-level Go binding around an user-defined struct. +type DataTypesCreateSpaceExtraEntitlements struct { + RoleName string + Permissions []string + Tokens []DataTypesExternalToken + Users []common.Address +} + +// DataTypesExternalToken is an auto generated low-level Go binding around an user-defined struct. +type DataTypesExternalToken struct { + ContractAddress common.Address + Quantity *big.Int + IsSingleToken bool + TokenIds []*big.Int +} + +// GoerliSpaceFactoryMetaData contains all meta data concerning the GoerliSpaceFactory contract. +var GoerliSpaceFactoryMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[],\"name\":\"InvalidParameters\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NameContainsInvalidCharacters\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NameLengthInvalid\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PermissionAlreadyExists\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SpaceAlreadyRegistered\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"SPACE_IMPLEMENTATION_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"SPACE_TOKEN_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"TOKEN_IMPLEMENTATION_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"USER_IMPLEMENTATION_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string[]\",\"name\":\"_permissions\",\"type\":\"string[]\"}],\"name\":\"addOwnerPermissions\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"spaceName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"spaceNetworkId\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"spaceMetadata\",\"type\":\"string\"},{\"internalType\":\"string[]\",\"name\":\"_everyonePermissions\",\"type\":\"string[]\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"roleName\",\"type\":\"string\"},{\"internalType\":\"string[]\",\"name\":\"permissions\",\"type\":\"string[]\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"isSingleToken\",\"type\":\"bool\"},{\"internalType\":\"uint256[]\",\"name\":\"tokenIds\",\"type\":\"uint256[]\"}],\"internalType\":\"structDataTypes.ExternalToken[]\",\"name\":\"tokens\",\"type\":\"tuple[]\"},{\"internalType\":\"address[]\",\"name\":\"users\",\"type\":\"address[]\"}],\"internalType\":\"structDataTypes.CreateSpaceExtraEntitlements\",\"name\":\"_extraEntitlements\",\"type\":\"tuple\"}],\"name\":\"createSpace\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"_spaceAddress\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getOwnerPermissions\",\"outputs\":[{\"internalType\":\"string[]\",\"name\":\"\",\"type\":\"string[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"spaceNetworkId\",\"type\":\"string\"}],\"name\":\"getSpaceAddressByNetworkId\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"spaceNetworkId\",\"type\":\"string\"}],\"name\":\"getTokenIdByNetworkId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_space\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_tokenEntitlement\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_userEntitlement\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_spaceToken\",\"type\":\"address\"},{\"internalType\":\"string[]\",\"name\":\"_permissions\",\"type\":\"string[]\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"ownerPermissions\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"spaceByHash\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"tokenByHash\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_space\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_tokenEntitlement\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_userEntitlement\",\"type\":\"address\"}],\"name\":\"updateImplementations\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}]", +} + +// GoerliSpaceFactoryABI is the input ABI used to generate the binding from. +// Deprecated: Use GoerliSpaceFactoryMetaData.ABI instead. +var GoerliSpaceFactoryABI = GoerliSpaceFactoryMetaData.ABI + +// GoerliSpaceFactory is an auto generated Go binding around an Ethereum contract. +type GoerliSpaceFactory struct { + GoerliSpaceFactoryCaller // Read-only binding to the contract + GoerliSpaceFactoryTransactor // Write-only binding to the contract + GoerliSpaceFactoryFilterer // Log filterer for contract events +} + +// GoerliSpaceFactoryCaller is an auto generated read-only Go binding around an Ethereum contract. +type GoerliSpaceFactoryCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// GoerliSpaceFactoryTransactor is an auto generated write-only Go binding around an Ethereum contract. +type GoerliSpaceFactoryTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// GoerliSpaceFactoryFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type GoerliSpaceFactoryFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// GoerliSpaceFactorySession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type GoerliSpaceFactorySession struct { + Contract *GoerliSpaceFactory // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// GoerliSpaceFactoryCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type GoerliSpaceFactoryCallerSession struct { + Contract *GoerliSpaceFactoryCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// GoerliSpaceFactoryTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type GoerliSpaceFactoryTransactorSession struct { + Contract *GoerliSpaceFactoryTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// GoerliSpaceFactoryRaw is an auto generated low-level Go binding around an Ethereum contract. +type GoerliSpaceFactoryRaw struct { + Contract *GoerliSpaceFactory // Generic contract binding to access the raw methods on +} + +// GoerliSpaceFactoryCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type GoerliSpaceFactoryCallerRaw struct { + Contract *GoerliSpaceFactoryCaller // Generic read-only contract binding to access the raw methods on +} + +// GoerliSpaceFactoryTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type GoerliSpaceFactoryTransactorRaw struct { + Contract *GoerliSpaceFactoryTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewGoerliSpaceFactory creates a new instance of GoerliSpaceFactory, bound to a specific deployed contract. +func NewGoerliSpaceFactory(address common.Address, backend bind.ContractBackend) (*GoerliSpaceFactory, error) { + contract, err := bindGoerliSpaceFactory(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &GoerliSpaceFactory{GoerliSpaceFactoryCaller: GoerliSpaceFactoryCaller{contract: contract}, GoerliSpaceFactoryTransactor: GoerliSpaceFactoryTransactor{contract: contract}, GoerliSpaceFactoryFilterer: GoerliSpaceFactoryFilterer{contract: contract}}, nil +} + +// NewGoerliSpaceFactoryCaller creates a new read-only instance of GoerliSpaceFactory, bound to a specific deployed contract. +func NewGoerliSpaceFactoryCaller(address common.Address, caller bind.ContractCaller) (*GoerliSpaceFactoryCaller, error) { + contract, err := bindGoerliSpaceFactory(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &GoerliSpaceFactoryCaller{contract: contract}, nil +} + +// NewGoerliSpaceFactoryTransactor creates a new write-only instance of GoerliSpaceFactory, bound to a specific deployed contract. +func NewGoerliSpaceFactoryTransactor(address common.Address, transactor bind.ContractTransactor) (*GoerliSpaceFactoryTransactor, error) { + contract, err := bindGoerliSpaceFactory(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &GoerliSpaceFactoryTransactor{contract: contract}, nil +} + +// NewGoerliSpaceFactoryFilterer creates a new log filterer instance of GoerliSpaceFactory, bound to a specific deployed contract. +func NewGoerliSpaceFactoryFilterer(address common.Address, filterer bind.ContractFilterer) (*GoerliSpaceFactoryFilterer, error) { + contract, err := bindGoerliSpaceFactory(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &GoerliSpaceFactoryFilterer{contract: contract}, nil +} + +// bindGoerliSpaceFactory binds a generic wrapper to an already deployed contract. +func bindGoerliSpaceFactory(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(GoerliSpaceFactoryABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_GoerliSpaceFactory *GoerliSpaceFactoryRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _GoerliSpaceFactory.Contract.GoerliSpaceFactoryCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_GoerliSpaceFactory *GoerliSpaceFactoryRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _GoerliSpaceFactory.Contract.GoerliSpaceFactoryTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_GoerliSpaceFactory *GoerliSpaceFactoryRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _GoerliSpaceFactory.Contract.GoerliSpaceFactoryTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_GoerliSpaceFactory *GoerliSpaceFactoryCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _GoerliSpaceFactory.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_GoerliSpaceFactory *GoerliSpaceFactoryTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _GoerliSpaceFactory.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_GoerliSpaceFactory *GoerliSpaceFactoryTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _GoerliSpaceFactory.Contract.contract.Transact(opts, method, params...) +} + +// SPACEIMPLEMENTATIONADDRESS is a free data retrieval call binding the contract method 0xf21cd401. +// +// Solidity: function SPACE_IMPLEMENTATION_ADDRESS() view returns(address) +func (_GoerliSpaceFactory *GoerliSpaceFactoryCaller) SPACEIMPLEMENTATIONADDRESS(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _GoerliSpaceFactory.contract.Call(opts, &out, "SPACE_IMPLEMENTATION_ADDRESS") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// SPACEIMPLEMENTATIONADDRESS is a free data retrieval call binding the contract method 0xf21cd401. +// +// Solidity: function SPACE_IMPLEMENTATION_ADDRESS() view returns(address) +func (_GoerliSpaceFactory *GoerliSpaceFactorySession) SPACEIMPLEMENTATIONADDRESS() (common.Address, error) { + return _GoerliSpaceFactory.Contract.SPACEIMPLEMENTATIONADDRESS(&_GoerliSpaceFactory.CallOpts) +} + +// SPACEIMPLEMENTATIONADDRESS is a free data retrieval call binding the contract method 0xf21cd401. +// +// Solidity: function SPACE_IMPLEMENTATION_ADDRESS() view returns(address) +func (_GoerliSpaceFactory *GoerliSpaceFactoryCallerSession) SPACEIMPLEMENTATIONADDRESS() (common.Address, error) { + return _GoerliSpaceFactory.Contract.SPACEIMPLEMENTATIONADDRESS(&_GoerliSpaceFactory.CallOpts) +} + +// SPACETOKENADDRESS is a free data retrieval call binding the contract method 0x683c72b6. +// +// Solidity: function SPACE_TOKEN_ADDRESS() view returns(address) +func (_GoerliSpaceFactory *GoerliSpaceFactoryCaller) SPACETOKENADDRESS(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _GoerliSpaceFactory.contract.Call(opts, &out, "SPACE_TOKEN_ADDRESS") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// SPACETOKENADDRESS is a free data retrieval call binding the contract method 0x683c72b6. +// +// Solidity: function SPACE_TOKEN_ADDRESS() view returns(address) +func (_GoerliSpaceFactory *GoerliSpaceFactorySession) SPACETOKENADDRESS() (common.Address, error) { + return _GoerliSpaceFactory.Contract.SPACETOKENADDRESS(&_GoerliSpaceFactory.CallOpts) +} + +// SPACETOKENADDRESS is a free data retrieval call binding the contract method 0x683c72b6. +// +// Solidity: function SPACE_TOKEN_ADDRESS() view returns(address) +func (_GoerliSpaceFactory *GoerliSpaceFactoryCallerSession) SPACETOKENADDRESS() (common.Address, error) { + return _GoerliSpaceFactory.Contract.SPACETOKENADDRESS(&_GoerliSpaceFactory.CallOpts) +} + +// TOKENIMPLEMENTATIONADDRESS is a free data retrieval call binding the contract method 0xcfc27037. +// +// Solidity: function TOKEN_IMPLEMENTATION_ADDRESS() view returns(address) +func (_GoerliSpaceFactory *GoerliSpaceFactoryCaller) TOKENIMPLEMENTATIONADDRESS(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _GoerliSpaceFactory.contract.Call(opts, &out, "TOKEN_IMPLEMENTATION_ADDRESS") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// TOKENIMPLEMENTATIONADDRESS is a free data retrieval call binding the contract method 0xcfc27037. +// +// Solidity: function TOKEN_IMPLEMENTATION_ADDRESS() view returns(address) +func (_GoerliSpaceFactory *GoerliSpaceFactorySession) TOKENIMPLEMENTATIONADDRESS() (common.Address, error) { + return _GoerliSpaceFactory.Contract.TOKENIMPLEMENTATIONADDRESS(&_GoerliSpaceFactory.CallOpts) +} + +// TOKENIMPLEMENTATIONADDRESS is a free data retrieval call binding the contract method 0xcfc27037. +// +// Solidity: function TOKEN_IMPLEMENTATION_ADDRESS() view returns(address) +func (_GoerliSpaceFactory *GoerliSpaceFactoryCallerSession) TOKENIMPLEMENTATIONADDRESS() (common.Address, error) { + return _GoerliSpaceFactory.Contract.TOKENIMPLEMENTATIONADDRESS(&_GoerliSpaceFactory.CallOpts) +} + +// USERIMPLEMENTATIONADDRESS is a free data retrieval call binding the contract method 0x08bc0b4b. +// +// Solidity: function USER_IMPLEMENTATION_ADDRESS() view returns(address) +func (_GoerliSpaceFactory *GoerliSpaceFactoryCaller) USERIMPLEMENTATIONADDRESS(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _GoerliSpaceFactory.contract.Call(opts, &out, "USER_IMPLEMENTATION_ADDRESS") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// USERIMPLEMENTATIONADDRESS is a free data retrieval call binding the contract method 0x08bc0b4b. +// +// Solidity: function USER_IMPLEMENTATION_ADDRESS() view returns(address) +func (_GoerliSpaceFactory *GoerliSpaceFactorySession) USERIMPLEMENTATIONADDRESS() (common.Address, error) { + return _GoerliSpaceFactory.Contract.USERIMPLEMENTATIONADDRESS(&_GoerliSpaceFactory.CallOpts) +} + +// USERIMPLEMENTATIONADDRESS is a free data retrieval call binding the contract method 0x08bc0b4b. +// +// Solidity: function USER_IMPLEMENTATION_ADDRESS() view returns(address) +func (_GoerliSpaceFactory *GoerliSpaceFactoryCallerSession) USERIMPLEMENTATIONADDRESS() (common.Address, error) { + return _GoerliSpaceFactory.Contract.USERIMPLEMENTATIONADDRESS(&_GoerliSpaceFactory.CallOpts) +} + +// GetOwnerPermissions is a free data retrieval call binding the contract method 0xdf2cd9fe. +// +// Solidity: function getOwnerPermissions() view returns(string[]) +func (_GoerliSpaceFactory *GoerliSpaceFactoryCaller) GetOwnerPermissions(opts *bind.CallOpts) ([]string, error) { + var out []interface{} + err := _GoerliSpaceFactory.contract.Call(opts, &out, "getOwnerPermissions") + + if err != nil { + return *new([]string), err + } + + out0 := *abi.ConvertType(out[0], new([]string)).(*[]string) + + return out0, err + +} + +// GetOwnerPermissions is a free data retrieval call binding the contract method 0xdf2cd9fe. +// +// Solidity: function getOwnerPermissions() view returns(string[]) +func (_GoerliSpaceFactory *GoerliSpaceFactorySession) GetOwnerPermissions() ([]string, error) { + return _GoerliSpaceFactory.Contract.GetOwnerPermissions(&_GoerliSpaceFactory.CallOpts) +} + +// GetOwnerPermissions is a free data retrieval call binding the contract method 0xdf2cd9fe. +// +// Solidity: function getOwnerPermissions() view returns(string[]) +func (_GoerliSpaceFactory *GoerliSpaceFactoryCallerSession) GetOwnerPermissions() ([]string, error) { + return _GoerliSpaceFactory.Contract.GetOwnerPermissions(&_GoerliSpaceFactory.CallOpts) +} + +// GetSpaceAddressByNetworkId is a free data retrieval call binding the contract method 0x96dc21e4. +// +// Solidity: function getSpaceAddressByNetworkId(string spaceNetworkId) view returns(address) +func (_GoerliSpaceFactory *GoerliSpaceFactoryCaller) GetSpaceAddressByNetworkId(opts *bind.CallOpts, spaceNetworkId string) (common.Address, error) { + var out []interface{} + err := _GoerliSpaceFactory.contract.Call(opts, &out, "getSpaceAddressByNetworkId", spaceNetworkId) + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// GetSpaceAddressByNetworkId is a free data retrieval call binding the contract method 0x96dc21e4. +// +// Solidity: function getSpaceAddressByNetworkId(string spaceNetworkId) view returns(address) +func (_GoerliSpaceFactory *GoerliSpaceFactorySession) GetSpaceAddressByNetworkId(spaceNetworkId string) (common.Address, error) { + return _GoerliSpaceFactory.Contract.GetSpaceAddressByNetworkId(&_GoerliSpaceFactory.CallOpts, spaceNetworkId) +} + +// GetSpaceAddressByNetworkId is a free data retrieval call binding the contract method 0x96dc21e4. +// +// Solidity: function getSpaceAddressByNetworkId(string spaceNetworkId) view returns(address) +func (_GoerliSpaceFactory *GoerliSpaceFactoryCallerSession) GetSpaceAddressByNetworkId(spaceNetworkId string) (common.Address, error) { + return _GoerliSpaceFactory.Contract.GetSpaceAddressByNetworkId(&_GoerliSpaceFactory.CallOpts, spaceNetworkId) +} + +// GetTokenIdByNetworkId is a free data retrieval call binding the contract method 0x8a9ef426. +// +// Solidity: function getTokenIdByNetworkId(string spaceNetworkId) view returns(uint256) +func (_GoerliSpaceFactory *GoerliSpaceFactoryCaller) GetTokenIdByNetworkId(opts *bind.CallOpts, spaceNetworkId string) (*big.Int, error) { + var out []interface{} + err := _GoerliSpaceFactory.contract.Call(opts, &out, "getTokenIdByNetworkId", spaceNetworkId) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetTokenIdByNetworkId is a free data retrieval call binding the contract method 0x8a9ef426. +// +// Solidity: function getTokenIdByNetworkId(string spaceNetworkId) view returns(uint256) +func (_GoerliSpaceFactory *GoerliSpaceFactorySession) GetTokenIdByNetworkId(spaceNetworkId string) (*big.Int, error) { + return _GoerliSpaceFactory.Contract.GetTokenIdByNetworkId(&_GoerliSpaceFactory.CallOpts, spaceNetworkId) +} + +// GetTokenIdByNetworkId is a free data retrieval call binding the contract method 0x8a9ef426. +// +// Solidity: function getTokenIdByNetworkId(string spaceNetworkId) view returns(uint256) +func (_GoerliSpaceFactory *GoerliSpaceFactoryCallerSession) GetTokenIdByNetworkId(spaceNetworkId string) (*big.Int, error) { + return _GoerliSpaceFactory.Contract.GetTokenIdByNetworkId(&_GoerliSpaceFactory.CallOpts, spaceNetworkId) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_GoerliSpaceFactory *GoerliSpaceFactoryCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _GoerliSpaceFactory.contract.Call(opts, &out, "owner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_GoerliSpaceFactory *GoerliSpaceFactorySession) Owner() (common.Address, error) { + return _GoerliSpaceFactory.Contract.Owner(&_GoerliSpaceFactory.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_GoerliSpaceFactory *GoerliSpaceFactoryCallerSession) Owner() (common.Address, error) { + return _GoerliSpaceFactory.Contract.Owner(&_GoerliSpaceFactory.CallOpts) +} + +// OwnerPermissions is a free data retrieval call binding the contract method 0xb28032f9. +// +// Solidity: function ownerPermissions(uint256 ) view returns(string) +func (_GoerliSpaceFactory *GoerliSpaceFactoryCaller) OwnerPermissions(opts *bind.CallOpts, arg0 *big.Int) (string, error) { + var out []interface{} + err := _GoerliSpaceFactory.contract.Call(opts, &out, "ownerPermissions", arg0) + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// OwnerPermissions is a free data retrieval call binding the contract method 0xb28032f9. +// +// Solidity: function ownerPermissions(uint256 ) view returns(string) +func (_GoerliSpaceFactory *GoerliSpaceFactorySession) OwnerPermissions(arg0 *big.Int) (string, error) { + return _GoerliSpaceFactory.Contract.OwnerPermissions(&_GoerliSpaceFactory.CallOpts, arg0) +} + +// OwnerPermissions is a free data retrieval call binding the contract method 0xb28032f9. +// +// Solidity: function ownerPermissions(uint256 ) view returns(string) +func (_GoerliSpaceFactory *GoerliSpaceFactoryCallerSession) OwnerPermissions(arg0 *big.Int) (string, error) { + return _GoerliSpaceFactory.Contract.OwnerPermissions(&_GoerliSpaceFactory.CallOpts, arg0) +} + +// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (_GoerliSpaceFactory *GoerliSpaceFactoryCaller) ProxiableUUID(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _GoerliSpaceFactory.contract.Call(opts, &out, "proxiableUUID") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (_GoerliSpaceFactory *GoerliSpaceFactorySession) ProxiableUUID() ([32]byte, error) { + return _GoerliSpaceFactory.Contract.ProxiableUUID(&_GoerliSpaceFactory.CallOpts) +} + +// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (_GoerliSpaceFactory *GoerliSpaceFactoryCallerSession) ProxiableUUID() ([32]byte, error) { + return _GoerliSpaceFactory.Contract.ProxiableUUID(&_GoerliSpaceFactory.CallOpts) +} + +// SpaceByHash is a free data retrieval call binding the contract method 0x3312540a. +// +// Solidity: function spaceByHash(bytes32 ) view returns(address) +func (_GoerliSpaceFactory *GoerliSpaceFactoryCaller) SpaceByHash(opts *bind.CallOpts, arg0 [32]byte) (common.Address, error) { + var out []interface{} + err := _GoerliSpaceFactory.contract.Call(opts, &out, "spaceByHash", arg0) + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// SpaceByHash is a free data retrieval call binding the contract method 0x3312540a. +// +// Solidity: function spaceByHash(bytes32 ) view returns(address) +func (_GoerliSpaceFactory *GoerliSpaceFactorySession) SpaceByHash(arg0 [32]byte) (common.Address, error) { + return _GoerliSpaceFactory.Contract.SpaceByHash(&_GoerliSpaceFactory.CallOpts, arg0) +} + +// SpaceByHash is a free data retrieval call binding the contract method 0x3312540a. +// +// Solidity: function spaceByHash(bytes32 ) view returns(address) +func (_GoerliSpaceFactory *GoerliSpaceFactoryCallerSession) SpaceByHash(arg0 [32]byte) (common.Address, error) { + return _GoerliSpaceFactory.Contract.SpaceByHash(&_GoerliSpaceFactory.CallOpts, arg0) +} + +// TokenByHash is a free data retrieval call binding the contract method 0xf3aba305. +// +// Solidity: function tokenByHash(bytes32 ) view returns(uint256) +func (_GoerliSpaceFactory *GoerliSpaceFactoryCaller) TokenByHash(opts *bind.CallOpts, arg0 [32]byte) (*big.Int, error) { + var out []interface{} + err := _GoerliSpaceFactory.contract.Call(opts, &out, "tokenByHash", arg0) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// TokenByHash is a free data retrieval call binding the contract method 0xf3aba305. +// +// Solidity: function tokenByHash(bytes32 ) view returns(uint256) +func (_GoerliSpaceFactory *GoerliSpaceFactorySession) TokenByHash(arg0 [32]byte) (*big.Int, error) { + return _GoerliSpaceFactory.Contract.TokenByHash(&_GoerliSpaceFactory.CallOpts, arg0) +} + +// TokenByHash is a free data retrieval call binding the contract method 0xf3aba305. +// +// Solidity: function tokenByHash(bytes32 ) view returns(uint256) +func (_GoerliSpaceFactory *GoerliSpaceFactoryCallerSession) TokenByHash(arg0 [32]byte) (*big.Int, error) { + return _GoerliSpaceFactory.Contract.TokenByHash(&_GoerliSpaceFactory.CallOpts, arg0) +} + +// AddOwnerPermissions is a paid mutator transaction binding the contract method 0xbe8b5967. +// +// Solidity: function addOwnerPermissions(string[] _permissions) returns() +func (_GoerliSpaceFactory *GoerliSpaceFactoryTransactor) AddOwnerPermissions(opts *bind.TransactOpts, _permissions []string) (*types.Transaction, error) { + return _GoerliSpaceFactory.contract.Transact(opts, "addOwnerPermissions", _permissions) +} + +// AddOwnerPermissions is a paid mutator transaction binding the contract method 0xbe8b5967. +// +// Solidity: function addOwnerPermissions(string[] _permissions) returns() +func (_GoerliSpaceFactory *GoerliSpaceFactorySession) AddOwnerPermissions(_permissions []string) (*types.Transaction, error) { + return _GoerliSpaceFactory.Contract.AddOwnerPermissions(&_GoerliSpaceFactory.TransactOpts, _permissions) +} + +// AddOwnerPermissions is a paid mutator transaction binding the contract method 0xbe8b5967. +// +// Solidity: function addOwnerPermissions(string[] _permissions) returns() +func (_GoerliSpaceFactory *GoerliSpaceFactoryTransactorSession) AddOwnerPermissions(_permissions []string) (*types.Transaction, error) { + return _GoerliSpaceFactory.Contract.AddOwnerPermissions(&_GoerliSpaceFactory.TransactOpts, _permissions) +} + +// CreateSpace is a paid mutator transaction binding the contract method 0xad78faf3. +// +// Solidity: function createSpace(string spaceName, string spaceNetworkId, string spaceMetadata, string[] _everyonePermissions, (string,string[],(address,uint256,bool,uint256[])[],address[]) _extraEntitlements) returns(address _spaceAddress) +func (_GoerliSpaceFactory *GoerliSpaceFactoryTransactor) CreateSpace(opts *bind.TransactOpts, spaceName string, spaceNetworkId string, spaceMetadata string, _everyonePermissions []string, _extraEntitlements DataTypesCreateSpaceExtraEntitlements) (*types.Transaction, error) { + return _GoerliSpaceFactory.contract.Transact(opts, "createSpace", spaceName, spaceNetworkId, spaceMetadata, _everyonePermissions, _extraEntitlements) +} + +// CreateSpace is a paid mutator transaction binding the contract method 0xad78faf3. +// +// Solidity: function createSpace(string spaceName, string spaceNetworkId, string spaceMetadata, string[] _everyonePermissions, (string,string[],(address,uint256,bool,uint256[])[],address[]) _extraEntitlements) returns(address _spaceAddress) +func (_GoerliSpaceFactory *GoerliSpaceFactorySession) CreateSpace(spaceName string, spaceNetworkId string, spaceMetadata string, _everyonePermissions []string, _extraEntitlements DataTypesCreateSpaceExtraEntitlements) (*types.Transaction, error) { + return _GoerliSpaceFactory.Contract.CreateSpace(&_GoerliSpaceFactory.TransactOpts, spaceName, spaceNetworkId, spaceMetadata, _everyonePermissions, _extraEntitlements) +} + +// CreateSpace is a paid mutator transaction binding the contract method 0xad78faf3. +// +// Solidity: function createSpace(string spaceName, string spaceNetworkId, string spaceMetadata, string[] _everyonePermissions, (string,string[],(address,uint256,bool,uint256[])[],address[]) _extraEntitlements) returns(address _spaceAddress) +func (_GoerliSpaceFactory *GoerliSpaceFactoryTransactorSession) CreateSpace(spaceName string, spaceNetworkId string, spaceMetadata string, _everyonePermissions []string, _extraEntitlements DataTypesCreateSpaceExtraEntitlements) (*types.Transaction, error) { + return _GoerliSpaceFactory.Contract.CreateSpace(&_GoerliSpaceFactory.TransactOpts, spaceName, spaceNetworkId, spaceMetadata, _everyonePermissions, _extraEntitlements) +} + +// Initialize is a paid mutator transaction binding the contract method 0x45bfa5b1. +// +// Solidity: function initialize(address _space, address _tokenEntitlement, address _userEntitlement, address _spaceToken, string[] _permissions) returns() +func (_GoerliSpaceFactory *GoerliSpaceFactoryTransactor) Initialize(opts *bind.TransactOpts, _space common.Address, _tokenEntitlement common.Address, _userEntitlement common.Address, _spaceToken common.Address, _permissions []string) (*types.Transaction, error) { + return _GoerliSpaceFactory.contract.Transact(opts, "initialize", _space, _tokenEntitlement, _userEntitlement, _spaceToken, _permissions) +} + +// Initialize is a paid mutator transaction binding the contract method 0x45bfa5b1. +// +// Solidity: function initialize(address _space, address _tokenEntitlement, address _userEntitlement, address _spaceToken, string[] _permissions) returns() +func (_GoerliSpaceFactory *GoerliSpaceFactorySession) Initialize(_space common.Address, _tokenEntitlement common.Address, _userEntitlement common.Address, _spaceToken common.Address, _permissions []string) (*types.Transaction, error) { + return _GoerliSpaceFactory.Contract.Initialize(&_GoerliSpaceFactory.TransactOpts, _space, _tokenEntitlement, _userEntitlement, _spaceToken, _permissions) +} + +// Initialize is a paid mutator transaction binding the contract method 0x45bfa5b1. +// +// Solidity: function initialize(address _space, address _tokenEntitlement, address _userEntitlement, address _spaceToken, string[] _permissions) returns() +func (_GoerliSpaceFactory *GoerliSpaceFactoryTransactorSession) Initialize(_space common.Address, _tokenEntitlement common.Address, _userEntitlement common.Address, _spaceToken common.Address, _permissions []string) (*types.Transaction, error) { + return _GoerliSpaceFactory.Contract.Initialize(&_GoerliSpaceFactory.TransactOpts, _space, _tokenEntitlement, _userEntitlement, _spaceToken, _permissions) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_GoerliSpaceFactory *GoerliSpaceFactoryTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _GoerliSpaceFactory.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_GoerliSpaceFactory *GoerliSpaceFactorySession) RenounceOwnership() (*types.Transaction, error) { + return _GoerliSpaceFactory.Contract.RenounceOwnership(&_GoerliSpaceFactory.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_GoerliSpaceFactory *GoerliSpaceFactoryTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _GoerliSpaceFactory.Contract.RenounceOwnership(&_GoerliSpaceFactory.TransactOpts) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_GoerliSpaceFactory *GoerliSpaceFactoryTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _GoerliSpaceFactory.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_GoerliSpaceFactory *GoerliSpaceFactorySession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _GoerliSpaceFactory.Contract.TransferOwnership(&_GoerliSpaceFactory.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_GoerliSpaceFactory *GoerliSpaceFactoryTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _GoerliSpaceFactory.Contract.TransferOwnership(&_GoerliSpaceFactory.TransactOpts, newOwner) +} + +// UpdateImplementations is a paid mutator transaction binding the contract method 0xdfc666ff. +// +// Solidity: function updateImplementations(address _space, address _tokenEntitlement, address _userEntitlement) returns() +func (_GoerliSpaceFactory *GoerliSpaceFactoryTransactor) UpdateImplementations(opts *bind.TransactOpts, _space common.Address, _tokenEntitlement common.Address, _userEntitlement common.Address) (*types.Transaction, error) { + return _GoerliSpaceFactory.contract.Transact(opts, "updateImplementations", _space, _tokenEntitlement, _userEntitlement) +} + +// UpdateImplementations is a paid mutator transaction binding the contract method 0xdfc666ff. +// +// Solidity: function updateImplementations(address _space, address _tokenEntitlement, address _userEntitlement) returns() +func (_GoerliSpaceFactory *GoerliSpaceFactorySession) UpdateImplementations(_space common.Address, _tokenEntitlement common.Address, _userEntitlement common.Address) (*types.Transaction, error) { + return _GoerliSpaceFactory.Contract.UpdateImplementations(&_GoerliSpaceFactory.TransactOpts, _space, _tokenEntitlement, _userEntitlement) +} + +// UpdateImplementations is a paid mutator transaction binding the contract method 0xdfc666ff. +// +// Solidity: function updateImplementations(address _space, address _tokenEntitlement, address _userEntitlement) returns() +func (_GoerliSpaceFactory *GoerliSpaceFactoryTransactorSession) UpdateImplementations(_space common.Address, _tokenEntitlement common.Address, _userEntitlement common.Address) (*types.Transaction, error) { + return _GoerliSpaceFactory.Contract.UpdateImplementations(&_GoerliSpaceFactory.TransactOpts, _space, _tokenEntitlement, _userEntitlement) +} + +// UpgradeTo is a paid mutator transaction binding the contract method 0x3659cfe6. +// +// Solidity: function upgradeTo(address newImplementation) returns() +func (_GoerliSpaceFactory *GoerliSpaceFactoryTransactor) UpgradeTo(opts *bind.TransactOpts, newImplementation common.Address) (*types.Transaction, error) { + return _GoerliSpaceFactory.contract.Transact(opts, "upgradeTo", newImplementation) +} + +// UpgradeTo is a paid mutator transaction binding the contract method 0x3659cfe6. +// +// Solidity: function upgradeTo(address newImplementation) returns() +func (_GoerliSpaceFactory *GoerliSpaceFactorySession) UpgradeTo(newImplementation common.Address) (*types.Transaction, error) { + return _GoerliSpaceFactory.Contract.UpgradeTo(&_GoerliSpaceFactory.TransactOpts, newImplementation) +} + +// UpgradeTo is a paid mutator transaction binding the contract method 0x3659cfe6. +// +// Solidity: function upgradeTo(address newImplementation) returns() +func (_GoerliSpaceFactory *GoerliSpaceFactoryTransactorSession) UpgradeTo(newImplementation common.Address) (*types.Transaction, error) { + return _GoerliSpaceFactory.Contract.UpgradeTo(&_GoerliSpaceFactory.TransactOpts, newImplementation) +} + +// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286. +// +// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns() +func (_GoerliSpaceFactory *GoerliSpaceFactoryTransactor) UpgradeToAndCall(opts *bind.TransactOpts, newImplementation common.Address, data []byte) (*types.Transaction, error) { + return _GoerliSpaceFactory.contract.Transact(opts, "upgradeToAndCall", newImplementation, data) +} + +// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286. +// +// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns() +func (_GoerliSpaceFactory *GoerliSpaceFactorySession) UpgradeToAndCall(newImplementation common.Address, data []byte) (*types.Transaction, error) { + return _GoerliSpaceFactory.Contract.UpgradeToAndCall(&_GoerliSpaceFactory.TransactOpts, newImplementation, data) +} + +// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286. +// +// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns() +func (_GoerliSpaceFactory *GoerliSpaceFactoryTransactorSession) UpgradeToAndCall(newImplementation common.Address, data []byte) (*types.Transaction, error) { + return _GoerliSpaceFactory.Contract.UpgradeToAndCall(&_GoerliSpaceFactory.TransactOpts, newImplementation, data) +} + +// GoerliSpaceFactoryAdminChangedIterator is returned from FilterAdminChanged and is used to iterate over the raw logs and unpacked data for AdminChanged events raised by the GoerliSpaceFactory contract. +type GoerliSpaceFactoryAdminChangedIterator struct { + Event *GoerliSpaceFactoryAdminChanged // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *GoerliSpaceFactoryAdminChangedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(GoerliSpaceFactoryAdminChanged) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(GoerliSpaceFactoryAdminChanged) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *GoerliSpaceFactoryAdminChangedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *GoerliSpaceFactoryAdminChangedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// GoerliSpaceFactoryAdminChanged represents a AdminChanged event raised by the GoerliSpaceFactory contract. +type GoerliSpaceFactoryAdminChanged struct { + PreviousAdmin common.Address + NewAdmin common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterAdminChanged is a free log retrieval operation binding the contract event 0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f. +// +// Solidity: event AdminChanged(address previousAdmin, address newAdmin) +func (_GoerliSpaceFactory *GoerliSpaceFactoryFilterer) FilterAdminChanged(opts *bind.FilterOpts) (*GoerliSpaceFactoryAdminChangedIterator, error) { + + logs, sub, err := _GoerliSpaceFactory.contract.FilterLogs(opts, "AdminChanged") + if err != nil { + return nil, err + } + return &GoerliSpaceFactoryAdminChangedIterator{contract: _GoerliSpaceFactory.contract, event: "AdminChanged", logs: logs, sub: sub}, nil +} + +// WatchAdminChanged is a free log subscription operation binding the contract event 0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f. +// +// Solidity: event AdminChanged(address previousAdmin, address newAdmin) +func (_GoerliSpaceFactory *GoerliSpaceFactoryFilterer) WatchAdminChanged(opts *bind.WatchOpts, sink chan<- *GoerliSpaceFactoryAdminChanged) (event.Subscription, error) { + + logs, sub, err := _GoerliSpaceFactory.contract.WatchLogs(opts, "AdminChanged") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(GoerliSpaceFactoryAdminChanged) + if err := _GoerliSpaceFactory.contract.UnpackLog(event, "AdminChanged", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseAdminChanged is a log parse operation binding the contract event 0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f. +// +// Solidity: event AdminChanged(address previousAdmin, address newAdmin) +func (_GoerliSpaceFactory *GoerliSpaceFactoryFilterer) ParseAdminChanged(log types.Log) (*GoerliSpaceFactoryAdminChanged, error) { + event := new(GoerliSpaceFactoryAdminChanged) + if err := _GoerliSpaceFactory.contract.UnpackLog(event, "AdminChanged", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// GoerliSpaceFactoryBeaconUpgradedIterator is returned from FilterBeaconUpgraded and is used to iterate over the raw logs and unpacked data for BeaconUpgraded events raised by the GoerliSpaceFactory contract. +type GoerliSpaceFactoryBeaconUpgradedIterator struct { + Event *GoerliSpaceFactoryBeaconUpgraded // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *GoerliSpaceFactoryBeaconUpgradedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(GoerliSpaceFactoryBeaconUpgraded) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(GoerliSpaceFactoryBeaconUpgraded) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *GoerliSpaceFactoryBeaconUpgradedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *GoerliSpaceFactoryBeaconUpgradedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// GoerliSpaceFactoryBeaconUpgraded represents a BeaconUpgraded event raised by the GoerliSpaceFactory contract. +type GoerliSpaceFactoryBeaconUpgraded struct { + Beacon common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterBeaconUpgraded is a free log retrieval operation binding the contract event 0x1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e. +// +// Solidity: event BeaconUpgraded(address indexed beacon) +func (_GoerliSpaceFactory *GoerliSpaceFactoryFilterer) FilterBeaconUpgraded(opts *bind.FilterOpts, beacon []common.Address) (*GoerliSpaceFactoryBeaconUpgradedIterator, error) { + + var beaconRule []interface{} + for _, beaconItem := range beacon { + beaconRule = append(beaconRule, beaconItem) + } + + logs, sub, err := _GoerliSpaceFactory.contract.FilterLogs(opts, "BeaconUpgraded", beaconRule) + if err != nil { + return nil, err + } + return &GoerliSpaceFactoryBeaconUpgradedIterator{contract: _GoerliSpaceFactory.contract, event: "BeaconUpgraded", logs: logs, sub: sub}, nil +} + +// WatchBeaconUpgraded is a free log subscription operation binding the contract event 0x1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e. +// +// Solidity: event BeaconUpgraded(address indexed beacon) +func (_GoerliSpaceFactory *GoerliSpaceFactoryFilterer) WatchBeaconUpgraded(opts *bind.WatchOpts, sink chan<- *GoerliSpaceFactoryBeaconUpgraded, beacon []common.Address) (event.Subscription, error) { + + var beaconRule []interface{} + for _, beaconItem := range beacon { + beaconRule = append(beaconRule, beaconItem) + } + + logs, sub, err := _GoerliSpaceFactory.contract.WatchLogs(opts, "BeaconUpgraded", beaconRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(GoerliSpaceFactoryBeaconUpgraded) + if err := _GoerliSpaceFactory.contract.UnpackLog(event, "BeaconUpgraded", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseBeaconUpgraded is a log parse operation binding the contract event 0x1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e. +// +// Solidity: event BeaconUpgraded(address indexed beacon) +func (_GoerliSpaceFactory *GoerliSpaceFactoryFilterer) ParseBeaconUpgraded(log types.Log) (*GoerliSpaceFactoryBeaconUpgraded, error) { + event := new(GoerliSpaceFactoryBeaconUpgraded) + if err := _GoerliSpaceFactory.contract.UnpackLog(event, "BeaconUpgraded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// GoerliSpaceFactoryInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the GoerliSpaceFactory contract. +type GoerliSpaceFactoryInitializedIterator struct { + Event *GoerliSpaceFactoryInitialized // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *GoerliSpaceFactoryInitializedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(GoerliSpaceFactoryInitialized) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(GoerliSpaceFactoryInitialized) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *GoerliSpaceFactoryInitializedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *GoerliSpaceFactoryInitializedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// GoerliSpaceFactoryInitialized represents a Initialized event raised by the GoerliSpaceFactory contract. +type GoerliSpaceFactoryInitialized struct { + Version uint8 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterInitialized is a free log retrieval operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_GoerliSpaceFactory *GoerliSpaceFactoryFilterer) FilterInitialized(opts *bind.FilterOpts) (*GoerliSpaceFactoryInitializedIterator, error) { + + logs, sub, err := _GoerliSpaceFactory.contract.FilterLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return &GoerliSpaceFactoryInitializedIterator{contract: _GoerliSpaceFactory.contract, event: "Initialized", logs: logs, sub: sub}, nil +} + +// WatchInitialized is a free log subscription operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_GoerliSpaceFactory *GoerliSpaceFactoryFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *GoerliSpaceFactoryInitialized) (event.Subscription, error) { + + logs, sub, err := _GoerliSpaceFactory.contract.WatchLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(GoerliSpaceFactoryInitialized) + if err := _GoerliSpaceFactory.contract.UnpackLog(event, "Initialized", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseInitialized is a log parse operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_GoerliSpaceFactory *GoerliSpaceFactoryFilterer) ParseInitialized(log types.Log) (*GoerliSpaceFactoryInitialized, error) { + event := new(GoerliSpaceFactoryInitialized) + if err := _GoerliSpaceFactory.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// GoerliSpaceFactoryOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the GoerliSpaceFactory contract. +type GoerliSpaceFactoryOwnershipTransferredIterator struct { + Event *GoerliSpaceFactoryOwnershipTransferred // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *GoerliSpaceFactoryOwnershipTransferredIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(GoerliSpaceFactoryOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(GoerliSpaceFactoryOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *GoerliSpaceFactoryOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *GoerliSpaceFactoryOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// GoerliSpaceFactoryOwnershipTransferred represents a OwnershipTransferred event raised by the GoerliSpaceFactory contract. +type GoerliSpaceFactoryOwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_GoerliSpaceFactory *GoerliSpaceFactoryFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*GoerliSpaceFactoryOwnershipTransferredIterator, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _GoerliSpaceFactory.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &GoerliSpaceFactoryOwnershipTransferredIterator{contract: _GoerliSpaceFactory.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_GoerliSpaceFactory *GoerliSpaceFactoryFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *GoerliSpaceFactoryOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _GoerliSpaceFactory.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(GoerliSpaceFactoryOwnershipTransferred) + if err := _GoerliSpaceFactory.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_GoerliSpaceFactory *GoerliSpaceFactoryFilterer) ParseOwnershipTransferred(log types.Log) (*GoerliSpaceFactoryOwnershipTransferred, error) { + event := new(GoerliSpaceFactoryOwnershipTransferred) + if err := _GoerliSpaceFactory.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// GoerliSpaceFactoryUpgradedIterator is returned from FilterUpgraded and is used to iterate over the raw logs and unpacked data for Upgraded events raised by the GoerliSpaceFactory contract. +type GoerliSpaceFactoryUpgradedIterator struct { + Event *GoerliSpaceFactoryUpgraded // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *GoerliSpaceFactoryUpgradedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(GoerliSpaceFactoryUpgraded) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(GoerliSpaceFactoryUpgraded) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *GoerliSpaceFactoryUpgradedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *GoerliSpaceFactoryUpgradedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// GoerliSpaceFactoryUpgraded represents a Upgraded event raised by the GoerliSpaceFactory contract. +type GoerliSpaceFactoryUpgraded struct { + Implementation common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUpgraded is a free log retrieval operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b. +// +// Solidity: event Upgraded(address indexed implementation) +func (_GoerliSpaceFactory *GoerliSpaceFactoryFilterer) FilterUpgraded(opts *bind.FilterOpts, implementation []common.Address) (*GoerliSpaceFactoryUpgradedIterator, error) { + + var implementationRule []interface{} + for _, implementationItem := range implementation { + implementationRule = append(implementationRule, implementationItem) + } + + logs, sub, err := _GoerliSpaceFactory.contract.FilterLogs(opts, "Upgraded", implementationRule) + if err != nil { + return nil, err + } + return &GoerliSpaceFactoryUpgradedIterator{contract: _GoerliSpaceFactory.contract, event: "Upgraded", logs: logs, sub: sub}, nil +} + +// WatchUpgraded is a free log subscription operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b. +// +// Solidity: event Upgraded(address indexed implementation) +func (_GoerliSpaceFactory *GoerliSpaceFactoryFilterer) WatchUpgraded(opts *bind.WatchOpts, sink chan<- *GoerliSpaceFactoryUpgraded, implementation []common.Address) (event.Subscription, error) { + + var implementationRule []interface{} + for _, implementationItem := range implementation { + implementationRule = append(implementationRule, implementationItem) + } + + logs, sub, err := _GoerliSpaceFactory.contract.WatchLogs(opts, "Upgraded", implementationRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(GoerliSpaceFactoryUpgraded) + if err := _GoerliSpaceFactory.contract.UnpackLog(event, "Upgraded", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseUpgraded is a log parse operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b. +// +// Solidity: event Upgraded(address indexed implementation) +func (_GoerliSpaceFactory *GoerliSpaceFactoryFilterer) ParseUpgraded(log types.Log) (*GoerliSpaceFactoryUpgraded, error) { + event := new(GoerliSpaceFactoryUpgraded) + if err := _GoerliSpaceFactory.contract.UnpackLog(event, "Upgraded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/zion/contracts/goerli_space_factory/space-factory.json b/zion/contracts/goerli_space_factory/space-factory.json new file mode 100644 index 000000000..a99aac1f8 --- /dev/null +++ b/zion/contracts/goerli_space_factory/space-factory.json @@ -0,0 +1,4 @@ +{ + "spaceFactory": "0x173b6a4Ec998A0e72656e0fc9Af2408B017C12f9", + "spaceToken": "0xD7efA82c6CEa706B396F4FfA23f0D01726F675cc" +} \ No newline at end of file diff --git a/zion/contracts/localhost_space/localhost_space.go b/zion/contracts/localhost_space/localhost_space.go new file mode 100644 index 000000000..cf8218872 --- /dev/null +++ b/zion/contracts/localhost_space/localhost_space.go @@ -0,0 +1,1959 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package localhost_space + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription +) + +// DataTypesChannel is an auto generated low-level Go binding around an user-defined struct. +type DataTypesChannel struct { + Name string + ChannelId [32]byte + CreatedAt *big.Int + Disabled bool +} + +// DataTypesEntitlement is an auto generated low-level Go binding around an user-defined struct. +type DataTypesEntitlement struct { + Module common.Address + Data []byte +} + +// DataTypesRole is an auto generated low-level Go binding around an user-defined struct. +type DataTypesRole struct { + RoleId *big.Int + Name string +} + +// LocalhostSpaceMetaData contains all meta data concerning the LocalhostSpace contract. +var LocalhostSpaceMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AddRoleFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ChannelAlreadyRegistered\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ChannelDoesNotExist\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"EntitlementAlreadyExists\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"EntitlementAlreadyWhitelisted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"EntitlementModuleNotSupported\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"EntitlementNotWhitelisted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidParameters\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MissingOwnerPermission\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotAllowed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PermissionAlreadyExists\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RoleDoesNotExist\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RoleIsAssignedToEntitlement\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_roleId\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"_permission\",\"type\":\"string\"}],\"name\":\"addPermissionToRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_channelId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"_entitlement\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_roleId\",\"type\":\"uint256\"}],\"name\":\"addRoleToChannel\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_roleId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"module\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"internalType\":\"structDataTypes.Entitlement\",\"name\":\"_entitlement\",\"type\":\"tuple\"}],\"name\":\"addRoleToEntitlement\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"channels\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"channelsByHash\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"bytes32\",\"name\":\"channelId\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"createdAt\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"disabled\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"channelName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"channelNetworkId\",\"type\":\"string\"},{\"internalType\":\"uint256[]\",\"name\":\"roleIds\",\"type\":\"uint256[]\"}],\"name\":\"createChannel\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_roleName\",\"type\":\"string\"},{\"internalType\":\"string[]\",\"name\":\"_permissions\",\"type\":\"string[]\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"module\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"internalType\":\"structDataTypes.Entitlement[]\",\"name\":\"_entitlements\",\"type\":\"tuple[]\"}],\"name\":\"createRole\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"defaultEntitlements\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"disabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"entitlements\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_channelHash\",\"type\":\"bytes32\"}],\"name\":\"getChannelByHash\",\"outputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"bytes32\",\"name\":\"channelId\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"createdAt\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"disabled\",\"type\":\"bool\"}],\"internalType\":\"structDataTypes.Channel\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_moduleType\",\"type\":\"string\"}],\"name\":\"getEntitlementByModuleType\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_roleId\",\"type\":\"uint256\"}],\"name\":\"getEntitlementIdsByRoleId\",\"outputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"\",\"type\":\"bytes32[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getEntitlements\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_roleId\",\"type\":\"uint256\"}],\"name\":\"getPermissionsByRoleId\",\"outputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"\",\"type\":\"bytes32[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_roleId\",\"type\":\"uint256\"}],\"name\":\"getRoleById\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"roleId\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structDataTypes.Role\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRoles\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"roleId\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structDataTypes.Role[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"hasEntitlement\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_networkId\",\"type\":\"string\"},{\"internalType\":\"address[]\",\"name\":\"_entitlements\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_channelId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"_user\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_permission\",\"type\":\"string\"}],\"name\":\"isEntitledToChannel\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"_entitled\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_user\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_permission\",\"type\":\"string\"}],\"name\":\"isEntitledToSpace\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"_entitled\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes[]\",\"name\":\"data\",\"type\":\"bytes[]\"}],\"name\":\"multicall\",\"outputs\":[{\"internalType\":\"bytes[]\",\"name\":\"results\",\"type\":\"bytes[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"networkId\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ownerRoleId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_roleId\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"_permission\",\"type\":\"string\"}],\"name\":\"removePermissionFromRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_roleId\",\"type\":\"uint256\"}],\"name\":\"removeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_channelId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"_entitlement\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_roleId\",\"type\":\"uint256\"}],\"name\":\"removeRoleFromChannel\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_roleId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"module\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"internalType\":\"structDataTypes.Entitlement\",\"name\":\"_entitlement\",\"type\":\"tuple\"}],\"name\":\"removeRoleFromEntitlement\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"roleCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"rolesById\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"roleId\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_channelId\",\"type\":\"string\"},{\"internalType\":\"bool\",\"name\":\"_disabled\",\"type\":\"bool\"}],\"name\":\"setChannelAccess\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_entitlement\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_whitelist\",\"type\":\"bool\"}],\"name\":\"setEntitlement\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_roleId\",\"type\":\"uint256\"}],\"name\":\"setOwnerRoleId\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"_disabled\",\"type\":\"bool\"}],\"name\":\"setSpaceAccess\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"token\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"tokenId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_channelId\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_channelName\",\"type\":\"string\"}],\"name\":\"updateChannel\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_roleId\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"_roleName\",\"type\":\"string\"}],\"name\":\"updateRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_entitlement\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_newEntitlement\",\"type\":\"address\"}],\"name\":\"upgradeEntitlement\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}]", +} + +// LocalhostSpaceABI is the input ABI used to generate the binding from. +// Deprecated: Use LocalhostSpaceMetaData.ABI instead. +var LocalhostSpaceABI = LocalhostSpaceMetaData.ABI + +// LocalhostSpace is an auto generated Go binding around an Ethereum contract. +type LocalhostSpace struct { + LocalhostSpaceCaller // Read-only binding to the contract + LocalhostSpaceTransactor // Write-only binding to the contract + LocalhostSpaceFilterer // Log filterer for contract events +} + +// LocalhostSpaceCaller is an auto generated read-only Go binding around an Ethereum contract. +type LocalhostSpaceCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// LocalhostSpaceTransactor is an auto generated write-only Go binding around an Ethereum contract. +type LocalhostSpaceTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// LocalhostSpaceFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type LocalhostSpaceFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// LocalhostSpaceSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type LocalhostSpaceSession struct { + Contract *LocalhostSpace // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// LocalhostSpaceCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type LocalhostSpaceCallerSession struct { + Contract *LocalhostSpaceCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// LocalhostSpaceTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type LocalhostSpaceTransactorSession struct { + Contract *LocalhostSpaceTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// LocalhostSpaceRaw is an auto generated low-level Go binding around an Ethereum contract. +type LocalhostSpaceRaw struct { + Contract *LocalhostSpace // Generic contract binding to access the raw methods on +} + +// LocalhostSpaceCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type LocalhostSpaceCallerRaw struct { + Contract *LocalhostSpaceCaller // Generic read-only contract binding to access the raw methods on +} + +// LocalhostSpaceTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type LocalhostSpaceTransactorRaw struct { + Contract *LocalhostSpaceTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewLocalhostSpace creates a new instance of LocalhostSpace, bound to a specific deployed contract. +func NewLocalhostSpace(address common.Address, backend bind.ContractBackend) (*LocalhostSpace, error) { + contract, err := bindLocalhostSpace(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &LocalhostSpace{LocalhostSpaceCaller: LocalhostSpaceCaller{contract: contract}, LocalhostSpaceTransactor: LocalhostSpaceTransactor{contract: contract}, LocalhostSpaceFilterer: LocalhostSpaceFilterer{contract: contract}}, nil +} + +// NewLocalhostSpaceCaller creates a new read-only instance of LocalhostSpace, bound to a specific deployed contract. +func NewLocalhostSpaceCaller(address common.Address, caller bind.ContractCaller) (*LocalhostSpaceCaller, error) { + contract, err := bindLocalhostSpace(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &LocalhostSpaceCaller{contract: contract}, nil +} + +// NewLocalhostSpaceTransactor creates a new write-only instance of LocalhostSpace, bound to a specific deployed contract. +func NewLocalhostSpaceTransactor(address common.Address, transactor bind.ContractTransactor) (*LocalhostSpaceTransactor, error) { + contract, err := bindLocalhostSpace(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &LocalhostSpaceTransactor{contract: contract}, nil +} + +// NewLocalhostSpaceFilterer creates a new log filterer instance of LocalhostSpace, bound to a specific deployed contract. +func NewLocalhostSpaceFilterer(address common.Address, filterer bind.ContractFilterer) (*LocalhostSpaceFilterer, error) { + contract, err := bindLocalhostSpace(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &LocalhostSpaceFilterer{contract: contract}, nil +} + +// bindLocalhostSpace binds a generic wrapper to an already deployed contract. +func bindLocalhostSpace(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(LocalhostSpaceABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_LocalhostSpace *LocalhostSpaceRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _LocalhostSpace.Contract.LocalhostSpaceCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_LocalhostSpace *LocalhostSpaceRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _LocalhostSpace.Contract.LocalhostSpaceTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_LocalhostSpace *LocalhostSpaceRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _LocalhostSpace.Contract.LocalhostSpaceTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_LocalhostSpace *LocalhostSpaceCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _LocalhostSpace.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_LocalhostSpace *LocalhostSpaceTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _LocalhostSpace.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_LocalhostSpace *LocalhostSpaceTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _LocalhostSpace.Contract.contract.Transact(opts, method, params...) +} + +// Channels is a free data retrieval call binding the contract method 0xe5949b5d. +// +// Solidity: function channels(uint256 ) view returns(bytes32) +func (_LocalhostSpace *LocalhostSpaceCaller) Channels(opts *bind.CallOpts, arg0 *big.Int) ([32]byte, error) { + var out []interface{} + err := _LocalhostSpace.contract.Call(opts, &out, "channels", arg0) + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// Channels is a free data retrieval call binding the contract method 0xe5949b5d. +// +// Solidity: function channels(uint256 ) view returns(bytes32) +func (_LocalhostSpace *LocalhostSpaceSession) Channels(arg0 *big.Int) ([32]byte, error) { + return _LocalhostSpace.Contract.Channels(&_LocalhostSpace.CallOpts, arg0) +} + +// Channels is a free data retrieval call binding the contract method 0xe5949b5d. +// +// Solidity: function channels(uint256 ) view returns(bytes32) +func (_LocalhostSpace *LocalhostSpaceCallerSession) Channels(arg0 *big.Int) ([32]byte, error) { + return _LocalhostSpace.Contract.Channels(&_LocalhostSpace.CallOpts, arg0) +} + +// ChannelsByHash is a free data retrieval call binding the contract method 0x129ab3c8. +// +// Solidity: function channelsByHash(bytes32 ) view returns(string name, bytes32 channelId, uint256 createdAt, bool disabled) +func (_LocalhostSpace *LocalhostSpaceCaller) ChannelsByHash(opts *bind.CallOpts, arg0 [32]byte) (struct { + Name string + ChannelId [32]byte + CreatedAt *big.Int + Disabled bool +}, error) { + var out []interface{} + err := _LocalhostSpace.contract.Call(opts, &out, "channelsByHash", arg0) + + outstruct := new(struct { + Name string + ChannelId [32]byte + CreatedAt *big.Int + Disabled bool + }) + if err != nil { + return *outstruct, err + } + + outstruct.Name = *abi.ConvertType(out[0], new(string)).(*string) + outstruct.ChannelId = *abi.ConvertType(out[1], new([32]byte)).(*[32]byte) + outstruct.CreatedAt = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) + outstruct.Disabled = *abi.ConvertType(out[3], new(bool)).(*bool) + + return *outstruct, err + +} + +// ChannelsByHash is a free data retrieval call binding the contract method 0x129ab3c8. +// +// Solidity: function channelsByHash(bytes32 ) view returns(string name, bytes32 channelId, uint256 createdAt, bool disabled) +func (_LocalhostSpace *LocalhostSpaceSession) ChannelsByHash(arg0 [32]byte) (struct { + Name string + ChannelId [32]byte + CreatedAt *big.Int + Disabled bool +}, error) { + return _LocalhostSpace.Contract.ChannelsByHash(&_LocalhostSpace.CallOpts, arg0) +} + +// ChannelsByHash is a free data retrieval call binding the contract method 0x129ab3c8. +// +// Solidity: function channelsByHash(bytes32 ) view returns(string name, bytes32 channelId, uint256 createdAt, bool disabled) +func (_LocalhostSpace *LocalhostSpaceCallerSession) ChannelsByHash(arg0 [32]byte) (struct { + Name string + ChannelId [32]byte + CreatedAt *big.Int + Disabled bool +}, error) { + return _LocalhostSpace.Contract.ChannelsByHash(&_LocalhostSpace.CallOpts, arg0) +} + +// DefaultEntitlements is a free data retrieval call binding the contract method 0xfa6433c5. +// +// Solidity: function defaultEntitlements(address ) view returns(bool) +func (_LocalhostSpace *LocalhostSpaceCaller) DefaultEntitlements(opts *bind.CallOpts, arg0 common.Address) (bool, error) { + var out []interface{} + err := _LocalhostSpace.contract.Call(opts, &out, "defaultEntitlements", arg0) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// DefaultEntitlements is a free data retrieval call binding the contract method 0xfa6433c5. +// +// Solidity: function defaultEntitlements(address ) view returns(bool) +func (_LocalhostSpace *LocalhostSpaceSession) DefaultEntitlements(arg0 common.Address) (bool, error) { + return _LocalhostSpace.Contract.DefaultEntitlements(&_LocalhostSpace.CallOpts, arg0) +} + +// DefaultEntitlements is a free data retrieval call binding the contract method 0xfa6433c5. +// +// Solidity: function defaultEntitlements(address ) view returns(bool) +func (_LocalhostSpace *LocalhostSpaceCallerSession) DefaultEntitlements(arg0 common.Address) (bool, error) { + return _LocalhostSpace.Contract.DefaultEntitlements(&_LocalhostSpace.CallOpts, arg0) +} + +// Disabled is a free data retrieval call binding the contract method 0xee070805. +// +// Solidity: function disabled() view returns(bool) +func (_LocalhostSpace *LocalhostSpaceCaller) Disabled(opts *bind.CallOpts) (bool, error) { + var out []interface{} + err := _LocalhostSpace.contract.Call(opts, &out, "disabled") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// Disabled is a free data retrieval call binding the contract method 0xee070805. +// +// Solidity: function disabled() view returns(bool) +func (_LocalhostSpace *LocalhostSpaceSession) Disabled() (bool, error) { + return _LocalhostSpace.Contract.Disabled(&_LocalhostSpace.CallOpts) +} + +// Disabled is a free data retrieval call binding the contract method 0xee070805. +// +// Solidity: function disabled() view returns(bool) +func (_LocalhostSpace *LocalhostSpaceCallerSession) Disabled() (bool, error) { + return _LocalhostSpace.Contract.Disabled(&_LocalhostSpace.CallOpts) +} + +// Entitlements is a free data retrieval call binding the contract method 0xf28f9b56. +// +// Solidity: function entitlements(uint256 ) view returns(address) +func (_LocalhostSpace *LocalhostSpaceCaller) Entitlements(opts *bind.CallOpts, arg0 *big.Int) (common.Address, error) { + var out []interface{} + err := _LocalhostSpace.contract.Call(opts, &out, "entitlements", arg0) + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Entitlements is a free data retrieval call binding the contract method 0xf28f9b56. +// +// Solidity: function entitlements(uint256 ) view returns(address) +func (_LocalhostSpace *LocalhostSpaceSession) Entitlements(arg0 *big.Int) (common.Address, error) { + return _LocalhostSpace.Contract.Entitlements(&_LocalhostSpace.CallOpts, arg0) +} + +// Entitlements is a free data retrieval call binding the contract method 0xf28f9b56. +// +// Solidity: function entitlements(uint256 ) view returns(address) +func (_LocalhostSpace *LocalhostSpaceCallerSession) Entitlements(arg0 *big.Int) (common.Address, error) { + return _LocalhostSpace.Contract.Entitlements(&_LocalhostSpace.CallOpts, arg0) +} + +// GetChannelByHash is a free data retrieval call binding the contract method 0x703511f8. +// +// Solidity: function getChannelByHash(bytes32 _channelHash) view returns((string,bytes32,uint256,bool)) +func (_LocalhostSpace *LocalhostSpaceCaller) GetChannelByHash(opts *bind.CallOpts, _channelHash [32]byte) (DataTypesChannel, error) { + var out []interface{} + err := _LocalhostSpace.contract.Call(opts, &out, "getChannelByHash", _channelHash) + + if err != nil { + return *new(DataTypesChannel), err + } + + out0 := *abi.ConvertType(out[0], new(DataTypesChannel)).(*DataTypesChannel) + + return out0, err + +} + +// GetChannelByHash is a free data retrieval call binding the contract method 0x703511f8. +// +// Solidity: function getChannelByHash(bytes32 _channelHash) view returns((string,bytes32,uint256,bool)) +func (_LocalhostSpace *LocalhostSpaceSession) GetChannelByHash(_channelHash [32]byte) (DataTypesChannel, error) { + return _LocalhostSpace.Contract.GetChannelByHash(&_LocalhostSpace.CallOpts, _channelHash) +} + +// GetChannelByHash is a free data retrieval call binding the contract method 0x703511f8. +// +// Solidity: function getChannelByHash(bytes32 _channelHash) view returns((string,bytes32,uint256,bool)) +func (_LocalhostSpace *LocalhostSpaceCallerSession) GetChannelByHash(_channelHash [32]byte) (DataTypesChannel, error) { + return _LocalhostSpace.Contract.GetChannelByHash(&_LocalhostSpace.CallOpts, _channelHash) +} + +// GetEntitlementByModuleType is a free data retrieval call binding the contract method 0x870b9464. +// +// Solidity: function getEntitlementByModuleType(string _moduleType) view returns(address) +func (_LocalhostSpace *LocalhostSpaceCaller) GetEntitlementByModuleType(opts *bind.CallOpts, _moduleType string) (common.Address, error) { + var out []interface{} + err := _LocalhostSpace.contract.Call(opts, &out, "getEntitlementByModuleType", _moduleType) + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// GetEntitlementByModuleType is a free data retrieval call binding the contract method 0x870b9464. +// +// Solidity: function getEntitlementByModuleType(string _moduleType) view returns(address) +func (_LocalhostSpace *LocalhostSpaceSession) GetEntitlementByModuleType(_moduleType string) (common.Address, error) { + return _LocalhostSpace.Contract.GetEntitlementByModuleType(&_LocalhostSpace.CallOpts, _moduleType) +} + +// GetEntitlementByModuleType is a free data retrieval call binding the contract method 0x870b9464. +// +// Solidity: function getEntitlementByModuleType(string _moduleType) view returns(address) +func (_LocalhostSpace *LocalhostSpaceCallerSession) GetEntitlementByModuleType(_moduleType string) (common.Address, error) { + return _LocalhostSpace.Contract.GetEntitlementByModuleType(&_LocalhostSpace.CallOpts, _moduleType) +} + +// GetEntitlementIdsByRoleId is a free data retrieval call binding the contract method 0x42486e49. +// +// Solidity: function getEntitlementIdsByRoleId(uint256 _roleId) view returns(bytes32[]) +func (_LocalhostSpace *LocalhostSpaceCaller) GetEntitlementIdsByRoleId(opts *bind.CallOpts, _roleId *big.Int) ([][32]byte, error) { + var out []interface{} + err := _LocalhostSpace.contract.Call(opts, &out, "getEntitlementIdsByRoleId", _roleId) + + if err != nil { + return *new([][32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([][32]byte)).(*[][32]byte) + + return out0, err + +} + +// GetEntitlementIdsByRoleId is a free data retrieval call binding the contract method 0x42486e49. +// +// Solidity: function getEntitlementIdsByRoleId(uint256 _roleId) view returns(bytes32[]) +func (_LocalhostSpace *LocalhostSpaceSession) GetEntitlementIdsByRoleId(_roleId *big.Int) ([][32]byte, error) { + return _LocalhostSpace.Contract.GetEntitlementIdsByRoleId(&_LocalhostSpace.CallOpts, _roleId) +} + +// GetEntitlementIdsByRoleId is a free data retrieval call binding the contract method 0x42486e49. +// +// Solidity: function getEntitlementIdsByRoleId(uint256 _roleId) view returns(bytes32[]) +func (_LocalhostSpace *LocalhostSpaceCallerSession) GetEntitlementIdsByRoleId(_roleId *big.Int) ([][32]byte, error) { + return _LocalhostSpace.Contract.GetEntitlementIdsByRoleId(&_LocalhostSpace.CallOpts, _roleId) +} + +// GetEntitlements is a free data retrieval call binding the contract method 0x487dc38c. +// +// Solidity: function getEntitlements() view returns(address[]) +func (_LocalhostSpace *LocalhostSpaceCaller) GetEntitlements(opts *bind.CallOpts) ([]common.Address, error) { + var out []interface{} + err := _LocalhostSpace.contract.Call(opts, &out, "getEntitlements") + + if err != nil { + return *new([]common.Address), err + } + + out0 := *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address) + + return out0, err + +} + +// GetEntitlements is a free data retrieval call binding the contract method 0x487dc38c. +// +// Solidity: function getEntitlements() view returns(address[]) +func (_LocalhostSpace *LocalhostSpaceSession) GetEntitlements() ([]common.Address, error) { + return _LocalhostSpace.Contract.GetEntitlements(&_LocalhostSpace.CallOpts) +} + +// GetEntitlements is a free data retrieval call binding the contract method 0x487dc38c. +// +// Solidity: function getEntitlements() view returns(address[]) +func (_LocalhostSpace *LocalhostSpaceCallerSession) GetEntitlements() ([]common.Address, error) { + return _LocalhostSpace.Contract.GetEntitlements(&_LocalhostSpace.CallOpts) +} + +// GetPermissionsByRoleId is a free data retrieval call binding the contract method 0xb4264233. +// +// Solidity: function getPermissionsByRoleId(uint256 _roleId) view returns(bytes32[]) +func (_LocalhostSpace *LocalhostSpaceCaller) GetPermissionsByRoleId(opts *bind.CallOpts, _roleId *big.Int) ([][32]byte, error) { + var out []interface{} + err := _LocalhostSpace.contract.Call(opts, &out, "getPermissionsByRoleId", _roleId) + + if err != nil { + return *new([][32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([][32]byte)).(*[][32]byte) + + return out0, err + +} + +// GetPermissionsByRoleId is a free data retrieval call binding the contract method 0xb4264233. +// +// Solidity: function getPermissionsByRoleId(uint256 _roleId) view returns(bytes32[]) +func (_LocalhostSpace *LocalhostSpaceSession) GetPermissionsByRoleId(_roleId *big.Int) ([][32]byte, error) { + return _LocalhostSpace.Contract.GetPermissionsByRoleId(&_LocalhostSpace.CallOpts, _roleId) +} + +// GetPermissionsByRoleId is a free data retrieval call binding the contract method 0xb4264233. +// +// Solidity: function getPermissionsByRoleId(uint256 _roleId) view returns(bytes32[]) +func (_LocalhostSpace *LocalhostSpaceCallerSession) GetPermissionsByRoleId(_roleId *big.Int) ([][32]byte, error) { + return _LocalhostSpace.Contract.GetPermissionsByRoleId(&_LocalhostSpace.CallOpts, _roleId) +} + +// GetRoleById is a free data retrieval call binding the contract method 0x784c872b. +// +// Solidity: function getRoleById(uint256 _roleId) view returns((uint256,string)) +func (_LocalhostSpace *LocalhostSpaceCaller) GetRoleById(opts *bind.CallOpts, _roleId *big.Int) (DataTypesRole, error) { + var out []interface{} + err := _LocalhostSpace.contract.Call(opts, &out, "getRoleById", _roleId) + + if err != nil { + return *new(DataTypesRole), err + } + + out0 := *abi.ConvertType(out[0], new(DataTypesRole)).(*DataTypesRole) + + return out0, err + +} + +// GetRoleById is a free data retrieval call binding the contract method 0x784c872b. +// +// Solidity: function getRoleById(uint256 _roleId) view returns((uint256,string)) +func (_LocalhostSpace *LocalhostSpaceSession) GetRoleById(_roleId *big.Int) (DataTypesRole, error) { + return _LocalhostSpace.Contract.GetRoleById(&_LocalhostSpace.CallOpts, _roleId) +} + +// GetRoleById is a free data retrieval call binding the contract method 0x784c872b. +// +// Solidity: function getRoleById(uint256 _roleId) view returns((uint256,string)) +func (_LocalhostSpace *LocalhostSpaceCallerSession) GetRoleById(_roleId *big.Int) (DataTypesRole, error) { + return _LocalhostSpace.Contract.GetRoleById(&_LocalhostSpace.CallOpts, _roleId) +} + +// GetRoles is a free data retrieval call binding the contract method 0x71061398. +// +// Solidity: function getRoles() view returns((uint256,string)[]) +func (_LocalhostSpace *LocalhostSpaceCaller) GetRoles(opts *bind.CallOpts) ([]DataTypesRole, error) { + var out []interface{} + err := _LocalhostSpace.contract.Call(opts, &out, "getRoles") + + if err != nil { + return *new([]DataTypesRole), err + } + + out0 := *abi.ConvertType(out[0], new([]DataTypesRole)).(*[]DataTypesRole) + + return out0, err + +} + +// GetRoles is a free data retrieval call binding the contract method 0x71061398. +// +// Solidity: function getRoles() view returns((uint256,string)[]) +func (_LocalhostSpace *LocalhostSpaceSession) GetRoles() ([]DataTypesRole, error) { + return _LocalhostSpace.Contract.GetRoles(&_LocalhostSpace.CallOpts) +} + +// GetRoles is a free data retrieval call binding the contract method 0x71061398. +// +// Solidity: function getRoles() view returns((uint256,string)[]) +func (_LocalhostSpace *LocalhostSpaceCallerSession) GetRoles() ([]DataTypesRole, error) { + return _LocalhostSpace.Contract.GetRoles(&_LocalhostSpace.CallOpts) +} + +// HasEntitlement is a free data retrieval call binding the contract method 0x7f8d06d0. +// +// Solidity: function hasEntitlement(address ) view returns(bool) +func (_LocalhostSpace *LocalhostSpaceCaller) HasEntitlement(opts *bind.CallOpts, arg0 common.Address) (bool, error) { + var out []interface{} + err := _LocalhostSpace.contract.Call(opts, &out, "hasEntitlement", arg0) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// HasEntitlement is a free data retrieval call binding the contract method 0x7f8d06d0. +// +// Solidity: function hasEntitlement(address ) view returns(bool) +func (_LocalhostSpace *LocalhostSpaceSession) HasEntitlement(arg0 common.Address) (bool, error) { + return _LocalhostSpace.Contract.HasEntitlement(&_LocalhostSpace.CallOpts, arg0) +} + +// HasEntitlement is a free data retrieval call binding the contract method 0x7f8d06d0. +// +// Solidity: function hasEntitlement(address ) view returns(bool) +func (_LocalhostSpace *LocalhostSpaceCallerSession) HasEntitlement(arg0 common.Address) (bool, error) { + return _LocalhostSpace.Contract.HasEntitlement(&_LocalhostSpace.CallOpts, arg0) +} + +// IsEntitledToChannel is a free data retrieval call binding the contract method 0xcea632bc. +// +// Solidity: function isEntitledToChannel(string _channelId, address _user, string _permission) view returns(bool _entitled) +func (_LocalhostSpace *LocalhostSpaceCaller) IsEntitledToChannel(opts *bind.CallOpts, _channelId string, _user common.Address, _permission string) (bool, error) { + var out []interface{} + err := _LocalhostSpace.contract.Call(opts, &out, "isEntitledToChannel", _channelId, _user, _permission) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsEntitledToChannel is a free data retrieval call binding the contract method 0xcea632bc. +// +// Solidity: function isEntitledToChannel(string _channelId, address _user, string _permission) view returns(bool _entitled) +func (_LocalhostSpace *LocalhostSpaceSession) IsEntitledToChannel(_channelId string, _user common.Address, _permission string) (bool, error) { + return _LocalhostSpace.Contract.IsEntitledToChannel(&_LocalhostSpace.CallOpts, _channelId, _user, _permission) +} + +// IsEntitledToChannel is a free data retrieval call binding the contract method 0xcea632bc. +// +// Solidity: function isEntitledToChannel(string _channelId, address _user, string _permission) view returns(bool _entitled) +func (_LocalhostSpace *LocalhostSpaceCallerSession) IsEntitledToChannel(_channelId string, _user common.Address, _permission string) (bool, error) { + return _LocalhostSpace.Contract.IsEntitledToChannel(&_LocalhostSpace.CallOpts, _channelId, _user, _permission) +} + +// IsEntitledToSpace is a free data retrieval call binding the contract method 0x20759f9e. +// +// Solidity: function isEntitledToSpace(address _user, string _permission) view returns(bool _entitled) +func (_LocalhostSpace *LocalhostSpaceCaller) IsEntitledToSpace(opts *bind.CallOpts, _user common.Address, _permission string) (bool, error) { + var out []interface{} + err := _LocalhostSpace.contract.Call(opts, &out, "isEntitledToSpace", _user, _permission) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsEntitledToSpace is a free data retrieval call binding the contract method 0x20759f9e. +// +// Solidity: function isEntitledToSpace(address _user, string _permission) view returns(bool _entitled) +func (_LocalhostSpace *LocalhostSpaceSession) IsEntitledToSpace(_user common.Address, _permission string) (bool, error) { + return _LocalhostSpace.Contract.IsEntitledToSpace(&_LocalhostSpace.CallOpts, _user, _permission) +} + +// IsEntitledToSpace is a free data retrieval call binding the contract method 0x20759f9e. +// +// Solidity: function isEntitledToSpace(address _user, string _permission) view returns(bool _entitled) +func (_LocalhostSpace *LocalhostSpaceCallerSession) IsEntitledToSpace(_user common.Address, _permission string) (bool, error) { + return _LocalhostSpace.Contract.IsEntitledToSpace(&_LocalhostSpace.CallOpts, _user, _permission) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_LocalhostSpace *LocalhostSpaceCaller) Name(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _LocalhostSpace.contract.Call(opts, &out, "name") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_LocalhostSpace *LocalhostSpaceSession) Name() (string, error) { + return _LocalhostSpace.Contract.Name(&_LocalhostSpace.CallOpts) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_LocalhostSpace *LocalhostSpaceCallerSession) Name() (string, error) { + return _LocalhostSpace.Contract.Name(&_LocalhostSpace.CallOpts) +} + +// NetworkId is a free data retrieval call binding the contract method 0x9025e64c. +// +// Solidity: function networkId() view returns(string) +func (_LocalhostSpace *LocalhostSpaceCaller) NetworkId(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _LocalhostSpace.contract.Call(opts, &out, "networkId") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// NetworkId is a free data retrieval call binding the contract method 0x9025e64c. +// +// Solidity: function networkId() view returns(string) +func (_LocalhostSpace *LocalhostSpaceSession) NetworkId() (string, error) { + return _LocalhostSpace.Contract.NetworkId(&_LocalhostSpace.CallOpts) +} + +// NetworkId is a free data retrieval call binding the contract method 0x9025e64c. +// +// Solidity: function networkId() view returns(string) +func (_LocalhostSpace *LocalhostSpaceCallerSession) NetworkId() (string, error) { + return _LocalhostSpace.Contract.NetworkId(&_LocalhostSpace.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_LocalhostSpace *LocalhostSpaceCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _LocalhostSpace.contract.Call(opts, &out, "owner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_LocalhostSpace *LocalhostSpaceSession) Owner() (common.Address, error) { + return _LocalhostSpace.Contract.Owner(&_LocalhostSpace.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_LocalhostSpace *LocalhostSpaceCallerSession) Owner() (common.Address, error) { + return _LocalhostSpace.Contract.Owner(&_LocalhostSpace.CallOpts) +} + +// OwnerRoleId is a free data retrieval call binding the contract method 0xd1a6a961. +// +// Solidity: function ownerRoleId() view returns(uint256) +func (_LocalhostSpace *LocalhostSpaceCaller) OwnerRoleId(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _LocalhostSpace.contract.Call(opts, &out, "ownerRoleId") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// OwnerRoleId is a free data retrieval call binding the contract method 0xd1a6a961. +// +// Solidity: function ownerRoleId() view returns(uint256) +func (_LocalhostSpace *LocalhostSpaceSession) OwnerRoleId() (*big.Int, error) { + return _LocalhostSpace.Contract.OwnerRoleId(&_LocalhostSpace.CallOpts) +} + +// OwnerRoleId is a free data retrieval call binding the contract method 0xd1a6a961. +// +// Solidity: function ownerRoleId() view returns(uint256) +func (_LocalhostSpace *LocalhostSpaceCallerSession) OwnerRoleId() (*big.Int, error) { + return _LocalhostSpace.Contract.OwnerRoleId(&_LocalhostSpace.CallOpts) +} + +// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (_LocalhostSpace *LocalhostSpaceCaller) ProxiableUUID(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _LocalhostSpace.contract.Call(opts, &out, "proxiableUUID") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (_LocalhostSpace *LocalhostSpaceSession) ProxiableUUID() ([32]byte, error) { + return _LocalhostSpace.Contract.ProxiableUUID(&_LocalhostSpace.CallOpts) +} + +// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (_LocalhostSpace *LocalhostSpaceCallerSession) ProxiableUUID() ([32]byte, error) { + return _LocalhostSpace.Contract.ProxiableUUID(&_LocalhostSpace.CallOpts) +} + +// RoleCount is a free data retrieval call binding the contract method 0xddf96358. +// +// Solidity: function roleCount() view returns(uint256) +func (_LocalhostSpace *LocalhostSpaceCaller) RoleCount(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _LocalhostSpace.contract.Call(opts, &out, "roleCount") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// RoleCount is a free data retrieval call binding the contract method 0xddf96358. +// +// Solidity: function roleCount() view returns(uint256) +func (_LocalhostSpace *LocalhostSpaceSession) RoleCount() (*big.Int, error) { + return _LocalhostSpace.Contract.RoleCount(&_LocalhostSpace.CallOpts) +} + +// RoleCount is a free data retrieval call binding the contract method 0xddf96358. +// +// Solidity: function roleCount() view returns(uint256) +func (_LocalhostSpace *LocalhostSpaceCallerSession) RoleCount() (*big.Int, error) { + return _LocalhostSpace.Contract.RoleCount(&_LocalhostSpace.CallOpts) +} + +// RolesById is a free data retrieval call binding the contract method 0xe5894ef4. +// +// Solidity: function rolesById(uint256 ) view returns(uint256 roleId, string name) +func (_LocalhostSpace *LocalhostSpaceCaller) RolesById(opts *bind.CallOpts, arg0 *big.Int) (struct { + RoleId *big.Int + Name string +}, error) { + var out []interface{} + err := _LocalhostSpace.contract.Call(opts, &out, "rolesById", arg0) + + outstruct := new(struct { + RoleId *big.Int + Name string + }) + if err != nil { + return *outstruct, err + } + + outstruct.RoleId = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + outstruct.Name = *abi.ConvertType(out[1], new(string)).(*string) + + return *outstruct, err + +} + +// RolesById is a free data retrieval call binding the contract method 0xe5894ef4. +// +// Solidity: function rolesById(uint256 ) view returns(uint256 roleId, string name) +func (_LocalhostSpace *LocalhostSpaceSession) RolesById(arg0 *big.Int) (struct { + RoleId *big.Int + Name string +}, error) { + return _LocalhostSpace.Contract.RolesById(&_LocalhostSpace.CallOpts, arg0) +} + +// RolesById is a free data retrieval call binding the contract method 0xe5894ef4. +// +// Solidity: function rolesById(uint256 ) view returns(uint256 roleId, string name) +func (_LocalhostSpace *LocalhostSpaceCallerSession) RolesById(arg0 *big.Int) (struct { + RoleId *big.Int + Name string +}, error) { + return _LocalhostSpace.Contract.RolesById(&_LocalhostSpace.CallOpts, arg0) +} + +// Token is a free data retrieval call binding the contract method 0xfc0c546a. +// +// Solidity: function token() view returns(address) +func (_LocalhostSpace *LocalhostSpaceCaller) Token(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _LocalhostSpace.contract.Call(opts, &out, "token") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Token is a free data retrieval call binding the contract method 0xfc0c546a. +// +// Solidity: function token() view returns(address) +func (_LocalhostSpace *LocalhostSpaceSession) Token() (common.Address, error) { + return _LocalhostSpace.Contract.Token(&_LocalhostSpace.CallOpts) +} + +// Token is a free data retrieval call binding the contract method 0xfc0c546a. +// +// Solidity: function token() view returns(address) +func (_LocalhostSpace *LocalhostSpaceCallerSession) Token() (common.Address, error) { + return _LocalhostSpace.Contract.Token(&_LocalhostSpace.CallOpts) +} + +// TokenId is a free data retrieval call binding the contract method 0x17d70f7c. +// +// Solidity: function tokenId() view returns(uint256) +func (_LocalhostSpace *LocalhostSpaceCaller) TokenId(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _LocalhostSpace.contract.Call(opts, &out, "tokenId") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// TokenId is a free data retrieval call binding the contract method 0x17d70f7c. +// +// Solidity: function tokenId() view returns(uint256) +func (_LocalhostSpace *LocalhostSpaceSession) TokenId() (*big.Int, error) { + return _LocalhostSpace.Contract.TokenId(&_LocalhostSpace.CallOpts) +} + +// TokenId is a free data retrieval call binding the contract method 0x17d70f7c. +// +// Solidity: function tokenId() view returns(uint256) +func (_LocalhostSpace *LocalhostSpaceCallerSession) TokenId() (*big.Int, error) { + return _LocalhostSpace.Contract.TokenId(&_LocalhostSpace.CallOpts) +} + +// AddPermissionToRole is a paid mutator transaction binding the contract method 0x66fb345c. +// +// Solidity: function addPermissionToRole(uint256 _roleId, string _permission) returns() +func (_LocalhostSpace *LocalhostSpaceTransactor) AddPermissionToRole(opts *bind.TransactOpts, _roleId *big.Int, _permission string) (*types.Transaction, error) { + return _LocalhostSpace.contract.Transact(opts, "addPermissionToRole", _roleId, _permission) +} + +// AddPermissionToRole is a paid mutator transaction binding the contract method 0x66fb345c. +// +// Solidity: function addPermissionToRole(uint256 _roleId, string _permission) returns() +func (_LocalhostSpace *LocalhostSpaceSession) AddPermissionToRole(_roleId *big.Int, _permission string) (*types.Transaction, error) { + return _LocalhostSpace.Contract.AddPermissionToRole(&_LocalhostSpace.TransactOpts, _roleId, _permission) +} + +// AddPermissionToRole is a paid mutator transaction binding the contract method 0x66fb345c. +// +// Solidity: function addPermissionToRole(uint256 _roleId, string _permission) returns() +func (_LocalhostSpace *LocalhostSpaceTransactorSession) AddPermissionToRole(_roleId *big.Int, _permission string) (*types.Transaction, error) { + return _LocalhostSpace.Contract.AddPermissionToRole(&_LocalhostSpace.TransactOpts, _roleId, _permission) +} + +// AddRoleToChannel is a paid mutator transaction binding the contract method 0x1dea616a. +// +// Solidity: function addRoleToChannel(string _channelId, address _entitlement, uint256 _roleId) returns() +func (_LocalhostSpace *LocalhostSpaceTransactor) AddRoleToChannel(opts *bind.TransactOpts, _channelId string, _entitlement common.Address, _roleId *big.Int) (*types.Transaction, error) { + return _LocalhostSpace.contract.Transact(opts, "addRoleToChannel", _channelId, _entitlement, _roleId) +} + +// AddRoleToChannel is a paid mutator transaction binding the contract method 0x1dea616a. +// +// Solidity: function addRoleToChannel(string _channelId, address _entitlement, uint256 _roleId) returns() +func (_LocalhostSpace *LocalhostSpaceSession) AddRoleToChannel(_channelId string, _entitlement common.Address, _roleId *big.Int) (*types.Transaction, error) { + return _LocalhostSpace.Contract.AddRoleToChannel(&_LocalhostSpace.TransactOpts, _channelId, _entitlement, _roleId) +} + +// AddRoleToChannel is a paid mutator transaction binding the contract method 0x1dea616a. +// +// Solidity: function addRoleToChannel(string _channelId, address _entitlement, uint256 _roleId) returns() +func (_LocalhostSpace *LocalhostSpaceTransactorSession) AddRoleToChannel(_channelId string, _entitlement common.Address, _roleId *big.Int) (*types.Transaction, error) { + return _LocalhostSpace.Contract.AddRoleToChannel(&_LocalhostSpace.TransactOpts, _channelId, _entitlement, _roleId) +} + +// AddRoleToEntitlement is a paid mutator transaction binding the contract method 0xba201ba8. +// +// Solidity: function addRoleToEntitlement(uint256 _roleId, (address,bytes) _entitlement) returns() +func (_LocalhostSpace *LocalhostSpaceTransactor) AddRoleToEntitlement(opts *bind.TransactOpts, _roleId *big.Int, _entitlement DataTypesEntitlement) (*types.Transaction, error) { + return _LocalhostSpace.contract.Transact(opts, "addRoleToEntitlement", _roleId, _entitlement) +} + +// AddRoleToEntitlement is a paid mutator transaction binding the contract method 0xba201ba8. +// +// Solidity: function addRoleToEntitlement(uint256 _roleId, (address,bytes) _entitlement) returns() +func (_LocalhostSpace *LocalhostSpaceSession) AddRoleToEntitlement(_roleId *big.Int, _entitlement DataTypesEntitlement) (*types.Transaction, error) { + return _LocalhostSpace.Contract.AddRoleToEntitlement(&_LocalhostSpace.TransactOpts, _roleId, _entitlement) +} + +// AddRoleToEntitlement is a paid mutator transaction binding the contract method 0xba201ba8. +// +// Solidity: function addRoleToEntitlement(uint256 _roleId, (address,bytes) _entitlement) returns() +func (_LocalhostSpace *LocalhostSpaceTransactorSession) AddRoleToEntitlement(_roleId *big.Int, _entitlement DataTypesEntitlement) (*types.Transaction, error) { + return _LocalhostSpace.Contract.AddRoleToEntitlement(&_LocalhostSpace.TransactOpts, _roleId, _entitlement) +} + +// CreateChannel is a paid mutator transaction binding the contract method 0x51f83cea. +// +// Solidity: function createChannel(string channelName, string channelNetworkId, uint256[] roleIds) returns(bytes32) +func (_LocalhostSpace *LocalhostSpaceTransactor) CreateChannel(opts *bind.TransactOpts, channelName string, channelNetworkId string, roleIds []*big.Int) (*types.Transaction, error) { + return _LocalhostSpace.contract.Transact(opts, "createChannel", channelName, channelNetworkId, roleIds) +} + +// CreateChannel is a paid mutator transaction binding the contract method 0x51f83cea. +// +// Solidity: function createChannel(string channelName, string channelNetworkId, uint256[] roleIds) returns(bytes32) +func (_LocalhostSpace *LocalhostSpaceSession) CreateChannel(channelName string, channelNetworkId string, roleIds []*big.Int) (*types.Transaction, error) { + return _LocalhostSpace.Contract.CreateChannel(&_LocalhostSpace.TransactOpts, channelName, channelNetworkId, roleIds) +} + +// CreateChannel is a paid mutator transaction binding the contract method 0x51f83cea. +// +// Solidity: function createChannel(string channelName, string channelNetworkId, uint256[] roleIds) returns(bytes32) +func (_LocalhostSpace *LocalhostSpaceTransactorSession) CreateChannel(channelName string, channelNetworkId string, roleIds []*big.Int) (*types.Transaction, error) { + return _LocalhostSpace.Contract.CreateChannel(&_LocalhostSpace.TransactOpts, channelName, channelNetworkId, roleIds) +} + +// CreateRole is a paid mutator transaction binding the contract method 0x8fcd793d. +// +// Solidity: function createRole(string _roleName, string[] _permissions, (address,bytes)[] _entitlements) returns(uint256) +func (_LocalhostSpace *LocalhostSpaceTransactor) CreateRole(opts *bind.TransactOpts, _roleName string, _permissions []string, _entitlements []DataTypesEntitlement) (*types.Transaction, error) { + return _LocalhostSpace.contract.Transact(opts, "createRole", _roleName, _permissions, _entitlements) +} + +// CreateRole is a paid mutator transaction binding the contract method 0x8fcd793d. +// +// Solidity: function createRole(string _roleName, string[] _permissions, (address,bytes)[] _entitlements) returns(uint256) +func (_LocalhostSpace *LocalhostSpaceSession) CreateRole(_roleName string, _permissions []string, _entitlements []DataTypesEntitlement) (*types.Transaction, error) { + return _LocalhostSpace.Contract.CreateRole(&_LocalhostSpace.TransactOpts, _roleName, _permissions, _entitlements) +} + +// CreateRole is a paid mutator transaction binding the contract method 0x8fcd793d. +// +// Solidity: function createRole(string _roleName, string[] _permissions, (address,bytes)[] _entitlements) returns(uint256) +func (_LocalhostSpace *LocalhostSpaceTransactorSession) CreateRole(_roleName string, _permissions []string, _entitlements []DataTypesEntitlement) (*types.Transaction, error) { + return _LocalhostSpace.Contract.CreateRole(&_LocalhostSpace.TransactOpts, _roleName, _permissions, _entitlements) +} + +// Initialize is a paid mutator transaction binding the contract method 0xf3ce6a5b. +// +// Solidity: function initialize(string _name, string _networkId, address[] _entitlements, address _token, uint256 _tokenId) returns() +func (_LocalhostSpace *LocalhostSpaceTransactor) Initialize(opts *bind.TransactOpts, _name string, _networkId string, _entitlements []common.Address, _token common.Address, _tokenId *big.Int) (*types.Transaction, error) { + return _LocalhostSpace.contract.Transact(opts, "initialize", _name, _networkId, _entitlements, _token, _tokenId) +} + +// Initialize is a paid mutator transaction binding the contract method 0xf3ce6a5b. +// +// Solidity: function initialize(string _name, string _networkId, address[] _entitlements, address _token, uint256 _tokenId) returns() +func (_LocalhostSpace *LocalhostSpaceSession) Initialize(_name string, _networkId string, _entitlements []common.Address, _token common.Address, _tokenId *big.Int) (*types.Transaction, error) { + return _LocalhostSpace.Contract.Initialize(&_LocalhostSpace.TransactOpts, _name, _networkId, _entitlements, _token, _tokenId) +} + +// Initialize is a paid mutator transaction binding the contract method 0xf3ce6a5b. +// +// Solidity: function initialize(string _name, string _networkId, address[] _entitlements, address _token, uint256 _tokenId) returns() +func (_LocalhostSpace *LocalhostSpaceTransactorSession) Initialize(_name string, _networkId string, _entitlements []common.Address, _token common.Address, _tokenId *big.Int) (*types.Transaction, error) { + return _LocalhostSpace.Contract.Initialize(&_LocalhostSpace.TransactOpts, _name, _networkId, _entitlements, _token, _tokenId) +} + +// Multicall is a paid mutator transaction binding the contract method 0xac9650d8. +// +// Solidity: function multicall(bytes[] data) returns(bytes[] results) +func (_LocalhostSpace *LocalhostSpaceTransactor) Multicall(opts *bind.TransactOpts, data [][]byte) (*types.Transaction, error) { + return _LocalhostSpace.contract.Transact(opts, "multicall", data) +} + +// Multicall is a paid mutator transaction binding the contract method 0xac9650d8. +// +// Solidity: function multicall(bytes[] data) returns(bytes[] results) +func (_LocalhostSpace *LocalhostSpaceSession) Multicall(data [][]byte) (*types.Transaction, error) { + return _LocalhostSpace.Contract.Multicall(&_LocalhostSpace.TransactOpts, data) +} + +// Multicall is a paid mutator transaction binding the contract method 0xac9650d8. +// +// Solidity: function multicall(bytes[] data) returns(bytes[] results) +func (_LocalhostSpace *LocalhostSpaceTransactorSession) Multicall(data [][]byte) (*types.Transaction, error) { + return _LocalhostSpace.Contract.Multicall(&_LocalhostSpace.TransactOpts, data) +} + +// RemovePermissionFromRole is a paid mutator transaction binding the contract method 0xf740bb6b. +// +// Solidity: function removePermissionFromRole(uint256 _roleId, string _permission) returns() +func (_LocalhostSpace *LocalhostSpaceTransactor) RemovePermissionFromRole(opts *bind.TransactOpts, _roleId *big.Int, _permission string) (*types.Transaction, error) { + return _LocalhostSpace.contract.Transact(opts, "removePermissionFromRole", _roleId, _permission) +} + +// RemovePermissionFromRole is a paid mutator transaction binding the contract method 0xf740bb6b. +// +// Solidity: function removePermissionFromRole(uint256 _roleId, string _permission) returns() +func (_LocalhostSpace *LocalhostSpaceSession) RemovePermissionFromRole(_roleId *big.Int, _permission string) (*types.Transaction, error) { + return _LocalhostSpace.Contract.RemovePermissionFromRole(&_LocalhostSpace.TransactOpts, _roleId, _permission) +} + +// RemovePermissionFromRole is a paid mutator transaction binding the contract method 0xf740bb6b. +// +// Solidity: function removePermissionFromRole(uint256 _roleId, string _permission) returns() +func (_LocalhostSpace *LocalhostSpaceTransactorSession) RemovePermissionFromRole(_roleId *big.Int, _permission string) (*types.Transaction, error) { + return _LocalhostSpace.Contract.RemovePermissionFromRole(&_LocalhostSpace.TransactOpts, _roleId, _permission) +} + +// RemoveRole is a paid mutator transaction binding the contract method 0x92691821. +// +// Solidity: function removeRole(uint256 _roleId) returns() +func (_LocalhostSpace *LocalhostSpaceTransactor) RemoveRole(opts *bind.TransactOpts, _roleId *big.Int) (*types.Transaction, error) { + return _LocalhostSpace.contract.Transact(opts, "removeRole", _roleId) +} + +// RemoveRole is a paid mutator transaction binding the contract method 0x92691821. +// +// Solidity: function removeRole(uint256 _roleId) returns() +func (_LocalhostSpace *LocalhostSpaceSession) RemoveRole(_roleId *big.Int) (*types.Transaction, error) { + return _LocalhostSpace.Contract.RemoveRole(&_LocalhostSpace.TransactOpts, _roleId) +} + +// RemoveRole is a paid mutator transaction binding the contract method 0x92691821. +// +// Solidity: function removeRole(uint256 _roleId) returns() +func (_LocalhostSpace *LocalhostSpaceTransactorSession) RemoveRole(_roleId *big.Int) (*types.Transaction, error) { + return _LocalhostSpace.Contract.RemoveRole(&_LocalhostSpace.TransactOpts, _roleId) +} + +// RemoveRoleFromChannel is a paid mutator transaction binding the contract method 0xbaaf3d57. +// +// Solidity: function removeRoleFromChannel(string _channelId, address _entitlement, uint256 _roleId) returns() +func (_LocalhostSpace *LocalhostSpaceTransactor) RemoveRoleFromChannel(opts *bind.TransactOpts, _channelId string, _entitlement common.Address, _roleId *big.Int) (*types.Transaction, error) { + return _LocalhostSpace.contract.Transact(opts, "removeRoleFromChannel", _channelId, _entitlement, _roleId) +} + +// RemoveRoleFromChannel is a paid mutator transaction binding the contract method 0xbaaf3d57. +// +// Solidity: function removeRoleFromChannel(string _channelId, address _entitlement, uint256 _roleId) returns() +func (_LocalhostSpace *LocalhostSpaceSession) RemoveRoleFromChannel(_channelId string, _entitlement common.Address, _roleId *big.Int) (*types.Transaction, error) { + return _LocalhostSpace.Contract.RemoveRoleFromChannel(&_LocalhostSpace.TransactOpts, _channelId, _entitlement, _roleId) +} + +// RemoveRoleFromChannel is a paid mutator transaction binding the contract method 0xbaaf3d57. +// +// Solidity: function removeRoleFromChannel(string _channelId, address _entitlement, uint256 _roleId) returns() +func (_LocalhostSpace *LocalhostSpaceTransactorSession) RemoveRoleFromChannel(_channelId string, _entitlement common.Address, _roleId *big.Int) (*types.Transaction, error) { + return _LocalhostSpace.Contract.RemoveRoleFromChannel(&_LocalhostSpace.TransactOpts, _channelId, _entitlement, _roleId) +} + +// RemoveRoleFromEntitlement is a paid mutator transaction binding the contract method 0xdba81864. +// +// Solidity: function removeRoleFromEntitlement(uint256 _roleId, (address,bytes) _entitlement) returns() +func (_LocalhostSpace *LocalhostSpaceTransactor) RemoveRoleFromEntitlement(opts *bind.TransactOpts, _roleId *big.Int, _entitlement DataTypesEntitlement) (*types.Transaction, error) { + return _LocalhostSpace.contract.Transact(opts, "removeRoleFromEntitlement", _roleId, _entitlement) +} + +// RemoveRoleFromEntitlement is a paid mutator transaction binding the contract method 0xdba81864. +// +// Solidity: function removeRoleFromEntitlement(uint256 _roleId, (address,bytes) _entitlement) returns() +func (_LocalhostSpace *LocalhostSpaceSession) RemoveRoleFromEntitlement(_roleId *big.Int, _entitlement DataTypesEntitlement) (*types.Transaction, error) { + return _LocalhostSpace.Contract.RemoveRoleFromEntitlement(&_LocalhostSpace.TransactOpts, _roleId, _entitlement) +} + +// RemoveRoleFromEntitlement is a paid mutator transaction binding the contract method 0xdba81864. +// +// Solidity: function removeRoleFromEntitlement(uint256 _roleId, (address,bytes) _entitlement) returns() +func (_LocalhostSpace *LocalhostSpaceTransactorSession) RemoveRoleFromEntitlement(_roleId *big.Int, _entitlement DataTypesEntitlement) (*types.Transaction, error) { + return _LocalhostSpace.Contract.RemoveRoleFromEntitlement(&_LocalhostSpace.TransactOpts, _roleId, _entitlement) +} + +// SetChannelAccess is a paid mutator transaction binding the contract method 0x5de151b8. +// +// Solidity: function setChannelAccess(string _channelId, bool _disabled) returns() +func (_LocalhostSpace *LocalhostSpaceTransactor) SetChannelAccess(opts *bind.TransactOpts, _channelId string, _disabled bool) (*types.Transaction, error) { + return _LocalhostSpace.contract.Transact(opts, "setChannelAccess", _channelId, _disabled) +} + +// SetChannelAccess is a paid mutator transaction binding the contract method 0x5de151b8. +// +// Solidity: function setChannelAccess(string _channelId, bool _disabled) returns() +func (_LocalhostSpace *LocalhostSpaceSession) SetChannelAccess(_channelId string, _disabled bool) (*types.Transaction, error) { + return _LocalhostSpace.Contract.SetChannelAccess(&_LocalhostSpace.TransactOpts, _channelId, _disabled) +} + +// SetChannelAccess is a paid mutator transaction binding the contract method 0x5de151b8. +// +// Solidity: function setChannelAccess(string _channelId, bool _disabled) returns() +func (_LocalhostSpace *LocalhostSpaceTransactorSession) SetChannelAccess(_channelId string, _disabled bool) (*types.Transaction, error) { + return _LocalhostSpace.Contract.SetChannelAccess(&_LocalhostSpace.TransactOpts, _channelId, _disabled) +} + +// SetEntitlement is a paid mutator transaction binding the contract method 0xf3b96ab4. +// +// Solidity: function setEntitlement(address _entitlement, bool _whitelist) returns() +func (_LocalhostSpace *LocalhostSpaceTransactor) SetEntitlement(opts *bind.TransactOpts, _entitlement common.Address, _whitelist bool) (*types.Transaction, error) { + return _LocalhostSpace.contract.Transact(opts, "setEntitlement", _entitlement, _whitelist) +} + +// SetEntitlement is a paid mutator transaction binding the contract method 0xf3b96ab4. +// +// Solidity: function setEntitlement(address _entitlement, bool _whitelist) returns() +func (_LocalhostSpace *LocalhostSpaceSession) SetEntitlement(_entitlement common.Address, _whitelist bool) (*types.Transaction, error) { + return _LocalhostSpace.Contract.SetEntitlement(&_LocalhostSpace.TransactOpts, _entitlement, _whitelist) +} + +// SetEntitlement is a paid mutator transaction binding the contract method 0xf3b96ab4. +// +// Solidity: function setEntitlement(address _entitlement, bool _whitelist) returns() +func (_LocalhostSpace *LocalhostSpaceTransactorSession) SetEntitlement(_entitlement common.Address, _whitelist bool) (*types.Transaction, error) { + return _LocalhostSpace.Contract.SetEntitlement(&_LocalhostSpace.TransactOpts, _entitlement, _whitelist) +} + +// SetOwnerRoleId is a paid mutator transaction binding the contract method 0x4999ab16. +// +// Solidity: function setOwnerRoleId(uint256 _roleId) returns() +func (_LocalhostSpace *LocalhostSpaceTransactor) SetOwnerRoleId(opts *bind.TransactOpts, _roleId *big.Int) (*types.Transaction, error) { + return _LocalhostSpace.contract.Transact(opts, "setOwnerRoleId", _roleId) +} + +// SetOwnerRoleId is a paid mutator transaction binding the contract method 0x4999ab16. +// +// Solidity: function setOwnerRoleId(uint256 _roleId) returns() +func (_LocalhostSpace *LocalhostSpaceSession) SetOwnerRoleId(_roleId *big.Int) (*types.Transaction, error) { + return _LocalhostSpace.Contract.SetOwnerRoleId(&_LocalhostSpace.TransactOpts, _roleId) +} + +// SetOwnerRoleId is a paid mutator transaction binding the contract method 0x4999ab16. +// +// Solidity: function setOwnerRoleId(uint256 _roleId) returns() +func (_LocalhostSpace *LocalhostSpaceTransactorSession) SetOwnerRoleId(_roleId *big.Int) (*types.Transaction, error) { + return _LocalhostSpace.Contract.SetOwnerRoleId(&_LocalhostSpace.TransactOpts, _roleId) +} + +// SetSpaceAccess is a paid mutator transaction binding the contract method 0x446dc22e. +// +// Solidity: function setSpaceAccess(bool _disabled) returns() +func (_LocalhostSpace *LocalhostSpaceTransactor) SetSpaceAccess(opts *bind.TransactOpts, _disabled bool) (*types.Transaction, error) { + return _LocalhostSpace.contract.Transact(opts, "setSpaceAccess", _disabled) +} + +// SetSpaceAccess is a paid mutator transaction binding the contract method 0x446dc22e. +// +// Solidity: function setSpaceAccess(bool _disabled) returns() +func (_LocalhostSpace *LocalhostSpaceSession) SetSpaceAccess(_disabled bool) (*types.Transaction, error) { + return _LocalhostSpace.Contract.SetSpaceAccess(&_LocalhostSpace.TransactOpts, _disabled) +} + +// SetSpaceAccess is a paid mutator transaction binding the contract method 0x446dc22e. +// +// Solidity: function setSpaceAccess(bool _disabled) returns() +func (_LocalhostSpace *LocalhostSpaceTransactorSession) SetSpaceAccess(_disabled bool) (*types.Transaction, error) { + return _LocalhostSpace.Contract.SetSpaceAccess(&_LocalhostSpace.TransactOpts, _disabled) +} + +// UpdateChannel is a paid mutator transaction binding the contract method 0x34a1dd26. +// +// Solidity: function updateChannel(string _channelId, string _channelName) returns() +func (_LocalhostSpace *LocalhostSpaceTransactor) UpdateChannel(opts *bind.TransactOpts, _channelId string, _channelName string) (*types.Transaction, error) { + return _LocalhostSpace.contract.Transact(opts, "updateChannel", _channelId, _channelName) +} + +// UpdateChannel is a paid mutator transaction binding the contract method 0x34a1dd26. +// +// Solidity: function updateChannel(string _channelId, string _channelName) returns() +func (_LocalhostSpace *LocalhostSpaceSession) UpdateChannel(_channelId string, _channelName string) (*types.Transaction, error) { + return _LocalhostSpace.Contract.UpdateChannel(&_LocalhostSpace.TransactOpts, _channelId, _channelName) +} + +// UpdateChannel is a paid mutator transaction binding the contract method 0x34a1dd26. +// +// Solidity: function updateChannel(string _channelId, string _channelName) returns() +func (_LocalhostSpace *LocalhostSpaceTransactorSession) UpdateChannel(_channelId string, _channelName string) (*types.Transaction, error) { + return _LocalhostSpace.Contract.UpdateChannel(&_LocalhostSpace.TransactOpts, _channelId, _channelName) +} + +// UpdateRole is a paid mutator transaction binding the contract method 0x32e704cc. +// +// Solidity: function updateRole(uint256 _roleId, string _roleName) returns() +func (_LocalhostSpace *LocalhostSpaceTransactor) UpdateRole(opts *bind.TransactOpts, _roleId *big.Int, _roleName string) (*types.Transaction, error) { + return _LocalhostSpace.contract.Transact(opts, "updateRole", _roleId, _roleName) +} + +// UpdateRole is a paid mutator transaction binding the contract method 0x32e704cc. +// +// Solidity: function updateRole(uint256 _roleId, string _roleName) returns() +func (_LocalhostSpace *LocalhostSpaceSession) UpdateRole(_roleId *big.Int, _roleName string) (*types.Transaction, error) { + return _LocalhostSpace.Contract.UpdateRole(&_LocalhostSpace.TransactOpts, _roleId, _roleName) +} + +// UpdateRole is a paid mutator transaction binding the contract method 0x32e704cc. +// +// Solidity: function updateRole(uint256 _roleId, string _roleName) returns() +func (_LocalhostSpace *LocalhostSpaceTransactorSession) UpdateRole(_roleId *big.Int, _roleName string) (*types.Transaction, error) { + return _LocalhostSpace.Contract.UpdateRole(&_LocalhostSpace.TransactOpts, _roleId, _roleName) +} + +// UpgradeEntitlement is a paid mutator transaction binding the contract method 0x519607f2. +// +// Solidity: function upgradeEntitlement(address _entitlement, address _newEntitlement) returns() +func (_LocalhostSpace *LocalhostSpaceTransactor) UpgradeEntitlement(opts *bind.TransactOpts, _entitlement common.Address, _newEntitlement common.Address) (*types.Transaction, error) { + return _LocalhostSpace.contract.Transact(opts, "upgradeEntitlement", _entitlement, _newEntitlement) +} + +// UpgradeEntitlement is a paid mutator transaction binding the contract method 0x519607f2. +// +// Solidity: function upgradeEntitlement(address _entitlement, address _newEntitlement) returns() +func (_LocalhostSpace *LocalhostSpaceSession) UpgradeEntitlement(_entitlement common.Address, _newEntitlement common.Address) (*types.Transaction, error) { + return _LocalhostSpace.Contract.UpgradeEntitlement(&_LocalhostSpace.TransactOpts, _entitlement, _newEntitlement) +} + +// UpgradeEntitlement is a paid mutator transaction binding the contract method 0x519607f2. +// +// Solidity: function upgradeEntitlement(address _entitlement, address _newEntitlement) returns() +func (_LocalhostSpace *LocalhostSpaceTransactorSession) UpgradeEntitlement(_entitlement common.Address, _newEntitlement common.Address) (*types.Transaction, error) { + return _LocalhostSpace.Contract.UpgradeEntitlement(&_LocalhostSpace.TransactOpts, _entitlement, _newEntitlement) +} + +// UpgradeTo is a paid mutator transaction binding the contract method 0x3659cfe6. +// +// Solidity: function upgradeTo(address newImplementation) returns() +func (_LocalhostSpace *LocalhostSpaceTransactor) UpgradeTo(opts *bind.TransactOpts, newImplementation common.Address) (*types.Transaction, error) { + return _LocalhostSpace.contract.Transact(opts, "upgradeTo", newImplementation) +} + +// UpgradeTo is a paid mutator transaction binding the contract method 0x3659cfe6. +// +// Solidity: function upgradeTo(address newImplementation) returns() +func (_LocalhostSpace *LocalhostSpaceSession) UpgradeTo(newImplementation common.Address) (*types.Transaction, error) { + return _LocalhostSpace.Contract.UpgradeTo(&_LocalhostSpace.TransactOpts, newImplementation) +} + +// UpgradeTo is a paid mutator transaction binding the contract method 0x3659cfe6. +// +// Solidity: function upgradeTo(address newImplementation) returns() +func (_LocalhostSpace *LocalhostSpaceTransactorSession) UpgradeTo(newImplementation common.Address) (*types.Transaction, error) { + return _LocalhostSpace.Contract.UpgradeTo(&_LocalhostSpace.TransactOpts, newImplementation) +} + +// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286. +// +// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns() +func (_LocalhostSpace *LocalhostSpaceTransactor) UpgradeToAndCall(opts *bind.TransactOpts, newImplementation common.Address, data []byte) (*types.Transaction, error) { + return _LocalhostSpace.contract.Transact(opts, "upgradeToAndCall", newImplementation, data) +} + +// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286. +// +// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns() +func (_LocalhostSpace *LocalhostSpaceSession) UpgradeToAndCall(newImplementation common.Address, data []byte) (*types.Transaction, error) { + return _LocalhostSpace.Contract.UpgradeToAndCall(&_LocalhostSpace.TransactOpts, newImplementation, data) +} + +// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286. +// +// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns() +func (_LocalhostSpace *LocalhostSpaceTransactorSession) UpgradeToAndCall(newImplementation common.Address, data []byte) (*types.Transaction, error) { + return _LocalhostSpace.Contract.UpgradeToAndCall(&_LocalhostSpace.TransactOpts, newImplementation, data) +} + +// LocalhostSpaceAdminChangedIterator is returned from FilterAdminChanged and is used to iterate over the raw logs and unpacked data for AdminChanged events raised by the LocalhostSpace contract. +type LocalhostSpaceAdminChangedIterator struct { + Event *LocalhostSpaceAdminChanged // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *LocalhostSpaceAdminChangedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(LocalhostSpaceAdminChanged) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(LocalhostSpaceAdminChanged) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *LocalhostSpaceAdminChangedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *LocalhostSpaceAdminChangedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// LocalhostSpaceAdminChanged represents a AdminChanged event raised by the LocalhostSpace contract. +type LocalhostSpaceAdminChanged struct { + PreviousAdmin common.Address + NewAdmin common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterAdminChanged is a free log retrieval operation binding the contract event 0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f. +// +// Solidity: event AdminChanged(address previousAdmin, address newAdmin) +func (_LocalhostSpace *LocalhostSpaceFilterer) FilterAdminChanged(opts *bind.FilterOpts) (*LocalhostSpaceAdminChangedIterator, error) { + + logs, sub, err := _LocalhostSpace.contract.FilterLogs(opts, "AdminChanged") + if err != nil { + return nil, err + } + return &LocalhostSpaceAdminChangedIterator{contract: _LocalhostSpace.contract, event: "AdminChanged", logs: logs, sub: sub}, nil +} + +// WatchAdminChanged is a free log subscription operation binding the contract event 0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f. +// +// Solidity: event AdminChanged(address previousAdmin, address newAdmin) +func (_LocalhostSpace *LocalhostSpaceFilterer) WatchAdminChanged(opts *bind.WatchOpts, sink chan<- *LocalhostSpaceAdminChanged) (event.Subscription, error) { + + logs, sub, err := _LocalhostSpace.contract.WatchLogs(opts, "AdminChanged") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(LocalhostSpaceAdminChanged) + if err := _LocalhostSpace.contract.UnpackLog(event, "AdminChanged", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseAdminChanged is a log parse operation binding the contract event 0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f. +// +// Solidity: event AdminChanged(address previousAdmin, address newAdmin) +func (_LocalhostSpace *LocalhostSpaceFilterer) ParseAdminChanged(log types.Log) (*LocalhostSpaceAdminChanged, error) { + event := new(LocalhostSpaceAdminChanged) + if err := _LocalhostSpace.contract.UnpackLog(event, "AdminChanged", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// LocalhostSpaceBeaconUpgradedIterator is returned from FilterBeaconUpgraded and is used to iterate over the raw logs and unpacked data for BeaconUpgraded events raised by the LocalhostSpace contract. +type LocalhostSpaceBeaconUpgradedIterator struct { + Event *LocalhostSpaceBeaconUpgraded // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *LocalhostSpaceBeaconUpgradedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(LocalhostSpaceBeaconUpgraded) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(LocalhostSpaceBeaconUpgraded) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *LocalhostSpaceBeaconUpgradedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *LocalhostSpaceBeaconUpgradedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// LocalhostSpaceBeaconUpgraded represents a BeaconUpgraded event raised by the LocalhostSpace contract. +type LocalhostSpaceBeaconUpgraded struct { + Beacon common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterBeaconUpgraded is a free log retrieval operation binding the contract event 0x1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e. +// +// Solidity: event BeaconUpgraded(address indexed beacon) +func (_LocalhostSpace *LocalhostSpaceFilterer) FilterBeaconUpgraded(opts *bind.FilterOpts, beacon []common.Address) (*LocalhostSpaceBeaconUpgradedIterator, error) { + + var beaconRule []interface{} + for _, beaconItem := range beacon { + beaconRule = append(beaconRule, beaconItem) + } + + logs, sub, err := _LocalhostSpace.contract.FilterLogs(opts, "BeaconUpgraded", beaconRule) + if err != nil { + return nil, err + } + return &LocalhostSpaceBeaconUpgradedIterator{contract: _LocalhostSpace.contract, event: "BeaconUpgraded", logs: logs, sub: sub}, nil +} + +// WatchBeaconUpgraded is a free log subscription operation binding the contract event 0x1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e. +// +// Solidity: event BeaconUpgraded(address indexed beacon) +func (_LocalhostSpace *LocalhostSpaceFilterer) WatchBeaconUpgraded(opts *bind.WatchOpts, sink chan<- *LocalhostSpaceBeaconUpgraded, beacon []common.Address) (event.Subscription, error) { + + var beaconRule []interface{} + for _, beaconItem := range beacon { + beaconRule = append(beaconRule, beaconItem) + } + + logs, sub, err := _LocalhostSpace.contract.WatchLogs(opts, "BeaconUpgraded", beaconRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(LocalhostSpaceBeaconUpgraded) + if err := _LocalhostSpace.contract.UnpackLog(event, "BeaconUpgraded", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseBeaconUpgraded is a log parse operation binding the contract event 0x1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e. +// +// Solidity: event BeaconUpgraded(address indexed beacon) +func (_LocalhostSpace *LocalhostSpaceFilterer) ParseBeaconUpgraded(log types.Log) (*LocalhostSpaceBeaconUpgraded, error) { + event := new(LocalhostSpaceBeaconUpgraded) + if err := _LocalhostSpace.contract.UnpackLog(event, "BeaconUpgraded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// LocalhostSpaceInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the LocalhostSpace contract. +type LocalhostSpaceInitializedIterator struct { + Event *LocalhostSpaceInitialized // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *LocalhostSpaceInitializedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(LocalhostSpaceInitialized) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(LocalhostSpaceInitialized) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *LocalhostSpaceInitializedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *LocalhostSpaceInitializedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// LocalhostSpaceInitialized represents a Initialized event raised by the LocalhostSpace contract. +type LocalhostSpaceInitialized struct { + Version uint8 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterInitialized is a free log retrieval operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_LocalhostSpace *LocalhostSpaceFilterer) FilterInitialized(opts *bind.FilterOpts) (*LocalhostSpaceInitializedIterator, error) { + + logs, sub, err := _LocalhostSpace.contract.FilterLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return &LocalhostSpaceInitializedIterator{contract: _LocalhostSpace.contract, event: "Initialized", logs: logs, sub: sub}, nil +} + +// WatchInitialized is a free log subscription operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_LocalhostSpace *LocalhostSpaceFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *LocalhostSpaceInitialized) (event.Subscription, error) { + + logs, sub, err := _LocalhostSpace.contract.WatchLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(LocalhostSpaceInitialized) + if err := _LocalhostSpace.contract.UnpackLog(event, "Initialized", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseInitialized is a log parse operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_LocalhostSpace *LocalhostSpaceFilterer) ParseInitialized(log types.Log) (*LocalhostSpaceInitialized, error) { + event := new(LocalhostSpaceInitialized) + if err := _LocalhostSpace.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// LocalhostSpaceUpgradedIterator is returned from FilterUpgraded and is used to iterate over the raw logs and unpacked data for Upgraded events raised by the LocalhostSpace contract. +type LocalhostSpaceUpgradedIterator struct { + Event *LocalhostSpaceUpgraded // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *LocalhostSpaceUpgradedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(LocalhostSpaceUpgraded) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(LocalhostSpaceUpgraded) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *LocalhostSpaceUpgradedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *LocalhostSpaceUpgradedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// LocalhostSpaceUpgraded represents a Upgraded event raised by the LocalhostSpace contract. +type LocalhostSpaceUpgraded struct { + Implementation common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUpgraded is a free log retrieval operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b. +// +// Solidity: event Upgraded(address indexed implementation) +func (_LocalhostSpace *LocalhostSpaceFilterer) FilterUpgraded(opts *bind.FilterOpts, implementation []common.Address) (*LocalhostSpaceUpgradedIterator, error) { + + var implementationRule []interface{} + for _, implementationItem := range implementation { + implementationRule = append(implementationRule, implementationItem) + } + + logs, sub, err := _LocalhostSpace.contract.FilterLogs(opts, "Upgraded", implementationRule) + if err != nil { + return nil, err + } + return &LocalhostSpaceUpgradedIterator{contract: _LocalhostSpace.contract, event: "Upgraded", logs: logs, sub: sub}, nil +} + +// WatchUpgraded is a free log subscription operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b. +// +// Solidity: event Upgraded(address indexed implementation) +func (_LocalhostSpace *LocalhostSpaceFilterer) WatchUpgraded(opts *bind.WatchOpts, sink chan<- *LocalhostSpaceUpgraded, implementation []common.Address) (event.Subscription, error) { + + var implementationRule []interface{} + for _, implementationItem := range implementation { + implementationRule = append(implementationRule, implementationItem) + } + + logs, sub, err := _LocalhostSpace.contract.WatchLogs(opts, "Upgraded", implementationRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(LocalhostSpaceUpgraded) + if err := _LocalhostSpace.contract.UnpackLog(event, "Upgraded", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseUpgraded is a log parse operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b. +// +// Solidity: event Upgraded(address indexed implementation) +func (_LocalhostSpace *LocalhostSpaceFilterer) ParseUpgraded(log types.Log) (*LocalhostSpaceUpgraded, error) { + event := new(LocalhostSpaceUpgraded) + if err := _LocalhostSpace.contract.UnpackLog(event, "Upgraded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/zion/contracts/localhost_space_factory/localhost_space_factory.go b/zion/contracts/localhost_space_factory/localhost_space_factory.go new file mode 100644 index 000000000..58ee8f8df --- /dev/null +++ b/zion/contracts/localhost_space_factory/localhost_space_factory.go @@ -0,0 +1,1446 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package localhost_space_factory + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription +) + +// DataTypesCreateSpaceExtraEntitlements is an auto generated low-level Go binding around an user-defined struct. +type DataTypesCreateSpaceExtraEntitlements struct { + RoleName string + Permissions []string + Tokens []DataTypesExternalToken + Users []common.Address +} + +// DataTypesExternalToken is an auto generated low-level Go binding around an user-defined struct. +type DataTypesExternalToken struct { + ContractAddress common.Address + Quantity *big.Int + IsSingleToken bool + TokenIds []*big.Int +} + +// LocalhostSpaceFactoryMetaData contains all meta data concerning the LocalhostSpaceFactory contract. +var LocalhostSpaceFactoryMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"InvalidParameters\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NameContainsInvalidCharacters\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NameLengthInvalid\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PermissionAlreadyExists\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SpaceAlreadyRegistered\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"SPACE_IMPLEMENTATION_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"SPACE_TOKEN_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"TOKEN_IMPLEMENTATION_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"USER_IMPLEMENTATION_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string[]\",\"name\":\"_permissions\",\"type\":\"string[]\"}],\"name\":\"addOwnerPermissions\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"spaceName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"spaceNetworkId\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"spaceMetadata\",\"type\":\"string\"},{\"internalType\":\"string[]\",\"name\":\"_everyonePermissions\",\"type\":\"string[]\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"roleName\",\"type\":\"string\"},{\"internalType\":\"string[]\",\"name\":\"permissions\",\"type\":\"string[]\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"isSingleToken\",\"type\":\"bool\"},{\"internalType\":\"uint256[]\",\"name\":\"tokenIds\",\"type\":\"uint256[]\"}],\"internalType\":\"structDataTypes.ExternalToken[]\",\"name\":\"tokens\",\"type\":\"tuple[]\"},{\"internalType\":\"address[]\",\"name\":\"users\",\"type\":\"address[]\"}],\"internalType\":\"structDataTypes.CreateSpaceExtraEntitlements\",\"name\":\"_extraEntitlements\",\"type\":\"tuple\"}],\"name\":\"createSpace\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"_spaceAddress\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getOwnerPermissions\",\"outputs\":[{\"internalType\":\"string[]\",\"name\":\"\",\"type\":\"string[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"spaceNetworkId\",\"type\":\"string\"}],\"name\":\"getSpaceAddressByNetworkId\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"spaceNetworkId\",\"type\":\"string\"}],\"name\":\"getTokenIdByNetworkId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_space\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_tokenEntitlement\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_userEntitlement\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_spaceToken\",\"type\":\"address\"},{\"internalType\":\"string[]\",\"name\":\"_permissions\",\"type\":\"string[]\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"ownerPermissions\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"spaceByHash\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"tokenByHash\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_space\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_tokenEntitlement\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_userEntitlement\",\"type\":\"address\"}],\"name\":\"updateImplementations\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}]", +} + +// LocalhostSpaceFactoryABI is the input ABI used to generate the binding from. +// Deprecated: Use LocalhostSpaceFactoryMetaData.ABI instead. +var LocalhostSpaceFactoryABI = LocalhostSpaceFactoryMetaData.ABI + +// LocalhostSpaceFactory is an auto generated Go binding around an Ethereum contract. +type LocalhostSpaceFactory struct { + LocalhostSpaceFactoryCaller // Read-only binding to the contract + LocalhostSpaceFactoryTransactor // Write-only binding to the contract + LocalhostSpaceFactoryFilterer // Log filterer for contract events +} + +// LocalhostSpaceFactoryCaller is an auto generated read-only Go binding around an Ethereum contract. +type LocalhostSpaceFactoryCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// LocalhostSpaceFactoryTransactor is an auto generated write-only Go binding around an Ethereum contract. +type LocalhostSpaceFactoryTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// LocalhostSpaceFactoryFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type LocalhostSpaceFactoryFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// LocalhostSpaceFactorySession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type LocalhostSpaceFactorySession struct { + Contract *LocalhostSpaceFactory // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// LocalhostSpaceFactoryCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type LocalhostSpaceFactoryCallerSession struct { + Contract *LocalhostSpaceFactoryCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// LocalhostSpaceFactoryTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type LocalhostSpaceFactoryTransactorSession struct { + Contract *LocalhostSpaceFactoryTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// LocalhostSpaceFactoryRaw is an auto generated low-level Go binding around an Ethereum contract. +type LocalhostSpaceFactoryRaw struct { + Contract *LocalhostSpaceFactory // Generic contract binding to access the raw methods on +} + +// LocalhostSpaceFactoryCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type LocalhostSpaceFactoryCallerRaw struct { + Contract *LocalhostSpaceFactoryCaller // Generic read-only contract binding to access the raw methods on +} + +// LocalhostSpaceFactoryTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type LocalhostSpaceFactoryTransactorRaw struct { + Contract *LocalhostSpaceFactoryTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewLocalhostSpaceFactory creates a new instance of LocalhostSpaceFactory, bound to a specific deployed contract. +func NewLocalhostSpaceFactory(address common.Address, backend bind.ContractBackend) (*LocalhostSpaceFactory, error) { + contract, err := bindLocalhostSpaceFactory(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &LocalhostSpaceFactory{LocalhostSpaceFactoryCaller: LocalhostSpaceFactoryCaller{contract: contract}, LocalhostSpaceFactoryTransactor: LocalhostSpaceFactoryTransactor{contract: contract}, LocalhostSpaceFactoryFilterer: LocalhostSpaceFactoryFilterer{contract: contract}}, nil +} + +// NewLocalhostSpaceFactoryCaller creates a new read-only instance of LocalhostSpaceFactory, bound to a specific deployed contract. +func NewLocalhostSpaceFactoryCaller(address common.Address, caller bind.ContractCaller) (*LocalhostSpaceFactoryCaller, error) { + contract, err := bindLocalhostSpaceFactory(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &LocalhostSpaceFactoryCaller{contract: contract}, nil +} + +// NewLocalhostSpaceFactoryTransactor creates a new write-only instance of LocalhostSpaceFactory, bound to a specific deployed contract. +func NewLocalhostSpaceFactoryTransactor(address common.Address, transactor bind.ContractTransactor) (*LocalhostSpaceFactoryTransactor, error) { + contract, err := bindLocalhostSpaceFactory(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &LocalhostSpaceFactoryTransactor{contract: contract}, nil +} + +// NewLocalhostSpaceFactoryFilterer creates a new log filterer instance of LocalhostSpaceFactory, bound to a specific deployed contract. +func NewLocalhostSpaceFactoryFilterer(address common.Address, filterer bind.ContractFilterer) (*LocalhostSpaceFactoryFilterer, error) { + contract, err := bindLocalhostSpaceFactory(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &LocalhostSpaceFactoryFilterer{contract: contract}, nil +} + +// bindLocalhostSpaceFactory binds a generic wrapper to an already deployed contract. +func bindLocalhostSpaceFactory(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(LocalhostSpaceFactoryABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _LocalhostSpaceFactory.Contract.LocalhostSpaceFactoryCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _LocalhostSpaceFactory.Contract.LocalhostSpaceFactoryTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _LocalhostSpaceFactory.Contract.LocalhostSpaceFactoryTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _LocalhostSpaceFactory.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _LocalhostSpaceFactory.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _LocalhostSpaceFactory.Contract.contract.Transact(opts, method, params...) +} + +// SPACEIMPLEMENTATIONADDRESS is a free data retrieval call binding the contract method 0xf21cd401. +// +// Solidity: function SPACE_IMPLEMENTATION_ADDRESS() view returns(address) +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryCaller) SPACEIMPLEMENTATIONADDRESS(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _LocalhostSpaceFactory.contract.Call(opts, &out, "SPACE_IMPLEMENTATION_ADDRESS") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// SPACEIMPLEMENTATIONADDRESS is a free data retrieval call binding the contract method 0xf21cd401. +// +// Solidity: function SPACE_IMPLEMENTATION_ADDRESS() view returns(address) +func (_LocalhostSpaceFactory *LocalhostSpaceFactorySession) SPACEIMPLEMENTATIONADDRESS() (common.Address, error) { + return _LocalhostSpaceFactory.Contract.SPACEIMPLEMENTATIONADDRESS(&_LocalhostSpaceFactory.CallOpts) +} + +// SPACEIMPLEMENTATIONADDRESS is a free data retrieval call binding the contract method 0xf21cd401. +// +// Solidity: function SPACE_IMPLEMENTATION_ADDRESS() view returns(address) +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryCallerSession) SPACEIMPLEMENTATIONADDRESS() (common.Address, error) { + return _LocalhostSpaceFactory.Contract.SPACEIMPLEMENTATIONADDRESS(&_LocalhostSpaceFactory.CallOpts) +} + +// SPACETOKENADDRESS is a free data retrieval call binding the contract method 0x683c72b6. +// +// Solidity: function SPACE_TOKEN_ADDRESS() view returns(address) +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryCaller) SPACETOKENADDRESS(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _LocalhostSpaceFactory.contract.Call(opts, &out, "SPACE_TOKEN_ADDRESS") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// SPACETOKENADDRESS is a free data retrieval call binding the contract method 0x683c72b6. +// +// Solidity: function SPACE_TOKEN_ADDRESS() view returns(address) +func (_LocalhostSpaceFactory *LocalhostSpaceFactorySession) SPACETOKENADDRESS() (common.Address, error) { + return _LocalhostSpaceFactory.Contract.SPACETOKENADDRESS(&_LocalhostSpaceFactory.CallOpts) +} + +// SPACETOKENADDRESS is a free data retrieval call binding the contract method 0x683c72b6. +// +// Solidity: function SPACE_TOKEN_ADDRESS() view returns(address) +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryCallerSession) SPACETOKENADDRESS() (common.Address, error) { + return _LocalhostSpaceFactory.Contract.SPACETOKENADDRESS(&_LocalhostSpaceFactory.CallOpts) +} + +// TOKENIMPLEMENTATIONADDRESS is a free data retrieval call binding the contract method 0xcfc27037. +// +// Solidity: function TOKEN_IMPLEMENTATION_ADDRESS() view returns(address) +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryCaller) TOKENIMPLEMENTATIONADDRESS(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _LocalhostSpaceFactory.contract.Call(opts, &out, "TOKEN_IMPLEMENTATION_ADDRESS") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// TOKENIMPLEMENTATIONADDRESS is a free data retrieval call binding the contract method 0xcfc27037. +// +// Solidity: function TOKEN_IMPLEMENTATION_ADDRESS() view returns(address) +func (_LocalhostSpaceFactory *LocalhostSpaceFactorySession) TOKENIMPLEMENTATIONADDRESS() (common.Address, error) { + return _LocalhostSpaceFactory.Contract.TOKENIMPLEMENTATIONADDRESS(&_LocalhostSpaceFactory.CallOpts) +} + +// TOKENIMPLEMENTATIONADDRESS is a free data retrieval call binding the contract method 0xcfc27037. +// +// Solidity: function TOKEN_IMPLEMENTATION_ADDRESS() view returns(address) +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryCallerSession) TOKENIMPLEMENTATIONADDRESS() (common.Address, error) { + return _LocalhostSpaceFactory.Contract.TOKENIMPLEMENTATIONADDRESS(&_LocalhostSpaceFactory.CallOpts) +} + +// USERIMPLEMENTATIONADDRESS is a free data retrieval call binding the contract method 0x08bc0b4b. +// +// Solidity: function USER_IMPLEMENTATION_ADDRESS() view returns(address) +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryCaller) USERIMPLEMENTATIONADDRESS(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _LocalhostSpaceFactory.contract.Call(opts, &out, "USER_IMPLEMENTATION_ADDRESS") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// USERIMPLEMENTATIONADDRESS is a free data retrieval call binding the contract method 0x08bc0b4b. +// +// Solidity: function USER_IMPLEMENTATION_ADDRESS() view returns(address) +func (_LocalhostSpaceFactory *LocalhostSpaceFactorySession) USERIMPLEMENTATIONADDRESS() (common.Address, error) { + return _LocalhostSpaceFactory.Contract.USERIMPLEMENTATIONADDRESS(&_LocalhostSpaceFactory.CallOpts) +} + +// USERIMPLEMENTATIONADDRESS is a free data retrieval call binding the contract method 0x08bc0b4b. +// +// Solidity: function USER_IMPLEMENTATION_ADDRESS() view returns(address) +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryCallerSession) USERIMPLEMENTATIONADDRESS() (common.Address, error) { + return _LocalhostSpaceFactory.Contract.USERIMPLEMENTATIONADDRESS(&_LocalhostSpaceFactory.CallOpts) +} + +// GetOwnerPermissions is a free data retrieval call binding the contract method 0xdf2cd9fe. +// +// Solidity: function getOwnerPermissions() view returns(string[]) +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryCaller) GetOwnerPermissions(opts *bind.CallOpts) ([]string, error) { + var out []interface{} + err := _LocalhostSpaceFactory.contract.Call(opts, &out, "getOwnerPermissions") + + if err != nil { + return *new([]string), err + } + + out0 := *abi.ConvertType(out[0], new([]string)).(*[]string) + + return out0, err + +} + +// GetOwnerPermissions is a free data retrieval call binding the contract method 0xdf2cd9fe. +// +// Solidity: function getOwnerPermissions() view returns(string[]) +func (_LocalhostSpaceFactory *LocalhostSpaceFactorySession) GetOwnerPermissions() ([]string, error) { + return _LocalhostSpaceFactory.Contract.GetOwnerPermissions(&_LocalhostSpaceFactory.CallOpts) +} + +// GetOwnerPermissions is a free data retrieval call binding the contract method 0xdf2cd9fe. +// +// Solidity: function getOwnerPermissions() view returns(string[]) +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryCallerSession) GetOwnerPermissions() ([]string, error) { + return _LocalhostSpaceFactory.Contract.GetOwnerPermissions(&_LocalhostSpaceFactory.CallOpts) +} + +// GetSpaceAddressByNetworkId is a free data retrieval call binding the contract method 0x96dc21e4. +// +// Solidity: function getSpaceAddressByNetworkId(string spaceNetworkId) view returns(address) +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryCaller) GetSpaceAddressByNetworkId(opts *bind.CallOpts, spaceNetworkId string) (common.Address, error) { + var out []interface{} + err := _LocalhostSpaceFactory.contract.Call(opts, &out, "getSpaceAddressByNetworkId", spaceNetworkId) + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// GetSpaceAddressByNetworkId is a free data retrieval call binding the contract method 0x96dc21e4. +// +// Solidity: function getSpaceAddressByNetworkId(string spaceNetworkId) view returns(address) +func (_LocalhostSpaceFactory *LocalhostSpaceFactorySession) GetSpaceAddressByNetworkId(spaceNetworkId string) (common.Address, error) { + return _LocalhostSpaceFactory.Contract.GetSpaceAddressByNetworkId(&_LocalhostSpaceFactory.CallOpts, spaceNetworkId) +} + +// GetSpaceAddressByNetworkId is a free data retrieval call binding the contract method 0x96dc21e4. +// +// Solidity: function getSpaceAddressByNetworkId(string spaceNetworkId) view returns(address) +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryCallerSession) GetSpaceAddressByNetworkId(spaceNetworkId string) (common.Address, error) { + return _LocalhostSpaceFactory.Contract.GetSpaceAddressByNetworkId(&_LocalhostSpaceFactory.CallOpts, spaceNetworkId) +} + +// GetTokenIdByNetworkId is a free data retrieval call binding the contract method 0x8a9ef426. +// +// Solidity: function getTokenIdByNetworkId(string spaceNetworkId) view returns(uint256) +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryCaller) GetTokenIdByNetworkId(opts *bind.CallOpts, spaceNetworkId string) (*big.Int, error) { + var out []interface{} + err := _LocalhostSpaceFactory.contract.Call(opts, &out, "getTokenIdByNetworkId", spaceNetworkId) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetTokenIdByNetworkId is a free data retrieval call binding the contract method 0x8a9ef426. +// +// Solidity: function getTokenIdByNetworkId(string spaceNetworkId) view returns(uint256) +func (_LocalhostSpaceFactory *LocalhostSpaceFactorySession) GetTokenIdByNetworkId(spaceNetworkId string) (*big.Int, error) { + return _LocalhostSpaceFactory.Contract.GetTokenIdByNetworkId(&_LocalhostSpaceFactory.CallOpts, spaceNetworkId) +} + +// GetTokenIdByNetworkId is a free data retrieval call binding the contract method 0x8a9ef426. +// +// Solidity: function getTokenIdByNetworkId(string spaceNetworkId) view returns(uint256) +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryCallerSession) GetTokenIdByNetworkId(spaceNetworkId string) (*big.Int, error) { + return _LocalhostSpaceFactory.Contract.GetTokenIdByNetworkId(&_LocalhostSpaceFactory.CallOpts, spaceNetworkId) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _LocalhostSpaceFactory.contract.Call(opts, &out, "owner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_LocalhostSpaceFactory *LocalhostSpaceFactorySession) Owner() (common.Address, error) { + return _LocalhostSpaceFactory.Contract.Owner(&_LocalhostSpaceFactory.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryCallerSession) Owner() (common.Address, error) { + return _LocalhostSpaceFactory.Contract.Owner(&_LocalhostSpaceFactory.CallOpts) +} + +// OwnerPermissions is a free data retrieval call binding the contract method 0xb28032f9. +// +// Solidity: function ownerPermissions(uint256 ) view returns(string) +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryCaller) OwnerPermissions(opts *bind.CallOpts, arg0 *big.Int) (string, error) { + var out []interface{} + err := _LocalhostSpaceFactory.contract.Call(opts, &out, "ownerPermissions", arg0) + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// OwnerPermissions is a free data retrieval call binding the contract method 0xb28032f9. +// +// Solidity: function ownerPermissions(uint256 ) view returns(string) +func (_LocalhostSpaceFactory *LocalhostSpaceFactorySession) OwnerPermissions(arg0 *big.Int) (string, error) { + return _LocalhostSpaceFactory.Contract.OwnerPermissions(&_LocalhostSpaceFactory.CallOpts, arg0) +} + +// OwnerPermissions is a free data retrieval call binding the contract method 0xb28032f9. +// +// Solidity: function ownerPermissions(uint256 ) view returns(string) +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryCallerSession) OwnerPermissions(arg0 *big.Int) (string, error) { + return _LocalhostSpaceFactory.Contract.OwnerPermissions(&_LocalhostSpaceFactory.CallOpts, arg0) +} + +// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryCaller) ProxiableUUID(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _LocalhostSpaceFactory.contract.Call(opts, &out, "proxiableUUID") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (_LocalhostSpaceFactory *LocalhostSpaceFactorySession) ProxiableUUID() ([32]byte, error) { + return _LocalhostSpaceFactory.Contract.ProxiableUUID(&_LocalhostSpaceFactory.CallOpts) +} + +// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryCallerSession) ProxiableUUID() ([32]byte, error) { + return _LocalhostSpaceFactory.Contract.ProxiableUUID(&_LocalhostSpaceFactory.CallOpts) +} + +// SpaceByHash is a free data retrieval call binding the contract method 0x3312540a. +// +// Solidity: function spaceByHash(bytes32 ) view returns(address) +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryCaller) SpaceByHash(opts *bind.CallOpts, arg0 [32]byte) (common.Address, error) { + var out []interface{} + err := _LocalhostSpaceFactory.contract.Call(opts, &out, "spaceByHash", arg0) + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// SpaceByHash is a free data retrieval call binding the contract method 0x3312540a. +// +// Solidity: function spaceByHash(bytes32 ) view returns(address) +func (_LocalhostSpaceFactory *LocalhostSpaceFactorySession) SpaceByHash(arg0 [32]byte) (common.Address, error) { + return _LocalhostSpaceFactory.Contract.SpaceByHash(&_LocalhostSpaceFactory.CallOpts, arg0) +} + +// SpaceByHash is a free data retrieval call binding the contract method 0x3312540a. +// +// Solidity: function spaceByHash(bytes32 ) view returns(address) +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryCallerSession) SpaceByHash(arg0 [32]byte) (common.Address, error) { + return _LocalhostSpaceFactory.Contract.SpaceByHash(&_LocalhostSpaceFactory.CallOpts, arg0) +} + +// TokenByHash is a free data retrieval call binding the contract method 0xf3aba305. +// +// Solidity: function tokenByHash(bytes32 ) view returns(uint256) +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryCaller) TokenByHash(opts *bind.CallOpts, arg0 [32]byte) (*big.Int, error) { + var out []interface{} + err := _LocalhostSpaceFactory.contract.Call(opts, &out, "tokenByHash", arg0) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// TokenByHash is a free data retrieval call binding the contract method 0xf3aba305. +// +// Solidity: function tokenByHash(bytes32 ) view returns(uint256) +func (_LocalhostSpaceFactory *LocalhostSpaceFactorySession) TokenByHash(arg0 [32]byte) (*big.Int, error) { + return _LocalhostSpaceFactory.Contract.TokenByHash(&_LocalhostSpaceFactory.CallOpts, arg0) +} + +// TokenByHash is a free data retrieval call binding the contract method 0xf3aba305. +// +// Solidity: function tokenByHash(bytes32 ) view returns(uint256) +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryCallerSession) TokenByHash(arg0 [32]byte) (*big.Int, error) { + return _LocalhostSpaceFactory.Contract.TokenByHash(&_LocalhostSpaceFactory.CallOpts, arg0) +} + +// AddOwnerPermissions is a paid mutator transaction binding the contract method 0xbe8b5967. +// +// Solidity: function addOwnerPermissions(string[] _permissions) returns() +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryTransactor) AddOwnerPermissions(opts *bind.TransactOpts, _permissions []string) (*types.Transaction, error) { + return _LocalhostSpaceFactory.contract.Transact(opts, "addOwnerPermissions", _permissions) +} + +// AddOwnerPermissions is a paid mutator transaction binding the contract method 0xbe8b5967. +// +// Solidity: function addOwnerPermissions(string[] _permissions) returns() +func (_LocalhostSpaceFactory *LocalhostSpaceFactorySession) AddOwnerPermissions(_permissions []string) (*types.Transaction, error) { + return _LocalhostSpaceFactory.Contract.AddOwnerPermissions(&_LocalhostSpaceFactory.TransactOpts, _permissions) +} + +// AddOwnerPermissions is a paid mutator transaction binding the contract method 0xbe8b5967. +// +// Solidity: function addOwnerPermissions(string[] _permissions) returns() +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryTransactorSession) AddOwnerPermissions(_permissions []string) (*types.Transaction, error) { + return _LocalhostSpaceFactory.Contract.AddOwnerPermissions(&_LocalhostSpaceFactory.TransactOpts, _permissions) +} + +// CreateSpace is a paid mutator transaction binding the contract method 0xad78faf3. +// +// Solidity: function createSpace(string spaceName, string spaceNetworkId, string spaceMetadata, string[] _everyonePermissions, (string,string[],(address,uint256,bool,uint256[])[],address[]) _extraEntitlements) returns(address _spaceAddress) +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryTransactor) CreateSpace(opts *bind.TransactOpts, spaceName string, spaceNetworkId string, spaceMetadata string, _everyonePermissions []string, _extraEntitlements DataTypesCreateSpaceExtraEntitlements) (*types.Transaction, error) { + return _LocalhostSpaceFactory.contract.Transact(opts, "createSpace", spaceName, spaceNetworkId, spaceMetadata, _everyonePermissions, _extraEntitlements) +} + +// CreateSpace is a paid mutator transaction binding the contract method 0xad78faf3. +// +// Solidity: function createSpace(string spaceName, string spaceNetworkId, string spaceMetadata, string[] _everyonePermissions, (string,string[],(address,uint256,bool,uint256[])[],address[]) _extraEntitlements) returns(address _spaceAddress) +func (_LocalhostSpaceFactory *LocalhostSpaceFactorySession) CreateSpace(spaceName string, spaceNetworkId string, spaceMetadata string, _everyonePermissions []string, _extraEntitlements DataTypesCreateSpaceExtraEntitlements) (*types.Transaction, error) { + return _LocalhostSpaceFactory.Contract.CreateSpace(&_LocalhostSpaceFactory.TransactOpts, spaceName, spaceNetworkId, spaceMetadata, _everyonePermissions, _extraEntitlements) +} + +// CreateSpace is a paid mutator transaction binding the contract method 0xad78faf3. +// +// Solidity: function createSpace(string spaceName, string spaceNetworkId, string spaceMetadata, string[] _everyonePermissions, (string,string[],(address,uint256,bool,uint256[])[],address[]) _extraEntitlements) returns(address _spaceAddress) +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryTransactorSession) CreateSpace(spaceName string, spaceNetworkId string, spaceMetadata string, _everyonePermissions []string, _extraEntitlements DataTypesCreateSpaceExtraEntitlements) (*types.Transaction, error) { + return _LocalhostSpaceFactory.Contract.CreateSpace(&_LocalhostSpaceFactory.TransactOpts, spaceName, spaceNetworkId, spaceMetadata, _everyonePermissions, _extraEntitlements) +} + +// Initialize is a paid mutator transaction binding the contract method 0x45bfa5b1. +// +// Solidity: function initialize(address _space, address _tokenEntitlement, address _userEntitlement, address _spaceToken, string[] _permissions) returns() +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryTransactor) Initialize(opts *bind.TransactOpts, _space common.Address, _tokenEntitlement common.Address, _userEntitlement common.Address, _spaceToken common.Address, _permissions []string) (*types.Transaction, error) { + return _LocalhostSpaceFactory.contract.Transact(opts, "initialize", _space, _tokenEntitlement, _userEntitlement, _spaceToken, _permissions) +} + +// Initialize is a paid mutator transaction binding the contract method 0x45bfa5b1. +// +// Solidity: function initialize(address _space, address _tokenEntitlement, address _userEntitlement, address _spaceToken, string[] _permissions) returns() +func (_LocalhostSpaceFactory *LocalhostSpaceFactorySession) Initialize(_space common.Address, _tokenEntitlement common.Address, _userEntitlement common.Address, _spaceToken common.Address, _permissions []string) (*types.Transaction, error) { + return _LocalhostSpaceFactory.Contract.Initialize(&_LocalhostSpaceFactory.TransactOpts, _space, _tokenEntitlement, _userEntitlement, _spaceToken, _permissions) +} + +// Initialize is a paid mutator transaction binding the contract method 0x45bfa5b1. +// +// Solidity: function initialize(address _space, address _tokenEntitlement, address _userEntitlement, address _spaceToken, string[] _permissions) returns() +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryTransactorSession) Initialize(_space common.Address, _tokenEntitlement common.Address, _userEntitlement common.Address, _spaceToken common.Address, _permissions []string) (*types.Transaction, error) { + return _LocalhostSpaceFactory.Contract.Initialize(&_LocalhostSpaceFactory.TransactOpts, _space, _tokenEntitlement, _userEntitlement, _spaceToken, _permissions) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _LocalhostSpaceFactory.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_LocalhostSpaceFactory *LocalhostSpaceFactorySession) RenounceOwnership() (*types.Transaction, error) { + return _LocalhostSpaceFactory.Contract.RenounceOwnership(&_LocalhostSpaceFactory.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _LocalhostSpaceFactory.Contract.RenounceOwnership(&_LocalhostSpaceFactory.TransactOpts) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _LocalhostSpaceFactory.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_LocalhostSpaceFactory *LocalhostSpaceFactorySession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _LocalhostSpaceFactory.Contract.TransferOwnership(&_LocalhostSpaceFactory.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _LocalhostSpaceFactory.Contract.TransferOwnership(&_LocalhostSpaceFactory.TransactOpts, newOwner) +} + +// UpdateImplementations is a paid mutator transaction binding the contract method 0xdfc666ff. +// +// Solidity: function updateImplementations(address _space, address _tokenEntitlement, address _userEntitlement) returns() +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryTransactor) UpdateImplementations(opts *bind.TransactOpts, _space common.Address, _tokenEntitlement common.Address, _userEntitlement common.Address) (*types.Transaction, error) { + return _LocalhostSpaceFactory.contract.Transact(opts, "updateImplementations", _space, _tokenEntitlement, _userEntitlement) +} + +// UpdateImplementations is a paid mutator transaction binding the contract method 0xdfc666ff. +// +// Solidity: function updateImplementations(address _space, address _tokenEntitlement, address _userEntitlement) returns() +func (_LocalhostSpaceFactory *LocalhostSpaceFactorySession) UpdateImplementations(_space common.Address, _tokenEntitlement common.Address, _userEntitlement common.Address) (*types.Transaction, error) { + return _LocalhostSpaceFactory.Contract.UpdateImplementations(&_LocalhostSpaceFactory.TransactOpts, _space, _tokenEntitlement, _userEntitlement) +} + +// UpdateImplementations is a paid mutator transaction binding the contract method 0xdfc666ff. +// +// Solidity: function updateImplementations(address _space, address _tokenEntitlement, address _userEntitlement) returns() +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryTransactorSession) UpdateImplementations(_space common.Address, _tokenEntitlement common.Address, _userEntitlement common.Address) (*types.Transaction, error) { + return _LocalhostSpaceFactory.Contract.UpdateImplementations(&_LocalhostSpaceFactory.TransactOpts, _space, _tokenEntitlement, _userEntitlement) +} + +// UpgradeTo is a paid mutator transaction binding the contract method 0x3659cfe6. +// +// Solidity: function upgradeTo(address newImplementation) returns() +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryTransactor) UpgradeTo(opts *bind.TransactOpts, newImplementation common.Address) (*types.Transaction, error) { + return _LocalhostSpaceFactory.contract.Transact(opts, "upgradeTo", newImplementation) +} + +// UpgradeTo is a paid mutator transaction binding the contract method 0x3659cfe6. +// +// Solidity: function upgradeTo(address newImplementation) returns() +func (_LocalhostSpaceFactory *LocalhostSpaceFactorySession) UpgradeTo(newImplementation common.Address) (*types.Transaction, error) { + return _LocalhostSpaceFactory.Contract.UpgradeTo(&_LocalhostSpaceFactory.TransactOpts, newImplementation) +} + +// UpgradeTo is a paid mutator transaction binding the contract method 0x3659cfe6. +// +// Solidity: function upgradeTo(address newImplementation) returns() +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryTransactorSession) UpgradeTo(newImplementation common.Address) (*types.Transaction, error) { + return _LocalhostSpaceFactory.Contract.UpgradeTo(&_LocalhostSpaceFactory.TransactOpts, newImplementation) +} + +// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286. +// +// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns() +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryTransactor) UpgradeToAndCall(opts *bind.TransactOpts, newImplementation common.Address, data []byte) (*types.Transaction, error) { + return _LocalhostSpaceFactory.contract.Transact(opts, "upgradeToAndCall", newImplementation, data) +} + +// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286. +// +// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns() +func (_LocalhostSpaceFactory *LocalhostSpaceFactorySession) UpgradeToAndCall(newImplementation common.Address, data []byte) (*types.Transaction, error) { + return _LocalhostSpaceFactory.Contract.UpgradeToAndCall(&_LocalhostSpaceFactory.TransactOpts, newImplementation, data) +} + +// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286. +// +// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns() +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryTransactorSession) UpgradeToAndCall(newImplementation common.Address, data []byte) (*types.Transaction, error) { + return _LocalhostSpaceFactory.Contract.UpgradeToAndCall(&_LocalhostSpaceFactory.TransactOpts, newImplementation, data) +} + +// LocalhostSpaceFactoryAdminChangedIterator is returned from FilterAdminChanged and is used to iterate over the raw logs and unpacked data for AdminChanged events raised by the LocalhostSpaceFactory contract. +type LocalhostSpaceFactoryAdminChangedIterator struct { + Event *LocalhostSpaceFactoryAdminChanged // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *LocalhostSpaceFactoryAdminChangedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(LocalhostSpaceFactoryAdminChanged) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(LocalhostSpaceFactoryAdminChanged) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *LocalhostSpaceFactoryAdminChangedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *LocalhostSpaceFactoryAdminChangedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// LocalhostSpaceFactoryAdminChanged represents a AdminChanged event raised by the LocalhostSpaceFactory contract. +type LocalhostSpaceFactoryAdminChanged struct { + PreviousAdmin common.Address + NewAdmin common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterAdminChanged is a free log retrieval operation binding the contract event 0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f. +// +// Solidity: event AdminChanged(address previousAdmin, address newAdmin) +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryFilterer) FilterAdminChanged(opts *bind.FilterOpts) (*LocalhostSpaceFactoryAdminChangedIterator, error) { + + logs, sub, err := _LocalhostSpaceFactory.contract.FilterLogs(opts, "AdminChanged") + if err != nil { + return nil, err + } + return &LocalhostSpaceFactoryAdminChangedIterator{contract: _LocalhostSpaceFactory.contract, event: "AdminChanged", logs: logs, sub: sub}, nil +} + +// WatchAdminChanged is a free log subscription operation binding the contract event 0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f. +// +// Solidity: event AdminChanged(address previousAdmin, address newAdmin) +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryFilterer) WatchAdminChanged(opts *bind.WatchOpts, sink chan<- *LocalhostSpaceFactoryAdminChanged) (event.Subscription, error) { + + logs, sub, err := _LocalhostSpaceFactory.contract.WatchLogs(opts, "AdminChanged") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(LocalhostSpaceFactoryAdminChanged) + if err := _LocalhostSpaceFactory.contract.UnpackLog(event, "AdminChanged", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseAdminChanged is a log parse operation binding the contract event 0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f. +// +// Solidity: event AdminChanged(address previousAdmin, address newAdmin) +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryFilterer) ParseAdminChanged(log types.Log) (*LocalhostSpaceFactoryAdminChanged, error) { + event := new(LocalhostSpaceFactoryAdminChanged) + if err := _LocalhostSpaceFactory.contract.UnpackLog(event, "AdminChanged", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// LocalhostSpaceFactoryBeaconUpgradedIterator is returned from FilterBeaconUpgraded and is used to iterate over the raw logs and unpacked data for BeaconUpgraded events raised by the LocalhostSpaceFactory contract. +type LocalhostSpaceFactoryBeaconUpgradedIterator struct { + Event *LocalhostSpaceFactoryBeaconUpgraded // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *LocalhostSpaceFactoryBeaconUpgradedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(LocalhostSpaceFactoryBeaconUpgraded) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(LocalhostSpaceFactoryBeaconUpgraded) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *LocalhostSpaceFactoryBeaconUpgradedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *LocalhostSpaceFactoryBeaconUpgradedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// LocalhostSpaceFactoryBeaconUpgraded represents a BeaconUpgraded event raised by the LocalhostSpaceFactory contract. +type LocalhostSpaceFactoryBeaconUpgraded struct { + Beacon common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterBeaconUpgraded is a free log retrieval operation binding the contract event 0x1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e. +// +// Solidity: event BeaconUpgraded(address indexed beacon) +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryFilterer) FilterBeaconUpgraded(opts *bind.FilterOpts, beacon []common.Address) (*LocalhostSpaceFactoryBeaconUpgradedIterator, error) { + + var beaconRule []interface{} + for _, beaconItem := range beacon { + beaconRule = append(beaconRule, beaconItem) + } + + logs, sub, err := _LocalhostSpaceFactory.contract.FilterLogs(opts, "BeaconUpgraded", beaconRule) + if err != nil { + return nil, err + } + return &LocalhostSpaceFactoryBeaconUpgradedIterator{contract: _LocalhostSpaceFactory.contract, event: "BeaconUpgraded", logs: logs, sub: sub}, nil +} + +// WatchBeaconUpgraded is a free log subscription operation binding the contract event 0x1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e. +// +// Solidity: event BeaconUpgraded(address indexed beacon) +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryFilterer) WatchBeaconUpgraded(opts *bind.WatchOpts, sink chan<- *LocalhostSpaceFactoryBeaconUpgraded, beacon []common.Address) (event.Subscription, error) { + + var beaconRule []interface{} + for _, beaconItem := range beacon { + beaconRule = append(beaconRule, beaconItem) + } + + logs, sub, err := _LocalhostSpaceFactory.contract.WatchLogs(opts, "BeaconUpgraded", beaconRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(LocalhostSpaceFactoryBeaconUpgraded) + if err := _LocalhostSpaceFactory.contract.UnpackLog(event, "BeaconUpgraded", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseBeaconUpgraded is a log parse operation binding the contract event 0x1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e. +// +// Solidity: event BeaconUpgraded(address indexed beacon) +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryFilterer) ParseBeaconUpgraded(log types.Log) (*LocalhostSpaceFactoryBeaconUpgraded, error) { + event := new(LocalhostSpaceFactoryBeaconUpgraded) + if err := _LocalhostSpaceFactory.contract.UnpackLog(event, "BeaconUpgraded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// LocalhostSpaceFactoryInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the LocalhostSpaceFactory contract. +type LocalhostSpaceFactoryInitializedIterator struct { + Event *LocalhostSpaceFactoryInitialized // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *LocalhostSpaceFactoryInitializedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(LocalhostSpaceFactoryInitialized) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(LocalhostSpaceFactoryInitialized) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *LocalhostSpaceFactoryInitializedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *LocalhostSpaceFactoryInitializedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// LocalhostSpaceFactoryInitialized represents a Initialized event raised by the LocalhostSpaceFactory contract. +type LocalhostSpaceFactoryInitialized struct { + Version uint8 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterInitialized is a free log retrieval operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryFilterer) FilterInitialized(opts *bind.FilterOpts) (*LocalhostSpaceFactoryInitializedIterator, error) { + + logs, sub, err := _LocalhostSpaceFactory.contract.FilterLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return &LocalhostSpaceFactoryInitializedIterator{contract: _LocalhostSpaceFactory.contract, event: "Initialized", logs: logs, sub: sub}, nil +} + +// WatchInitialized is a free log subscription operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *LocalhostSpaceFactoryInitialized) (event.Subscription, error) { + + logs, sub, err := _LocalhostSpaceFactory.contract.WatchLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(LocalhostSpaceFactoryInitialized) + if err := _LocalhostSpaceFactory.contract.UnpackLog(event, "Initialized", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseInitialized is a log parse operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryFilterer) ParseInitialized(log types.Log) (*LocalhostSpaceFactoryInitialized, error) { + event := new(LocalhostSpaceFactoryInitialized) + if err := _LocalhostSpaceFactory.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// LocalhostSpaceFactoryOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the LocalhostSpaceFactory contract. +type LocalhostSpaceFactoryOwnershipTransferredIterator struct { + Event *LocalhostSpaceFactoryOwnershipTransferred // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *LocalhostSpaceFactoryOwnershipTransferredIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(LocalhostSpaceFactoryOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(LocalhostSpaceFactoryOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *LocalhostSpaceFactoryOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *LocalhostSpaceFactoryOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// LocalhostSpaceFactoryOwnershipTransferred represents a OwnershipTransferred event raised by the LocalhostSpaceFactory contract. +type LocalhostSpaceFactoryOwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*LocalhostSpaceFactoryOwnershipTransferredIterator, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _LocalhostSpaceFactory.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &LocalhostSpaceFactoryOwnershipTransferredIterator{contract: _LocalhostSpaceFactory.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *LocalhostSpaceFactoryOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _LocalhostSpaceFactory.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(LocalhostSpaceFactoryOwnershipTransferred) + if err := _LocalhostSpaceFactory.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryFilterer) ParseOwnershipTransferred(log types.Log) (*LocalhostSpaceFactoryOwnershipTransferred, error) { + event := new(LocalhostSpaceFactoryOwnershipTransferred) + if err := _LocalhostSpaceFactory.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// LocalhostSpaceFactoryUpgradedIterator is returned from FilterUpgraded and is used to iterate over the raw logs and unpacked data for Upgraded events raised by the LocalhostSpaceFactory contract. +type LocalhostSpaceFactoryUpgradedIterator struct { + Event *LocalhostSpaceFactoryUpgraded // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *LocalhostSpaceFactoryUpgradedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(LocalhostSpaceFactoryUpgraded) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(LocalhostSpaceFactoryUpgraded) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *LocalhostSpaceFactoryUpgradedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *LocalhostSpaceFactoryUpgradedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// LocalhostSpaceFactoryUpgraded represents a Upgraded event raised by the LocalhostSpaceFactory contract. +type LocalhostSpaceFactoryUpgraded struct { + Implementation common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUpgraded is a free log retrieval operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b. +// +// Solidity: event Upgraded(address indexed implementation) +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryFilterer) FilterUpgraded(opts *bind.FilterOpts, implementation []common.Address) (*LocalhostSpaceFactoryUpgradedIterator, error) { + + var implementationRule []interface{} + for _, implementationItem := range implementation { + implementationRule = append(implementationRule, implementationItem) + } + + logs, sub, err := _LocalhostSpaceFactory.contract.FilterLogs(opts, "Upgraded", implementationRule) + if err != nil { + return nil, err + } + return &LocalhostSpaceFactoryUpgradedIterator{contract: _LocalhostSpaceFactory.contract, event: "Upgraded", logs: logs, sub: sub}, nil +} + +// WatchUpgraded is a free log subscription operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b. +// +// Solidity: event Upgraded(address indexed implementation) +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryFilterer) WatchUpgraded(opts *bind.WatchOpts, sink chan<- *LocalhostSpaceFactoryUpgraded, implementation []common.Address) (event.Subscription, error) { + + var implementationRule []interface{} + for _, implementationItem := range implementation { + implementationRule = append(implementationRule, implementationItem) + } + + logs, sub, err := _LocalhostSpaceFactory.contract.WatchLogs(opts, "Upgraded", implementationRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(LocalhostSpaceFactoryUpgraded) + if err := _LocalhostSpaceFactory.contract.UnpackLog(event, "Upgraded", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseUpgraded is a log parse operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b. +// +// Solidity: event Upgraded(address indexed implementation) +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryFilterer) ParseUpgraded(log types.Log) (*LocalhostSpaceFactoryUpgraded, error) { + event := new(LocalhostSpaceFactoryUpgraded) + if err := _LocalhostSpaceFactory.contract.UnpackLog(event, "Upgraded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/zion/contracts/localhost_space_factory/space-factory.json b/zion/contracts/localhost_space_factory/space-factory.json new file mode 100644 index 000000000..a45c696f0 --- /dev/null +++ b/zion/contracts/localhost_space_factory/space-factory.json @@ -0,0 +1,4 @@ +{ + "spaceFactory": "0xB7f8BC63BbcaD18155201308C8f3540b07f84F5e", + "spaceToken": "0x0165878A594ca255338adfa4d48449f69242Eb8F" +} \ No newline at end of file diff --git a/zion/contracts/zion_goerli/space-manager.json b/zion/contracts/zion_goerli/space-manager.json deleted file mode 100644 index 0e2a145f1..000000000 --- a/zion/contracts/zion_goerli/space-manager.json +++ /dev/null @@ -1 +0,0 @@ -{"spacemanager": "0xb194C2E006aEeC94BC8bAa39B8578992134deF80","usergranted": "0x68dc242a7E1Da4d72D5eCE53e055D1E6e44Bb288","tokengranted": "0x9B424DAd142087168ECB8C3809d4B7187d4110ce", "spacenft": "0x17Bb2187E5Dd062Da0dbA3A097943343cABfCD8E", "permission": "0x07e71c115aE5F2929E13940148015284242c3f07", "rolemanager": "0xf941F1f08E0EA9A747E7Eef53C57dc13425aA8af"} diff --git a/zion/contracts/zion_goerli/zion_space_manager_goerli.go b/zion/contracts/zion_goerli/zion_space_manager_goerli.go deleted file mode 100644 index 469d35b5c..000000000 --- a/zion/contracts/zion_goerli/zion_space_manager_goerli.go +++ /dev/null @@ -1,1163 +0,0 @@ -// Code generated - DO NOT EDIT. -// This file is a generated binding and any manual changes will be lost. - -package zion_goerli - -import ( - "errors" - "math/big" - "strings" - - ethereum "github.com/ethereum/go-ethereum" - "github.com/ethereum/go-ethereum/accounts/abi" - "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/event" -) - -// Reference imports to suppress errors if they are not otherwise used. -var ( - _ = errors.New - _ = big.NewInt - _ = strings.NewReader - _ = ethereum.NotFound - _ = bind.Bind - _ = common.Big1 - _ = types.BloomLookup - _ = event.NewSubscription -) - -// DataTypesChannel is an auto generated low-level Go binding around an user-defined struct. -type DataTypesChannel struct { - ChannelId *big.Int - CreatedAt *big.Int - NetworkId string - Name string - Creator common.Address - Disabled bool -} - -// DataTypesChannelInfo is an auto generated low-level Go binding around an user-defined struct. -type DataTypesChannelInfo struct { - ChannelId *big.Int - NetworkId string - CreatedAt *big.Int - Name string - Creator common.Address - Disabled bool -} - -// DataTypesChannels is an auto generated low-level Go binding around an user-defined struct. -type DataTypesChannels struct { - IdCounter *big.Int - Channels []DataTypesChannel -} - -// DataTypesCreateChannelData is an auto generated low-level Go binding around an user-defined struct. -type DataTypesCreateChannelData struct { - SpaceNetworkId string - ChannelName string - ChannelNetworkId string -} - -// DataTypesCreateRoleEntitlementData is an auto generated low-level Go binding around an user-defined struct. -type DataTypesCreateRoleEntitlementData struct { - RoleId *big.Int - EntitlementModule common.Address - EntitlementData []byte -} - -// DataTypesCreateSpaceData is an auto generated low-level Go binding around an user-defined struct. -type DataTypesCreateSpaceData struct { - SpaceName string - SpaceNetworkId string -} - -// DataTypesCreateSpaceEntitlementData is an auto generated low-level Go binding around an user-defined struct. -type DataTypesCreateSpaceEntitlementData struct { - RoleName string - Permissions []DataTypesPermission - ExternalTokenEntitlements []DataTypesExternalTokenEntitlement - Users []common.Address -} - -// DataTypesEntitlementModuleInfo is an auto generated low-level Go binding around an user-defined struct. -type DataTypesEntitlementModuleInfo struct { - Addr common.Address - Name string - Description string -} - -// DataTypesExternalToken is an auto generated low-level Go binding around an user-defined struct. -type DataTypesExternalToken struct { - ContractAddress common.Address - Quantity *big.Int - IsSingleToken bool - TokenId *big.Int -} - -// DataTypesExternalTokenEntitlement is an auto generated low-level Go binding around an user-defined struct. -type DataTypesExternalTokenEntitlement struct { - Tag string - Tokens []DataTypesExternalToken -} - -// DataTypesPermission is an auto generated low-level Go binding around an user-defined struct. -type DataTypesPermission struct { - Name string -} - -// DataTypesSpaceInfo is an auto generated low-level Go binding around an user-defined struct. -type DataTypesSpaceInfo struct { - SpaceId *big.Int - NetworkId string - CreatedAt *big.Int - Name string - Creator common.Address - Owner common.Address - Disabled bool -} - -// ZionSpaceManagerGoerliMetaData contains all meta data concerning the ZionSpaceManagerGoerli contract. -var ZionSpaceManagerGoerliMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_permissionRegistry\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_roleManager\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ChannelDoesNotExist\",\"type\":\"error\"},{\"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\":\"InvalidParameters\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotAllowed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RoleDoesNotExist\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SpaceDoesNotExist\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SpaceNFTNotSet\",\"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\":\"spaceNetworkId\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"channelNetworkId\",\"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\":\"spaceNetworkId\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"channelName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"channelNetworkId\",\"type\":\"string\"}],\"internalType\":\"structDataTypes.CreateChannelData\",\"name\":\"data\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"roleId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"entitlementModule\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"entitlementData\",\"type\":\"bytes\"}],\"internalType\":\"structDataTypes.CreateRoleEntitlementData[]\",\"name\":\"roles\",\"type\":\"tuple[]\"}],\"name\":\"createChannel\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"channelId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"spaceNetworkId\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"name\":\"createRole\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"roleId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"spaceName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"spaceNetworkId\",\"type\":\"string\"}],\"internalType\":\"structDataTypes.CreateSpaceData\",\"name\":\"info\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"roleName\",\"type\":\"string\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structDataTypes.Permission[]\",\"name\":\"permissions\",\"type\":\"tuple[]\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"tag\",\"type\":\"string\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"isSingleToken\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"internalType\":\"structDataTypes.ExternalToken[]\",\"name\":\"tokens\",\"type\":\"tuple[]\"}],\"internalType\":\"structDataTypes.ExternalTokenEntitlement[]\",\"name\":\"externalTokenEntitlements\",\"type\":\"tuple[]\"},{\"internalType\":\"address[]\",\"name\":\"users\",\"type\":\"address[]\"}],\"internalType\":\"structDataTypes.CreateSpaceEntitlementData\",\"name\":\"entitlementData\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structDataTypes.Permission[]\",\"name\":\"everyonePermissions\",\"type\":\"tuple[]\"}],\"name\":\"createSpace\",\"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\"},{\"internalType\":\"string\",\"name\":\"channelId\",\"type\":\"string\"}],\"name\":\"getChannelInfoByChannelId\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"channelId\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"networkId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"createdAt\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"creator\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"disabled\",\"type\":\"bool\"}],\"internalType\":\"structDataTypes.ChannelInfo\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"spaceId\",\"type\":\"string\"}],\"name\":\"getChannelsBySpaceId\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"idCounter\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"channelId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"createdAt\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"networkId\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"creator\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"disabled\",\"type\":\"bool\"}],\"internalType\":\"structDataTypes.Channel[]\",\"name\":\"channels\",\"type\":\"tuple[]\"}],\"internalType\":\"structDataTypes.Channels\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"spaceId\",\"type\":\"string\"}],\"name\":\"getEntitlementModulesBySpaceId\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"spaceId\",\"type\":\"string\"}],\"name\":\"getEntitlementsInfoBySpaceId\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"description\",\"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\":\"\",\"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\":\"string\",\"name\":\"networkId\",\"type\":\"string\"},{\"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\":\"bool\",\"name\":\"disabled\",\"type\":\"bool\"}],\"internalType\":\"structDataTypes.SpaceInfo\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"spaceId\",\"type\":\"string\"}],\"name\":\"getSpaceOwnerBySpaceId\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSpaces\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"spaceId\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"networkId\",\"type\":\"string\"},{\"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\":\"bool\",\"name\":\"disabled\",\"type\":\"bool\"}],\"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\":\"spaceNetworkId\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"channelNetworkId\",\"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\":[{\"internalType\":\"string\",\"name\":\"spaceNetworkId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"roleId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structDataTypes.Permission\",\"name\":\"permission\",\"type\":\"tuple\"}],\"name\":\"removePermissionFromRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"spaceNetworkId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"roleId\",\"type\":\"uint256\"}],\"name\":\"removeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"spaceNetworkId\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"channelNetworkId\",\"type\":\"string\"},{\"internalType\":\"bool\",\"name\":\"disabled\",\"type\":\"bool\"}],\"name\":\"setChannelAccess\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"entitlementModule\",\"type\":\"address\"}],\"name\":\"setDefaultTokenEntitlementModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"entitlementModule\",\"type\":\"address\"}],\"name\":\"setDefaultUserEntitlementModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"spaceNetworkId\",\"type\":\"string\"},{\"internalType\":\"bool\",\"name\":\"disabled\",\"type\":\"bool\"}],\"name\":\"setSpaceAccess\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spaceNFTAddress\",\"type\":\"address\"}],\"name\":\"setSpaceNFT\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"spaceNetworkId\",\"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. -// Deprecated: Use ZionSpaceManagerGoerliMetaData.ABI instead. -var ZionSpaceManagerGoerliABI = ZionSpaceManagerGoerliMetaData.ABI - -// ZionSpaceManagerGoerli is an auto generated Go binding around an Ethereum contract. -type ZionSpaceManagerGoerli struct { - ZionSpaceManagerGoerliCaller // Read-only binding to the contract - ZionSpaceManagerGoerliTransactor // Write-only binding to the contract - ZionSpaceManagerGoerliFilterer // Log filterer for contract events -} - -// ZionSpaceManagerGoerliCaller is an auto generated read-only Go binding around an Ethereum contract. -type ZionSpaceManagerGoerliCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ZionSpaceManagerGoerliTransactor is an auto generated write-only Go binding around an Ethereum contract. -type ZionSpaceManagerGoerliTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ZionSpaceManagerGoerliFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type ZionSpaceManagerGoerliFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ZionSpaceManagerGoerliSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type ZionSpaceManagerGoerliSession struct { - Contract *ZionSpaceManagerGoerli // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ZionSpaceManagerGoerliCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type ZionSpaceManagerGoerliCallerSession struct { - Contract *ZionSpaceManagerGoerliCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// ZionSpaceManagerGoerliTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type ZionSpaceManagerGoerliTransactorSession struct { - Contract *ZionSpaceManagerGoerliTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ZionSpaceManagerGoerliRaw is an auto generated low-level Go binding around an Ethereum contract. -type ZionSpaceManagerGoerliRaw struct { - Contract *ZionSpaceManagerGoerli // Generic contract binding to access the raw methods on -} - -// ZionSpaceManagerGoerliCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type ZionSpaceManagerGoerliCallerRaw struct { - Contract *ZionSpaceManagerGoerliCaller // Generic read-only contract binding to access the raw methods on -} - -// ZionSpaceManagerGoerliTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type ZionSpaceManagerGoerliTransactorRaw struct { - Contract *ZionSpaceManagerGoerliTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewZionSpaceManagerGoerli creates a new instance of ZionSpaceManagerGoerli, bound to a specific deployed contract. -func NewZionSpaceManagerGoerli(address common.Address, backend bind.ContractBackend) (*ZionSpaceManagerGoerli, error) { - contract, err := bindZionSpaceManagerGoerli(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &ZionSpaceManagerGoerli{ZionSpaceManagerGoerliCaller: ZionSpaceManagerGoerliCaller{contract: contract}, ZionSpaceManagerGoerliTransactor: ZionSpaceManagerGoerliTransactor{contract: contract}, ZionSpaceManagerGoerliFilterer: ZionSpaceManagerGoerliFilterer{contract: contract}}, nil -} - -// NewZionSpaceManagerGoerliCaller creates a new read-only instance of ZionSpaceManagerGoerli, bound to a specific deployed contract. -func NewZionSpaceManagerGoerliCaller(address common.Address, caller bind.ContractCaller) (*ZionSpaceManagerGoerliCaller, error) { - contract, err := bindZionSpaceManagerGoerli(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &ZionSpaceManagerGoerliCaller{contract: contract}, nil -} - -// NewZionSpaceManagerGoerliTransactor creates a new write-only instance of ZionSpaceManagerGoerli, bound to a specific deployed contract. -func NewZionSpaceManagerGoerliTransactor(address common.Address, transactor bind.ContractTransactor) (*ZionSpaceManagerGoerliTransactor, error) { - contract, err := bindZionSpaceManagerGoerli(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &ZionSpaceManagerGoerliTransactor{contract: contract}, nil -} - -// NewZionSpaceManagerGoerliFilterer creates a new log filterer instance of ZionSpaceManagerGoerli, bound to a specific deployed contract. -func NewZionSpaceManagerGoerliFilterer(address common.Address, filterer bind.ContractFilterer) (*ZionSpaceManagerGoerliFilterer, error) { - contract, err := bindZionSpaceManagerGoerli(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &ZionSpaceManagerGoerliFilterer{contract: contract}, nil -} - -// bindZionSpaceManagerGoerli binds a generic wrapper to an already deployed contract. -func bindZionSpaceManagerGoerli(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(ZionSpaceManagerGoerliABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil -} - -// Call invokes the (constant) contract method with params as input values and -// sets the output to result. The result type might be a single field for simple -// returns, a slice of interfaces for anonymous returns and a struct for named -// returns. -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _ZionSpaceManagerGoerli.Contract.ZionSpaceManagerGoerliCaller.contract.Call(opts, result, method, params...) -} - -// Transfer initiates a plain transaction to move funds to the contract, calling -// its default method if one is available. -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ZionSpaceManagerGoerli.Contract.ZionSpaceManagerGoerliTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ZionSpaceManagerGoerli.Contract.ZionSpaceManagerGoerliTransactor.contract.Transact(opts, method, params...) -} - -// Call invokes the (constant) contract method with params as input values and -// sets the output to result. The result type might be a single field for simple -// returns, a slice of interfaces for anonymous returns and a struct for named -// returns. -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _ZionSpaceManagerGoerli.Contract.contract.Call(opts, result, method, params...) -} - -// Transfer initiates a plain transaction to move funds to the contract, calling -// its default method if one is available. -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ZionSpaceManagerGoerli.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ZionSpaceManagerGoerli.Contract.contract.Transact(opts, method, params...) -} - -// GetChannelIdByNetworkId is a free data retrieval call binding the contract method 0x3e66eae3. -// -// 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) -} - -// GetChannelInfoByChannelId is a free data retrieval call binding the contract method 0x0db37ba3. -// -// Solidity: function getChannelInfoByChannelId(string spaceId, string channelId) view returns((uint256,string,uint256,string,address,bool)) -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCaller) GetChannelInfoByChannelId(opts *bind.CallOpts, spaceId string, channelId string) (DataTypesChannelInfo, error) { - var out []interface{} - err := _ZionSpaceManagerGoerli.contract.Call(opts, &out, "getChannelInfoByChannelId", spaceId, channelId) - - if err != nil { - return *new(DataTypesChannelInfo), err - } - - out0 := *abi.ConvertType(out[0], new(DataTypesChannelInfo)).(*DataTypesChannelInfo) - - return out0, err - -} - -// GetChannelInfoByChannelId is a free data retrieval call binding the contract method 0x0db37ba3. -// -// Solidity: function getChannelInfoByChannelId(string spaceId, string channelId) view returns((uint256,string,uint256,string,address,bool)) -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliSession) GetChannelInfoByChannelId(spaceId string, channelId string) (DataTypesChannelInfo, error) { - return _ZionSpaceManagerGoerli.Contract.GetChannelInfoByChannelId(&_ZionSpaceManagerGoerli.CallOpts, spaceId, channelId) -} - -// GetChannelInfoByChannelId is a free data retrieval call binding the contract method 0x0db37ba3. -// -// Solidity: function getChannelInfoByChannelId(string spaceId, string channelId) view returns((uint256,string,uint256,string,address,bool)) -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCallerSession) GetChannelInfoByChannelId(spaceId string, channelId string) (DataTypesChannelInfo, error) { - return _ZionSpaceManagerGoerli.Contract.GetChannelInfoByChannelId(&_ZionSpaceManagerGoerli.CallOpts, spaceId, channelId) -} - -// GetChannelsBySpaceId is a free data retrieval call binding the contract method 0x50c24eef. -// -// Solidity: function getChannelsBySpaceId(string spaceId) view returns((uint256,(uint256,uint256,string,string,address,bool)[])) -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCaller) GetChannelsBySpaceId(opts *bind.CallOpts, spaceId string) (DataTypesChannels, error) { - var out []interface{} - err := _ZionSpaceManagerGoerli.contract.Call(opts, &out, "getChannelsBySpaceId", spaceId) - - if err != nil { - return *new(DataTypesChannels), err - } - - out0 := *abi.ConvertType(out[0], new(DataTypesChannels)).(*DataTypesChannels) - - return out0, err - -} - -// GetChannelsBySpaceId is a free data retrieval call binding the contract method 0x50c24eef. -// -// Solidity: function getChannelsBySpaceId(string spaceId) view returns((uint256,(uint256,uint256,string,string,address,bool)[])) -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliSession) GetChannelsBySpaceId(spaceId string) (DataTypesChannels, error) { - return _ZionSpaceManagerGoerli.Contract.GetChannelsBySpaceId(&_ZionSpaceManagerGoerli.CallOpts, spaceId) -} - -// GetChannelsBySpaceId is a free data retrieval call binding the contract method 0x50c24eef. -// -// Solidity: function getChannelsBySpaceId(string spaceId) view returns((uint256,(uint256,uint256,string,string,address,bool)[])) -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCallerSession) GetChannelsBySpaceId(spaceId string) (DataTypesChannels, error) { - return _ZionSpaceManagerGoerli.Contract.GetChannelsBySpaceId(&_ZionSpaceManagerGoerli.CallOpts, spaceId) -} - -// GetEntitlementModulesBySpaceId is a free data retrieval call binding the contract method 0x141b6498. -// -// Solidity: function getEntitlementModulesBySpaceId(string spaceId) view returns(address[]) -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCaller) GetEntitlementModulesBySpaceId(opts *bind.CallOpts, spaceId string) ([]common.Address, error) { - var out []interface{} - err := _ZionSpaceManagerGoerli.contract.Call(opts, &out, "getEntitlementModulesBySpaceId", spaceId) - - if err != nil { - return *new([]common.Address), err - } - - out0 := *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address) - - return out0, err - -} - -// GetEntitlementModulesBySpaceId is a free data retrieval call binding the contract method 0x141b6498. -// -// Solidity: function getEntitlementModulesBySpaceId(string spaceId) view returns(address[]) -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 0x141b6498. -// -// Solidity: function getEntitlementModulesBySpaceId(string spaceId) view returns(address[]) -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 0x3519167c. -// -// 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) - - if err != nil { - return *new([]DataTypesEntitlementModuleInfo), err - } - - out0 := *abi.ConvertType(out[0], new([]DataTypesEntitlementModuleInfo)).(*[]DataTypesEntitlementModuleInfo) - - return out0, err - -} - -// GetEntitlementsInfoBySpaceId is a free data retrieval call binding the contract method 0x3519167c. -// -// 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 0x3519167c. -// -// 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 0x9ea4d532. -// -// Solidity: function getPermissionFromMap(bytes32 permissionType) view returns((string)) -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCaller) GetPermissionFromMap(opts *bind.CallOpts, permissionType [32]byte) (DataTypesPermission, error) { - var out []interface{} - err := _ZionSpaceManagerGoerli.contract.Call(opts, &out, "getPermissionFromMap", permissionType) - - if err != nil { - return *new(DataTypesPermission), err - } - - out0 := *abi.ConvertType(out[0], new(DataTypesPermission)).(*DataTypesPermission) - - return out0, err - -} - -// GetPermissionFromMap is a free data retrieval call binding the contract method 0x9ea4d532. -// -// Solidity: function getPermissionFromMap(bytes32 permissionType) view returns((string)) -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 0x9ea4d532. -// -// Solidity: function getPermissionFromMap(bytes32 permissionType) view returns((string)) -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCallerSession) GetPermissionFromMap(permissionType [32]byte) (DataTypesPermission, error) { - return _ZionSpaceManagerGoerli.Contract.GetPermissionFromMap(&_ZionSpaceManagerGoerli.CallOpts, permissionType) -} - -// GetSpaceIdByNetworkId is a free data retrieval call binding the contract method 0x9ddd0d6b. -// -// Solidity: function getSpaceIdByNetworkId(string networkId) view returns(uint256) -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCaller) GetSpaceIdByNetworkId(opts *bind.CallOpts, networkId string) (*big.Int, error) { - var out []interface{} - err := _ZionSpaceManagerGoerli.contract.Call(opts, &out, "getSpaceIdByNetworkId", networkId) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// GetSpaceIdByNetworkId is a free data retrieval call binding the contract method 0x9ddd0d6b. -// -// Solidity: function getSpaceIdByNetworkId(string networkId) view returns(uint256) -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliSession) GetSpaceIdByNetworkId(networkId string) (*big.Int, error) { - return _ZionSpaceManagerGoerli.Contract.GetSpaceIdByNetworkId(&_ZionSpaceManagerGoerli.CallOpts, networkId) -} - -// GetSpaceIdByNetworkId is a free data retrieval call binding the contract method 0x9ddd0d6b. -// -// Solidity: function getSpaceIdByNetworkId(string networkId) view returns(uint256) -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCallerSession) GetSpaceIdByNetworkId(networkId string) (*big.Int, error) { - return _ZionSpaceManagerGoerli.Contract.GetSpaceIdByNetworkId(&_ZionSpaceManagerGoerli.CallOpts, networkId) -} - -// GetSpaceInfoBySpaceId is a free data retrieval call binding the contract method 0x2bb59212. -// -// Solidity: function getSpaceInfoBySpaceId(string spaceId) view returns((uint256,string,uint256,string,address,address,bool)) -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCaller) GetSpaceInfoBySpaceId(opts *bind.CallOpts, spaceId string) (DataTypesSpaceInfo, error) { - var out []interface{} - err := _ZionSpaceManagerGoerli.contract.Call(opts, &out, "getSpaceInfoBySpaceId", spaceId) - - if err != nil { - return *new(DataTypesSpaceInfo), err - } - - out0 := *abi.ConvertType(out[0], new(DataTypesSpaceInfo)).(*DataTypesSpaceInfo) - - return out0, err - -} - -// GetSpaceInfoBySpaceId is a free data retrieval call binding the contract method 0x2bb59212. -// -// Solidity: function getSpaceInfoBySpaceId(string spaceId) view returns((uint256,string,uint256,string,address,address,bool)) -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 0x2bb59212. -// -// Solidity: function getSpaceInfoBySpaceId(string spaceId) view returns((uint256,string,uint256,string,address,address,bool)) -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 0x2a4bdf25. -// -// Solidity: function getSpaceOwnerBySpaceId(string spaceId) view returns(address) -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCaller) GetSpaceOwnerBySpaceId(opts *bind.CallOpts, spaceId string) (common.Address, error) { - var out []interface{} - err := _ZionSpaceManagerGoerli.contract.Call(opts, &out, "getSpaceOwnerBySpaceId", spaceId) - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// GetSpaceOwnerBySpaceId is a free data retrieval call binding the contract method 0x2a4bdf25. -// -// Solidity: function getSpaceOwnerBySpaceId(string spaceId) view returns(address) -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 0x2a4bdf25. -// -// Solidity: function getSpaceOwnerBySpaceId(string spaceId) view returns(address) -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. -// -// Solidity: function getSpaces() view returns((uint256,string,uint256,string,address,address,bool)[]) -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCaller) GetSpaces(opts *bind.CallOpts) ([]DataTypesSpaceInfo, error) { - var out []interface{} - err := _ZionSpaceManagerGoerli.contract.Call(opts, &out, "getSpaces") - - if err != nil { - return *new([]DataTypesSpaceInfo), err - } - - out0 := *abi.ConvertType(out[0], new([]DataTypesSpaceInfo)).(*[]DataTypesSpaceInfo) - - return out0, err - -} - -// GetSpaces is a free data retrieval call binding the contract method 0x15478ca9. -// -// Solidity: function getSpaces() view returns((uint256,string,uint256,string,address,address,bool)[]) -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliSession) GetSpaces() ([]DataTypesSpaceInfo, error) { - return _ZionSpaceManagerGoerli.Contract.GetSpaces(&_ZionSpaceManagerGoerli.CallOpts) -} - -// GetSpaces is a free data retrieval call binding the contract method 0x15478ca9. -// -// Solidity: function getSpaces() view returns((uint256,string,uint256,string,address,address,bool)[]) -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCallerSession) GetSpaces() ([]DataTypesSpaceInfo, error) { - return _ZionSpaceManagerGoerli.Contract.GetSpaces(&_ZionSpaceManagerGoerli.CallOpts) -} - -// IsEntitled is a free data retrieval call binding the contract method 0xbf77b663. -// -// 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, channelId, user, permission) - - if err != nil { - return *new(bool), err - } - - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) - - return out0, err - -} - -// IsEntitled is a free data retrieval call binding the contract method 0xbf77b663. -// -// 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 0xbf77b663. -// -// 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 0x4196d1ff. -// -// 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) - - if err != nil { - return *new(bool), err - } - - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) - - return out0, err - -} - -// IsEntitlementModuleWhitelisted is a free data retrieval call binding the contract method 0x4196d1ff. -// -// 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 0x4196d1ff. -// -// 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) -} - -// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. -// -// Solidity: function owner() view returns(address) -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCaller) Owner(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _ZionSpaceManagerGoerli.contract.Call(opts, &out, "owner") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. -// -// Solidity: function owner() view returns(address) -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliSession) Owner() (common.Address, error) { - return _ZionSpaceManagerGoerli.Contract.Owner(&_ZionSpaceManagerGoerli.CallOpts) -} - -// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. -// -// Solidity: function owner() view returns(address) -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliCallerSession) Owner() (common.Address, error) { - return _ZionSpaceManagerGoerli.Contract.Owner(&_ZionSpaceManagerGoerli.CallOpts) -} - -// AddPermissionToRole is a paid mutator transaction binding the contract method 0x7d9a0230. -// -// 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 0x7d9a0230. -// -// 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 0x7d9a0230. -// -// 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 0xbbd7358a. -// -// Solidity: function addRoleToEntitlementModule(string spaceNetworkId, string channelNetworkId, address entitlementModuleAddress, uint256 roleId, bytes entitlementData) returns() -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliTransactor) AddRoleToEntitlementModule(opts *bind.TransactOpts, spaceNetworkId string, channelNetworkId string, entitlementModuleAddress common.Address, roleId *big.Int, entitlementData []byte) (*types.Transaction, error) { - return _ZionSpaceManagerGoerli.contract.Transact(opts, "addRoleToEntitlementModule", spaceNetworkId, channelNetworkId, entitlementModuleAddress, roleId, entitlementData) -} - -// AddRoleToEntitlementModule is a paid mutator transaction binding the contract method 0xbbd7358a. -// -// Solidity: function addRoleToEntitlementModule(string spaceNetworkId, string channelNetworkId, address entitlementModuleAddress, uint256 roleId, bytes entitlementData) returns() -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliSession) AddRoleToEntitlementModule(spaceNetworkId string, channelNetworkId string, entitlementModuleAddress common.Address, roleId *big.Int, entitlementData []byte) (*types.Transaction, error) { - return _ZionSpaceManagerGoerli.Contract.AddRoleToEntitlementModule(&_ZionSpaceManagerGoerli.TransactOpts, spaceNetworkId, channelNetworkId, entitlementModuleAddress, roleId, entitlementData) -} - -// AddRoleToEntitlementModule is a paid mutator transaction binding the contract method 0xbbd7358a. -// -// Solidity: function addRoleToEntitlementModule(string spaceNetworkId, string channelNetworkId, address entitlementModuleAddress, uint256 roleId, bytes entitlementData) returns() -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliTransactorSession) AddRoleToEntitlementModule(spaceNetworkId string, channelNetworkId string, entitlementModuleAddress common.Address, roleId *big.Int, entitlementData []byte) (*types.Transaction, error) { - return _ZionSpaceManagerGoerli.Contract.AddRoleToEntitlementModule(&_ZionSpaceManagerGoerli.TransactOpts, spaceNetworkId, channelNetworkId, entitlementModuleAddress, roleId, entitlementData) -} - -// CreateChannel is a paid mutator transaction binding the contract method 0xe69689af. -// -// Solidity: function createChannel((string,string,string) data, (uint256,address,bytes)[] roles) returns(uint256 channelId) -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliTransactor) CreateChannel(opts *bind.TransactOpts, data DataTypesCreateChannelData, roles []DataTypesCreateRoleEntitlementData) (*types.Transaction, error) { - return _ZionSpaceManagerGoerli.contract.Transact(opts, "createChannel", data, roles) -} - -// CreateChannel is a paid mutator transaction binding the contract method 0xe69689af. -// -// Solidity: function createChannel((string,string,string) data, (uint256,address,bytes)[] roles) returns(uint256 channelId) -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliSession) CreateChannel(data DataTypesCreateChannelData, roles []DataTypesCreateRoleEntitlementData) (*types.Transaction, error) { - return _ZionSpaceManagerGoerli.Contract.CreateChannel(&_ZionSpaceManagerGoerli.TransactOpts, data, roles) -} - -// CreateChannel is a paid mutator transaction binding the contract method 0xe69689af. -// -// Solidity: function createChannel((string,string,string) data, (uint256,address,bytes)[] roles) returns(uint256 channelId) -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliTransactorSession) CreateChannel(data DataTypesCreateChannelData, roles []DataTypesCreateRoleEntitlementData) (*types.Transaction, error) { - return _ZionSpaceManagerGoerli.Contract.CreateChannel(&_ZionSpaceManagerGoerli.TransactOpts, data, roles) -} - -// CreateRole is a paid mutator transaction binding the contract method 0xd2192dbf. -// -// Solidity: function createRole(string spaceNetworkId, string name) returns(uint256 roleId) -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliTransactor) CreateRole(opts *bind.TransactOpts, spaceNetworkId string, name string) (*types.Transaction, error) { - return _ZionSpaceManagerGoerli.contract.Transact(opts, "createRole", spaceNetworkId, name) -} - -// CreateRole is a paid mutator transaction binding the contract method 0xd2192dbf. -// -// Solidity: function createRole(string spaceNetworkId, string name) returns(uint256 roleId) -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliSession) CreateRole(spaceNetworkId string, name string) (*types.Transaction, error) { - return _ZionSpaceManagerGoerli.Contract.CreateRole(&_ZionSpaceManagerGoerli.TransactOpts, spaceNetworkId, name) -} - -// CreateRole is a paid mutator transaction binding the contract method 0xd2192dbf. -// -// Solidity: function createRole(string spaceNetworkId, string name) returns(uint256 roleId) -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliTransactorSession) CreateRole(spaceNetworkId string, name string) (*types.Transaction, error) { - return _ZionSpaceManagerGoerli.Contract.CreateRole(&_ZionSpaceManagerGoerli.TransactOpts, spaceNetworkId, name) -} - -// CreateSpace is a paid mutator transaction binding the contract method 0xd9d94cb7. -// -// Solidity: function createSpace((string,string) info, (string,(string)[],(string,(address,uint256,bool,uint256)[])[],address[]) entitlementData, (string)[] everyonePermissions) returns(uint256) -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliTransactor) CreateSpace(opts *bind.TransactOpts, info DataTypesCreateSpaceData, entitlementData DataTypesCreateSpaceEntitlementData, everyonePermissions []DataTypesPermission) (*types.Transaction, error) { - return _ZionSpaceManagerGoerli.contract.Transact(opts, "createSpace", info, entitlementData, everyonePermissions) -} - -// CreateSpace is a paid mutator transaction binding the contract method 0xd9d94cb7. -// -// Solidity: function createSpace((string,string) info, (string,(string)[],(string,(address,uint256,bool,uint256)[])[],address[]) entitlementData, (string)[] everyonePermissions) returns(uint256) -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliSession) CreateSpace(info DataTypesCreateSpaceData, entitlementData DataTypesCreateSpaceEntitlementData, everyonePermissions []DataTypesPermission) (*types.Transaction, error) { - return _ZionSpaceManagerGoerli.Contract.CreateSpace(&_ZionSpaceManagerGoerli.TransactOpts, info, entitlementData, everyonePermissions) -} - -// CreateSpace is a paid mutator transaction binding the contract method 0xd9d94cb7. -// -// Solidity: function createSpace((string,string) info, (string,(string)[],(string,(address,uint256,bool,uint256)[])[],address[]) entitlementData, (string)[] everyonePermissions) returns(uint256) -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliTransactorSession) CreateSpace(info DataTypesCreateSpaceData, entitlementData DataTypesCreateSpaceEntitlementData, everyonePermissions []DataTypesPermission) (*types.Transaction, error) { - return _ZionSpaceManagerGoerli.Contract.CreateSpace(&_ZionSpaceManagerGoerli.TransactOpts, info, entitlementData, everyonePermissions) -} - -// RemoveEntitlement is a paid mutator transaction binding the contract method 0xa3a39cb9. -// -// Solidity: function removeEntitlement(string spaceNetworkId, string channelNetworkId, address entitlementModuleAddress, uint256[] roleIds, bytes data) returns() -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliTransactor) RemoveEntitlement(opts *bind.TransactOpts, spaceNetworkId string, channelNetworkId string, entitlementModuleAddress common.Address, roleIds []*big.Int, data []byte) (*types.Transaction, error) { - return _ZionSpaceManagerGoerli.contract.Transact(opts, "removeEntitlement", spaceNetworkId, channelNetworkId, entitlementModuleAddress, roleIds, data) -} - -// RemoveEntitlement is a paid mutator transaction binding the contract method 0xa3a39cb9. -// -// Solidity: function removeEntitlement(string spaceNetworkId, string channelNetworkId, address entitlementModuleAddress, uint256[] roleIds, bytes data) returns() -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliSession) RemoveEntitlement(spaceNetworkId string, channelNetworkId string, entitlementModuleAddress common.Address, roleIds []*big.Int, data []byte) (*types.Transaction, error) { - return _ZionSpaceManagerGoerli.Contract.RemoveEntitlement(&_ZionSpaceManagerGoerli.TransactOpts, spaceNetworkId, channelNetworkId, entitlementModuleAddress, roleIds, data) -} - -// RemoveEntitlement is a paid mutator transaction binding the contract method 0xa3a39cb9. -// -// Solidity: function removeEntitlement(string spaceNetworkId, string channelNetworkId, address entitlementModuleAddress, uint256[] roleIds, bytes data) returns() -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliTransactorSession) RemoveEntitlement(spaceNetworkId string, channelNetworkId string, entitlementModuleAddress common.Address, roleIds []*big.Int, data []byte) (*types.Transaction, error) { - return _ZionSpaceManagerGoerli.Contract.RemoveEntitlement(&_ZionSpaceManagerGoerli.TransactOpts, spaceNetworkId, channelNetworkId, entitlementModuleAddress, roleIds, data) -} - -// RemovePermissionFromRole is a paid mutator transaction binding the contract method 0x4832a4ec. -// -// Solidity: function removePermissionFromRole(string spaceNetworkId, uint256 roleId, (string) permission) returns() -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliTransactor) RemovePermissionFromRole(opts *bind.TransactOpts, spaceNetworkId string, roleId *big.Int, permission DataTypesPermission) (*types.Transaction, error) { - return _ZionSpaceManagerGoerli.contract.Transact(opts, "removePermissionFromRole", spaceNetworkId, roleId, permission) -} - -// RemovePermissionFromRole is a paid mutator transaction binding the contract method 0x4832a4ec. -// -// Solidity: function removePermissionFromRole(string spaceNetworkId, uint256 roleId, (string) permission) returns() -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliSession) RemovePermissionFromRole(spaceNetworkId string, roleId *big.Int, permission DataTypesPermission) (*types.Transaction, error) { - return _ZionSpaceManagerGoerli.Contract.RemovePermissionFromRole(&_ZionSpaceManagerGoerli.TransactOpts, spaceNetworkId, roleId, permission) -} - -// RemovePermissionFromRole is a paid mutator transaction binding the contract method 0x4832a4ec. -// -// Solidity: function removePermissionFromRole(string spaceNetworkId, uint256 roleId, (string) permission) returns() -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliTransactorSession) RemovePermissionFromRole(spaceNetworkId string, roleId *big.Int, permission DataTypesPermission) (*types.Transaction, error) { - return _ZionSpaceManagerGoerli.Contract.RemovePermissionFromRole(&_ZionSpaceManagerGoerli.TransactOpts, spaceNetworkId, roleId, permission) -} - -// RemoveRole is a paid mutator transaction binding the contract method 0x8b0e905a. -// -// Solidity: function removeRole(string spaceNetworkId, uint256 roleId) returns() -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliTransactor) RemoveRole(opts *bind.TransactOpts, spaceNetworkId string, roleId *big.Int) (*types.Transaction, error) { - return _ZionSpaceManagerGoerli.contract.Transact(opts, "removeRole", spaceNetworkId, roleId) -} - -// RemoveRole is a paid mutator transaction binding the contract method 0x8b0e905a. -// -// Solidity: function removeRole(string spaceNetworkId, uint256 roleId) returns() -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliSession) RemoveRole(spaceNetworkId string, roleId *big.Int) (*types.Transaction, error) { - return _ZionSpaceManagerGoerli.Contract.RemoveRole(&_ZionSpaceManagerGoerli.TransactOpts, spaceNetworkId, roleId) -} - -// RemoveRole is a paid mutator transaction binding the contract method 0x8b0e905a. -// -// Solidity: function removeRole(string spaceNetworkId, uint256 roleId) returns() -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliTransactorSession) RemoveRole(spaceNetworkId string, roleId *big.Int) (*types.Transaction, error) { - return _ZionSpaceManagerGoerli.Contract.RemoveRole(&_ZionSpaceManagerGoerli.TransactOpts, spaceNetworkId, roleId) -} - -// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. -// -// Solidity: function renounceOwnership() returns() -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ZionSpaceManagerGoerli.contract.Transact(opts, "renounceOwnership") -} - -// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. -// -// Solidity: function renounceOwnership() returns() -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliSession) RenounceOwnership() (*types.Transaction, error) { - return _ZionSpaceManagerGoerli.Contract.RenounceOwnership(&_ZionSpaceManagerGoerli.TransactOpts) -} - -// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. -// -// Solidity: function renounceOwnership() returns() -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliTransactorSession) RenounceOwnership() (*types.Transaction, error) { - return _ZionSpaceManagerGoerli.Contract.RenounceOwnership(&_ZionSpaceManagerGoerli.TransactOpts) -} - -// SetChannelAccess is a paid mutator transaction binding the contract method 0x72a29321. -// -// Solidity: function setChannelAccess(string spaceNetworkId, string channelNetworkId, bool disabled) returns() -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliTransactor) SetChannelAccess(opts *bind.TransactOpts, spaceNetworkId string, channelNetworkId string, disabled bool) (*types.Transaction, error) { - return _ZionSpaceManagerGoerli.contract.Transact(opts, "setChannelAccess", spaceNetworkId, channelNetworkId, disabled) -} - -// SetChannelAccess is a paid mutator transaction binding the contract method 0x72a29321. -// -// Solidity: function setChannelAccess(string spaceNetworkId, string channelNetworkId, bool disabled) returns() -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliSession) SetChannelAccess(spaceNetworkId string, channelNetworkId string, disabled bool) (*types.Transaction, error) { - return _ZionSpaceManagerGoerli.Contract.SetChannelAccess(&_ZionSpaceManagerGoerli.TransactOpts, spaceNetworkId, channelNetworkId, disabled) -} - -// SetChannelAccess is a paid mutator transaction binding the contract method 0x72a29321. -// -// Solidity: function setChannelAccess(string spaceNetworkId, string channelNetworkId, bool disabled) returns() -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliTransactorSession) SetChannelAccess(spaceNetworkId string, channelNetworkId string, disabled bool) (*types.Transaction, error) { - return _ZionSpaceManagerGoerli.Contract.SetChannelAccess(&_ZionSpaceManagerGoerli.TransactOpts, spaceNetworkId, channelNetworkId, disabled) -} - -// SetDefaultTokenEntitlementModule is a paid mutator transaction binding the contract method 0x1a039620. -// -// Solidity: function setDefaultTokenEntitlementModule(address entitlementModule) returns() -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliTransactor) SetDefaultTokenEntitlementModule(opts *bind.TransactOpts, entitlementModule common.Address) (*types.Transaction, error) { - return _ZionSpaceManagerGoerli.contract.Transact(opts, "setDefaultTokenEntitlementModule", entitlementModule) -} - -// SetDefaultTokenEntitlementModule is a paid mutator transaction binding the contract method 0x1a039620. -// -// Solidity: function setDefaultTokenEntitlementModule(address entitlementModule) returns() -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliSession) SetDefaultTokenEntitlementModule(entitlementModule common.Address) (*types.Transaction, error) { - return _ZionSpaceManagerGoerli.Contract.SetDefaultTokenEntitlementModule(&_ZionSpaceManagerGoerli.TransactOpts, entitlementModule) -} - -// SetDefaultTokenEntitlementModule is a paid mutator transaction binding the contract method 0x1a039620. -// -// Solidity: function setDefaultTokenEntitlementModule(address entitlementModule) returns() -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliTransactorSession) SetDefaultTokenEntitlementModule(entitlementModule common.Address) (*types.Transaction, error) { - return _ZionSpaceManagerGoerli.Contract.SetDefaultTokenEntitlementModule(&_ZionSpaceManagerGoerli.TransactOpts, entitlementModule) -} - -// SetDefaultUserEntitlementModule is a paid mutator transaction binding the contract method 0xe1b7a9e5. -// -// Solidity: function setDefaultUserEntitlementModule(address entitlementModule) returns() -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliTransactor) SetDefaultUserEntitlementModule(opts *bind.TransactOpts, entitlementModule common.Address) (*types.Transaction, error) { - return _ZionSpaceManagerGoerli.contract.Transact(opts, "setDefaultUserEntitlementModule", entitlementModule) -} - -// SetDefaultUserEntitlementModule is a paid mutator transaction binding the contract method 0xe1b7a9e5. -// -// Solidity: function setDefaultUserEntitlementModule(address entitlementModule) returns() -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliSession) SetDefaultUserEntitlementModule(entitlementModule common.Address) (*types.Transaction, error) { - return _ZionSpaceManagerGoerli.Contract.SetDefaultUserEntitlementModule(&_ZionSpaceManagerGoerli.TransactOpts, entitlementModule) -} - -// SetDefaultUserEntitlementModule is a paid mutator transaction binding the contract method 0xe1b7a9e5. -// -// Solidity: function setDefaultUserEntitlementModule(address entitlementModule) returns() -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliTransactorSession) SetDefaultUserEntitlementModule(entitlementModule common.Address) (*types.Transaction, error) { - return _ZionSpaceManagerGoerli.Contract.SetDefaultUserEntitlementModule(&_ZionSpaceManagerGoerli.TransactOpts, entitlementModule) -} - -// SetSpaceAccess is a paid mutator transaction binding the contract method 0xf86caf83. -// -// Solidity: function setSpaceAccess(string spaceNetworkId, bool disabled) returns() -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliTransactor) SetSpaceAccess(opts *bind.TransactOpts, spaceNetworkId string, disabled bool) (*types.Transaction, error) { - return _ZionSpaceManagerGoerli.contract.Transact(opts, "setSpaceAccess", spaceNetworkId, disabled) -} - -// SetSpaceAccess is a paid mutator transaction binding the contract method 0xf86caf83. -// -// Solidity: function setSpaceAccess(string spaceNetworkId, bool disabled) returns() -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliSession) SetSpaceAccess(spaceNetworkId string, disabled bool) (*types.Transaction, error) { - return _ZionSpaceManagerGoerli.Contract.SetSpaceAccess(&_ZionSpaceManagerGoerli.TransactOpts, spaceNetworkId, disabled) -} - -// SetSpaceAccess is a paid mutator transaction binding the contract method 0xf86caf83. -// -// Solidity: function setSpaceAccess(string spaceNetworkId, bool disabled) returns() -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliTransactorSession) SetSpaceAccess(spaceNetworkId string, disabled bool) (*types.Transaction, error) { - return _ZionSpaceManagerGoerli.Contract.SetSpaceAccess(&_ZionSpaceManagerGoerli.TransactOpts, spaceNetworkId, disabled) -} - -// SetSpaceNFT is a paid mutator transaction binding the contract method 0xccde2de3. -// -// Solidity: function setSpaceNFT(address spaceNFTAddress) returns() -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliTransactor) SetSpaceNFT(opts *bind.TransactOpts, spaceNFTAddress common.Address) (*types.Transaction, error) { - return _ZionSpaceManagerGoerli.contract.Transact(opts, "setSpaceNFT", spaceNFTAddress) -} - -// SetSpaceNFT is a paid mutator transaction binding the contract method 0xccde2de3. -// -// Solidity: function setSpaceNFT(address spaceNFTAddress) returns() -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliSession) SetSpaceNFT(spaceNFTAddress common.Address) (*types.Transaction, error) { - return _ZionSpaceManagerGoerli.Contract.SetSpaceNFT(&_ZionSpaceManagerGoerli.TransactOpts, spaceNFTAddress) -} - -// SetSpaceNFT is a paid mutator transaction binding the contract method 0xccde2de3. -// -// Solidity: function setSpaceNFT(address spaceNFTAddress) returns() -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliTransactorSession) SetSpaceNFT(spaceNFTAddress common.Address) (*types.Transaction, error) { - return _ZionSpaceManagerGoerli.Contract.SetSpaceNFT(&_ZionSpaceManagerGoerli.TransactOpts, spaceNFTAddress) -} - -// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. -// -// Solidity: function transferOwnership(address newOwner) returns() -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { - return _ZionSpaceManagerGoerli.contract.Transact(opts, "transferOwnership", newOwner) -} - -// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. -// -// Solidity: function transferOwnership(address newOwner) returns() -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { - return _ZionSpaceManagerGoerli.Contract.TransferOwnership(&_ZionSpaceManagerGoerli.TransactOpts, newOwner) -} - -// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. -// -// Solidity: function transferOwnership(address newOwner) returns() -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { - return _ZionSpaceManagerGoerli.Contract.TransferOwnership(&_ZionSpaceManagerGoerli.TransactOpts, newOwner) -} - -// WhitelistEntitlementModule is a paid mutator transaction binding the contract method 0xe798ff3f. -// -// Solidity: function whitelistEntitlementModule(string spaceNetworkId, address entitlementAddress, bool whitelist) returns() -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliTransactor) WhitelistEntitlementModule(opts *bind.TransactOpts, spaceNetworkId string, entitlementAddress common.Address, whitelist bool) (*types.Transaction, error) { - return _ZionSpaceManagerGoerli.contract.Transact(opts, "whitelistEntitlementModule", spaceNetworkId, entitlementAddress, whitelist) -} - -// WhitelistEntitlementModule is a paid mutator transaction binding the contract method 0xe798ff3f. -// -// Solidity: function whitelistEntitlementModule(string spaceNetworkId, address entitlementAddress, bool whitelist) returns() -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliSession) WhitelistEntitlementModule(spaceNetworkId string, entitlementAddress common.Address, whitelist bool) (*types.Transaction, error) { - return _ZionSpaceManagerGoerli.Contract.WhitelistEntitlementModule(&_ZionSpaceManagerGoerli.TransactOpts, spaceNetworkId, entitlementAddress, whitelist) -} - -// WhitelistEntitlementModule is a paid mutator transaction binding the contract method 0xe798ff3f. -// -// Solidity: function whitelistEntitlementModule(string spaceNetworkId, address entitlementAddress, bool whitelist) returns() -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliTransactorSession) WhitelistEntitlementModule(spaceNetworkId string, entitlementAddress common.Address, whitelist bool) (*types.Transaction, error) { - return _ZionSpaceManagerGoerli.Contract.WhitelistEntitlementModule(&_ZionSpaceManagerGoerli.TransactOpts, spaceNetworkId, entitlementAddress, whitelist) -} - -// ZionSpaceManagerGoerliOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the ZionSpaceManagerGoerli contract. -type ZionSpaceManagerGoerliOwnershipTransferredIterator struct { - Event *ZionSpaceManagerGoerliOwnershipTransferred // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *ZionSpaceManagerGoerliOwnershipTransferredIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(ZionSpaceManagerGoerliOwnershipTransferred) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(ZionSpaceManagerGoerliOwnershipTransferred) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *ZionSpaceManagerGoerliOwnershipTransferredIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *ZionSpaceManagerGoerliOwnershipTransferredIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// ZionSpaceManagerGoerliOwnershipTransferred represents a OwnershipTransferred event raised by the ZionSpaceManagerGoerli contract. -type ZionSpaceManagerGoerliOwnershipTransferred struct { - PreviousOwner common.Address - NewOwner common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. -// -// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*ZionSpaceManagerGoerliOwnershipTransferredIterator, error) { - - var previousOwnerRule []interface{} - for _, previousOwnerItem := range previousOwner { - previousOwnerRule = append(previousOwnerRule, previousOwnerItem) - } - var newOwnerRule []interface{} - for _, newOwnerItem := range newOwner { - newOwnerRule = append(newOwnerRule, newOwnerItem) - } - - logs, sub, err := _ZionSpaceManagerGoerli.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) - if err != nil { - return nil, err - } - return &ZionSpaceManagerGoerliOwnershipTransferredIterator{contract: _ZionSpaceManagerGoerli.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil -} - -// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. -// -// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *ZionSpaceManagerGoerliOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { - - var previousOwnerRule []interface{} - for _, previousOwnerItem := range previousOwner { - previousOwnerRule = append(previousOwnerRule, previousOwnerItem) - } - var newOwnerRule []interface{} - for _, newOwnerItem := range newOwner { - newOwnerRule = append(newOwnerRule, newOwnerItem) - } - - logs, sub, err := _ZionSpaceManagerGoerli.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(ZionSpaceManagerGoerliOwnershipTransferred) - if err := _ZionSpaceManagerGoerli.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. -// -// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) -func (_ZionSpaceManagerGoerli *ZionSpaceManagerGoerliFilterer) ParseOwnershipTransferred(log types.Log) (*ZionSpaceManagerGoerliOwnershipTransferred, error) { - event := new(ZionSpaceManagerGoerliOwnershipTransferred) - if err := _ZionSpaceManagerGoerli.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} diff --git a/zion/contracts/zion_localhost/council.json b/zion/contracts/zion_localhost/council.json new file mode 100644 index 000000000..3e39aa88a --- /dev/null +++ b/zion/contracts/zion_localhost/council.json @@ -0,0 +1,3 @@ +{ + "councilnft": "0x5FbDB2315678afecb367f032d93F642f64180aa3" +} \ No newline at end of file diff --git a/zion/contracts/zion_localhost/space-factory.json b/zion/contracts/zion_localhost/space-factory.json new file mode 100644 index 000000000..a45c696f0 --- /dev/null +++ b/zion/contracts/zion_localhost/space-factory.json @@ -0,0 +1,4 @@ +{ + "spaceFactory": "0xB7f8BC63BbcaD18155201308C8f3540b07f84F5e", + "spaceToken": "0x0165878A594ca255338adfa4d48449f69242Eb8F" +} \ No newline at end of file diff --git a/zion/contracts/zion_localhost/space-manager.json b/zion/contracts/zion_localhost/space-manager.json index ea69a2bca..153723d5a 100644 --- a/zion/contracts/zion_localhost/space-manager.json +++ b/zion/contracts/zion_localhost/space-manager.json @@ -1 +1,6 @@ -{"spacemanager": "0xdc64a140aa3e981100a9beca4e685f962f0cf6c9","usergranted": "0x0165878a594ca255338adfa4d48449f69242eb8f","tokengranted": "0xa513e6e4b8f2a923d98304ec87f64353c4d5c853"} \ No newline at end of file +{ + "spacemanager": "0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9", + "usergranted": "0x5FC8d32690cc91D4c39d9d3abcBD16989F875707", + "tokengranted": "0x0165878A594ca255338adfa4d48449f69242Eb8F", + "rolemanager": "0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0" +} \ No newline at end of file diff --git a/zion/contracts/zion_localhost/zion_space_manager_localhost.go b/zion/contracts/zion_localhost/zion_space_manager_localhost.go deleted file mode 100644 index fe99da2fd..000000000 --- a/zion/contracts/zion_localhost/zion_space_manager_localhost.go +++ /dev/null @@ -1,1163 +0,0 @@ -// Code generated - DO NOT EDIT. -// This file is a generated binding and any manual changes will be lost. - -package zion_localhost - -import ( - "errors" - "math/big" - "strings" - - ethereum "github.com/ethereum/go-ethereum" - "github.com/ethereum/go-ethereum/accounts/abi" - "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/event" -) - -// Reference imports to suppress errors if they are not otherwise used. -var ( - _ = errors.New - _ = big.NewInt - _ = strings.NewReader - _ = ethereum.NotFound - _ = bind.Bind - _ = common.Big1 - _ = types.BloomLookup - _ = event.NewSubscription -) - -// DataTypesChannel is an auto generated low-level Go binding around an user-defined struct. -type DataTypesChannel struct { - ChannelId *big.Int - CreatedAt *big.Int - NetworkId string - Name string - Creator common.Address - Disabled bool -} - -// DataTypesChannelInfo is an auto generated low-level Go binding around an user-defined struct. -type DataTypesChannelInfo struct { - ChannelId *big.Int - NetworkId string - CreatedAt *big.Int - Name string - Creator common.Address - Disabled bool -} - -// DataTypesChannels is an auto generated low-level Go binding around an user-defined struct. -type DataTypesChannels struct { - IdCounter *big.Int - Channels []DataTypesChannel -} - -// DataTypesCreateChannelData is an auto generated low-level Go binding around an user-defined struct. -type DataTypesCreateChannelData struct { - SpaceNetworkId string - ChannelName string - ChannelNetworkId string -} - -// DataTypesCreateRoleEntitlementData is an auto generated low-level Go binding around an user-defined struct. -type DataTypesCreateRoleEntitlementData struct { - RoleId *big.Int - EntitlementModule common.Address - EntitlementData []byte -} - -// DataTypesCreateSpaceData is an auto generated low-level Go binding around an user-defined struct. -type DataTypesCreateSpaceData struct { - SpaceName string - SpaceNetworkId string -} - -// DataTypesCreateSpaceEntitlementData is an auto generated low-level Go binding around an user-defined struct. -type DataTypesCreateSpaceEntitlementData struct { - RoleName string - Permissions []DataTypesPermission - ExternalTokenEntitlements []DataTypesExternalTokenEntitlement - Users []common.Address -} - -// DataTypesEntitlementModuleInfo is an auto generated low-level Go binding around an user-defined struct. -type DataTypesEntitlementModuleInfo struct { - Addr common.Address - Name string - Description string -} - -// DataTypesExternalToken is an auto generated low-level Go binding around an user-defined struct. -type DataTypesExternalToken struct { - ContractAddress common.Address - Quantity *big.Int - IsSingleToken bool - TokenId *big.Int -} - -// DataTypesExternalTokenEntitlement is an auto generated low-level Go binding around an user-defined struct. -type DataTypesExternalTokenEntitlement struct { - Tag string - Tokens []DataTypesExternalToken -} - -// DataTypesPermission is an auto generated low-level Go binding around an user-defined struct. -type DataTypesPermission struct { - Name string -} - -// DataTypesSpaceInfo is an auto generated low-level Go binding around an user-defined struct. -type DataTypesSpaceInfo struct { - SpaceId *big.Int - NetworkId string - CreatedAt *big.Int - Name string - Creator common.Address - Owner common.Address - Disabled bool -} - -// ZionSpaceManagerLocalhostMetaData contains all meta data concerning the ZionSpaceManagerLocalhost contract. -var ZionSpaceManagerLocalhostMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_permissionRegistry\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_roleManager\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ChannelDoesNotExist\",\"type\":\"error\"},{\"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\":\"InvalidParameters\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotAllowed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RoleDoesNotExist\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SpaceDoesNotExist\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SpaceNFTNotSet\",\"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\":\"spaceNetworkId\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"channelNetworkId\",\"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\":\"spaceNetworkId\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"channelName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"channelNetworkId\",\"type\":\"string\"}],\"internalType\":\"structDataTypes.CreateChannelData\",\"name\":\"data\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"roleId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"entitlementModule\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"entitlementData\",\"type\":\"bytes\"}],\"internalType\":\"structDataTypes.CreateRoleEntitlementData[]\",\"name\":\"roles\",\"type\":\"tuple[]\"}],\"name\":\"createChannel\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"channelId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"spaceNetworkId\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"name\":\"createRole\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"roleId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"spaceName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"spaceNetworkId\",\"type\":\"string\"}],\"internalType\":\"structDataTypes.CreateSpaceData\",\"name\":\"info\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"roleName\",\"type\":\"string\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structDataTypes.Permission[]\",\"name\":\"permissions\",\"type\":\"tuple[]\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"tag\",\"type\":\"string\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"isSingleToken\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"internalType\":\"structDataTypes.ExternalToken[]\",\"name\":\"tokens\",\"type\":\"tuple[]\"}],\"internalType\":\"structDataTypes.ExternalTokenEntitlement[]\",\"name\":\"externalTokenEntitlements\",\"type\":\"tuple[]\"},{\"internalType\":\"address[]\",\"name\":\"users\",\"type\":\"address[]\"}],\"internalType\":\"structDataTypes.CreateSpaceEntitlementData\",\"name\":\"entitlementData\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structDataTypes.Permission[]\",\"name\":\"everyonePermissions\",\"type\":\"tuple[]\"}],\"name\":\"createSpace\",\"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\"},{\"internalType\":\"string\",\"name\":\"channelId\",\"type\":\"string\"}],\"name\":\"getChannelInfoByChannelId\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"channelId\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"networkId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"createdAt\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"creator\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"disabled\",\"type\":\"bool\"}],\"internalType\":\"structDataTypes.ChannelInfo\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"spaceId\",\"type\":\"string\"}],\"name\":\"getChannelsBySpaceId\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"idCounter\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"channelId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"createdAt\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"networkId\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"creator\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"disabled\",\"type\":\"bool\"}],\"internalType\":\"structDataTypes.Channel[]\",\"name\":\"channels\",\"type\":\"tuple[]\"}],\"internalType\":\"structDataTypes.Channels\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"spaceId\",\"type\":\"string\"}],\"name\":\"getEntitlementModulesBySpaceId\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"spaceId\",\"type\":\"string\"}],\"name\":\"getEntitlementsInfoBySpaceId\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"description\",\"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\":\"\",\"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\":\"string\",\"name\":\"networkId\",\"type\":\"string\"},{\"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\":\"bool\",\"name\":\"disabled\",\"type\":\"bool\"}],\"internalType\":\"structDataTypes.SpaceInfo\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"spaceId\",\"type\":\"string\"}],\"name\":\"getSpaceOwnerBySpaceId\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSpaces\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"spaceId\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"networkId\",\"type\":\"string\"},{\"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\":\"bool\",\"name\":\"disabled\",\"type\":\"bool\"}],\"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\":\"spaceNetworkId\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"channelNetworkId\",\"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\":[{\"internalType\":\"string\",\"name\":\"spaceNetworkId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"roleId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structDataTypes.Permission\",\"name\":\"permission\",\"type\":\"tuple\"}],\"name\":\"removePermissionFromRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"spaceNetworkId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"roleId\",\"type\":\"uint256\"}],\"name\":\"removeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"spaceNetworkId\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"channelNetworkId\",\"type\":\"string\"},{\"internalType\":\"bool\",\"name\":\"disabled\",\"type\":\"bool\"}],\"name\":\"setChannelAccess\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"entitlementModule\",\"type\":\"address\"}],\"name\":\"setDefaultTokenEntitlementModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"entitlementModule\",\"type\":\"address\"}],\"name\":\"setDefaultUserEntitlementModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"spaceNetworkId\",\"type\":\"string\"},{\"internalType\":\"bool\",\"name\":\"disabled\",\"type\":\"bool\"}],\"name\":\"setSpaceAccess\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spaceNFTAddress\",\"type\":\"address\"}],\"name\":\"setSpaceNFT\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"spaceNetworkId\",\"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. -// Deprecated: Use ZionSpaceManagerLocalhostMetaData.ABI instead. -var ZionSpaceManagerLocalhostABI = ZionSpaceManagerLocalhostMetaData.ABI - -// ZionSpaceManagerLocalhost is an auto generated Go binding around an Ethereum contract. -type ZionSpaceManagerLocalhost struct { - ZionSpaceManagerLocalhostCaller // Read-only binding to the contract - ZionSpaceManagerLocalhostTransactor // Write-only binding to the contract - ZionSpaceManagerLocalhostFilterer // Log filterer for contract events -} - -// ZionSpaceManagerLocalhostCaller is an auto generated read-only Go binding around an Ethereum contract. -type ZionSpaceManagerLocalhostCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ZionSpaceManagerLocalhostTransactor is an auto generated write-only Go binding around an Ethereum contract. -type ZionSpaceManagerLocalhostTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ZionSpaceManagerLocalhostFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type ZionSpaceManagerLocalhostFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ZionSpaceManagerLocalhostSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type ZionSpaceManagerLocalhostSession struct { - Contract *ZionSpaceManagerLocalhost // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ZionSpaceManagerLocalhostCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type ZionSpaceManagerLocalhostCallerSession struct { - Contract *ZionSpaceManagerLocalhostCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// ZionSpaceManagerLocalhostTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type ZionSpaceManagerLocalhostTransactorSession struct { - Contract *ZionSpaceManagerLocalhostTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ZionSpaceManagerLocalhostRaw is an auto generated low-level Go binding around an Ethereum contract. -type ZionSpaceManagerLocalhostRaw struct { - Contract *ZionSpaceManagerLocalhost // Generic contract binding to access the raw methods on -} - -// ZionSpaceManagerLocalhostCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type ZionSpaceManagerLocalhostCallerRaw struct { - Contract *ZionSpaceManagerLocalhostCaller // Generic read-only contract binding to access the raw methods on -} - -// ZionSpaceManagerLocalhostTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type ZionSpaceManagerLocalhostTransactorRaw struct { - Contract *ZionSpaceManagerLocalhostTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewZionSpaceManagerLocalhost creates a new instance of ZionSpaceManagerLocalhost, bound to a specific deployed contract. -func NewZionSpaceManagerLocalhost(address common.Address, backend bind.ContractBackend) (*ZionSpaceManagerLocalhost, error) { - contract, err := bindZionSpaceManagerLocalhost(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &ZionSpaceManagerLocalhost{ZionSpaceManagerLocalhostCaller: ZionSpaceManagerLocalhostCaller{contract: contract}, ZionSpaceManagerLocalhostTransactor: ZionSpaceManagerLocalhostTransactor{contract: contract}, ZionSpaceManagerLocalhostFilterer: ZionSpaceManagerLocalhostFilterer{contract: contract}}, nil -} - -// NewZionSpaceManagerLocalhostCaller creates a new read-only instance of ZionSpaceManagerLocalhost, bound to a specific deployed contract. -func NewZionSpaceManagerLocalhostCaller(address common.Address, caller bind.ContractCaller) (*ZionSpaceManagerLocalhostCaller, error) { - contract, err := bindZionSpaceManagerLocalhost(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &ZionSpaceManagerLocalhostCaller{contract: contract}, nil -} - -// NewZionSpaceManagerLocalhostTransactor creates a new write-only instance of ZionSpaceManagerLocalhost, bound to a specific deployed contract. -func NewZionSpaceManagerLocalhostTransactor(address common.Address, transactor bind.ContractTransactor) (*ZionSpaceManagerLocalhostTransactor, error) { - contract, err := bindZionSpaceManagerLocalhost(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &ZionSpaceManagerLocalhostTransactor{contract: contract}, nil -} - -// NewZionSpaceManagerLocalhostFilterer creates a new log filterer instance of ZionSpaceManagerLocalhost, bound to a specific deployed contract. -func NewZionSpaceManagerLocalhostFilterer(address common.Address, filterer bind.ContractFilterer) (*ZionSpaceManagerLocalhostFilterer, error) { - contract, err := bindZionSpaceManagerLocalhost(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &ZionSpaceManagerLocalhostFilterer{contract: contract}, nil -} - -// bindZionSpaceManagerLocalhost binds a generic wrapper to an already deployed contract. -func bindZionSpaceManagerLocalhost(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(ZionSpaceManagerLocalhostABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil -} - -// Call invokes the (constant) contract method with params as input values and -// sets the output to result. The result type might be a single field for simple -// returns, a slice of interfaces for anonymous returns and a struct for named -// returns. -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _ZionSpaceManagerLocalhost.Contract.ZionSpaceManagerLocalhostCaller.contract.Call(opts, result, method, params...) -} - -// Transfer initiates a plain transaction to move funds to the contract, calling -// its default method if one is available. -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ZionSpaceManagerLocalhost.Contract.ZionSpaceManagerLocalhostTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ZionSpaceManagerLocalhost.Contract.ZionSpaceManagerLocalhostTransactor.contract.Transact(opts, method, params...) -} - -// Call invokes the (constant) contract method with params as input values and -// sets the output to result. The result type might be a single field for simple -// returns, a slice of interfaces for anonymous returns and a struct for named -// returns. -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _ZionSpaceManagerLocalhost.Contract.contract.Call(opts, result, method, params...) -} - -// Transfer initiates a plain transaction to move funds to the contract, calling -// its default method if one is available. -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ZionSpaceManagerLocalhost.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ZionSpaceManagerLocalhost.Contract.contract.Transact(opts, method, params...) -} - -// GetChannelIdByNetworkId is a free data retrieval call binding the contract method 0x3e66eae3. -// -// 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) -} - -// GetChannelInfoByChannelId is a free data retrieval call binding the contract method 0x0db37ba3. -// -// Solidity: function getChannelInfoByChannelId(string spaceId, string channelId) view returns((uint256,string,uint256,string,address,bool)) -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCaller) GetChannelInfoByChannelId(opts *bind.CallOpts, spaceId string, channelId string) (DataTypesChannelInfo, error) { - var out []interface{} - err := _ZionSpaceManagerLocalhost.contract.Call(opts, &out, "getChannelInfoByChannelId", spaceId, channelId) - - if err != nil { - return *new(DataTypesChannelInfo), err - } - - out0 := *abi.ConvertType(out[0], new(DataTypesChannelInfo)).(*DataTypesChannelInfo) - - return out0, err - -} - -// GetChannelInfoByChannelId is a free data retrieval call binding the contract method 0x0db37ba3. -// -// Solidity: function getChannelInfoByChannelId(string spaceId, string channelId) view returns((uint256,string,uint256,string,address,bool)) -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostSession) GetChannelInfoByChannelId(spaceId string, channelId string) (DataTypesChannelInfo, error) { - return _ZionSpaceManagerLocalhost.Contract.GetChannelInfoByChannelId(&_ZionSpaceManagerLocalhost.CallOpts, spaceId, channelId) -} - -// GetChannelInfoByChannelId is a free data retrieval call binding the contract method 0x0db37ba3. -// -// Solidity: function getChannelInfoByChannelId(string spaceId, string channelId) view returns((uint256,string,uint256,string,address,bool)) -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCallerSession) GetChannelInfoByChannelId(spaceId string, channelId string) (DataTypesChannelInfo, error) { - return _ZionSpaceManagerLocalhost.Contract.GetChannelInfoByChannelId(&_ZionSpaceManagerLocalhost.CallOpts, spaceId, channelId) -} - -// GetChannelsBySpaceId is a free data retrieval call binding the contract method 0x50c24eef. -// -// Solidity: function getChannelsBySpaceId(string spaceId) view returns((uint256,(uint256,uint256,string,string,address,bool)[])) -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCaller) GetChannelsBySpaceId(opts *bind.CallOpts, spaceId string) (DataTypesChannels, error) { - var out []interface{} - err := _ZionSpaceManagerLocalhost.contract.Call(opts, &out, "getChannelsBySpaceId", spaceId) - - if err != nil { - return *new(DataTypesChannels), err - } - - out0 := *abi.ConvertType(out[0], new(DataTypesChannels)).(*DataTypesChannels) - - return out0, err - -} - -// GetChannelsBySpaceId is a free data retrieval call binding the contract method 0x50c24eef. -// -// Solidity: function getChannelsBySpaceId(string spaceId) view returns((uint256,(uint256,uint256,string,string,address,bool)[])) -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostSession) GetChannelsBySpaceId(spaceId string) (DataTypesChannels, error) { - return _ZionSpaceManagerLocalhost.Contract.GetChannelsBySpaceId(&_ZionSpaceManagerLocalhost.CallOpts, spaceId) -} - -// GetChannelsBySpaceId is a free data retrieval call binding the contract method 0x50c24eef. -// -// Solidity: function getChannelsBySpaceId(string spaceId) view returns((uint256,(uint256,uint256,string,string,address,bool)[])) -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCallerSession) GetChannelsBySpaceId(spaceId string) (DataTypesChannels, error) { - return _ZionSpaceManagerLocalhost.Contract.GetChannelsBySpaceId(&_ZionSpaceManagerLocalhost.CallOpts, spaceId) -} - -// GetEntitlementModulesBySpaceId is a free data retrieval call binding the contract method 0x141b6498. -// -// Solidity: function getEntitlementModulesBySpaceId(string spaceId) view returns(address[]) -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCaller) GetEntitlementModulesBySpaceId(opts *bind.CallOpts, spaceId string) ([]common.Address, error) { - var out []interface{} - err := _ZionSpaceManagerLocalhost.contract.Call(opts, &out, "getEntitlementModulesBySpaceId", spaceId) - - if err != nil { - return *new([]common.Address), err - } - - out0 := *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address) - - return out0, err - -} - -// GetEntitlementModulesBySpaceId is a free data retrieval call binding the contract method 0x141b6498. -// -// Solidity: function getEntitlementModulesBySpaceId(string spaceId) view returns(address[]) -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 0x141b6498. -// -// Solidity: function getEntitlementModulesBySpaceId(string spaceId) view returns(address[]) -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 0x3519167c. -// -// 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) - - if err != nil { - return *new([]DataTypesEntitlementModuleInfo), err - } - - out0 := *abi.ConvertType(out[0], new([]DataTypesEntitlementModuleInfo)).(*[]DataTypesEntitlementModuleInfo) - - return out0, err - -} - -// GetEntitlementsInfoBySpaceId is a free data retrieval call binding the contract method 0x3519167c. -// -// 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 0x3519167c. -// -// 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 0x9ea4d532. -// -// Solidity: function getPermissionFromMap(bytes32 permissionType) view returns((string)) -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCaller) GetPermissionFromMap(opts *bind.CallOpts, permissionType [32]byte) (DataTypesPermission, error) { - var out []interface{} - err := _ZionSpaceManagerLocalhost.contract.Call(opts, &out, "getPermissionFromMap", permissionType) - - if err != nil { - return *new(DataTypesPermission), err - } - - out0 := *abi.ConvertType(out[0], new(DataTypesPermission)).(*DataTypesPermission) - - return out0, err - -} - -// GetPermissionFromMap is a free data retrieval call binding the contract method 0x9ea4d532. -// -// Solidity: function getPermissionFromMap(bytes32 permissionType) view returns((string)) -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 0x9ea4d532. -// -// Solidity: function getPermissionFromMap(bytes32 permissionType) view returns((string)) -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCallerSession) GetPermissionFromMap(permissionType [32]byte) (DataTypesPermission, error) { - return _ZionSpaceManagerLocalhost.Contract.GetPermissionFromMap(&_ZionSpaceManagerLocalhost.CallOpts, permissionType) -} - -// GetSpaceIdByNetworkId is a free data retrieval call binding the contract method 0x9ddd0d6b. -// -// Solidity: function getSpaceIdByNetworkId(string networkId) view returns(uint256) -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCaller) GetSpaceIdByNetworkId(opts *bind.CallOpts, networkId string) (*big.Int, error) { - var out []interface{} - err := _ZionSpaceManagerLocalhost.contract.Call(opts, &out, "getSpaceIdByNetworkId", networkId) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// GetSpaceIdByNetworkId is a free data retrieval call binding the contract method 0x9ddd0d6b. -// -// Solidity: function getSpaceIdByNetworkId(string networkId) view returns(uint256) -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostSession) GetSpaceIdByNetworkId(networkId string) (*big.Int, error) { - return _ZionSpaceManagerLocalhost.Contract.GetSpaceIdByNetworkId(&_ZionSpaceManagerLocalhost.CallOpts, networkId) -} - -// GetSpaceIdByNetworkId is a free data retrieval call binding the contract method 0x9ddd0d6b. -// -// Solidity: function getSpaceIdByNetworkId(string networkId) view returns(uint256) -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCallerSession) GetSpaceIdByNetworkId(networkId string) (*big.Int, error) { - return _ZionSpaceManagerLocalhost.Contract.GetSpaceIdByNetworkId(&_ZionSpaceManagerLocalhost.CallOpts, networkId) -} - -// GetSpaceInfoBySpaceId is a free data retrieval call binding the contract method 0x2bb59212. -// -// Solidity: function getSpaceInfoBySpaceId(string spaceId) view returns((uint256,string,uint256,string,address,address,bool)) -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCaller) GetSpaceInfoBySpaceId(opts *bind.CallOpts, spaceId string) (DataTypesSpaceInfo, error) { - var out []interface{} - err := _ZionSpaceManagerLocalhost.contract.Call(opts, &out, "getSpaceInfoBySpaceId", spaceId) - - if err != nil { - return *new(DataTypesSpaceInfo), err - } - - out0 := *abi.ConvertType(out[0], new(DataTypesSpaceInfo)).(*DataTypesSpaceInfo) - - return out0, err - -} - -// GetSpaceInfoBySpaceId is a free data retrieval call binding the contract method 0x2bb59212. -// -// Solidity: function getSpaceInfoBySpaceId(string spaceId) view returns((uint256,string,uint256,string,address,address,bool)) -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 0x2bb59212. -// -// Solidity: function getSpaceInfoBySpaceId(string spaceId) view returns((uint256,string,uint256,string,address,address,bool)) -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 0x2a4bdf25. -// -// Solidity: function getSpaceOwnerBySpaceId(string spaceId) view returns(address) -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCaller) GetSpaceOwnerBySpaceId(opts *bind.CallOpts, spaceId string) (common.Address, error) { - var out []interface{} - err := _ZionSpaceManagerLocalhost.contract.Call(opts, &out, "getSpaceOwnerBySpaceId", spaceId) - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// GetSpaceOwnerBySpaceId is a free data retrieval call binding the contract method 0x2a4bdf25. -// -// Solidity: function getSpaceOwnerBySpaceId(string spaceId) view returns(address) -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 0x2a4bdf25. -// -// Solidity: function getSpaceOwnerBySpaceId(string spaceId) view returns(address) -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCallerSession) GetSpaceOwnerBySpaceId(spaceId string) (common.Address, error) { - return _ZionSpaceManagerLocalhost.Contract.GetSpaceOwnerBySpaceId(&_ZionSpaceManagerLocalhost.CallOpts, spaceId) -} - -// GetSpaces is a free data retrieval call binding the contract method 0x15478ca9. -// -// Solidity: function getSpaces() view returns((uint256,string,uint256,string,address,address,bool)[]) -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCaller) GetSpaces(opts *bind.CallOpts) ([]DataTypesSpaceInfo, error) { - var out []interface{} - err := _ZionSpaceManagerLocalhost.contract.Call(opts, &out, "getSpaces") - - if err != nil { - return *new([]DataTypesSpaceInfo), err - } - - out0 := *abi.ConvertType(out[0], new([]DataTypesSpaceInfo)).(*[]DataTypesSpaceInfo) - - return out0, err - -} - -// GetSpaces is a free data retrieval call binding the contract method 0x15478ca9. -// -// Solidity: function getSpaces() view returns((uint256,string,uint256,string,address,address,bool)[]) -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostSession) GetSpaces() ([]DataTypesSpaceInfo, error) { - return _ZionSpaceManagerLocalhost.Contract.GetSpaces(&_ZionSpaceManagerLocalhost.CallOpts) -} - -// GetSpaces is a free data retrieval call binding the contract method 0x15478ca9. -// -// Solidity: function getSpaces() view returns((uint256,string,uint256,string,address,address,bool)[]) -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCallerSession) GetSpaces() ([]DataTypesSpaceInfo, error) { - return _ZionSpaceManagerLocalhost.Contract.GetSpaces(&_ZionSpaceManagerLocalhost.CallOpts) -} - -// IsEntitled is a free data retrieval call binding the contract method 0xbf77b663. -// -// 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, channelId, user, permission) - - if err != nil { - return *new(bool), err - } - - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) - - return out0, err - -} - -// IsEntitled is a free data retrieval call binding the contract method 0xbf77b663. -// -// 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 0xbf77b663. -// -// 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 0x4196d1ff. -// -// 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) - - if err != nil { - return *new(bool), err - } - - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) - - return out0, err - -} - -// IsEntitlementModuleWhitelisted is a free data retrieval call binding the contract method 0x4196d1ff. -// -// 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 0x4196d1ff. -// -// 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) -} - -// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. -// -// Solidity: function owner() view returns(address) -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCaller) Owner(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _ZionSpaceManagerLocalhost.contract.Call(opts, &out, "owner") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. -// -// Solidity: function owner() view returns(address) -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostSession) Owner() (common.Address, error) { - return _ZionSpaceManagerLocalhost.Contract.Owner(&_ZionSpaceManagerLocalhost.CallOpts) -} - -// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. -// -// Solidity: function owner() view returns(address) -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostCallerSession) Owner() (common.Address, error) { - return _ZionSpaceManagerLocalhost.Contract.Owner(&_ZionSpaceManagerLocalhost.CallOpts) -} - -// AddPermissionToRole is a paid mutator transaction binding the contract method 0x7d9a0230. -// -// 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 0x7d9a0230. -// -// 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 0x7d9a0230. -// -// 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 0xbbd7358a. -// -// Solidity: function addRoleToEntitlementModule(string spaceNetworkId, string channelNetworkId, address entitlementModuleAddress, uint256 roleId, bytes entitlementData) returns() -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostTransactor) AddRoleToEntitlementModule(opts *bind.TransactOpts, spaceNetworkId string, channelNetworkId string, entitlementModuleAddress common.Address, roleId *big.Int, entitlementData []byte) (*types.Transaction, error) { - return _ZionSpaceManagerLocalhost.contract.Transact(opts, "addRoleToEntitlementModule", spaceNetworkId, channelNetworkId, entitlementModuleAddress, roleId, entitlementData) -} - -// AddRoleToEntitlementModule is a paid mutator transaction binding the contract method 0xbbd7358a. -// -// Solidity: function addRoleToEntitlementModule(string spaceNetworkId, string channelNetworkId, address entitlementModuleAddress, uint256 roleId, bytes entitlementData) returns() -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostSession) AddRoleToEntitlementModule(spaceNetworkId string, channelNetworkId string, entitlementModuleAddress common.Address, roleId *big.Int, entitlementData []byte) (*types.Transaction, error) { - return _ZionSpaceManagerLocalhost.Contract.AddRoleToEntitlementModule(&_ZionSpaceManagerLocalhost.TransactOpts, spaceNetworkId, channelNetworkId, entitlementModuleAddress, roleId, entitlementData) -} - -// AddRoleToEntitlementModule is a paid mutator transaction binding the contract method 0xbbd7358a. -// -// Solidity: function addRoleToEntitlementModule(string spaceNetworkId, string channelNetworkId, address entitlementModuleAddress, uint256 roleId, bytes entitlementData) returns() -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostTransactorSession) AddRoleToEntitlementModule(spaceNetworkId string, channelNetworkId string, entitlementModuleAddress common.Address, roleId *big.Int, entitlementData []byte) (*types.Transaction, error) { - return _ZionSpaceManagerLocalhost.Contract.AddRoleToEntitlementModule(&_ZionSpaceManagerLocalhost.TransactOpts, spaceNetworkId, channelNetworkId, entitlementModuleAddress, roleId, entitlementData) -} - -// CreateChannel is a paid mutator transaction binding the contract method 0xe69689af. -// -// Solidity: function createChannel((string,string,string) data, (uint256,address,bytes)[] roles) returns(uint256 channelId) -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostTransactor) CreateChannel(opts *bind.TransactOpts, data DataTypesCreateChannelData, roles []DataTypesCreateRoleEntitlementData) (*types.Transaction, error) { - return _ZionSpaceManagerLocalhost.contract.Transact(opts, "createChannel", data, roles) -} - -// CreateChannel is a paid mutator transaction binding the contract method 0xe69689af. -// -// Solidity: function createChannel((string,string,string) data, (uint256,address,bytes)[] roles) returns(uint256 channelId) -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostSession) CreateChannel(data DataTypesCreateChannelData, roles []DataTypesCreateRoleEntitlementData) (*types.Transaction, error) { - return _ZionSpaceManagerLocalhost.Contract.CreateChannel(&_ZionSpaceManagerLocalhost.TransactOpts, data, roles) -} - -// CreateChannel is a paid mutator transaction binding the contract method 0xe69689af. -// -// Solidity: function createChannel((string,string,string) data, (uint256,address,bytes)[] roles) returns(uint256 channelId) -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostTransactorSession) CreateChannel(data DataTypesCreateChannelData, roles []DataTypesCreateRoleEntitlementData) (*types.Transaction, error) { - return _ZionSpaceManagerLocalhost.Contract.CreateChannel(&_ZionSpaceManagerLocalhost.TransactOpts, data, roles) -} - -// CreateRole is a paid mutator transaction binding the contract method 0xd2192dbf. -// -// Solidity: function createRole(string spaceNetworkId, string name) returns(uint256 roleId) -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostTransactor) CreateRole(opts *bind.TransactOpts, spaceNetworkId string, name string) (*types.Transaction, error) { - return _ZionSpaceManagerLocalhost.contract.Transact(opts, "createRole", spaceNetworkId, name) -} - -// CreateRole is a paid mutator transaction binding the contract method 0xd2192dbf. -// -// Solidity: function createRole(string spaceNetworkId, string name) returns(uint256 roleId) -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostSession) CreateRole(spaceNetworkId string, name string) (*types.Transaction, error) { - return _ZionSpaceManagerLocalhost.Contract.CreateRole(&_ZionSpaceManagerLocalhost.TransactOpts, spaceNetworkId, name) -} - -// CreateRole is a paid mutator transaction binding the contract method 0xd2192dbf. -// -// Solidity: function createRole(string spaceNetworkId, string name) returns(uint256 roleId) -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostTransactorSession) CreateRole(spaceNetworkId string, name string) (*types.Transaction, error) { - return _ZionSpaceManagerLocalhost.Contract.CreateRole(&_ZionSpaceManagerLocalhost.TransactOpts, spaceNetworkId, name) -} - -// CreateSpace is a paid mutator transaction binding the contract method 0xd9d94cb7. -// -// Solidity: function createSpace((string,string) info, (string,(string)[],(string,(address,uint256,bool,uint256)[])[],address[]) entitlementData, (string)[] everyonePermissions) returns(uint256) -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostTransactor) CreateSpace(opts *bind.TransactOpts, info DataTypesCreateSpaceData, entitlementData DataTypesCreateSpaceEntitlementData, everyonePermissions []DataTypesPermission) (*types.Transaction, error) { - return _ZionSpaceManagerLocalhost.contract.Transact(opts, "createSpace", info, entitlementData, everyonePermissions) -} - -// CreateSpace is a paid mutator transaction binding the contract method 0xd9d94cb7. -// -// Solidity: function createSpace((string,string) info, (string,(string)[],(string,(address,uint256,bool,uint256)[])[],address[]) entitlementData, (string)[] everyonePermissions) returns(uint256) -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostSession) CreateSpace(info DataTypesCreateSpaceData, entitlementData DataTypesCreateSpaceEntitlementData, everyonePermissions []DataTypesPermission) (*types.Transaction, error) { - return _ZionSpaceManagerLocalhost.Contract.CreateSpace(&_ZionSpaceManagerLocalhost.TransactOpts, info, entitlementData, everyonePermissions) -} - -// CreateSpace is a paid mutator transaction binding the contract method 0xd9d94cb7. -// -// Solidity: function createSpace((string,string) info, (string,(string)[],(string,(address,uint256,bool,uint256)[])[],address[]) entitlementData, (string)[] everyonePermissions) returns(uint256) -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostTransactorSession) CreateSpace(info DataTypesCreateSpaceData, entitlementData DataTypesCreateSpaceEntitlementData, everyonePermissions []DataTypesPermission) (*types.Transaction, error) { - return _ZionSpaceManagerLocalhost.Contract.CreateSpace(&_ZionSpaceManagerLocalhost.TransactOpts, info, entitlementData, everyonePermissions) -} - -// RemoveEntitlement is a paid mutator transaction binding the contract method 0xa3a39cb9. -// -// Solidity: function removeEntitlement(string spaceNetworkId, string channelNetworkId, address entitlementModuleAddress, uint256[] roleIds, bytes data) returns() -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostTransactor) RemoveEntitlement(opts *bind.TransactOpts, spaceNetworkId string, channelNetworkId string, entitlementModuleAddress common.Address, roleIds []*big.Int, data []byte) (*types.Transaction, error) { - return _ZionSpaceManagerLocalhost.contract.Transact(opts, "removeEntitlement", spaceNetworkId, channelNetworkId, entitlementModuleAddress, roleIds, data) -} - -// RemoveEntitlement is a paid mutator transaction binding the contract method 0xa3a39cb9. -// -// Solidity: function removeEntitlement(string spaceNetworkId, string channelNetworkId, address entitlementModuleAddress, uint256[] roleIds, bytes data) returns() -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostSession) RemoveEntitlement(spaceNetworkId string, channelNetworkId string, entitlementModuleAddress common.Address, roleIds []*big.Int, data []byte) (*types.Transaction, error) { - return _ZionSpaceManagerLocalhost.Contract.RemoveEntitlement(&_ZionSpaceManagerLocalhost.TransactOpts, spaceNetworkId, channelNetworkId, entitlementModuleAddress, roleIds, data) -} - -// RemoveEntitlement is a paid mutator transaction binding the contract method 0xa3a39cb9. -// -// Solidity: function removeEntitlement(string spaceNetworkId, string channelNetworkId, address entitlementModuleAddress, uint256[] roleIds, bytes data) returns() -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostTransactorSession) RemoveEntitlement(spaceNetworkId string, channelNetworkId string, entitlementModuleAddress common.Address, roleIds []*big.Int, data []byte) (*types.Transaction, error) { - return _ZionSpaceManagerLocalhost.Contract.RemoveEntitlement(&_ZionSpaceManagerLocalhost.TransactOpts, spaceNetworkId, channelNetworkId, entitlementModuleAddress, roleIds, data) -} - -// RemovePermissionFromRole is a paid mutator transaction binding the contract method 0x4832a4ec. -// -// Solidity: function removePermissionFromRole(string spaceNetworkId, uint256 roleId, (string) permission) returns() -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostTransactor) RemovePermissionFromRole(opts *bind.TransactOpts, spaceNetworkId string, roleId *big.Int, permission DataTypesPermission) (*types.Transaction, error) { - return _ZionSpaceManagerLocalhost.contract.Transact(opts, "removePermissionFromRole", spaceNetworkId, roleId, permission) -} - -// RemovePermissionFromRole is a paid mutator transaction binding the contract method 0x4832a4ec. -// -// Solidity: function removePermissionFromRole(string spaceNetworkId, uint256 roleId, (string) permission) returns() -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostSession) RemovePermissionFromRole(spaceNetworkId string, roleId *big.Int, permission DataTypesPermission) (*types.Transaction, error) { - return _ZionSpaceManagerLocalhost.Contract.RemovePermissionFromRole(&_ZionSpaceManagerLocalhost.TransactOpts, spaceNetworkId, roleId, permission) -} - -// RemovePermissionFromRole is a paid mutator transaction binding the contract method 0x4832a4ec. -// -// Solidity: function removePermissionFromRole(string spaceNetworkId, uint256 roleId, (string) permission) returns() -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostTransactorSession) RemovePermissionFromRole(spaceNetworkId string, roleId *big.Int, permission DataTypesPermission) (*types.Transaction, error) { - return _ZionSpaceManagerLocalhost.Contract.RemovePermissionFromRole(&_ZionSpaceManagerLocalhost.TransactOpts, spaceNetworkId, roleId, permission) -} - -// RemoveRole is a paid mutator transaction binding the contract method 0x8b0e905a. -// -// Solidity: function removeRole(string spaceNetworkId, uint256 roleId) returns() -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostTransactor) RemoveRole(opts *bind.TransactOpts, spaceNetworkId string, roleId *big.Int) (*types.Transaction, error) { - return _ZionSpaceManagerLocalhost.contract.Transact(opts, "removeRole", spaceNetworkId, roleId) -} - -// RemoveRole is a paid mutator transaction binding the contract method 0x8b0e905a. -// -// Solidity: function removeRole(string spaceNetworkId, uint256 roleId) returns() -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostSession) RemoveRole(spaceNetworkId string, roleId *big.Int) (*types.Transaction, error) { - return _ZionSpaceManagerLocalhost.Contract.RemoveRole(&_ZionSpaceManagerLocalhost.TransactOpts, spaceNetworkId, roleId) -} - -// RemoveRole is a paid mutator transaction binding the contract method 0x8b0e905a. -// -// Solidity: function removeRole(string spaceNetworkId, uint256 roleId) returns() -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostTransactorSession) RemoveRole(spaceNetworkId string, roleId *big.Int) (*types.Transaction, error) { - return _ZionSpaceManagerLocalhost.Contract.RemoveRole(&_ZionSpaceManagerLocalhost.TransactOpts, spaceNetworkId, roleId) -} - -// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. -// -// Solidity: function renounceOwnership() returns() -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ZionSpaceManagerLocalhost.contract.Transact(opts, "renounceOwnership") -} - -// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. -// -// Solidity: function renounceOwnership() returns() -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostSession) RenounceOwnership() (*types.Transaction, error) { - return _ZionSpaceManagerLocalhost.Contract.RenounceOwnership(&_ZionSpaceManagerLocalhost.TransactOpts) -} - -// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. -// -// Solidity: function renounceOwnership() returns() -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostTransactorSession) RenounceOwnership() (*types.Transaction, error) { - return _ZionSpaceManagerLocalhost.Contract.RenounceOwnership(&_ZionSpaceManagerLocalhost.TransactOpts) -} - -// SetChannelAccess is a paid mutator transaction binding the contract method 0x72a29321. -// -// Solidity: function setChannelAccess(string spaceNetworkId, string channelNetworkId, bool disabled) returns() -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostTransactor) SetChannelAccess(opts *bind.TransactOpts, spaceNetworkId string, channelNetworkId string, disabled bool) (*types.Transaction, error) { - return _ZionSpaceManagerLocalhost.contract.Transact(opts, "setChannelAccess", spaceNetworkId, channelNetworkId, disabled) -} - -// SetChannelAccess is a paid mutator transaction binding the contract method 0x72a29321. -// -// Solidity: function setChannelAccess(string spaceNetworkId, string channelNetworkId, bool disabled) returns() -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostSession) SetChannelAccess(spaceNetworkId string, channelNetworkId string, disabled bool) (*types.Transaction, error) { - return _ZionSpaceManagerLocalhost.Contract.SetChannelAccess(&_ZionSpaceManagerLocalhost.TransactOpts, spaceNetworkId, channelNetworkId, disabled) -} - -// SetChannelAccess is a paid mutator transaction binding the contract method 0x72a29321. -// -// Solidity: function setChannelAccess(string spaceNetworkId, string channelNetworkId, bool disabled) returns() -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostTransactorSession) SetChannelAccess(spaceNetworkId string, channelNetworkId string, disabled bool) (*types.Transaction, error) { - return _ZionSpaceManagerLocalhost.Contract.SetChannelAccess(&_ZionSpaceManagerLocalhost.TransactOpts, spaceNetworkId, channelNetworkId, disabled) -} - -// SetDefaultTokenEntitlementModule is a paid mutator transaction binding the contract method 0x1a039620. -// -// Solidity: function setDefaultTokenEntitlementModule(address entitlementModule) returns() -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostTransactor) SetDefaultTokenEntitlementModule(opts *bind.TransactOpts, entitlementModule common.Address) (*types.Transaction, error) { - return _ZionSpaceManagerLocalhost.contract.Transact(opts, "setDefaultTokenEntitlementModule", entitlementModule) -} - -// SetDefaultTokenEntitlementModule is a paid mutator transaction binding the contract method 0x1a039620. -// -// Solidity: function setDefaultTokenEntitlementModule(address entitlementModule) returns() -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostSession) SetDefaultTokenEntitlementModule(entitlementModule common.Address) (*types.Transaction, error) { - return _ZionSpaceManagerLocalhost.Contract.SetDefaultTokenEntitlementModule(&_ZionSpaceManagerLocalhost.TransactOpts, entitlementModule) -} - -// SetDefaultTokenEntitlementModule is a paid mutator transaction binding the contract method 0x1a039620. -// -// Solidity: function setDefaultTokenEntitlementModule(address entitlementModule) returns() -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostTransactorSession) SetDefaultTokenEntitlementModule(entitlementModule common.Address) (*types.Transaction, error) { - return _ZionSpaceManagerLocalhost.Contract.SetDefaultTokenEntitlementModule(&_ZionSpaceManagerLocalhost.TransactOpts, entitlementModule) -} - -// SetDefaultUserEntitlementModule is a paid mutator transaction binding the contract method 0xe1b7a9e5. -// -// Solidity: function setDefaultUserEntitlementModule(address entitlementModule) returns() -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostTransactor) SetDefaultUserEntitlementModule(opts *bind.TransactOpts, entitlementModule common.Address) (*types.Transaction, error) { - return _ZionSpaceManagerLocalhost.contract.Transact(opts, "setDefaultUserEntitlementModule", entitlementModule) -} - -// SetDefaultUserEntitlementModule is a paid mutator transaction binding the contract method 0xe1b7a9e5. -// -// Solidity: function setDefaultUserEntitlementModule(address entitlementModule) returns() -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostSession) SetDefaultUserEntitlementModule(entitlementModule common.Address) (*types.Transaction, error) { - return _ZionSpaceManagerLocalhost.Contract.SetDefaultUserEntitlementModule(&_ZionSpaceManagerLocalhost.TransactOpts, entitlementModule) -} - -// SetDefaultUserEntitlementModule is a paid mutator transaction binding the contract method 0xe1b7a9e5. -// -// Solidity: function setDefaultUserEntitlementModule(address entitlementModule) returns() -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostTransactorSession) SetDefaultUserEntitlementModule(entitlementModule common.Address) (*types.Transaction, error) { - return _ZionSpaceManagerLocalhost.Contract.SetDefaultUserEntitlementModule(&_ZionSpaceManagerLocalhost.TransactOpts, entitlementModule) -} - -// SetSpaceAccess is a paid mutator transaction binding the contract method 0xf86caf83. -// -// Solidity: function setSpaceAccess(string spaceNetworkId, bool disabled) returns() -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostTransactor) SetSpaceAccess(opts *bind.TransactOpts, spaceNetworkId string, disabled bool) (*types.Transaction, error) { - return _ZionSpaceManagerLocalhost.contract.Transact(opts, "setSpaceAccess", spaceNetworkId, disabled) -} - -// SetSpaceAccess is a paid mutator transaction binding the contract method 0xf86caf83. -// -// Solidity: function setSpaceAccess(string spaceNetworkId, bool disabled) returns() -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostSession) SetSpaceAccess(spaceNetworkId string, disabled bool) (*types.Transaction, error) { - return _ZionSpaceManagerLocalhost.Contract.SetSpaceAccess(&_ZionSpaceManagerLocalhost.TransactOpts, spaceNetworkId, disabled) -} - -// SetSpaceAccess is a paid mutator transaction binding the contract method 0xf86caf83. -// -// Solidity: function setSpaceAccess(string spaceNetworkId, bool disabled) returns() -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostTransactorSession) SetSpaceAccess(spaceNetworkId string, disabled bool) (*types.Transaction, error) { - return _ZionSpaceManagerLocalhost.Contract.SetSpaceAccess(&_ZionSpaceManagerLocalhost.TransactOpts, spaceNetworkId, disabled) -} - -// SetSpaceNFT is a paid mutator transaction binding the contract method 0xccde2de3. -// -// Solidity: function setSpaceNFT(address spaceNFTAddress) returns() -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostTransactor) SetSpaceNFT(opts *bind.TransactOpts, spaceNFTAddress common.Address) (*types.Transaction, error) { - return _ZionSpaceManagerLocalhost.contract.Transact(opts, "setSpaceNFT", spaceNFTAddress) -} - -// SetSpaceNFT is a paid mutator transaction binding the contract method 0xccde2de3. -// -// Solidity: function setSpaceNFT(address spaceNFTAddress) returns() -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostSession) SetSpaceNFT(spaceNFTAddress common.Address) (*types.Transaction, error) { - return _ZionSpaceManagerLocalhost.Contract.SetSpaceNFT(&_ZionSpaceManagerLocalhost.TransactOpts, spaceNFTAddress) -} - -// SetSpaceNFT is a paid mutator transaction binding the contract method 0xccde2de3. -// -// Solidity: function setSpaceNFT(address spaceNFTAddress) returns() -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostTransactorSession) SetSpaceNFT(spaceNFTAddress common.Address) (*types.Transaction, error) { - return _ZionSpaceManagerLocalhost.Contract.SetSpaceNFT(&_ZionSpaceManagerLocalhost.TransactOpts, spaceNFTAddress) -} - -// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. -// -// Solidity: function transferOwnership(address newOwner) returns() -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { - return _ZionSpaceManagerLocalhost.contract.Transact(opts, "transferOwnership", newOwner) -} - -// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. -// -// Solidity: function transferOwnership(address newOwner) returns() -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { - return _ZionSpaceManagerLocalhost.Contract.TransferOwnership(&_ZionSpaceManagerLocalhost.TransactOpts, newOwner) -} - -// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. -// -// Solidity: function transferOwnership(address newOwner) returns() -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { - return _ZionSpaceManagerLocalhost.Contract.TransferOwnership(&_ZionSpaceManagerLocalhost.TransactOpts, newOwner) -} - -// WhitelistEntitlementModule is a paid mutator transaction binding the contract method 0xe798ff3f. -// -// Solidity: function whitelistEntitlementModule(string spaceNetworkId, address entitlementAddress, bool whitelist) returns() -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostTransactor) WhitelistEntitlementModule(opts *bind.TransactOpts, spaceNetworkId string, entitlementAddress common.Address, whitelist bool) (*types.Transaction, error) { - return _ZionSpaceManagerLocalhost.contract.Transact(opts, "whitelistEntitlementModule", spaceNetworkId, entitlementAddress, whitelist) -} - -// WhitelistEntitlementModule is a paid mutator transaction binding the contract method 0xe798ff3f. -// -// Solidity: function whitelistEntitlementModule(string spaceNetworkId, address entitlementAddress, bool whitelist) returns() -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostSession) WhitelistEntitlementModule(spaceNetworkId string, entitlementAddress common.Address, whitelist bool) (*types.Transaction, error) { - return _ZionSpaceManagerLocalhost.Contract.WhitelistEntitlementModule(&_ZionSpaceManagerLocalhost.TransactOpts, spaceNetworkId, entitlementAddress, whitelist) -} - -// WhitelistEntitlementModule is a paid mutator transaction binding the contract method 0xe798ff3f. -// -// Solidity: function whitelistEntitlementModule(string spaceNetworkId, address entitlementAddress, bool whitelist) returns() -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostTransactorSession) WhitelistEntitlementModule(spaceNetworkId string, entitlementAddress common.Address, whitelist bool) (*types.Transaction, error) { - return _ZionSpaceManagerLocalhost.Contract.WhitelistEntitlementModule(&_ZionSpaceManagerLocalhost.TransactOpts, spaceNetworkId, entitlementAddress, whitelist) -} - -// ZionSpaceManagerLocalhostOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the ZionSpaceManagerLocalhost contract. -type ZionSpaceManagerLocalhostOwnershipTransferredIterator struct { - Event *ZionSpaceManagerLocalhostOwnershipTransferred // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *ZionSpaceManagerLocalhostOwnershipTransferredIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(ZionSpaceManagerLocalhostOwnershipTransferred) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(ZionSpaceManagerLocalhostOwnershipTransferred) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *ZionSpaceManagerLocalhostOwnershipTransferredIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *ZionSpaceManagerLocalhostOwnershipTransferredIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// ZionSpaceManagerLocalhostOwnershipTransferred represents a OwnershipTransferred event raised by the ZionSpaceManagerLocalhost contract. -type ZionSpaceManagerLocalhostOwnershipTransferred struct { - PreviousOwner common.Address - NewOwner common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. -// -// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*ZionSpaceManagerLocalhostOwnershipTransferredIterator, error) { - - var previousOwnerRule []interface{} - for _, previousOwnerItem := range previousOwner { - previousOwnerRule = append(previousOwnerRule, previousOwnerItem) - } - var newOwnerRule []interface{} - for _, newOwnerItem := range newOwner { - newOwnerRule = append(newOwnerRule, newOwnerItem) - } - - logs, sub, err := _ZionSpaceManagerLocalhost.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) - if err != nil { - return nil, err - } - return &ZionSpaceManagerLocalhostOwnershipTransferredIterator{contract: _ZionSpaceManagerLocalhost.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil -} - -// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. -// -// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *ZionSpaceManagerLocalhostOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { - - var previousOwnerRule []interface{} - for _, previousOwnerItem := range previousOwner { - previousOwnerRule = append(previousOwnerRule, previousOwnerItem) - } - var newOwnerRule []interface{} - for _, newOwnerItem := range newOwner { - newOwnerRule = append(newOwnerRule, newOwnerItem) - } - - logs, sub, err := _ZionSpaceManagerLocalhost.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(ZionSpaceManagerLocalhostOwnershipTransferred) - if err := _ZionSpaceManagerLocalhost.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. -// -// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) -func (_ZionSpaceManagerLocalhost *ZionSpaceManagerLocalhostFilterer) ParseOwnershipTransferred(log types.Log) (*ZionSpaceManagerLocalhostOwnershipTransferred, error) { - event := new(ZionSpaceManagerLocalhostOwnershipTransferred) - if err := _ZionSpaceManagerLocalhost.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} diff --git a/zion/contracts/zion_localhost/zioneer.json b/zion/contracts/zion_localhost/zioneer.json new file mode 100644 index 000000000..6a5fd5a99 --- /dev/null +++ b/zion/contracts/zion_localhost/zioneer.json @@ -0,0 +1,3 @@ +{ + "zioneer": "0x0DCd1Bf9A1b36cE34237eEaFef220932846BCD82" +} \ No newline at end of file diff --git a/zion/space_contract.go b/zion/space_contract.go new file mode 100644 index 000000000..9e359c1f4 --- /dev/null +++ b/zion/space_contract.go @@ -0,0 +1,25 @@ +package zion + +import ( + "github.com/ethereum/go-ethereum/common" + "github.com/matrix-org/dendrite/authorization" +) + +type SpaceContract interface { + IsSpaceDisabled(spaceNetworkId string) (bool, error) + IsChannelDisabled( + spaceNetworkId string, + channelNetworkId string, + ) (bool, error) + IsEntitledToSpace( + spaceNetworkId string, + user common.Address, + permission authorization.Permission, + ) (bool, error) + IsEntitledToChannel( + spaceNetworkId string, + channelNetworkId string, + user common.Address, + permission authorization.Permission, + ) (bool, error) +} diff --git a/zion/space_contract_goerli.go b/zion/space_contract_goerli.go new file mode 100644 index 000000000..0d97b2162 --- /dev/null +++ b/zion/space_contract_goerli.go @@ -0,0 +1,125 @@ +package zion + +import ( + _ "embed" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/ethclient" + "github.com/gologme/log" + "github.com/matrix-org/dendrite/authorization" + "github.com/matrix-org/dendrite/zion/contracts/goerli_space" + "github.com/matrix-org/dendrite/zion/contracts/goerli_space_factory" +) + +//go:embed contracts/goerli_space_factory/space-factory.json +var goerliSpaceFactoryJson []byte + +type SpaceContractGoerli struct { + ethClient *ethclient.Client + spaceFactory *goerli_space_factory.GoerliSpaceFactory + spaces map[string]*goerli_space.GoerliSpace +} + +func NewSpaceContractGoerli(ethClient *ethclient.Client) (*SpaceContractGoerli, error) { + jsonAddress, err := loadSpaceFactoryAddress(goerliSpaceFactoryJson) + if err != nil { + log.Errorf("error parsing goerli space factory contract address %v. Error: %v", jsonAddress, err) + return nil, err + } + address := common.HexToAddress(jsonAddress.SpaceFactory) + spaceFactory, err := goerli_space_factory.NewGoerliSpaceFactory(address, ethClient) + if err != nil { + log.Errorf("error fetching goerli space factory contract with address %v. Error: %v", jsonAddress, err) + return nil, err + } + // no errors. + var spaceContract = &SpaceContractGoerli{ + ethClient: ethClient, + spaceFactory: spaceFactory, + spaces: make(map[string]*goerli_space.GoerliSpace), + } + return spaceContract, nil +} + +func (za *SpaceContractGoerli) IsEntitledToSpace( + spaceNetworkId string, + user common.Address, + permission authorization.Permission, +) (bool, error) { + // get the space and check if user is entitled. + space, err := za.getSpace(spaceNetworkId) + if err != nil { + return false, err + } + isEntitled, err := space.IsEntitledToSpace( + nil, + user, + permission.String(), + ) + if err != nil { + return false, err + } + return isEntitled, nil +} + +func (za *SpaceContractGoerli) IsEntitledToChannel( + spaceNetworkId string, + channelNetworkId string, + user common.Address, + permission authorization.Permission, +) (bool, error) { + // get the space and check if user is entitled. + space, err := za.getSpace(spaceNetworkId) + if err != nil { + return false, err + } + // channel entitlement check + isEntitled, err := space.IsEntitledToChannel( + nil, + channelNetworkId, + user, + permission.String(), + ) + return isEntitled, err +} + +func (za *SpaceContractGoerli) IsSpaceDisabled(spaceNetworkId string) (bool, error) { + space, err := za.getSpace(spaceNetworkId) + if err != nil { + return false, err + } + isDisabled, err := space.Disabled(nil) + return isDisabled, err +} + +func (za *SpaceContractGoerli) IsChannelDisabled(spaceNetworkId string, channelNetworkId string) (bool, error) { + space, err := za.getSpace(spaceNetworkId) + if err != nil { + return false, err + } + channelIdHash := NetworkIdToHash(channelNetworkId) + channel, err := space.GetChannelByHash(nil, channelIdHash) + if err != nil { + return false, err + } + return channel.Disabled, err +} + +func (za *SpaceContractGoerli) getSpace(networkId string) (*goerli_space.GoerliSpace, error) { + if za.spaces[networkId] == nil { + // convert the networkId to keccak256 spaceIdHash + spaceIdHash := NetworkIdToHash(networkId) + // then use the spaceFactory to fetch the space address + spaceAddress, err := za.spaceFactory.SpaceByHash(nil, spaceIdHash) + if err != nil { + return nil, err + } + // cache the space for future use + space, err := goerli_space.NewGoerliSpace(spaceAddress, za.ethClient) + if err != nil { + return nil, err + } + za.spaces[networkId] = space + } + return za.spaces[networkId], nil +} diff --git a/zion/space_contract_localhost.go b/zion/space_contract_localhost.go new file mode 100644 index 000000000..63648b3bf --- /dev/null +++ b/zion/space_contract_localhost.go @@ -0,0 +1,120 @@ +package zion + +import ( + _ "embed" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/ethclient" + "github.com/matrix-org/dendrite/authorization" + "github.com/matrix-org/dendrite/zion/contracts/localhost_space" + "github.com/matrix-org/dendrite/zion/contracts/localhost_space_factory" + log "github.com/sirupsen/logrus" +) + +//go:embed contracts/localhost_space_factory/space-factory.json +var localhostSpaceFactoryJson []byte + +type SpaceContractLocalhost struct { + ethClient *ethclient.Client + spaceFactory *localhost_space_factory.LocalhostSpaceFactory + spaces map[string]*localhost_space.LocalhostSpace +} + +func NewSpaceContractLocalhost(ethClient *ethclient.Client) (*SpaceContractLocalhost, error) { + jsonAddress, err := loadSpaceFactoryAddress(localhostSpaceFactoryJson) + if err != nil { + log.Errorf("error parsing localhost space factory contract address %v. Error: %v", jsonAddress, err) + return nil, err + } + address := common.HexToAddress(jsonAddress.SpaceFactory) + spaceFactory, err := localhost_space_factory.NewLocalhostSpaceFactory(address, ethClient) + if err != nil { + log.Errorf("error fetching localhost space factory contract with address %v. Error: %v", jsonAddress, err) + return nil, err + } + // no errors. + var spaceContract = &SpaceContractLocalhost{ + ethClient: ethClient, + spaceFactory: spaceFactory, + spaces: make(map[string]*localhost_space.LocalhostSpace), + } + return spaceContract, nil +} + +func (za *SpaceContractLocalhost) IsEntitledToSpace( + spaceNetworkId string, + user common.Address, + permission authorization.Permission, +) (bool, error) { + // get the space and check if user is entitled. + space, err := za.getSpace(spaceNetworkId) + if err != nil { + return false, err + } + isEntitled, err := space.IsEntitledToSpace( + nil, + user, + permission.String(), + ) + return isEntitled, err +} + +func (za *SpaceContractLocalhost) IsEntitledToChannel( + spaceNetworkId string, + channelNetworkId string, + user common.Address, + permission authorization.Permission, +) (bool, error) { + // get the space and check if user is entitled. + space, err := za.getSpace(spaceNetworkId) + if err != nil { + return false, err + } + // channel entitlement check + isEntitled, err := space.IsEntitledToChannel( + nil, + channelNetworkId, + user, + permission.String(), + ) + return isEntitled, err +} + +func (za *SpaceContractLocalhost) IsSpaceDisabled(spaceNetworkId string) (bool, error) { + space, err := za.getSpace(spaceNetworkId) + if err != nil { + return false, err + } + + isDisabled, err := space.Disabled(nil) + return isDisabled, err +} + +func (za *SpaceContractLocalhost) IsChannelDisabled(spaceNetworkId string, channelNetworkId string) (bool, error) { + space, err := za.getSpace(spaceNetworkId) + if err != nil { + return false, err + } + channelIdHash := NetworkIdToHash(channelNetworkId) + channel, err := space.GetChannelByHash(nil, channelIdHash) + return channel.Disabled, err +} + +func (za *SpaceContractLocalhost) getSpace(networkId string) (*localhost_space.LocalhostSpace, error) { + if za.spaces[networkId] == nil { + // convert the networkId to keccak256 spaceIdHash + spaceIdHash := NetworkIdToHash(networkId) + // then use the spaceFactory to fetch the space address + spaceAddress, err := za.spaceFactory.SpaceByHash(nil, spaceIdHash) + if err != nil { + return nil, err + } + // cache the space for future use + space, err := localhost_space.NewLocalhostSpace(spaceAddress, za.ethClient) + if err != nil { + return nil, err + } + za.spaces[networkId] = space + } + return za.spaces[networkId], nil +} diff --git a/zion/store.go b/zion/store.go index 6089ff81b..e9350519c 100644 --- a/zion/store.go +++ b/zion/store.go @@ -12,19 +12,17 @@ import ( "github.com/matrix-org/gomatrixserverlib" ) -type ClientRoomserverStore struct { - rsAPI roomserver.ClientRoomserverAPI +type Store struct { + roomQuery roomserver.QueryEventsAPI } -type SyncRoomserverStore struct { - rsAPI roomserver.SyncRoomserverAPI +func NewStore(roomQuery roomserver.QueryEventsAPI) Store { + return Store{ + roomQuery: roomQuery, + } } -type StoreAPI interface { - GetRoomInfo(roomId string, userId UserIdentifier) RoomInfo -} - -func (s *ClientRoomserverStore) GetRoomInfo(roomId string, userId UserIdentifier) RoomInfo { +func (s *Store) GetRoomInfo(roomId string, userId UserIdentifier) RoomInfo { result := RoomInfo{ QueryUserId: userId.MatrixUserId, SpaceNetworkId: "", @@ -49,7 +47,7 @@ func (s *ClientRoomserverStore) GetRoomInfo(roomId string, userId UserIdentifier } var roomEvents roomserver.QueryCurrentStateResponse - err := s.rsAPI.QueryCurrentState(context.Background(), &roomserver.QueryCurrentStateRequest{ + err := s.roomQuery.QueryCurrentState(context.Background(), &roomserver.QueryCurrentStateRequest{ RoomID: roomId, AllowWildcards: true, StateTuples: []gomatrixserverlib.StateKeyTuple{ @@ -63,9 +61,11 @@ func (s *ClientRoomserverStore) GetRoomInfo(roomId string, userId UserIdentifier return result } //TODO: replace with HydrateRoomInfoWithStateEvents when you have a practical way to flatten roomEvents map + doneSearching := false for _, state := range roomEvents.StateEvents { switch state.Type() { case gomatrixserverlib.MRoomCreate: + // Space is created with no children yet. var creatorEvent CreatorEvent err := json.Unmarshal(roomEvents.StateEvents[createTuple].Content(), &creatorEvent) result.IsOwner = strings.HasPrefix( @@ -77,96 +77,21 @@ func (s *ClientRoomserverStore) GetRoomInfo(roomId string, userId UserIdentifier result.SpaceNetworkId = roomId } case ConstSpaceChildEventType: + // Space is created and has one or more children. result.RoomType = Space result.SpaceNetworkId = roomId + doneSearching = true case ConstSpaceParentEventType: + // Channel is created and has a reference to the parent. result.RoomType = Channel result.SpaceNetworkId = *state.StateKey() result.ChannelNetworkId = roomId + doneSearching = true + } + if doneSearching { + break } } return result } - -func (s *SyncRoomserverStore) GetRoomInfo(roomId string, userId UserIdentifier) RoomInfo { - result := RoomInfo{ - QueryUserId: userId.MatrixUserId, - SpaceNetworkId: "", - ChannelNetworkId: "", - RoomType: Unknown, - IsOwner: false, - } - - createTuple := gomatrixserverlib.StateKeyTuple{ - EventType: gomatrixserverlib.MRoomCreate, - StateKey: "", - } - - spaceChildTuple := gomatrixserverlib.StateKeyTuple{ - EventType: ConstSpaceChildEventType, - StateKey: "*", - } - - spaceParentTuple := gomatrixserverlib.StateKeyTuple{ - EventType: ConstSpaceParentEventType, - StateKey: "*", - } - - var roomEvents roomserver.QueryLatestEventsAndStateResponse - err := s.rsAPI.QueryLatestEventsAndState(context.Background(), - &roomserver.QueryLatestEventsAndStateRequest{ - RoomID: roomId, - StateToFetch: []gomatrixserverlib.StateKeyTuple{ - createTuple, - spaceParentTuple, - spaceChildTuple, - }, - }, &roomEvents) - - if err != nil { - return result - } - - HydrateRoomInfoWithStateEvents(roomId, userId, &result, roomEvents.StateEvents) - - return result -} - -func HydrateRoomInfoWithStateEvents(roomId string, userId UserIdentifier, r *RoomInfo, stateEvents []*gomatrixserverlib.HeaderedEvent) { - for _, state := range stateEvents { - switch state.Type() { - case gomatrixserverlib.MRoomCreate: - var creatorEvent CreatorEvent - err := json.Unmarshal(state.Content(), &creatorEvent) - r.IsOwner = strings.HasPrefix( - creatorEvent.Creator, - userId.LocalPart, - ) - if err == nil { - r.RoomType = Space - r.SpaceNetworkId = roomId - } - case ConstSpaceChildEventType: - r.RoomType = Space - r.SpaceNetworkId = roomId - case ConstSpaceParentEventType: - r.RoomType = Channel - r.SpaceNetworkId = *state.StateKey() - r.ChannelNetworkId = roomId - } - } - -} - -func NewClientRoomserverStore(rsAPI roomserver.ClientRoomserverAPI) StoreAPI { - return &ClientRoomserverStore{ - rsAPI: rsAPI, - } -} - -func NewSyncRoomserverStore(rsAPI roomserver.SyncRoomserverAPI) StoreAPI { - return &SyncRoomserverStore{ - rsAPI: rsAPI, - } -} diff --git a/zion/util_converters.go b/zion/util_converters.go new file mode 100644 index 000000000..5d4abb950 --- /dev/null +++ b/zion/util_converters.go @@ -0,0 +1,18 @@ +package zion + +import ( + "github.com/ethereum/go-ethereum/crypto" +) + +func NetworkIdToHash(networkId string) [32]byte { + hash := crypto.Keccak256Hash([]byte(networkId)) + return sliceBytesToBytes32(hash.Bytes()) +} + +func sliceBytesToBytes32(bytes []byte) [32]byte { + bytes32 := [32]byte{} + for i := 0; i < 32; i++ { + bytes32[i] = bytes[i] + } + return bytes32 +} diff --git a/zion/web3_util.go b/zion/util_web3.go similarity index 100% rename from zion/web3_util.go rename to zion/util_web3.go diff --git a/zion/zion_authorization.go b/zion/zion_authorization.go index 155116dd7..4a3d5194c 100644 --- a/zion/zion_authorization.go +++ b/zion/zion_authorization.go @@ -2,84 +2,71 @@ package zion import ( _ "embed" + "errors" + "fmt" "github.com/ethereum/go-ethereum/common" + + "github.com/ethereum/go-ethereum/ethclient" "github.com/matrix-org/dendrite/authorization" roomserver "github.com/matrix-org/dendrite/roomserver/api" "github.com/matrix-org/dendrite/setup/config" - zion_goerli "github.com/matrix-org/dendrite/zion/contracts/zion_goerli" - zion_localhost "github.com/matrix-org/dendrite/zion/contracts/zion_localhost" + log "github.com/sirupsen/logrus" ) -//go:embed contracts/zion_localhost/space-manager.json -var localhostJson []byte - -//go:embed contracts/zion_goerli/space-manager.json -var goerliJson []byte +var ErrSpaceDisabled = errors.New("space disabled") +var ErrChannelDisabled = errors.New("channel disabled") type ZionAuthorization struct { - store StoreAPI - spaceManagerLocalhost *zion_localhost.ZionSpaceManagerLocalhost - spaceManagerGoerli *zion_goerli.ZionSpaceManagerGoerli - chainId int -} -type ClientRoomserverStruct struct { - roomserver.ClientRoomserverAPI + chainId int + ethClient *ethclient.Client + store Store + spaceContract SpaceContract } -type SyncRoomserverStruct struct { - roomserver.SyncRoomserverAPI -} - -type RoomserverStoreAPI interface { - roomserver.QueryLatestEventsAndStateAPI - NewRoomserverStore() StoreAPI -} - -func (c ClientRoomserverStruct) NewRoomserverStore() StoreAPI { - return &ClientRoomserverStore{ - rsAPI: c, - } -} - -func (c SyncRoomserverStruct) NewRoomserverStore() StoreAPI { - return &SyncRoomserverStore{ - rsAPI: c, - } -} - -func NewZionAuthorization(cfg *config.ClientAPI, rsAPI RoomserverStoreAPI) (authorization.Authorization, error) { +func NewZionAuthorization(cfg *config.ClientAPI, roomQueryAPI roomserver.QueryEventsAPI) (authorization.Authorization, error) { + // create the authorization states + store := NewStore(roomQueryAPI) + chainId := cfg.PublicKeyAuthentication.Ethereum.GetChainID() + // initialise the eth client. if cfg.PublicKeyAuthentication.Ethereum.NetworkUrl == "" { log.Errorf("No blockchain network url specified in config\n") return nil, nil } - - var auth ZionAuthorization - - auth.chainId = cfg.PublicKeyAuthentication.Ethereum.GetChainID() - auth.store = rsAPI.NewRoomserverStore() - - switch auth.chainId { - case 1337, 31337: - localhost, err := newZionSpaceManagerLocalhost(cfg.PublicKeyAuthentication.Ethereum.NetworkUrl) - if err != nil { - log.Errorln("error instantiating ZionSpaceManagerLocalhost", err) - } - auth.spaceManagerLocalhost = localhost - - case 5: - goerli, err := newZionSpaceManagerGoerli(cfg.PublicKeyAuthentication.Ethereum.NetworkUrl) - if err != nil { - log.Errorln("error instantiating ZionSpaceManagerGoerli", err) - } - auth.spaceManagerGoerli = goerli - - default: - log.Errorf("Unsupported chain id: %d\n", auth.chainId) + ethClient, err := GetEthClient(cfg.PublicKeyAuthentication.Ethereum.NetworkUrl) + if err != nil { + log.Errorf("Cannot connect to eth client %v\n", cfg.PublicKeyAuthentication.Ethereum.NetworkUrl) + return nil, err } - return &auth, nil + za := &ZionAuthorization{ + chainId: chainId, + ethClient: ethClient, + store: store, + } + switch za.chainId { + case 1337, 31337: + localhost, err := NewSpaceContractLocalhost(za.ethClient) + if err != nil { + log.Errorf("error instantiating SpaceContractLocalhost. Error: %v", err) + return nil, err + } + za.spaceContract = localhost + case 5: + goerli, err := NewSpaceContractGoerli(za.ethClient) + if err != nil { + log.Errorf("error instantiating SpaceContractGoerli. Error: %v", err) + return nil, err + } + za.spaceContract = goerli + default: + errMsg := fmt.Sprintf("unsupported chain id: %d", za.chainId) + log.Error(errMsg) + return nil, errors.New(errMsg) + } + // no errors. + return za, nil } func (za *ZionAuthorization) IsAllowed(args authorization.AuthorizationArgs) (bool, error) { @@ -93,112 +80,54 @@ func (za *ZionAuthorization) IsAllowed(args authorization.AuthorizationArgs) (bo return true, nil } - switch za.chainId { - case 1337, 31337: - return za.isAllowedLocalhost(roomInfo, userIdentifier.AccountAddress, args.Permission) - case 5: - return za.isAllowedGoerli(roomInfo, userIdentifier.AccountAddress, args.Permission) + // Check if user is entitled to space / channel. + switch roomInfo.RoomType { + case Space: + isEntitled, err := za.isEntitledToSpace(roomInfo, userIdentifier.AccountAddress, args.Permission) + return isEntitled, err + case Channel: + isEntitled, err := za.isEntitledToChannel(roomInfo, userIdentifier.AccountAddress, args.Permission) + return isEntitled, err default: - log.Errorf("Unsupported chain id: %d", userIdentifier.ChainId) + errMsg := fmt.Sprintf("unhandled room type: %s", roomInfo.RoomType) + log.Error("IsAllowed", errMsg) + return false, errors.New(errMsg) } - - return false, nil } -func (za *ZionAuthorization) isAllowedLocalhost( - roomInfo RoomInfo, - user common.Address, - permission authorization.Permission, -) (bool, error) { - if za.spaceManagerLocalhost != nil { - permission := zion_localhost.DataTypesPermission{ - Name: permission.String(), - } - - isEntitled, err := za.spaceManagerLocalhost.IsEntitled( - nil, - roomInfo.SpaceNetworkId, - roomInfo.ChannelNetworkId, - user, - permission, - ) - - if err != nil { - return false, err - } - - return isEntitled, nil +func (za *ZionAuthorization) isEntitledToSpace(roomInfo RoomInfo, user common.Address, permission authorization.Permission) (bool, error) { + // space disabled check. + isDisabled, err := za.spaceContract.IsSpaceDisabled(roomInfo.SpaceNetworkId) + if err != nil { + return false, err + } else if isDisabled { + return false, ErrSpaceDisabled } - return false, nil + // space entitlement check. + isEntitled, err := za.spaceContract.IsEntitledToSpace( + roomInfo.SpaceNetworkId, + user, + permission, + ) + return isEntitled, err } -func (za *ZionAuthorization) isAllowedGoerli( - roomInfo RoomInfo, - user common.Address, - permission authorization.Permission, -) (bool, error) { - if za.spaceManagerGoerli != nil { - permission := zion_goerli.DataTypesPermission{ - Name: permission.String(), - } - - isEntitled, err := za.spaceManagerGoerli.IsEntitled( - nil, - roomInfo.SpaceNetworkId, - roomInfo.ChannelNetworkId, - user, - permission, - ) - - if err != nil { - return false, err - } - - return isEntitled, nil +func (za *ZionAuthorization) isEntitledToChannel(roomInfo RoomInfo, user common.Address, permission authorization.Permission) (bool, error) { + // channel disabled check. + isDisabled, err := za.spaceContract.IsChannelDisabled(roomInfo.SpaceNetworkId, roomInfo.ChannelNetworkId) + if err != nil { + return false, err + } else if isDisabled { + return false, ErrSpaceDisabled } - return false, nil -} - -func newZionSpaceManagerLocalhost(endpointUrl string) (*zion_localhost.ZionSpaceManagerLocalhost, error) { - addresses, err := loadSpaceManagerAddresses(localhostJson) - if err != nil { - return nil, err - } - - address := common.HexToAddress(addresses.Spacemanager) - - client, err := GetEthClient(endpointUrl) - if err != nil { - return nil, err - } - - spaceManager, err := zion_localhost.NewZionSpaceManagerLocalhost(address, client) - if err != nil { - return nil, err - } - - return spaceManager, nil -} - -func newZionSpaceManagerGoerli(endpointUrl string) (*zion_goerli.ZionSpaceManagerGoerli, error) { - addresses, err := loadSpaceManagerAddresses(goerliJson) - if err != nil { - return nil, err - } - - address := common.HexToAddress((addresses.Spacemanager)) - - client, err := GetEthClient(endpointUrl) - if err != nil { - return nil, err - } - - spaceManager, err := zion_goerli.NewZionSpaceManagerGoerli(address, client) - if err != nil { - return nil, err - } - - return spaceManager, nil + // channel entitlement check. + isEntitled, err := za.spaceContract.IsEntitledToChannel( + roomInfo.SpaceNetworkId, + roomInfo.ChannelNetworkId, + user, + permission, + ) + return isEntitled, err }